| 1 | import * as AWS from "@/AWS"; |
| 2 | import * as Alchemy from "@/index.ts"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import IsolatedOrchestrator from "./orchestrator.ts"; |
| 5 | import IsolatedSandboxLive from "./sandbox.ts"; |
| 6 | |
| 7 | /** |
| 8 | * Isolated-project MicroVM stack: the bundled {@link IsolatedSandboxLive} |
| 9 | * image plus the Lambda orchestrator that drives one MicroVM through its |
| 10 | * in-VM RPC + fetch routes. |
| 11 | */ |
| 12 | export default Alchemy.Stack( |
| 13 | "IsolatedProjectMicrovmStack", |
| 14 | { |
| 15 | providers: AWS.providers(), |
| 16 | state: Alchemy.localState(), |
| 17 | }, |
| 18 | Effect.gen(function* () { |
| 19 | const fn = yield* IsolatedOrchestrator; |
| 20 | return { |
| 21 | url: fn.functionUrl.as<string>(), |
| 22 | }; |
| 23 | }).pipe(Effect.provide(IsolatedSandboxLive)), |
| 24 | ); |