export type KnowledgeSearchScope = "public" | "company" | "personal"; export interface KnowledgeSearchHit { documentId: string; revision: number; chunkId: string; scope: KnowledgeSearchScope; title: string; text: string; tags: string[]; rank: number; rawScore: number; finalScore: number; scoreKind: string; } export interface RuntimeKnowledgeSearchResult { schemaVersion: 2; profile: "runtime"; total: number; strategyFingerprint: string; timingsMs: Record; hits: KnowledgeSearchHit[]; } export interface RuntimeKnowledgeSearchInput { appCode: string; accessKey: string; query: string; topK?: number; signal?: AbortSignal; } export interface DirectKnowledgeSearchInput extends RuntimeKnowledgeSearchInput { serviceUrl: string; } /** Accept only an explicit TLS origin; never infer a credential destination. */ export declare function normalizeKbServiceOrigin(input: string): string; /** Search directly through the authenticated KB Service V2 contract. */ export declare function searchDirectKnowledge(input: DirectKnowledgeSearchInput): Promise;