import { VENDO_KNOWLEDGE_RESULT_KIND, type KnowledgeAdapter, type KnowledgeHit, type ToolRegistry } from "@vendoai/core"; /** `vendo_`-prefixed for namespacing only — loadout exemption is declared, not prefix-based (the composition names its prompt-taught tools via `toolSearch.alwaysActive`, compose-harness.ts). This tool is not one of them: on a host past the loadout cap it can be gated out and loaded back through `find_tools`. */ export declare const VENDO_KNOWLEDGE_SEARCH_TOOL = "vendo_knowledge_search"; /** The envelope tag core names once (stream-parts.ts) — re-exported so tool consumers keep pulling it from the package that produces the envelope. */ export { VENDO_KNOWLEDGE_RESULT_KIND } from "@vendoai/core"; export interface KnowledgeCitation { docId: string; chunkId?: string; title?: string; source?: string; kind: KnowledgeHit["kind"]; /** Rides from KnowledgeHit.visibility so the UI's origin line states it instead of guessing. */ visibility: KnowledgeHit["visibility"]; snippet: string; } export type KnowledgeResultOutcome = "answered" | "insufficient-evidence" | "unavailable" | "not-found"; /** The pinned `vendo/knowledge-result@1` envelope carried on ok.output. */ export interface KnowledgeResultEnvelope { kind: typeof VENDO_KNOWLEDGE_RESULT_KIND; outcome: KnowledgeResultOutcome; hits?: KnowledgeCitation[]; /** Read-more only: the fetched document text, hard-trimmed by the caller. */ text?: string; truncated?: boolean; /** WHY this outcome, in the model's context so the agent can say what happened instead of shrugging: the `unavailable` engine failure STATEMENT (the operator's remediation — "run `vendo login`…" — stays log-side, see describeEngineFailure). */ message?: string; } export interface KnowledgeToolsOptions { /** Refusal calibration, per engine: hits scoring below this are "weak". Default 0 — never triggers, so score-less/constant-score engines (the memory adapter) never falsely refuse. */ weakScoreThreshold?: number; /** Per-principal calls per rolling minute before the tool answers a loud "rate-limited" error. Explicit option wins over the VENDO_KNOWLEDGE_MAX_CALLS_PER_MINUTE env knob; default 60. */ maxCallsPerMinute?: number; } export declare function toCitation(hit: KnowledgeHit): KnowledgeCitation; /** The one knowledge agent tool behind core's adapter contract. The registry composes into createVendo exactly when a `knowledge` adapter is configured (selectKnowledge). Tool-layer policy: chat default → auto-escalate deep once on weak results → structured insufficient-evidence; lookup → schema over glossary/api with honest not-found; readMore → posture-gated fetch; adapter failure → loud unavailable, never a silent empty result. */ export declare function createKnowledgeTools(adapter: KnowledgeAdapter, options?: KnowledgeToolsOptions): ToolRegistry; //# sourceMappingURL=agent-tools.d.ts.map