import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Scope from "effect/Scope"; import * as HttpClient from "effect/unstable/http/HttpClient"; import * as HttpServer from "effect/unstable/http/HttpServer"; import * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner"; import { type RpcServerEnvironment } from "./RpcServerEnvironment.ts"; declare const RpcSpawner_base: Context.ServiceClass; export declare class RpcSpawner extends RpcSpawner_base { } /** * The spawner forks one child per distinct `serverEntryUrl`. Stack-specific * context (stack name/stage, AlchemyContext) is NOT part of the spawn key — * it travels per RPC session (see `SESSION_ENV_PARAM`), so many stacks * (e.g. every test file in a run) share a single sidecar process. */ export interface RpcSpawnPayload { serverEntryUrl: string; } /** * One line of sidecar child output, tagged with the channel it arrived on. * Streamed as NDJSON over the spawner's {@link LOGS_PATH} endpoint. */ export interface SidecarLogLine { readonly channel: "stdout" | "stderr"; readonly line: string; } /** * Path on the spawner's HTTP server that streams sidecar output as NDJSON * ({@link SidecarLogLine} per line). Consumed by {@link forwardSidecarLogs} * from the exec child, which owns the terminal renderer. */ export declare const LOGS_PATH = "/logs"; export declare const make: (args_0: Pick) => Effect.Effect<{ readonly url: string; }, never, ChildProcessSpawner.ChildProcessSpawner | HttpServer.HttpServer | Scope.Scope>; export declare const layerServer: (environment: Pick) => Layer.Layer; /** * Pull sidecar output from the spawner (the outer `alchemy dev` process) * into THIS process's Console. The exec child owns the terminal renderer — * Ink patches its `console`, so lines printed here are inserted cleanly * above the repainting progress region instead of racing it on the shared * tty. Forks in the ambient scope and never fails: when no spawner is * configured (`ALCHEMY_RPC_SPAWNER_URL` absent — plain deploy/destroy) it is * a no-op, and if the connection drops the spawner's own fallback printing * takes over. */ export declare const forwardSidecarLogs: Effect.Effect; export {}; //# sourceMappingURL=RpcSpawner.d.ts.map