1/**
2 * The AWS provider group served by the dev sidecar (see
3 * `Local/Sidecar.ts`): the floci-backed local providers, whose long-lived
4 * state — `Bundle.watch` loops hot-swapping Lambda code into the emulator,
5 * ECS image watch loops rebuilding and restarting task containers —
6 * survives exec-process hot reloads during `alchemy dev`. Built per session
7 * the first time a stack asks for one of their types, so a stack without
8 * AWS resources never starts the emulator. Mirrors
9 * [Cloudflare/Local.ts](../../Cloudflare/Local.ts).
10 */
11import * as Layer from "effect/Layer";
12import { DockerLive } from "../../Docker/Docker.ts";
13import type * as RpcServer from "../../Local/RpcServer.ts";
14import { FlociServiceProvider } from "../ECS/FlociServiceProvider.ts";
15import { FlociTaskProvider } from "../ECS/FlociTaskProvider.ts";
16import { FlociFunctionProvider } from "../Lambda/FlociFunctionProvider.ts";
17import { FlociMicrovmImageProvider } from "../Lambda/FlociMicrovmImageProvider.ts";
18
19export default Layer.mergeAll(
20 FlociFunctionProvider(),
21 FlociMicrovmImageProvider(),
22 FlociTaskProvider(),
23 FlociServiceProvider(),
24).pipe(
25 // The ECS image pipelines (docker build / mirror / push) run in the
26 // sidecar and need the Docker CLI service.
27 Layer.provide(DockerLive),
28) satisfies RpcServer.ProviderLayer;