import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { ContentStore } from '../lib/content-store.js'; import { HistoryStore } from '../lib/history.js'; export interface ToolContext { historyStore: HistoryStore; contentStore?: ContentStore; sessionsPath?: string; currentSessionId?: string; /** * Directories `read_file` is confined to (task 136). Undefined = unrestricted. * Computed by readFileRootsForThread() in lib/gateway.ts; enforced here so a * future wiring site cannot forget the check. */ readFileRoots?: string[]; } /** * Is `target` inside one of `roots`? Segment-aware: `/a/bc` is NOT inside `/a/b`. * Both sides are resolved first, so `..` traversal cannot escape. */ export declare function isPathWithinRoots(target: string, roots: string[]): boolean; export interface ToolResult { [key: string]: unknown; content: Array<{ type: 'text'; text: string; }>; isError?: boolean; } export declare function getToolDefinitions(): Tool[]; export declare function handleToolCall(name: string, args: Record | undefined, ctx: ToolContext): Promise; //# sourceMappingURL=tool-handler.d.ts.map