import { z } from "zod"; import type { AgentTool } from "@kenkaiiii/gg-agent"; import type { ProcessManager } from "../core/process-manager.js"; import { type ToolOperations } from "./operations.js"; import { type ResolveShellOpts } from "../core/shell.js"; import { type GetNetworkPolicy } from "../core/network-guard.js"; import { type SandboxPolicy } from "../core/sandbox.js"; /** Host-authored rejection: no process started, so this is not a failed check. */ export declare const REVIEW_REJECTED_BEFORE_START = "Error: review requires a local, non-persistent foreground verification check. Pass only the check in command; do not combine it with edits or diff inspection. Nothing was run."; /** * Background process id when a bash result reports that a foreground command * outlived its default budget and was handed to the process manager. Such a * command has no exit code yet: its outcome arrives later, like an explicit * `run_in_background` run, so callers must not read the result as a failure. */ export declare function autoBackgroundedId(result: string): string | undefined; /** * Render command output for the tool result. Over-limit output is compressed * (keeps errors + head/tail, collapses repeats) rather than blindly * tail-sliced, and the raw output is offloaded to `~/.gg/tool-output/` so the * model can recover the lost portion with `read --offset` instead of * re-running the command. The offload is best-effort — a full disk or * permission error never fails the tool result. */ export declare function renderBashOutput(rawOutput: string, command?: string, /** bash with pipefail (not the cmd.exe fallback): see classifyVerificationCommand. */ posixShell?: boolean): Promise; declare const BashParams: z.ZodObject<{ command: z.ZodString; review: z.ZodOptional; timeout: z.ZodOptional; run_in_background: z.ZodOptional; persist: z.ZodOptional; wake: z.ZodOptional; silence_seconds: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export declare function createBashTool(cwd: string, processManager: ProcessManager, ops?: ToolOperations, planModeRef?: { current: boolean; }, shellOpts?: ResolveShellOpts, getNetworkPolicy?: GetNetworkPolicy, getSandboxPolicy?: () => SandboxPolicy, /** Default foreground budget; injectable so tests need not wait 120s. */ defaultTimeoutMs?: number): AgentTool; export {};