/** * Shared types for the code-mode module. * * Defines the ToolEntry shape used by ToolSearchIndex and ToolBridge, * and the ExecutionResult returned by CodeExecutor. */ /** A registered MCP tool available inside the sandbox. */ export interface ToolEntry { /** Full tool name as registered with MCP (e.g. 'gitlab_list_issues') */ name: string; /** Human-readable description */ description: string; /** Namespace derived from the tool name prefix (e.g. 'gitlab', 'jira', 'confluence') */ namespace: string; /** Function name within the namespace (e.g. 'list_issues') */ functionName: string; /** JSON Schema for the tool's input parameters, if available */ inputSchema?: Record; /** The registered tool handler */ handler: ToolHandler; } /** * A callable tool handler. * The handler takes parsed arguments and returns a result. */ export type ToolHandler = (args: Record) => Promise; /** Result from a CodeExecutor.execute() call */ export interface ExecutionResult { /** The value returned by the user code (null on error) */ result: unknown; /** All captured console output (log/warn/error) */ logs: string[]; } /** Options for a single code execution */ export interface ExecutionOptions { /** Timeout in milliseconds (default: 30000) */ timeout?: number; /** Memory limit in MB (default: 128) */ memoryLimitMb?: number; } //# sourceMappingURL=types.d.ts.map