@fortemi/core 2026.6.1 → 2026.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/aiwg-index.ts"],"names":[],"mappings":";AAmOA,IAAM,sBAAA,GAAyD;AAAA,EAC7D,gBAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA;AAEA,IAAM,WAAA,uBAAkB,GAAA,CAA2B;AAAA,EACjD,aAAA;AAAA,EACA,kBAAA;AAAA,EACA,WAAA;AAAA,EACA,iBAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,CAAC,CAAA;AAED,IAAM,qBAAA,GAA+C;AAAA,EACnD,KAAA,EAAO,CAAA;AAAA,EACP,GAAA,EAAK,CAAA;AAAA,EACL,OAAA,EAAS,CAAA;AAAA,EACT,IAAA,EAAM;AACR,CAAA;AAEA,SAAS,UAAU,KAAA,EAAiC;AAClD,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,CAAM,MAAA,GAAS,CAAA;AACrD;AAEA,SAAS,SAAA,CAAU,MAAA,EAAgD,IAAA,EAAc,KAAA,EAAe;AAC9F,EAAA,MAAA,CAAO,IAAI,MAAM,EAAC;AAClB,EAAA,MAAA,CAAO,IAAI,EAAE,KAAK,CAAA,GAAA,CAAK,OAAO,IAAI,CAAA,CAAE,KAAK,CAAA,IAAK,CAAA,IAAK,CAAA;AACrD;AAEA,SAAS,sBAAsB,KAAA,EAAiC;AAC9D,EAAA,OAAO,OAAO,SAAA,CAAU,KAAK,KAAK,OAAO,KAAA,KAAU,YAAY,KAAA,IAAS,CAAA;AAC1E;AAEA,SAAS,mBAAmB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AAoB;AAC9B,IAAA,MAAM,SAAS,OAAA,CAAQ,kBAAA;AACvB,IAAA,MAAM,IAAA,GAAO,KAAK,IAAA,CAAK,MAAA,CAAO,CAAC,GAAA,KAAQ,GAAA,CAAI,UAAA,CAAW,MAAM,CAAC,CAAA;AAC7D,IAAA,IAAI,IAAA,CAAK,MAAA,GAAS,CAAA,EAAG,OAAO,IAAA;AAAA,EAC9B;AACA,EAAA,IAAI,IAAA,CAAK,QAAA,CAAS,MAAA,GAAS,CAAA,EAAG,OAAO,IAAA,CAAK,QAAA,CAAS,GAAA,CAAI,CAAC,OAAA,KAAY,CAAA,QAAA,EAAW,OAAO,CAAA,CAAE,CAAA;AACxF,EAAA,OAAO,CAAC,CAAA,KAAA,EAAQ,IAAA,CAAK,IAAI,CAAA,CAAE,CAAA;AAC7B","file":"aiwg-index.js","sourcesContent":["export type AiwgFortemiRecordType =\n | 'crm.contact'\n | 'crm.organization'\n | 'crm.event'\n | 'crm.interaction'\n | 'aiwg.artifact'\n | 'docs.page'\n\nexport type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public'\nexport type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected'\nexport type AiwgReviewAction = 'accept' | 'reject' | 'defer'\n\nexport interface AiwgFortemiRecordSource {\n path: string\n repo_relative_path: string\n locator: string\n}\n\nexport interface AiwgFortemiRelationship {\n type: string\n target_id: string\n source_path?: string\n}\n\nexport interface AiwgFortemiProvenance {\n field: string\n source: string\n path: string\n confidence: AiwgProvenanceConfidence\n privacy: AiwgPrivacyClassification\n}\n\nexport interface AiwgFortemiRecord {\n schema_version: 'aiwg.fortemi.index.record.v1'\n id: string\n type: AiwgFortemiRecordType\n source: AiwgFortemiRecordSource\n title: string\n text: string\n facets: Record<string, string[]>\n tags: string[]\n concepts: string[]\n relationships: AiwgFortemiRelationship[]\n provenance: AiwgFortemiProvenance[]\n privacy: {\n classification: AiwgPrivacyClassification\n pii: boolean\n }\n updated_at: string\n}\n\nexport interface AiwgFortemiIndexExport {\n schema_version: 'aiwg.fortemi.index.export.v1'\n generated_at: string\n source: {\n repo: string\n privacy: AiwgPrivacyClassification\n }\n items: AiwgFortemiRecord[]\n}\n\nexport interface AiwgFortemiChunkPartRef {\n href: string\n offset: number\n count: number\n}\n\nexport interface AiwgFortemiChunkManifest {\n schema_version: 'aiwg.fortemi.index.chunk-manifest.v1'\n generated_at: string\n source: AiwgFortemiIndexExport['source']\n total: number\n part_size: number\n facets?: Record<string, Record<string, number>>\n parts: AiwgFortemiChunkPartRef[]\n}\n\nexport interface AiwgFortemiChunkPart {\n schema_version: 'aiwg.fortemi.index.chunk.v1'\n manifest_schema_version: 'aiwg.fortemi.index.chunk-manifest.v1'\n offset: number\n items: AiwgFortemiRecord[]\n}\n\nexport interface AiwgIndexValidationResult {\n valid: boolean\n errors: string[]\n counts: Partial<Record<AiwgFortemiRecordType, number>>\n}\n\nexport interface AiwgChunkedIndexValidationResult {\n valid: boolean\n errors: string[]\n}\n\nexport interface AiwgIndexQueryOptions {\n types?: AiwgFortemiRecordType[]\n facets?: Record<string, string[]>\n tags?: string[]\n concepts?: string[]\n privacy?: AiwgPrivacyClassification[]\n relationshipTargetId?: string\n limit?: number\n offset?: number\n rank?: boolean\n snippets?: boolean\n snippetLength?: number\n weights?: Partial<AiwgIndexQueryWeights>\n includeMatches?: boolean\n}\n\nexport interface AiwgIndexQueryWeights {\n title: number\n text: number\n tag: number\n concept: number\n}\n\nexport interface AiwgIndexQueryMatch {\n field: 'title' | 'text' | 'tag' | 'concept'\n value: string\n}\n\nexport interface AiwgIndexQueryRankedItem {\n item: AiwgFortemiRecord\n rank: number\n snippet?: string\n matches?: AiwgIndexQueryMatch[]\n}\n\nexport interface AiwgIndexQueryResult {\n items: AiwgFortemiRecord[]\n total: number\n facets: Record<string, Record<string, number>>\n rankedItems?: AiwgIndexQueryRankedItem[]\n}\n\nexport type AiwgChunkedIndexLoader = (\n part: AiwgFortemiChunkPartRef,\n manifest: AiwgFortemiChunkManifest,\n) => Promise<unknown>\n\nexport interface AiwgChunkedIndexLoadOptions {\n maxCachedParts?: number\n}\n\nexport type AiwgChunkedIndexProgressPhase = 'part' | 'query'\n\nexport interface AiwgChunkedIndexProgress {\n phase: AiwgChunkedIndexProgressPhase\n done: number\n total: number\n href?: string\n}\n\nexport interface AiwgChunkedIndexQueryOptions extends AiwgIndexQueryOptions {\n onProgress?: (progress: AiwgChunkedIndexProgress) => void\n}\n\nexport interface AiwgChunkedIndexQueryResult extends AiwgIndexQueryResult {\n manifestTotal: number\n scannedParts: number\n fetchedParts: number\n complete: boolean\n}\n\nexport interface AiwgReviewDecision {\n item_id: string\n action: AiwgReviewAction\n reason?: string\n updated_at: string\n}\n\nexport interface AiwgReviewDecisionExport {\n schema_version: 'aiwg.fortemi.review-decisions.v1'\n generated_at: string\n source_export_schema_version: string\n decisions: AiwgReviewDecision[]\n}\n\nexport interface AiwgIndexGraphOptions {\n communityFacet?: string\n communityTagPrefix?: string\n relationshipWeights?: Record<string, number>\n includeDanglingRelationships?: boolean\n}\n\nexport interface AiwgReviewInput {\n item_id: string\n action: AiwgReviewAction\n reason?: string\n}\n\nexport interface AiwgIndexControllerSnapshot {\n index: AiwgFortemiIndexExport | null\n chunked: {\n manifest: AiwgFortemiChunkManifest\n cachedParts: number\n maxCachedParts: number\n } | null\n data: AiwgIndexQueryResult | null\n error: Error | null\n reviewDecisions: AiwgReviewDecision[]\n}\n\nexport type AiwgIndexControllerListener = (snapshot: AiwgIndexControllerSnapshot) => void\n\nexport interface AiwgIndexController {\n loadIndex(value: unknown): AiwgFortemiIndexExport\n loadChunkedIndex(\n manifest: unknown,\n loader: AiwgChunkedIndexLoader,\n options?: AiwgChunkedIndexLoadOptions,\n ): AiwgFortemiChunkManifest\n getIndex(): AiwgFortemiIndexExport | null\n getChunkedManifest(): AiwgFortemiChunkManifest | null\n getSnapshot(): AiwgIndexControllerSnapshot\n query(query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult\n queryChunked(query?: string, options?: AiwgChunkedIndexQueryOptions): Promise<AiwgChunkedIndexQueryResult>\n clearChunkCache(): void\n toCommunityGraph(options?: AiwgIndexGraphOptions): ReturnType<typeof aiwgFortemiIndexToCommunityGraph>\n setReviewDecision(input: AiwgReviewInput): AiwgReviewDecision\n clearReviewDecision(itemId: string): void\n createReviewDecisionExport(generatedAt?: string): AiwgReviewDecisionExport\n subscribe(listener: AiwgIndexControllerListener): () => void\n}\n\nconst REQUIRED_RECORD_FIELDS: Array<keyof AiwgFortemiRecord> = [\n 'schema_version',\n 'id',\n 'type',\n 'source',\n 'title',\n 'text',\n 'facets',\n 'tags',\n 'concepts',\n 'relationships',\n 'provenance',\n 'privacy',\n 'updated_at',\n]\n\nconst VALID_TYPES = new Set<AiwgFortemiRecordType>([\n 'crm.contact',\n 'crm.organization',\n 'crm.event',\n 'crm.interaction',\n 'aiwg.artifact',\n 'docs.page',\n])\n\nconst DEFAULT_QUERY_WEIGHTS: AiwgIndexQueryWeights = {\n title: 4,\n tag: 3,\n concept: 2,\n text: 1,\n}\n\nfunction hasString(value: unknown): value is string {\n return typeof value === 'string' && value.length > 0\n}\n\nfunction pushFacet(counts: Record<string, Record<string, number>>, name: string, value: string) {\n counts[name] ??= {}\n counts[name][value] = (counts[name][value] ?? 0) + 1\n}\n\nfunction hasNonNegativeInteger(value: unknown): value is number {\n return Number.isInteger(value) && typeof value === 'number' && value >= 0\n}\n\nfunction hasPositiveInteger(value: unknown): value is number {\n return Number.isInteger(value) && typeof value === 'number' && value > 0\n}\n\nfunction isFacetCounts(value: unknown): value is Record<string, Record<string, number>> {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return false\n return Object.values(value).every((counts) => (\n !!counts\n && typeof counts === 'object'\n && !Array.isArray(counts)\n && Object.values(counts).every((count) => hasNonNegativeInteger(count))\n ))\n}\n\nexport function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult {\n const errors: string[] = []\n const counts: Partial<Record<AiwgFortemiRecordType, number>> = {}\n const data = value as Partial<AiwgFortemiIndexExport>\n\n if (data?.schema_version !== 'aiwg.fortemi.index.export.v1') {\n errors.push('schema_version must be aiwg.fortemi.index.export.v1')\n }\n if (!hasString(data?.generated_at)) errors.push('generated_at is required')\n if (!hasString(data?.source?.repo)) errors.push('source.repo is required')\n if (!hasString(data?.source?.privacy)) errors.push('source.privacy is required')\n if (!Array.isArray(data?.items)) errors.push('items must be an array')\n\n const ids = new Set<string>()\n let previousId = ''\n for (const [index, item] of (data.items ?? []).entries()) {\n for (const field of REQUIRED_RECORD_FIELDS) {\n if (!(field in item)) errors.push('items[' + index + '].' + field + ' is required')\n }\n if (item.schema_version !== 'aiwg.fortemi.index.record.v1') {\n errors.push('items[' + index + '].schema_version must be aiwg.fortemi.index.record.v1')\n }\n if (!hasString(item.id)) errors.push('items[' + index + '].id is required')\n if (hasString(item.id) && ids.has(item.id)) errors.push('duplicate id: ' + item.id)\n if (hasString(item.id)) ids.add(item.id)\n if (previousId && hasString(item.id) && previousId.localeCompare(item.id) > 0) {\n errors.push('items must be sorted by id: ' + previousId + ' before ' + item.id)\n }\n if (hasString(item.id)) previousId = item.id\n if (!VALID_TYPES.has(item.type)) errors.push('items[' + index + '].type is invalid')\n else counts[item.type] = (counts[item.type] ?? 0) + 1\n if (!hasString(item.source?.path)) errors.push('items[' + index + '].source.path is required')\n if (!hasString(item.source?.repo_relative_path)) errors.push('items[' + index + '].source.repo_relative_path is required')\n if (!hasString(item.source?.locator)) errors.push('items[' + index + '].source.locator is required')\n if (!Array.isArray(item.tags)) errors.push('items[' + index + '].tags must be an array')\n if (!Array.isArray(item.concepts)) errors.push('items[' + index + '].concepts must be an array')\n if (!Array.isArray(item.relationships)) errors.push('items[' + index + '].relationships must be an array')\n if (!Array.isArray(item.provenance) || item.provenance.length === 0) {\n errors.push('items[' + index + '].provenance must be a non-empty array')\n }\n if (!item.privacy || typeof item.privacy.pii !== 'boolean' || !hasString(item.privacy.classification)) {\n errors.push('items[' + index + '].privacy requires classification and pii')\n }\n }\n\n return { valid: errors.length === 0, errors, counts }\n}\n\nexport function assertAiwgFortemiIndexExport(value: unknown): AiwgFortemiIndexExport {\n const result = validateAiwgFortemiIndexExport(value)\n if (!result.valid) {\n throw new Error('Invalid AIWG Fortemi index export:\\n' + result.errors.join('\\n'))\n }\n return value as AiwgFortemiIndexExport\n}\n\nexport function validateAiwgFortemiChunkManifest(value: unknown): AiwgChunkedIndexValidationResult {\n const errors: string[] = []\n const data = value as Partial<AiwgFortemiChunkManifest>\n\n if (data?.schema_version !== 'aiwg.fortemi.index.chunk-manifest.v1') {\n errors.push('schema_version must be aiwg.fortemi.index.chunk-manifest.v1')\n }\n if (!hasString(data?.generated_at)) errors.push('generated_at is required')\n if (!hasString(data?.source?.repo)) errors.push('source.repo is required')\n if (!hasString(data?.source?.privacy)) errors.push('source.privacy is required')\n if (!hasNonNegativeInteger(data?.total)) errors.push('total must be a non-negative integer')\n if (!hasPositiveInteger(data?.part_size)) errors.push('part_size must be a positive integer')\n if (data.facets !== undefined && !isFacetCounts(data.facets)) {\n errors.push('facets must be a nested string-to-number count object')\n }\n if (!Array.isArray(data?.parts)) errors.push('parts must be an array')\n\n let expectedOffset = 0\n const parts = Array.isArray(data?.parts) ? data.parts : []\n for (const [index, part] of parts.entries()) {\n if (!hasString(part.href)) errors.push('parts[' + index + '].href is required')\n if (!hasNonNegativeInteger(part.offset)) errors.push('parts[' + index + '].offset must be a non-negative integer')\n if (!hasNonNegativeInteger(part.count)) errors.push('parts[' + index + '].count must be a non-negative integer')\n if (hasNonNegativeInteger(part.offset) && part.offset !== expectedOffset) {\n errors.push('parts[' + index + '].offset must be ' + expectedOffset)\n }\n if (hasNonNegativeInteger(part.count)) expectedOffset += part.count\n }\n if (hasNonNegativeInteger(data?.total) && expectedOffset !== data.total) {\n errors.push('parts counts must add up to total')\n }\n\n return { valid: errors.length === 0, errors }\n}\n\nexport function assertAiwgFortemiChunkManifest(value: unknown): AiwgFortemiChunkManifest {\n const result = validateAiwgFortemiChunkManifest(value)\n if (!result.valid) {\n throw new Error('Invalid AIWG Fortemi chunk manifest:\\n' + result.errors.join('\\n'))\n }\n return value as AiwgFortemiChunkManifest\n}\n\nexport function validateAiwgFortemiChunkPart(\n value: unknown,\n partRef?: AiwgFortemiChunkPartRef,\n manifest?: AiwgFortemiChunkManifest,\n): AiwgChunkedIndexValidationResult {\n const errors: string[] = []\n const data = value as Partial<AiwgFortemiChunkPart>\n\n if (data?.schema_version !== 'aiwg.fortemi.index.chunk.v1') {\n errors.push('schema_version must be aiwg.fortemi.index.chunk.v1')\n }\n if (data?.manifest_schema_version !== 'aiwg.fortemi.index.chunk-manifest.v1') {\n errors.push('manifest_schema_version must be aiwg.fortemi.index.chunk-manifest.v1')\n }\n if (!hasNonNegativeInteger(data?.offset)) errors.push('offset must be a non-negative integer')\n if (!Array.isArray(data?.items)) errors.push('items must be an array')\n\n if (partRef && hasNonNegativeInteger(data?.offset) && data.offset !== partRef.offset) {\n errors.push('offset must match manifest part offset ' + partRef.offset)\n }\n if (partRef && Array.isArray(data?.items) && data.items.length !== partRef.count) {\n errors.push('items length must match manifest part count ' + partRef.count)\n }\n\n if (Array.isArray(data?.items)) {\n const validation = validateAiwgFortemiIndexExport({\n schema_version: 'aiwg.fortemi.index.export.v1',\n generated_at: manifest?.generated_at ?? '1970-01-01T00:00:00.000Z',\n source: manifest?.source ?? { repo: 'chunk', privacy: 'public' },\n items: data.items,\n })\n errors.push(...validation.errors.map((error) => 'items.' + error))\n }\n\n return { valid: errors.length === 0, errors }\n}\n\nexport function assertAiwgFortemiChunkPart(\n value: unknown,\n partRef?: AiwgFortemiChunkPartRef,\n manifest?: AiwgFortemiChunkManifest,\n): AiwgFortemiChunkPart {\n const result = validateAiwgFortemiChunkPart(value, partRef, manifest)\n if (!result.valid) {\n throw new Error('Invalid AIWG Fortemi chunk part:\\n' + result.errors.join('\\n'))\n }\n return value as AiwgFortemiChunkPart\n}\n\nexport function createAiwgFetchChunkLoader(baseUrl?: string | URL): AiwgChunkedIndexLoader {\n return async (part) => {\n const href = baseUrl ? new URL(part.href, baseUrl).toString() : part.href\n const response = await fetch(href)\n if (!response.ok) throw new Error('Failed to fetch AIWG index chunk ' + href + ': ' + response.status)\n return response.json()\n }\n}\n\nexport function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>> {\n const result: Record<string, Record<string, number>> = {}\n for (const item of items) {\n pushFacet(result, 'type', item.type)\n pushFacet(result, 'privacy', item.privacy.classification)\n for (const tag of item.tags) pushFacet(result, 'tag', tag)\n for (const concept of item.concepts) pushFacet(result, 'concept', concept)\n for (const [name, values] of Object.entries(item.facets)) {\n for (const value of values) pushFacet(result, name, value)\n }\n }\n return result\n}\n\nfunction includesAll(actual: string[], expected: string[] | undefined): boolean {\n if (!expected || expected.length === 0) return true\n const actualSet = new Set(actual)\n return expected.every((value) => actualSet.has(value))\n}\n\nfunction matchesFacetFilters(item: AiwgFortemiRecord, filters: Record<string, string[]> | undefined): boolean {\n if (!filters) return true\n return Object.entries(filters).every(([name, expected]) => includesAll(item.facets[name] ?? [], expected))\n}\n\nfunction queryMatches(item: AiwgFortemiRecord, q: string): AiwgIndexQueryMatch[] {\n if (!q) return []\n const matches: AiwgIndexQueryMatch[] = []\n if (item.title.toLowerCase().includes(q)) matches.push({ field: 'title', value: item.title })\n if (item.text.toLowerCase().includes(q)) matches.push({ field: 'text', value: item.text })\n for (const tag of item.tags) {\n if (tag.toLowerCase().includes(q)) matches.push({ field: 'tag', value: tag })\n }\n for (const concept of item.concepts) {\n if (concept.toLowerCase().includes(q)) matches.push({ field: 'concept', value: concept })\n }\n return matches\n}\n\nfunction rankMatches(matches: AiwgIndexQueryMatch[], weights: AiwgIndexQueryWeights): number {\n return matches.reduce((total, match) => total + weights[match.field], 0)\n}\n\nfunction clipSnippet(value: string, q: string, maxLength: number): string {\n const normalizedLength = Math.max(20, maxLength)\n if (!value) return ''\n if (!q) return value.length > normalizedLength ? `${value.slice(0, normalizedLength).trimEnd()}...` : value\n\n const lower = value.toLowerCase()\n const index = lower.indexOf(q)\n if (index < 0) return value.length > normalizedLength ? `${value.slice(0, normalizedLength).trimEnd()}...` : value\n\n const context = Math.max(0, Math.floor((normalizedLength - q.length) / 2))\n const start = Math.max(0, index - context)\n const end = Math.min(value.length, start + normalizedLength)\n const prefix = start > 0 ? '...' : ''\n const suffix = end < value.length ? '...' : ''\n return `${prefix}${value.slice(start, end).trim()}${suffix}`\n}\n\nfunction createSnippet(item: AiwgFortemiRecord, matches: AiwgIndexQueryMatch[], q: string, maxLength: number): string {\n const textMatch = matches.find((match) => match.field === 'text')\n const titleMatch = matches.find((match) => match.field === 'title')\n const firstMatch = textMatch ?? titleMatch ?? matches[0]\n return clipSnippet(firstMatch?.value ?? item.text, q, maxLength)\n}\n\ninterface AiwgRankedEntry {\n item: AiwgFortemiRecord\n ordinal: number\n rank: number\n matches: AiwgIndexQueryMatch[]\n}\n\nfunction createRankedEntries(\n items: AiwgFortemiRecord[],\n q: string,\n options: AiwgIndexQueryOptions,\n ordinalBase = 0,\n): AiwgRankedEntry[] {\n const weights = { ...DEFAULT_QUERY_WEIGHTS, ...options.weights }\n return items.map((item, ordinal) => ({ item, ordinal: ordinalBase + ordinal, matches: queryMatches(item, q) }))\n .filter(({ item, matches }) => {\n if (q && matches.length === 0) return false\n if (options.types && !options.types.includes(item.type)) return false\n if (options.privacy && !options.privacy.includes(item.privacy.classification)) return false\n if (!includesAll(item.tags, options.tags)) return false\n if (!includesAll(item.concepts, options.concepts)) return false\n if (!matchesFacetFilters(item, options.facets)) return false\n if (options.relationshipTargetId && !item.relationships.some((rel) => rel.target_id === options.relationshipTargetId)) {\n return false\n }\n return true\n })\n .map(({ item, ordinal, matches }) => ({\n item,\n ordinal,\n rank: rankMatches(matches, weights),\n matches,\n }))\n}\n\nfunction sortRankedEntries(entries: AiwgRankedEntry[], rank?: boolean): AiwgRankedEntry[] {\n return [...entries].sort((left, right) => {\n if (rank) return right.rank - left.rank || left.ordinal - right.ordinal\n return left.ordinal - right.ordinal\n })\n}\n\nfunction createQueryResultFromRankedEntries(\n entries: AiwgRankedEntry[],\n query: string,\n options: AiwgIndexQueryOptions,\n): AiwgIndexQueryResult {\n const ranked = sortRankedEntries(entries, options.rank)\n const offset = options.offset ?? 0\n const limit = options.limit ?? ranked.length\n const page = ranked.slice(offset, offset + limit)\n const result: AiwgIndexQueryResult = {\n items: page.map((entry) => entry.item),\n total: ranked.length,\n facets: getAiwgFortemiFacets(ranked.map((entry) => entry.item)),\n }\n if (options.rank || options.snippets || options.includeMatches) {\n const snippetLength = options.snippetLength ?? 160\n result.rankedItems = page.map((entry) => ({\n item: entry.item,\n rank: entry.rank,\n ...(options.snippets ? { snippet: createSnippet(entry.item, entry.matches, query, snippetLength) } : {}),\n ...(options.includeMatches ? { matches: entry.matches } : {}),\n }))\n }\n return result\n}\n\nexport function queryAiwgFortemiIndex(\n index: AiwgFortemiIndexExport,\n query = '',\n options: AiwgIndexQueryOptions = {},\n): AiwgIndexQueryResult {\n const q = query.trim().toLowerCase()\n return createQueryResultFromRankedEntries(createRankedEntries(index.items, q, options), q, options)\n}\n\ninterface AiwgChunkedIndexRuntime {\n manifest: AiwgFortemiChunkManifest\n loader: AiwgChunkedIndexLoader\n maxCachedParts: number\n partCache: Map<string, AiwgFortemiChunkPart>\n}\n\nfunction chunkPartCacheKey(part: AiwgFortemiChunkPartRef): string {\n return `${part.offset}:${part.href}`\n}\n\nfunction clampMaxCachedParts(value: number | undefined): number {\n if (!hasPositiveInteger(value)) return 3\n return value\n}\n\nfunction isDirectChunkBrowse(query: string, options: AiwgIndexQueryOptions): boolean {\n return query.trim() === ''\n && !options.rank\n && !options.snippets\n && !options.includeMatches\n && !options.types\n && !options.facets\n && !options.tags\n && !options.concepts\n && !options.privacy\n && !options.relationshipTargetId\n}\n\nfunction getPartsForRange(\n manifest: AiwgFortemiChunkManifest,\n offset: number,\n limit: number,\n): AiwgFortemiChunkPartRef[] {\n const end = offset + limit\n return manifest.parts.filter((part) => part.count > 0 && part.offset < end && part.offset + part.count > offset)\n}\n\nasync function loadChunkPart(\n runtime: AiwgChunkedIndexRuntime,\n part: AiwgFortemiChunkPartRef,\n): Promise<{ part: AiwgFortemiChunkPart; fetched: boolean }> {\n const key = chunkPartCacheKey(part)\n const cached = runtime.partCache.get(key)\n if (cached) {\n runtime.partCache.delete(key)\n runtime.partCache.set(key, cached)\n return { part: cached, fetched: false }\n }\n\n const parsed = assertAiwgFortemiChunkPart(await runtime.loader(part, runtime.manifest), part, runtime.manifest)\n runtime.partCache.set(key, parsed)\n while (runtime.partCache.size > runtime.maxCachedParts) {\n const oldest = runtime.partCache.keys().next().value\n if (oldest === undefined) break\n runtime.partCache.delete(oldest)\n }\n return { part: parsed, fetched: true }\n}\n\nasync function queryChunkedAiwgFortemiIndex(\n runtime: AiwgChunkedIndexRuntime,\n query = '',\n options: AiwgChunkedIndexQueryOptions = {},\n): Promise<AiwgChunkedIndexQueryResult> {\n const q = query.trim().toLowerCase()\n let scannedParts = 0\n let fetchedParts = 0\n\n if (isDirectChunkBrowse(query, options)) {\n const offset = options.offset ?? 0\n const limit = options.limit ?? runtime.manifest.total\n const parts = getPartsForRange(runtime.manifest, offset, limit)\n const items: AiwgFortemiRecord[] = []\n for (const partRef of parts) {\n const loaded = await loadChunkPart(runtime, partRef)\n if (loaded.fetched) fetchedParts += 1\n scannedParts += 1\n options.onProgress?.({ phase: 'part', done: scannedParts, total: parts.length, href: partRef.href })\n const start = Math.max(0, offset - partRef.offset)\n const end = Math.min(loaded.part.items.length, offset + limit - partRef.offset)\n items.push(...loaded.part.items.slice(start, end))\n }\n return {\n items,\n total: runtime.manifest.total,\n facets: runtime.manifest.facets ?? {},\n manifestTotal: runtime.manifest.total,\n scannedParts,\n fetchedParts,\n complete: true,\n }\n }\n\n const entries: AiwgRankedEntry[] = []\n for (const partRef of runtime.manifest.parts) {\n const loaded = await loadChunkPart(runtime, partRef)\n if (loaded.fetched) fetchedParts += 1\n scannedParts += 1\n options.onProgress?.({ phase: 'part', done: scannedParts, total: runtime.manifest.parts.length, href: partRef.href })\n entries.push(...createRankedEntries(loaded.part.items, q, options, partRef.offset))\n options.onProgress?.({ phase: 'query', done: scannedParts, total: runtime.manifest.parts.length, href: partRef.href })\n }\n\n return {\n ...createQueryResultFromRankedEntries(entries, q, options),\n manifestTotal: runtime.manifest.total,\n scannedParts,\n fetchedParts,\n complete: true,\n }\n}\n\nexport function createAiwgReviewDecisionExport(\n source: AiwgFortemiIndexExport,\n decisions: AiwgReviewDecision[],\n generatedAt = new Date().toISOString(),\n): AiwgReviewDecisionExport {\n return {\n schema_version: 'aiwg.fortemi.review-decisions.v1',\n generated_at: generatedAt,\n source_export_schema_version: source.schema_version,\n decisions: [...decisions].sort((left, right) => left.item_id.localeCompare(right.item_id)),\n }\n}\n\nexport function createAiwgIndexController(initialIndex?: AiwgFortemiIndexExport): AiwgIndexController {\n let index: AiwgFortemiIndexExport | null = initialIndex ?? null\n let chunked: AiwgChunkedIndexRuntime | null = null\n let data: AiwgIndexQueryResult | null = null\n let error: Error | null = null\n let reviewDecisions: AiwgReviewDecision[] = []\n const listeners = new Set<AiwgIndexControllerListener>()\n\n const snapshot = (): AiwgIndexControllerSnapshot => ({\n index,\n chunked: chunked\n ? {\n manifest: chunked.manifest,\n cachedParts: chunked.partCache.size,\n maxCachedParts: chunked.maxCachedParts,\n }\n : null,\n data,\n error,\n reviewDecisions: [...reviewDecisions],\n })\n const notify = () => {\n const current = snapshot()\n for (const listener of listeners) listener(current)\n }\n const requireIndex = (): AiwgFortemiIndexExport => {\n if (!index) throw new Error('No AIWG index export loaded')\n return index\n }\n\n return {\n loadIndex(value: unknown): AiwgFortemiIndexExport {\n try {\n const parsed = assertAiwgFortemiIndexExport(value)\n index = parsed\n chunked = null\n data = null\n reviewDecisions = []\n error = null\n notify()\n return parsed\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n },\n loadChunkedIndex(\n manifest: unknown,\n loader: AiwgChunkedIndexLoader,\n options: AiwgChunkedIndexLoadOptions = {},\n ): AiwgFortemiChunkManifest {\n try {\n const parsed = assertAiwgFortemiChunkManifest(manifest)\n index = null\n chunked = {\n manifest: parsed,\n loader,\n maxCachedParts: clampMaxCachedParts(options.maxCachedParts),\n partCache: new Map(),\n }\n data = null\n reviewDecisions = []\n error = null\n notify()\n return parsed\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n },\n getIndex(): AiwgFortemiIndexExport | null {\n return index\n },\n getChunkedManifest(): AiwgFortemiChunkManifest | null {\n return chunked?.manifest ?? null\n },\n getSnapshot(): AiwgIndexControllerSnapshot {\n return snapshot()\n },\n query(query = '', options?: AiwgIndexQueryOptions): AiwgIndexQueryResult {\n const result = queryAiwgFortemiIndex(requireIndex(), query, options)\n data = result\n error = null\n notify()\n return result\n },\n async queryChunked(query = '', options?: AiwgChunkedIndexQueryOptions): Promise<AiwgChunkedIndexQueryResult> {\n if (!chunked) throw new Error('No AIWG chunked index manifest loaded')\n try {\n const result = await queryChunkedAiwgFortemiIndex(chunked, query, options)\n data = result\n error = null\n notify()\n return result\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n },\n clearChunkCache(): void {\n chunked?.partCache.clear()\n error = null\n notify()\n },\n toCommunityGraph(options?: AiwgIndexGraphOptions) {\n return aiwgFortemiIndexToCommunityGraph(requireIndex(), options)\n },\n setReviewDecision(input: AiwgReviewInput): AiwgReviewDecision {\n const decision: AiwgReviewDecision = {\n ...input,\n updated_at: new Date().toISOString(),\n }\n reviewDecisions = [\n ...reviewDecisions.filter((item) => item.item_id !== decision.item_id),\n decision,\n ].sort((left, right) => left.item_id.localeCompare(right.item_id))\n error = null\n notify()\n return decision\n },\n clearReviewDecision(itemId: string): void {\n reviewDecisions = reviewDecisions.filter((item) => item.item_id !== itemId)\n error = null\n notify()\n },\n createReviewDecisionExport(generatedAt?: string): AiwgReviewDecisionExport {\n return createAiwgReviewDecisionExport(requireIndex(), reviewDecisions, generatedAt)\n },\n subscribe(listener: AiwgIndexControllerListener): () => void {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n },\n }\n}\n\nexport function aiwgFortemiIndexToCommunityGraph(\n index: AiwgFortemiIndexExport,\n options: AiwgIndexGraphOptions = {},\n) {\n const ids = new Set(index.items.map((item) => item.id))\n const relationshipWeights = options.relationshipWeights ?? {}\n const edgeCounts = new Map<string, { source: string; target: string; kind: string; weight: number }>()\n\n for (const item of index.items) {\n for (const relationship of item.relationships) {\n if (!ids.has(relationship.target_id) && !options.includeDanglingRelationships) continue\n const kind = relationship.type\n const baseWeight = relationshipWeights[kind] ?? 1\n const key = `${item.id}\\u0000${relationship.target_id}\\u0000${kind}`\n const existing = edgeCounts.get(key)\n if (existing) existing.weight += baseWeight\n else edgeCounts.set(key, { source: item.id, target: relationship.target_id, kind, weight: baseWeight })\n }\n }\n\n const communities = new Map<string, string[]>()\n for (const item of index.items) {\n const communityIds = communityIdsFor(item, options)\n for (const communityId of communityIds) {\n const nodes = communities.get(communityId) ?? []\n nodes.push(item.id)\n communities.set(communityId, nodes)\n }\n }\n\n return {\n nodes: index.items.map((item) => ({ id: item.id })),\n edges: Array.from(edgeCounts.values()).sort((left, right) => (\n left.source.localeCompare(right.source)\n || left.target.localeCompare(right.target)\n || left.kind.localeCompare(right.kind)\n )),\n communities: Array.from(communities.entries())\n .map(([id, nodes]) => ({ id, nodes: [...new Set(nodes)].sort() }))\n .sort((left, right) => left.id.localeCompare(right.id)),\n }\n}\n\nfunction communityIdsFor(item: AiwgFortemiRecord, options: AiwgIndexGraphOptions): string[] {\n if (options.communityFacet) {\n const values = item.facets[options.communityFacet] ?? []\n if (values.length > 0) return values.map((value) => `${options.communityFacet}:${value}`)\n }\n if (options.communityTagPrefix) {\n const prefix = options.communityTagPrefix\n const tags = item.tags.filter((tag) => tag.startsWith(prefix))\n if (tags.length > 0) return tags\n }\n if (item.concepts.length > 0) return item.concepts.map((concept) => `concept:${concept}`)\n return [`type:${item.type}`]\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { PGlite } from '@electric-sql/pglite';
2
2
  import { z, ZodType } from 'zod';
3
+ export { AiwgChunkedIndexLoadOptions, AiwgChunkedIndexLoader, AiwgChunkedIndexProgress, AiwgChunkedIndexProgressPhase, AiwgChunkedIndexQueryOptions, AiwgChunkedIndexQueryResult, AiwgChunkedIndexValidationResult, AiwgFortemiChunkManifest, AiwgFortemiChunkPart, AiwgFortemiChunkPartRef, AiwgFortemiIndexExport, AiwgFortemiProvenance, AiwgFortemiRecord, AiwgFortemiRecordSource, AiwgFortemiRecordType, AiwgFortemiRelationship, AiwgIndexController, AiwgIndexControllerListener, AiwgIndexControllerSnapshot, AiwgIndexGraphOptions, AiwgIndexQueryMatch, AiwgIndexQueryOptions, AiwgIndexQueryRankedItem, AiwgIndexQueryResult, AiwgIndexQueryWeights, AiwgIndexValidationResult, AiwgPrivacyClassification, AiwgProvenanceConfidence, AiwgReviewAction, AiwgReviewDecision, AiwgReviewDecisionExport, AiwgReviewInput, aiwgFortemiIndexToCommunityGraph, assertAiwgFortemiChunkManifest, assertAiwgFortemiChunkPart, assertAiwgFortemiIndexExport, createAiwgFetchChunkLoader, createAiwgIndexController, createAiwgReviewDecisionExport, getAiwgFortemiFacets, queryAiwgFortemiIndex, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport } from './aiwg-index.js';
3
4
 
4
5
  /**
5
6
  * Generate a RFC 9562 UUIDv7 identifier.
@@ -551,6 +552,18 @@ interface EmbeddingSetCriteria {
551
552
  collectionIds?: string[];
552
553
  conceptIds?: string[];
553
554
  noteIds?: string[];
555
+ sources?: string[];
556
+ formats?: string[];
557
+ visibilities?: string[];
558
+ isStarred?: boolean;
559
+ isArchived?: boolean;
560
+ hasTitle?: boolean;
561
+ hasEmbedding?: boolean;
562
+ isUserEdited?: boolean;
563
+ hasAiMetadata?: boolean;
564
+ hasRevisions?: boolean;
565
+ minGenerationCount?: number;
566
+ maxGenerationCount?: number;
554
567
  updatedAfter?: string;
555
568
  updatedBefore?: string;
556
569
  }
@@ -571,6 +584,9 @@ interface VirtualMaterializationPolicy {
571
584
  includeResolvedMembers?: boolean;
572
585
  includeResolvedEdges?: boolean;
573
586
  freshness: 'fresh' | 'stale' | 'unknown';
587
+ inputHash?: string;
588
+ generatedAt?: string;
589
+ resolvedMemberCount?: number;
574
590
  }
575
591
  interface CriteriaVirtualSource {
576
592
  type: 'criteria';
@@ -664,6 +680,7 @@ interface ResolvedEmbeddingSet {
664
680
  embeddingIds: string[];
665
681
  errors: VirtualEmbeddingSetValidationError[];
666
682
  freshness: EmbeddingSetFreshness;
683
+ resolutionSource: 'live' | 'materialized';
667
684
  }
668
685
  interface EmbeddingSetRow {
669
686
  id: string;
@@ -713,9 +730,12 @@ declare class EmbeddingSetsRepository {
713
730
  id: string;
714
731
  }>;
715
732
  resolveSelector(selector: EmbeddingSetSelector): Promise<ResolvedEmbeddingSet>;
733
+ refreshMaterializedVirtualSet(setId: string): Promise<ResolvedEmbeddingSet>;
734
+ markVirtualSetStale(setId: string, reason: string): Promise<void>;
716
735
  private resolveDefinition;
717
736
  private resolvePhysicalSet;
718
737
  private resolvePhysicalRows;
738
+ private resolveMaterializedRows;
719
739
  private resolveCriteriaSource;
720
740
  private resolveSetOperationSource;
721
741
  private resolveFallbackSource;
@@ -723,6 +743,7 @@ declare class EmbeddingSetsRepository {
723
743
  private validateCompatibility;
724
744
  private resolveDuplicateRows;
725
745
  private finalizeResolution;
746
+ private resolutionInputHash;
726
747
  private definitionFromRow;
727
748
  private inferDefinitionModel;
728
749
  private inferDefinitionDimension;
@@ -969,12 +990,20 @@ interface SimilarityGraphOptions {
969
990
  k?: number;
970
991
  minSimilarity?: number;
971
992
  threshold?: number;
993
+ metric?: 'cosine' | 'inner_product' | 'l2';
994
+ batchSize?: number;
995
+ yieldEvery?: number;
996
+ onProgress?: (progress: SimilarityGraphProgress) => void;
972
997
  }
973
998
  interface SimilarityGraphRequest extends SimilarityGraphOptions {
974
999
  selector: EmbeddingSetSelector;
975
- metric?: 'cosine' | 'inner_product' | 'l2';
976
1000
  source?: 'cache-preferred' | 'live-only' | 'cache-only';
977
1001
  }
1002
+ interface SimilarityGraphProgress {
1003
+ phase: 'prepare' | 'neighbors';
1004
+ done: number;
1005
+ total: number;
1006
+ }
978
1007
  interface SimilarityGraphCacheKey {
979
1008
  selectorHash: string;
980
1009
  resolvedEmbeddingSetId?: string;
@@ -1439,19 +1468,19 @@ declare const CaptureKnowledgeInputSchema: z.ZodObject<{
1439
1468
  }, {
1440
1469
  content: string;
1441
1470
  title?: string | undefined;
1442
- format?: "markdown" | "plain" | "html" | undefined;
1443
1471
  tags?: string[] | undefined;
1472
+ format?: "markdown" | "plain" | "html" | undefined;
1444
1473
  }>, "many">>;
1445
1474
  template: z.ZodOptional<z.ZodString>;
1446
1475
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1447
1476
  }, "strip", z.ZodTypeAny, {
1448
1477
  source: string;
1449
1478
  format: "markdown" | "plain" | "html";
1450
- visibility: "private" | "shared" | "public";
1479
+ visibility: "private" | "public" | "shared";
1451
1480
  action: "create" | "bulk_create" | "from_template";
1452
1481
  title?: string | undefined;
1453
- archive_id?: string | undefined;
1454
1482
  tags?: string[] | undefined;
1483
+ archive_id?: string | undefined;
1455
1484
  content?: string | undefined;
1456
1485
  notes?: {
1457
1486
  format: "markdown" | "plain" | "html";
@@ -1465,16 +1494,16 @@ declare const CaptureKnowledgeInputSchema: z.ZodObject<{
1465
1494
  action: "create" | "bulk_create" | "from_template";
1466
1495
  source?: string | undefined;
1467
1496
  title?: string | undefined;
1497
+ tags?: string[] | undefined;
1468
1498
  archive_id?: string | undefined;
1469
1499
  format?: "markdown" | "plain" | "html" | undefined;
1470
- visibility?: "private" | "shared" | "public" | undefined;
1471
- tags?: string[] | undefined;
1500
+ visibility?: "private" | "public" | "shared" | undefined;
1472
1501
  content?: string | undefined;
1473
1502
  notes?: {
1474
1503
  content: string;
1475
1504
  title?: string | undefined;
1476
- format?: "markdown" | "plain" | "html" | undefined;
1477
1505
  tags?: string[] | undefined;
1506
+ format?: "markdown" | "plain" | "html" | undefined;
1478
1507
  }[] | undefined;
1479
1508
  template?: string | undefined;
1480
1509
  variables?: Record<string, string> | undefined;
@@ -1519,35 +1548,35 @@ declare const SearchInputSchema: z.ZodObject<{
1519
1548
  visibility: z.ZodOptional<z.ZodEnum<["private", "shared", "public"]>>;
1520
1549
  include_facets: z.ZodDefault<z.ZodBoolean>;
1521
1550
  }, "strip", z.ZodTypeAny, {
1522
- limit: number;
1551
+ query: string;
1523
1552
  offset: number;
1553
+ limit: number;
1524
1554
  include_facets: boolean;
1525
- mode: "semantic" | "text" | "hybrid";
1526
- query: string;
1555
+ mode: "text" | "semantic" | "hybrid";
1527
1556
  source?: string | undefined;
1557
+ tags?: string[] | undefined;
1528
1558
  format?: "markdown" | "plain" | "html" | undefined;
1529
- visibility?: "private" | "shared" | "public" | undefined;
1559
+ visibility?: "private" | "public" | "shared" | undefined;
1530
1560
  is_starred?: boolean | undefined;
1531
1561
  is_archived?: boolean | undefined;
1532
- tags?: string[] | undefined;
1533
1562
  collection_id?: string | undefined;
1534
1563
  date_from?: Date | undefined;
1535
1564
  date_to?: Date | undefined;
1536
1565
  }, {
1537
1566
  query: string;
1538
1567
  source?: string | undefined;
1568
+ tags?: string[] | undefined;
1569
+ offset?: number | undefined;
1539
1570
  format?: "markdown" | "plain" | "html" | undefined;
1540
- visibility?: "private" | "shared" | "public" | undefined;
1571
+ visibility?: "private" | "public" | "shared" | undefined;
1541
1572
  is_starred?: boolean | undefined;
1542
1573
  is_archived?: boolean | undefined;
1543
- tags?: string[] | undefined;
1544
1574
  limit?: number | undefined;
1545
- offset?: number | undefined;
1546
1575
  collection_id?: string | undefined;
1547
1576
  date_from?: Date | undefined;
1548
1577
  date_to?: Date | undefined;
1549
1578
  include_facets?: boolean | undefined;
1550
- mode?: "semantic" | "text" | "hybrid" | undefined;
1579
+ mode?: "text" | "semantic" | "hybrid" | undefined;
1551
1580
  }>;
1552
1581
  type SearchInput = z.infer<typeof SearchInputSchema>;
1553
1582
 
@@ -1625,22 +1654,22 @@ declare const ListNotesInputSchema: z.ZodObject<{
1625
1654
  collection_id: z.ZodOptional<z.ZodString>;
1626
1655
  include_deleted: z.ZodOptional<z.ZodBoolean>;
1627
1656
  }, "strip", z.ZodTypeAny, {
1628
- sort: "created_at" | "updated_at" | "title";
1629
- limit: number;
1657
+ sort: "title" | "updated_at" | "created_at";
1630
1658
  offset: number;
1659
+ limit: number;
1631
1660
  order: "asc" | "desc";
1661
+ tags?: string[] | undefined;
1632
1662
  is_starred?: boolean | undefined;
1633
1663
  is_archived?: boolean | undefined;
1634
- tags?: string[] | undefined;
1635
1664
  include_deleted?: boolean | undefined;
1636
1665
  collection_id?: string | undefined;
1637
1666
  }, {
1638
- sort?: "created_at" | "updated_at" | "title" | undefined;
1667
+ tags?: string[] | undefined;
1668
+ sort?: "title" | "updated_at" | "created_at" | undefined;
1669
+ offset?: number | undefined;
1639
1670
  is_starred?: boolean | undefined;
1640
1671
  is_archived?: boolean | undefined;
1641
- tags?: string[] | undefined;
1642
1672
  limit?: number | undefined;
1643
- offset?: number | undefined;
1644
1673
  order?: "asc" | "desc" | undefined;
1645
1674
  include_deleted?: boolean | undefined;
1646
1675
  collection_id?: string | undefined;
@@ -1654,12 +1683,12 @@ declare const ManageTagsInputSchema: z.ZodObject<{
1654
1683
  tag: z.ZodOptional<z.ZodString>;
1655
1684
  }, "strip", z.ZodTypeAny, {
1656
1685
  action: "add" | "remove" | "list_for_note" | "list_all";
1657
- note_id?: string | undefined;
1658
1686
  tag?: string | undefined;
1687
+ note_id?: string | undefined;
1659
1688
  }, {
1660
1689
  action: "add" | "remove" | "list_for_note" | "list_all";
1661
- note_id?: string | undefined;
1662
1690
  tag?: string | undefined;
1691
+ note_id?: string | undefined;
1663
1692
  }>;
1664
1693
  type ManageTagsInput = z.infer<typeof ManageTagsInputSchema>;
1665
1694
  interface ManageTagsResult {
@@ -2489,6 +2518,8 @@ interface ExportOptions {
2489
2518
  tag?: string;
2490
2519
  /** Export only these embedding sets and their member/vector rows. */
2491
2520
  embeddingSetIds?: string[];
2521
+ /** Preserve virtual selector materialization metadata and virtual member rows. */
2522
+ includeMaterializedSelectors?: boolean;
2492
2523
  }
2493
2524
  /** Conflict resolution strategy for shard import. */
2494
2525
  type ConflictStrategy = 'skip' | 'replace' | 'error';
@@ -2897,113 +2928,6 @@ declare function exportShard(db: DatabaseClient, options?: ExportOptions): Promi
2897
2928
  */
2898
2929
  declare function importShard(db: DatabaseClient, data: Uint8Array | ArrayBuffer, options?: ImportOptions): Promise<ImportResult>;
2899
2930
 
2900
- type AiwgFortemiRecordType = 'crm.contact' | 'crm.organization' | 'crm.event' | 'crm.interaction' | 'aiwg.artifact';
2901
- type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public';
2902
- type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected';
2903
- type AiwgReviewAction = 'accept' | 'reject' | 'defer';
2904
- interface AiwgFortemiRecordSource {
2905
- path: string;
2906
- repo_relative_path: string;
2907
- locator: string;
2908
- }
2909
- interface AiwgFortemiRelationship {
2910
- type: string;
2911
- target_id: string;
2912
- source_path?: string;
2913
- }
2914
- interface AiwgFortemiProvenance {
2915
- field: string;
2916
- source: string;
2917
- path: string;
2918
- confidence: AiwgProvenanceConfidence;
2919
- privacy: AiwgPrivacyClassification;
2920
- }
2921
- interface AiwgFortemiRecord {
2922
- schema_version: 'aiwg.fortemi.index.record.v1';
2923
- id: string;
2924
- type: AiwgFortemiRecordType;
2925
- source: AiwgFortemiRecordSource;
2926
- title: string;
2927
- text: string;
2928
- facets: Record<string, string[]>;
2929
- tags: string[];
2930
- concepts: string[];
2931
- relationships: AiwgFortemiRelationship[];
2932
- provenance: AiwgFortemiProvenance[];
2933
- privacy: {
2934
- classification: AiwgPrivacyClassification;
2935
- pii: boolean;
2936
- };
2937
- updated_at: string;
2938
- }
2939
- interface AiwgFortemiIndexExport {
2940
- schema_version: 'aiwg.fortemi.index.export.v1';
2941
- generated_at: string;
2942
- source: {
2943
- repo: string;
2944
- privacy: AiwgPrivacyClassification;
2945
- };
2946
- items: AiwgFortemiRecord[];
2947
- }
2948
- interface AiwgIndexValidationResult {
2949
- valid: boolean;
2950
- errors: string[];
2951
- counts: Partial<Record<AiwgFortemiRecordType, number>>;
2952
- }
2953
- interface AiwgIndexQueryOptions {
2954
- types?: AiwgFortemiRecordType[];
2955
- facets?: Record<string, string[]>;
2956
- tags?: string[];
2957
- concepts?: string[];
2958
- privacy?: AiwgPrivacyClassification[];
2959
- relationshipTargetId?: string;
2960
- limit?: number;
2961
- offset?: number;
2962
- }
2963
- interface AiwgIndexQueryResult {
2964
- items: AiwgFortemiRecord[];
2965
- total: number;
2966
- facets: Record<string, Record<string, number>>;
2967
- }
2968
- interface AiwgReviewDecision {
2969
- item_id: string;
2970
- action: AiwgReviewAction;
2971
- reason?: string;
2972
- updated_at: string;
2973
- }
2974
- interface AiwgReviewDecisionExport {
2975
- schema_version: 'aiwg.fortemi.review-decisions.v1';
2976
- generated_at: string;
2977
- source_export_schema_version: string;
2978
- decisions: AiwgReviewDecision[];
2979
- }
2980
- interface AiwgIndexGraphOptions {
2981
- communityFacet?: string;
2982
- communityTagPrefix?: string;
2983
- relationshipWeights?: Record<string, number>;
2984
- includeDanglingRelationships?: boolean;
2985
- }
2986
- declare function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult;
2987
- declare function assertAiwgFortemiIndexExport(value: unknown): AiwgFortemiIndexExport;
2988
- declare function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>>;
2989
- declare function queryAiwgFortemiIndex(index: AiwgFortemiIndexExport, query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
2990
- declare function createAiwgReviewDecisionExport(source: AiwgFortemiIndexExport, decisions: AiwgReviewDecision[], generatedAt?: string): AiwgReviewDecisionExport;
2991
- declare function aiwgFortemiIndexToCommunityGraph(index: AiwgFortemiIndexExport, options?: AiwgIndexGraphOptions): {
2992
- nodes: {
2993
- id: string;
2994
- }[];
2995
- edges: {
2996
- source: string;
2997
- target: string;
2998
- kind: string;
2999
- weight: number;
3000
- }[];
3001
- communities: {
3002
- id: string;
3003
- nodes: string[];
3004
- }[];
3005
- };
3006
-
3007
- declare const VERSION = "2026.6.1";
2931
+ declare const VERSION = "2026.6.2";
3008
2932
 
3009
- export { type AiwgFortemiIndexExport, type AiwgFortemiProvenance, type AiwgFortemiRecord, type AiwgFortemiRecordSource, type AiwgFortemiRecordType, type AiwgFortemiRelationship, type AiwgIndexGraphOptions, type AiwgIndexQueryOptions, type AiwgIndexQueryResult, type AiwgIndexValidationResult, type AiwgPrivacyClassification, type AiwgProvenanceConfidence, type AiwgReviewAction, type AiwgReviewDecision, type AiwgReviewDecisionExport, type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, CURRENT_SHARD_VERSION, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type ConflictStrategy, type CooldownConfig, type CooldownEvent, type CspDirectiveName, type CspDirectives, type CspViolationReport, type DatabaseClient, type DiscoveredProvider, type DiscoveryOptions, type EmbedFunction, type EmbedRequest, type EmbedResponse, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, type ExportOptions, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FortemiBridge, type FortemiBridgeCapabilities, type FortemiBridgeHost, type FortemiConfig, type FortemiCore, type FortemiInferenceRouter, type FortemiSecretStore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, type ImportCounts, type ImportOptions, type ImportProgress, type ImportProgressPhase, type ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, MemoryBlobStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, type PGliteWorkerStorageBackendFactoryOptions, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type ProbeResult, type ProbeStatus, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RouteHandler, SHARD_FORMAT, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardCollection, type ShardComponent, type ShardEmbedding, type ShardEmbeddingSet, type ShardEmbeddingSetMember, type ShardLink, type ShardManifest, type ShardNote, type ShardNoteSkosTag, type ShardProvenanceEdge, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, aiwgFortemiIndexToCommunityGraph, allMigrations, appendPluginScript, assertAiwgFortemiIndexExport, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, collectionFromShard, collectionToShard, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createAiwgReviewDecisionExport, createBlobStore, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteInstance, createRoutes, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchPluginScript, fortemiManifest, generateId, getAiwgFortemiFacets, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getLlmFunction, getNote, hasFortemiSecureSecrets, importShard, isPluginScriptAllowed, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, packTarGz, parseCspReport, provenanceEdgeToShard, queryAiwgFortemiIndex, registerLlmCapability, registerSemanticCapability, registerServiceWorker, searchTool, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsFromShard, tagsToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, validateAiwgFortemiIndexExport, validateChecksums, verifySri };
2933
+ export { type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, CURRENT_SHARD_VERSION, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type ConflictStrategy, type CooldownConfig, type CooldownEvent, type CspDirectiveName, type CspDirectives, type CspViolationReport, type DatabaseClient, type DiscoveredProvider, type DiscoveryOptions, type EmbedFunction, type EmbedRequest, type EmbedResponse, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, type ExportOptions, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FortemiBridge, type FortemiBridgeCapabilities, type FortemiBridgeHost, type FortemiConfig, type FortemiCore, type FortemiInferenceRouter, type FortemiSecretStore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, type ImportCounts, type ImportOptions, type ImportProgress, type ImportProgressPhase, type ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, MemoryBlobStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, type PGliteWorkerStorageBackendFactoryOptions, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type ProbeResult, type ProbeStatus, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RouteHandler, SHARD_FORMAT, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardCollection, type ShardComponent, type ShardEmbedding, type ShardEmbeddingSet, type ShardEmbeddingSetMember, type ShardLink, type ShardManifest, type ShardNote, type ShardNoteSkosTag, type ShardProvenanceEdge, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, allMigrations, appendPluginScript, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, collectionFromShard, collectionToShard, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createBlobStore, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteInstance, createRoutes, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchPluginScript, fortemiManifest, generateId, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getLlmFunction, getNote, hasFortemiSecureSecrets, importShard, isPluginScriptAllowed, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, packTarGz, parseCspReport, provenanceEdgeToShard, registerLlmCapability, registerSemanticCapability, registerServiceWorker, searchTool, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsFromShard, tagsToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, validateChecksums, verifySri };