import { Context, Effect, Layer } from 'effect'; import { SubagentAlreadyExistsError, SubagentBusyError, SubagentDestroyedError, SubagentExecutionError, SubagentNotFoundError, SubagentTimeoutError } from './errors'; export declare const CAPTURE_PROCESS_SOURCE: string; export type SubagentStatus = 'idle' | 'running' | 'failed' | 'destroyed'; export interface SpawnSubagentOptions { readonly id?: string; readonly name: string; readonly command: string; readonly args?: readonly string[]; readonly cwd?: string; readonly env?: Record; readonly metadata?: Record; readonly destroy?: { readonly signal?: NodeJS.Signals | number; readonly cleanupArgs?: readonly string[]; readonly cleanupTimeoutMs?: number; readonly ignoreCleanupFailure?: boolean; }; } export interface ExecuteSubagentOptions { readonly args?: readonly string[]; readonly timeoutMs?: number; readonly deadlineAt?: number; readonly stdin?: string; readonly maxOutputChars?: number; readonly terminationGraceMs?: number; } export interface SubagentExecutionSummary { readonly args: readonly string[]; readonly startedAt: string; readonly endedAt?: string; readonly pid?: number; readonly exitCode?: number | null; readonly signal?: NodeJS.Signals | null; readonly timedOut?: boolean; readonly stdoutPreview?: string; readonly stderrPreview?: string; } export interface SubagentInfo { readonly id: string; readonly name: string; readonly command: string; readonly args: readonly string[]; readonly cwd?: string; readonly envKeys: readonly string[]; readonly metadata: Record; readonly status: SubagentStatus; readonly createdAt: string; readonly updatedAt: string; readonly executionCount: number; readonly currentExecution?: SubagentExecutionSummary; readonly lastExecution?: SubagentExecutionSummary; } export interface ExecuteSubagentResult { readonly pid?: number; readonly stdout: string; readonly stderr: string; readonly exitCode: number | null; readonly signal: NodeJS.Signals | null; } export interface SubagentService { spawnSubagent(options: SpawnSubagentOptions): Effect.Effect; listSubagents(): Effect.Effect; inspectSubagent(id: string): Effect.Effect; executeSubagent(id: string, options?: ExecuteSubagentOptions): Effect.Effect; destroySubagent(id: string): Effect.Effect; destroyAllSubagents(): Effect.Effect; } export declare const SubagentService: Context.Tag; export declare const SubagentServiceLive: Layer.Layer; //# sourceMappingURL=service.d.ts.map