1import * as AWS from "@/AWS";
2import * as Alchemy from "@/index.ts";
3import * as Effect from "effect/Effect";
4import IsolatedOrchestrator from "./orchestrator.ts";
5import 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 */
12export 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);