/** * hosts.ts, the real effects behind the trigger family's ports. * * manager.ts holds the policy and takes every effect as an injected port, so * this file is the one place where that policy meets an actual subprocess and * an actual agent. A host wires these once at composition; tests keep using * fakes. * * The on-exit host is deliberately built on ProcessManager rather than a fresh * Bun.spawn: ProcessManager already owns the credential-env scrub, the live * output collection, the SIGTERM→SIGKILL watchdog and the terminating-signal * capture, every one of which an honest termination payload needs. Building a * second, thinner spawn path here would mean an on-exit trigger silently had * weaker guarantees than a plain background command. */ import type { ProcessManager } from '../tools/shared/process-manager.js'; import type { TriggerProcessHost } from './process-triggers.js'; import type { TriggerActionExecutor, TriggerStreamHost } from './manager-types.js'; /** ProcessManager-backed on-exit host. Binds only to processes we launched. */ export declare function createProcessManagerTriggerHost(processManager: ProcessManager): TriggerProcessHost; /** * Bun-backed stream host: spawns the long-lived command from argv (no shell) * and pushes decoded chunks to the manager as they arrive. */ export declare function createBunStreamHost(): TriggerStreamHost; /** What a fired trigger needs in order to actually start an agent turn. */ export interface TriggerAgentSpawner { spawn(input: { mode: 'spawn'; task: string; model?: string | undefined; }): { id: string; }; } /** * Real fire-action executor. * * `runGrant` runs the grant's argv through the same no-shell path as an * on-exit child. By the time it is reached the manager has already verified * the digest against the registered grant, so what runs here is exactly what a * person confirmed. */ export declare function createTriggerActionExecutor(deps: { readonly agents: TriggerAgentSpawner; readonly processManager: ProcessManager; readonly grantTimeoutMs?: number | undefined; }): TriggerActionExecutor; //# sourceMappingURL=hosts.d.ts.map