/** * Permission system — controls tool execution based on permission mode. * * Three modes: * - `yolo`: All tools allowed without prompting * - `auto`: Read-only tools allowed; destructive tools require confirmation * - `ask`: All non-read-only tools require confirmation * * Users can type "always" when prompted to upgrade to `auto` mode * for the rest of the session (and persist to config). */ import * as readline from 'node:readline/promises'; import type { Tool } from './tools/types.js'; import type { CrowcoderConfig } from './types.js'; /** * Check if a tool call is allowed under the current permission mode. * Returns true if allowed, false if denied. * * @param tool - The tool being invoked * @param input - The tool's input arguments * @param config - Current Crowcoder configuration (may be mutated if user types "always") * @param rl - Readline interface for prompting the user * @returns True if the tool call is allowed, false if denied */ export declare function checkPermission(tool: Tool, input: Record, config: CrowcoderConfig, rl: readline.Interface): Promise;