/** * Limited (scoped) cline turns refuse every tool call that needs approval — * they never auto-approve it and never wait for an answer. * * "Needs approval" is cline's own rule (cline 3.0.65, runtime/tool-policies * .ts): with auto-approve off, only SAFE_TOOLS run without asking; commands, * file edits, patches, subagents, teams and MCP tools ask. Verified against * the 3.0.65 binary (2026-09-29): * - `--json --auto-approve false` makes EVERY tool ask (the `"*"` policy * has no per-tool exceptions in json mode), and a non-TTY run refuses * each ask at once ("requires approval in a TTY session") — no hang, but * reads are refused too. * - A Cline plugin module in `<--config dir>/plugins/` is loaded in json * and ACP mode, and its `hooks.beforeTool` can return `{policy}` (merged * over the tool policy) or `{skip, reason}` (the call is not run; its * result is `{error: reason}`). * So a scoped turn runs with `--auto-approve false` (fail closed: without the * plugin nothing runs) plus the plugin below, which re-approves SAFE_TOOLS * and file edits inside the project folder (user decision 2026-09-29), and * skips everything else — commands, edits outside the project or into * `.git`, subagents, MCP tools — with a refusal the model can read. ACP turns * also answer `session/request_permission` the same way (allow SAFE_TOOLS, * reject the rest), should a request get through. */ /** cline's SAFE_AUTO_APPROVE_TOOL_NAMES (runtime/tool-policies.ts). */ export declare const CLINE_SAFE_TOOLS: readonly string[]; /** Env var carrying the turn's project folder (`--cwd`) into the plugin: * cline's beforeTool context has no working directory. */ export declare const SCOPED_WORKSPACE_ENV = "MONOMIND_CLINE_WORKSPACE"; /** Whether a scoped turn may run this edit (see EDIT_CHECK_JS). */ export declare const editAllowedInWorkspace: (name: string, input: unknown, workspace: string | undefined) => boolean; /** Start of every refusal the plugin returns (and the ACP rejection names). */ export declare const SCOPED_REFUSAL = "monomind limited mode refused"; export declare const SCOPED_PLUGIN_FILE = "monomind-scoped.js"; /** Source of the plugin module written into the scoped config dir. */ export declare function scopedPluginSource(): string; /** Writes the plugin into `/plugins/` (only when it changed). */ export declare function installScopedPlugin(configDir: string): void; /** Whether a tool error is a refusal (this runner's, or cline's own * approval refusals) rather than the tool failing. */ export declare function isClineRefusal(text: string | undefined): boolean; /** The cline tool name of an ACP permission request (`title` is * `": "`). */ export declare function permissionToolName(toolCall: Record | undefined): string; /** The answer to an ACP `session/request_permission`: full access allows it; * scoped allows SAFE_TOOLS and edits inside `workspace` (from the request's * rawInput), and rejects the rest. */ export declare function acpPermissionOutcome(params: Record | undefined, scoped: boolean, workspace?: string): { outcome: Record; denied: boolean; }; //# sourceMappingURL=cline-runner-scoped.d.ts.map