import { NativeKnowledgeConfig } from './types.js';

type NativeKnowledgeChunk = {
    chunkId: string;
    sourcePath: string;
    title: string;
    sourceKind: "identity" | "memory" | "workspace_doc" | "obsidian_note" | "bootstrap_doc" | "handoff" | "daily_summary" | "automation_note";
    startLine: number;
    endLine: number;
    content: string;
    vaultId?: string;
    notePath?: string;
    noteKey?: string;
    derivedDate?: string;
    tags?: string[];
    aliases?: string[];
    wikilinks?: string[];
    backlinks?: string[];
    namespace?: string;
    privacyClass?: string;
    sourceHash?: string;
    mtimeMs?: number;
    sessionKey?: string;
    workflowKey?: string;
    author?: string;
    agent?: string;
};
type NativeKnowledgeSearchResult = NativeKnowledgeChunk & {
    score: number;
};
interface NativeKnowledgeSyncResult {
    statePath: string;
    vaultCount: number;
    touchedNotes: number;
    deletedNotes: number;
    chunkCount: number;
    activeChunks: NativeKnowledgeChunk[];
}
declare function resolveNativeKnowledgeStatePath(memoryDir: string, config: NativeKnowledgeConfig): string;
declare function resolveCuratedIncludeFilesStatePath(memoryDir: string, config: NativeKnowledgeConfig): string;
declare function resolveOpenClawWorkspaceStatePath(memoryDir: string, config: NativeKnowledgeConfig): string;
declare function syncObsidianVaults(options: {
    memoryDir: string;
    config: NativeKnowledgeConfig;
}): Promise<NativeKnowledgeSyncResult>;
declare function loadPersistedNativeKnowledgeChunks(options: {
    memoryDir: string;
    recallNamespaces?: string[];
    defaultNamespace: string;
}): Promise<NativeKnowledgeChunk[]>;
declare function syncOpenClawWorkspaceArtifacts(options: {
    workspaceDir: string;
    memoryDir: string;
    config: NativeKnowledgeConfig;
}): Promise<{
    statePath: string;
    touchedFiles: number;
    deletedFiles: number;
    chunkCount: number;
    activeChunks: NativeKnowledgeChunk[];
}>;
declare function syncCuratedIncludeFiles(options: {
    workspaceDir: string;
    memoryDir: string;
    config: NativeKnowledgeConfig;
    recallNamespaces?: string[];
    defaultNamespace: string;
    skipSourcePaths?: string[];
}): Promise<{
    statePath: string;
    touchedFiles: number;
    deletedFiles: number;
    chunkCount: number;
    activeChunks: NativeKnowledgeChunk[];
}>;
declare function collectNativeKnowledgeChunks(options: {
    workspaceDir: string;
    memoryDir?: string;
    config: NativeKnowledgeConfig;
    recallNamespaces?: string[];
    defaultNamespace: string;
    abortSignal?: AbortSignal;
}): Promise<NativeKnowledgeChunk[]>;
declare function searchNativeKnowledge(options: {
    query: string;
    chunks: NativeKnowledgeChunk[];
    maxResults: number;
}): NativeKnowledgeSearchResult[];
declare function formatNativeKnowledgeSection(options: {
    results: NativeKnowledgeSearchResult[];
    maxChars: number;
}): string | null;

export { type NativeKnowledgeChunk, type NativeKnowledgeSearchResult, type NativeKnowledgeSyncResult, collectNativeKnowledgeChunks, formatNativeKnowledgeSection, loadPersistedNativeKnowledgeChunks, resolveCuratedIncludeFilesStatePath, resolveNativeKnowledgeStatePath, resolveOpenClawWorkspaceStatePath, searchNativeKnowledge, syncCuratedIncludeFiles, syncObsidianVaults, syncOpenClawWorkspaceArtifacts };
