@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, 04:45 UTC

main
ts 31 lines 1.05 KB
Raw
1 import * as AWS from "@alchemy.run/aws";
2 import * as Effect from "effect/Effect";
3 import { MicrovmBuildRole } from "./build-role.ts";
4 import { effectfulImpl } from "./effectful-impl.ts";
5
6 /**
7 * Effectful MicroVM image on **node** — identical server to the bun effectful
8 * {@link import("./effectful-bun.ts").EffectfulBun}, but bundled for the node
9 * runtime (`dnf install -y nodejs`, no bun install). Since the Lambda MicroVM
10 * base ships node, this avoids the bun installer step entirely; comparing it to
11 * the bun effectful isolates the runtime's contribution to cold start.
12 */
13 export class EffectfulNode extends AWS.Lambda.MicrovmImage<
14 EffectfulNode,
15 {
16 hello: (message: string) => Effect.Effect<string>;
17 }
18 >()("MicrovmEffectfulNode") {}
19
20 export default EffectfulNode.make(
21 MicrovmBuildRole.pipe(
22 Effect.map((buildRole) => ({
23 main: import.meta.filename,
24 buildRole,
25 runtime: "node" as const,
26 resources: [{ minimumMemoryInMiB: 512 }],
27 cpuConfigurations: [{ architecture: "ARM_64" }],
28 })),
29 ),
30 effectfulImpl,
31 );