temp
This commit is contained in:
16
dist/tools/registry.d.ts
vendored
Normal file
16
dist/tools/registry.d.ts
vendored
Normal 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>;
|
||||
Reference in New Issue
Block a user