This commit is contained in:
2026-05-17 12:43:53 -07:00
commit 7c8def0aaa
7507 changed files with 1419399 additions and 0 deletions

16
dist/tools/registry.d.ts vendored Normal file
View File

@@ -0,0 +1,16 @@
import { ToolContext } from './context';
export interface ToolDefinition {
name: string;
description: string;
parameters: Record<string, unknown>;
/** Implementation — called by executeTool(). Not sent to the LLM. */
handler: (args: Record<string, unknown>, ctx: ToolContext) => Promise<unknown>;
}
/**
* Mutable array kept in sync with the registry.
* Used by agents.ts to pick tool subsets by name (backwards-compatible with ALL_TOOLS).
*/
export declare const ALL_TOOLS: ToolDefinition[];
export declare function registerTool(tool: ToolDefinition): void;
/** Dispatch a tool call by name — O(1) map lookup, no switch needed. */
export declare function executeTool(name: string, args: Record<string, unknown>, ctx: ToolContext): Promise<unknown>;