/** * Subprocess bridge to hooks-adapter. * * Spawns `a5c-hooks-adapter` (or a custom binary from AGENT_HOOKS_PROXY_PATH) * as a child process. Communication is via JSON on stdin/stdout. * * The unified adapter imports NO hooks-adapter packages directly — all * communication is through this subprocess interface plus env vars. */ export interface InvokeOptions { /** Adapter name to pass via --adapter. */ adapter: string; /** Optional session identifier. */ sessionId?: string; /** Whether to only run bootstrapping (no event dispatch). */ bootstrapOnly?: boolean; /** Request JSON output. */ json?: boolean; /** Handler names to activate. */ handlers?: string[]; /** Working directory for the subprocess. */ cwd?: string; /** Timeout in milliseconds (default 30 000). */ timeoutMs?: number; /** Event payload to write to stdin. */ event?: Record; } export interface InvokeResult { /** Process exit code. */ exitCode: number; /** Parsed JSON from stdout (if JSON mode). */ stdout: string; /** Raw stderr output. */ stderr: string; } /** * Check whether the hooks-adapter binary is available on PATH (or at the * configured `AGENT_HOOKS_PROXY_PATH`). * * Returns `true` when ` --version` exits with code 0. */ export declare function isHooksProxyAvailable(): Promise; /** * Invoke hooks-adapter CLI as a subprocess. * * Sends the normalised event on stdin, reads the result from stdout. * Resolves with an `InvokeResult` regardless of exit code — callers * decide whether a non-zero exit is fatal. */ export declare function invokeHooksProxy(options: InvokeOptions): Promise; /** * Build the argument array for an `invokeHooksProxy` call. * * Useful for testing without actually spawning a process. */ export declare function buildInvokeArgs(options: InvokeOptions): string[]; //# sourceMappingURL=subprocess.d.ts.map