import type { CommandRunner, CommandRunnerOptions, CommandRunnerResult } from "../../packages/agent-spawn/dist/index.js"; import { type HookBridgeOptions } from "../../packages/agent-spawn/dist/index.js"; import { type ExecutionCommand } from "./execution-context.js"; export type { CommandRunner, CommandRunnerOptions, CommandRunnerResult } from "../../packages/agent-spawn/dist/index.js"; export declare function formatCommandRunnerResult(result: CommandRunnerResult): string; export interface RunAndMatchOutputOptions { command: string; args: string[]; expectedOutput: string; commandOptions?: CommandRunnerOptions; skipOnDryRun?: boolean; } export declare function describeCommandExpectation(command: string, args: string[], expectedOutput: string): string; export interface CommandExpectationCheckOptions extends RunAndMatchOutputOptions { id: string; } export declare function createCommandExpectationCheck(options: CommandExpectationCheckOptions): CommandCheck; export declare function runAndMatchOutput(context: CommandCheckContext, options: RunAndMatchOutputOptions): Promise; export declare function stdoutMatchesExpected(stdout: string, expected: string): boolean; export interface CommandCheckContext { isDryRun: boolean; runCommand: CommandRunner; /** Reports the command's raw output on failure instead of a summarised cause. */ verbose?: boolean; logDryRun?: (message: string) => void; logWarning?: (message: string) => void; } export interface CommandCheck { id: string; description?: string; run(context: CommandCheckContext): Promise; } export declare function createSpawnHealthCheck(agentId: string, options: { /** Model id sent to the agent; echoed back when the agent cannot resolve it. */ model?: string; expectedOutput: string; hooks?: HookBridgeOptions; invocation?: { command: string; args: string[]; env?: Record; }; /** How to re-invoke poe-code itself; defaults to the current execution context. */ host?: ExecutionCommand; }): CommandCheck; /** * Creates a check that detects if a binary exists using multiple fallback methods. * This is useful in Docker/containerized environments where PATH may not be updated after npm install. * * @param binaryName - The name of the binary to check for (e.g., "claude", "codex") * @param id - Unique identifier for the check * @param description - Human-readable description of what's being checked * @returns A CommandCheck that verifies the binary using multiple detection methods */ export declare function createBinaryExistsCheck(binaryName: string, id: string, description: string): CommandCheck;