import { type CapabilityMissEvent, type Json, type RunContext, type ThreadId, type ToolCall, type ToolListing, type ToolOutcome } from "@vendoai/core"; import type { UIMessage } from "ai"; export declare const CAPABILITY_MISS_TOOL_NAME = "vendo_report_capability_miss"; export interface CapabilityMissConfig { hostId: string; /** #557 โ€” a LAZY, memoized factory rather than an eager promise: resolving the * surface hash drives the actions registry's `loadHost`, which now awaits the * cloud overrides fetch. Deferring keeps that fetch off the compose path * (Workers global scope). Awaited only when a miss is actually reported. */ surface: () => Promise; emit(event: CapabilityMissEvent): void | Promise; } interface DetectorOptions { config: CapabilityMissConfig; ctx: RunContext; intent: string; threadId?: ThreadId; /** The names a report's `toolsConsidered` may claim โ€” the projected surface, * resolved at report time so a fabricated name never lands in telemetry and * building the detector costs nothing. Unset (or failing) keeps every * pattern-valid name, which is the honest degradation. */ available?: () => Promise>; } /** Deterministic, deliberately conservative removal of common credential/PII forms. */ export declare function scrubCapabilityMissText(value: string): string; export declare function latestUserIntent(messages: UIMessage[]): string; /** The reporter tool, directly exposed: the runtime lists `listing` on the * turn's surface and dispatches calls to `execute`. Never through the guard โ€” * reporting a miss spends no authority (ยง12: reads are silent, always). */ export interface CapabilityMissReporter { listing: ToolListing; execute(args: Json): Promise; } export interface CapabilityMissDetector { onCall(call: ToolCall): (outcome: ToolOutcome) => void; reporter: CapabilityMissReporter; } export declare function createCapabilityMissDetector(options: DetectorOptions): CapabilityMissDetector; export {}; //# sourceMappingURL=capability-miss.d.ts.map