import type { AgentTool } from "@gajae-code/agent-core"; import type { RawArgumentValidationResult, TSchema } from "@gajae-code/ai/types"; import type { ToolFactory, ToolSession } from "."; export interface ToolDescriptorMetadata { readonly name: string; readonly summary?: string; readonly loadMode?: "essential" | "discoverable"; readonly hidden?: boolean; readonly deferrable?: boolean; readonly nonAbortable?: boolean; readonly concurrency?: "shared" | "exclusive"; readonly strict?: boolean; readonly lenientArgValidation?: boolean; readonly mergeCallAndResult?: boolean; readonly inline?: boolean; readonly rawArgumentValidation?: (arguments_: Record, session?: ToolSession) => RawArgumentValidationResult; readonly intent?: AgentTool["intent"]; readonly parametersForSession?: (session?: ToolSession) => TSchema; readonly parameters?: TSchema; readonly description?: string; readonly label?: string; readonly customWireName?: string; readonly customFormat?: AgentTool["customFormat"]; readonly platformExclusions?: readonly { readonly platform: NodeJS.Platform; readonly arch?: NodeJS.Architecture; }[]; } export interface ToolAvailabilityContext { readonly includeYield?: boolean; readonly enableLsp?: boolean; readonly goalEnabled?: boolean; readonly goalStateToolNames?: readonly string[]; readonly allowEval?: boolean; readonly discoveryActive?: boolean; } export type ToolDescriptorLoadResult = AgentTool | null | Promise | null>; type Loader = (session: ToolSession) => ToolDescriptorLoadResult; export interface ToolDescriptor { readonly metadata: ToolDescriptorMetadata; readonly presentation: ToolDescriptorPresentation; readonly isAvailable: (session: ToolSession, context?: ToolAvailabilityContext) => boolean; readonly load: Loader; } export interface ToolDescriptorPresentation { readonly label: string; readonly summary?: string; } export declare class LazyAgentTool implements AgentTool { #private; readonly descriptor: ToolDescriptor; constructor(descriptor: ToolDescriptor, materialized?: AgentTool, loader?: () => ToolDescriptorLoadResult, session?: ToolSession); /** Materialize this facade for contract tests without exposing it in production dispatch. */ materializeForTests(): Promise>; get name(): string; get description(): string; get parameters(): TSchema; get rawArgumentValidation(): ((arguments_: Record) => RawArgumentValidationResult) | undefined; get strict(): boolean | undefined; get customFormat(): { syntax: "lark" | "regex"; definition: string; } | undefined; get customWireName(): string | undefined; get safeSummary(): ((kind: "args" | "result", value: unknown) => string | undefined) | undefined; get safeSummaryFields(): { args?: string[]; result?: string[]; } | undefined; get label(): string; get hidden(): boolean | undefined; get deferrable(): boolean | undefined; get loadMode(): "essential" | "discoverable" | undefined; get summary(): string | undefined; get nonAbortable(): boolean | undefined; get concurrency(): "shared" | "exclusive" | undefined; get lenientArgValidation(): boolean | undefined; get intent(): "omit" | "optional" | "require" | ((args: Partial) => string | undefined) | undefined; get renderCall(): ((args: any, options: import("@gajae-code/agent-core").RenderResultOptions, theme: any) => unknown) | undefined; get renderResult(): ((result: import("@gajae-code/agent-core").AgentToolResult, options: import("@gajae-code/agent-core").RenderResultOptions, theme: any) => unknown) | undefined; get mergeCallAndResult(): boolean | undefined; get inline(): boolean | undefined; get mode(): any; readonly execute: AgentTool["execute"]; } export type EffectiveToolDiscoveryMode = "off" | "mcp-only" | "all"; export interface ToolDiscoverySettingsSource { get(key: string): unknown; } export declare function resolveEffectiveDiscoveryMode(settings: ToolDiscoverySettingsSource, explicitMcpConfigPath?: string): EffectiveToolDiscoveryMode; export declare function evictCachedTool(key: string): void; export declare const PLATFORM_EXCLUDED_TOOL_DESCRIPTORS: Record; export declare const BUILTIN_TOOL_DESCRIPTORS: Record; export declare const HIDDEN_TOOL_DESCRIPTORS: Record; export declare const TOOL_DESCRIPTORS: Record; export declare const TOOL_DESCRIPTOR_REGISTRY: Record; export declare const BUILTIN_TOOL_DESCRIPTOR_REGISTRY: Record; export declare const HIDDEN_TOOL_DESCRIPTOR_REGISTRY: Record; export declare const BUILTIN_TOOLS: Record; export declare const HIDDEN_TOOLS: Record; export {};