import type { AgentTool } from '@earendil-works/pi-agent-core'; import type { TurnOutcomeDeliverable } from '@xopcai/gateway-contract'; import type { CommandIsolation } from '../commands/command-isolation.js'; import { type CommandStatus } from '../commands/command-registry.js'; export interface ExecCommandDetails { command: string; cwd: string; status: CommandStatus | 'blocked'; id?: string; logPath?: string; logTruncated?: boolean; exitCode: number | null; durationMs: number; timedOut: boolean; truncated: boolean; truncatedBy?: 'lines' | 'bytes' | null; outputBytes: number; totalOutputBytes: number; captureTruncated: boolean; stdout: string; stderr: string; aggregatedOutput: string; failureHint?: string; artifacts?: TurnOutcomeDeliverable[]; } export interface ExecCommandUpdateDetails { kind: 'command_output_delta'; command: string; cwd: string; stream: 'stdout' | 'stderr'; delta: string; } export interface CreateExecCommandToolOptions { /** Env var names allowed through prepareSafeToolEnv even if they match secret heuristics. */ getCommandIsolation?: () => CommandIsolation | undefined; getSessionKey?: () => string | undefined; getSkillPassthroughEnvVarNames?: () => string[]; prepareEnv?: (baseEnv: Record, cwd: string) => Promise>; } export declare function createExecCommandTool(workspaceCwd: string, options?: CreateExecCommandToolOptions): AgentTool;