import type { AgentToolResult } from "@mariozechner/pi-agent-core"; import type { ExecAsk, ExecHost, ExecSecurity } from "../infra/exec-approvals.js"; import type { ProcessSession } from "./bash-process-registry.js"; import type { ExecToolDetails } from "./bash-tools.exec-types.js"; import type { BashSandboxConfig } from "./bash-tools.shared.js"; export { applyPathPrepend, findPathKey, normalizePathPrepend } from "../infra/path-prepend.js"; export declare function sanitizeHostBaseEnv(env: Record): Record; export declare function validateHostEnv(env: Record): void; export declare const DEFAULT_MAX_OUTPUT: number; export declare const DEFAULT_PENDING_MAX_OUTPUT: number; export declare const DEFAULT_PATH: string; export declare const DEFAULT_NOTIFY_TAIL_CHARS = 400; export declare const DEFAULT_APPROVAL_TIMEOUT_MS = 120000; export declare const DEFAULT_APPROVAL_REQUEST_TIMEOUT_MS = 130000; export declare const execSchema: import("@sinclair/typebox").TObject<{ command: import("@sinclair/typebox").TString; workdir: import("@sinclair/typebox").TOptional; env: import("@sinclair/typebox").TOptional>; yieldMs: import("@sinclair/typebox").TOptional; background: import("@sinclair/typebox").TOptional; timeout: import("@sinclair/typebox").TOptional; pty: import("@sinclair/typebox").TOptional; elevated: import("@sinclair/typebox").TOptional; host: import("@sinclair/typebox").TOptional; security: import("@sinclair/typebox").TOptional; ask: import("@sinclair/typebox").TOptional; node: import("@sinclair/typebox").TOptional; }>; export type ExecProcessOutcome = { status: "completed" | "failed"; exitCode: number | null; exitSignal: NodeJS.Signals | number | null; durationMs: number; aggregated: string; timedOut: boolean; reason?: string; }; export type ExecProcessHandle = { session: ProcessSession; startedAt: number; pid?: number; promise: Promise; kill: () => void; }; export declare function normalizeExecHost(value?: string | null): ExecHost | null; export declare function normalizeExecSecurity(value?: string | null): ExecSecurity | null; export declare function normalizeExecAsk(value?: string | null): ExecAsk | null; export declare function renderExecHostLabel(host: ExecHost): "sandbox" | "gateway" | "node"; export declare function normalizeNotifyOutput(value: string): string; export declare function applyShellPath(env: Record, shellPath?: string | null): void; export declare function createApprovalSlug(id: string): string; export declare function resolveApprovalRunningNoticeMs(value?: number): number; export declare function emitExecSystemEvent(text: string, opts: { sessionKey?: string; contextKey?: string; }): void; export declare function runExecProcess(opts: { command: string; execCommand?: string; workdir: string; env: Record; sandbox?: BashSandboxConfig; containerWorkdir?: string | null; usePty: boolean; warnings: string[]; maxOutput: number; pendingMaxOutput: number; notifyOnExit: boolean; notifyOnExitEmptySuccess?: boolean; scopeKey?: string; sessionKey?: string; timeoutSec: number | null; onUpdate?: (partialResult: AgentToolResult) => void; }): Promise;