@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 03:37 UTC

main
ts 28 lines 1004 Bytes
Raw
1 import { adopt } from "alchemy/AdoptPolicy";
2 import * as Alchemy from "alchemy";
3 import * as Axiom from "@alchemy.run/axiom";
4 import * as Layer from "effect/Layer";
5 import { Observability } from "./src/observability.ts";
6 import * as Cloudflare from "@alchemy.run/cloudflare";
7 import * as Effect from "effect/Effect";
8 import * as Secrets from "alchemy/Secrets";
9 import { WriterSecrets } from "./src/deploymentConfig.ts";
10 import * as Worker from "./src/worker.ts";
11
12 export default Alchemy.Stack(
13 "T3TaskCache",
14 {
15 providers: Axiom.providers().pipe(Layer.provideMerge(Cloudflare.providers())),
16 state: Cloudflare.state(),
17 secrets: [Secrets.DotEnv(), Secrets.ProcessEnv(), WriterSecrets],
18 },
19 Effect.gen(function* () {
20 const worker = yield* Worker.Worker;
21 const observability = yield* Observability;
22 return {
23 url: worker.url,
24 workerName: worker.workerName,
25 dashboard: observability.dashboard.uid,
26 };
27 }).pipe(Effect.provide(Worker.layer), adopt(true)),
28 );