import type { KnowledgeExtractionRecord, KnowledgeNodeRecord, KnowledgeSourceRecord } from '../types.js';
export declare const MAX_SEMANTIC_SOURCE_CHARS = 28000;
export declare const MAX_ANSWER_EVIDENCE_CHARS = 24000;
export declare function semanticHash(...parts: readonly unknown[]): string;
export declare function semanticFactId(input: {
    readonly spaceId: string;
    readonly kind: string;
    readonly title: string;
    readonly value?: string | undefined;
    readonly summary?: string | undefined;
    readonly subjectIds?: readonly string[] | undefined;
    readonly fallbackScope?: string | undefined;
}): string;
export declare function semanticSlug(value: string): string;
export declare function clampText(value: string | undefined, limit: number): string;
export declare function normalizeWhitespace(value: string): string;
export declare function readRecord(value: unknown): Record<string, unknown>;
export declare function readString(value: unknown): string | undefined;
export declare function readStringArray(value: unknown): readonly string[];
export declare function uniqueStrings(values: readonly (string | undefined | null)[]): string[];
export declare function tokenizeSemanticQuery(value: string): string[];
export declare function scoreSemanticText(value: string | undefined, tokens: readonly string[]): number;
export declare function sourceSemanticText(source: KnowledgeSourceRecord, extraction?: KnowledgeExtractionRecord | null): string;
export declare function sourceSemanticHash(source: KnowledgeSourceRecord, extraction?: KnowledgeExtractionRecord | null): string;
export declare function sourceKnowledgeSpace(source: KnowledgeSourceRecord): string;
export declare function nodeKnowledgeSpace(node: KnowledgeNodeRecord): string;
export declare function semanticMetadata(spaceId: string, metadata?: Record<string, unknown>): Record<string, unknown>;
export declare function extractJsonObject(text: string): unknown | null;
export declare function splitSentences(text: string, limit?: number): string[];
export declare function applySourceMetadata(source: KnowledgeSourceRecord, metadata: Record<string, unknown>): {
    readonly id: string;
    readonly connectorId: string;
    readonly sourceType: KnowledgeSourceRecord['sourceType'];
    readonly title?: string | undefined;
    readonly sourceUri?: string | undefined;
    readonly canonicalUri?: string | undefined;
    readonly summary?: string | undefined;
    readonly description?: string | undefined;
    readonly tags: readonly string[];
    readonly folderPath?: string | undefined;
    readonly status: KnowledgeSourceRecord['status'];
    readonly artifactId?: string | undefined;
    readonly contentHash?: string | undefined;
    readonly lastCrawledAt?: number | undefined;
    readonly crawlError?: string | undefined;
    readonly sessionId?: string | undefined;
    readonly metadata: Record<string, unknown>;
};
//# sourceMappingURL=utils.d.ts.map