/** * Plan-Mode Command Guard Extension * * Runtime extension that enforces the plan-mode command blacklist * (./command-guard.ts) as a `beforeTool` hook. The runtime builder registers * it for plan-mode sessions, making command blocking session policy in one * shared place: the hook fires for every `run_commands` tool in the runtime — * the SDK built-in and host-provided replacements like the VS Code * extension's terminal-backed tool — without threading a flag through each * layer. * * Because `beforeTool` hooks run before tool policies and user approval, * a blocked call is rejected up front: the user is never asked to approve a * command that would only fail, and the model receives the plan-mode error * as the tool result (`skip`, not `stop`, so the run continues). */ import type { AgentExtension, ITelemetryService } from "@cline/shared"; export declare const PLAN_MODE_COMMAND_GUARD_EXTENSION_NAME = "core.plan-mode-command-guard"; export interface PlanModeCommandGuardOptions { telemetry?: ITelemetryService; } export declare function createPlanModeCommandGuardExtension(options?: PlanModeCommandGuardOptions): AgentExtension;