import { n as ToolResolver, m as ToolRegistryOptions, d as ToolInvocationListener, T as Tool, c as ToolPolicy, k as ToolPolicyRegistration, l as ToolRegistration, a as ToolInvokeOptions, b as ToolInvocationResult, J as JsonSchema, e as ToolAnnotations, M as MaybePromise, g as ToolInvocationError, o as ToolSchema } from './types-c3u6kU61.js'; export { f as ToolContext, h as ToolInvocationErrorCode, i as ToolInvocationEvent, j as ToolInvocationRequest, p as ToolValidationIssue } from './types-c3u6kU61.js'; type Listener = () => void; /** React-independent, observable registry with scoped override and restoration semantics. */ declare class ToolRegistry implements ToolResolver { #private; constructor(options?: ToolRegistryOptions); subscribe: (listener: Listener) => (() => void); subscribeInvocations: (listener: ToolInvocationListener) => (() => void); getSnapshot: () => readonly Tool[]; getTool: (name: string) => Tool | undefined; getPolicy: () => ToolPolicy | undefined; getBaseTools: () => readonly Tool[]; setPolicy(policy: ToolPolicy | undefined): void; registerPolicy(policy: ToolPolicy): ToolPolicyRegistration; /** Replace the lowest-priority base scope while preserving route/component overrides. */ setBaseTools(tools: readonly Tool[]): void; register(tools: readonly Tool[]): ToolRegistration; invokeTool(name: string, arguments_: unknown, options?: ToolInvokeOptions): Promise>; } declare function createToolRegistry(options?: ToolRegistryOptions): ToolRegistry; interface WebMcpExecuteOptions { signal: AbortSignal; } interface WebMcpToolFailureDetails { ok: false; invocationId: string; error: ToolInvocationError; } interface WebMcpTextContent { type: "text"; text: string; } /** MCP-shaped failure returned because WebMCP currently discards rejected promise details. */ interface WebMcpToolFailure { isError: true; content: readonly WebMcpTextContent[]; structuredContent: WebMcpToolFailureDetails; } /** The browser-facing tool shape defined by the WebMCP imperative API. */ interface WebMcpTool { name: string; title?: string; description: string; inputSchema: JsonSchema; annotations?: ToolAnnotations; execute: (arguments_: Record, options?: WebMcpExecuteOptions) => MaybePromise; } interface WebMcpRegisterToolOptions { signal?: AbortSignal; } /** The subset of Document.modelContext used by SuperCmdK. */ interface WebMcpModelContext { registerTool(tool: WebMcpTool, options?: WebMcpRegisterToolOptions): MaybePromise; } interface WebMcpBridgeOptions { /** Receives asynchronous browser registration failures. */ onError?: (error: Error, tool: Tool) => void; } interface WebMcpBridge { /** Whether a compatible document.modelContext was present when connected. */ readonly supported: boolean; dispose(): void; } /** Project one canonical SuperCmdK tool into the WebMCP imperative tool shape. */ declare function toWebMcpTool(tool: Tool, registry: ToolRegistry): WebMcpTool; /** Keep a registry's active tools synchronized with Document.modelContext. */ declare function connectToolRegistryToWebMcp(registry: ToolRegistry, options?: WebMcpBridgeOptions): WebMcpBridge; /** Detect support without registering any tools. */ declare function supportsWebMcp(): boolean; type ToolQualityIssueCode = "missing-title" | "missing-read-only-hint" | "contradictory-annotations" | "open-arguments" | "missing-property-description"; interface ToolQualityIssue { toolName: string; code: ToolQualityIssueCode; severity: "error" | "warning"; message: string; path?: string; } /** Report deterministic tool-contract problems that commonly reduce agent reliability. */ declare function auditToolQuality(tools: readonly (ToolSchema | Tool)[]): readonly ToolQualityIssue[]; /** Resolve, validate, authorize, confirm, and execute one registered tool. */ declare function invokeTool(resolver: ToolResolver, name: string, arguments_: unknown, options?: ToolInvokeOptions): Promise>; interface LlmsTxtLink { title: string; url: string; description?: string; } interface LlmsTxtPublisher { name: string; description?: string; url?: string; } interface LlmsTxtAgentAccess { /** The website exposes tools through document.modelContext. */ webMcp?: boolean; /** URL of a remote MCP server agents can connect to. */ mcpUrl?: string; /** Additional access, safety, authentication, or usage guidance. */ description?: string; } interface LlmsTxtSection { title: string; /** Markdown content placed below the section heading. */ content?: string; links?: readonly LlmsTxtLink[]; } interface LlmsTxtOptions { name: string; description: string; siteUrl?: string; purpose?: string; audience?: string; publisher?: LlmsTxtPublisher; agentAccess?: LlmsTxtAgentAccess; /** Durable tool definitions to document. Do not include context-dependent runtime snapshots. */ tools?: readonly (ToolSchema | Tool)[]; documentation?: readonly LlmsTxtLink[]; sections?: readonly LlmsTxtSection[]; } /** Generate an llms.txt document without writing files or reading runtime page state. */ declare function generateLlmsTxt(options: LlmsTxtOptions): string; export { JsonSchema, type LlmsTxtAgentAccess, type LlmsTxtLink, type LlmsTxtOptions, type LlmsTxtPublisher, type LlmsTxtSection, MaybePromise, Tool, ToolAnnotations, ToolInvocationError, ToolInvocationListener, ToolInvocationResult, ToolInvokeOptions, ToolPolicy, ToolPolicyRegistration, type ToolQualityIssue, type ToolQualityIssueCode, ToolRegistration, ToolRegistry, ToolRegistryOptions, ToolResolver, ToolSchema, type WebMcpBridge, type WebMcpBridgeOptions, type WebMcpExecuteOptions, type WebMcpModelContext, type WebMcpRegisterToolOptions, type WebMcpTextContent, type WebMcpTool, type WebMcpToolFailure, type WebMcpToolFailureDetails, auditToolQuality, connectToolRegistryToWebMcp, createToolRegistry, generateLlmsTxt, invokeTool, supportsWebMcp, toWebMcpTool };