The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import * as AWS from "@alchemy.run/aws"; |
| 2 | import * as Alchemy from "alchemy"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import Orchestrator from "./orchestrator.ts"; |
| 5 | import SandboxLive from "./sandbox.ts"; |
| 6 | |
| 7 | /** |
| 8 | * Effectful MicroVM stack (AWS-only): deploys the bundled {@link SandboxLive} |
| 9 | * image plus the {@link Orchestrator} Lambda (uses its execution role) that |
| 10 | * drives its MicroVM instance operations. The cross-cloud Cloudflare Worker |
| 11 | * host lives in its own stack (`./cloudflare-stack.ts`) so this one needs no |
| 12 | * Cloudflare credentials. |
| 13 | */ |
| 14 | export default Alchemy.Stack( |
| 15 | "MicrovmEffectfulStack", |
| 16 | { |
| 17 | providers: AWS.providers(), |
| 18 | state: Alchemy.localState(), |
| 19 | }, |
| 20 | Effect.gen(function* () { |
| 21 | const fn = yield* Orchestrator; |
| 22 | return { |
| 23 | url: fn.functionUrl.as<string>(), |
| 24 | }; |
| 25 | }).pipe(Effect.provide(SandboxLive)), |
| 26 | ); |