The best way to control Claude Code, Codex and more from any computer or phone

main
ts 24 lines 756 Bytes
Raw
1 import * as Cloudflare from "@alchemy.run/cloudflare";
2 import * as Prisma from "@alchemy.run/prisma";
3 import * as Alchemy from "alchemy";
4 import * as Effect from "effect/Effect";
5 import * as Layer from "effect/Layer";
6 import PrismaHostContainerWorker from "./worker.ts";
7
8 /**
9 * Dev-only stack for the #1334 Prisma-from-container path: a local
10 * `@prisma/dev` database handed to an arbitrary image as `DATABASE_URL`.
11 */
12 export const state = Alchemy.inMemoryState();
13
14 export default Alchemy.Stack(
15 "PrismaHostContainerStack",
16 {
17 providers: Layer.merge(Cloudflare.providers(), Prisma.providers()),
18 state,
19 },
20 Effect.gen(function* () {
21 const worker = yield* PrismaHostContainerWorker;
22 return { url: worker.url.as<string>() };
23 }),
24 );