/** * Resolve and launch one configured MCP agent lane inside the relay daemon. * * D1 deliberately makes this a launcher factory, not a generic process endpoint. The broker request * names a lane id and execution facts; this module asks the daemon's canonical dispatch-view builder * what that lane means NOW, applies the same MCP launch corrections, then reuses the existing * LaneSpawner process boundary. No command, argv, environment map or pid comes from the broker * request. * * This module is not installed by createProxy yet. It is the inert Phase-2 substrate that will be * wired only together with restart recovery semantics. */ import type { ModelCatalog } from "./catalog.js"; import type { Config } from "./config.js"; import { buildDaemonDispatchView } from "./daemon-dispatch-view.js"; import { type LaneExecutionLauncher } from "./lane-execution-broker.js"; import { type LaneSpawner } from "./mcp/lane-runner.js"; import { type ProcessCpuReader } from "./mcp/process-cpu.js"; export interface ConfiguredLaneExecutionLauncherDeps { catalog: Pick; spawn?: LaneSpawner; hostEnv?: NodeJS.ProcessEnv; platform?: NodeJS.Platform; now?: () => number; readProcessCpu?: ProcessCpuReader; /** Test seams for the canonical daemon view builder. */ manifest?: Parameters[2]["manifest"]; launcherPath?: string | null; } /** * Create the daemon-side launcher used by LaneExecutionBroker. * * A start is forced to the requested configured lane, requester=mcp, mode=agent. The daemon's live * config and dispatch view are authority; a stale MCP process cannot supply an old command line. */ export declare function createConfiguredLaneExecutionLauncher(cfg: Config, deps: ConfiguredLaneExecutionLauncherDeps): LaneExecutionLauncher;