/** * ToolRegistry — Single source of truth for gateway tools (STORY-016) * * Centralizes tool definitions so that: * - VALID_TOOLS array (gateway-tool-executor.ts) is derived, not hand-coded * - gateway-tools.md can be generated at build time * - Per-agent tool filtering has one canonical list to filter against */ import type { GatewayToolName } from './types.js'; export type ToolCategory = 'memory' | 'business_data' | 'utility' | 'browser' | 'os_management' | 'os_monitoring' | 'pr_review' | 'webchat' | 'code_act' | 'multi_agent' | 'system'; export interface ToolDefinitionMeta { name: GatewayToolName; description: string; category: ToolCategory; /** Short parameter hint for prompt generation (e.g. "query?, type?, limit?") */ params?: string; /** If true, only viewers can use this tool */ viewerOnly?: boolean; } export declare class ToolRegistry { /** * Get all registered tool names. */ static getValidToolNames(): GatewayToolName[]; /** * Get tool metadata by name. */ static getTool(name: string): ToolDefinitionMeta | undefined; /** * Get all tool definitions. */ static getAllTools(): ToolDefinitionMeta[]; /** * Get tools filtered by allowed list. * If allowedTools is undefined or empty, returns all tools. * Supports wildcard patterns: "mama_*", "browser_*", "*" */ static getFilteredTools(allowedTools?: string[]): ToolDefinitionMeta[]; /** * Get tools grouped by category. */ static getByCategory(): Map; /** * Check if a tool name is registered. */ static isRegistered(name: string): boolean; /** * Validate that all registered tools have handlers in an executor. * Returns list of tool names with missing handlers. */ static validateHandlers(handlerNames: Set): string[]; /** * Generate a markdown prompt listing all tools (or filtered subset). */ static generatePrompt(allowedTools?: string[]): string; /** * Generate a compact fallback prompt (for when gateway-tools.md is not available). */ static generateFallbackPrompt(allowedTools?: string[]): string; /** * Total number of registered tools. */ static get count(): number; } //# sourceMappingURL=tool-registry.d.ts.map