@fortemi/core 2026.7.13 → 2026.7.15
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.
- package/README.md +41 -2
- package/dist/aiwg-index-schema.d.ts +0 -1
- package/dist/aiwg-index-schema.js +49 -0
- package/dist/aiwg-index-schema.js.map +1 -1
- package/dist/{aiwg-index-shard-BhF8kKAU.d.ts → aiwg-index-shard-BCdaz0X1.d.ts} +26 -0
- package/dist/aiwg-index-shard.d.ts +1 -1
- package/dist/aiwg-index-shard.js +863 -28
- package/dist/aiwg-index-shard.js.map +1 -1
- package/dist/aiwg-index.d.ts +53 -28
- package/dist/aiwg-index.js +8 -8
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +548 -577
- package/dist/index.js +1600 -1245
- package/dist/index.js.map +1 -1
- package/package.json +9 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/aiwg-index.ts","../src/shard/checksum.ts","../schemas/knowledge-shard/1.0.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/note.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/collection.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/tag.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/template.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/link.schema.json","../schemas/knowledge-shard/1.1.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/1.1.0/full-v1/manifest.schema.json","../schemas/knowledge-shard/1.1.0/full-v1/embedding.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/note.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/collection.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/tag.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/template.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/link.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/manifest.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-original.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-original-history.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-revised-current.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-revision.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding-config.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding-set.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding-set-member.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-edge.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-activity.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/named-location.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-location.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-device.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-record.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-concept.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-label.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-note.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-relation.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-mapping-relation.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme-membership.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-skos-tag.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-collection.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-collection-member.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/graph-source.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/graph-edge.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/community-set.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/community-assignment.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/signature.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/note.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/collection.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/tag.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/template.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/link.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/manifest.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-original.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-original-history.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-revised-current.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-revision.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding-config.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding-set.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding-set-member.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-edge.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-activity.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/named-location.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-location.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-device.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-record.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-concept.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-label.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-note.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-relation.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-mapping-relation.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme-membership.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-skos-tag.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-collection.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-collection-member.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/graph-source.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/graph-edge.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/community-set.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/community-assignment.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/signature.schema.json","../src/shard/shard-tar.ts","../src/shard/types.ts","../src/hash.ts","../src/shard/blob-sidecar.ts","../src/shard/schema-validator.ts","../schemas/knowledge-shard-v2.schema.receipt.json","../src/aiwg-index-full-shard.ts","../src/aiwg-index-shard.ts"],"names":["manifest_schema_default","note_schema_default","collection_schema_default","tag_schema_default","template_schema_default","link_schema_default","embedding_schema_default","note_original_schema_default","note_original_history_schema_default","note_revised_current_schema_default","note_revision_schema_default","embedding_config_schema_default","embedding_set_schema_default","embedding_set_member_schema_default","provenance_edge_schema_default","provenance_activity_schema_default","named_location_schema_default","provenance_location_schema_default","provenance_device_schema_default","provenance_record_schema_default","skos_scheme_schema_default","skos_concept_schema_default","skos_label_schema_default","skos_note_schema_default","skos_relation_schema_default","skos_mapping_relation_schema_default","skos_scheme_membership_schema_default","note_skos_tag_schema_default","skos_collection_schema_default","skos_collection_member_schema_default","graph_source_schema_default","graph_edge_schema_default","community_set_schema_default","community_assignment_schema_default","signature_schema_default","uuidv5","createdAt"],"mappings":";;;;;;;;AAqjBA,IAAM,sBAAA,GAAyD;AAAA,EAC7D,gBAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA;AAYA,SAAS,UAAU,KAAA,EAAiC;AAClD,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,CAAM,MAAA,GAAS,CAAA;AACrD;AAkCA,SAAS,cAA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M,QAAA,GACJ,IAAA,CAAK,QAAA,IACF,OAAO,KAAK,QAAA,KAAa,QAAA,IACzB,CAAC,KAAA,CAAM,QAAQ,IAAA,CAAK,QAAQ,CAAA,GAE5B,IAAA,CAAK,SAAqC,kBAAA,GAC3C,MAAA;AACJ,IAAA,IAAI,CAAC,YAAY,OAAO,QAAA,KAAa,YAAY,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AACxE,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,qBAAA,EAAwB,IAAA,CAAK,EAAE,CAAA,2BAAA,CAA6B,CAAA;AAAA,IAC9E;AACA,IAAA,MAAM,KAAA,GAAQ,QAAA;AACd,IAAA,QAAA,KAAa,KAAA,CAAM,QAAA;AACnB,IAAA,KAAA,CAAM,IAAA,CAAK,MAAM,MAA2B,CAAA;AAAA,EAC9C;AACA,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG,QAAA;AAAA,IACH,KAAA,EAAO,KAAA,CAAM,IAAA,CAAK,CAAC,IAAA,EAAM,KAAA,KAAU,IAAA,CAAK,EAAA,CAAG,aAAA,CAAc,KAAA,CAAM,EAAE,CAAC;AAAA,GACpE;AACA,EAAA,MAAM,UAAA,GAAa,+BAA+B,QAAQ,CAAA;AAC1D,EAAA,IAAI,CAAC,WAAW,KAAA,EAAO;AACrB,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA;AAAA,EAA0D,UAAA,CAAW,MAAA,CAAO,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,EAC1G;AACA,EAAA,OAAO,QAAA;AACT","file":"aiwg-index-shard.js","sourcesContent":["export type AiwgFortemiRecordType = string\n\nexport type AiwgFortemiRecordSchemaVersion = 'aiwg.fortemi.index.record.v1' | 'aiwg.fortemi.index.record.v2'\nexport type AiwgFortemiIndexExportSchemaVersion = 'aiwg.fortemi.index.export.v1' | 'aiwg.fortemi.index.export.v2'\nexport type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public'\nexport type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected'\nexport type AiwgReviewAction = 'accept' | 'reject' | 'defer'\nexport type AiwgFortemiRelationshipDirection = 'upstream' | 'downstream' | 'related'\n\nexport interface AiwgFortemiRecordSource {\n path: string\n repo_relative_path: string\n locator: string\n origin?: string\n generated?: boolean\n checksum?: string\n updated_at?: string\n}\n\nexport interface AiwgFortemiRelationship {\n type: string\n target_id: string\n source_path?: string\n target_path?: string\n direction?: AiwgFortemiRelationshipDirection\n label?: string\n confidence?: number\n privacy?: AiwgPrivacyClassification\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiProvenance {\n field: string\n source: string\n path: string\n confidence: AiwgProvenanceConfidence\n privacy: AiwgPrivacyClassification\n}\n\nexport type AiwgFortemiSkosRelationType = 'broader' | 'narrower' | 'related' | string\n\nexport interface AiwgFortemiSkosConcept {\n id: string\n prefLabel: string\n definition?: string\n scheme?: string\n notation?: string\n uri?: string\n altLabels?: string[]\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiSkosRelation {\n type: AiwgFortemiSkosRelationType\n source_id: string\n target_id: string\n source_path?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiProvenanceEvent {\n id?: string\n activity: string\n agent?: string\n started_at?: string\n ended_at?: string\n source?: string\n path?: string\n confidence?: AiwgProvenanceConfidence\n privacy?: AiwgPrivacyClassification\n attributes?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiSearchProjection {\n title?: string\n name?: string\n summary?: string\n body?: string\n triggers?: string[]\n aliases?: string[]\n capability?: string\n tags?: string[]\n phase?: string\n type?: string\n frontmatter?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiChunk {\n id?: string\n text?: string\n body?: string\n summary?: string\n source_path?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiRecordEmbedding {\n id?: string\n embedding?: number[]\n vector?: number[]\n model?: string\n granularity?: string\n input_hash?: string\n source_path?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiAttachmentReference {\n id: string\n path: string\n mime: string | null\n checksum: string\n bytes: number\n}\n\nexport interface AiwgFortemiBinarySource {\n extracted_text: string | null\n created_at?: string\n deleted_at?: string | null\n extraction_status?: 'extracted' | 'pending' | 'failed' | 'blocked' | 'deferred'\n reason?:\n | null\n | 'extraction_pending'\n | 'extractor_failed'\n | 'quarantined'\n | 'large_binary'\n | 'unsupported_mime'\n | 'no_extracted_text'\n attachment: AiwgFortemiAttachmentReference\n}\n\nexport interface AiwgFortemiRecord {\n schema_version: AiwgFortemiRecordSchemaVersion\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 search?: AiwgFortemiSearchProjection\n chunks?: AiwgFortemiChunk[]\n binary_sources?: AiwgFortemiBinarySource[]\n embeddings?: AiwgFortemiRecordEmbedding[]\n compatibility?: Record<string, unknown>\n /** Optional rich SKOS metadata for static consumers that need labels/definitions without opening a shard. */\n skos_concepts?: AiwgFortemiSkosConcept[]\n /** Optional SKOS relationship edges among concepts referenced by this record. */\n skos_relations?: AiwgFortemiSkosRelation[]\n /** Optional W3C PROV-style activity chain for this record. */\n provenance_events?: AiwgFortemiProvenanceEvent[]\n privacy: {\n classification: AiwgPrivacyClassification\n pii: boolean\n locality?: string\n }\n updated_at: string\n}\n\nexport interface AiwgFortemiIndexExport {\n schema_version: AiwgFortemiIndexExportSchemaVersion\n generated_at: string\n source: {\n repo: string\n privacy: AiwgPrivacyClassification\n // v2-only upstream graph name; the vendored schema is authoritative.\n graph?: string\n }\n items: AiwgFortemiRecord[]\n // v2-only compatibility declaration defined by the vendored upstream schema.\n compatibility?: {\n previous_schema_version: 'aiwg.fortemi.index.export.v1'\n strategy: 'supported'\n }\n}\n\nexport interface AiwgFortemiChunkPartRef {\n href: string\n offset: number\n count: number\n}\n\n// Fields a scan part must retain for query/browse/rank/facet to work. The rest\n// (source, provenance, relationships, updated_at) are detail-only and may be\n// dropped from scan parts via `projection`, then resolved on demand by id.\nexport const AIWG_SCAN_REQUIRED_FIELDS: Array<keyof AiwgFortemiRecord> = [\n 'schema_version',\n 'id',\n 'type',\n 'title',\n 'text',\n 'facets',\n 'tags',\n 'concepts',\n 'privacy',\n]\n\n// A record as it appears in a scan part. With no manifest `projection`, this is a\n// full AiwgFortemiRecord. With a projection, detail-only fields are absent — read\n// them via the controller's getRecord(). Typed as the full record for ergonomics;\n// query/browse code guards the projectable fields.\nexport type AiwgFortemiProjectedRecord =\n Pick<AiwgFortemiRecord, 'schema_version' | 'id' | 'type' | 'title' | 'text' | 'facets' | 'tags' | 'concepts' | 'privacy'>\n & Partial<AiwgFortemiRecord>\n\n// How a record id is encoded into a detail filename/path segment.\n// - 'base64url': path-safe, single segment, no '%' — works on every static host,\n// including ids containing '/' (default for new builds; see #177).\n// - 'uri': encodeURIComponent — legacy. Breaks for ids containing '/' on static\n// servers that reject %2F (path-traversal protection → 404).\nexport type AiwgDetailIdEncoding = 'uri' | 'base64url'\n\n// How the controller resolves a full record by id when scan parts are projected.\nexport interface AiwgFortemiChunkDetailRef {\n // href template containing `{id}`, relative to the manifest base — e.g.\n // \"detail/{id}.json\". The `{id}` is encoded per `encoding` at substitution.\n href: string\n // id→segment encoding. Absent is treated as 'uri' for backward compatibility\n // with manifests built before #177; new builds default to 'base64url'.\n encoding?: AiwgDetailIdEncoding\n}\n\nexport interface AiwgFortemiChunkManifest {\n schema_version: 'aiwg.fortemi.index.chunk-manifest.v1'\n generated_at: string\n source: AiwgFortemiIndexExport['source']\n // The schema_version of the source index export this manifest was built from,\n // so chunked consumers (e.g. review-decision export) can report the true source\n // version rather than assuming v1 (#239 E8). Optional for backward compatibility.\n source_export_schema_version?: AiwgFortemiIndexExportSchemaVersion\n total: number\n part_size: number\n facets?: Record<string, Record<string, number>>\n // Field names present in scan-part items. Absent → scan parts carry whole records.\n // When set, must include AIWG_SCAN_REQUIRED_FIELDS.\n projection?: Array<keyof AiwgFortemiRecord>\n // Resolver for full records by id (used with `projection` to lazy-load detail).\n detail?: AiwgFortemiChunkDetailRef\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<string, 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 searchProfile?: 'default' | 'aiwg-discovery'\n}\n\nexport interface AiwgIndexQueryWeights {\n title: number\n text: number\n tag: number\n concept: number\n facet: number\n id: number\n source: number\n}\n\nexport interface AiwgIndexQueryMatch {\n field: 'title' | 'text' | 'tag' | 'concept' | 'facet' | 'id' | 'source'\n value: string\n score?: number\n reason?: 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\n// Resolves a full record by id (used with projected scan parts). Returns the\n// parsed record JSON; validated by the controller before use.\nexport type AiwgChunkedIndexDetailLoader = (\n id: string,\n manifest: AiwgFortemiChunkManifest,\n) => Promise<unknown>\n\nexport interface AiwgChunkedIndexLoadOptions {\n maxCachedParts?: number\n // Required to resolve detail for projected indexes via getRecord(); ignored otherwise.\n detailLoader?: AiwgChunkedIndexDetailLoader\n maxCachedDetails?: number\n // Bounds the filtered/ranked match-set cache used to page a query without\n // re-scanning every part. Counts total cached entries across all queries\n // (LRU-evicted). Defaults to 5000. The cache is keyed on query + filters +\n // weights, so paging the same query (varying only offset/limit/sort/snippets)\n // reuses the scan; see queryChunked.\n maxCachedMatches?: 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: AiwgFortemiIndexExportSchemaVersion\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 type AiwgRelationshipDirection = 'in' | 'out' | 'both'\nexport type AiwgRelationshipSetOperation = 'intersection' | 'union' | 'difference'\n\nexport interface AiwgRelationshipTraversalOptions {\n direction?: AiwgRelationshipDirection\n relationshipType?: string\n relationshipDirection?: AiwgFortemiRelationshipDirection\n limit?: number\n}\n\nexport interface AiwgRelationshipQueryOptions extends AiwgRelationshipTraversalOptions {\n sourceId?: string\n targetId?: string\n endpointId?: string\n type?: string\n}\n\nexport interface AiwgRelationshipEdgeSummary {\n source_id: string\n target_id: string\n type: string\n source_path?: string\n target_path?: string\n direction?: AiwgFortemiRelationshipDirection\n}\n\nexport interface AiwgRelationshipNodeSummary {\n id: string\n type: AiwgFortemiRecordType\n title: string\n}\n\nexport interface AiwgRelationshipTraversalResult {\n nodes: AiwgRelationshipNodeSummary[]\n edges: AiwgRelationshipEdgeSummary[]\n complete: boolean\n scannedParts?: number\n fetchedParts?: number\n}\n\nexport interface AiwgRelationshipSetOptions extends AiwgRelationshipTraversalOptions {\n op: AiwgRelationshipSetOperation\n a: string\n b: string\n}\n\nexport interface AiwgRelationshipSetResult {\n ids: string[]\n op: AiwgRelationshipSetOperation\n}\n\nexport interface AiwgStaticEmbeddingRecord {\n record_id: string\n embedding: number[]\n embedding_id?: string\n granularity?: string\n input_hash: string\n source_path?: string\n}\n\nexport interface AiwgStaticEmbeddingSet {\n schema_version: 'aiwg.fortemi.embedding.set.v1'\n id: string\n model: string\n dimensions: number\n generated_at: string\n granularity: 'title-summary' | 'body' | 'chunked-body' | string\n metric?: 'cosine' | 'dot' | 'euclidean'\n input_hash_algorithm?: string\n embeddings: AiwgStaticEmbeddingRecord[]\n}\n\nexport interface AiwgHeadlessEmbeddingBackend {\n model: string\n dimensions: number\n embed(input: string, record: AiwgFortemiRecord): number[] | Promise<number[]>\n}\n\n// Privacy filtering for generated index/embedding artifacts (SEC6). Generation\n// is default-safe: records classified `private`, or flagged `pii`, are excluded\n// unless the caller explicitly opts them in. This keeps the query-time privacy\n// gate from being the *only* enforcement point — a leaked embedding set or scan\n// part can no longer carry private/PII-derived vectors by default.\nexport interface AiwgPrivacyFilterOptions {\n /** Include records classified `private` (default false). */\n includePrivate?: boolean\n /** Include records flagged `pii` (default false). */\n includePii?: boolean\n}\n\nfunction isPrivacyExcluded(record: AiwgFortemiRecord, options?: AiwgPrivacyFilterOptions): boolean {\n const privacy = record.privacy\n if (!privacy || !isPrivacyClassification(privacy.classification) || typeof privacy.pii !== 'boolean') return true\n if (privacy.classification === 'private' && !options?.includePrivate) return true\n if (privacy.pii && !options?.includePii) return true\n return false\n}\n\n/** Drop `private`/`pii` records unless explicitly opted in (SEC6, default-safe). */\nexport function filterAiwgRecordsByPrivacy(\n records: AiwgFortemiRecord[],\n options?: AiwgPrivacyFilterOptions,\n): AiwgFortemiRecord[] {\n return records.filter((record) => !isPrivacyExcluded(record, options))\n}\n\nexport interface BuildAiwgStaticEmbeddingSetOptions {\n id: string\n backend: AiwgHeadlessEmbeddingBackend\n records?: AiwgFortemiRecord[]\n generatedAt?: string | Date\n granularity?: AiwgStaticEmbeddingSet['granularity']\n metric?: AiwgStaticEmbeddingSet['metric']\n textForRecord?: (record: AiwgFortemiRecord) => string\n /** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */\n privacy?: AiwgPrivacyFilterOptions\n}\n\nexport interface AiwgStaticSemanticQueryOptions {\n limit?: number\n offset?: number\n minScore?: number\n}\n\nexport interface AiwgStaticSemanticResult {\n item: AiwgFortemiRecord\n score: number\n embedding?: AiwgStaticEmbeddingRecord\n}\n\nexport interface AiwgStaticHybridQueryOptions extends AiwgStaticSemanticQueryOptions, AiwgIndexQueryOptions {\n lexicalWeight?: number\n semanticWeight?: number\n}\n\nexport interface AiwgStaticDuplicatePair {\n left: AiwgFortemiRecord\n right: AiwgFortemiRecord\n score: number\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 // Resolve a full record by id. For a projected chunked index, fetches detail via\n // the detailLoader (bounded cache); for a whole-record index/parts, returns the\n // record from loaded data. Rejects if detail is unavailable.\n getRecord(id: string): Promise<AiwgFortemiRecord>\n neighbors(id: string, options?: AiwgRelationshipTraversalOptions): Promise<AiwgRelationshipTraversalResult>\n relationshipQuery(options?: AiwgRelationshipQueryOptions): Promise<AiwgRelationshipTraversalResult>\n relationshipSet(options: AiwgRelationshipSetOptions): Promise<AiwgRelationshipSetResult>\n clearChunkCache(): void\n toCommunityGraph(options?: AiwgIndexGraphOptions): ReturnType<typeof aiwgFortemiIndexToCommunityGraph>\n toCommunityGraphChunked(options?: AiwgIndexGraphOptions & { onProgress?: (progress: AiwgChunkedIndexProgress) => void }): Promise<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 'facets',\n 'tags',\n 'concepts',\n 'relationships',\n 'provenance',\n 'privacy',\n 'updated_at',\n]\n\nconst DEFAULT_QUERY_WEIGHTS: AiwgIndexQueryWeights = {\n title: 4,\n tag: 3,\n concept: 2,\n text: 1,\n facet: 2,\n id: 1,\n source: 0.25,\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 // `name`/`value` come from untrusted index records (item.facets). Using a\n // prototype-bearing accumulator would let a key such as `__proto__` (or any\n // inherited name like `toString`) read through the prototype chain and mutate\n // shared built-ins. Null-prototype buckets make every access own-property\n // only, so exotic keys are counted as plain data. See SEC1 / #236.\n let bucket = counts[name]\n if (bucket === undefined) {\n bucket = Object.create(null) as Record<string, number>\n counts[name] = bucket\n }\n bucket[value] = (bucket[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\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction isOptionalStringArray(value: unknown): boolean {\n return value === undefined || (Array.isArray(value) && value.every((item) => typeof item === 'string'))\n}\n\nfunction isSupportedIndexSchemaVersion(value: unknown): value is AiwgFortemiIndexExportSchemaVersion {\n return value === 'aiwg.fortemi.index.export.v1' || value === 'aiwg.fortemi.index.export.v2'\n}\n\nfunction isSupportedRecordSchemaVersion(value: unknown): value is AiwgFortemiRecordSchemaVersion {\n return value === 'aiwg.fortemi.index.record.v1' || value === 'aiwg.fortemi.index.record.v2'\n}\n\nfunction validateOptionalRichMetadata(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n if (item.skos_concepts !== undefined) {\n if (!Array.isArray(item.skos_concepts)) {\n errors.push('items[' + index + '].skos_concepts must be an array when present')\n } else {\n for (const [conceptIndex, concept] of item.skos_concepts.entries()) {\n if (!isPlainRecord(concept)) {\n errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '] must be an object')\n continue\n }\n if (!hasString(concept.id)) errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].id is required')\n if (!hasString(concept.prefLabel)) errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].prefLabel is required')\n if (!isOptionalStringArray(concept.altLabels)) errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].altLabels must be a string array')\n if (concept.metadata !== undefined && !isPlainRecord(concept.metadata)) {\n errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.skos_relations !== undefined) {\n if (!Array.isArray(item.skos_relations)) {\n errors.push('items[' + index + '].skos_relations must be an array when present')\n } else {\n for (const [relationIndex, relation] of item.skos_relations.entries()) {\n if (!isPlainRecord(relation)) {\n errors.push('items[' + index + '].skos_relations[' + relationIndex + '] must be an object')\n continue\n }\n if (!hasString(relation.type)) errors.push('items[' + index + '].skos_relations[' + relationIndex + '].type is required')\n if (!hasString(relation.source_id)) errors.push('items[' + index + '].skos_relations[' + relationIndex + '].source_id is required')\n if (!hasString(relation.target_id)) errors.push('items[' + index + '].skos_relations[' + relationIndex + '].target_id is required')\n if (relation.metadata !== undefined && !isPlainRecord(relation.metadata)) {\n errors.push('items[' + index + '].skos_relations[' + relationIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.provenance_events !== undefined) {\n if (!Array.isArray(item.provenance_events)) {\n errors.push('items[' + index + '].provenance_events must be an array when present')\n } else {\n for (const [eventIndex, event] of item.provenance_events.entries()) {\n if (!isPlainRecord(event)) {\n errors.push('items[' + index + '].provenance_events[' + eventIndex + '] must be an object')\n continue\n }\n if (!hasString(event.activity)) errors.push('items[' + index + '].provenance_events[' + eventIndex + '].activity is required')\n if (event.attributes !== undefined && !isPlainRecord(event.attributes)) {\n errors.push('items[' + index + '].provenance_events[' + eventIndex + '].attributes must be an object')\n }\n }\n }\n }\n if (Array.isArray(item.relationships)) {\n for (const [relationshipIndex, relationship] of item.relationships.entries()) {\n if (!isPlainRecord(relationship)) {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '] must be an object')\n continue\n }\n if (relationship.metadata !== undefined && !isPlainRecord(relationship.metadata)) {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '].metadata must be an object')\n }\n if (\n relationship.direction !== undefined &&\n relationship.direction !== 'upstream' &&\n relationship.direction !== 'downstream' &&\n relationship.direction !== 'related'\n ) {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '].direction must be upstream, downstream, or related')\n }\n if (relationship.target_path !== undefined && typeof relationship.target_path !== 'string') {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '].target_path must be a string')\n }\n }\n }\n if (item.search !== undefined) {\n if (!isPlainRecord(item.search)) {\n errors.push('items[' + index + '].search must be an object')\n } else {\n if (!isOptionalStringArray(item.search.triggers)) errors.push('items[' + index + '].search.triggers must be a string array')\n if (!isOptionalStringArray(item.search.aliases)) errors.push('items[' + index + '].search.aliases must be a string array')\n if (!isOptionalStringArray(item.search.tags)) errors.push('items[' + index + '].search.tags must be a string array')\n if (item.search.frontmatter !== undefined && !isPlainRecord(item.search.frontmatter)) {\n errors.push('items[' + index + '].search.frontmatter must be an object')\n }\n }\n }\n if (item.chunks !== undefined) {\n if (!Array.isArray(item.chunks)) {\n errors.push('items[' + index + '].chunks must be an array when present')\n } else {\n for (const [chunkIndex, chunk] of item.chunks.entries()) {\n if (!isPlainRecord(chunk)) {\n errors.push('items[' + index + '].chunks[' + chunkIndex + '] must be an object')\n continue\n }\n if (chunk.metadata !== undefined && !isPlainRecord(chunk.metadata)) {\n errors.push('items[' + index + '].chunks[' + chunkIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.embeddings !== undefined) {\n if (!Array.isArray(item.embeddings)) {\n errors.push('items[' + index + '].embeddings must be an array when present')\n } else {\n for (const [embeddingIndex, embedding] of item.embeddings.entries()) {\n if (!isPlainRecord(embedding)) {\n errors.push('items[' + index + '].embeddings[' + embeddingIndex + '] must be an object')\n continue\n }\n const vector = embedding.embedding ?? embedding.vector\n if (vector !== undefined && (!Array.isArray(vector) || !vector.every((entry) => typeof entry === 'number'))) {\n errors.push('items[' + index + '].embeddings[' + embeddingIndex + '].embedding/vector must be a number array')\n }\n if (embedding.metadata !== undefined && !isPlainRecord(embedding.metadata)) {\n errors.push('items[' + index + '].embeddings[' + embeddingIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.compatibility !== undefined && !isPlainRecord(item.compatibility)) {\n errors.push('items[' + index + '].compatibility must be an object')\n }\n}\n\nfunction isPrivacyClassification(value: unknown): value is AiwgPrivacyClassification {\n return value === 'private' || value === 'sanitized' || value === 'public'\n}\n\nfunction isProvenanceConfidence(value: unknown): value is AiwgProvenanceConfidence {\n return value === 'source' || value === 'candidate' || value === 'reviewed' || value === 'rejected'\n}\n\n// Provenance item shape + enum validation (#239 A4). Each item requires\n// field/source/path and enum-valid confidence/privacy — the schema marks all five\n// required, but the parser previously only checked \"non-empty array\".\nfunction validateProvenanceItems(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n if (!Array.isArray(item.provenance)) return\n for (const [provIndex, prov] of item.provenance.entries()) {\n const at = 'items[' + index + '].provenance[' + provIndex + ']'\n if (!isPlainRecord(prov)) {\n errors.push(at + ' must be an object')\n continue\n }\n if (!hasString(prov.field)) errors.push(at + '.field is required')\n if (!hasString(prov.source)) errors.push(at + '.source is required')\n if (!hasString(prov.path)) errors.push(at + '.path is required')\n if (!isProvenanceConfidence(prov.confidence)) errors.push(at + '.confidence must be one of source, candidate, reviewed, rejected')\n if (!isPrivacyClassification(prov.privacy)) errors.push(at + '.privacy must be one of private, sanitized, public')\n }\n}\n\n// v1/v2 field forbiddance (#239 A2): a record.v1 record must not carry fields the\n// schema defines only for record.v2. Keeps the parser as strict as the schema, so\n// a too-loose generator output is rejected rather than silently accepted.\nconst V2_ONLY_RECORD_FIELDS = [\n 'search',\n 'chunks',\n 'embeddings',\n 'skos_concepts',\n 'skos_relations',\n 'provenance_events',\n 'compatibility',\n] as const\nconst V2_ONLY_SOURCE_FIELDS = ['origin', 'generated', 'checksum', 'updated_at'] as const\nconst V2_ONLY_RELATIONSHIP_FIELDS = ['target_path', 'direction', 'metadata'] as const\n\nfunction forbidV2FieldsOnV1Record(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n if (item.schema_version !== 'aiwg.fortemi.index.record.v1') return\n const at = 'items[' + index + ']'\n const bag = item as Record<string, unknown>\n const v2msg = ' is a v2-only field and must be absent on a record.v1 record'\n for (const field of V2_ONLY_RECORD_FIELDS) {\n if (bag[field] !== undefined) errors.push(at + '.' + field + v2msg)\n }\n if (isPlainRecord(item.source)) {\n const src = item.source as Record<string, unknown>\n for (const field of V2_ONLY_SOURCE_FIELDS) {\n if (src[field] !== undefined) errors.push(at + '.source.' + field + v2msg)\n }\n }\n if (isPlainRecord(item.privacy) && (item.privacy as Record<string, unknown>).locality !== undefined) {\n errors.push(at + '.privacy.locality' + v2msg)\n }\n if (Array.isArray(item.relationships)) {\n for (const [relIndex, rel] of item.relationships.entries()) {\n if (!isPlainRecord(rel)) continue\n const relBag = rel as Record<string, unknown>\n for (const field of V2_ONLY_RELATIONSHIP_FIELDS) {\n if (relBag[field] !== undefined) errors.push(at + '.relationships[' + relIndex + '].' + field + v2msg)\n }\n }\n }\n}\n\nexport function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult {\n const errors: string[] = []\n const counts: Partial<Record<string, number>> = Object.create(null)\n const data = isPlainRecord(value) ? value as Partial<AiwgFortemiIndexExport> : {}\n if (!isPlainRecord(value)) errors.push('index export must be an object')\n\n if (!isSupportedIndexSchemaVersion(data?.schema_version)) {\n errors.push('schema_version must be aiwg.fortemi.index.export.v1 or aiwg.fortemi.index.export.v2')\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 else if (!isPrivacyClassification(data?.source?.privacy)) {\n errors.push('source.privacy must be one of private, sanitized, public')\n }\n if (!Array.isArray(data?.items)) errors.push('items must be an array')\n if (data.compatibility !== undefined && !isPlainRecord(data.compatibility)) {\n errors.push('compatibility must be an object')\n }\n // A5: export-level v1/v2 gating — source.graph and compatibility are v2-only.\n if (data?.schema_version === 'aiwg.fortemi.index.export.v1') {\n if (isPlainRecord(data.source) && (data.source as Record<string, unknown>).graph !== undefined) {\n errors.push('source.graph is a v2-only field and must be absent on an export.v1 export')\n }\n if (data.compatibility !== undefined) {\n errors.push('compatibility is a v2-only field and must be absent on an export.v1 export')\n }\n }\n\n const ids = new Set<string>()\n let previousId = ''\n const items = Array.isArray(data.items) ? data.items : []\n for (const [index, item] of items.entries()) {\n if (!isPlainRecord(item)) {\n errors.push('items[' + index + '] must be an object')\n continue\n }\n for (const field of REQUIRED_RECORD_FIELDS) {\n if (!(field in item)) errors.push('items[' + index + '].' + field + ' is required')\n }\n if (!isSupportedRecordSchemaVersion(item.schema_version)) {\n errors.push('items[' + index + '].schema_version must be aiwg.fortemi.index.record.v1 or aiwg.fortemi.index.record.v2')\n }\n if (data.schema_version === 'aiwg.fortemi.index.export.v1' && item.schema_version === 'aiwg.fortemi.index.record.v2') {\n errors.push('items[' + index + '].schema_version must match aiwg.fortemi.index.export.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 > item.id) {\n errors.push('items must be sorted by id: ' + previousId + ' before ' + item.id)\n }\n if (hasString(item.id)) previousId = item.id\n if (!hasString(item.type)) errors.push('items[' + index + '].type must be a non-empty string')\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 (typeof item.title !== 'string' && typeof item.search?.title !== 'string' && typeof item.search?.name !== 'string') {\n errors.push('items[' + index + '].title or search.title/search.name is required')\n }\n if (typeof item.text !== 'string' && typeof item.search?.body !== 'string' && typeof item.search?.summary !== 'string') {\n errors.push('items[' + index + '].text or search.body/search.summary is required')\n }\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 validateOptionalRichMetadata(item, index, errors)\n validateProvenanceItems(item, index, errors)\n forbidV2FieldsOnV1Record(item, index, errors)\n if (!item.privacy || typeof item.privacy.pii !== 'boolean' || !hasString(item.privacy.classification)) {\n errors.push('items[' + index + '].privacy requires classification and pii')\n } else if (!isPrivacyClassification(item.privacy.classification)) {\n errors.push('items[' + index + '].privacy.classification must be one of private, sanitized, public')\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 = isPlainRecord(value) ? value as Partial<AiwgFortemiChunkManifest> : {}\n if (!isPlainRecord(value)) errors.push('chunk manifest must be an object')\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 (data?.source_export_schema_version !== undefined && !isSupportedIndexSchemaVersion(data.source_export_schema_version)) {\n errors.push('source_export_schema_version must be aiwg.fortemi.index.export.v1 or aiwg.fortemi.index.export.v2 when present')\n }\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 (data.projection !== undefined) {\n if (!Array.isArray(data.projection) || !data.projection.every((field) => typeof field === 'string')) {\n errors.push('projection must be an array of field names')\n } else {\n const present = new Set(data.projection)\n for (const field of AIWG_SCAN_REQUIRED_FIELDS) {\n if (!present.has(field)) errors.push('projection must include scan-required field ' + field)\n }\n }\n }\n if (data.detail !== undefined && !isPlainRecord(data.detail)) {\n errors.push('detail must be an object')\n } else if (data.detail !== undefined) {\n if (!hasString(data.detail.href)) errors.push('detail.href is required')\n else if (!data.detail.href.includes('{id}')) errors.push('detail.href must contain the {id} placeholder')\n if (\n data.detail.encoding !== undefined &&\n data.detail.encoding !== 'uri' &&\n data.detail.encoding !== 'base64url'\n ) {\n errors.push(\"detail.encoding must be 'uri' or 'base64url'\")\n }\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 (!isPlainRecord(part)) {\n errors.push('parts[' + index + '] must be an object')\n continue\n }\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\nfunction validateProjectedRecordShape(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n const at = 'items[' + index + ']'\n if (!item.privacy || !isPlainRecord(item.privacy)) {\n errors.push(at + '/privacy requires classification and pii')\n } else {\n if (!isPrivacyClassification(item.privacy.classification)) {\n errors.push(at + '/privacy/classification must be one of private, sanitized, public')\n }\n if (typeof item.privacy.pii !== 'boolean') {\n errors.push(at + '/privacy/pii must be boolean')\n }\n }\n if (Array.isArray(item.provenance)) {\n for (const [provIndex, prov] of item.provenance.entries()) {\n if (!isPlainRecord(prov)) {\n errors.push(at + '/provenance/' + provIndex + ' must be an object')\n continue\n }\n if (!isProvenanceConfidence(prov.confidence)) {\n errors.push(at + '/provenance/' + provIndex + '/confidence must be one of source, candidate, reviewed, rejected')\n }\n if (!isPrivacyClassification(prov.privacy)) {\n errors.push(at + '/provenance/' + provIndex + '/privacy must be one of private, sanitized, public')\n }\n }\n }\n}\n\n// Validate projected (slim) scan-part items: scan-required fields only, ids unique + sorted.\nfunction validateProjectedRecords(\n items: Array<Partial<AiwgFortemiRecord>>,\n sourceSchemaVersion: AiwgFortemiIndexExportSchemaVersion,\n): string[] {\n const errors: string[] = []\n const ids = new Set<string>()\n let previousId = ''\n for (const [index, item] of items.entries()) {\n if (!isPlainRecord(item)) {\n errors.push('items[' + index + '] must be an object')\n continue\n }\n validateProjectedRecordShape(item, index, errors)\n const expectedRecordVersion = sourceSchemaVersion === 'aiwg.fortemi.index.export.v2'\n ? 'aiwg.fortemi.index.record.v2'\n : 'aiwg.fortemi.index.record.v1'\n if (item.schema_version !== expectedRecordVersion) {\n errors.push(`items[${index}].schema_version must match ${sourceSchemaVersion}`)\n }\n if (!isSupportedRecordSchemaVersion(item.schema_version)) {\n errors.push('items[' + index + '].schema_version must be aiwg.fortemi.index.record.v1 or aiwg.fortemi.index.record.v2')\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 > item.id) {\n errors.push('items must be sorted by id: ' + previousId + ' before ' + item.id)\n }\n if (hasString(item.id)) previousId = item.id\n if (!hasString(item.type)) errors.push('items[' + index + '].type must be a non-empty string')\n if (typeof item.title !== 'string' && typeof item.search?.title !== 'string' && typeof item.search?.name !== 'string') {\n errors.push('items[' + index + '].title or search.title/search.name is required')\n }\n if (typeof item.text !== 'string' && typeof item.search?.body !== 'string' && typeof item.search?.summary !== 'string') {\n errors.push('items[' + index + '].text or search.body/search.summary is required')\n }\n if (!item.facets || typeof item.facets !== 'object' || Array.isArray(item.facets)) {\n errors.push('items[' + index + '].facets must be an object')\n }\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 }\n return errors\n}\n\nexport function validateAiwgFortemiChunkPart(\n value: unknown,\n partRef?: AiwgFortemiChunkPartRef,\n manifest?: AiwgFortemiChunkManifest,\n): AiwgChunkedIndexValidationResult {\n const errors: string[] = []\n const data = isPlainRecord(value) ? value as Partial<AiwgFortemiChunkPart> : {}\n if (!isPlainRecord(value)) errors.push('chunk part must be an object')\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 if (manifest?.projection) {\n errors.push(...validateProjectedRecords(\n data.items,\n manifest.source_export_schema_version ?? 'aiwg.fortemi.index.export.v1',\n ).map((error) => 'items.' + error))\n } else {\n const validation = validateAiwgFortemiIndexExport({\n schema_version: manifest?.source_export_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 ...((manifest?.source_export_schema_version ?? 'aiwg.fortemi.index.export.v1') === 'aiwg.fortemi.index.export.v2'\n ? { compatibility: { previous_schema_version: 'aiwg.fortemi.index.export.v1', strategy: 'supported' } }\n : {}),\n items: data.items,\n })\n errors.push(...validation.errors.map((error) => 'items.' + error))\n }\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\n// Schemes an index fetch may target. Blocks file:, ftp:, ws:, etc. so a\n// manifest-controlled href cannot pivot the browser into a non-web protocol.\nconst ALLOWED_AIWG_FETCH_SCHEMES = new Set(['http:', 'https:', 'blob:', 'data:'])\n\nfunction tryParseUrl(value: string): URL | null {\n try {\n return new URL(value)\n } catch {\n return null\n }\n}\n\n// Resolve and vet a manifest-controlled fetch target (SEC2 — SSRF).\n// - With a baseUrl: the href is resolved against it and MUST stay same-origin,\n// so an absolute `href` (which `new URL` would otherwise honor, ignoring the\n// base) cannot redirect the fetch to an attacker origin.\n// - Without a baseUrl: the caller opted into a bare href; only the scheme is\n// vetted (relative hrefs are passed through unchanged).\nexport function resolveAiwgFetchUrl(href: string, baseUrl?: string | URL): string {\n if (baseUrl === undefined) {\n const absolute = tryParseUrl(href)\n if (absolute && !ALLOWED_AIWG_FETCH_SCHEMES.has(absolute.protocol)) {\n throw new Error('Refusing AIWG index fetch with disallowed scheme: ' + absolute.protocol)\n }\n return href\n }\n const base = new URL(baseUrl)\n const resolved = new URL(href, base)\n if (!ALLOWED_AIWG_FETCH_SCHEMES.has(resolved.protocol)) {\n throw new Error('Refusing AIWG index fetch with disallowed scheme: ' + resolved.protocol)\n }\n if (resolved.origin !== base.origin) {\n throw new Error('Refusing cross-origin AIWG index fetch: ' + resolved.origin + ' != ' + base.origin)\n }\n return resolved.toString()\n}\n\nexport function createAiwgFetchChunkLoader(baseUrl?: string | URL): AiwgChunkedIndexLoader {\n return async (part) => {\n const href = resolveAiwgFetchUrl(part.href, baseUrl)\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\n// Encode a record id into a single, path-safe detail filename segment.\n// - 'base64url' (default): UTF-8 → base64url (no '+', '/', '=', '%'). Safe for ids\n// containing '/' on static hosts that reject %2F (#177).\n// - 'uri': encodeURIComponent (legacy).\nexport function encodeAiwgDetailId(id: string, encoding: AiwgDetailIdEncoding = 'base64url'): string {\n if (encoding === 'uri') return encodeURIComponent(id)\n const bytes = new TextEncoder().encode(id)\n let binary = ''\n for (const byte of bytes) binary += String.fromCharCode(byte)\n // btoa is available in browsers and Node ≥16.\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n}\n\n// Resolve a manifest detail.href template for a given id, honoring detail.encoding\n// (absent → 'uri' for backward compatibility). The writer and the loader both go\n// through this so emitted filenames and fetched paths always agree.\nexport function aiwgDetailHrefForId(detail: AiwgFortemiChunkDetailRef, id: string): string {\n return detail.href.replace('{id}', encodeAiwgDetailId(id, detail.encoding ?? 'uri'))\n}\n\n// Detail loader for projected indexes: resolves the manifest's detail.href {id}\n// template (encoded per detail.encoding) against baseUrl and fetches the full record.\nexport function createAiwgFetchDetailLoader(baseUrl?: string | URL): AiwgChunkedIndexDetailLoader {\n return async (id, manifest) => {\n if (!manifest.detail?.href) throw new Error('Manifest has no detail.href for record resolution')\n const relative = aiwgDetailHrefForId(manifest.detail, id)\n const href = resolveAiwgFetchUrl(relative, baseUrl)\n const response = await fetch(href)\n if (!response.ok) throw new Error('Failed to fetch AIWG index detail ' + href + ': ' + response.status)\n return response.json()\n }\n}\n\nexport function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>> {\n // Null-prototype accumulator: untrusted facet names must never resolve to an\n // inherited property (see pushFacet / SEC1 / #236). Round-trips to a plain\n // object through JSON serialization, so no downstream consumer is affected.\n const result: Record<string, Record<string, number>> = Object.create(null)\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 recordTitle(item: AiwgFortemiProjectedRecord): string {\n return item.title ?? item.search?.title ?? item.search?.name ?? item.id\n}\n\nfunction recordText(item: AiwgFortemiProjectedRecord): string {\n const base = item.text\n ?? item.search?.body\n ?? item.search?.summary\n ?? item.chunks?.map((chunk) => chunk.text ?? chunk.body ?? chunk.summary ?? '').filter(Boolean).join('\\n')\n ?? ''\n const extractedText = binarySourceText(item)\n return [base, extractedText].filter(Boolean).join('\\n')\n}\n\nfunction binarySourceText(item: AiwgFortemiProjectedRecord): string {\n return 'binary_sources' in item\n ? item.binary_sources?.map((source) => source.extracted_text).filter(Boolean).join('\\n') ?? ''\n : ''\n}\n\nfunction defaultEmbeddingInput(record: AiwgFortemiRecord, granularity: AiwgStaticEmbeddingSet['granularity']): string {\n const title = recordTitle(record)\n const text = recordText(record)\n if (granularity === 'title-summary') {\n // Attachment text remains part of title-summary embeddings so binary-only\n // knowledge is searchable even when the record has no authored summary.\n return [title, record.search?.summary ?? '', binarySourceText(record)].filter(Boolean).join('\\n')\n }\n return [title, text].filter(Boolean).join('\\n')\n}\n\nfunction generatedAtString(value: string | Date | undefined): string {\n if (value instanceof Date) return value.toISOString()\n return value ?? new Date().toISOString()\n}\n\nconst SHA256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n] as const\n\nfunction rotr(value: number, bits: number): number {\n return (value >>> bits) | (value << (32 - bits))\n}\n\nfunction sha256Hex(data: Uint8Array): string {\n const bitLength = data.length * 8\n const padded = new Uint8Array((((data.length + 9 + 63) >> 6) << 6))\n padded.set(data)\n padded[data.length] = 0x80\n const view = new DataView(padded.buffer)\n view.setUint32(padded.length - 4, bitLength >>> 0)\n view.setUint32(padded.length - 8, Math.floor(bitLength / 0x100000000))\n let h0 = 0x6a09e667\n let h1 = 0xbb67ae85\n let h2 = 0x3c6ef372\n let h3 = 0xa54ff53a\n let h4 = 0x510e527f\n let h5 = 0x9b05688c\n let h6 = 0x1f83d9ab\n let h7 = 0x5be0cd19\n const w = new Uint32Array(64)\n for (let offset = 0; offset < padded.length; offset += 64) {\n for (let i = 0; i < 16; i++) w[i] = view.getUint32(offset + i * 4)\n for (let i = 16; i < 64; i++) {\n const s0 = rotr(w[i - 15], 7) ^ rotr(w[i - 15], 18) ^ (w[i - 15] >>> 3)\n const s1 = rotr(w[i - 2], 17) ^ rotr(w[i - 2], 19) ^ (w[i - 2] >>> 10)\n w[i] = (w[i - 16] + s0 + w[i - 7] + s1) >>> 0\n }\n let a = h0\n let b = h1\n let c = h2\n let d = h3\n let e = h4\n let f = h5\n let g = h6\n let h = h7\n for (let i = 0; i < 64; i++) {\n const s1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)\n const ch = (e & f) ^ (~e & g)\n const temp1 = (h + s1 + ch + SHA256_K[i] + w[i]) >>> 0\n const s0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)\n const maj = (a & b) ^ (a & c) ^ (b & c)\n const temp2 = (s0 + maj) >>> 0\n h = g\n g = f\n f = e\n e = (d + temp1) >>> 0\n d = c\n c = b\n b = a\n a = (temp1 + temp2) >>> 0\n }\n h0 = (h0 + a) >>> 0\n h1 = (h1 + b) >>> 0\n h2 = (h2 + c) >>> 0\n h3 = (h3 + d) >>> 0\n h4 = (h4 + e) >>> 0\n h5 = (h5 + f) >>> 0\n h6 = (h6 + g) >>> 0\n h7 = (h7 + h) >>> 0\n }\n return [h0, h1, h2, h3, h4, h5, h6, h7].map((part) => part.toString(16).padStart(8, '0')).join('')\n}\n\nfunction computeAiwgIndexHash(data: Uint8Array): string {\n return `sha256:${sha256Hex(data)}`\n}\n\nexport async function buildAiwgStaticEmbeddingSet(\n index: AiwgFortemiIndexExport,\n options: BuildAiwgStaticEmbeddingSetOptions,\n): Promise<AiwgStaticEmbeddingSet> {\n assertAiwgFortemiIndexExport(index)\n const granularity = options.granularity ?? 'body'\n // SEC6: default-safe privacy filter over the source records.\n const records = filterAiwgRecordsByPrivacy(options.records ?? index.items, options.privacy)\n const embeddings: AiwgStaticEmbeddingRecord[] = []\n\n for (const record of records) {\n const input = options.textForRecord?.(record) ?? defaultEmbeddingInput(record, granularity)\n const embedding = await options.backend.embed(input, record)\n if (embedding.length !== options.backend.dimensions) {\n throw new Error(`Embedding for ${record.id} has ${embedding.length} dimensions; expected ${options.backend.dimensions}`)\n }\n embeddings.push({\n record_id: record.id,\n embedding,\n granularity,\n input_hash: computeAiwgIndexHash(new TextEncoder().encode(input)),\n source_path: record.source.path,\n })\n }\n\n const embeddingSet: AiwgStaticEmbeddingSet = {\n schema_version: 'aiwg.fortemi.embedding.set.v1',\n id: options.id,\n model: options.backend.model,\n dimensions: options.backend.dimensions,\n generated_at: generatedAtString(options.generatedAt),\n granularity,\n ...(options.metric ? { metric: options.metric } : {}),\n input_hash_algorithm: 'sha256',\n embeddings,\n }\n assertAiwgStaticEmbeddingSet(embeddingSet)\n return embeddingSet\n}\n\nfunction recordSearchValues(item: AiwgFortemiProjectedRecord): string[] {\n const search = item.search\n const values = [\n item.id,\n recordTitle(item),\n recordText(item),\n search?.title,\n search?.name,\n search?.summary,\n search?.body,\n search?.capability,\n search?.phase,\n search?.type,\n ...(search?.triggers ?? []),\n ...(search?.aliases ?? []),\n ...(search?.tags ?? []),\n ...(item.chunks ?? []).flatMap((chunk) => [chunk.text, chunk.body, chunk.summary, chunk.source_path]),\n ]\n if (search?.frontmatter) {\n for (const value of Object.values(search.frontmatter)) {\n if (typeof value === 'string') values.push(value)\n else if (Array.isArray(value)) values.push(...value.filter((entry): entry is string => typeof entry === 'string'))\n }\n }\n return values.filter((value): value is string => typeof value === 'string' && value.length > 0)\n}\n\nexport interface AiwgChunkedIndexBuildOptions {\n partSize?: number\n // When set, scan parts carry only these fields; full records go to `details`.\n projection?: Array<keyof AiwgFortemiRecord>\n // Detail href template (with {id}); defaults to \"detail/{id}.json\" when projecting.\n detailHref?: string\n // id→filename encoding for detail files; defaults to 'base64url' (path-safe,\n // works for ids containing '/'; see #177).\n idEncoding?: AiwgDetailIdEncoding\n generatedAt?: string\n /** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */\n privacy?: AiwgPrivacyFilterOptions\n}\n\nexport interface AiwgChunkedIndexBuildResult {\n manifest: AiwgFortemiChunkManifest\n parts: Array<{ href: string; part: AiwgFortemiChunkPart }>\n // Empty unless projecting. Each entry carries the full record plus the resolved,\n // encoding-correct `href` to host it at — write the record to that path so the\n // detail loader (which uses the same encoding) can fetch it back.\n details: Array<{ id: string; href: string; record: AiwgFortemiRecord }>\n}\n\n// Pure builder (no I/O): project an index export into the chunked manifest + parts\n// (+ detail records when projecting). The caller writes the returned objects to disk.\n// Manifest facets are computed from the full records, so global counts are exact even\n// when scan parts are slim.\nexport function buildAiwgChunkedIndex(\n index: AiwgFortemiIndexExport,\n options: AiwgChunkedIndexBuildOptions = {},\n): AiwgChunkedIndexBuildResult {\n assertAiwgFortemiIndexExport(index)\n const partSize = hasPositiveInteger(options.partSize) ? options.partSize : 500\n const projection = options.projection\n const idEncoding = options.idEncoding ?? 'base64url'\n const detailHref = options.detailHref ?? 'detail/{id}.json'\n // SEC6: default-safe privacy filter — `private`/`pii` records never enter the\n // generated scan parts, detail files, or manifest facet counts.\n const items = filterAiwgRecordsByPrivacy(index.items, options.privacy)\n const pad = (value: number): string => String(value).padStart(4, '0')\n const project = (record: AiwgFortemiRecord): AiwgFortemiRecord => {\n if (!projection) return record\n const slim: Record<string, unknown> = {}\n for (const field of projection) slim[field] = record[field]\n return slim as unknown as AiwgFortemiRecord\n }\n\n const parts: Array<{ href: string; part: AiwgFortemiChunkPart }> = []\n const partRefs: AiwgFortemiChunkPartRef[] = []\n for (let offset = 0, partIndex = 0; offset < items.length; offset += partSize, partIndex += 1) {\n const slice = items.slice(offset, offset + partSize)\n const href = 'part-' + pad(partIndex) + '.json'\n parts.push({\n href,\n part: {\n schema_version: 'aiwg.fortemi.index.chunk.v1',\n manifest_schema_version: 'aiwg.fortemi.index.chunk-manifest.v1',\n offset,\n items: slice.map(project),\n },\n })\n partRefs.push({ href, offset, count: slice.length })\n }\n\n const manifest: AiwgFortemiChunkManifest = {\n schema_version: 'aiwg.fortemi.index.chunk-manifest.v1',\n generated_at: options.generatedAt ?? index.generated_at,\n source: index.source,\n source_export_schema_version: index.schema_version,\n total: items.length,\n part_size: partSize,\n facets: getAiwgFortemiFacets(items),\n parts: partRefs,\n ...(projection ? { projection, detail: { href: detailHref, encoding: idEncoding } } : {}),\n }\n\n return {\n manifest,\n parts,\n details: projection\n ? items.map((record) => ({\n id: record.id,\n href: aiwgDetailHrefForId({ href: detailHref, encoding: idEncoding }, record.id),\n record,\n }))\n : [],\n }\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 const title = recordTitle(item)\n const text = recordText(item)\n if (title.toLowerCase().includes(q)) matches.push({ field: 'title', value: title })\n if (text.toLowerCase().includes(q)) matches.push({ field: 'text', value: 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 for (const value of recordSearchValues(item)) {\n if (value !== title && value !== text && value.toLowerCase().includes(q)) {\n matches.push({ field: 'text', value, score: DEFAULT_QUERY_WEIGHTS.text })\n }\n }\n return matches\n}\n\nconst DISCOVERY_STOPWORDS = new Set([\n 'the', 'a', 'an', 'and', 'or', 'of', 'for', 'to', 'in', 'on',\n 'with', 'into', 'from', 'is', 'are', 'be', 'i', 'we', 'my',\n 'it', 'you', 'me', 'us', 'your', 'our', 'this', 'that', 'these', 'those',\n 'there', 'here', 'some', 'any', 'all', 'also', 'please', 'about',\n 'how', 'what', 'which', 'where', 'when', 'who', 'why',\n 'find', 'give', 'show', 'need', 'want', 'looking', 'look', 'help',\n 'do', 'does', 'did', 'can', 'could', 'should', 'would', 'will',\n 'handle', 'handles', 'handling',\n 'aiwg', 'skill', 'skills', 'agent', 'agents', 'command', 'commands',\n 'rule', 'rules', 'flow', 'flows', 'workflow', 'workflows',\n])\n\nfunction normalizeDiscoveryName(value: string): string {\n return value.toLowerCase().replace(/[-_\\s]+/g, ' ').trim()\n}\n\nfunction discoveryTokens(value: string): string[] {\n return value\n .toLowerCase()\n .split(/[^a-z0-9-]+/)\n .filter((token) => token.length > 1 && !DISCOVERY_STOPWORDS.has(token))\n}\n\nfunction facetValues(item: AiwgFortemiRecord, names: string[]): string[] {\n return names.flatMap((name) => item.facets[name] ?? [])\n}\n\nfunction addDiscoveryMatch(matches: AiwgIndexQueryMatch[], match: AiwgIndexQueryMatch) {\n if (!matches.some((existing) => existing.field === match.field && existing.value === match.value && existing.reason === match.reason)) {\n matches.push(match)\n }\n}\n\nfunction damerauLevenshteinAtMostOne(left: string, right: string): boolean {\n if (left === right) return true\n if (Math.abs(left.length - right.length) > 1) return false\n\n if (left.length === right.length) {\n let firstDiff = -1\n let diffCount = 0\n for (let index = 0; index < left.length; index += 1) {\n if (left[index] !== right[index]) {\n if (firstDiff < 0) firstDiff = index\n diffCount += 1\n }\n }\n if (diffCount === 1) return true\n return diffCount === 2\n && firstDiff + 1 < left.length\n && left[firstDiff] === right[firstDiff + 1]\n && left[firstDiff + 1] === right[firstDiff]\n }\n\n const shorter = left.length < right.length ? left : right\n const longer = left.length < right.length ? right : left\n let shorterIndex = 0\n let longerIndex = 0\n let edits = 0\n while (shorterIndex < shorter.length && longerIndex < longer.length) {\n if (shorter[shorterIndex] === longer[longerIndex]) {\n shorterIndex += 1\n longerIndex += 1\n } else {\n edits += 1\n if (edits > 1) return false\n longerIndex += 1\n }\n }\n return true\n}\n\nfunction nearDiscoveryNameMatch(query: string, name: string): boolean {\n const queryParts = normalizeDiscoveryName(query).split(/\\s+/).filter(Boolean)\n const nameParts = normalizeDiscoveryName(name).split(/\\s+/).filter(Boolean)\n if (queryParts.length !== nameParts.length) return false\n\n return queryParts.every((part, index) => {\n const target = nameParts[index]\n if (part === target) return true\n if (part.length < 5 || target.length < 5) return false\n return damerauLevenshteinAtMostOne(part, target)\n })\n}\n\nfunction lowerValues(values: string[]): string[] {\n return values.map((value) => value.toLowerCase())\n}\n\ninterface DiscoveryScoringOptions {\n relaxOverlap?: boolean\n}\n\nfunction discoveryMatches(item: AiwgFortemiRecord, query: string, options: DiscoveryScoringOptions = {}): AiwgIndexQueryMatch[] {\n if (!query) return []\n const matches: AiwgIndexQueryMatch[] = []\n const tokens = discoveryTokens(query)\n const lower = tokens.length > 0 ? tokens.join(' ') : query.toLowerCase().trim()\n const rawLower = query.toLowerCase().trim()\n const idParts = item.id.split(/[:/]/)\n const names = [\n item.id,\n recordTitle(item),\n item.search?.name,\n item.search?.title,\n ...(item.search?.aliases ?? []),\n ...idParts,\n ...facetValues(item, ['name', 'canonical_name', 'command', 'skill', 'agent', 'rule']),\n ].filter((value): value is string => hasString(value))\n const triggers = [\n ...facetValues(item, ['trigger', 'triggers', 'trigger_phrase', 'trigger_phrases']),\n ...(item.search?.triggers ?? []),\n ]\n const capabilities = [\n ...facetValues(item, ['capability', 'capabilities', 'summary', 'description']),\n item.search?.capability,\n item.search?.summary,\n item.search?.phase,\n item.search?.type,\n ...(item.search?.tags ?? []),\n ...item.concepts,\n ...item.tags,\n ].filter((value): value is string => hasString(value))\n const sourceValues = [item.source?.path, item.source?.repo_relative_path, item.source?.locator].filter((value): value is string => hasString(value))\n const title = recordTitle(item)\n const summary = [item.search?.summary, recordText(item)].filter((value): value is string => hasString(value)).join('\\n')\n const type = item.search?.type ?? item.type\n const tags = [...(item.search?.tags ?? []), ...item.tags]\n const useMultiToken = tokens.length > 1\n const minHits = useMultiToken ? (options.relaxOverlap ? 1 : Math.ceil(tokens.length / 2)) : 1\n const overlapOK = (hits: number): boolean => useMultiToken && hits >= minHits\n\n const addInfo = (match: AiwgIndexQueryMatch) => addDiscoveryMatch(matches, { ...match, score: 0 })\n const addScore = (score: number) => {\n if (score > 0) addDiscoveryMatch(matches, { field: 'id', value: item.id, score, reason: 'aiwg discovery score' })\n }\n\n for (const name of names) {\n if (normalizeDiscoveryName(query) === normalizeDiscoveryName(name)) {\n addInfo({ field: 'id', value: name, reason: 'exact canonical name' })\n addScore(1.001)\n return matches\n }\n if (nearDiscoveryNameMatch(query, name)) {\n addInfo({ field: 'id', value: name, reason: 'near canonical name' })\n addScore(0.951)\n return matches\n }\n }\n\n let score = 0\n const scoreText = (\n field: AiwgIndexQueryMatch['field'],\n value: string,\n reason: string,\n exactScore: number,\n overlapScore: number,\n weight: number,\n exactBonus = 0,\n ) => {\n const normalized = value.toLowerCase()\n if (normalized.includes(lower)) {\n score += exactScore * weight\n if (normalized === lower) score += exactBonus\n addInfo({ field, value, reason })\n } else if (useMultiToken) {\n const hits = tokens.filter((token) => normalized.includes(token)).length\n if (overlapOK(hits)) {\n score += overlapScore * weight * (hits / tokens.length)\n addInfo({ field, value, reason })\n }\n }\n }\n\n for (const trigger of lowerValues(triggers)) {\n if (trigger === lower || trigger === rawLower) {\n addInfo({ field: 'facet', value: trigger, reason: 'trigger phrase' })\n addScore(1.0008)\n return matches\n }\n }\n for (const trigger of triggers) {\n scoreText('facet', trigger, 'trigger phrase', 0.25, 0.06, 4)\n }\n for (const capability of capabilities) scoreText('concept', capability, 'capability overlap', 0.2, 0.1, 2)\n scoreText('title', title, 'title token overlap', 0.3, 0.08, 3, 0.2)\n for (const tag of tags) scoreText('tag', tag, 'tag token overlap', 0.2, 0.05, 2)\n if (summary) scoreText('text', summary, 'body token overlap', 0.15, 0.04, 1)\n for (const source of sourceValues) {\n scoreText('source', source, 'path overlap', 0.1, 0.03, 1)\n }\n if (type.toLowerCase().includes(lower)) {\n score += 0.1\n addInfo({ field: 'facet', value: type, reason: 'type overlap' })\n }\n addScore(Math.min(score, 1.0))\n\n return matches\n}\n\nfunction rankMatches(matches: AiwgIndexQueryMatch[], weights: AiwgIndexQueryWeights): number {\n return matches.reduce((total, match) => total + (match.score ?? 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 ?? recordText(item), 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 discoveryOptions: DiscoveryScoringOptions = {},\n): AiwgRankedEntry[] {\n const weights = { ...DEFAULT_QUERY_WEIGHTS, ...options.weights }\n const profile = options.searchProfile ?? 'default'\n return items.map((item, ordinal) => ({\n item,\n ordinal: ordinalBase + ordinal,\n matches: profile === 'aiwg-discovery' ? discoveryMatches(item, q, discoveryOptions) : queryMatches(item, q),\n }))\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 const entries = createRankedEntries(index.items, q, options)\n if (entries.length === 0 && q && options.searchProfile === 'aiwg-discovery') {\n return createQueryResultFromRankedEntries(createRankedEntries(index.items, q, options, 0, { relaxOverlap: true }), q, options)\n }\n return createQueryResultFromRankedEntries(entries, q, options)\n}\n\nfunction cosineSimilarity(left: number[], right: number[]): number {\n if (left.length !== right.length || left.length === 0) return 0\n let dot = 0\n let leftMag = 0\n let rightMag = 0\n for (let i = 0; i < left.length; i += 1) {\n const l = left[i]\n const r = right[i]\n dot += l * r\n leftMag += l * l\n rightMag += r * r\n }\n if (leftMag === 0 || rightMag === 0) return 0\n return dot / (Math.sqrt(leftMag) * Math.sqrt(rightMag))\n}\n\nexport function validateAiwgStaticEmbeddingSet(value: unknown): AiwgChunkedIndexValidationResult {\n const errors: string[] = []\n const data = isPlainRecord(value) ? value as Partial<AiwgStaticEmbeddingSet> : {}\n if (!isPlainRecord(value)) errors.push('embedding set must be an object')\n if (data?.schema_version !== 'aiwg.fortemi.embedding.set.v1') errors.push('schema_version must be aiwg.fortemi.embedding.set.v1')\n if (!hasString(data?.id)) errors.push('id is required')\n if (!hasString(data?.model)) errors.push('model is required')\n if (!hasPositiveInteger(data?.dimensions)) errors.push('dimensions must be a positive integer')\n if (!hasString(data?.generated_at)) errors.push('generated_at is required')\n if (!hasString(data?.granularity)) errors.push('granularity is required')\n if (!Array.isArray(data?.embeddings)) errors.push('embeddings must be an array')\n const embeddings = Array.isArray(data.embeddings) ? data.embeddings : []\n for (const [index, embedding] of embeddings.entries()) {\n if (!isPlainRecord(embedding)) {\n errors.push('embeddings[' + index + '] must be an object')\n continue\n }\n if (!hasString(embedding.record_id)) errors.push('embeddings[' + index + '].record_id is required')\n if (!hasString(embedding.input_hash)) errors.push('embeddings[' + index + '].input_hash is required')\n if (!Array.isArray(embedding.embedding)) errors.push('embeddings[' + index + '].embedding must be an array')\n else if (hasPositiveInteger(data?.dimensions) && embedding.embedding.length !== data.dimensions) {\n errors.push('embeddings[' + index + '].embedding length must match dimensions')\n } else if (!embedding.embedding.every((number) => typeof number === 'number' && Number.isFinite(number))) {\n errors.push('embeddings[' + index + '].embedding must contain finite numbers')\n }\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport function assertAiwgStaticEmbeddingSet(value: unknown): AiwgStaticEmbeddingSet {\n const result = validateAiwgStaticEmbeddingSet(value)\n if (!result.valid) throw new Error('Invalid AIWG Fortemi embedding set:\\n' + result.errors.join('\\n'))\n return value as AiwgStaticEmbeddingSet\n}\n\nexport function queryAiwgSemanticIndex(\n index: AiwgFortemiIndexExport,\n embeddingSet: AiwgStaticEmbeddingSet,\n queryEmbedding: number[],\n options: AiwgStaticSemanticQueryOptions = {},\n): AiwgStaticSemanticResult[] {\n assertAiwgStaticEmbeddingSet(embeddingSet)\n if (queryEmbedding.length !== embeddingSet.dimensions) throw new Error('query embedding length must match embedding set dimensions')\n const byId = new Map(index.items.map((item) => [item.id, item]))\n const offset = options.offset ?? 0\n const limit = options.limit ?? 20\n return embeddingSet.embeddings\n .map((embedding): AiwgStaticSemanticResult | null => {\n const item = byId.get(embedding.record_id)\n if (!item) return null\n return { item, embedding, score: cosineSimilarity(queryEmbedding, embedding.embedding) }\n })\n .filter((result): result is AiwgStaticSemanticResult => result !== null && result.score >= (options.minScore ?? -1))\n .sort((left, right) => right.score - left.score || left.item.id.localeCompare(right.item.id))\n .slice(offset, offset + limit)\n}\n\nexport function queryAiwgHybridIndex(\n index: AiwgFortemiIndexExport,\n embeddingSet: AiwgStaticEmbeddingSet,\n query: string,\n queryEmbedding: number[],\n options: AiwgStaticHybridQueryOptions = {},\n): AiwgStaticSemanticResult[] {\n const lexicalOptions: AiwgStaticHybridQueryOptions = { ...options }\n delete lexicalOptions.limit\n delete lexicalOptions.offset\n const lexical = queryAiwgFortemiIndex(index, query, { ...lexicalOptions, rank: true })\n const semantic = queryAiwgSemanticIndex(index, embeddingSet, queryEmbedding, { limit: index.items.length })\n const lexicalWeight = options.lexicalWeight ?? 0.5\n const semanticWeight = options.semanticWeight ?? 0.5\n const lexicalScores = new Map(lexical.rankedItems?.map((entry) => [entry.item.id, entry.rank]) ?? [])\n const maxLexical = Math.max(1, ...lexicalScores.values())\n const embeddingById = new Map(semantic.flatMap((entry) => entry.embedding ? [[entry.item.id, entry.embedding] as const] : []))\n const semanticScores = new Map(semantic.map((entry) => [entry.item.id, entry.score]))\n const ids = new Set([...lexicalScores.keys(), ...semanticScores.keys()])\n const offset = options.offset ?? 0\n const limit = options.limit ?? 20\n return [...ids]\n .map((id) => {\n const item = index.items.find((candidate) => candidate.id === id)\n const embedding = embeddingById.get(id)\n if (!item) return null\n return {\n item,\n ...(embedding ? { embedding } : {}),\n score: ((lexicalScores.get(id) ?? 0) / maxLexical) * lexicalWeight + (semanticScores.get(id) ?? 0) * semanticWeight,\n }\n })\n .filter((result): result is AiwgStaticSemanticResult => result !== null && result.score >= (options.minScore ?? -1))\n .sort((left, right) => right.score - left.score || left.item.id.localeCompare(right.item.id))\n .slice(offset, offset + limit)\n}\n\n// Default cap for the pairwise duplicate scan. The scan is O(n²) in the number\n// of embeddings, so an unbounded attacker-supplied set is a CPU DoS (SEC5). At\n// the default of 5000 the worst case is ~12.5M cosine comparisons; callers with\n// a trusted, larger set can raise the cap explicitly.\nexport const DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS = 5000\n\nexport function findAiwgStaticDuplicatePairs(\n index: AiwgFortemiIndexExport,\n embeddingSet: AiwgStaticEmbeddingSet,\n threshold = 0.9,\n options?: { maxEmbeddings?: number },\n): AiwgStaticDuplicatePair[] {\n assertAiwgStaticEmbeddingSet(embeddingSet)\n const maxEmbeddings = options?.maxEmbeddings ?? DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS\n if (embeddingSet.embeddings.length > maxEmbeddings) {\n throw new Error(\n 'Embedding set too large for duplicate scan: ' + embeddingSet.embeddings.length +\n ' > ' + maxEmbeddings + ' (raise options.maxEmbeddings to override for trusted input)',\n )\n }\n const byId = new Map(index.items.map((item) => [item.id, item]))\n const pairs: AiwgStaticDuplicatePair[] = []\n for (let leftIndex = 0; leftIndex < embeddingSet.embeddings.length; leftIndex += 1) {\n for (let rightIndex = leftIndex + 1; rightIndex < embeddingSet.embeddings.length; rightIndex += 1) {\n const leftEmbedding = embeddingSet.embeddings[leftIndex]\n const rightEmbedding = embeddingSet.embeddings[rightIndex]\n const left = byId.get(leftEmbedding.record_id)\n const right = byId.get(rightEmbedding.record_id)\n if (!left || !right) continue\n const score = cosineSimilarity(leftEmbedding.embedding, rightEmbedding.embedding)\n if (score >= threshold) pairs.push({ left, right, score })\n }\n }\n return pairs.sort((left, right) => right.score - left.score || left.left.id.localeCompare(right.left.id))\n}\n\ninterface AiwgChunkedIndexRuntime {\n manifest: AiwgFortemiChunkManifest\n loader: AiwgChunkedIndexLoader\n maxCachedParts: number\n partCache: Map<string, AiwgFortemiChunkPart>\n detailLoader?: AiwgChunkedIndexDetailLoader\n maxCachedDetails: number\n detailCache: Map<string, AiwgFortemiRecord>\n maxCachedMatches: number\n // query+filter+weights key -> the full filtered/ranked entry set for that\n // query (offset/limit/sort/snippets independent). LRU-ordered; bounded by\n // maxCachedMatches (total entries). Lets pagination reuse a single scan.\n matchCache: Map<string, AiwgRankedEntry[]>\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 clampMaxCachedDetails(value: number | undefined): number {\n if (!hasPositiveInteger(value)) return 32\n return value\n}\n\nfunction clampMaxCachedMatches(value: number | undefined): number {\n if (!hasPositiveInteger(value)) return 5000\n return value\n}\n\n// Stable key over the inputs that determine the filtered/ranked entry SET and\n// each entry's rank value — but not offset/limit/sort/snippets, which only shape\n// the page projected from a cached set. Caller-stable option objects (same field\n// order each page) hit the cache; a reordered object simply misses (still correct).\nfunction matchSetCacheKey(q: string, options: AiwgIndexQueryOptions): string {\n return JSON.stringify({\n q,\n types: options.types ?? null,\n facets: options.facets ?? null,\n tags: options.tags ?? null,\n concepts: options.concepts ?? null,\n privacy: options.privacy ?? null,\n rel: options.relationshipTargetId ?? null,\n searchProfile: options.searchProfile ?? 'default',\n weights: { ...DEFAULT_QUERY_WEIGHTS, ...options.weights },\n })\n}\n\nfunction cacheMatchEntries(runtime: AiwgChunkedIndexRuntime, key: string, entries: AiwgRankedEntry[]): void {\n runtime.matchCache.delete(key)\n runtime.matchCache.set(key, entries)\n let total = 0\n for (const set of runtime.matchCache.values()) total += set.length\n // Evict oldest sets until within budget, but always keep the just-inserted set\n // so paging a large result still benefits from the single scan.\n while (total > runtime.maxCachedMatches && runtime.matchCache.size > 1) {\n const oldest = runtime.matchCache.keys().next().value\n if (oldest === undefined || oldest === key) break\n total -= runtime.matchCache.get(oldest)?.length ?? 0\n runtime.matchCache.delete(oldest)\n }\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 getChunkRecord(runtime: AiwgChunkedIndexRuntime, id: string): Promise<AiwgFortemiRecord> {\n const cached = runtime.detailCache.get(id)\n if (cached) {\n runtime.detailCache.delete(id)\n runtime.detailCache.set(id, cached)\n return cached\n }\n // Whole-record parts already in cache: serve without a detail fetch.\n if (!runtime.manifest.projection) {\n for (const part of runtime.partCache.values()) {\n const found = part.items.find((item) => item.id === id)\n if (found) return found\n }\n }\n if (!runtime.detailLoader) {\n throw new Error('No detailLoader configured to resolve record ' + id)\n }\n const raw = await runtime.detailLoader(id, runtime.manifest)\n const record = assertAiwgFortemiIndexExport({\n schema_version: 'aiwg.fortemi.index.export.v1',\n generated_at: runtime.manifest.generated_at,\n source: runtime.manifest.source,\n items: [raw],\n }).items[0]\n if (record.id !== id) {\n throw new Error('Detail record id mismatch: expected ' + id + ', got ' + record.id)\n }\n runtime.detailCache.set(id, record)\n while (runtime.detailCache.size > runtime.maxCachedDetails) {\n const oldest = runtime.detailCache.keys().next().value\n if (oldest === undefined) break\n runtime.detailCache.delete(oldest)\n }\n return record\n}\n\nfunction relationshipTypeFilter(options?: AiwgRelationshipQueryOptions): string | undefined {\n return options?.relationshipType ?? options?.type\n}\n\nfunction edgeFromRelationship(sourceId: string, relationship: AiwgFortemiRelationship): AiwgRelationshipEdgeSummary {\n return {\n source_id: sourceId,\n target_id: relationship.target_id,\n type: relationship.type,\n ...(relationship.source_path ? { source_path: relationship.source_path } : {}),\n ...(relationship.target_path ? { target_path: relationship.target_path } : {}),\n ...(relationship.direction ? { direction: relationship.direction } : {}),\n }\n}\n\nfunction relationshipMatches(edge: AiwgRelationshipEdgeSummary, options: AiwgRelationshipQueryOptions = {}): boolean {\n const type = relationshipTypeFilter(options)\n if (type && edge.type !== type) return false\n if (options.relationshipDirection && edge.direction !== options.relationshipDirection) return false\n if (options.sourceId && edge.source_id !== options.sourceId) return false\n if (options.targetId && edge.target_id !== options.targetId) return false\n if (options.endpointId && edge.source_id !== options.endpointId && edge.target_id !== options.endpointId) return false\n return true\n}\n\nfunction assertRelationshipDirectionAnchor(options: AiwgRelationshipQueryOptions): void {\n if (options.direction === 'out' && !options.sourceId) {\n throw new Error(\"relationship direction 'out' requires sourceId\")\n }\n if (options.direction === 'in' && !options.targetId) {\n throw new Error(\"relationship direction 'in' requires targetId\")\n }\n}\n\nfunction nodeSummary(item: AiwgFortemiProjectedRecord): AiwgRelationshipNodeSummary {\n return { id: item.id, type: item.type, title: recordTitle(item) }\n}\n\nfunction addNode(nodes: Map<string, AiwgRelationshipNodeSummary>, item: AiwgFortemiProjectedRecord | undefined) {\n if (item) nodes.set(item.id, nodeSummary(item))\n}\n\nfunction relationshipResultFromRecords(\n records: AiwgFortemiProjectedRecord[],\n options: AiwgRelationshipQueryOptions = {},\n): AiwgRelationshipTraversalResult {\n assertRelationshipDirectionAnchor(options)\n const byId = new Map(records.map((record) => [record.id, record]))\n const edges: AiwgRelationshipEdgeSummary[] = []\n for (const record of records) {\n for (const relationship of record.relationships ?? []) {\n const edge = edgeFromRelationship(record.id, relationship)\n if (!relationshipMatches(edge, options)) continue\n edges.push(edge)\n }\n }\n const sortedEdges = edges.sort((left, right) => (\n left.source_id.localeCompare(right.source_id)\n || left.target_id.localeCompare(right.target_id)\n || left.type.localeCompare(right.type)\n ))\n const limitedEdges = options.limit ? sortedEdges.slice(0, options.limit) : sortedEdges\n const nodes = new Map<string, AiwgRelationshipNodeSummary>()\n for (const edge of limitedEdges) {\n addNode(nodes, byId.get(edge.source_id))\n addNode(nodes, byId.get(edge.target_id))\n }\n return {\n nodes: [...nodes.values()].sort((left, right) => left.id.localeCompare(right.id)),\n edges: limitedEdges,\n complete: true,\n }\n}\n\nfunction neighborQueryOptions(id: string, options: AiwgRelationshipTraversalOptions = {}): AiwgRelationshipQueryOptions {\n const direction = options.direction ?? 'both'\n return {\n ...options,\n ...(direction === 'out' ? { sourceId: id } : {}),\n ...(direction === 'in' ? { targetId: id } : {}),\n ...(direction === 'both' ? { endpointId: id } : {}),\n }\n}\n\nfunction filterNeighborResult(id: string, result: AiwgRelationshipTraversalResult, options: AiwgRelationshipTraversalOptions = {}): AiwgRelationshipTraversalResult {\n const direction = options.direction ?? 'both'\n const edges = result.edges.filter((edge) => {\n if (direction === 'out') return edge.source_id === id\n if (direction === 'in') return edge.target_id === id\n return edge.source_id === id || edge.target_id === id\n })\n const ids = new Set<string>()\n for (const edge of edges) {\n ids.add(edge.source_id)\n ids.add(edge.target_id)\n }\n return {\n ...result,\n edges,\n nodes: result.nodes.filter((node) => ids.has(node.id)),\n }\n}\n\nasync function recordsFromChunkedRuntime(\n runtime: AiwgChunkedIndexRuntime,\n onProgress?: (progress: AiwgChunkedIndexProgress) => void,\n): Promise<{ records: AiwgFortemiRecord[]; scannedParts: number; fetchedParts: number }> {\n let scannedParts = 0\n let fetchedParts = 0\n const records: AiwgFortemiRecord[] = []\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 onProgress?.({ phase: 'part', done: scannedParts, total: runtime.manifest.parts.length, href: partRef.href })\n for (const item of loaded.part.items) {\n records.push(item.relationships ? item : await getChunkRecord(runtime, item.id))\n }\n }\n return { records, scannedParts, fetchedParts }\n}\n\nasync function relationshipResultFromChunkedRuntime(\n runtime: AiwgChunkedIndexRuntime,\n options: AiwgRelationshipQueryOptions = {},\n): Promise<AiwgRelationshipTraversalResult> {\n const loaded = await recordsFromChunkedRuntime(runtime)\n return {\n ...relationshipResultFromRecords(loaded.records, options),\n scannedParts: loaded.scannedParts,\n fetchedParts: loaded.fetchedParts,\n }\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 // Reuse the filtered/ranked entry set across pages of the same query: the\n // expensive part scan is offset/limit/sort/snippet independent. A hit projects\n // a new page from cached entries without touching parts (scanned/fetched = 0).\n const matchKey = matchSetCacheKey(q, options)\n const cached = runtime.matchCache.get(matchKey)\n if (cached) {\n runtime.matchCache.delete(matchKey)\n runtime.matchCache.set(matchKey, cached)\n return {\n ...createQueryResultFromRankedEntries(cached, q, options),\n manifestTotal: runtime.manifest.total,\n scannedParts: 0,\n fetchedParts: 0,\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 cacheMatchEntries(runtime, matchKey, entries)\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 // Only the export schema_version is needed — so this works in chunked mode\n // (where no whole index is loaded) by passing a minimal source. See #178.\n source: Pick<AiwgFortemiIndexExport, 'schema_version'>,\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 detailLoader: options.detailLoader,\n maxCachedDetails: clampMaxCachedDetails(options.maxCachedDetails),\n detailCache: new Map(),\n maxCachedMatches: clampMaxCachedMatches(options.maxCachedMatches),\n matchCache: 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 async getRecord(id: string): Promise<AiwgFortemiRecord> {\n if (chunked) {\n try {\n return await getChunkRecord(chunked, id)\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n }\n const found = requireIndex().items.find((item) => item.id === id)\n if (!found) throw new Error('Record not found: ' + id)\n return found\n },\n async neighbors(id: string, options?: AiwgRelationshipTraversalOptions): Promise<AiwgRelationshipTraversalResult> {\n try {\n const queryOptions = neighborQueryOptions(id, options)\n const result = chunked\n ? await relationshipResultFromChunkedRuntime(chunked, queryOptions)\n : relationshipResultFromRecords(requireIndex().items, queryOptions)\n return filterNeighborResult(id, result, options)\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n },\n async relationshipQuery(options?: AiwgRelationshipQueryOptions): Promise<AiwgRelationshipTraversalResult> {\n try {\n return chunked\n ? await relationshipResultFromChunkedRuntime(chunked, options)\n : relationshipResultFromRecords(requireIndex().items, options)\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n },\n async relationshipSet(options: AiwgRelationshipSetOptions): Promise<AiwgRelationshipSetResult> {\n const [left, right] = await Promise.all([\n this.neighbors(options.a, options),\n this.neighbors(options.b, options),\n ])\n const leftIds = new Set(left.nodes.map((node) => node.id).filter((id) => id !== options.a))\n const rightIds = new Set(right.nodes.map((node) => node.id).filter((id) => id !== options.b))\n let ids: string[]\n if (options.op === 'intersection') ids = [...leftIds].filter((id) => rightIds.has(id))\n else if (options.op === 'difference') ids = [...leftIds].filter((id) => !rightIds.has(id))\n else ids = [...new Set([...leftIds, ...rightIds])]\n return { op: options.op, ids: ids.sort() }\n },\n clearChunkCache(): void {\n chunked?.partCache.clear()\n chunked?.detailCache.clear()\n chunked?.matchCache.clear()\n error = null\n notify()\n },\n toCommunityGraph(options?: AiwgIndexGraphOptions) {\n return aiwgFortemiIndexToCommunityGraph(requireIndex(), options)\n },\n async toCommunityGraphChunked(options?: AiwgIndexGraphOptions & { onProgress?: (progress: AiwgChunkedIndexProgress) => void }) {\n if (!chunked) return aiwgFortemiIndexToCommunityGraph(requireIndex(), options)\n const loaded = await recordsFromChunkedRuntime(chunked, options?.onProgress)\n return aiwgFortemiIndexToCommunityGraph({\n schema_version: 'aiwg.fortemi.index.export.v1',\n generated_at: chunked.manifest.generated_at,\n source: chunked.manifest.source,\n items: loaded.records,\n }, 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 // The review-decisions export only needs the export schema_version, not the\n // items — so it works in chunked mode by synthesizing a minimal source (#178).\n const source: Pick<AiwgFortemiIndexExport, 'schema_version'> | null =\n index ??\n (chunked\n ? { schema_version: chunked.manifest.source_export_schema_version ?? 'aiwg.fortemi.index.export.v1' }\n : null)\n if (!source) throw new Error('No AIWG index export or chunked manifest loaded')\n return createAiwgReviewDecisionExport(source, 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 ?? Object.create(null)\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 configuredWeight = Object.prototype.hasOwnProperty.call(relationshipWeights, kind)\n ? relationshipWeights[kind]\n : undefined\n const baseWeight = typeof configuredWeight === 'number' && Number.isFinite(configuredWeight)\n ? configuredWeight\n : 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","/**\n * SHA-256 checksum utilities for shard integrity verification.\n * Uses the Web Crypto API (browser-native, no extra dependencies).\n */\n\n/**\n * Compute SHA-256 hex digest of a Uint8Array.\n * Returns lowercase hex string (64 characters).\n */\nexport async function sha256Hex(data: Uint8Array): Promise<string> {\n const buf = new ArrayBuffer(data.byteLength)\n new Uint8Array(buf).set(data)\n const hashBuffer = await crypto.subtle.digest('SHA-256', buf)\n const hashArray = new Uint8Array(hashBuffer)\n return Array.from(hashArray)\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n}\n\n/**\n * Validate checksums listed in a shard manifest against actual file contents.\n *\n * SECURITY (SEC7 — trust model): these checksums live *inside* the same archive\n * as the files they hash, so they detect **transport corruption**, not\n * **tampering**. An attacker who controls the archive controls both the file\n * bytes and the manifest hashes, so a passing result proves the archive is\n * internally consistent — nothing more. For provenance-sensitive imports, verify\n * integrity out-of-band: a signed manifest, or a caller-supplied expected digest\n * checked against the whole archive (see `prefetchShard`'s `expectedSha256`,\n * which is real integrity because the hash arrives on a separate channel).\n *\n * The signed-manifest path is now implemented: `verifyShardSignature`\n * (`shard-signature.ts`, #324/ADR-014) authenticates publisher provenance via\n * an Ed25519 signature over the manifest digest + blob-digest set, and\n * `importShard` runs it BEFORE any record or blob mutation. These in-archive\n * checksums remain the consistency layer *inside* that verified boundary.\n *\n * @returns Object with `valid` flag and list of failed filenames.\n */\nexport async function validateChecksums(\n checksums: Record<string, string>,\n files: Map<string, Uint8Array>,\n): Promise<{ valid: boolean; failures: string[] }> {\n const failures: string[] = []\n\n for (const [filename, expectedHash] of Object.entries(checksums)) {\n const fileData = files.get(filename)\n if (!fileData) {\n failures.push(filename)\n continue\n }\n const actualHash = await sha256Hex(fileData)\n if (actualHash !== expectedHash) {\n failures.push(filename)\n }\n }\n\n return { valid: failures.length === 0, failures }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 note record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"title\",\n \"original_content\",\n \"revised_content\",\n \"metadata\",\n \"format\",\n \"source\",\n \"starred\",\n \"archived\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\",\n \"tags\",\n \"attachments\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"title\": {\n \"type\": [\"string\", \"null\"]\n },\n \"original_content\": {\n \"type\": \"string\"\n },\n \"revised_content\": {\n \"type\": \"string\"\n },\n \"metadata\": true,\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"starred\": {\n \"type\": \"boolean\"\n },\n \"archived\": {\n \"type\": \"boolean\"\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"attachments\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/attachmentProjection\"\n }\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^blake3:[0-9a-f]{64}$\"\n },\n \"attachmentProjection\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"extracted_text\",\n \"extraction_status\",\n \"reason\",\n \"attachment\"\n ],\n \"properties\": {\n \"extracted_text\": {\n \"type\": [\"string\", \"null\"]\n },\n \"extraction_status\": {\n \"enum\": [\"extracted\", \"pending\", \"failed\", \"blocked\", \"deferred\"]\n },\n \"reason\": {\n \"enum\": [\n null,\n \"extraction_pending\",\n \"extractor_failed\",\n \"quarantined\",\n \"large_binary\",\n \"unsupported_mime\",\n \"no_extracted_text\"\n ]\n },\n \"attachment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"mime\", \"checksum\", \"bytes\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"mime\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"checksum\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"bytes\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n }\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 collection record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"name\", \"description\", \"parent_id\", \"created_at\", \"note_count\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"parent_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"note_count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 tag record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"created_at\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/template.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 template record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"content\",\n \"format\",\n \"default_tags\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"default_tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/link.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 link record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"from_note_id\",\n \"to_note_id\",\n \"to_url\",\n \"kind\",\n \"score\",\n \"created_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"from_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_note_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"to_url\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"score\": {\n \"type\": \"number\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"metadata\": true\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"to_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_url\": {\n \"type\": \"null\"\n }\n }\n },\n {\n \"properties\": {\n \"to_note_id\": {\n \"type\": \"null\"\n },\n \"to_url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.1.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.1.0\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"const\": \"1.1.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.1.0/full-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.1.0\"\n },\n \"profile\": {\n \"const\": \"full-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"name\",\n \"version\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 33,\n \"maxItems\": 33,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"communities\",\n \"community_assignments\"\n ]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"$ref\": \"#/$defs/checksums\"\n },\n \"min_reader_version\": {\n \"const\": \"1.1.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"community_sets\",\n \"communities\",\n \"community_assignments\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_originals\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_original_history\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revised_current\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revisions\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_configs\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_set_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embeddings\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_activities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"named_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_devices\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_records\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_schemes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_concepts\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_labels\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_mapping_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_scheme_memberships\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_skos_tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collection_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_sources\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"communities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_assignments\": {\n \"$ref\": \"#/$defs/count\"\n }\n }\n },\n \"checksums\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\",\n \"note_originals.jsonl\",\n \"note_original_history.jsonl\",\n \"note_revised_current.jsonl\",\n \"note_revisions.jsonl\",\n \"embedding_configs.json\",\n \"embedding_sets.json\",\n \"embedding_set_members.jsonl\",\n \"embeddings.jsonl\",\n \"provenance_edges.jsonl\",\n \"provenance_activities.jsonl\",\n \"named_locations.jsonl\",\n \"provenance_locations.jsonl\",\n \"provenance_devices.jsonl\",\n \"provenance_records.jsonl\",\n \"skos_schemes.json\",\n \"skos_concepts.json\",\n \"skos_labels.jsonl\",\n \"skos_notes.jsonl\",\n \"skos_relations.jsonl\",\n \"skos_mapping_relations.jsonl\",\n \"skos_scheme_memberships.jsonl\",\n \"note_skos_tags.jsonl\",\n \"skos_collections.json\",\n \"skos_collection_members.jsonl\",\n \"graph_sources.json\",\n \"graph_edges.jsonl\",\n \"communities.json\",\n \"community_assignments.jsonl\"\n ],\n \"properties\": {\n \"notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"tags.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"templates.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"links.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_originals.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_original_history.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revised_current.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revisions.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_configs.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_sets.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_set_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embeddings.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_activities.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"named_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_devices.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_records.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_schemes.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_concepts.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_labels.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_mapping_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_scheme_memberships.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_skos_tags.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collection_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_sources.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"communities.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"community_assignments.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.1.0/full-v1/embedding.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"embedding_set_id\",\n \"chunk_index\",\n \"text\",\n \"vector\",\n \"model\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"chunk_index\": {\n \"type\": \"integer\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"vector\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": {\n \"type\": \"number\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.2.0\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"const\": \"1.2.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 note record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"title\",\n \"original_content\",\n \"revised_content\",\n \"metadata\",\n \"format\",\n \"source\",\n \"starred\",\n \"archived\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\",\n \"tags\",\n \"attachments\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"title\": {\n \"type\": [\"string\", \"null\"]\n },\n \"original_content\": {\n \"type\": \"string\"\n },\n \"revised_content\": {\n \"type\": \"string\"\n },\n \"metadata\": true,\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"starred\": {\n \"type\": \"boolean\"\n },\n \"archived\": {\n \"type\": \"boolean\"\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"deleted_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"attachments\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/attachmentProjection\"\n }\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^blake3:[0-9a-f]{64}$\"\n },\n \"attachmentProjection\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"extracted_text\",\n \"extraction_status\",\n \"reason\",\n \"attachment\"\n ],\n \"properties\": {\n \"extracted_text\": {\n \"type\": [\"string\", \"null\"]\n },\n \"extraction_status\": {\n \"enum\": [\"extracted\", \"pending\", \"failed\", \"blocked\", \"deferred\"]\n },\n \"reason\": {\n \"enum\": [\n null,\n \"extraction_pending\",\n \"extractor_failed\",\n \"quarantined\",\n \"large_binary\",\n \"unsupported_mime\",\n \"no_extracted_text\"\n ]\n },\n \"attachment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"mime\", \"checksum\", \"bytes\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"mime\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"checksum\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"bytes\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n }\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 collection record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"name\", \"description\", \"parent_id\", \"created_at\", \"note_count\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"parent_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"note_count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 tag record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"created_at\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/template.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 template record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"content\",\n \"format\",\n \"default_tags\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"default_tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/link.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 link record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"from_note_id\",\n \"to_note_id\",\n \"to_url\",\n \"kind\",\n \"score\",\n \"created_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"from_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_note_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"to_url\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"score\": {\n \"type\": \"number\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"metadata\": true\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"to_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_url\": {\n \"type\": \"null\"\n }\n }\n },\n {\n \"properties\": {\n \"to_note_id\": {\n \"type\": \"null\"\n },\n \"to_url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.2.0\"\n },\n \"profile\": {\n \"const\": \"full-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"name\",\n \"version\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 33,\n \"maxItems\": 33,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"communities\",\n \"community_assignments\"\n ]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"$ref\": \"#/$defs/checksums\"\n },\n \"min_reader_version\": {\n \"const\": \"1.2.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"community_sets\",\n \"communities\",\n \"community_assignments\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_originals\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_original_history\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revised_current\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revisions\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_configs\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_set_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embeddings\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_activities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"named_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_devices\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_records\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_schemes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_concepts\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_labels\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_mapping_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_scheme_memberships\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_skos_tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collection_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_sources\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"communities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_assignments\": {\n \"$ref\": \"#/$defs/count\"\n }\n }\n },\n \"checksums\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\",\n \"note_originals.jsonl\",\n \"note_original_history.jsonl\",\n \"note_revised_current.jsonl\",\n \"note_revisions.jsonl\",\n \"embedding_configs.json\",\n \"embedding_sets.json\",\n \"embedding_set_members.jsonl\",\n \"embeddings.jsonl\",\n \"provenance_edges.jsonl\",\n \"provenance_activities.jsonl\",\n \"named_locations.jsonl\",\n \"provenance_locations.jsonl\",\n \"provenance_devices.jsonl\",\n \"provenance_records.jsonl\",\n \"skos_schemes.json\",\n \"skos_concepts.json\",\n \"skos_labels.jsonl\",\n \"skos_notes.jsonl\",\n \"skos_relations.jsonl\",\n \"skos_mapping_relations.jsonl\",\n \"skos_scheme_memberships.jsonl\",\n \"note_skos_tags.jsonl\",\n \"skos_collections.json\",\n \"skos_collection_members.jsonl\",\n \"graph_sources.json\",\n \"graph_edges.jsonl\",\n \"communities.json\",\n \"community_assignments.jsonl\"\n ],\n \"properties\": {\n \"notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"tags.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"templates.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"links.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_originals.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_original_history.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revised_current.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revisions.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_configs.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_sets.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_set_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embeddings.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_activities.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"named_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_devices.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_records.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_schemes.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_concepts.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_labels.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_mapping_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_scheme_memberships.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_skos_tags.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collection_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_sources.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"communities.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"community_assignments.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-original.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"content\",\n \"hash\",\n \"user_created_at\",\n \"user_last_edited_at\",\n \"version_number\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"user_created_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-original-history.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original history record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"version_number\",\n \"content\",\n \"hash\",\n \"created_at_utc\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-revised-current.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate current note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\",\n \"content\",\n \"last_revision_id\",\n \"ai_metadata\"\n ],\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"last_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"ai_metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-revision.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"parent_revision_id\",\n \"revision_number\",\n \"content\",\n \"type\",\n \"summary\",\n \"rationale\",\n \"created_at_utc\",\n \"ai_generated_at\",\n \"user_last_edited_at\",\n \"is_user_edited\",\n \"generation_count\",\n \"model\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"parent_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"revision_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"summary\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"rationale\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ai_generated_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"is_user_edited\": {\n \"type\": \"boolean\"\n },\n \"generation_count\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"model\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding-config.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding config record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"model\",\n \"dimension\",\n \"chunk_size\",\n \"chunk_overlap\",\n \"hnsw_m\",\n \"hnsw_ef_construction\",\n \"ivfflat_lists\",\n \"is_default\",\n \"supports_mrl\",\n \"matryoshka_dims\",\n \"default_truncate_dim\",\n \"provider\",\n \"provider_config\",\n \"content_types\",\n \"strengths\",\n \"limitations\",\n \"recommended_for\",\n \"benchmark_scores\",\n \"is_available\",\n \"document_composition\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"dimension\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_size\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_overlap\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"hnsw_m\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"hnsw_ef_construction\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"ivfflat_lists\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_default\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"supports_mrl\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"matryoshka_dims\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"default_truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"provider\": {\n \"enum\": [\n null,\n \"ollama\",\n \"openai\",\n \"voyage\",\n \"cohere\",\n \"custom\"\n ]\n },\n \"provider_config\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"content_types\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"strengths\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"limitations\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"recommended_for\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"benchmark_scores\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"is_available\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"document_composition\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"description\",\n \"purpose\",\n \"usage_hints\",\n \"keywords\",\n \"set_type\",\n \"mode\",\n \"criteria\",\n \"embedding_config_id\",\n \"truncate_dim\",\n \"auto_embed_rules\",\n \"index_status\",\n \"index_type\",\n \"last_indexed_at\",\n \"document_count\",\n \"embedding_count\",\n \"embeddings_current\",\n \"index_size_bytes\",\n \"is_system\",\n \"is_active\",\n \"auto_refresh\",\n \"refresh_interval\",\n \"last_refresh_at\",\n \"agent_metadata\",\n \"created_at\",\n \"updated_at\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"purpose\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"usage_hints\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"keywords\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"set_type\": {\n \"enum\": [\n \"filter\",\n \"full\"\n ]\n },\n \"mode\": {\n \"enum\": [\n \"auto\",\n \"manual\",\n \"mixed\"\n ]\n },\n \"criteria\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"embedding_config_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"auto_embed_rules\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"index_status\": {\n \"enum\": [\n \"empty\",\n \"pending\",\n \"building\",\n \"ready\",\n \"stale\",\n \"disabled\"\n ]\n },\n \"index_type\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_indexed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"document_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embedding_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embeddings_current\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"index_size_bytes\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_system\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"is_active\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"auto_refresh\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"refresh_interval\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_refresh_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"agent_metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding-set-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set member record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"embedding_set_id\",\n \"note_id\",\n \"membership_type\",\n \"added_at\",\n \"added_by\"\n ],\n \"properties\": {\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"membership_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"added_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"added_by\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"embedding_set_id\",\n \"chunk_index\",\n \"text\",\n \"vector\",\n \"model\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"chunk_index\": {\n \"type\": \"integer\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"vector\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": {\n \"type\": \"number\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"contract_fingerprint\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance edge record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"revision_id\",\n \"source_note_id\",\n \"source_url\",\n \"relation\",\n \"created_at_utc\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_url\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"relation\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-activity.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance activity record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"revision_id\",\n \"activity_type\",\n \"model_name\",\n \"started_at\",\n \"ended_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"model_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"started_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ended_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/named-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate named location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"display_name\",\n \"location_type\",\n \"point_ewkb_hex\",\n \"boundary_ewkb_hex\",\n \"radius_m\",\n \"address_line\",\n \"locality\",\n \"admin_area\",\n \"country\",\n \"country_code\",\n \"postal_code\",\n \"timezone\",\n \"altitude_m\",\n \"owner_id\",\n \"is_private\",\n \"metadata\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"display_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"location_type\": {\n \"enum\": [\n \"home\",\n \"work\",\n \"poi\",\n \"city\",\n \"region\",\n \"country\"\n ]\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"boundary_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"radius_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"address_line\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"locality\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"admin_area\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country_code\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"minLength\": 2,\n \"maxLength\": 2\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"postal_code\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"is_private\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"metadata\": {},\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableEwkb\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/ewkb\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"point_ewkb_hex\",\n \"horizontal_accuracy_m\",\n \"altitude_m\",\n \"vertical_accuracy_m\",\n \"heading_degrees\",\n \"speed_mps\",\n \"named_location_id\",\n \"source\",\n \"confidence\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/ewkb\"\n },\n \"horizontal_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"vertical_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"heading_degrees\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0,\n \"exclusiveMaximum\": 360\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"speed_mps\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"named_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source\": {\n \"enum\": [\n \"gps_exif\",\n \"device_api\",\n \"user_manual\",\n \"geocoded\",\n \"ai_estimated\",\n \"unknown\"\n ]\n },\n \"confidence\": {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-device.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance device record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"device_make\",\n \"device_model\",\n \"device_os\",\n \"device_os_version\",\n \"software\",\n \"software_version\",\n \"has_gps\",\n \"has_accelerometer\",\n \"sensor_metadata\",\n \"owner_id\",\n \"device_name\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"device_make\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"has_gps\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"has_accelerometer\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"sensor_metadata\": {},\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-record.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate unified provenance record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"attachment_id\",\n \"note_id\",\n \"capture_time\",\n \"capture_timezone\",\n \"capture_duration_seconds\",\n \"time_source\",\n \"time_confidence\",\n \"location_id\",\n \"device_id\",\n \"activity_id\",\n \"event_type\",\n \"event_title\",\n \"event_description\",\n \"raw_metadata\",\n \"ai_context\",\n \"ai_processed_at\",\n \"ai_model\",\n \"user_corrected\",\n \"original_capture_time\",\n \"original_location_id\",\n \"correction_note\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"attachment_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"capture_timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"capture_duration_seconds\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"time_source\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"exif\",\n \"file_mtime\",\n \"user_manual\",\n \"ai_estimated\",\n \"gps\",\n \"network\",\n \"manual\",\n \"file_metadata\",\n \"device_clock\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"time_confidence\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\",\n \"exact\",\n \"approximate\",\n \"estimated\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"event_type\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"photo\",\n \"video\",\n \"audio\",\n \"scan\",\n \"screenshot\",\n \"recording\",\n \"unknown\",\n \"created\",\n \"modified\",\n \"accessed\",\n \"shared\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"event_title\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"event_description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"raw_metadata\": {},\n \"ai_context\": {},\n \"ai_processed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"ai_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"user_corrected\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"original_capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"original_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"correction_note\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"anyOf\": [\n {\n \"properties\": {\n \"attachment_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n },\n {\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableTimestampRange\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/timestampRange\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"timestampRange\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"empty\",\n \"lower\",\n \"lower_inclusive\",\n \"lower_infinite\",\n \"upper\",\n \"upper_inclusive\",\n \"upper_infinite\"\n ],\n \"properties\": {\n \"empty\": {\n \"type\": \"boolean\"\n },\n \"lower\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"lower_inclusive\": {\n \"type\": \"boolean\"\n },\n \"lower_infinite\": {\n \"type\": \"boolean\"\n },\n \"upper\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"upper_inclusive\": {\n \"type\": \"boolean\"\n },\n \"upper_infinite\": {\n \"type\": \"boolean\"\n }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": {\n \"empty\": {\n \"const\": true\n }\n }\n },\n \"then\": {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": false\n },\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n \"else\": {\n \"allOf\": [\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"lower\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"lower_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n },\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"upper\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n }\n ]\n }\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-scheme.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept scheme\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"notation\", \"title\", \"description\", \"creator\", \"publisher\",\n \"rights\", \"version\", \"is_active\", \"is_system\", \"created_at\", \"updated_at\",\n \"issued_at\", \"modified_at\", \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": \"string\", \"minLength\": 1 },\n \"title\": { \"type\": \"string\", \"minLength\": 1 },\n \"description\": { \"type\": [\"string\", \"null\"] },\n \"creator\": { \"type\": [\"string\", \"null\"] },\n \"publisher\": { \"type\": [\"string\", \"null\"] },\n \"rights\": { \"type\": [\"string\", \"null\"] },\n \"version\": { \"type\": [\"string\", \"null\"] },\n \"is_active\": { \"type\": \"boolean\" },\n \"is_system\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"issued_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"modified_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-concept.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"primary_scheme_id\", \"uri\", \"notation\", \"facet_type\", \"facet_source\",\n \"facet_domain\", \"facet_scope\", \"status\", \"promoted_at\", \"deprecated_at\",\n \"deprecation_reason\", \"replaced_by_id\", \"note_count\", \"first_used_at\",\n \"last_used_at\", \"depth\", \"broader_count\", \"narrower_count\", \"related_count\",\n \"antipatterns\", \"antipattern_checked_at\", \"created_at\", \"updated_at\",\n \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"primary_scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"facet_type\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"personality\", \"matter\", \"energy\", \"space\", \"time\", null]\n },\n \"facet_source\": { \"type\": [\"string\", \"null\"] },\n \"facet_domain\": { \"type\": [\"string\", \"null\"] },\n \"facet_scope\": { \"type\": [\"string\", \"null\"] },\n \"status\": { \"enum\": [\"candidate\", \"approved\", \"deprecated\", \"obsolete\"] },\n \"promoted_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecation_reason\": { \"type\": [\"string\", \"null\"] },\n \"replaced_by_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"note_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"first_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"last_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"depth\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 5 },\n \"broader_count\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 3 },\n \"narrower_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"related_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"antipatterns\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"orphan\", \"over_tagged\", \"under_used\", \"too_broad\", \"too_deep\",\n \"polyhierarchy_excess\", \"missing_labels\", \"circular_hierarchy\"\n ]\n }\n },\n \"antipattern_checked_at\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-label.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS label\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"concept_id\", \"label_type\", \"value\", \"language\", \"created_at\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"label_type\": { \"enum\": [\"pref_label\", \"alt_label\", \"hidden_label\"] },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS note\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"note_type\", \"value\", \"language\", \"author\", \"source\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"note_type\": {\n \"enum\": [\n \"definition\", \"scope_note\", \"example\", \"history_note\",\n \"editorial_note\", \"change_note\", \"note\"\n ]\n },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"author\": { \"type\": [\"string\", \"null\"] },\n \"source\": { \"type\": [\"string\", \"null\"] },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS semantic relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"subject_id\", \"object_id\", \"relation_type\", \"inference_score\",\n \"is_inferred\", \"is_validated\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"subject_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"object_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"relation_type\": { \"enum\": [\"broader\", \"narrower\", \"related\"] },\n \"inference_score\": { \"type\": [\"number\", \"null\"] },\n \"is_inferred\": { \"type\": \"boolean\" },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-mapping-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS mapping relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"target_uri\", \"target_scheme_uri\", \"target_label\",\n \"relation_type\", \"confidence\", \"is_validated\", \"created_at\", \"validated_at\",\n \"validated_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"target_uri\": { \"type\": \"string\", \"format\": \"uri\" },\n \"target_scheme_uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"target_label\": { \"type\": [\"string\", \"null\"] },\n \"relation_type\": {\n \"enum\": [\n \"exact_match\", \"close_match\", \"broad_match\", \"narrow_match\", \"related_match\"\n ]\n },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"validated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"validated_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-scheme-membership.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS scheme membership\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"concept_id\", \"scheme_id\", \"is_top_concept\", \"added_at\"],\n \"properties\": {\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"is_top_concept\": { \"type\": \"boolean\" },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-skos-tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 note SKOS tag\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\", \"concept_id\", \"source\", \"confidence\", \"relevance_score\",\n \"is_primary\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"source\": { \"type\": \"string\", \"minLength\": 1 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"relevance_score\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_primary\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"pref_label\", \"definition\", \"is_ordered\", \"scheme_id\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"pref_label\": { \"type\": \"string\", \"minLength\": 1 },\n \"definition\": { \"type\": [\"string\", \"null\"] },\n \"is_ordered\": { \"type\": \"boolean\" },\n \"scheme_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-collection-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection member\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"collection_id\", \"concept_id\", \"position\", \"added_at\"],\n \"properties\": {\n \"collection_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"position\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/graph-source.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph source\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"kind\",\n \"source_table\",\n \"embedding_set_id\",\n \"virtual_set_id\",\n \"model\",\n \"dimension\",\n \"truncate_dimension\",\n \"metric\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"kind\": {\n \"enum\": [\"link\", \"similarity\", \"search\", \"manual\", \"imported\"]\n },\n \"source_table\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"link\", \"embedding\", \"manual\", null]\n },\n \"embedding_set_id\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uuid\"\n },\n \"virtual_set_id\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"truncate_dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"metric\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"cosine\", \"inner_product\", \"l2\", null]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/graph-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph edge\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"graph_source_id\",\n \"from_note_id\",\n \"to_note_id\",\n \"weight\",\n \"kind\",\n \"rank\",\n \"metadata\"\n ],\n \"properties\": {\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"from_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"to_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"weight\": { \"type\": \"number\" },\n \"kind\": { \"enum\": [\"link\", \"similarity\", \"manual\"] },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/community-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community set\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"graph_source_id\",\n \"name\",\n \"source_type\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"communities\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"communities\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/community\" }\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"$defs\": {\n \"community\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"label\",\n \"rank\",\n \"size\",\n \"confidence\",\n \"representative_note_ids\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"label\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"size\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"representative_note_ids\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"format\": \"uuid\" }\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/community-assignment.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community assignment\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"community_set_id\",\n \"community_id\",\n \"note_id\",\n \"confidence\",\n \"source_type\",\n \"metadata\"\n ],\n \"properties\": {\n \"community_set_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"community_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/signature.schema.json\",\n \"title\": \"Fortemi Knowledge Shard signature envelope\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"format_version\",\n \"signer\",\n \"manifest_digest\",\n \"blob_digests\",\n \"signature\"\n ],\n \"properties\": {\n \"format_version\": {\n \"const\": \"1\"\n },\n \"signer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"key_id\",\n \"algorithm\",\n \"public_key\"\n ],\n \"properties\": {\n \"key_id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 256\n },\n \"algorithm\": {\n \"const\": \"ed25519\"\n },\n \"public_key\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{43}$\"\n }\n }\n },\n \"manifest_digest\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"blob_digests\": {\n \"type\": \"array\",\n \"maxItems\": 64,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n },\n \"signature\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{86}$\"\n }\n },\n \"$defs\": {\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"2.0.0\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"const\": \"2.0.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 note record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"title\",\n \"original_content\",\n \"revised_content\",\n \"metadata\",\n \"format\",\n \"source\",\n \"starred\",\n \"archived\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\",\n \"tags\",\n \"attachments\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"title\": {\n \"type\": [\"string\", \"null\"]\n },\n \"original_content\": {\n \"type\": \"string\"\n },\n \"revised_content\": {\n \"type\": \"string\"\n },\n \"metadata\": true,\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"starred\": {\n \"type\": \"boolean\"\n },\n \"archived\": {\n \"type\": \"boolean\"\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"deleted_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"attachments\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/attachmentProjection\"\n }\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"format\": \"date-time\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^blake3:[0-9a-f]{64}$\"\n },\n \"attachmentProjection\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"extracted_text\",\n \"extraction_status\",\n \"reason\",\n \"attachment\"\n ],\n \"properties\": {\n \"extracted_text\": {\n \"type\": [\"string\", \"null\"]\n },\n \"extraction_status\": {\n \"enum\": [\"extracted\", \"pending\", \"failed\", \"blocked\", \"deferred\"]\n },\n \"reason\": {\n \"enum\": [\n null,\n \"extraction_pending\",\n \"extractor_failed\",\n \"quarantined\",\n \"large_binary\",\n \"unsupported_mime\",\n \"no_extracted_text\"\n ]\n },\n \"attachment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"mime\", \"checksum\", \"bytes\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"mime\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"checksum\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"bytes\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n }\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 collection record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"name\", \"description\", \"parent_id\", \"created_at\", \"note_count\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"parent_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"note_count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 tag record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"created_at\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/template.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 template record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"content\",\n \"format\",\n \"default_tags\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"default_tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/link.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 link record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"from_note_id\",\n \"to_note_id\",\n \"to_url\",\n \"kind\",\n \"score\",\n \"created_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"from_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_note_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"to_url\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"score\": {\n \"type\": \"number\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"metadata\": true\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"to_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_url\": {\n \"type\": \"null\"\n }\n }\n },\n {\n \"properties\": {\n \"to_note_id\": {\n \"type\": \"null\"\n },\n \"to_url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"2.0.0\"\n },\n \"profile\": {\n \"const\": \"full-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"name\",\n \"version\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 33,\n \"maxItems\": 33,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"communities\",\n \"community_assignments\"\n ]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"$ref\": \"#/$defs/checksums\"\n },\n \"min_reader_version\": {\n \"const\": \"2.0.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"community_sets\",\n \"communities\",\n \"community_assignments\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_originals\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_original_history\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revised_current\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revisions\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_configs\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_set_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embeddings\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_activities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"named_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_devices\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_records\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_schemes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_concepts\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_labels\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_mapping_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_scheme_memberships\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_skos_tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collection_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_sources\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"communities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_assignments\": {\n \"$ref\": \"#/$defs/count\"\n }\n }\n },\n \"checksums\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\",\n \"note_originals.jsonl\",\n \"note_original_history.jsonl\",\n \"note_revised_current.jsonl\",\n \"note_revisions.jsonl\",\n \"embedding_configs.json\",\n \"embedding_sets.json\",\n \"embedding_set_members.jsonl\",\n \"embeddings.jsonl\",\n \"provenance_edges.jsonl\",\n \"provenance_activities.jsonl\",\n \"named_locations.jsonl\",\n \"provenance_locations.jsonl\",\n \"provenance_devices.jsonl\",\n \"provenance_records.jsonl\",\n \"skos_schemes.json\",\n \"skos_concepts.json\",\n \"skos_labels.jsonl\",\n \"skos_notes.jsonl\",\n \"skos_relations.jsonl\",\n \"skos_mapping_relations.jsonl\",\n \"skos_scheme_memberships.jsonl\",\n \"note_skos_tags.jsonl\",\n \"skos_collections.json\",\n \"skos_collection_members.jsonl\",\n \"graph_sources.json\",\n \"graph_edges.jsonl\",\n \"communities.json\",\n \"community_assignments.jsonl\"\n ],\n \"properties\": {\n \"notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"tags.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"templates.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"links.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_originals.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_original_history.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revised_current.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revisions.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_configs.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_sets.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_set_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embeddings.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_activities.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"named_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_devices.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_records.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_schemes.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_concepts.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_labels.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_mapping_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_scheme_memberships.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_skos_tags.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collection_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_sources.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"communities.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"community_assignments.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-original.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"content\",\n \"hash\",\n \"user_created_at\",\n \"user_last_edited_at\",\n \"version_number\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"user_created_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-original-history.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original history record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"version_number\",\n \"content\",\n \"hash\",\n \"created_at_utc\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-revised-current.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate current note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\",\n \"content\",\n \"last_revision_id\",\n \"ai_metadata\"\n ],\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"last_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"ai_metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-revision.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"parent_revision_id\",\n \"revision_number\",\n \"content\",\n \"type\",\n \"summary\",\n \"rationale\",\n \"created_at_utc\",\n \"ai_generated_at\",\n \"user_last_edited_at\",\n \"is_user_edited\",\n \"generation_count\",\n \"model\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"parent_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"revision_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"summary\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"rationale\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ai_generated_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"is_user_edited\": {\n \"type\": \"boolean\"\n },\n \"generation_count\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"model\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding-config.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding config record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"model\",\n \"dimension\",\n \"chunk_size\",\n \"chunk_overlap\",\n \"hnsw_m\",\n \"hnsw_ef_construction\",\n \"ivfflat_lists\",\n \"is_default\",\n \"supports_mrl\",\n \"matryoshka_dims\",\n \"default_truncate_dim\",\n \"provider\",\n \"provider_config\",\n \"content_types\",\n \"strengths\",\n \"limitations\",\n \"recommended_for\",\n \"benchmark_scores\",\n \"is_available\",\n \"document_composition\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"dimension\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_size\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_overlap\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"hnsw_m\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"hnsw_ef_construction\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"ivfflat_lists\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_default\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"supports_mrl\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"matryoshka_dims\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"default_truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"provider\": {\n \"enum\": [\n null,\n \"ollama\",\n \"openai\",\n \"voyage\",\n \"cohere\",\n \"custom\"\n ]\n },\n \"provider_config\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"content_types\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"strengths\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"limitations\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"recommended_for\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"benchmark_scores\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"is_available\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"document_composition\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"description\",\n \"purpose\",\n \"usage_hints\",\n \"keywords\",\n \"set_type\",\n \"mode\",\n \"criteria\",\n \"embedding_config_id\",\n \"truncate_dim\",\n \"auto_embed_rules\",\n \"index_status\",\n \"index_type\",\n \"last_indexed_at\",\n \"document_count\",\n \"embedding_count\",\n \"embeddings_current\",\n \"index_size_bytes\",\n \"is_system\",\n \"is_active\",\n \"auto_refresh\",\n \"refresh_interval\",\n \"last_refresh_at\",\n \"agent_metadata\",\n \"created_at\",\n \"updated_at\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"purpose\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"usage_hints\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"keywords\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"set_type\": {\n \"enum\": [\n \"filter\",\n \"full\"\n ]\n },\n \"mode\": {\n \"enum\": [\n \"auto\",\n \"manual\",\n \"mixed\"\n ]\n },\n \"criteria\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"embedding_config_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"auto_embed_rules\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"index_status\": {\n \"enum\": [\n \"empty\",\n \"pending\",\n \"building\",\n \"ready\",\n \"stale\",\n \"disabled\"\n ]\n },\n \"index_type\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_indexed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"document_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embedding_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embeddings_current\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"index_size_bytes\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_system\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"is_active\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"auto_refresh\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"refresh_interval\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_refresh_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"agent_metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding-set-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set member record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"embedding_set_id\",\n \"note_id\",\n \"membership_type\",\n \"added_at\",\n \"added_by\"\n ],\n \"properties\": {\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"membership_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"added_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"added_by\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"embedding_set_id\",\n \"chunk_index\",\n \"text\",\n \"vector\",\n \"model\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"chunk_index\": {\n \"type\": \"integer\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"vector\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": {\n \"type\": \"number\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"contract_fingerprint\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance edge record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"revision_id\",\n \"source_note_id\",\n \"source_url\",\n \"relation\",\n \"created_at_utc\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_url\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"relation\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-activity.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance activity record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"revision_id\",\n \"activity_type\",\n \"model_name\",\n \"started_at\",\n \"ended_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"model_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"started_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ended_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/named-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate named location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"display_name\",\n \"location_type\",\n \"point_ewkb_hex\",\n \"boundary_ewkb_hex\",\n \"radius_m\",\n \"address_line\",\n \"locality\",\n \"admin_area\",\n \"country\",\n \"country_code\",\n \"postal_code\",\n \"timezone\",\n \"altitude_m\",\n \"owner_id\",\n \"is_private\",\n \"metadata\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"display_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"location_type\": {\n \"enum\": [\n \"home\",\n \"work\",\n \"poi\",\n \"city\",\n \"region\",\n \"country\"\n ]\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"boundary_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"radius_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"address_line\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"locality\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"admin_area\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country_code\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"minLength\": 2,\n \"maxLength\": 2\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"postal_code\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"is_private\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"metadata\": {},\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableEwkb\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/ewkb\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"point_ewkb_hex\",\n \"horizontal_accuracy_m\",\n \"altitude_m\",\n \"vertical_accuracy_m\",\n \"heading_degrees\",\n \"speed_mps\",\n \"named_location_id\",\n \"source\",\n \"confidence\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/ewkb\"\n },\n \"horizontal_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"vertical_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"heading_degrees\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0,\n \"exclusiveMaximum\": 360\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"speed_mps\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"named_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source\": {\n \"enum\": [\n \"gps_exif\",\n \"device_api\",\n \"user_manual\",\n \"geocoded\",\n \"ai_estimated\",\n \"unknown\"\n ]\n },\n \"confidence\": {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-device.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance device record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"device_make\",\n \"device_model\",\n \"device_os\",\n \"device_os_version\",\n \"software\",\n \"software_version\",\n \"has_gps\",\n \"has_accelerometer\",\n \"sensor_metadata\",\n \"owner_id\",\n \"device_name\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"device_make\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"has_gps\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"has_accelerometer\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"sensor_metadata\": {},\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-record.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate unified provenance record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"attachment_id\",\n \"note_id\",\n \"capture_time\",\n \"capture_timezone\",\n \"capture_duration_seconds\",\n \"time_source\",\n \"time_confidence\",\n \"location_id\",\n \"device_id\",\n \"activity_id\",\n \"event_type\",\n \"event_title\",\n \"event_description\",\n \"raw_metadata\",\n \"ai_context\",\n \"ai_processed_at\",\n \"ai_model\",\n \"user_corrected\",\n \"original_capture_time\",\n \"original_location_id\",\n \"correction_note\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"attachment_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"capture_timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"capture_duration_seconds\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"time_source\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"exif\",\n \"file_mtime\",\n \"user_manual\",\n \"ai_estimated\",\n \"gps\",\n \"network\",\n \"manual\",\n \"file_metadata\",\n \"device_clock\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"time_confidence\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\",\n \"exact\",\n \"approximate\",\n \"estimated\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"event_type\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"photo\",\n \"video\",\n \"audio\",\n \"scan\",\n \"screenshot\",\n \"recording\",\n \"unknown\",\n \"created\",\n \"modified\",\n \"accessed\",\n \"shared\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"event_title\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"event_description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"raw_metadata\": {},\n \"ai_context\": {},\n \"ai_processed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"ai_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"user_corrected\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"original_capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"original_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"correction_note\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"anyOf\": [\n {\n \"properties\": {\n \"attachment_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n },\n {\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableTimestampRange\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/timestampRange\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"timestampRange\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"empty\",\n \"lower\",\n \"lower_inclusive\",\n \"lower_infinite\",\n \"upper\",\n \"upper_inclusive\",\n \"upper_infinite\"\n ],\n \"properties\": {\n \"empty\": {\n \"type\": \"boolean\"\n },\n \"lower\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"lower_inclusive\": {\n \"type\": \"boolean\"\n },\n \"lower_infinite\": {\n \"type\": \"boolean\"\n },\n \"upper\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"upper_inclusive\": {\n \"type\": \"boolean\"\n },\n \"upper_infinite\": {\n \"type\": \"boolean\"\n }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": {\n \"empty\": {\n \"const\": true\n }\n }\n },\n \"then\": {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": false\n },\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n \"else\": {\n \"allOf\": [\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"lower\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"lower_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n },\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"upper\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n }\n ]\n }\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-scheme.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept scheme\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"notation\", \"title\", \"description\", \"creator\", \"publisher\",\n \"rights\", \"version\", \"is_active\", \"is_system\", \"created_at\", \"updated_at\",\n \"issued_at\", \"modified_at\", \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": \"string\", \"minLength\": 1 },\n \"title\": { \"type\": \"string\", \"minLength\": 1 },\n \"description\": { \"type\": [\"string\", \"null\"] },\n \"creator\": { \"type\": [\"string\", \"null\"] },\n \"publisher\": { \"type\": [\"string\", \"null\"] },\n \"rights\": { \"type\": [\"string\", \"null\"] },\n \"version\": { \"type\": [\"string\", \"null\"] },\n \"is_active\": { \"type\": \"boolean\" },\n \"is_system\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"issued_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"modified_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-concept.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"primary_scheme_id\", \"uri\", \"notation\", \"facet_type\", \"facet_source\",\n \"facet_domain\", \"facet_scope\", \"status\", \"promoted_at\", \"deprecated_at\",\n \"deprecation_reason\", \"replaced_by_id\", \"note_count\", \"first_used_at\",\n \"last_used_at\", \"depth\", \"broader_count\", \"narrower_count\", \"related_count\",\n \"antipatterns\", \"antipattern_checked_at\", \"created_at\", \"updated_at\",\n \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"primary_scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"facet_type\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"personality\", \"matter\", \"energy\", \"space\", \"time\", null]\n },\n \"facet_source\": { \"type\": [\"string\", \"null\"] },\n \"facet_domain\": { \"type\": [\"string\", \"null\"] },\n \"facet_scope\": { \"type\": [\"string\", \"null\"] },\n \"status\": { \"enum\": [\"candidate\", \"approved\", \"deprecated\", \"obsolete\"] },\n \"promoted_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecation_reason\": { \"type\": [\"string\", \"null\"] },\n \"replaced_by_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"note_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"first_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"last_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"depth\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 5 },\n \"broader_count\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 3 },\n \"narrower_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"related_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"antipatterns\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"orphan\", \"over_tagged\", \"under_used\", \"too_broad\", \"too_deep\",\n \"polyhierarchy_excess\", \"missing_labels\", \"circular_hierarchy\"\n ]\n }\n },\n \"antipattern_checked_at\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-label.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS label\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"concept_id\", \"label_type\", \"value\", \"language\", \"created_at\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"label_type\": { \"enum\": [\"pref_label\", \"alt_label\", \"hidden_label\"] },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS note\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"note_type\", \"value\", \"language\", \"author\", \"source\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"note_type\": {\n \"enum\": [\n \"definition\", \"scope_note\", \"example\", \"history_note\",\n \"editorial_note\", \"change_note\", \"note\"\n ]\n },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"author\": { \"type\": [\"string\", \"null\"] },\n \"source\": { \"type\": [\"string\", \"null\"] },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS semantic relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"subject_id\", \"object_id\", \"relation_type\", \"inference_score\",\n \"is_inferred\", \"is_validated\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"subject_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"object_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"relation_type\": { \"enum\": [\"broader\", \"narrower\", \"related\"] },\n \"inference_score\": { \"type\": [\"number\", \"null\"] },\n \"is_inferred\": { \"type\": \"boolean\" },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-mapping-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS mapping relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"target_uri\", \"target_scheme_uri\", \"target_label\",\n \"relation_type\", \"confidence\", \"is_validated\", \"created_at\", \"validated_at\",\n \"validated_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"target_uri\": { \"type\": \"string\", \"format\": \"uri\" },\n \"target_scheme_uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"target_label\": { \"type\": [\"string\", \"null\"] },\n \"relation_type\": {\n \"enum\": [\n \"exact_match\", \"close_match\", \"broad_match\", \"narrow_match\", \"related_match\"\n ]\n },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"validated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"validated_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-scheme-membership.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS scheme membership\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"concept_id\", \"scheme_id\", \"is_top_concept\", \"added_at\"],\n \"properties\": {\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"is_top_concept\": { \"type\": \"boolean\" },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-skos-tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 note SKOS tag\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\", \"concept_id\", \"source\", \"confidence\", \"relevance_score\",\n \"is_primary\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"source\": { \"type\": \"string\", \"minLength\": 1 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"relevance_score\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_primary\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"pref_label\", \"definition\", \"is_ordered\", \"scheme_id\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"pref_label\": { \"type\": \"string\", \"minLength\": 1 },\n \"definition\": { \"type\": [\"string\", \"null\"] },\n \"is_ordered\": { \"type\": \"boolean\" },\n \"scheme_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-collection-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection member\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"collection_id\", \"concept_id\", \"position\", \"added_at\"],\n \"properties\": {\n \"collection_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"position\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/graph-source.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph source\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"kind\",\n \"source_table\",\n \"embedding_set_id\",\n \"virtual_set_id\",\n \"model\",\n \"dimension\",\n \"truncate_dimension\",\n \"metric\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"kind\": {\n \"enum\": [\"link\", \"similarity\", \"search\", \"manual\", \"imported\"]\n },\n \"source_table\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"link\", \"embedding\", \"manual\", null]\n },\n \"embedding_set_id\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uuid\"\n },\n \"virtual_set_id\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"truncate_dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"metric\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"cosine\", \"inner_product\", \"l2\", null]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/graph-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph edge\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"graph_source_id\",\n \"from_note_id\",\n \"to_note_id\",\n \"weight\",\n \"kind\",\n \"rank\",\n \"metadata\"\n ],\n \"properties\": {\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"from_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"to_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"weight\": { \"type\": \"number\" },\n \"kind\": { \"enum\": [\"link\", \"similarity\", \"manual\"] },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/community-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community set\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"graph_source_id\",\n \"name\",\n \"source_type\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"communities\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"communities\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/community\" }\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"$defs\": {\n \"community\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"label\",\n \"rank\",\n \"size\",\n \"confidence\",\n \"representative_note_ids\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"label\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"size\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"representative_note_ids\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"format\": \"uuid\" }\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/community-assignment.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community assignment\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"community_set_id\",\n \"community_id\",\n \"note_id\",\n \"confidence\",\n \"source_type\",\n \"metadata\"\n ],\n \"properties\": {\n \"community_set_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"community_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/signature.schema.json\",\n \"title\": \"Fortemi Knowledge Shard signature envelope\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"format_version\",\n \"signer\",\n \"manifest_digest\",\n \"blob_digests\",\n \"signature\"\n ],\n \"properties\": {\n \"format_version\": {\n \"const\": \"1\"\n },\n \"signer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"key_id\",\n \"algorithm\",\n \"public_key\"\n ],\n \"properties\": {\n \"key_id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 256\n },\n \"algorithm\": {\n \"const\": \"ed25519\"\n },\n \"public_key\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{43}$\"\n }\n }\n },\n \"manifest_digest\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"blob_digests\": {\n \"type\": \"array\",\n \"maxItems\": 64,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n },\n \"signature\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{86}$\"\n }\n },\n \"$defs\": {\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n }\n}\n","/**\n * Minimal tar + gzip packing/unpacking for shard archives.\n *\n * Uses fflate for gzip compression and implements a lightweight POSIX tar\n * encoder/decoder (512-byte block headers, ustar format).\n */\n\nimport { gzipSync, gunzipSync } from 'fflate'\n\n// ── Tar constants ────────────────────────────────────────────────────────\n\nconst BLOCK_SIZE = 512\nconst USTAR_MAGIC = 'ustar\\x0000'\n\n// ── Tar encoder ──────────────────────────────────────────────────────────\n\nfunction writeString(buf: Uint8Array, offset: number, str: string, len: number) {\n for (let i = 0; i < Math.min(str.length, len); i++) {\n buf[offset + i] = str.charCodeAt(i)\n }\n}\n\nfunction writeOctal(buf: Uint8Array, offset: number, value: number, len: number) {\n const str = value.toString(8).padStart(len - 1, '0')\n writeString(buf, offset, str, len - 1)\n}\n\nfunction computeHeaderChecksum(header: Uint8Array): number {\n // For checksum computation, treat the checksum field (offset 148, 8 bytes) as spaces\n let sum = 0\n for (let i = 0; i < BLOCK_SIZE; i++) {\n sum += i >= 148 && i < 156 ? 32 : header[i]\n }\n return sum\n}\n\nfunction createTarHeader(filename: string, size: number): Uint8Array {\n const header = new Uint8Array(BLOCK_SIZE)\n\n // name (0, 100)\n writeString(header, 0, filename, 100)\n // mode (100, 8) — 0644\n writeOctal(header, 100, 0o644, 8)\n // uid (108, 8)\n writeOctal(header, 108, 0, 8)\n // gid (116, 8)\n writeOctal(header, 116, 0, 8)\n // size (124, 12)\n writeOctal(header, 124, size, 12)\n // mtime (136, 12) -- canonical zero keeps identical shard inputs byte-stable.\n writeOctal(header, 136, 0, 12)\n // typeflag (156) — '0' for regular file\n header[156] = 48 // ASCII '0'\n // magic (257, 8) — ustar\\000\n writeString(header, 257, USTAR_MAGIC, 8)\n\n // compute and write checksum (148, 8)\n const checksum = computeHeaderChecksum(header)\n const csStr = checksum.toString(8).padStart(6, '0')\n writeString(header, 148, csStr, 6)\n header[154] = 0 // null terminator\n header[155] = 32 // space\n\n return header\n}\n\nfunction encodeTar(files: Map<string, Uint8Array>): Uint8Array {\n const blocks: Uint8Array[] = []\n\n for (const [filename, data] of files) {\n blocks.push(createTarHeader(filename, data.byteLength))\n blocks.push(data)\n\n // Pad to 512-byte boundary\n const remainder = data.byteLength % BLOCK_SIZE\n if (remainder > 0) {\n blocks.push(new Uint8Array(BLOCK_SIZE - remainder))\n }\n }\n\n // Two zero blocks mark end of archive\n blocks.push(new Uint8Array(BLOCK_SIZE * 2))\n\n // Concatenate\n let totalLen = 0\n for (const b of blocks) totalLen += b.byteLength\n const result = new Uint8Array(totalLen)\n let offset = 0\n for (const b of blocks) {\n result.set(b, offset)\n offset += b.byteLength\n }\n return result\n}\n\n// ── Tar decoder ──────────────────────────────────────────────────────────\n\nfunction readString(buf: Uint8Array, offset: number, len: number): string {\n let end = offset\n const limit = offset + len\n while (end < limit && buf[end] !== 0) end++\n return String.fromCharCode(...buf.slice(offset, end))\n}\n\nfunction readOctal(buf: Uint8Array, offset: number, len: number): number {\n const str = readString(buf, offset, len).trim()\n return str.length > 0 ? parseInt(str, 8) : 0\n}\n\nfunction isZeroBlock(buf: Uint8Array, offset: number): boolean {\n for (let i = 0; i < BLOCK_SIZE; i++) {\n if (buf[offset + i] !== 0) return false\n }\n return true\n}\n\nfunction decodeTar(tarData: Uint8Array): Map<string, Uint8Array> {\n const files = new Map<string, Uint8Array>()\n let offset = 0\n\n while (offset + BLOCK_SIZE <= tarData.byteLength) {\n // Check for end-of-archive (two zero blocks)\n if (isZeroBlock(tarData, offset)) break\n\n const name = readString(tarData, offset, 100)\n const size = readOctal(tarData, offset + 124, 12)\n const typeflag = tarData[offset + 156]\n\n offset += BLOCK_SIZE // skip header\n\n // Only extract regular files (typeflag '0' or NUL)\n if (typeflag === 48 || typeflag === 0) {\n files.set(name, tarData.slice(offset, offset + size))\n }\n\n // Advance past data blocks (padded to 512-byte boundary)\n const dataBlocks = Math.ceil(size / BLOCK_SIZE)\n offset += dataBlocks * BLOCK_SIZE\n }\n\n return files\n}\n\n// ── Public API ───────────────────────────────────────────────────────────\n\n/**\n * Pack files into a gzip-compressed tar archive.\n *\n * @param files Map of filename → file contents\n * @returns Compressed archive bytes (suitable for .shard file)\n */\nexport function packTarGz(\n files: Map<string, Uint8Array>,\n opts?: { maxDecompressedBytes?: number },\n): Uint8Array {\n const tarData = encodeTar(files)\n const cap = opts?.maxDecompressedBytes ?? DEFAULT_MAX_DECOMPRESSED_BYTES\n if (tarData.byteLength > cap) {\n throw new Error(\n 'Refusing to create archive: uncompressed size ' + tarData.byteLength +\n ' exceeds cap ' + cap + ' bytes',\n )\n }\n return gzipSync(tarData, { mtime: 0 })\n}\n\n/**\n * Default cap on decompressed archive size (256 MiB). A gzip \"bomb\" is a tiny\n * compressed payload that expands to gigabytes; without a cap `gunzipSync`\n * allocates the whole thing before any checksum check runs (SEC3). Callers that\n * genuinely need larger archives can raise the cap explicitly.\n */\nexport const DEFAULT_MAX_DECOMPRESSED_BYTES = 256 * 1024 * 1024\n\n/**\n * Unpack a gzip-compressed tar archive.\n *\n * Before decompressing, the gzip ISIZE footer (declared uncompressed size) is\n * checked against `maxDecompressedBytes` and rejected if it exceeds the cap.\n * fflate independently verifies the actual output length against ISIZE, so a\n * lying footer fails during decompression — together this bounds the memory a\n * malicious archive can force us to allocate.\n *\n * @param data Compressed archive bytes\n * @param opts.maxDecompressedBytes Cap on decompressed size (default 256 MiB)\n * @returns Map of filename → file contents\n */\nexport function unpackTarGz(\n data: Uint8Array,\n opts?: { maxDecompressedBytes?: number },\n): Map<string, Uint8Array> {\n const cap = opts?.maxDecompressedBytes ?? DEFAULT_MAX_DECOMPRESSED_BYTES\n // gzip footer: last 4 bytes are ISIZE (uncompressed size mod 2^32, LE).\n if (data.byteLength < 18) {\n throw new Error('Invalid gzip archive: too short')\n }\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength)\n const declaredSize = view.getUint32(data.byteLength - 4, true)\n if (declaredSize > cap) {\n throw new Error(\n 'Refusing to decompress archive: declared size ' + declaredSize +\n ' exceeds cap ' + cap + ' bytes',\n )\n }\n const tarData = gunzipSync(data)\n if (tarData.byteLength > cap) {\n // Defense against a footer that wrapped past 2^32; fflate would normally\n // have thrown on the ISIZE mismatch, but guard the boundary explicitly.\n throw new Error(\n 'Refusing to decompress archive: decompressed size ' + tarData.byteLength +\n ' exceeds cap ' + cap + ' bytes',\n )\n }\n return decodeTar(tarData)\n}\n","/**\n * Shard format types — matches the fortemi server matric-shard specification.\n *\n * A shard is a gzip-compressed tar archive (.shard) containing serialized\n * knowledge data with a manifest for integrity verification.\n *\n * @implements @.aiwg/adrs/ADR-011-shard-server-conformance-and-version-negotiation.md\n * @schema @packages/core/schemas/knowledge-shard.schema.receipt.json\n * @created 2026-07-17\n * @agent Codex\n */\n\nimport type { BlobStore } from '../blob-store.js'\nimport type { ShardTrustStore } from './shard-signature.js'\n\nexport const CURRENT_SHARD_VERSION = '1.2.0'\n/** Highest authority contract accepted by opt-in import paths. */\nexport const MAX_SHARD_READER_VERSION = '2.0.0'\nexport const SHARD_FORMAT = 'matric-shard'\n\nfunction parseVersion(value: string): number[] {\n return value.split('.').map((segment) => {\n const match = segment.match(/^\\d+/)\n return match ? Number.parseInt(match[0], 10) : 0\n })\n}\n\nexport function compareShardVersions(left: string, right: string): number {\n const leftParts = parseVersion(left)\n const rightParts = parseVersion(right)\n const length = Math.max(leftParts.length, rightParts.length)\n for (let index = 0; index < length; index += 1) {\n const leftValue = leftParts[index] ?? 0\n const rightValue = rightParts[index] ?? 0\n if (leftValue !== rightValue) return leftValue > rightValue ? 1 : -1\n }\n return 0\n}\n\n/** Components that can appear in a shard archive. */\nexport type ShardComponent =\n | 'notes'\n | 'collections'\n | 'tags'\n | 'templates'\n | 'links'\n | 'note_originals'\n | 'note_original_history'\n | 'note_revised_current'\n | 'note_revisions'\n | 'embedding_sets'\n | 'embedding_configs'\n | 'embedding_set_members'\n | 'embeddings'\n | 'provenance_activities'\n | 'named_locations'\n | 'provenance_locations'\n | 'provenance_devices'\n | 'provenance_records'\n | 'skos_schemes'\n | 'skos_concepts'\n | 'skos_labels'\n | 'skos_notes'\n | 'skos_relations'\n | 'skos_mapping_relations'\n | 'skos_scheme_memberships'\n | 'note_skos_tags'\n | 'skos_collections'\n | 'skos_collection_members'\n | 'provenance_edges'\n | 'community_assignments'\n | 'communities'\n | 'graph_edges'\n | 'graph_sources'\n\nexport type KnowledgeShardProfile = 'core-v1' | 'full-v1' | 'record-v1'\nexport type ShardBackend = 'pglite' | 'record-store'\nexport type ShardOperation = 'export' | 'import'\nexport type ShardAuthorityStatus =\n | 'supported'\n | 'candidate'\n | 'reserved'\n | 'unknown'\n | 'unprofiled'\n\nexport interface ShardProfileRegistryEntry {\n profile: KnowledgeShardProfile\n authority_status: 'supported' | 'candidate' | 'reserved'\n components: ShardComponent[]\n}\n\nexport interface ShardLossEntry {\n code: string\n message: string\n component?: ShardComponent\n count?: number\n record_id?: string\n field_path?: string\n source_state?: 'absent' | 'null' | 'empty' | 'value' | 'legacy-indeterminate'\n destination_capability?: string\n action?: 'reject' | 'omit' | 'default' | 'degrade'\n reason?: string\n}\n\nexport interface ShardCapabilityReport {\n schema_version: 'fortemi.shard.capability-report.v1'\n backend: ShardBackend\n operation: ShardOperation\n requested_profile: string | null\n requested_schema_version: string | null\n authority_status: ShardAuthorityStatus\n backend_supported: boolean\n portable: boolean\n authority: {\n repository: string\n commit: string\n contract_sha256: string\n contract_revision: string\n schema_version: string\n schema_bundle_sha256: string\n }\n advertised_profiles: KnowledgeShardProfile[]\n supported_components: ShardComponent[]\n declared_components: ShardComponent[]\n unsupported_components: ShardComponent[]\n omitted_components: ShardComponent[]\n losses: ShardLossEntry[]\n}\n\nexport interface ShardAttachmentReference {\n id: string\n path: string\n mime: string | null\n checksum: string\n bytes: number\n}\n\nexport interface ShardAttachmentProjection {\n extracted_text: string | null\n /** Legacy unprofiled relationship timestamp; outside core-v1. */\n created_at?: string\n /** Legacy unprofiled attachment tombstone; outside core-v1. */\n deleted_at?: string | null\n extraction_status?: 'extracted' | 'pending' | 'failed' | 'blocked' | 'deferred'\n reason?:\n | null\n | 'extraction_pending'\n | 'extractor_failed'\n | 'quarantined'\n | 'large_binary'\n | 'unsupported_mime'\n | 'no_extracted_text'\n attachment: ShardAttachmentReference\n}\n\n/** @deprecated Legacy React shard field name. Server shards use `attachments`. */\nexport type ShardBinarySource = ShardAttachmentProjection\n\n/**\n * Reference to one cluster file of a component split across addressable files\n * (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset` preserves deterministic\n * component order; readers discover each cluster's size from its contents.\n */\nexport interface ShardClusterRef {\n href: string // path within the shard, relative to manifest base\n offset: number // index of the first record in this cluster\n}\n\n/**\n * Optional clustered layout (additive — absent on monolithic shards). When a\n * component is present here, its records live in the listed cluster files instead\n * of (or in addition to) the single `<component>.jsonl`. Both `importShard` and\n * the in-place reader consume it; a monolithic shard omits `layout` entirely.\n */\nexport interface ShardLayout {\n clusters?: Partial<Record<ShardComponent, ShardClusterRef[]>>\n}\n\nexport interface ShardMigrationHistoryEntry {\n from_version: string\n to_version: string\n migrated_at: string\n migrated_by: string\n changes: string[]\n}\n\n/** Manifest included in every shard as manifest.json. */\nexport interface ShardProducer {\n name: string\n version: string\n revision?: string\n}\n\nexport interface ShardManifest {\n version: string\n /** Named server-owned portability profile. Required for canonical interchange. */\n profile?: string\n /** Structured producer identity used by canonical profiles. */\n producer?: ShardProducer\n /** @deprecated Legacy producer release field. */\n matric_version?: string\n format: typeof SHARD_FORMAT\n created_at: string // ISO 8601\n components: ShardComponent[]\n counts: Partial<Record<ShardComponent | 'community_sets', number>>\n checksums: Record<string, string> // filename → sha256 hex\n min_reader_version: string\n migrated_from?: string | null\n migration_history?: ShardMigrationHistoryEntry[]\n /** Clustered component layout for partial fetch (issue #189). Absent → monolithic. */\n layout?: ShardLayout\n}\n\n/** Options for shard export. */\nexport interface ExportOptions {\n /**\n * Explicit portability profile. Only profiles advertised by the selected\n * producer are accepted. Omit to retain the legacy unprofiled React archive.\n */\n profile?: string\n /** Explicit authority schema tuple; 2.0.0 is opt-in until matrix receipts pass. */\n schemaVersion?: '1.2.0' | '2.0.0'\n includeEmbeddings?: boolean\n /** Filter to specific collection (export only notes in this collection). */\n collectionId?: string\n /** Filter to notes with this tag (e.g. 'app:research' for app-scoped export). */\n tag?: string\n /** Export only these embedding sets and their member/vector rows. */\n embeddingSetIds?: string[]\n /** Preserve virtual selector materialization metadata and virtual member rows. */\n includeMaterializedSelectors?: boolean\n /**\n * When set to a positive integer, emit notes as clustered files\n * (`notes/000.jsonl`, …) of this many records each, and record the layout in\n * the manifest, so an in-place reader can fetch only the clusters it needs\n * (issue #189). Absent → a single monolithic `notes.jsonl` (unchanged).\n */\n clusterNotesSize?: number\n /**\n * Pack attachment bytes into a portable content-addressed `blobs/<hex>`\n * sidecar (Fortemi/fortemi#1046), producing a self-contained shard whose\n * attachments survive a round-trip (`getBlob()` returns real bytes on the\n * importing host). Requires {@link blobStore}. Absent/false → reference-only\n * (server default), which remains a valid shard.\n */\n includeBlobs?: boolean\n /**\n * Byte source for the sidecar. Required when `includeBlobs` is set; attachment\n * bytes are read by their `content_hash`. A blob the store cannot return is\n * skipped (its attachment stays reference-only) rather than failing export.\n */\n blobStore?: BlobStore\n /** Optional Ed25519 publisher envelope for newly produced archives. */\n signing?: {\n keyId: string\n privateKey: CryptoKey\n publicKey: string\n }\n}\n\n/** Conflict resolution strategy for shard import. */\nexport type ConflictStrategy = 'skip' | 'replace' | 'error'\n\n/** Options for shard import. */\nexport interface ImportOptions {\n conflictStrategy?: ConflictStrategy\n /** Rows processed between cooperative yields. Defaults to 250. */\n batchSize?: number\n /** Progress callback for long-running import phases. */\n onProgress?: (progress: ImportProgress) => void\n /**\n * Destination for hydrating attachment bytes from a portable `blobs/<hex>`\n * sidecar (Fortemi/fortemi#1046). When provided, sidecar entries whose bare\n * hex matches an imported attachment's `content_hash` are promoted before\n * the logical transaction. A transaction failure removes only bytes that\n * were absent before promotion. Stores without the optional `delete`\n * capability fail before promotion. Absent → reference-only metadata.\n */\n blobStore?: BlobStore\n /**\n * Publisher-provenance policy for signed shards (#324, ADR-014):\n * - `require` — reject unsigned or bad-signature shards (default when a\n * `trustStore` is supplied);\n * - `prefer` — verify signed shards; import unsigned ones with a warning;\n * still reject a present-but-invalid signature;\n * - `trusted-local-only` — ignore signatures (own-export import).\n * When both `trustStore` and this are omitted, verification is skipped\n * entirely (checksum-only, unchanged behavior).\n */\n verifySignature?: 'require' | 'prefer' | 'trusted-local-only'\n /** Trust store resolving signer key_id → public key (required for `require`/`prefer`). */\n trustStore?: ShardTrustStore\n}\n\nexport type ImportProgressPhase =\n | 'unpack'\n | 'validate'\n | 'collections'\n | 'notes'\n | 'skos'\n | 'templates'\n | 'links'\n | 'provenance'\n | 'embedding_sets'\n | 'embedding_configs'\n | 'embeddings'\n | 'embedding_set_members'\n | 'graph'\n | 'communities'\n | 'index'\n\nexport interface ImportProgress {\n phase: ImportProgressPhase\n done: number\n total: number\n}\n\n/** Per-entity import counts. */\nexport interface ImportCounts {\n notes: number\n collections: number\n templates: number\n tags: number\n links: number\n embedding_sets: number\n embedding_configs: number\n embedding_set_members: number\n embeddings: number\n skos_schemes: number\n skos_concepts: number\n skos_relations: number\n note_skos_tags: number\n provenance_edges: number\n graph_sources: number\n graph_edges: number\n community_sets: number\n communities: number\n community_assignments: number\n}\n\n/** Result of a shard import operation. */\nexport interface ImportResult {\n success: boolean\n counts: ImportCounts\n skipped: Partial<ImportCounts>\n warnings: string[]\n errors: string[]\n duration_ms: number\n capability_report: ShardCapabilityReport\n /** Complete manifest counts when a profile contains components outside legacy counters. */\n component_counts?: ShardManifest['counts']\n}\n\nexport interface ShardExportResult {\n success: boolean\n archive: Uint8Array | null\n errors: string[]\n capability_report: ShardCapabilityReport\n}\n\n// ── Shard-format entity shapes (server-compatible) ──────────────────────\n\n/** Note as serialized in the shard JSONL. */\nexport interface ShardNote {\n id: string\n title: string | null\n original_content: string\n revised_content: string | null\n metadata?: unknown\n collection_id?: string | null\n attachments?: ShardAttachmentProjection[]\n /** @deprecated Legacy React shard field name. Use `attachments`. */\n binary_sources?: ShardBinarySource[]\n format: string\n source: string\n starred: boolean\n archived: boolean\n tags: string[]\n created_at: string\n updated_at: string\n /** Schema 1.1 core-v1 tombstone; legacy unprofiled archives also carry it. */\n deleted_at?: string | null\n}\n\n/** Collection as serialized in the shard JSON array. */\nexport interface ShardCollection {\n id: string\n name: string\n description: string | null\n parent_id: string | null\n created_at: string\n /** Legacy unprofiled fields; outside core-v1. */\n updated_at?: string\n deleted_at?: string | null\n note_count?: number\n}\n\n/** Tag as serialized in the shard JSON array. */\nexport interface ShardTag {\n name: string\n created_at: string\n}\n\n/** Template as serialized in the shard JSON array. */\nexport interface ShardTemplate {\n id: string\n name: string\n description: string | null\n content: string\n format: string\n default_tags: string[]\n collection_id: string | null\n created_at: string\n updated_at: string\n}\n\n/** Link as serialized in the shard JSONL. */\nexport interface ShardLink {\n id: string\n from_note_id: string\n to_note_id: string | null\n /** Optional for legacy React shards exported before URL links existed. */\n to_url?: string | null\n kind: string\n score: number | null\n created_at: string\n /** Optional for legacy React shards exported before link metadata existed. */\n metadata?: unknown\n}\n\n/**\n * Embedding set as serialized in the shard JSON array.\n *\n * Fields beyond id/model/dimension are optional for backward compatibility:\n * legacy React shards omit them and import falls back to the same defaults\n * `embeddingSetFromShard` applies (name → model, is_system → false, …).\n */\nexport interface ShardEmbeddingSet {\n id: string\n name?: string\n slug?: string | null\n description?: string | null\n purpose?: string | null\n document_count?: number\n embedding_count?: number\n is_system?: boolean\n keywords?: string[]\n model: string\n dimension: number\n kind?: 'physical' | 'filter' | 'virtual'\n mode?: 'auto' | 'manual' | 'mixed' | null\n truncate_dimension?: number | null\n criteria?: Record<string, unknown> | null\n source?: Record<string, unknown> | null\n compatibility?: Record<string, unknown> | null\n materialization?: Record<string, unknown> | null\n freshness?: ShardArtifactFreshness | null\n created_at?: string\n updated_at?: string\n}\n\n/** Embedding set member as serialized in the shard JSONL. */\nexport interface ShardEmbeddingSetMember {\n embedding_set_id: string\n note_id: string\n /** Legacy React shard field; new exports use server membership metadata instead. */\n embedding_id?: string\n /** Optional for legacy React shards; import defaults to 'materialized'. */\n membership_type?: string\n /** Optional for legacy React shards; import falls back to the manifest timestamp. */\n added_at?: string\n /** Optional for legacy React shards; import defaults to NULL. */\n added_by?: string | null\n}\n\n/** Embedding config as serialized in the shard JSON array. */\nexport interface ShardEmbeddingConfig {\n id: string\n name: string\n description: string | null\n model: string\n dimension: number\n chunk_size: number\n chunk_overlap: number\n is_default: boolean\n}\n\n/**\n * Embedding as serialized in the shard JSONL.\n *\n * Server metadata fields (`chunk_index`, `text`, `model`) are optional for\n * backward compatibility: legacy React shards exported before migration 0016\n * carry only `id`, `note_id`, `embedding_set_id`, `vector`, `created_at`.\n * Import normalizes absent metadata to schema defaults (0, '', NULL).\n */\nexport interface ShardEmbedding {\n id: string\n note_id: string\n chunk_index?: number\n text?: string\n vector: number[]\n model?: string\n /** React shard extension used to preserve local embedding-set scoping. */\n embedding_set_id?: string\n /** React shard extension used to preserve local creation ordering. */\n created_at?: string\n}\n\n\n/** SKOS scheme as serialized in the shard JSON array. */\nexport interface ShardSkosScheme {\n id: string\n title: string\n description: string | null\n created_at: string\n updated_at: string\n}\n\n/** SKOS concept as serialized in the shard JSON array. */\nexport interface ShardSkosConcept {\n id: string\n scheme_id: string\n pref_label: string\n alt_labels: string[]\n definition: string | null\n created_at: string\n updated_at: string\n}\n\n/** SKOS concept relation as serialized in the shard JSONL. */\nexport interface ShardSkosRelation {\n id: string\n source_concept_id: string\n target_concept_id: string\n relation_type: 'broader' | 'narrower' | 'related'\n created_at: string\n}\n\n/** Note-to-SKOS-concept assignment as serialized in the shard JSONL. */\nexport interface ShardNoteSkosTag {\n id: string\n note_id: string\n concept_id: string\n created_at: string\n}\n\n/** Provenance edge as serialized in the shard JSONL. */\nexport interface ShardProvenanceEdge {\n id: string\n entity_type: string\n entity_id: string\n activity: string\n agent: string\n started_at: string\n ended_at: string | null\n attributes: Record<string, unknown> | null\n}\n\n\n// - Graph/community derived artifacts ---------------------------------------\n\nexport interface ShardArtifactFreshness {\n status: 'fresh' | 'stale' | 'unknown'\n checked_at?: string\n stale_reason?: string\n source_hashes?: {\n notes?: string\n links?: string\n embeddings?: string\n embedding_set_members?: string\n virtual_set_definition?: string\n parameters?: string\n }\n}\n\nexport interface ShardGraphSource {\n id: string\n name: string\n kind: 'link' | 'similarity' | 'search' | 'manual' | 'imported'\n source_table?: 'link' | 'embedding' | 'manual' | null\n embedding_set_id?: string | null\n virtual_set_id?: string | null\n model?: string | null\n dimension?: number | null\n truncate_dimension?: number | null\n metric?: 'cosine' | 'inner_product' | 'l2' | null\n algorithm?: string | null\n parameters?: Record<string, unknown>\n input_hash: string\n freshness: ShardArtifactFreshness\n created_at: string\n}\n\nexport interface ShardGraphEdge {\n graph_source_id: string\n from_note_id: string\n to_note_id: string\n weight: number\n kind: 'link' | 'similarity' | 'manual'\n rank?: number | null\n metadata?: Record<string, unknown>\n}\n\nexport interface ShardCommunitySet {\n id: string\n graph_source_id: string\n name: string\n source_type: 'precomputed' | 'dynamic-snapshot' | 'user-authored' | 'imported'\n algorithm?: string | null\n parameters?: Record<string, unknown>\n input_hash: string\n freshness: ShardArtifactFreshness\n communities: ShardCommunity[]\n created_at: string\n}\n\nexport interface ShardCommunity {\n id: string\n label?: string | null\n rank?: number | null\n size?: number | null\n confidence?: number | null\n representative_note_ids?: string[]\n metadata?: Record<string, unknown>\n}\n\nexport interface ShardCommunityAssignment {\n community_set_id: string\n community_id: string\n note_id: string\n confidence?: number | null\n source_type: 'precomputed' | 'dynamic-snapshot' | 'user-authored' | 'imported'\n metadata?: Record<string, unknown>\n}\n","import { sha256 } from '@noble/hashes/sha256'\nimport { blake3 } from '@noble/hashes/blake3'\nimport { bytesToHex } from '@noble/hashes/utils'\n\n/**\n * Compute a browser-local content-identity hash (SHA-256), encoded as\n * `sha256:<64-char lowercase hex>`.\n *\n * This is an internal identity/dedup digest used for note content, embedding\n * configs, the AIWG index, and graph identity — NOT the server's attachment\n * content-hash convention. Binary-attachment blobs use {@link computeBlobHash}\n * (BLAKE3), which is the canonical checksum defined by the binary-attachment\n * projection contract (`checksum: \"blake3:<hex>\"`). Keeping these two functions\n * separate preserves JSON format parity for the identity hashes above while\n * letting attachments match the server's `compute_content_hash`.\n *\n * @param data - Raw bytes to hash\n * @returns `'sha256:<64-char lowercase hex>'`\n */\nexport function computeHash(data: Uint8Array): string {\n const digest = sha256(data)\n return `sha256:${bytesToHex(digest)}`\n}\n\n/**\n * Compute the canonical attachment content hash: **BLAKE3**, encoded as\n * `blake3:<64-char lowercase hex>`.\n *\n * Matches the fortemi server (`crates/matric-db/src/file_storage.rs`\n * `compute_content_hash`) and the portable Knowledge-Shard byte-sidecar\n * contract, where the sidecar tar entry name is the bare hex (the `blake3:`\n * prefix stripped). SubtleCrypto has no BLAKE3, so this uses `@noble/hashes`.\n *\n * @param data - Raw attachment bytes to hash\n * @returns `'blake3:<64-char lowercase hex>'`\n */\nexport function computeBlobHash(data: Uint8Array): string {\n return `blake3:${bytesToHex(blake3(data))}`\n}\n","/**\n * Portable Knowledge-Shard byte sidecar (Fortemi/fortemi#1046).\n *\n * A portable shard MAY carry attachment bytes in a content-addressed sidecar\n * inside its `tar.gz`: one entry per distinct blob, named `blobs/<hex>` where\n * `<hex>` is the bare 64-char lowercase BLAKE3 digest of the entry bytes. A\n * projection record's `checksum` of `blake3:<hex>` resolves to `blobs/<hex>`\n * by stripping the `blake3:` prefix. Sidecars are optional: a missing entry\n * makes an attachment reference-only, which is valid; readers ignore unknown\n * or unreferenced `blobs/` entries without failing import.\n */\n\nexport const SIDECAR_PREFIX = 'blobs/'\n\n/**\n * Strip an `algorithm:hex` checksum down to the bare hex used as the sidecar\n * entry name. Passing a bare hex returns it unchanged.\n */\nexport function blobChecksumToHex(checksum: string): string {\n const sep = checksum.indexOf(':')\n return sep >= 0 ? checksum.slice(sep + 1) : checksum\n}\n\n/** Map a projection `checksum` to its sidecar tar entry name (`blobs/<hex>`). */\nexport function sidecarEntryName(checksum: string): string {\n return SIDECAR_PREFIX + blobChecksumToHex(checksum)\n}\n\n/** True when a tar entry name is a top-level `blobs/<hex>` sidecar entry. */\nexport function isSidecarEntry(name: string): boolean {\n if (!name.startsWith(SIDECAR_PREFIX)) return false\n const rest = name.slice(SIDECAR_PREFIX.length)\n return rest.length > 0 && !rest.includes('/')\n}\n\n/**\n * Collect the sidecar blobs from an unpacked archive, keyed by bare hex.\n * Nested or directory-like entries under `blobs/` are ignored.\n */\nexport function collectSidecarBlobs(\n files: Map<string, Uint8Array>,\n): Map<string, Uint8Array> {\n const blobs = new Map<string, Uint8Array>()\n for (const [name, bytes] of files) {\n if (isSidecarEntry(name)) {\n blobs.set(name.slice(SIDECAR_PREFIX.length), bytes)\n }\n }\n return blobs\n}\n","/**\n * Canonical and transitional Knowledge Shard validation.\n *\n * @implements @.aiwg/adrs/ADR-010-portable-schema-topology-and-source-of-truth.md\n * @implements @.aiwg/adrs/ADR-011-shard-server-conformance-and-version-negotiation.md\n * @schema @packages/core/schemas/knowledge-shard.schema.receipt.json\n * @created 2026-07-17\n * @agent Codex\n */\nimport Ajv2020 from 'ajv/dist/2020.js'\nimport type { ErrorObject, ValidateFunction } from 'ajv'\nimport legacySchema from '../../schemas/knowledge-shard.schema.json' with { type: 'json' }\nimport authorityReceipt from '../../schemas/knowledge-shard.schema.receipt.json' with { type: 'json' }\nimport legacyManifestSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport legacyNoteSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/note.schema.json' with { type: 'json' }\nimport legacyCollectionSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/collection.schema.json' with { type: 'json' }\nimport legacyTagSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/tag.schema.json' with { type: 'json' }\nimport legacyTemplateSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/template.schema.json' with { type: 'json' }\nimport legacyLinkSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/link.schema.json' with { type: 'json' }\nimport v1_1CoreManifestSchema from '../../schemas/knowledge-shard/1.1.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport v1_1RecordManifestSchema from '../../schemas/knowledge-shard/1.1.0/record-v1/manifest.schema.json' with { type: 'json' }\nimport v1_1FullManifestSchema from '../../schemas/knowledge-shard/1.1.0/full-v1/manifest.schema.json' with { type: 'json' }\nimport v1_1FullEmbeddingSchema from '../../schemas/knowledge-shard/1.1.0/full-v1/embedding.schema.json' with { type: 'json' }\nimport manifestSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport noteSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/note.schema.json' with { type: 'json' }\nimport collectionSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/collection.schema.json' with { type: 'json' }\nimport tagSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/tag.schema.json' with { type: 'json' }\nimport templateSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/template.schema.json' with { type: 'json' }\nimport linkSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/link.schema.json' with { type: 'json' }\nimport recordManifestSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/manifest.schema.json' with { type: 'json' }\nimport recordNoteSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/note.schema.json' with { type: 'json' }\nimport recordCollectionSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/collection.schema.json' with { type: 'json' }\nimport recordTagSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/tag.schema.json' with { type: 'json' }\nimport recordLinkSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/link.schema.json' with { type: 'json' }\nimport fullManifestSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/manifest.schema.json' with { type: 'json' }\nimport fullNoteOriginalSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-original.schema.json' with { type: 'json' }\nimport fullNoteOriginalHistorySchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-original-history.schema.json' with { type: 'json' }\nimport fullNoteRevisedCurrentSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-revised-current.schema.json' with { type: 'json' }\nimport fullNoteRevisionSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-revision.schema.json' with { type: 'json' }\nimport fullEmbeddingConfigSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding-config.schema.json' with { type: 'json' }\nimport fullEmbeddingSetSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding-set.schema.json' with { type: 'json' }\nimport fullEmbeddingSetMemberSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding-set-member.schema.json' with { type: 'json' }\nimport fullEmbeddingSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding.schema.json' with { type: 'json' }\nimport fullProvenanceEdgeSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-edge.schema.json' with { type: 'json' }\nimport fullProvenanceActivitySchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-activity.schema.json' with { type: 'json' }\nimport fullNamedLocationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/named-location.schema.json' with { type: 'json' }\nimport fullProvenanceLocationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-location.schema.json' with { type: 'json' }\nimport fullProvenanceDeviceSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-device.schema.json' with { type: 'json' }\nimport fullProvenanceRecordSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-record.schema.json' with { type: 'json' }\nimport fullSkosSchemeSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme.schema.json' with { type: 'json' }\nimport fullSkosConceptSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-concept.schema.json' with { type: 'json' }\nimport fullSkosLabelSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-label.schema.json' with { type: 'json' }\nimport fullSkosNoteSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-note.schema.json' with { type: 'json' }\nimport fullSkosRelationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-relation.schema.json' with { type: 'json' }\nimport fullSkosMappingRelationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-mapping-relation.schema.json' with { type: 'json' }\nimport fullSkosSchemeMembershipSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme-membership.schema.json' with { type: 'json' }\nimport fullNoteSkosTagSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-skos-tag.schema.json' with { type: 'json' }\nimport fullSkosCollectionSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-collection.schema.json' with { type: 'json' }\nimport fullSkosCollectionMemberSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-collection-member.schema.json' with { type: 'json' }\nimport fullGraphSourceSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/graph-source.schema.json' with { type: 'json' }\nimport fullGraphEdgeSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/graph-edge.schema.json' with { type: 'json' }\nimport fullCommunitySetSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/community-set.schema.json' with { type: 'json' }\nimport fullCommunityAssignmentSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/community-assignment.schema.json' with { type: 'json' }\nimport fullSignatureSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/signature.schema.json' with { type: 'json' }\nimport v2CoreManifestSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport v2CoreNoteSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/note.schema.json' with { type: 'json' }\nimport v2CoreCollectionSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/collection.schema.json' with { type: 'json' }\nimport v2CoreTagSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/tag.schema.json' with { type: 'json' }\nimport v2CoreTemplateSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/template.schema.json' with { type: 'json' }\nimport v2CoreLinkSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/link.schema.json' with { type: 'json' }\nimport v2RecordManifestSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/manifest.schema.json' with { type: 'json' }\nimport v2RecordNoteSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/note.schema.json' with { type: 'json' }\nimport v2RecordCollectionSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/collection.schema.json' with { type: 'json' }\nimport v2RecordTagSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/tag.schema.json' with { type: 'json' }\nimport v2RecordLinkSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/link.schema.json' with { type: 'json' }\nimport v2FullManifestSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/manifest.schema.json' with { type: 'json' }\nimport v2FullNoteOriginalSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-original.schema.json' with { type: 'json' }\nimport v2FullNoteOriginalHistorySchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-original-history.schema.json' with { type: 'json' }\nimport v2FullNoteRevisedCurrentSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-revised-current.schema.json' with { type: 'json' }\nimport v2FullNoteRevisionSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-revision.schema.json' with { type: 'json' }\nimport v2FullEmbeddingConfigSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding-config.schema.json' with { type: 'json' }\nimport v2FullEmbeddingSetSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding-set.schema.json' with { type: 'json' }\nimport v2FullEmbeddingSetMemberSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding-set-member.schema.json' with { type: 'json' }\nimport v2FullEmbeddingSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding.schema.json' with { type: 'json' }\nimport v2FullProvenanceEdgeSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-edge.schema.json' with { type: 'json' }\nimport v2FullProvenanceActivitySchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-activity.schema.json' with { type: 'json' }\nimport v2FullNamedLocationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/named-location.schema.json' with { type: 'json' }\nimport v2FullProvenanceLocationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-location.schema.json' with { type: 'json' }\nimport v2FullProvenanceDeviceSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-device.schema.json' with { type: 'json' }\nimport v2FullProvenanceRecordSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-record.schema.json' with { type: 'json' }\nimport v2FullSkosSchemeSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme.schema.json' with { type: 'json' }\nimport v2FullSkosConceptSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-concept.schema.json' with { type: 'json' }\nimport v2FullSkosLabelSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-label.schema.json' with { type: 'json' }\nimport v2FullSkosNoteSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-note.schema.json' with { type: 'json' }\nimport v2FullSkosRelationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-relation.schema.json' with { type: 'json' }\nimport v2FullSkosMappingRelationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-mapping-relation.schema.json' with { type: 'json' }\nimport v2FullSkosSchemeMembershipSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme-membership.schema.json' with { type: 'json' }\nimport v2FullNoteSkosTagSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-skos-tag.schema.json' with { type: 'json' }\nimport v2FullSkosCollectionSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-collection.schema.json' with { type: 'json' }\nimport v2FullSkosCollectionMemberSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-collection-member.schema.json' with { type: 'json' }\nimport v2FullGraphSourceSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/graph-source.schema.json' with { type: 'json' }\nimport v2FullGraphEdgeSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/graph-edge.schema.json' with { type: 'json' }\nimport v2FullCommunitySetSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/community-set.schema.json' with { type: 'json' }\nimport v2FullCommunityAssignmentSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/community-assignment.schema.json' with { type: 'json' }\nimport v2FullSignatureSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/signature.schema.json' with { type: 'json' }\nimport { validateChecksums } from './checksum.js'\nimport { unpackTarGz } from './shard-tar.js'\nimport { CURRENT_SHARD_VERSION } from './types.js'\nimport type { ShardComponent, ShardManifest } from './types.js'\nimport { computeBlobHash } from '../hash.js'\nimport { isSidecarEntry, sidecarEntryName } from './blob-sidecar.js'\n\nexport interface ShardSchemaValidationResult {\n valid: boolean\n errors: string[]\n}\n\ntype ShardFiles = Map<string, Uint8Array>\ntype CoreV1Component = 'notes' | 'collections' | 'tags' | 'templates' | 'links'\ntype RecordV1Component = 'notes' | 'collections' | 'tags' | 'links'\ntype FullV1Component = ShardComponent\nexport type CoreV1SchemaVersion = '1.0.0' | '1.1.0' | '1.2.0' | '2.0.0'\ntype CurrentCanonicalSchemaVersion = '1.1.0' | '1.2.0'\ntype RecordV1SchemaVersion = CurrentCanonicalSchemaVersion | '2.0.0'\ntype FullV1SchemaVersion = CurrentCanonicalSchemaVersion | '2.0.0'\ntype RecordEncoding = 'json-array' | 'jsonl'\ntype IdentifiedSchema = object & { $id: string }\n\nconst decoder = new TextDecoder()\n\ntype LegacySchemaDefName =\n | 'manifest'\n | 'note'\n | 'collection'\n | 'tag'\n | 'template'\n | 'link'\n | 'embeddingSet'\n | 'embeddingSetMember'\n | 'embeddingConfig'\n | 'embedding'\n | 'skosScheme'\n | 'skosConcept'\n | 'skosRelation'\n | 'noteSkosTag'\n | 'provenanceEdge'\n | 'graphSource'\n | 'graphEdge'\n | 'communitySet'\n | 'communityAssignment'\n\nconst LEGACY_COMPONENT_SCHEMA_DEFS: Partial<\n Record<ShardComponent | 'templates', LegacySchemaDefName>\n> = {\n notes: 'note',\n collections: 'collection',\n tags: 'tag',\n templates: 'template',\n links: 'link',\n embedding_sets: 'embeddingSet',\n embedding_set_members: 'embeddingSetMember',\n embedding_configs: 'embeddingConfig',\n embeddings: 'embedding',\n skos_schemes: 'skosScheme',\n skos_concepts: 'skosConcept',\n skos_relations: 'skosRelation',\n note_skos_tags: 'noteSkosTag',\n provenance_edges: 'provenanceEdge',\n graph_sources: 'graphSource',\n graph_edges: 'graphEdge',\n communities: 'communitySet',\n community_assignments: 'communityAssignment',\n}\n\nconst LEGACY_COMPONENT_FILES: Partial<\n Record<ShardComponent, { file: string; encoding: RecordEncoding }>\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n templates: { file: 'templates.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n embedding_sets: { file: 'embedding_sets.json', encoding: 'json-array' },\n embedding_set_members: { file: 'embedding_set_members.jsonl', encoding: 'jsonl' },\n embedding_configs: { file: 'embedding_configs.json', encoding: 'json-array' },\n embeddings: { file: 'embeddings.jsonl', encoding: 'jsonl' },\n skos_schemes: { file: 'skos_schemes.json', encoding: 'json-array' },\n skos_concepts: { file: 'skos_concepts.json', encoding: 'json-array' },\n skos_relations: { file: 'skos_relations.jsonl', encoding: 'jsonl' },\n note_skos_tags: { file: 'note_skos_tags.jsonl', encoding: 'jsonl' },\n provenance_edges: { file: 'provenance_edges.jsonl', encoding: 'jsonl' },\n graph_sources: { file: 'graph_sources.json', encoding: 'json-array' },\n graph_edges: { file: 'graph_edges.jsonl', encoding: 'jsonl' },\n communities: { file: 'communities.json', encoding: 'json-array' },\n community_assignments: { file: 'community_assignments.jsonl', encoding: 'jsonl' },\n}\n\nconst CORE_V1_COMPONENT_FILES: Record<\n CoreV1Component,\n { file: string; encoding: RecordEncoding }\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n templates: { file: 'templates.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n}\n\nconst RECORD_V1_COMPONENT_FILES: Record<\n RecordV1Component,\n { file: string; encoding: RecordEncoding }\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n}\n\nexport const FULL_V1_COMPONENT_FILES: Record<\n FullV1Component,\n { file: string; encoding: RecordEncoding }\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n templates: { file: 'templates.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n note_originals: { file: 'note_originals.jsonl', encoding: 'jsonl' },\n note_original_history: { file: 'note_original_history.jsonl', encoding: 'jsonl' },\n note_revised_current: { file: 'note_revised_current.jsonl', encoding: 'jsonl' },\n note_revisions: { file: 'note_revisions.jsonl', encoding: 'jsonl' },\n embedding_configs: { file: 'embedding_configs.json', encoding: 'json-array' },\n embedding_sets: { file: 'embedding_sets.json', encoding: 'json-array' },\n embedding_set_members: { file: 'embedding_set_members.jsonl', encoding: 'jsonl' },\n embeddings: { file: 'embeddings.jsonl', encoding: 'jsonl' },\n provenance_edges: { file: 'provenance_edges.jsonl', encoding: 'jsonl' },\n provenance_activities: { file: 'provenance_activities.jsonl', encoding: 'jsonl' },\n named_locations: { file: 'named_locations.jsonl', encoding: 'jsonl' },\n provenance_locations: { file: 'provenance_locations.jsonl', encoding: 'jsonl' },\n provenance_devices: { file: 'provenance_devices.jsonl', encoding: 'jsonl' },\n provenance_records: { file: 'provenance_records.jsonl', encoding: 'jsonl' },\n skos_schemes: { file: 'skos_schemes.json', encoding: 'json-array' },\n skos_concepts: { file: 'skos_concepts.json', encoding: 'json-array' },\n skos_labels: { file: 'skos_labels.jsonl', encoding: 'jsonl' },\n skos_notes: { file: 'skos_notes.jsonl', encoding: 'jsonl' },\n skos_relations: { file: 'skos_relations.jsonl', encoding: 'jsonl' },\n skos_mapping_relations: { file: 'skos_mapping_relations.jsonl', encoding: 'jsonl' },\n skos_scheme_memberships: { file: 'skos_scheme_memberships.jsonl', encoding: 'jsonl' },\n note_skos_tags: { file: 'note_skos_tags.jsonl', encoding: 'jsonl' },\n skos_collections: { file: 'skos_collections.json', encoding: 'json-array' },\n skos_collection_members: { file: 'skos_collection_members.jsonl', encoding: 'jsonl' },\n graph_sources: { file: 'graph_sources.json', encoding: 'json-array' },\n graph_edges: { file: 'graph_edges.jsonl', encoding: 'jsonl' },\n communities: { file: 'communities.json', encoding: 'json-array' },\n community_assignments: { file: 'community_assignments.jsonl', encoding: 'jsonl' },\n}\n\nconst CORE_V1_SCHEMAS: Record<\n CoreV1SchemaVersion,\n Record<CoreV1Component | 'manifest', IdentifiedSchema>\n> = {\n '1.0.0': {\n manifest: legacyManifestSchema,\n notes: legacyNoteSchema,\n collections: legacyCollectionSchema,\n tags: legacyTagSchema,\n templates: legacyTemplateSchema,\n links: legacyLinkSchema,\n },\n '1.1.0': {\n manifest: v1_1CoreManifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n },\n '1.2.0': {\n manifest: manifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n },\n '2.0.0': {\n manifest: v2CoreManifestSchema,\n notes: v2CoreNoteSchema,\n collections: v2CoreCollectionSchema,\n tags: v2CoreTagSchema,\n templates: v2CoreTemplateSchema,\n links: v2CoreLinkSchema,\n },\n}\n\nconst RECORD_V1_CURRENT_SCHEMAS: Record<\n RecordV1Component | 'manifest',\n IdentifiedSchema\n> = {\n manifest: recordManifestSchema,\n notes: recordNoteSchema,\n collections: recordCollectionSchema,\n tags: recordTagSchema,\n links: recordLinkSchema,\n}\n\nconst RECORD_V1_SCHEMAS: Record<\n RecordV1SchemaVersion,\n Record<RecordV1Component | 'manifest', IdentifiedSchema>\n> = {\n '1.1.0': {\n ...RECORD_V1_CURRENT_SCHEMAS,\n manifest: v1_1RecordManifestSchema,\n },\n '1.2.0': RECORD_V1_CURRENT_SCHEMAS,\n '2.0.0': {\n manifest: v2RecordManifestSchema,\n notes: v2RecordNoteSchema,\n collections: v2RecordCollectionSchema,\n tags: v2RecordTagSchema,\n links: v2RecordLinkSchema,\n },\n}\n\nconst FULL_V1_CURRENT_SCHEMAS: Record<\n FullV1Component | 'manifest' | 'signature',\n IdentifiedSchema\n> = {\n manifest: fullManifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n note_originals: fullNoteOriginalSchema,\n note_original_history: fullNoteOriginalHistorySchema,\n note_revised_current: fullNoteRevisedCurrentSchema,\n note_revisions: fullNoteRevisionSchema,\n embedding_configs: fullEmbeddingConfigSchema,\n embedding_sets: fullEmbeddingSetSchema,\n embedding_set_members: fullEmbeddingSetMemberSchema,\n embeddings: fullEmbeddingSchema,\n provenance_edges: fullProvenanceEdgeSchema,\n provenance_activities: fullProvenanceActivitySchema,\n named_locations: fullNamedLocationSchema,\n provenance_locations: fullProvenanceLocationSchema,\n provenance_devices: fullProvenanceDeviceSchema,\n provenance_records: fullProvenanceRecordSchema,\n skos_schemes: fullSkosSchemeSchema,\n skos_concepts: fullSkosConceptSchema,\n skos_labels: fullSkosLabelSchema,\n skos_notes: fullSkosNoteSchema,\n skos_relations: fullSkosRelationSchema,\n skos_mapping_relations: fullSkosMappingRelationSchema,\n skos_scheme_memberships: fullSkosSchemeMembershipSchema,\n note_skos_tags: fullNoteSkosTagSchema,\n skos_collections: fullSkosCollectionSchema,\n skos_collection_members: fullSkosCollectionMemberSchema,\n graph_sources: fullGraphSourceSchema,\n graph_edges: fullGraphEdgeSchema,\n communities: fullCommunitySetSchema,\n community_assignments: fullCommunityAssignmentSchema,\n signature: fullSignatureSchema,\n}\n\nconst FULL_V1_SCHEMAS: Record<\n FullV1SchemaVersion,\n Record<FullV1Component | 'manifest' | 'signature', IdentifiedSchema>\n> = {\n '1.1.0': {\n ...FULL_V1_CURRENT_SCHEMAS,\n manifest: v1_1FullManifestSchema,\n embeddings: v1_1FullEmbeddingSchema,\n },\n '1.2.0': FULL_V1_CURRENT_SCHEMAS,\n '2.0.0': {\n manifest: v2FullManifestSchema,\n notes: v2CoreNoteSchema,\n collections: v2CoreCollectionSchema,\n tags: v2CoreTagSchema,\n templates: v2CoreTemplateSchema,\n links: v2CoreLinkSchema,\n note_originals: v2FullNoteOriginalSchema,\n note_original_history: v2FullNoteOriginalHistorySchema,\n note_revised_current: v2FullNoteRevisedCurrentSchema,\n note_revisions: v2FullNoteRevisionSchema,\n embedding_configs: v2FullEmbeddingConfigSchema,\n embedding_sets: v2FullEmbeddingSetSchema,\n embedding_set_members: v2FullEmbeddingSetMemberSchema,\n embeddings: v2FullEmbeddingSchema,\n provenance_edges: v2FullProvenanceEdgeSchema,\n provenance_activities: v2FullProvenanceActivitySchema,\n named_locations: v2FullNamedLocationSchema,\n provenance_locations: v2FullProvenanceLocationSchema,\n provenance_devices: v2FullProvenanceDeviceSchema,\n provenance_records: v2FullProvenanceRecordSchema,\n skos_schemes: v2FullSkosSchemeSchema,\n skos_concepts: v2FullSkosConceptSchema,\n skos_labels: v2FullSkosLabelSchema,\n skos_notes: v2FullSkosNoteSchema,\n skos_relations: v2FullSkosRelationSchema,\n skos_mapping_relations: v2FullSkosMappingRelationSchema,\n skos_scheme_memberships: v2FullSkosSchemeMembershipSchema,\n note_skos_tags: v2FullNoteSkosTagSchema,\n skos_collections: v2FullSkosCollectionSchema,\n skos_collection_members: v2FullSkosCollectionMemberSchema,\n graph_sources: v2FullGraphSourceSchema,\n graph_edges: v2FullGraphEdgeSchema,\n communities: v2FullCommunitySetSchema,\n community_assignments: v2FullCommunityAssignmentSchema,\n signature: v2FullSignatureSchema,\n },\n}\n\nlet legacyAjvInstance: Ajv2020 | undefined\nlet coreAjvInstance: Ajv2020 | undefined\nlet recordAjvInstance: Ajv2020 | undefined\nlet fullAjvInstance: Ajv2020 | undefined\nconst legacyValidators = new Map<LegacySchemaDefName, ValidateFunction>()\nconst coreValidators = new Map<string, ValidateFunction>()\nconst recordValidators = new Map<string, ValidateFunction>()\nconst fullValidators = new Map<string, ValidateFunction>()\n\nexport function getKnowledgeShardSchema(): unknown {\n return {\n manifest: manifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n recordV1: {\n manifest: recordManifestSchema,\n notes: recordNoteSchema,\n collections: recordCollectionSchema,\n tags: recordTagSchema,\n links: recordLinkSchema,\n },\n fullV1: FULL_V1_CURRENT_SCHEMAS,\n fullV1V2: FULL_V1_SCHEMAS['2.0.0'],\n }\n}\n\nexport function getKnowledgeShardContractReceipt(): unknown {\n return authorityReceipt\n}\n\nfunction addCanonicalFormats(ajv: Ajv2020): void {\n ajv.addFormat('uuid', /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)\n ajv.addFormat('date-time', {\n type: 'string',\n validate: (value: string) =>\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$/.test(value)\n && !Number.isNaN(Date.parse(value)),\n })\n ajv.addFormat('uri', {\n type: 'string',\n validate: (value: string) => {\n try {\n return Boolean(new URL(value).protocol)\n } catch {\n return false\n }\n },\n })\n}\n\nfunction getLegacyAjv(): Ajv2020 {\n if (!legacyAjvInstance) {\n legacyAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: false,\n })\n legacyAjvInstance.addSchema(legacySchema)\n }\n return legacyAjvInstance\n}\n\nfunction getCoreAjv(): Ajv2020 {\n if (!coreAjvInstance) {\n coreAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: true,\n })\n addCanonicalFormats(coreAjvInstance)\n const registered = new Set<string>()\n for (const bundle of Object.values(CORE_V1_SCHEMAS)) {\n for (const schema of Object.values(bundle)) {\n if (!registered.has(schema.$id)) {\n coreAjvInstance.addSchema(schema)\n registered.add(schema.$id)\n }\n }\n }\n }\n return coreAjvInstance\n}\n\nfunction getRecordAjv(): Ajv2020 {\n if (!recordAjvInstance) {\n recordAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: true,\n })\n addCanonicalFormats(recordAjvInstance)\n const registered = new Set<string>()\n for (const bundle of Object.values(RECORD_V1_SCHEMAS)) {\n for (const schema of Object.values(bundle)) {\n if (!registered.has(schema.$id)) {\n recordAjvInstance.addSchema(schema)\n registered.add(schema.$id)\n }\n }\n }\n }\n return recordAjvInstance\n}\n\nfunction getFullAjv(): Ajv2020 {\n if (!fullAjvInstance) {\n fullAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: true,\n })\n addCanonicalFormats(fullAjvInstance)\n const registered = new Set<string>()\n for (const bundle of Object.values(FULL_V1_SCHEMAS)) {\n for (const schema of Object.values(bundle)) {\n if (!registered.has(schema.$id)) {\n fullAjvInstance.addSchema(schema)\n registered.add(schema.$id)\n }\n }\n }\n }\n return fullAjvInstance\n}\n\nfunction legacyValidatorFor(defName: LegacySchemaDefName): ValidateFunction {\n const cached = legacyValidators.get(defName)\n if (cached) return cached\n const validator = getLegacyAjv().getSchema(`${legacySchema.$id}#/$defs/${defName}`)\n ?? getLegacyAjv().compile({ $ref: `${legacySchema.$id}#/$defs/${defName}` })\n legacyValidators.set(defName, validator)\n return validator\n}\n\nfunction coreSchemaVersion(value: string): CoreV1SchemaVersion | undefined {\n return value === '1.0.0' || value === '1.1.0' || value === '1.2.0' || value === '2.0.0'\n ? value\n : undefined\n}\n\nfunction recordSchemaVersion(value: string): RecordV1SchemaVersion | undefined {\n return value === '1.1.0' || value === '1.2.0' || value === '2.0.0' ? value : undefined\n}\n\nfunction fullSchemaVersion(value: string): FullV1SchemaVersion | undefined {\n return value === '1.1.0' || value === '1.2.0' || value === '2.0.0' ? value : undefined\n}\n\nfunction coreValidatorFor(\n name: CoreV1Component | 'manifest',\n version: CoreV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ValidateFunction {\n const key = `${version}:${name}`\n const cached = coreValidators.get(key)\n if (cached) return cached\n const schema = CORE_V1_SCHEMAS[version][name]\n const validator = getCoreAjv().getSchema(schema.$id) ?? getCoreAjv().compile(schema)\n coreValidators.set(key, validator)\n return validator\n}\n\nfunction recordValidatorFor(\n name: RecordV1Component | 'manifest',\n version: RecordV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ValidateFunction {\n const key = `${version}:${name}`\n const cached = recordValidators.get(key)\n if (cached) return cached\n const schema = RECORD_V1_SCHEMAS[version][name]\n const validator = getRecordAjv().getSchema(schema.$id) ?? getRecordAjv().compile(schema)\n recordValidators.set(key, validator)\n return validator\n}\n\nfunction fullValidatorFor(\n name: FullV1Component | 'manifest' | 'signature',\n version: FullV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ValidateFunction {\n const key = `${version}:${name}`\n const cached = fullValidators.get(key)\n if (cached) return cached\n const schema = FULL_V1_SCHEMAS[version][name]\n const validator = getFullAjv().getSchema(schema.$id) ?? getFullAjv().compile(schema)\n fullValidators.set(key, validator)\n return validator\n}\n\nfunction formatErrors(errors: ErrorObject[] | null | undefined): string[] {\n return (errors ?? []).map((error) => {\n const path = error.instancePath || '(root)'\n return `${path} ${error.message ?? 'is invalid'}`\n })\n}\n\nfunction profileOf(value: unknown): string | undefined {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return undefined\n const profile = (value as Record<string, unknown>).profile\n return typeof profile === 'string' ? profile : undefined\n}\n\nexport function validateShardManifest(value: unknown): ShardSchemaValidationResult {\n let validate: ValidateFunction\n const profile = profileOf(value)\n if (profile === 'core-v1') {\n const version = value && typeof value === 'object' && !Array.isArray(value)\n ? coreSchemaVersion(String((value as Record<string, unknown>).version ?? ''))\n : undefined\n if (!version) {\n return {\n valid: false,\n errors: ['(root) uses an unsupported canonical core-v1 schema version'],\n }\n }\n validate = coreValidatorFor('manifest', version)\n } else if (profile === 'record-v1') {\n const version = value && typeof value === 'object' && !Array.isArray(value)\n ? recordSchemaVersion(String((value as Record<string, unknown>).version ?? ''))\n : undefined\n if (!version) {\n return {\n valid: false,\n errors: ['(root) uses an unsupported canonical record-v1 schema version'],\n }\n }\n validate = recordValidatorFor('manifest', version)\n } else if (profile === 'full-v1') {\n const version = value && typeof value === 'object' && !Array.isArray(value)\n ? fullSchemaVersion(String((value as Record<string, unknown>).version ?? ''))\n : undefined\n if (!version) {\n return {\n valid: false,\n errors: ['(root) uses an unsupported canonical full-v1 schema version'],\n }\n }\n validate = fullValidatorFor('manifest', version)\n } else {\n validate = legacyValidatorFor('manifest')\n }\n const valid = validate(value)\n return { valid, errors: formatErrors(validate.errors) }\n}\n\nfunction parseJsonArray(\n bytes: Uint8Array | undefined,\n path: string,\n): { records: unknown[]; errors: string[] } {\n if (!bytes) return { records: [], errors: [] }\n try {\n const value = JSON.parse(decoder.decode(bytes)) as unknown\n if (!Array.isArray(value)) return { records: [], errors: [`${path} must be a JSON array`] }\n return { records: value, errors: [] }\n } catch {\n return { records: [], errors: [`${path} failed to parse as JSON`] }\n }\n}\n\nfunction parseJsonl(\n bytes: Uint8Array | undefined,\n path: string,\n): { records: unknown[]; errors: string[] } {\n if (!bytes) return { records: [], errors: [] }\n const text = decoder.decode(bytes).trim()\n if (!text) return { records: [], errors: [] }\n const records: unknown[] = []\n const errors: string[] = []\n for (const [index, line] of text.split('\\n').entries()) {\n try {\n records.push(JSON.parse(line) as unknown)\n } catch {\n errors.push(`${path}:${index + 1} failed to parse as JSON`)\n }\n }\n return { records, errors }\n}\n\nfunction unpackShardFiles(input: Uint8Array | ArrayBuffer | ShardFiles): ShardFiles {\n if (input instanceof Map) return input\n return unpackTarGz(input instanceof ArrayBuffer ? new Uint8Array(input) : input)\n}\n\nfunction parseRecords(\n bytes: Uint8Array | undefined,\n path: string,\n encoding: RecordEncoding,\n): { records: unknown[]; errors: string[] } {\n return encoding === 'json-array' ? parseJsonArray(bytes, path) : parseJsonl(bytes, path)\n}\n\nfunction validateLegacyComponentRecords(\n component: ShardComponent,\n records: unknown[],\n path: string,\n): string[] {\n const errors: string[] = []\n for (const [index, record] of records.entries()) {\n const result = validateShardComponentRecord(component, record)\n if (!result.valid) {\n errors.push(...result.errors.map((error) => `${path}[${index}] ${error}`))\n }\n }\n return errors\n}\n\nfunction validateLegacyArchive(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const manifestResult = validateShardManifest(manifest)\n if (!manifestResult.valid) {\n errors.push(...manifestResult.errors.map((error) => `manifest.json ${error}`))\n }\n\n const componentsToValidate = new Set<ShardComponent>(manifest.components)\n for (const [component, spec] of Object.entries(LEGACY_COMPONENT_FILES) as Array<\n [ShardComponent, { file: string; encoding: RecordEncoding }]\n >) {\n if (files.has(spec.file)) componentsToValidate.add(component)\n }\n\n for (const component of componentsToValidate) {\n const spec = LEGACY_COMPONENT_FILES[component]\n if (!spec) continue\n if (component === 'notes' && manifest.layout?.clusters?.notes?.length) {\n for (const cluster of manifest.layout.clusters.notes) {\n const parsed = parseJsonl(files.get(cluster.href), cluster.href)\n errors.push(...parsed.errors)\n errors.push(...validateLegacyComponentRecords('notes', parsed.records, cluster.href))\n }\n continue\n }\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n errors.push(...validateLegacyComponentRecords(component, parsed.records, spec.file))\n }\n return errors\n}\n\nfunction coreReferenceErrors(records: Map<CoreV1Component, unknown[]>): string[] {\n const errors: string[] = []\n const notes = records.get('notes') as Array<Record<string, unknown>>\n const collections = records.get('collections') as Array<Record<string, unknown>>\n const tags = records.get('tags') as Array<Record<string, unknown>>\n const templates = records.get('templates') as Array<Record<string, unknown>>\n const links = records.get('links') as Array<Record<string, unknown>>\n const noteIds = new Set(notes.map((record) => record.id))\n const collectionIds = new Set(collections.map((record) => record.id))\n const tagNames = new Set(tags.map((record) => record.name))\n\n for (const [index, collection] of collections.entries()) {\n if (collection.parent_id !== null && !collectionIds.has(collection.parent_id)) {\n errors.push(`collections.json[${index}] parent_id does not reference a declared collection`)\n }\n }\n const collectionById = new Map(collections.map((collection) => [collection.id, collection]))\n const visiting = new Set<unknown>()\n const visited = new Set<unknown>()\n const visitCollection = (collection: Record<string, unknown>): void => {\n if (visited.has(collection.id)) return\n if (visiting.has(collection.id)) {\n errors.push(`collection hierarchy contains a cycle at ${String(collection.id)}`)\n return\n }\n visiting.add(collection.id)\n const parent = collection.parent_id === null\n ? undefined\n : collectionById.get(collection.parent_id)\n if (parent) visitCollection(parent)\n visiting.delete(collection.id)\n visited.add(collection.id)\n }\n for (const collection of collections) visitCollection(collection)\n for (const [index, note] of notes.entries()) {\n if (note.collection_id !== null && !collectionIds.has(note.collection_id)) {\n errors.push(`notes.jsonl[${index}] collection_id does not reference a declared collection`)\n }\n for (const tag of note.tags as string[]) {\n if (!tagNames.has(tag)) {\n errors.push(`notes.jsonl[${index}] tag does not reference a declared tag`)\n }\n }\n }\n for (const [index, template] of templates.entries()) {\n if (template.collection_id !== null && !collectionIds.has(template.collection_id)) {\n errors.push(`templates.json[${index}] collection_id does not reference a declared collection`)\n }\n for (const tag of template.default_tags as string[]) {\n if (!tagNames.has(tag)) {\n errors.push(`templates.json[${index}] default tag does not reference a declared tag`)\n }\n }\n }\n for (const [index, link] of links.entries()) {\n if (!noteIds.has(link.from_note_id)) {\n errors.push(`links.jsonl[${index}] from_note_id does not reference a declared note`)\n }\n if (link.to_note_id !== null && !noteIds.has(link.to_note_id)) {\n errors.push(`links.jsonl[${index}] to_note_id does not reference a declared note`)\n }\n }\n return errors\n}\n\nfunction validateCoreV1Structure(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const schemaVersion = coreSchemaVersion(manifest.version)\n if (!schemaVersion) {\n return ['manifest.json uses an unsupported canonical core-v1 schema version']\n }\n const manifestValidator = coreValidatorFor('manifest', schemaVersion)\n if (!manifestValidator(manifest)) {\n return formatErrors(manifestValidator.errors).map((error) => `manifest.json ${error}`)\n }\n\n const components = manifest.components as CoreV1Component[]\n const expectedFiles = new Set(components.map((component) => CORE_V1_COMPONENT_FILES[component].file))\n for (const filename of expectedFiles) {\n if (!files.has(filename)) errors.push(`${filename} is declared but missing`)\n if (!(filename in manifest.checksums)) errors.push(`${filename} is missing its declared checksum`)\n }\n for (const filename of Object.keys(manifest.checksums)) {\n if (!expectedFiles.has(filename)) {\n errors.push(`manifest checksum references undeclared file ${filename}`)\n }\n }\n for (const filename of files.keys()) {\n if (filename !== 'manifest.json' && !expectedFiles.has(filename)) {\n errors.push(`archive contains undeclared file ${filename}`)\n }\n }\n\n const records = new Map<CoreV1Component, unknown[]>()\n for (const component of components) {\n const spec = CORE_V1_COMPONENT_FILES[component]\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n const validator = coreValidatorFor(component, schemaVersion)\n for (const [index, record] of parsed.records.entries()) {\n if (!validator(record)) {\n errors.push(\n ...formatErrors(validator.errors).map((error) => `${spec.file}[${index}] ${error}`),\n )\n }\n }\n const expectedCount = manifest.counts[component]\n if (expectedCount !== parsed.records.length) {\n errors.push(\n `${spec.file} count mismatch: manifest=${String(expectedCount)} actual=${parsed.records.length}`,\n )\n }\n records.set(component, parsed.records)\n }\n for (const component of Object.keys(CORE_V1_COMPONENT_FILES) as CoreV1Component[]) {\n if (!records.has(component)) records.set(component, [])\n }\n\n if (errors.length === 0) errors.push(...coreReferenceErrors(records))\n return errors\n}\n\nfunction validateFullV1Structure(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const schemaVersion = fullSchemaVersion(manifest.version)\n if (!schemaVersion) {\n return ['manifest.json uses an unsupported canonical full-v1 schema version']\n }\n const manifestValidator = fullValidatorFor('manifest', schemaVersion)\n if (!manifestValidator(manifest)) {\n return formatErrors(manifestValidator.errors).map((error) => `manifest.json ${error}`)\n }\n\n const components = manifest.components as FullV1Component[]\n const expectedFiles = new Set(\n components.map((component) => FULL_V1_COMPONENT_FILES[component].file),\n )\n for (const filename of expectedFiles) {\n if (!files.has(filename)) errors.push(`${filename} is declared but missing`)\n if (!(filename in manifest.checksums)) errors.push(`${filename} is missing its declared checksum`)\n }\n for (const filename of Object.keys(manifest.checksums)) {\n if (!expectedFiles.has(filename)) {\n errors.push(`manifest checksum references undeclared file ${filename}`)\n }\n }\n for (const filename of files.keys()) {\n if (\n filename !== 'manifest.json'\n && filename !== 'signature.json'\n && !isSidecarEntry(filename)\n && !expectedFiles.has(filename)\n ) {\n errors.push(`archive contains undeclared file ${filename}`)\n }\n }\n\n const records = new Map<FullV1Component, unknown[]>()\n for (const component of components) {\n const spec = FULL_V1_COMPONENT_FILES[component]\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n const validator = fullValidatorFor(component, schemaVersion)\n for (const [index, record] of parsed.records.entries()) {\n if (!validator(record)) {\n errors.push(\n ...formatErrors(validator.errors).map((error) => `${spec.file}[${index}] ${error}`),\n )\n }\n }\n if (component !== 'communities') {\n const expectedCount = manifest.counts[component]\n if (expectedCount !== parsed.records.length) {\n errors.push(\n `${spec.file} count mismatch: manifest=${String(expectedCount)} actual=${parsed.records.length}`,\n )\n }\n }\n records.set(component, parsed.records)\n }\n\n const communitySets = records.get('communities') as Array<Record<string, unknown>>\n const communityCount = communitySets.reduce((total, set) => {\n const communities = Array.isArray(set.communities) ? set.communities : []\n return total + communities.length\n }, 0)\n if (manifest.counts.community_sets !== communitySets.length) {\n errors.push(\n `communities.json set count mismatch: manifest=${String(manifest.counts.community_sets)} actual=${communitySets.length}`,\n )\n }\n if (manifest.counts.communities !== communityCount) {\n errors.push(\n `communities.json community count mismatch: manifest=${String(manifest.counts.communities)} actual=${communityCount}`,\n )\n }\n\n const signatureBytes = files.get('signature.json')\n if (signatureBytes) {\n try {\n const signature = JSON.parse(decoder.decode(signatureBytes)) as unknown\n const signatureValidator = fullValidatorFor('signature', schemaVersion)\n if (!signatureValidator(signature)) {\n errors.push(\n ...formatErrors(signatureValidator.errors).map(\n (error) => `signature.json ${error}`,\n ),\n )\n }\n } catch {\n errors.push('signature.json failed to parse as JSON')\n }\n }\n\n const notes = records.get('notes') as Array<Record<string, unknown>>\n for (const [noteIndex, note] of notes.entries()) {\n const attachments = Array.isArray(note.attachments) ? note.attachments : []\n for (const [attachmentIndex, projection] of attachments.entries()) {\n const attachment = (\n projection as { attachment?: { checksum?: unknown } }\n ).attachment\n if (typeof attachment?.checksum !== 'string') continue\n const sidecar = sidecarEntryName(attachment.checksum)\n if (!files.has(sidecar)) {\n errors.push(\n `notes.jsonl[${noteIndex}].attachments[${attachmentIndex}] is missing mandatory sidecar ${sidecar}`,\n )\n }\n }\n }\n return errors\n}\n\nfunction validateRecordV1Structure(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const schemaVersion = recordSchemaVersion(manifest.version)\n if (!schemaVersion) {\n return ['manifest.json uses an unsupported canonical record-v1 schema version']\n }\n const manifestValidator = recordValidatorFor('manifest', schemaVersion)\n if (!manifestValidator(manifest)) {\n return formatErrors(manifestValidator.errors).map((error) => `manifest.json ${error}`)\n }\n\n const components = manifest.components as RecordV1Component[]\n const expectedFiles = new Set(\n components.map((component) => RECORD_V1_COMPONENT_FILES[component].file),\n )\n for (const filename of expectedFiles) {\n if (!files.has(filename)) errors.push(`${filename} is declared but missing`)\n if (!(filename in manifest.checksums)) errors.push(`${filename} is missing its declared checksum`)\n }\n for (const filename of Object.keys(manifest.checksums)) {\n if (!expectedFiles.has(filename)) {\n errors.push(`manifest checksum references undeclared file ${filename}`)\n }\n }\n for (const filename of files.keys()) {\n if (filename !== 'manifest.json' && !expectedFiles.has(filename)) {\n errors.push(`archive contains undeclared file ${filename}`)\n }\n }\n\n const records = new Map<CoreV1Component, unknown[]>()\n for (const component of components) {\n const spec = RECORD_V1_COMPONENT_FILES[component]\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n const validator = recordValidatorFor(component, schemaVersion)\n for (const [index, record] of parsed.records.entries()) {\n if (!validator(record)) {\n errors.push(\n ...formatErrors(validator.errors).map((error) => `${spec.file}[${index}] ${error}`),\n )\n }\n }\n const expectedCount = manifest.counts[component]\n if (expectedCount !== parsed.records.length) {\n errors.push(\n `${spec.file} count mismatch: manifest=${String(expectedCount)} actual=${parsed.records.length}`,\n )\n }\n records.set(component, parsed.records)\n }\n for (const component of Object.keys(CORE_V1_COMPONENT_FILES) as CoreV1Component[]) {\n if (!records.has(component)) records.set(component, [])\n }\n\n if (errors.length === 0) errors.push(...coreReferenceErrors(records))\n return errors\n}\n\nexport function validateShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): ShardSchemaValidationResult {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const profile = profileOf(manifest)\n const errors = profile === 'core-v1'\n ? validateCoreV1Structure(files, manifest)\n : profile === 'record-v1'\n ? validateRecordV1Structure(files, manifest)\n : profile === 'full-v1'\n ? validateFullV1Structure(files, manifest)\n : validateLegacyArchive(files, manifest)\n return { valid: errors.length === 0, errors }\n}\n\nexport async function validateCoreV1ShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): Promise<ShardSchemaValidationResult> {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const errors = validateCoreV1Structure(files, manifest)\n if (errors.length > 0) return { valid: false, errors }\n\n const checksumResult = await validateChecksums(manifest.checksums, files)\n if (!checksumResult.valid) {\n errors.push(...checksumResult.failures.map((filename) => `${filename} checksum mismatch`))\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport async function validateRecordV1ShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): Promise<ShardSchemaValidationResult> {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const errors = validateRecordV1Structure(files, manifest)\n if (errors.length > 0) return { valid: false, errors }\n\n const checksumResult = await validateChecksums(manifest.checksums, files)\n if (!checksumResult.valid) {\n errors.push(...checksumResult.failures.map((filename) => `${filename} checksum mismatch`))\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport async function validateFullV1ShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): Promise<ShardSchemaValidationResult> {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const errors = validateFullV1Structure(files, manifest)\n if (errors.length > 0) return { valid: false, errors }\n\n const checksumResult = await validateChecksums(manifest.checksums, files)\n if (!checksumResult.valid) {\n errors.push(...checksumResult.failures.map((filename) => `${filename} checksum mismatch`))\n }\n\n const notesSpec = FULL_V1_COMPONENT_FILES.notes\n const parsedNotes = parseRecords(files.get(notesSpec.file), notesSpec.file, notesSpec.encoding)\n for (const [noteIndex, note] of (\n parsedNotes.records as Array<Record<string, unknown>>\n ).entries()) {\n const attachments = Array.isArray(note.attachments) ? note.attachments : []\n for (const [attachmentIndex, projection] of attachments.entries()) {\n const attachment = (\n projection as { attachment?: { checksum?: unknown } }\n ).attachment\n if (typeof attachment?.checksum !== 'string') continue\n const sidecar = sidecarEntryName(attachment.checksum)\n const bytes = files.get(sidecar)\n if (bytes && computeBlobHash(bytes) !== attachment.checksum) {\n errors.push(\n `notes.jsonl[${noteIndex}].attachments[${attachmentIndex}] sidecar checksum mismatch`,\n )\n }\n }\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport function validateShardComponentRecord(\n component: ShardComponent | 'templates',\n value: unknown,\n profile?: 'core-v1' | 'record-v1' | 'full-v1',\n version: CoreV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ShardSchemaValidationResult {\n let validate: ValidateFunction\n if (profile === 'core-v1' && component in CORE_V1_COMPONENT_FILES) {\n validate = coreValidatorFor(component as CoreV1Component, version)\n } else if (profile === 'record-v1' && component in RECORD_V1_COMPONENT_FILES) {\n const canonicalVersion = recordSchemaVersion(version)\n if (!canonicalVersion) {\n return {\n valid: false,\n errors: [`(root) uses an unsupported canonical record-v1 schema version ${version}`],\n }\n }\n validate = recordValidatorFor(component as RecordV1Component, canonicalVersion)\n } else if (profile === 'full-v1' && component in FULL_V1_COMPONENT_FILES) {\n const canonicalVersion = fullSchemaVersion(version)\n if (!canonicalVersion) {\n return {\n valid: false,\n errors: [`(root) uses an unsupported canonical full-v1 schema version ${version}`],\n }\n }\n validate = fullValidatorFor(component as FullV1Component, canonicalVersion)\n } else {\n const legacyDef = LEGACY_COMPONENT_SCHEMA_DEFS[component]\n if (!legacyDef) {\n return {\n valid: false,\n errors: [`(root) component '${component}' requires an explicit full-v1 profile`],\n }\n }\n validate = legacyValidatorFor(legacyDef)\n }\n const valid = validate(value)\n return { valid, errors: formatErrors(validate.errors) }\n}\n\nexport function assertShardComponentRecord(\n component: ShardComponent | 'templates',\n value: unknown,\n profile?: 'core-v1' | 'record-v1' | 'full-v1',\n version: CoreV1SchemaVersion = CURRENT_SHARD_VERSION,\n): void {\n const result = validateShardComponentRecord(component, value, profile, version)\n if (!result.valid) {\n throw new Error(`Invalid shard ${component} record:\\n${result.errors.join('\\n')}`)\n }\n}\n","{\n \"schemaVersion\": 1,\n \"source\": {\n \"repository\": \"https://git.integrolabs.net/Fortemi/fortemi\",\n \"commit\": \"6343bd899958445bbc7e7e87b0dc92a8429d5a06\",\n \"contractPath\": \"contracts/knowledge-shard/2.0.0/contract.json\",\n \"contractSha256\": \"5bf8d2fd8147d8df92599b1a3ce6b405ce022c83893f37547aefa7ca659f0783\"\n },\n \"knowledgeShard\": {\n \"format\": \"matric-shard\",\n \"schemaVersion\": \"2.0.0\",\n \"minimumReaderVersion\": \"2.0.0\",\n \"profileIdentity\": \"(manifest.version, manifest.profile)\",\n \"wireRepresentation\": \"direct-json-key-presence\"\n },\n \"status\": \"specified-implementation-pending\",\n \"schemaBundle\": {\n \"sourceRoot\": \"contracts/knowledge-shard/2.0.0\",\n \"vendoredRoot\": \"schemas/knowledge-shard/2.0.0\",\n \"aggregateAlgorithm\": \"sha256(raw file bytes concatenated in lexicographic path order)\",\n \"sha256\": \"66dee80876c73fdc8756541c72e96ae189c098113a831c849d619381c4121c02\",\n \"files\": {\n \"contract.schema.json\": \"7dc21c1d0efbad2aaa782c5c637c67268558a3822850eb3ac0c67e5a7baba427\",\n \"core-v1/collection.schema.json\": \"ed28f395e4bea9ae235bc32e9e4167abec4f318dc5335cea6aa2f4d1bdcf9705\",\n \"core-v1/link.schema.json\": \"7bc1531f785d8f5c0b442f09fd039adc0c170b65b9919e2f652b452f614071ea\",\n \"core-v1/manifest.schema.json\": \"f35775e0532c9b2c9f7543c0aef1f0836233253e8f8c7abab62d20824809aad8\",\n \"core-v1/note.schema.json\": \"c0c3c9fbd399b9f090eecd9477e5efcbe32fbff2278c38703075b8f0db9aa829\",\n \"core-v1/tag.schema.json\": \"49612a9ac9332127ee88084a22c845646ba702d7fdcc3fe12d99a825add1b0c7\",\n \"core-v1/template.schema.json\": \"cfd4b64b24e3690e9c97061c98809d3a9b75dc7d70a5bce19997f2eed5ac52a7\",\n \"field-semantics.json\": \"43e5704bc8d805158aa67f33eef6d440fecfeb8385d4f622d79084be3424da09\",\n \"field-semantics.schema.json\": \"3d244074067b57857efaa7ed8e027b47eb42855fc07a8abf1f389d232867cdd6\",\n \"full-v1/community-assignment.schema.json\": \"285763d54e08ecc1ff1d7665dc8363f537c5aab222c2a31e4c4d75f8fa0441f5\",\n \"full-v1/community-set.schema.json\": \"bd39af12cc1ae417cf4aa3e8b4b88defc7ffdd37cb77030bc451609d73907e38\",\n \"full-v1/embedding-config.schema.json\": \"8e2291167f25676e2263d5a4f493e07b8c8822caedcbd2b28c7a44d57e724870\",\n \"full-v1/embedding-set-member.schema.json\": \"73a4425a391666c604515daa4f71acc715a9ab5053f909bccca61717473a554b\",\n \"full-v1/embedding-set.schema.json\": \"9f6042775732605d902103614f7b4c338e6cf44f81682e74e630df36db62d53c\",\n \"full-v1/embedding.schema.json\": \"adab2243e811963aa55fbc51a1a73f5f2ee7258ebc87095b29d5c279cf7c79a8\",\n \"full-v1/graph-edge.schema.json\": \"3a4ab64860f8b0b4405676382844ccc33284d5d4a00e40b7670ee9040770e63e\",\n \"full-v1/graph-source.schema.json\": \"32ce0d400bc7bb753486691f6664bde82419a201e4d2726fbf933a41c9b5d501\",\n \"full-v1/manifest.schema.json\": \"ffad2eb31832eb611bdaed60e3dc51fc4d70be65110e477a03e298ed1e9fd3a8\",\n \"full-v1/named-location.schema.json\": \"6a8fa15c28a2cb652da3383545f0d4caa8fbd5b70bc0434a2c42f99b7973d1f1\",\n \"full-v1/note-original-history.schema.json\": \"2695be759371a0bc1ec7365a748b1e640e8e6d0460d01bdfd219c8ddf860fb4a\",\n \"full-v1/note-original.schema.json\": \"2f91b05391dde339e22bc5ef4b86cb3f65c175409ce197ad6ea95df3cd6b5080\",\n \"full-v1/note-revised-current.schema.json\": \"e56370d6574123490347e61d2e76305b26de2764d9b2c2a840c5f6b2b0a5857b\",\n \"full-v1/note-revision.schema.json\": \"21828d0d05f120387678a1f8c268373a2d336d48c98c77f86bd278ef7b88a8e8\",\n \"full-v1/note-skos-tag.schema.json\": \"f0fd53d1926cb7ad816668c0d5a9eeecdaf78a8aa34c637e6535d75efde71008\",\n \"full-v1/provenance-activity.schema.json\": \"cf2fe61eec8bb2e8a3a853aa4745921645b6dad275a8963c2b2d1b6fe7095abb\",\n \"full-v1/provenance-device.schema.json\": \"64e73ef83c9075af9575acf55afe6585a46d515c8b8e8cda4b07132de931fa04\",\n \"full-v1/provenance-edge.schema.json\": \"77e099b8cb550adca4f87675fecd46ddcb93a7f006b18fe29244a243baac70bc\",\n \"full-v1/provenance-location.schema.json\": \"ef66f850e57b38f074361c9801954296d1053a4fad8fa6f29630d8ada4af60cc\",\n \"full-v1/provenance-record.schema.json\": \"7e26dda2ec6d93adc943758a42cb9d59d5045c6a773e787bc056523b486957cb\",\n \"full-v1/signature.schema.json\": \"0a9c6bec61202daac9496b97206eb144bccca5eb96cd25fee51c6bdf676d88bf\",\n \"full-v1/skos-collection-member.schema.json\": \"868934af7206338d3b5d0ceee6004536d2556da673dfa27fb121397f92eaf90f\",\n \"full-v1/skos-collection.schema.json\": \"b3b853831c0303100ff9e163581726123c0cb4c4faab4beae8a084e2e05d1fd7\",\n \"full-v1/skos-concept.schema.json\": \"5bdc83d9105f272868e5ee4fa7cfcf62aec8abdfc7e37e5a039c4b452bad28a9\",\n \"full-v1/skos-label.schema.json\": \"58fb972b57d53de61935f48899ba8dce7e24d423cc5a5c97ea52ad56d6f410ee\",\n \"full-v1/skos-mapping-relation.schema.json\": \"f763a0a86312b3ae42ce4c0e1e899f0de074cf71f6c4d3fb6fe0483f8ef3772f\",\n \"full-v1/skos-note.schema.json\": \"a7eb2c2d985bb8cdead580cabe461d65b2789e9f9a43c817c6ee606a98e4bf7d\",\n \"full-v1/skos-relation.schema.json\": \"10673a317a05b20b00e2a7497f1d8c45801066c02958bfebc330e0b7dff37aa2\",\n \"full-v1/skos-scheme-membership.schema.json\": \"0b7138ce6bff393e3f3a9ce6828e36f2f6f8a73b17d14b3f98a53145b903710f\",\n \"full-v1/skos-scheme.schema.json\": \"0493f955db21746b42df64de993ef6fc1089a41280e097d6b3b24ffc760b9ac7\",\n \"record-v1/collection.schema.json\": \"7669aa38a5cd11b96a241e965c0a1774ed28ca47df005570b0ed4a975620462b\",\n \"record-v1/link.schema.json\": \"002faa3db2768add881324123aee7a8898883fd39697f4e1f14bcccf7a23c78c\",\n \"record-v1/manifest.schema.json\": \"927aac403b1e9178ac251b812b1a1431d15d6f2c0d9c5a7db0642931e1c22f8b\",\n \"record-v1/note.schema.json\": \"f1179454145737c5c7c1670c0ab04f4e809254f21a5a2e347987504db6a73b3c\",\n \"record-v1/tag.schema.json\": \"391ba45fcf440afc83ba25bae3482887bcd9ffbfe1df77277f91c2c26e66b571\"\n }\n },\n \"presenceSemantics\": {\n \"inventory\": \"contracts/knowledge-shard/2.0.0/field-semantics.json\",\n \"inventorySchema\": \"contracts/knowledge-shard/2.0.0/field-semantics.schema.json\",\n \"fieldCount\": 220,\n \"states\": [\n \"absent\",\n \"null\",\n \"empty\",\n \"value\",\n \"unsupported\"\n ]\n },\n \"canonicalCorpus\": {\n \"sourcePath\": \"tests/fixtures/shards/presence-semantics-v2.0.json\",\n \"vendoredPath\": \"src/__tests__/shard/fixtures/presence-semantics-v2.0.json\",\n \"sha256\": \"cdb069819bee1bf89abad6aab012629c0fc2f40044ca2510ae73f7fdfa3d8552\"\n },\n \"tracking\": {\n \"authority\": \"https://git.integrolabs.net/Fortemi/fortemi/issues/1083\",\n \"matrix\": \"https://git.integrolabs.net/Fortemi/fortemi/issues/1082\",\n \"reactPresence\": \"https://git.integrolabs.net/Fortemi/fortemi-react/issues/379\",\n \"reactPgliteFull\": \"https://git.integrolabs.net/Fortemi/fortemi-react/issues/380\",\n \"reactAiwg\": \"https://git.integrolabs.net/Fortemi/fortemi-react/issues/381\",\n \"hotm\": \"https://git.integrolabs.net/Fortemi/hotm/issues/272\"\n },\n \"claimPolicy\": \"This descriptor specifies the next authority contract and enables no support, portability, backup, or parity claim without matrix receipts.\"\n}\n","import type {\n AiwgFortemiIndexExport,\n AiwgFortemiRecord,\n AiwgFortemiSkosConcept,\n} from './aiwg-index.js'\nimport authorityReceipt from '../schemas/knowledge-shard-v2.schema.receipt.json' with { type: 'json' }\nimport { sha256Hex } from './shard/checksum.js'\nimport { FULL_V1_COMPONENT_FILES, validateFullV1ShardArchive } from './shard/schema-validator.js'\nimport { packTarGz } from './shard/shard-tar.js'\nimport { SHARD_FORMAT } from './shard/types.js'\nimport type { ShardComponent, ShardLossEntry, ShardManifest } from './shard/types.js'\nimport { v5 as uuidv5 } from 'uuid'\n\nconst encoder = new TextEncoder()\nconst UUID_NAMESPACE = '7ab5d1f8-29d2-5e35-9e2f-3a45de171a9e'\n\nexport interface AiwgFullV1ConversionOptions {\n createdAt?: string\n matricVersion?: string\n}\n\nexport interface AiwgFullV1ConversionResult {\n success: boolean\n archive: Uint8Array | null\n profile: 'full-v1'\n schema_version: '2.0.0'\n /** Structural validity is separate from semantic losslessness. */\n lossless: boolean\n losses: ShardLossEntry[]\n receipt: {\n schema_version: 'fortemi.aiwg-full-v1-conversion-receipt.v1'\n source_schema_version: 'aiwg.fortemi.index.export.v2'\n authority_repository: string\n authority_commit: string\n authority_contract_sha256: string\n authority_schema_bundle_sha256: string\n manifest_sha256: string | null\n component_checksums: Record<string, string>\n contract_valid: boolean\n signed: false\n }\n}\n\nfunction uuid(kind: string, id: string): string {\n return uuidv5(`${kind}:${id}`, UUID_NAMESPACE)\n}\n\nfunction own(value: object, field: PropertyKey): boolean {\n return Object.prototype.hasOwnProperty.call(value, field)\n}\n\nfunction timestamp(value: string | undefined): string | undefined {\n if (!value || Number.isNaN(Date.parse(value))) return undefined\n return new Date(value).toISOString()\n}\n\nfunction addLoss(\n losses: ShardLossEntry[],\n code: string,\n message: string,\n details: Partial<ShardLossEntry> = {},\n): void {\n losses.push({ code, message, ...details })\n}\n\nfunction encode(values: unknown[], encoding: 'json-array' | 'jsonl'): Uint8Array {\n return encoder.encode(encoding === 'json-array'\n ? JSON.stringify(values)\n : values.map((value) => JSON.stringify(value)).join('\\n'))\n}\n\nfunction noteTitle(record: AiwgFortemiRecord, losses: ShardLossEntry[]): string | null {\n if (own(record, 'title')) return record.title ?? null\n const derived = record.search?.title ?? record.search?.name\n addLoss(losses, 'aiwg-title-not-native', derived\n ? 'Title was derived from the AIWG search projection.'\n : 'AIWG supplied no title; the nullable destination field is null.', {\n component: 'notes', record_id: record.id, field_path: '/title', source_state: 'absent',\n destination_capability: 'nullable-value', action: derived ? 'degrade' : 'default',\n })\n return derived ?? null\n}\n\nfunction noteContent(record: AiwgFortemiRecord, losses: ShardLossEntry[]): string {\n if (own(record, 'text')) return record.text ?? ''\n if (own(record.search ?? {}, 'body')) {\n addLoss(losses, 'aiwg-content-search-projection',\n 'Content was derived from the AIWG search projection.', {\n component: 'notes', record_id: record.id, field_path: '/original_content',\n source_state: 'absent', destination_capability: 'required-string', action: 'degrade',\n })\n return record.search?.body ?? ''\n }\n if (record.chunks?.length) {\n addLoss(losses, 'aiwg-content-chunk-projection', 'Content was assembled from AIWG chunks.', {\n component: 'notes', record_id: record.id, field_path: '/original_content',\n source_state: 'absent', destination_capability: 'required-string', action: 'degrade',\n })\n return record.chunks.map((chunk) => {\n if (own(chunk, 'text')) return chunk.text ?? ''\n if (own(chunk, 'body')) return chunk.body ?? ''\n if (own(chunk, 'summary')) return chunk.summary ?? ''\n return ''\n }).join('\\n\\n')\n }\n addLoss(losses, 'aiwg-content-unavailable',\n 'AIWG supplied no body; the required destination string is empty.', {\n component: 'notes', record_id: record.id, field_path: '/original_content',\n source_state: 'absent', destination_capability: 'required-string', action: 'default',\n })\n return ''\n}\n\nfunction createdAt(record: AiwgFortemiRecord, losses: ShardLossEntry[]): string {\n const source = timestamp(record.source.updated_at)\n if (source) return source\n addLoss(losses, 'aiwg-created-at-unavailable',\n 'AIWG has no distinct creation timestamp; updated_at was used.', {\n component: 'notes', record_id: record.id, field_path: '/created_at',\n source_state: 'absent', destination_capability: 'required-date-time', action: 'default',\n })\n return new Date(record.updated_at).toISOString()\n}\n\nfunction safeUri(value: string | undefined): string | null {\n if (!value) return null\n try { return new URL(value).toString() } catch { return null }\n}\n\nfunction schemeName(concept: AiwgFortemiSkosConcept): string {\n return concept.scheme && concept.scheme.length > 0 ? concept.scheme : 'aiwg'\n}\n\n/** Build exact 2.0.0/full-v1 plus mandatory semantic-loss evidence. */\nexport async function convertAiwgIndexToFullV1(\n index: AiwgFortemiIndexExport,\n options: AiwgFullV1ConversionOptions = {},\n): Promise<AiwgFullV1ConversionResult> {\n const losses: ShardLossEntry[] = []\n const exportedAt = timestamp(options.createdAt) ?? new Date(index.generated_at).toISOString()\n const records = [...index.items].sort((a, b) => a.id.localeCompare(b.id))\n const noteIds = new Map(records.map((record) => [record.id, uuid('record', record.id)]))\n const rows = new Map<ShardComponent, Array<Record<string, unknown>>>()\n for (const component of Object.keys(FULL_V1_COMPONENT_FILES) as ShardComponent[]) rows.set(component, [])\n\n const tags = new Set<string>()\n for (const record of records) {\n const noteId = noteIds.get(record.id)!\n const content = noteContent(record, losses)\n const sourceCreatedAt = createdAt(record, losses)\n const updatedAt = new Date(record.updated_at).toISOString()\n const recordTags = [...new Set(record.tags)].sort()\n recordTags.forEach((tag) => tags.add(tag))\n if (record.binary_sources?.length) {\n addLoss(losses, 'aiwg-attachment-bytes-unavailable',\n 'Attachment references have no bytes, so full-v1 attachment projections were omitted.', {\n component: 'notes', count: record.binary_sources.length, record_id: record.id,\n field_path: '/attachments', source_state: 'value',\n destination_capability: 'mandatory-blob-sidecar', action: 'omit',\n })\n }\n const unmappedRecordFields = [\n Object.keys(record.facets).length > 0 ? 'facets' : null,\n record.search !== undefined ? 'search' : null,\n record.chunks !== undefined ? 'chunks' : null,\n record.compatibility !== undefined ? 'compatibility' : null,\n ].filter((field): field is string => field !== null)\n if (unmappedRecordFields.length > 0) {\n addLoss(losses, 'aiwg-record-fields-unmapped',\n 'AIWG fields without a native full-v1 component were not hidden in note metadata.', {\n component: 'notes', record_id: record.id, source_state: 'value', action: 'omit',\n destination_capability: 'native-full-v1-components',\n reason: unmappedRecordFields.join(','),\n })\n }\n rows.get('notes')!.push({\n id: noteId, title: noteTitle(record, losses), original_content: content,\n revised_content: content,\n metadata: { aiwg_source: { record_id: record.id, record_type: record.type,\n repository: index.source.repo, graph: index.source.graph ?? null,\n source: record.source, privacy: record.privacy } },\n format: 'markdown', source: 'aiwg-index', starred: false, archived: false,\n collection_id: null, created_at: sourceCreatedAt, updated_at: updatedAt,\n tags: recordTags, attachments: [],\n })\n const hash = await sha256Hex(encoder.encode(content))\n rows.get('note_originals')!.push({\n id: uuid('note-original', record.id), note_id: noteId, content,\n hash: `sha256:${hash}`, user_created_at: sourceCreatedAt,\n user_last_edited_at: updatedAt, version_number: 1,\n })\n rows.get('note_revised_current')!.push({\n note_id: noteId, content, last_revision_id: null, ai_metadata: null,\n })\n }\n rows.set('tags', [...tags].sort().map((name) => ({ name, created_at: exportedAt })))\n\n const relationshipInput: unknown[] = []\n for (const record of records) {\n for (const [position, relationship] of record.relationships.entries()) {\n const target = noteIds.get(relationship.target_id) ?? null\n const key = `${record.id}\\0${position}\\0${relationship.type}\\0${relationship.target_id}`\n rows.get('links')!.push({\n id: uuid('relationship', key), from_note_id: noteIds.get(record.id)!, to_note_id: target,\n to_url: target ? null : `aiwg://record/${encodeURIComponent(relationship.target_id)}`,\n kind: relationship.type,\n score: own(relationship, 'confidence') ? relationship.confidence ?? null : null,\n created_at: new Date(record.updated_at).toISOString(),\n metadata: target\n ? relationship.metadata ?? null\n : {\n direction: relationship.direction ?? null,\n label: relationship.label ?? null,\n privacy: relationship.privacy ?? null,\n source_path: relationship.source_path ?? null,\n target_path: relationship.target_path ?? null,\n source_metadata: relationship.metadata ?? null,\n },\n })\n relationshipInput.push({ source: record.id, position, relationship })\n if (!target) continue\n let weight = relationship.confidence\n if (weight === undefined) {\n weight = 1\n addLoss(losses, 'aiwg-relationship-weight-unavailable',\n 'Graph weight defaulted because relationship confidence is absent.', {\n component: 'graph_edges', record_id: record.id,\n field_path: `/relationships/${position}/confidence`, source_state: 'absent',\n destination_capability: 'required-number', action: 'default',\n })\n }\n rows.get('graph_edges')!.push({\n graph_source_id: 'aiwg-relationships', from_note_id: noteIds.get(record.id)!,\n to_note_id: target, weight, kind: 'manual', rank: position,\n metadata: { type: relationship.type, direction: relationship.direction ?? null,\n label: relationship.label ?? null, privacy: relationship.privacy ?? null,\n source_path: relationship.source_path ?? null, target_path: relationship.target_path ?? null,\n source_metadata: relationship.metadata ?? null },\n })\n }\n }\n if (rows.get('graph_edges')!.length) {\n rows.get('graph_sources')!.push({\n id: 'aiwg-relationships', name: 'AIWG relationships', kind: 'imported', source_table: 'manual',\n embedding_set_id: null, virtual_set_id: null, model: null, dimension: null,\n truncate_dimension: null, metric: null, algorithm: null, parameters: null,\n input_hash: `sha256:${await sha256Hex(encoder.encode(JSON.stringify(relationshipInput)))}`,\n freshness: { status: 'fresh', checked_at: exportedAt }, created_at: exportedAt,\n })\n }\n\n const concepts = new Map<string, AiwgFortemiSkosConcept>()\n const conceptMembers = new Map<string, AiwgFortemiRecord[]>()\n for (const record of records) {\n for (const id of record.concepts) {\n conceptMembers.set(id, [...(conceptMembers.get(id) ?? []), record])\n }\n for (const concept of record.skos_concepts ?? []) {\n const existing = concepts.get(concept.id)\n if (existing && JSON.stringify(existing) !== JSON.stringify(concept)) {\n addLoss(losses, 'aiwg-skos-concept-conflict',\n 'Different metadata was supplied for one concept; the first sorted record won.', {\n component: 'skos_concepts', record_id: concept.id,\n destination_capability: 'single-concept-identity', action: 'degrade',\n })\n } else if (!existing) concepts.set(concept.id, concept)\n }\n }\n for (const id of conceptMembers.keys()) {\n if (!concepts.has(id)) {\n concepts.set(id, { id, prefLabel: id })\n addLoss(losses, 'aiwg-skos-metadata-unavailable',\n 'A referenced concept had no SKOS metadata; its id is used as the label.', {\n component: 'skos_concepts', record_id: id, field_path: '/prefLabel',\n source_state: 'absent', destination_capability: 'required-label', action: 'default',\n })\n }\n }\n const schemeIds = new Map(\n [...new Set([...concepts.values()].map(schemeName))].sort()\n .map((name) => [name, uuid('skos-scheme', name)]),\n )\n for (const [name, id] of schemeIds) {\n rows.get('skos_schemes')!.push({\n id, uri: null, notation: name, title: name, description: null, creator: 'aiwg-index',\n publisher: null, rights: null, version: null, is_active: true, is_system: false,\n created_at: exportedAt, updated_at: exportedAt, issued_at: null, modified_at: null,\n embedding: null, embedding_model: null, embedded_at: null,\n })\n }\n const conceptIds = new Map([...concepts.keys()].sort().map((id) => [id, uuid('skos-concept', id)]))\n for (const [sourceId, concept] of [...concepts].sort(([a], [b]) => a.localeCompare(b))) {\n const id = conceptIds.get(sourceId)!\n const schemeId = schemeIds.get(schemeName(concept))!\n const memberCount = conceptMembers.get(sourceId)?.length ?? 0\n if (concept.uri && !safeUri(concept.uri)) addLoss(losses, 'aiwg-skos-uri-invalid',\n 'AIWG concept URI is not a valid authority URI and was mapped to null.', {\n component: 'skos_concepts', record_id: sourceId, field_path: '/uri',\n source_state: 'value', destination_capability: 'uri', action: 'omit',\n })\n const unmappedConceptMetadata = Object.keys(concept.metadata ?? {}).filter((key) => key !== 'domain')\n if (unmappedConceptMetadata.length > 0) addLoss(losses, 'aiwg-skos-metadata-unmapped',\n 'AIWG concept metadata without a native full-v1 field was omitted.', {\n component: 'skos_concepts', record_id: sourceId, source_state: 'value', action: 'omit',\n destination_capability: 'native-skos-fields', reason: unmappedConceptMetadata.join(','),\n })\n rows.get('skos_concepts')!.push({\n id, primary_scheme_id: schemeId, uri: safeUri(concept.uri),\n notation: concept.notation ?? sourceId, facet_type: null, facet_source: 'aiwg-index',\n facet_domain: typeof concept.metadata?.domain === 'string' ? concept.metadata.domain : null,\n facet_scope: null, status: 'candidate', promoted_at: null, deprecated_at: null,\n deprecation_reason: null, replaced_by_id: null, note_count: memberCount,\n first_used_at: memberCount ? exportedAt : null, last_used_at: memberCount ? exportedAt : null,\n depth: 0, broader_count: 0, narrower_count: 0, related_count: 0,\n antipatterns: null, antipattern_checked_at: null, created_at: exportedAt,\n updated_at: exportedAt, embedding: null, embedding_model: null, embedded_at: null,\n })\n rows.get('skos_scheme_memberships')!.push({\n concept_id: id, scheme_id: schemeId, is_top_concept: true, added_at: exportedAt,\n })\n rows.get('skos_labels')!.push({\n id: uuid('skos-label', `${sourceId}:pref:${concept.prefLabel}`), concept_id: id,\n label_type: 'pref_label', value: concept.prefLabel, language: 'und', created_at: exportedAt,\n })\n for (const label of concept.altLabels ?? []) rows.get('skos_labels')!.push({\n id: uuid('skos-label', `${sourceId}:alt:${label}`), concept_id: id,\n label_type: 'alt_label', value: label, language: 'und', created_at: exportedAt,\n })\n if (concept.definition !== undefined) rows.get('skos_notes')!.push({\n id: uuid('skos-note', `${sourceId}:definition`), concept_id: id,\n note_type: 'definition', value: concept.definition, language: 'und', author: null,\n source: concept.uri ?? null, created_at: exportedAt, updated_at: exportedAt,\n })\n }\n for (const record of records) {\n for (const [position, sourceId] of record.concepts.entries()) {\n const conceptId = conceptIds.get(sourceId)\n if (conceptId) rows.get('note_skos_tags')!.push({\n note_id: noteIds.get(record.id)!, concept_id: conceptId, source: 'aiwg-index',\n confidence: null, relevance_score: null, is_primary: position === 0,\n created_at: new Date(record.updated_at).toISOString(), created_by: 'aiwg-index',\n })\n }\n for (const relation of record.skos_relations ?? []) {\n const subject = conceptIds.get(relation.source_id)\n const object = conceptIds.get(relation.target_id)\n if (!subject || !object || !['broader', 'narrower', 'related'].includes(relation.type)) {\n addLoss(losses, 'aiwg-skos-relation-unrepresentable',\n 'SKOS relation could not be mapped to the native full-v1 relation enum.', {\n component: 'skos_relations', record_id: record.id,\n destination_capability: 'broader-narrower-related', action: 'omit',\n })\n continue\n }\n const unmappedRelationFields = [\n relation.source_path !== undefined ? 'source_path' : null,\n relation.metadata !== undefined ? 'metadata' : null,\n ].filter((field): field is string => field !== null)\n if (unmappedRelationFields.length > 0) {\n addLoss(losses, 'aiwg-skos-relation-fields-unmapped',\n 'AIWG SKOS relation fields have no native full-v1 destination fields.', {\n component: 'skos_relations', record_id: record.id,\n source_state: 'value', destination_capability: 'native-skos-relation-fields',\n action: 'omit', reason: unmappedRelationFields.join(','),\n })\n continue\n }\n rows.get('skos_relations')!.push({\n id: uuid('skos-relation', `${relation.source_id}:${relation.type}:${relation.target_id}`),\n subject_id: subject, object_id: object, relation_type: relation.type,\n inference_score: null, is_inferred: false, is_validated: false,\n created_at: new Date(record.updated_at).toISOString(), created_by: 'aiwg-index',\n })\n }\n }\n\n for (const record of records) {\n for (const [position, event] of (record.provenance_events ?? []).entries()) {\n const start = timestamp(event.started_at)\n if (!start) addLoss(losses, 'aiwg-provenance-start-unavailable',\n 'Activity start defaulted to record updated_at.', {\n component: 'provenance_activities', record_id: event.id ?? `${record.id}:${position}`,\n field_path: '/started_at', source_state: 'absent', action: 'default',\n })\n rows.get('provenance_activities')!.push({\n id: uuid('provenance-event', event.id ?? `${record.id}:${position}`),\n note_id: noteIds.get(record.id)!, revision_id: null, activity_type: event.activity,\n model_name: event.agent ?? null, started_at: start ?? new Date(record.updated_at).toISOString(),\n ended_at: timestamp(event.ended_at) ?? null,\n metadata: { source: event.source ?? null, path: event.path ?? null,\n confidence: event.confidence ?? null, privacy: event.privacy ?? null,\n attributes: event.attributes ?? null },\n })\n }\n for (const [position, provenance] of record.provenance.entries()) {\n rows.get('provenance_activities')!.push({\n id: uuid('provenance-field', `${record.id}:${position}:${provenance.field}`),\n note_id: noteIds.get(record.id)!, revision_id: null,\n activity_type: `source:${provenance.field}`, model_name: provenance.source,\n started_at: new Date(record.updated_at).toISOString(), ended_at: null,\n metadata: { path: provenance.path, confidence: provenance.confidence, privacy: provenance.privacy },\n })\n }\n }\n\n const embeddingGroups = new Map<string, { config: string; set: string; count: number }>()\n for (const record of records) {\n for (const [position, embedding] of (record.embeddings ?? []).entries()) {\n const vector = embedding.embedding ?? embedding.vector\n if (!vector || vector.length !== 768) {\n addLoss(losses, 'aiwg-embedding-dimension-unrepresentable',\n 'Only 768-dimensional vectors satisfy the full-v1 authority.', {\n component: 'embeddings', record_id: embedding.id ?? `${record.id}:${position}`,\n field_path: '/vector', source_state: vector ? 'value' : 'absent',\n destination_capability: '768-dimensional-vector', action: 'omit',\n })\n continue\n }\n const model = embedding.model ?? 'aiwg-unknown'\n if (!embedding.model) addLoss(losses, 'aiwg-embedding-model-unavailable',\n 'Embedding model defaulted because AIWG did not supply one.', {\n component: 'embeddings', record_id: embedding.id ?? `${record.id}:${position}`,\n field_path: '/model', source_state: 'absent', action: 'default',\n })\n let group = embeddingGroups.get(model)\n if (!group) {\n group = { config: uuid('embedding-config', model), set: uuid('embedding-set', model), count: 0 }\n embeddingGroups.set(model, group)\n }\n group.count += 1\n const unmappedEmbeddingFields = [\n embedding.granularity !== undefined ? 'granularity' : null,\n embedding.source_path !== undefined ? 'source_path' : null,\n embedding.metadata !== undefined ? 'metadata' : null,\n embedding.input_hash !== undefined && !/^[0-9a-f]{64}$/.test(embedding.input_hash)\n ? 'input_hash' : null,\n ].filter((field): field is string => field !== null)\n if (unmappedEmbeddingFields.length > 0) addLoss(losses, 'aiwg-embedding-fields-unmapped',\n 'AIWG embedding fields without a native full-v1 field were omitted.', {\n component: 'embeddings', record_id: embedding.id ?? `${record.id}:${position}`,\n source_state: 'value', action: 'omit', destination_capability: 'native-embedding-fields',\n reason: unmappedEmbeddingFields.join(','),\n })\n rows.get('embeddings')!.push({\n id: uuid('embedding', embedding.id ?? `${record.id}:${position}`),\n note_id: noteIds.get(record.id)!, embedding_set_id: group.set, chunk_index: position,\n text: record.text ?? '', vector, model,\n contract_fingerprint: /^[0-9a-f]{64}$/.test(embedding.input_hash ?? '') ? embedding.input_hash : null,\n created_at: new Date(record.updated_at).toISOString(),\n })\n }\n }\n for (const [model, group] of [...embeddingGroups].sort(([a], [b]) => a.localeCompare(b))) {\n rows.get('embedding_configs')!.push({\n id: group.config, name: model, description: null, model, dimension: 768,\n chunk_size: 1, chunk_overlap: 0, hnsw_m: null, hnsw_ef_construction: null,\n ivfflat_lists: null, is_default: null, supports_mrl: null, matryoshka_dims: null,\n default_truncate_dim: null, provider: null, provider_config: null, content_types: null,\n strengths: null, limitations: null, recommended_for: null, benchmark_scores: null,\n is_available: null, document_composition: {}, created_at: exportedAt, updated_at: exportedAt,\n })\n rows.get('embedding_sets')!.push({\n id: group.set, name: model, slug: uuid('embedding-slug', model), description: null,\n purpose: null, usage_hints: null, keywords: null, set_type: 'full', mode: 'manual',\n criteria: null, embedding_config_id: group.config, truncate_dim: null,\n auto_embed_rules: null, index_status: 'ready', index_type: null,\n last_indexed_at: exportedAt, document_count: null, embedding_count: group.count,\n embeddings_current: true, index_size_bytes: null, is_system: false, is_active: true,\n auto_refresh: false, refresh_interval: null, last_refresh_at: null, agent_metadata: null,\n created_at: exportedAt, updated_at: exportedAt, created_by: 'aiwg-index',\n })\n const noteIdSet = new Set(rows.get('embeddings')!\n .filter((item) => item.embedding_set_id === group.set).map((item) => item.note_id as string))\n for (const noteId of [...noteIdSet].sort()) rows.get('embedding_set_members')!.push({\n embedding_set_id: group.set, note_id: noteId, membership_type: 'materialized',\n added_at: exportedAt, added_by: 'aiwg-index',\n })\n }\n\n if (losses.length > 0) {\n return {\n success: false,\n archive: null,\n profile: 'full-v1',\n schema_version: '2.0.0',\n lossless: false,\n losses,\n receipt: {\n schema_version: 'fortemi.aiwg-full-v1-conversion-receipt.v1',\n source_schema_version: 'aiwg.fortemi.index.export.v2',\n authority_repository: authorityReceipt.source.repository,\n authority_commit: authorityReceipt.source.commit,\n authority_contract_sha256: authorityReceipt.source.contractSha256,\n authority_schema_bundle_sha256: authorityReceipt.schemaBundle.sha256,\n manifest_sha256: null,\n component_checksums: {},\n contract_valid: false,\n signed: false,\n },\n }\n }\n\n const files = new Map<string, Uint8Array>()\n const components = Object.keys(FULL_V1_COMPONENT_FILES) as ShardComponent[]\n const counts: ShardManifest['counts'] = { community_sets: 0 }\n for (const component of components) {\n const spec = FULL_V1_COMPONENT_FILES[component]\n const componentRows = rows.get(component) ?? []\n files.set(spec.file, encode(componentRows, spec.encoding))\n counts[component] = componentRows.length\n }\n const checksums: Record<string, string> = {}\n for (const [file, bytes] of files) checksums[file] = await sha256Hex(bytes)\n const manifest: ShardManifest = {\n version: '2.0.0', profile: 'full-v1',\n producer: { name: 'fortemi-core-aiwg-index', version: options.matricVersion ?? 'fortemi-core' },\n format: SHARD_FORMAT, created_at: exportedAt, components, counts, checksums,\n min_reader_version: '2.0.0',\n }\n const manifestBytes = encoder.encode(JSON.stringify(manifest, null, 2))\n files.set('manifest.json', manifestBytes)\n const validation = await validateFullV1ShardArchive(files)\n if (!validation.valid) {\n throw new Error(`Generated AIWG full-v1 shard failed authority validation: ${validation.errors.join('; ')}`)\n }\n return {\n success: true,\n archive: packTarGz(files), profile: 'full-v1', schema_version: '2.0.0',\n lossless: losses.length === 0, losses,\n receipt: {\n schema_version: 'fortemi.aiwg-full-v1-conversion-receipt.v1',\n source_schema_version: 'aiwg.fortemi.index.export.v2',\n authority_repository: authorityReceipt.source.repository,\n authority_commit: authorityReceipt.source.commit,\n authority_contract_sha256: authorityReceipt.source.contractSha256,\n authority_schema_bundle_sha256: authorityReceipt.schemaBundle.sha256,\n manifest_sha256: await sha256Hex(manifestBytes), component_checksums: checksums,\n contract_valid: true, signed: false,\n },\n }\n}\n","import type { AiwgFortemiIndexExport, AiwgFortemiRecord } from './aiwg-index.js'\nimport { validateAiwgFortemiIndexExport } from './aiwg-index.js'\nimport { sha256Hex as shardSha256Hex } from './shard/checksum.js'\nimport { validateCoreV1ShardArchive } from './shard/schema-validator.js'\nimport { packTarGz, unpackTarGz } from './shard/shard-tar.js'\nimport {\n CURRENT_SHARD_VERSION,\n SHARD_FORMAT,\n type ShardComponent,\n type ShardLink,\n type ShardManifest,\n type ShardNote,\n} from './shard/types.js'\nimport { v5 as uuidv5 } from 'uuid'\nimport {\n convertAiwgIndexToFullV1,\n type AiwgFullV1ConversionResult,\n} from './aiwg-index-full-shard.js'\n\nexport interface AiwgKnowledgeShardOptions {\n createdAt?: string\n matricVersion?: string\n /** Use the report-bearing entry point for rich conversion. */\n includeNativeRichComponents?: boolean\n}\n\nexport type AiwgKnowledgeShardConversionResult = AiwgFullV1ConversionResult\n\nconst AIWG_SHARD_UUID_NAMESPACE = '7ab5d1f8-29d2-5e35-9e2f-3a45de171a9e'\nconst shardEncoder = new TextEncoder()\nconst shardDecoder = new TextDecoder()\n\nfunction aiwgShardUuid(kind: string, id: string): string {\n return uuidv5(`${kind}:${id}`, AIWG_SHARD_UUID_NAMESPACE)\n}\n\nfunction aiwgShardTimestamp(value: string | undefined, fallback: string): string {\n if (!value || Number.isNaN(Date.parse(value))) return fallback\n return new Date(value).toISOString()\n}\n\nfunction aiwgRecordTitle(record: AiwgFortemiRecord): string {\n return record.title ?? record.search?.title ?? record.search?.name ?? record.id\n}\n\nfunction aiwgRecordContent(record: AiwgFortemiRecord): string {\n if (record.text) return record.text\n if (record.search?.body) return record.search.body\n const chunks = record.chunks\n ?.map((chunk) => chunk.text ?? chunk.body ?? chunk.summary ?? '')\n .filter(Boolean)\n if (chunks?.length) return chunks.join('\\n\\n')\n return record.search?.summary ?? ''\n}\n\nfunction aiwgShardMetadata(\n index: AiwgFortemiIndexExport,\n record: AiwgFortemiRecord,\n): Record<string, unknown> {\n return {\n aiwg_fortemi_index: {\n envelope: {\n schema_version: index.schema_version,\n generated_at: index.generated_at,\n source: index.source,\n ...(index.compatibility ? { compatibility: index.compatibility } : {}),\n },\n record,\n },\n }\n}\n\nfunction encodeJsonLines(values: unknown[]): Uint8Array {\n return shardEncoder.encode(values.map((value) => JSON.stringify(value)).join('\\n'))\n}\n\n/**\n * Convert the static AIWG/Fortemi v2 index contract into a portable Knowledge\n * Shard. Every note retains the complete source envelope and record in metadata,\n * so the native note/link/SKOS/provenance projections are reversible.\n */\nexport async function aiwgFortemiIndexToKnowledgeShard(\n index: AiwgFortemiIndexExport,\n options: AiwgKnowledgeShardOptions = {},\n): Promise<Uint8Array> {\n if (options.includeNativeRichComponents) {\n throw new Error(\n 'Native AIWG full-v1 conversion requires aiwgFortemiIndexToKnowledgeShardWithReport so semantic losses cannot be discarded',\n )\n }\n const validation = validateAiwgFortemiIndexExport(index)\n if (!validation.valid) {\n throw new Error(`Invalid AIWG Fortemi index export:\\n${validation.errors.join('\\n')}`)\n }\n if (index.schema_version !== 'aiwg.fortemi.index.export.v2') {\n throw new Error('Knowledge Shard conversion requires aiwg.fortemi.index.export.v2')\n }\n const createdAt = aiwgShardTimestamp(options.createdAt ?? index.generated_at, new Date().toISOString())\n const noteIds = new Map(index.items.map((record) => [record.id, aiwgShardUuid('record', record.id)]))\n const notes: ShardNote[] = index.items.map((record) => {\n const content = aiwgRecordContent(record)\n return {\n id: noteIds.get(record.id)!,\n title: aiwgRecordTitle(record),\n original_content: content,\n revised_content: content,\n metadata: aiwgShardMetadata(index, record),\n collection_id: null,\n attachments: [],\n format: 'markdown',\n source: 'aiwg-index',\n starred: false,\n archived: false,\n tags: [...new Set(record.tags)].sort(),\n created_at: aiwgShardTimestamp(record.source.updated_at ?? record.updated_at, createdAt),\n updated_at: aiwgShardTimestamp(record.updated_at, createdAt),\n deleted_at: null,\n }\n })\n\n const links: ShardLink[] = []\n for (const record of index.items) {\n for (const [position, relationship] of record.relationships.entries()) {\n const targetNoteId = noteIds.get(relationship.target_id) ?? null\n links.push({\n id: aiwgShardUuid(\n 'relationship',\n `${record.id}\\u0000${position}\\u0000${relationship.type}\\u0000${relationship.target_id}`,\n ),\n from_note_id: noteIds.get(record.id)!,\n to_note_id: targetNoteId,\n to_url: targetNoteId ? null : `aiwg://record/${encodeURIComponent(relationship.target_id)}`,\n kind: relationship.type,\n score: relationship.confidence ?? 1,\n created_at: aiwgShardTimestamp(record.updated_at, createdAt),\n metadata: {\n aiwg_fortemi_index: {\n source_record_id: record.id,\n target_record_id: relationship.target_id,\n relationship,\n },\n },\n })\n }\n }\n\n const files = new Map<string, Uint8Array>()\n const components: ShardComponent[] = ['notes', 'tags']\n const counts: ShardManifest['counts'] = {\n notes: notes.length,\n tags: [...new Set(notes.flatMap((note) => note.tags))].length,\n }\n files.set('notes.jsonl', encodeJsonLines(notes))\n files.set('tags.json', shardEncoder.encode(JSON.stringify(\n [...new Set(notes.flatMap((note) => note.tags))]\n .sort()\n .map((name) => ({ name, created_at: createdAt })),\n )))\n\n const addComponent = (\n component: ShardComponent,\n filename: string,\n values: unknown[],\n jsonLines = true,\n ) => {\n if (values.length === 0) return\n components.push(component)\n counts[component] = values.length\n files.set(filename, jsonLines ? encodeJsonLines(values) : shardEncoder.encode(JSON.stringify(values)))\n }\n addComponent('links', 'links.jsonl', links)\n\n const checksums: Record<string, string> = {}\n for (const [filename, bytes] of files) checksums[filename] = await shardSha256Hex(bytes)\n const manifest: ShardManifest = {\n version: CURRENT_SHARD_VERSION,\n profile: 'core-v1',\n producer: {\n name: 'fortemi-core-aiwg-index',\n version: options.matricVersion ?? 'fortemi-core',\n },\n format: SHARD_FORMAT,\n created_at: createdAt,\n components,\n counts: {\n notes: 0,\n collections: 0,\n tags: 0,\n templates: 0,\n links: 0,\n embedding_sets: 0,\n embedding_set_members: 0,\n embeddings: 0,\n embedding_configs: 0,\n ...counts,\n },\n checksums,\n min_reader_version: CURRENT_SHARD_VERSION,\n }\n files.set('manifest.json', shardEncoder.encode(JSON.stringify(manifest, null, 2)))\n const contractValidation = await validateCoreV1ShardArchive(files)\n if (!contractValidation.valid) {\n throw new Error(\n `Generated AIWG core-v1 shard failed canonical validation: ${contractValidation.errors.join('; ')}`,\n )\n }\n return packTarGz(files)\n}\n\n/** Convert AIWG v2 into exact 2.0.0/full-v1 with mandatory loss evidence. */\nexport async function aiwgFortemiIndexToKnowledgeShardWithReport(\n index: AiwgFortemiIndexExport,\n options: Omit<AiwgKnowledgeShardOptions, 'includeNativeRichComponents'> = {},\n): Promise<AiwgKnowledgeShardConversionResult> {\n const validation = validateAiwgFortemiIndexExport(index)\n if (!validation.valid) {\n throw new Error(`Invalid AIWG Fortemi index export:\\n${validation.errors.join('\\n')}`)\n }\n if (index.schema_version !== 'aiwg.fortemi.index.export.v2') {\n throw new Error('Full-v1 Knowledge Shard conversion requires aiwg.fortemi.index.export.v2')\n }\n return convertAiwgIndexToFullV1(index, options)\n}\n\n/**\n * Recover the exact AIWG index envelope and records embedded by\n * {@link aiwgFortemiIndexToKnowledgeShard}.\n */\nexport function aiwgFortemiIndexFromKnowledgeShard(bytes: Uint8Array): AiwgFortemiIndexExport {\n const files = unpackTarGz(bytes)\n const noteBytes = files.get('notes.jsonl')\n const notes = (noteBytes ? shardDecoder.decode(noteBytes) : '')\n .split('\\n')\n .filter(Boolean)\n .map((line) => JSON.parse(line) as ShardNote)\n if (notes.length === 0) throw new Error('Knowledge Shard contains no AIWG index notes')\n\n let envelope: Record<string, unknown> | undefined\n const items: AiwgFortemiRecord[] = []\n for (const note of notes) {\n const metadata = (\n note.metadata\n && typeof note.metadata === 'object'\n && !Array.isArray(note.metadata)\n )\n ? (note.metadata as Record<string, unknown>).aiwg_fortemi_index\n : undefined\n if (!metadata || typeof metadata !== 'object' || Array.isArray(metadata)) {\n throw new Error(`Knowledge Shard note ${note.id} has no AIWG index metadata`)\n }\n const value = metadata as Record<string, unknown>\n envelope ??= value.envelope as Record<string, unknown>\n items.push(value.record as AiwgFortemiRecord)\n }\n const restored = {\n ...envelope,\n items: items.sort((left, right) => left.id.localeCompare(right.id)),\n } as unknown as AiwgFortemiIndexExport\n const validation = validateAiwgFortemiIndexExport(restored)\n if (!validation.valid) {\n throw new Error(`Knowledge Shard contains invalid AIWG index metadata:\\n${validation.errors.join('\\n')}`)\n }\n return restored\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/aiwg-index.ts","../schemas/aiwg-fortemi-index-export.schema.json","../src/aiwg-index-schema.ts","../src/shard/checksum.ts","../schemas/knowledge-shard/1.0.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/note.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/collection.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/tag.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/template.schema.json","../schemas/knowledge-shard/1.0.0/core-v1/link.schema.json","../schemas/knowledge-shard/1.1.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/1.1.0/full-v1/manifest.schema.json","../schemas/knowledge-shard/1.1.0/full-v1/embedding.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/note.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/collection.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/tag.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/template.schema.json","../schemas/knowledge-shard/1.2.0/core-v1/link.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/manifest.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-original.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-original-history.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-revised-current.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-revision.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding-config.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding-set.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding-set-member.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/embedding.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-edge.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-activity.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/named-location.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-location.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-device.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/provenance-record.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-concept.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-label.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-note.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-relation.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-mapping-relation.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme-membership.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/note-skos-tag.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-collection.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/skos-collection-member.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/graph-source.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/graph-edge.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/community-set.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/community-assignment.schema.json","../schemas/knowledge-shard/1.2.0/full-v1/signature.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/manifest.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/note.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/collection.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/tag.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/template.schema.json","../schemas/knowledge-shard/2.0.0/core-v1/link.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/manifest.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-original.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-original-history.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-revised-current.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-revision.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding-config.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding-set.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding-set-member.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/embedding.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-edge.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-activity.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/named-location.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-location.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-device.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/provenance-record.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-concept.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-label.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-note.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-relation.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-mapping-relation.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme-membership.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/note-skos-tag.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-collection.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/skos-collection-member.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/graph-source.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/graph-edge.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/community-set.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/community-assignment.schema.json","../schemas/knowledge-shard/2.0.0/full-v1/signature.schema.json","../src/shard/shard-tar.ts","../src/shard/types.ts","../src/hash.ts","../src/shard/blob-sidecar.ts","../src/shard/schema-validator.ts","../schemas/knowledge-shard-v2.schema.receipt.json","../src/aiwg-index-full-shard.ts","../src/aiwg-index-shard.ts"],"names":["Ajv2020","manifest_schema_default","note_schema_default","collection_schema_default","tag_schema_default","template_schema_default","link_schema_default","embedding_schema_default","note_original_schema_default","note_original_history_schema_default","note_revised_current_schema_default","note_revision_schema_default","embedding_config_schema_default","embedding_set_schema_default","embedding_set_member_schema_default","provenance_edge_schema_default","provenance_activity_schema_default","named_location_schema_default","provenance_location_schema_default","provenance_device_schema_default","provenance_record_schema_default","skos_scheme_schema_default","skos_concept_schema_default","skos_label_schema_default","skos_note_schema_default","skos_relation_schema_default","skos_mapping_relation_schema_default","skos_scheme_membership_schema_default","note_skos_tag_schema_default","skos_collection_schema_default","skos_collection_member_schema_default","graph_source_schema_default","graph_edge_schema_default","community_set_schema_default","community_assignment_schema_default","signature_schema_default","formatErrors","uuidv5","createdAt"],"mappings":";;;;;;;;AA0lBA,IAAM,sBAAA,GAAyD;AAAA,EAC7D,gBAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA;AAYA,SAAS,UAAU,KAAA,EAAiC;AAClD,EAAA,OAAO,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,CAAM,MAAA,GAAS,CAAA;AACrD;AAkCA,SAAS,cAAc,KAAA,EAAkD;AACvE,EAAA,OAAO,CAAC,CAAC,KAAA,IAAS,OAAO,UAAU,QAAA,IAAY,CAAC,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C9E;AACA,IAAA,MAAM,KAAA,GAAQ,QAAA;AACd,IAAA,QAAA,KAAa,KAAA,CAAM,QAAA;AACnB,IAAA,KAAA,CAAM,IAAA,CAAK,MAAM,MAA2B,CAAA;AAAA,EAC9C;AACA,EAAA,MAAM,QAAA,GAAW;AAAA,IACf,GAAG,QAAA;AAAA,IACH,KAAA,EAAO,KAAA,CAAM,IAAA,CAAK,CAAC,IAAA,EAAM,KAAA,KAAU,IAAA,CAAK,EAAA,CAAG,aAAA,CAAc,KAAA,CAAM,EAAE,CAAC;AAAA,GACpE;AACA,EAAA,MAAM,UAAA,GAAa,+BAA+B,QAAQ,CAAA;AAC1D,EAAA,IAAI,CAAC,WAAW,KAAA,EAAO;AACrB,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA;AAAA,EAA0D,UAAA,CAAW,MAAA,CAAO,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,EAC1G;AACA,EAAA,OAAO,QAAA;AACT","file":"aiwg-index-shard.js","sourcesContent":["export type AiwgFortemiRecordType = string\n\nexport type AiwgFortemiRecordSchemaVersion = 'aiwg.fortemi.index.record.v1' | 'aiwg.fortemi.index.record.v2'\nexport type AiwgFortemiIndexExportSchemaVersion = 'aiwg.fortemi.index.export.v1' | 'aiwg.fortemi.index.export.v2'\nexport type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public'\nexport type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected'\nexport type AiwgReviewAction = 'accept' | 'reject' | 'defer'\nexport type AiwgFortemiRelationshipDirection = 'upstream' | 'downstream' | 'related'\nexport type AiwgOperationalStateClassification =\n | 'fresh'\n | 'historical'\n | 'superseded'\n | 'contradicted'\n | 'needs-source'\nexport type AiwgOperationalStateConfidence =\n | 'source'\n | 'candidate'\n | 'reviewed'\n | 'rejected'\n\nexport interface AiwgFortemiRecordSource {\n path: string\n repo_relative_path: string\n locator: string\n origin?: string\n generated?: boolean\n checksum?: string\n updated_at?: string\n}\n\nexport interface AiwgFortemiRelationship {\n type: string\n target_id: string\n source_path?: string\n target_path?: string\n direction?: AiwgFortemiRelationshipDirection\n label?: string\n confidence?: number\n privacy?: AiwgPrivacyClassification\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiProvenance {\n field: string\n source: string\n path: string\n confidence: AiwgProvenanceConfidence\n privacy: AiwgPrivacyClassification\n}\n\nexport type AiwgFortemiSkosRelationType = 'broader' | 'narrower' | 'related' | string\n\nexport interface AiwgFortemiSkosConcept {\n id: string\n prefLabel: string\n definition?: string\n scheme?: string\n notation?: string\n uri?: string\n altLabels?: string[]\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiSkosRelation {\n type: AiwgFortemiSkosRelationType\n source_id: string\n target_id: string\n source_path?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiProvenanceEvent {\n id?: string\n activity: string\n agent?: string\n started_at?: string\n ended_at?: string\n source?: string\n path?: string\n confidence?: AiwgProvenanceConfidence\n privacy?: AiwgPrivacyClassification\n attributes?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiSearchProjection {\n title?: string\n name?: string\n summary?: string\n body?: string\n triggers?: string[]\n aliases?: string[]\n capability?: string\n tags?: string[]\n phase?: string\n type?: string\n frontmatter?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiChunk {\n id?: string\n text?: string\n body?: string\n summary?: string\n source_path?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiRecordEmbedding {\n id?: string\n embedding?: number[]\n vector?: number[]\n model?: string\n granularity?: string\n input_hash?: string\n source_path?: string\n metadata?: Record<string, unknown>\n}\n\nexport interface AiwgFortemiAttachmentReference {\n id: string\n path: string\n mime: string | null\n checksum: string\n bytes: number\n}\n\nexport interface AiwgFortemiBinarySource {\n extracted_text: string | null\n created_at?: string\n deleted_at?: string | null\n extraction_status?: 'extracted' | 'pending' | 'failed' | 'blocked' | 'deferred'\n reason?:\n | null\n | 'extraction_pending'\n | 'extractor_failed'\n | 'quarantined'\n | 'large_binary'\n | 'unsupported_mime'\n | 'no_extracted_text'\n attachment: AiwgFortemiAttachmentReference\n}\n\nexport interface AiwgOperationalState {\n source_repo?: string\n source_kind?: string\n source_id?: string\n observed_state?: string\n observed_at?: string\n source_updated_at?: string\n evidence_url?: string\n evidence_path?: string\n observer?: string\n supersedes?: string[]\n contradicts?: string[]\n stale_after?: string\n classification: AiwgOperationalStateClassification\n confidence?: AiwgOperationalStateConfidence\n current_action_selector?: boolean\n}\n\nexport interface AiwgStateTransfer {\n deleted_at: string | null\n}\n\nexport interface AiwgFortemiRecord {\n schema_version: AiwgFortemiRecordSchemaVersion\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 search?: AiwgFortemiSearchProjection\n chunks?: AiwgFortemiChunk[]\n binary_sources?: AiwgFortemiBinarySource[]\n embeddings?: AiwgFortemiRecordEmbedding[]\n compatibility?: Record<string, unknown>\n /** Optional rich SKOS metadata for static consumers that need labels/definitions without opening a shard. */\n skos_concepts?: AiwgFortemiSkosConcept[]\n /** Optional SKOS relationship edges among concepts referenced by this record. */\n skos_relations?: AiwgFortemiSkosRelation[]\n /** Optional W3C PROV-style activity chain for this record. */\n provenance_events?: AiwgFortemiProvenanceEvent[]\n /** Observed external state provenance. This is not a persistence tombstone. */\n operational_state?: AiwgOperationalState\n /** Source-authored state projected into portable persistence semantics. */\n state_transfer?: AiwgStateTransfer\n privacy: {\n classification: AiwgPrivacyClassification\n pii: boolean\n locality?: string\n }\n updated_at: string\n}\n\nexport interface AiwgFortemiIndexExport {\n schema_version: AiwgFortemiIndexExportSchemaVersion\n generated_at: string\n source: {\n repo: string\n privacy: AiwgPrivacyClassification\n // v2-only upstream graph name; the vendored schema is authoritative.\n graph?: string\n }\n items: AiwgFortemiRecord[]\n // v2-only compatibility declaration defined by the vendored upstream schema.\n compatibility?: {\n previous_schema_version: 'aiwg.fortemi.index.export.v1'\n strategy: 'supported'\n }\n}\n\nexport interface AiwgFortemiChunkPartRef {\n href: string\n offset: number\n count: number\n}\n\n// Fields a scan part must retain for query/browse/rank/facet to work. The rest\n// (source, provenance, relationships, updated_at) are detail-only and may be\n// dropped from scan parts via `projection`, then resolved on demand by id.\nexport const AIWG_SCAN_REQUIRED_FIELDS: Array<keyof AiwgFortemiRecord> = [\n 'schema_version',\n 'id',\n 'type',\n 'title',\n 'text',\n 'facets',\n 'tags',\n 'concepts',\n 'privacy',\n]\n\n// A record as it appears in a scan part. With no manifest `projection`, this is a\n// full AiwgFortemiRecord. With a projection, detail-only fields are absent — read\n// them via the controller's getRecord(). Typed as the full record for ergonomics;\n// query/browse code guards the projectable fields.\nexport type AiwgFortemiProjectedRecord =\n Pick<AiwgFortemiRecord, 'schema_version' | 'id' | 'type' | 'title' | 'text' | 'facets' | 'tags' | 'concepts' | 'privacy'>\n & Partial<AiwgFortemiRecord>\n\n// How a record id is encoded into a detail filename/path segment.\n// - 'base64url': path-safe, single segment, no '%' — works on every static host,\n// including ids containing '/' (default for new builds; see #177).\n// - 'uri': encodeURIComponent — legacy. Breaks for ids containing '/' on static\n// servers that reject %2F (path-traversal protection → 404).\nexport type AiwgDetailIdEncoding = 'uri' | 'base64url'\n\n// How the controller resolves a full record by id when scan parts are projected.\nexport interface AiwgFortemiChunkDetailRef {\n // href template containing `{id}`, relative to the manifest base — e.g.\n // \"detail/{id}.json\". The `{id}` is encoded per `encoding` at substitution.\n href: string\n // id→segment encoding. Absent is treated as 'uri' for backward compatibility\n // with manifests built before #177; new builds default to 'base64url'.\n encoding?: AiwgDetailIdEncoding\n}\n\nexport interface AiwgFortemiChunkManifest {\n schema_version: 'aiwg.fortemi.index.chunk-manifest.v1'\n generated_at: string\n source: AiwgFortemiIndexExport['source']\n // The schema_version of the source index export this manifest was built from,\n // so chunked consumers (e.g. review-decision export) can report the true source\n // version rather than assuming v1 (#239 E8). Optional for backward compatibility.\n source_export_schema_version?: AiwgFortemiIndexExportSchemaVersion\n total: number\n part_size: number\n facets?: Record<string, Record<string, number>>\n // Field names present in scan-part items. Absent → scan parts carry whole records.\n // When set, must include AIWG_SCAN_REQUIRED_FIELDS.\n projection?: Array<keyof AiwgFortemiRecord>\n // Resolver for full records by id (used with `projection` to lazy-load detail).\n detail?: AiwgFortemiChunkDetailRef\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<string, 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 searchProfile?: 'default' | 'aiwg-discovery'\n}\n\nexport interface AiwgIndexQueryWeights {\n title: number\n text: number\n tag: number\n concept: number\n facet: number\n id: number\n source: number\n}\n\nexport interface AiwgIndexQueryMatch {\n field: 'title' | 'text' | 'tag' | 'concept' | 'facet' | 'id' | 'source'\n value: string\n score?: number\n reason?: 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\n// Resolves a full record by id (used with projected scan parts). Returns the\n// parsed record JSON; validated by the controller before use.\nexport type AiwgChunkedIndexDetailLoader = (\n id: string,\n manifest: AiwgFortemiChunkManifest,\n) => Promise<unknown>\n\nexport interface AiwgChunkedIndexLoadOptions {\n maxCachedParts?: number\n // Required to resolve detail for projected indexes via getRecord(); ignored otherwise.\n detailLoader?: AiwgChunkedIndexDetailLoader\n maxCachedDetails?: number\n // Bounds the filtered/ranked match-set cache used to page a query without\n // re-scanning every part. Counts total cached entries across all queries\n // (LRU-evicted). Defaults to 5000. The cache is keyed on query + filters +\n // weights, so paging the same query (varying only offset/limit/sort/snippets)\n // reuses the scan; see queryChunked.\n maxCachedMatches?: 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: AiwgFortemiIndexExportSchemaVersion\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 type AiwgRelationshipDirection = 'in' | 'out' | 'both'\nexport type AiwgRelationshipSetOperation = 'intersection' | 'union' | 'difference'\n\nexport interface AiwgRelationshipTraversalOptions {\n direction?: AiwgRelationshipDirection\n relationshipType?: string\n relationshipDirection?: AiwgFortemiRelationshipDirection\n limit?: number\n}\n\nexport interface AiwgRelationshipQueryOptions extends AiwgRelationshipTraversalOptions {\n sourceId?: string\n targetId?: string\n endpointId?: string\n type?: string\n}\n\nexport interface AiwgRelationshipEdgeSummary {\n source_id: string\n target_id: string\n type: string\n source_path?: string\n target_path?: string\n direction?: AiwgFortemiRelationshipDirection\n}\n\nexport interface AiwgRelationshipNodeSummary {\n id: string\n type: AiwgFortemiRecordType\n title: string\n}\n\nexport interface AiwgRelationshipTraversalResult {\n nodes: AiwgRelationshipNodeSummary[]\n edges: AiwgRelationshipEdgeSummary[]\n complete: boolean\n scannedParts?: number\n fetchedParts?: number\n}\n\nexport interface AiwgRelationshipSetOptions extends AiwgRelationshipTraversalOptions {\n op: AiwgRelationshipSetOperation\n a: string\n b: string\n}\n\nexport interface AiwgRelationshipSetResult {\n ids: string[]\n op: AiwgRelationshipSetOperation\n}\n\nexport interface AiwgStaticEmbeddingRecord {\n record_id: string\n embedding: number[]\n embedding_id?: string\n granularity?: string\n input_hash: string\n source_path?: string\n}\n\nexport interface AiwgStaticEmbeddingSet {\n schema_version: 'aiwg.fortemi.embedding.set.v1'\n id: string\n model: string\n dimensions: number\n generated_at: string\n granularity: 'title-summary' | 'body' | 'chunked-body' | string\n metric?: 'cosine' | 'dot' | 'euclidean'\n input_hash_algorithm?: string\n embeddings: AiwgStaticEmbeddingRecord[]\n}\n\nexport interface AiwgHeadlessEmbeddingBackend {\n model: string\n dimensions: number\n embed(input: string, record: AiwgFortemiRecord): number[] | Promise<number[]>\n}\n\n// Privacy filtering for generated index/embedding artifacts (SEC6). Generation\n// is default-safe: records classified `private`, or flagged `pii`, are excluded\n// unless the caller explicitly opts them in. This keeps the query-time privacy\n// gate from being the *only* enforcement point — a leaked embedding set or scan\n// part can no longer carry private/PII-derived vectors by default.\nexport interface AiwgPrivacyFilterOptions {\n /** Include records classified `private` (default false). */\n includePrivate?: boolean\n /** Include records flagged `pii` (default false). */\n includePii?: boolean\n}\n\nfunction isPrivacyExcluded(record: AiwgFortemiRecord, options?: AiwgPrivacyFilterOptions): boolean {\n const privacy = record.privacy\n if (!privacy || !isPrivacyClassification(privacy.classification) || typeof privacy.pii !== 'boolean') return true\n if (privacy.classification === 'private' && !options?.includePrivate) return true\n if (privacy.pii && !options?.includePii) return true\n return false\n}\n\n/** Drop `private`/`pii` records unless explicitly opted in (SEC6, default-safe). */\nexport function filterAiwgRecordsByPrivacy(\n records: AiwgFortemiRecord[],\n options?: AiwgPrivacyFilterOptions,\n): AiwgFortemiRecord[] {\n return records.filter((record) => !isPrivacyExcluded(record, options))\n}\n\nexport interface BuildAiwgStaticEmbeddingSetOptions {\n id: string\n backend: AiwgHeadlessEmbeddingBackend\n records?: AiwgFortemiRecord[]\n generatedAt?: string | Date\n granularity?: AiwgStaticEmbeddingSet['granularity']\n metric?: AiwgStaticEmbeddingSet['metric']\n textForRecord?: (record: AiwgFortemiRecord) => string\n /** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */\n privacy?: AiwgPrivacyFilterOptions\n}\n\nexport interface AiwgStaticSemanticQueryOptions {\n limit?: number\n offset?: number\n minScore?: number\n}\n\nexport interface AiwgStaticSemanticResult {\n item: AiwgFortemiRecord\n score: number\n embedding?: AiwgStaticEmbeddingRecord\n}\n\nexport interface AiwgStaticHybridQueryOptions extends AiwgStaticSemanticQueryOptions, AiwgIndexQueryOptions {\n lexicalWeight?: number\n semanticWeight?: number\n}\n\nexport interface AiwgStaticDuplicatePair {\n left: AiwgFortemiRecord\n right: AiwgFortemiRecord\n score: number\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 // Resolve a full record by id. For a projected chunked index, fetches detail via\n // the detailLoader (bounded cache); for a whole-record index/parts, returns the\n // record from loaded data. Rejects if detail is unavailable.\n getRecord(id: string): Promise<AiwgFortemiRecord>\n neighbors(id: string, options?: AiwgRelationshipTraversalOptions): Promise<AiwgRelationshipTraversalResult>\n relationshipQuery(options?: AiwgRelationshipQueryOptions): Promise<AiwgRelationshipTraversalResult>\n relationshipSet(options: AiwgRelationshipSetOptions): Promise<AiwgRelationshipSetResult>\n clearChunkCache(): void\n toCommunityGraph(options?: AiwgIndexGraphOptions): ReturnType<typeof aiwgFortemiIndexToCommunityGraph>\n toCommunityGraphChunked(options?: AiwgIndexGraphOptions & { onProgress?: (progress: AiwgChunkedIndexProgress) => void }): Promise<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 'facets',\n 'tags',\n 'concepts',\n 'relationships',\n 'provenance',\n 'privacy',\n 'updated_at',\n]\n\nconst DEFAULT_QUERY_WEIGHTS: AiwgIndexQueryWeights = {\n title: 4,\n tag: 3,\n concept: 2,\n text: 1,\n facet: 2,\n id: 1,\n source: 0.25,\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 // `name`/`value` come from untrusted index records (item.facets). Using a\n // prototype-bearing accumulator would let a key such as `__proto__` (or any\n // inherited name like `toString`) read through the prototype chain and mutate\n // shared built-ins. Null-prototype buckets make every access own-property\n // only, so exotic keys are counted as plain data. See SEC1 / #236.\n let bucket = counts[name]\n if (bucket === undefined) {\n bucket = Object.create(null) as Record<string, number>\n counts[name] = bucket\n }\n bucket[value] = (bucket[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\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction isOptionalStringArray(value: unknown): boolean {\n return value === undefined || (Array.isArray(value) && value.every((item) => typeof item === 'string'))\n}\n\nfunction isSupportedIndexSchemaVersion(value: unknown): value is AiwgFortemiIndexExportSchemaVersion {\n return value === 'aiwg.fortemi.index.export.v1' || value === 'aiwg.fortemi.index.export.v2'\n}\n\nfunction isSupportedRecordSchemaVersion(value: unknown): value is AiwgFortemiRecordSchemaVersion {\n return value === 'aiwg.fortemi.index.record.v1' || value === 'aiwg.fortemi.index.record.v2'\n}\n\nfunction validateOptionalRichMetadata(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n if (item.skos_concepts !== undefined) {\n if (!Array.isArray(item.skos_concepts)) {\n errors.push('items[' + index + '].skos_concepts must be an array when present')\n } else {\n for (const [conceptIndex, concept] of item.skos_concepts.entries()) {\n if (!isPlainRecord(concept)) {\n errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '] must be an object')\n continue\n }\n if (!hasString(concept.id)) errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].id is required')\n if (!hasString(concept.prefLabel)) errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].prefLabel is required')\n if (!isOptionalStringArray(concept.altLabels)) errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].altLabels must be a string array')\n if (concept.metadata !== undefined && !isPlainRecord(concept.metadata)) {\n errors.push('items[' + index + '].skos_concepts[' + conceptIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.skos_relations !== undefined) {\n if (!Array.isArray(item.skos_relations)) {\n errors.push('items[' + index + '].skos_relations must be an array when present')\n } else {\n for (const [relationIndex, relation] of item.skos_relations.entries()) {\n if (!isPlainRecord(relation)) {\n errors.push('items[' + index + '].skos_relations[' + relationIndex + '] must be an object')\n continue\n }\n if (!hasString(relation.type)) errors.push('items[' + index + '].skos_relations[' + relationIndex + '].type is required')\n if (!hasString(relation.source_id)) errors.push('items[' + index + '].skos_relations[' + relationIndex + '].source_id is required')\n if (!hasString(relation.target_id)) errors.push('items[' + index + '].skos_relations[' + relationIndex + '].target_id is required')\n if (relation.metadata !== undefined && !isPlainRecord(relation.metadata)) {\n errors.push('items[' + index + '].skos_relations[' + relationIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.provenance_events !== undefined) {\n if (!Array.isArray(item.provenance_events)) {\n errors.push('items[' + index + '].provenance_events must be an array when present')\n } else {\n for (const [eventIndex, event] of item.provenance_events.entries()) {\n if (!isPlainRecord(event)) {\n errors.push('items[' + index + '].provenance_events[' + eventIndex + '] must be an object')\n continue\n }\n if (!hasString(event.activity)) errors.push('items[' + index + '].provenance_events[' + eventIndex + '].activity is required')\n if (event.attributes !== undefined && !isPlainRecord(event.attributes)) {\n errors.push('items[' + index + '].provenance_events[' + eventIndex + '].attributes must be an object')\n }\n }\n }\n }\n if (Array.isArray(item.relationships)) {\n for (const [relationshipIndex, relationship] of item.relationships.entries()) {\n if (!isPlainRecord(relationship)) {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '] must be an object')\n continue\n }\n if (relationship.metadata !== undefined && !isPlainRecord(relationship.metadata)) {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '].metadata must be an object')\n }\n if (\n relationship.direction !== undefined &&\n relationship.direction !== 'upstream' &&\n relationship.direction !== 'downstream' &&\n relationship.direction !== 'related'\n ) {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '].direction must be upstream, downstream, or related')\n }\n if (relationship.target_path !== undefined && typeof relationship.target_path !== 'string') {\n errors.push('items[' + index + '].relationships[' + relationshipIndex + '].target_path must be a string')\n }\n }\n }\n if (item.search !== undefined) {\n if (!isPlainRecord(item.search)) {\n errors.push('items[' + index + '].search must be an object')\n } else {\n if (!isOptionalStringArray(item.search.triggers)) errors.push('items[' + index + '].search.triggers must be a string array')\n if (!isOptionalStringArray(item.search.aliases)) errors.push('items[' + index + '].search.aliases must be a string array')\n if (!isOptionalStringArray(item.search.tags)) errors.push('items[' + index + '].search.tags must be a string array')\n if (item.search.frontmatter !== undefined && !isPlainRecord(item.search.frontmatter)) {\n errors.push('items[' + index + '].search.frontmatter must be an object')\n }\n }\n }\n if (item.chunks !== undefined) {\n if (!Array.isArray(item.chunks)) {\n errors.push('items[' + index + '].chunks must be an array when present')\n } else {\n for (const [chunkIndex, chunk] of item.chunks.entries()) {\n if (!isPlainRecord(chunk)) {\n errors.push('items[' + index + '].chunks[' + chunkIndex + '] must be an object')\n continue\n }\n if (chunk.metadata !== undefined && !isPlainRecord(chunk.metadata)) {\n errors.push('items[' + index + '].chunks[' + chunkIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.embeddings !== undefined) {\n if (!Array.isArray(item.embeddings)) {\n errors.push('items[' + index + '].embeddings must be an array when present')\n } else {\n for (const [embeddingIndex, embedding] of item.embeddings.entries()) {\n if (!isPlainRecord(embedding)) {\n errors.push('items[' + index + '].embeddings[' + embeddingIndex + '] must be an object')\n continue\n }\n const vector = embedding.embedding ?? embedding.vector\n if (vector !== undefined && (!Array.isArray(vector) || !vector.every((entry) => typeof entry === 'number'))) {\n errors.push('items[' + index + '].embeddings[' + embeddingIndex + '].embedding/vector must be a number array')\n }\n if (embedding.metadata !== undefined && !isPlainRecord(embedding.metadata)) {\n errors.push('items[' + index + '].embeddings[' + embeddingIndex + '].metadata must be an object')\n }\n }\n }\n }\n if (item.compatibility !== undefined && !isPlainRecord(item.compatibility)) {\n errors.push('items[' + index + '].compatibility must be an object')\n }\n if (item.operational_state !== undefined) {\n const at = 'items[' + index + '].operational_state'\n if (!isPlainRecord(item.operational_state)) {\n errors.push(at + ' must be an object')\n } else {\n const state = item.operational_state as Record<string, unknown>\n const allowedClassifications = new Set([\n 'fresh',\n 'historical',\n 'superseded',\n 'contradicted',\n 'needs-source',\n ])\n const allowedConfidence = new Set(['source', 'candidate', 'reviewed', 'rejected'])\n const stringFields = [\n 'source_repo',\n 'source_kind',\n 'source_id',\n 'observed_state',\n 'observed_at',\n 'source_updated_at',\n 'evidence_url',\n 'evidence_path',\n 'observer',\n 'stale_after',\n ] as const\n const arrayFields = ['supersedes', 'contradicts'] as const\n const allowedFields = new Set([\n ...stringFields,\n ...arrayFields,\n 'classification',\n 'confidence',\n 'current_action_selector',\n ])\n if (!allowedClassifications.has(String(state.classification))) {\n errors.push(at + '.classification must be fresh, historical, superseded, contradicted, or needs-source')\n }\n for (const field of stringFields) {\n if (state[field] !== undefined && !hasString(state[field])) {\n errors.push(at + '.' + field + ' must be a non-empty string')\n }\n }\n for (const field of ['observed_at', 'source_updated_at', 'stale_after'] as const) {\n if (\n state[field] !== undefined\n && (typeof state[field] !== 'string' || Number.isNaN(Date.parse(state[field])))\n ) {\n errors.push(at + '.' + field + ' must be a date-time string')\n }\n }\n for (const field of arrayFields) {\n if (!isOptionalStringArray(state[field])) {\n errors.push(at + '.' + field + ' must be a string array')\n }\n }\n if (state.confidence !== undefined && !allowedConfidence.has(String(state.confidence))) {\n errors.push(at + '.confidence must be source, candidate, reviewed, or rejected')\n }\n if (\n state.current_action_selector !== undefined\n && typeof state.current_action_selector !== 'boolean'\n ) {\n errors.push(at + '.current_action_selector must be a boolean')\n }\n if (Object.keys(state).some((field) => !allowedFields.has(field))) {\n errors.push(at + ' contains unsupported fields')\n }\n }\n }\n if (item.state_transfer !== undefined) {\n const at = 'items[' + index + '].state_transfer'\n if (!isPlainRecord(item.state_transfer)) {\n errors.push(at + ' must be an object')\n } else {\n const stateTransfer = item.state_transfer as Record<string, unknown>\n const deletedAt = stateTransfer.deleted_at\n if (!Object.hasOwn(stateTransfer, 'deleted_at')) {\n errors.push(at + '.deleted_at is required')\n } else if (\n deletedAt !== null\n && (typeof deletedAt !== 'string' || Number.isNaN(Date.parse(deletedAt)))\n ) {\n errors.push(at + '.deleted_at must be a date-time string or null')\n }\n if (Object.keys(stateTransfer).some((field) => field !== 'deleted_at')) {\n errors.push(at + ' contains unsupported fields')\n }\n }\n }\n}\n\nfunction isPrivacyClassification(value: unknown): value is AiwgPrivacyClassification {\n return value === 'private' || value === 'sanitized' || value === 'public'\n}\n\nfunction isProvenanceConfidence(value: unknown): value is AiwgProvenanceConfidence {\n return value === 'source' || value === 'candidate' || value === 'reviewed' || value === 'rejected'\n}\n\n// Provenance item shape + enum validation (#239 A4). Each item requires\n// field/source/path and enum-valid confidence/privacy — the schema marks all five\n// required, but the parser previously only checked \"non-empty array\".\nfunction validateProvenanceItems(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n if (!Array.isArray(item.provenance)) return\n for (const [provIndex, prov] of item.provenance.entries()) {\n const at = 'items[' + index + '].provenance[' + provIndex + ']'\n if (!isPlainRecord(prov)) {\n errors.push(at + ' must be an object')\n continue\n }\n if (!hasString(prov.field)) errors.push(at + '.field is required')\n if (!hasString(prov.source)) errors.push(at + '.source is required')\n if (!hasString(prov.path)) errors.push(at + '.path is required')\n if (!isProvenanceConfidence(prov.confidence)) errors.push(at + '.confidence must be one of source, candidate, reviewed, rejected')\n if (!isPrivacyClassification(prov.privacy)) errors.push(at + '.privacy must be one of private, sanitized, public')\n }\n}\n\n// v1/v2 field forbiddance (#239 A2): a record.v1 record must not carry fields the\n// schema defines only for record.v2. Keeps the parser as strict as the schema, so\n// a too-loose generator output is rejected rather than silently accepted.\nconst V2_ONLY_RECORD_FIELDS = [\n 'search',\n 'chunks',\n 'embeddings',\n 'skos_concepts',\n 'skos_relations',\n 'provenance_events',\n 'compatibility',\n 'operational_state',\n 'state_transfer',\n] as const\nconst V2_ONLY_SOURCE_FIELDS = ['origin', 'generated', 'checksum', 'updated_at'] as const\nconst V2_ONLY_RELATIONSHIP_FIELDS = ['target_path', 'direction', 'metadata'] as const\n\nfunction forbidV2FieldsOnV1Record(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n if (item.schema_version !== 'aiwg.fortemi.index.record.v1') return\n const at = 'items[' + index + ']'\n const bag = item as Record<string, unknown>\n const v2msg = ' is a v2-only field and must be absent on a record.v1 record'\n for (const field of V2_ONLY_RECORD_FIELDS) {\n if (bag[field] !== undefined) errors.push(at + '.' + field + v2msg)\n }\n if (isPlainRecord(item.source)) {\n const src = item.source as Record<string, unknown>\n for (const field of V2_ONLY_SOURCE_FIELDS) {\n if (src[field] !== undefined) errors.push(at + '.source.' + field + v2msg)\n }\n }\n if (isPlainRecord(item.privacy) && (item.privacy as Record<string, unknown>).locality !== undefined) {\n errors.push(at + '.privacy.locality' + v2msg)\n }\n if (Array.isArray(item.relationships)) {\n for (const [relIndex, rel] of item.relationships.entries()) {\n if (!isPlainRecord(rel)) continue\n const relBag = rel as Record<string, unknown>\n for (const field of V2_ONLY_RELATIONSHIP_FIELDS) {\n if (relBag[field] !== undefined) errors.push(at + '.relationships[' + relIndex + '].' + field + v2msg)\n }\n }\n }\n}\n\nexport function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult {\n const errors: string[] = []\n const counts: Partial<Record<string, number>> = Object.create(null)\n const data = isPlainRecord(value) ? value as Partial<AiwgFortemiIndexExport> : {}\n if (!isPlainRecord(value)) errors.push('index export must be an object')\n\n if (!isSupportedIndexSchemaVersion(data?.schema_version)) {\n errors.push('schema_version must be aiwg.fortemi.index.export.v1 or aiwg.fortemi.index.export.v2')\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 else if (!isPrivacyClassification(data?.source?.privacy)) {\n errors.push('source.privacy must be one of private, sanitized, public')\n }\n if (!Array.isArray(data?.items)) errors.push('items must be an array')\n if (data.compatibility !== undefined && !isPlainRecord(data.compatibility)) {\n errors.push('compatibility must be an object')\n }\n // A5: export-level v1/v2 gating — source.graph and compatibility are v2-only.\n if (data?.schema_version === 'aiwg.fortemi.index.export.v1') {\n if (isPlainRecord(data.source) && (data.source as Record<string, unknown>).graph !== undefined) {\n errors.push('source.graph is a v2-only field and must be absent on an export.v1 export')\n }\n if (data.compatibility !== undefined) {\n errors.push('compatibility is a v2-only field and must be absent on an export.v1 export')\n }\n }\n\n const ids = new Set<string>()\n let previousId = ''\n const items = Array.isArray(data.items) ? data.items : []\n for (const [index, item] of items.entries()) {\n if (!isPlainRecord(item)) {\n errors.push('items[' + index + '] must be an object')\n continue\n }\n for (const field of REQUIRED_RECORD_FIELDS) {\n if (!(field in item)) errors.push('items[' + index + '].' + field + ' is required')\n }\n if (!isSupportedRecordSchemaVersion(item.schema_version)) {\n errors.push('items[' + index + '].schema_version must be aiwg.fortemi.index.record.v1 or aiwg.fortemi.index.record.v2')\n }\n if (data.schema_version === 'aiwg.fortemi.index.export.v1' && item.schema_version === 'aiwg.fortemi.index.record.v2') {\n errors.push('items[' + index + '].schema_version must match aiwg.fortemi.index.export.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 > item.id) {\n errors.push('items must be sorted by id: ' + previousId + ' before ' + item.id)\n }\n if (hasString(item.id)) previousId = item.id\n if (!hasString(item.type)) errors.push('items[' + index + '].type must be a non-empty string')\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 (typeof item.title !== 'string' && typeof item.search?.title !== 'string' && typeof item.search?.name !== 'string') {\n errors.push('items[' + index + '].title or search.title/search.name is required')\n }\n if (typeof item.text !== 'string' && typeof item.search?.body !== 'string' && typeof item.search?.summary !== 'string') {\n errors.push('items[' + index + '].text or search.body/search.summary is required')\n }\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 validateOptionalRichMetadata(item, index, errors)\n validateProvenanceItems(item, index, errors)\n forbidV2FieldsOnV1Record(item, index, errors)\n if (!item.privacy || typeof item.privacy.pii !== 'boolean' || !hasString(item.privacy.classification)) {\n errors.push('items[' + index + '].privacy requires classification and pii')\n } else if (!isPrivacyClassification(item.privacy.classification)) {\n errors.push('items[' + index + '].privacy.classification must be one of private, sanitized, public')\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 = isPlainRecord(value) ? value as Partial<AiwgFortemiChunkManifest> : {}\n if (!isPlainRecord(value)) errors.push('chunk manifest must be an object')\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 (data?.source_export_schema_version !== undefined && !isSupportedIndexSchemaVersion(data.source_export_schema_version)) {\n errors.push('source_export_schema_version must be aiwg.fortemi.index.export.v1 or aiwg.fortemi.index.export.v2 when present')\n }\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 (data.projection !== undefined) {\n if (!Array.isArray(data.projection) || !data.projection.every((field) => typeof field === 'string')) {\n errors.push('projection must be an array of field names')\n } else {\n const present = new Set(data.projection)\n for (const field of AIWG_SCAN_REQUIRED_FIELDS) {\n if (!present.has(field)) errors.push('projection must include scan-required field ' + field)\n }\n }\n }\n if (data.detail !== undefined && !isPlainRecord(data.detail)) {\n errors.push('detail must be an object')\n } else if (data.detail !== undefined) {\n if (!hasString(data.detail.href)) errors.push('detail.href is required')\n else if (!data.detail.href.includes('{id}')) errors.push('detail.href must contain the {id} placeholder')\n if (\n data.detail.encoding !== undefined &&\n data.detail.encoding !== 'uri' &&\n data.detail.encoding !== 'base64url'\n ) {\n errors.push(\"detail.encoding must be 'uri' or 'base64url'\")\n }\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 (!isPlainRecord(part)) {\n errors.push('parts[' + index + '] must be an object')\n continue\n }\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\nfunction validateProjectedRecordShape(item: Partial<AiwgFortemiRecord>, index: number, errors: string[]): void {\n const at = 'items[' + index + ']'\n if (!item.privacy || !isPlainRecord(item.privacy)) {\n errors.push(at + '/privacy requires classification and pii')\n } else {\n if (!isPrivacyClassification(item.privacy.classification)) {\n errors.push(at + '/privacy/classification must be one of private, sanitized, public')\n }\n if (typeof item.privacy.pii !== 'boolean') {\n errors.push(at + '/privacy/pii must be boolean')\n }\n }\n if (Array.isArray(item.provenance)) {\n for (const [provIndex, prov] of item.provenance.entries()) {\n if (!isPlainRecord(prov)) {\n errors.push(at + '/provenance/' + provIndex + ' must be an object')\n continue\n }\n if (!isProvenanceConfidence(prov.confidence)) {\n errors.push(at + '/provenance/' + provIndex + '/confidence must be one of source, candidate, reviewed, rejected')\n }\n if (!isPrivacyClassification(prov.privacy)) {\n errors.push(at + '/provenance/' + provIndex + '/privacy must be one of private, sanitized, public')\n }\n }\n }\n}\n\n// Validate projected (slim) scan-part items: scan-required fields only, ids unique + sorted.\nfunction validateProjectedRecords(\n items: Array<Partial<AiwgFortemiRecord>>,\n sourceSchemaVersion: AiwgFortemiIndexExportSchemaVersion,\n): string[] {\n const errors: string[] = []\n const ids = new Set<string>()\n let previousId = ''\n for (const [index, item] of items.entries()) {\n if (!isPlainRecord(item)) {\n errors.push('items[' + index + '] must be an object')\n continue\n }\n validateProjectedRecordShape(item, index, errors)\n const expectedRecordVersion = sourceSchemaVersion === 'aiwg.fortemi.index.export.v2'\n ? 'aiwg.fortemi.index.record.v2'\n : 'aiwg.fortemi.index.record.v1'\n if (item.schema_version !== expectedRecordVersion) {\n errors.push(`items[${index}].schema_version must match ${sourceSchemaVersion}`)\n }\n if (!isSupportedRecordSchemaVersion(item.schema_version)) {\n errors.push('items[' + index + '].schema_version must be aiwg.fortemi.index.record.v1 or aiwg.fortemi.index.record.v2')\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 > item.id) {\n errors.push('items must be sorted by id: ' + previousId + ' before ' + item.id)\n }\n if (hasString(item.id)) previousId = item.id\n if (!hasString(item.type)) errors.push('items[' + index + '].type must be a non-empty string')\n if (typeof item.title !== 'string' && typeof item.search?.title !== 'string' && typeof item.search?.name !== 'string') {\n errors.push('items[' + index + '].title or search.title/search.name is required')\n }\n if (typeof item.text !== 'string' && typeof item.search?.body !== 'string' && typeof item.search?.summary !== 'string') {\n errors.push('items[' + index + '].text or search.body/search.summary is required')\n }\n if (!item.facets || typeof item.facets !== 'object' || Array.isArray(item.facets)) {\n errors.push('items[' + index + '].facets must be an object')\n }\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 }\n return errors\n}\n\nexport function validateAiwgFortemiChunkPart(\n value: unknown,\n partRef?: AiwgFortemiChunkPartRef,\n manifest?: AiwgFortemiChunkManifest,\n): AiwgChunkedIndexValidationResult {\n const errors: string[] = []\n const data = isPlainRecord(value) ? value as Partial<AiwgFortemiChunkPart> : {}\n if (!isPlainRecord(value)) errors.push('chunk part must be an object')\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 if (manifest?.projection) {\n errors.push(...validateProjectedRecords(\n data.items,\n manifest.source_export_schema_version ?? 'aiwg.fortemi.index.export.v1',\n ).map((error) => 'items.' + error))\n } else {\n const validation = validateAiwgFortemiIndexExport({\n schema_version: manifest?.source_export_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 ...((manifest?.source_export_schema_version ?? 'aiwg.fortemi.index.export.v1') === 'aiwg.fortemi.index.export.v2'\n ? { compatibility: { previous_schema_version: 'aiwg.fortemi.index.export.v1', strategy: 'supported' } }\n : {}),\n items: data.items,\n })\n errors.push(...validation.errors.map((error) => 'items.' + error))\n }\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\n// Schemes an index fetch may target. Blocks file:, ftp:, ws:, etc. so a\n// manifest-controlled href cannot pivot the browser into a non-web protocol.\nconst ALLOWED_AIWG_FETCH_SCHEMES = new Set(['http:', 'https:', 'blob:', 'data:'])\n\nfunction tryParseUrl(value: string): URL | null {\n try {\n return new URL(value)\n } catch {\n return null\n }\n}\n\n// Resolve and vet a manifest-controlled fetch target (SEC2 — SSRF).\n// - With a baseUrl: the href is resolved against it and MUST stay same-origin,\n// so an absolute `href` (which `new URL` would otherwise honor, ignoring the\n// base) cannot redirect the fetch to an attacker origin.\n// - Without a baseUrl: the caller opted into a bare href; only the scheme is\n// vetted (relative hrefs are passed through unchanged).\nexport function resolveAiwgFetchUrl(href: string, baseUrl?: string | URL): string {\n if (baseUrl === undefined) {\n const absolute = tryParseUrl(href)\n if (absolute && !ALLOWED_AIWG_FETCH_SCHEMES.has(absolute.protocol)) {\n throw new Error('Refusing AIWG index fetch with disallowed scheme: ' + absolute.protocol)\n }\n return href\n }\n const base = new URL(baseUrl)\n const resolved = new URL(href, base)\n if (!ALLOWED_AIWG_FETCH_SCHEMES.has(resolved.protocol)) {\n throw new Error('Refusing AIWG index fetch with disallowed scheme: ' + resolved.protocol)\n }\n if (resolved.origin !== base.origin) {\n throw new Error('Refusing cross-origin AIWG index fetch: ' + resolved.origin + ' != ' + base.origin)\n }\n return resolved.toString()\n}\n\nexport function createAiwgFetchChunkLoader(baseUrl?: string | URL): AiwgChunkedIndexLoader {\n return async (part) => {\n const href = resolveAiwgFetchUrl(part.href, baseUrl)\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\n// Encode a record id into a single, path-safe detail filename segment.\n// - 'base64url' (default): UTF-8 → base64url (no '+', '/', '=', '%'). Safe for ids\n// containing '/' on static hosts that reject %2F (#177).\n// - 'uri': encodeURIComponent (legacy).\nexport function encodeAiwgDetailId(id: string, encoding: AiwgDetailIdEncoding = 'base64url'): string {\n if (encoding === 'uri') return encodeURIComponent(id)\n const bytes = new TextEncoder().encode(id)\n let binary = ''\n for (const byte of bytes) binary += String.fromCharCode(byte)\n // btoa is available in browsers and Node ≥16.\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/, '')\n}\n\n// Resolve a manifest detail.href template for a given id, honoring detail.encoding\n// (absent → 'uri' for backward compatibility). The writer and the loader both go\n// through this so emitted filenames and fetched paths always agree.\nexport function aiwgDetailHrefForId(detail: AiwgFortemiChunkDetailRef, id: string): string {\n return detail.href.replace('{id}', encodeAiwgDetailId(id, detail.encoding ?? 'uri'))\n}\n\n// Detail loader for projected indexes: resolves the manifest's detail.href {id}\n// template (encoded per detail.encoding) against baseUrl and fetches the full record.\nexport function createAiwgFetchDetailLoader(baseUrl?: string | URL): AiwgChunkedIndexDetailLoader {\n return async (id, manifest) => {\n if (!manifest.detail?.href) throw new Error('Manifest has no detail.href for record resolution')\n const relative = aiwgDetailHrefForId(manifest.detail, id)\n const href = resolveAiwgFetchUrl(relative, baseUrl)\n const response = await fetch(href)\n if (!response.ok) throw new Error('Failed to fetch AIWG index detail ' + href + ': ' + response.status)\n return response.json()\n }\n}\n\nexport function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>> {\n // Null-prototype accumulator: untrusted facet names must never resolve to an\n // inherited property (see pushFacet / SEC1 / #236). Round-trips to a plain\n // object through JSON serialization, so no downstream consumer is affected.\n const result: Record<string, Record<string, number>> = Object.create(null)\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 recordTitle(item: AiwgFortemiProjectedRecord): string {\n return item.title ?? item.search?.title ?? item.search?.name ?? item.id\n}\n\nfunction recordText(item: AiwgFortemiProjectedRecord): string {\n const base = item.text\n ?? item.search?.body\n ?? item.search?.summary\n ?? item.chunks?.map((chunk) => chunk.text ?? chunk.body ?? chunk.summary ?? '').filter(Boolean).join('\\n')\n ?? ''\n const extractedText = binarySourceText(item)\n return [base, extractedText].filter(Boolean).join('\\n')\n}\n\nfunction binarySourceText(item: AiwgFortemiProjectedRecord): string {\n return 'binary_sources' in item\n ? item.binary_sources?.map((source) => source.extracted_text).filter(Boolean).join('\\n') ?? ''\n : ''\n}\n\nfunction defaultEmbeddingInput(record: AiwgFortemiRecord, granularity: AiwgStaticEmbeddingSet['granularity']): string {\n const title = recordTitle(record)\n const text = recordText(record)\n if (granularity === 'title-summary') {\n // Attachment text remains part of title-summary embeddings so binary-only\n // knowledge is searchable even when the record has no authored summary.\n return [title, record.search?.summary ?? '', binarySourceText(record)].filter(Boolean).join('\\n')\n }\n return [title, text].filter(Boolean).join('\\n')\n}\n\nfunction generatedAtString(value: string | Date | undefined): string {\n if (value instanceof Date) return value.toISOString()\n return value ?? new Date().toISOString()\n}\n\nconst SHA256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,\n] as const\n\nfunction rotr(value: number, bits: number): number {\n return (value >>> bits) | (value << (32 - bits))\n}\n\nfunction sha256Hex(data: Uint8Array): string {\n const bitLength = data.length * 8\n const padded = new Uint8Array((((data.length + 9 + 63) >> 6) << 6))\n padded.set(data)\n padded[data.length] = 0x80\n const view = new DataView(padded.buffer)\n view.setUint32(padded.length - 4, bitLength >>> 0)\n view.setUint32(padded.length - 8, Math.floor(bitLength / 0x100000000))\n let h0 = 0x6a09e667\n let h1 = 0xbb67ae85\n let h2 = 0x3c6ef372\n let h3 = 0xa54ff53a\n let h4 = 0x510e527f\n let h5 = 0x9b05688c\n let h6 = 0x1f83d9ab\n let h7 = 0x5be0cd19\n const w = new Uint32Array(64)\n for (let offset = 0; offset < padded.length; offset += 64) {\n for (let i = 0; i < 16; i++) w[i] = view.getUint32(offset + i * 4)\n for (let i = 16; i < 64; i++) {\n const s0 = rotr(w[i - 15], 7) ^ rotr(w[i - 15], 18) ^ (w[i - 15] >>> 3)\n const s1 = rotr(w[i - 2], 17) ^ rotr(w[i - 2], 19) ^ (w[i - 2] >>> 10)\n w[i] = (w[i - 16] + s0 + w[i - 7] + s1) >>> 0\n }\n let a = h0\n let b = h1\n let c = h2\n let d = h3\n let e = h4\n let f = h5\n let g = h6\n let h = h7\n for (let i = 0; i < 64; i++) {\n const s1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)\n const ch = (e & f) ^ (~e & g)\n const temp1 = (h + s1 + ch + SHA256_K[i] + w[i]) >>> 0\n const s0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)\n const maj = (a & b) ^ (a & c) ^ (b & c)\n const temp2 = (s0 + maj) >>> 0\n h = g\n g = f\n f = e\n e = (d + temp1) >>> 0\n d = c\n c = b\n b = a\n a = (temp1 + temp2) >>> 0\n }\n h0 = (h0 + a) >>> 0\n h1 = (h1 + b) >>> 0\n h2 = (h2 + c) >>> 0\n h3 = (h3 + d) >>> 0\n h4 = (h4 + e) >>> 0\n h5 = (h5 + f) >>> 0\n h6 = (h6 + g) >>> 0\n h7 = (h7 + h) >>> 0\n }\n return [h0, h1, h2, h3, h4, h5, h6, h7].map((part) => part.toString(16).padStart(8, '0')).join('')\n}\n\nfunction computeAiwgIndexHash(data: Uint8Array): string {\n return `sha256:${sha256Hex(data)}`\n}\n\nexport async function buildAiwgStaticEmbeddingSet(\n index: AiwgFortemiIndexExport,\n options: BuildAiwgStaticEmbeddingSetOptions,\n): Promise<AiwgStaticEmbeddingSet> {\n assertAiwgFortemiIndexExport(index)\n const granularity = options.granularity ?? 'body'\n // SEC6: default-safe privacy filter over the source records.\n const records = filterAiwgRecordsByPrivacy(options.records ?? index.items, options.privacy)\n const embeddings: AiwgStaticEmbeddingRecord[] = []\n\n for (const record of records) {\n const input = options.textForRecord?.(record) ?? defaultEmbeddingInput(record, granularity)\n const embedding = await options.backend.embed(input, record)\n if (embedding.length !== options.backend.dimensions) {\n throw new Error(`Embedding for ${record.id} has ${embedding.length} dimensions; expected ${options.backend.dimensions}`)\n }\n embeddings.push({\n record_id: record.id,\n embedding,\n granularity,\n input_hash: computeAiwgIndexHash(new TextEncoder().encode(input)),\n source_path: record.source.path,\n })\n }\n\n const embeddingSet: AiwgStaticEmbeddingSet = {\n schema_version: 'aiwg.fortemi.embedding.set.v1',\n id: options.id,\n model: options.backend.model,\n dimensions: options.backend.dimensions,\n generated_at: generatedAtString(options.generatedAt),\n granularity,\n ...(options.metric ? { metric: options.metric } : {}),\n input_hash_algorithm: 'sha256',\n embeddings,\n }\n assertAiwgStaticEmbeddingSet(embeddingSet)\n return embeddingSet\n}\n\nfunction recordSearchValues(item: AiwgFortemiProjectedRecord): string[] {\n const search = item.search\n const values = [\n item.id,\n recordTitle(item),\n recordText(item),\n search?.title,\n search?.name,\n search?.summary,\n search?.body,\n search?.capability,\n search?.phase,\n search?.type,\n ...(search?.triggers ?? []),\n ...(search?.aliases ?? []),\n ...(search?.tags ?? []),\n ...(item.chunks ?? []).flatMap((chunk) => [chunk.text, chunk.body, chunk.summary, chunk.source_path]),\n ]\n if (search?.frontmatter) {\n for (const value of Object.values(search.frontmatter)) {\n if (typeof value === 'string') values.push(value)\n else if (Array.isArray(value)) values.push(...value.filter((entry): entry is string => typeof entry === 'string'))\n }\n }\n return values.filter((value): value is string => typeof value === 'string' && value.length > 0)\n}\n\nexport interface AiwgChunkedIndexBuildOptions {\n partSize?: number\n // When set, scan parts carry only these fields; full records go to `details`.\n projection?: Array<keyof AiwgFortemiRecord>\n // Detail href template (with {id}); defaults to \"detail/{id}.json\" when projecting.\n detailHref?: string\n // id→filename encoding for detail files; defaults to 'base64url' (path-safe,\n // works for ids containing '/'; see #177).\n idEncoding?: AiwgDetailIdEncoding\n generatedAt?: string\n /** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */\n privacy?: AiwgPrivacyFilterOptions\n}\n\nexport interface AiwgChunkedIndexBuildResult {\n manifest: AiwgFortemiChunkManifest\n parts: Array<{ href: string; part: AiwgFortemiChunkPart }>\n // Empty unless projecting. Each entry carries the full record plus the resolved,\n // encoding-correct `href` to host it at — write the record to that path so the\n // detail loader (which uses the same encoding) can fetch it back.\n details: Array<{ id: string; href: string; record: AiwgFortemiRecord }>\n}\n\n// Pure builder (no I/O): project an index export into the chunked manifest + parts\n// (+ detail records when projecting). The caller writes the returned objects to disk.\n// Manifest facets are computed from the full records, so global counts are exact even\n// when scan parts are slim.\nexport function buildAiwgChunkedIndex(\n index: AiwgFortemiIndexExport,\n options: AiwgChunkedIndexBuildOptions = {},\n): AiwgChunkedIndexBuildResult {\n assertAiwgFortemiIndexExport(index)\n const partSize = hasPositiveInteger(options.partSize) ? options.partSize : 500\n const projection = options.projection\n const idEncoding = options.idEncoding ?? 'base64url'\n const detailHref = options.detailHref ?? 'detail/{id}.json'\n // SEC6: default-safe privacy filter — `private`/`pii` records never enter the\n // generated scan parts, detail files, or manifest facet counts.\n const items = filterAiwgRecordsByPrivacy(index.items, options.privacy)\n const pad = (value: number): string => String(value).padStart(4, '0')\n const project = (record: AiwgFortemiRecord): AiwgFortemiRecord => {\n if (!projection) return record\n const slim: Record<string, unknown> = {}\n for (const field of projection) slim[field] = record[field]\n return slim as unknown as AiwgFortemiRecord\n }\n\n const parts: Array<{ href: string; part: AiwgFortemiChunkPart }> = []\n const partRefs: AiwgFortemiChunkPartRef[] = []\n for (let offset = 0, partIndex = 0; offset < items.length; offset += partSize, partIndex += 1) {\n const slice = items.slice(offset, offset + partSize)\n const href = 'part-' + pad(partIndex) + '.json'\n parts.push({\n href,\n part: {\n schema_version: 'aiwg.fortemi.index.chunk.v1',\n manifest_schema_version: 'aiwg.fortemi.index.chunk-manifest.v1',\n offset,\n items: slice.map(project),\n },\n })\n partRefs.push({ href, offset, count: slice.length })\n }\n\n const manifest: AiwgFortemiChunkManifest = {\n schema_version: 'aiwg.fortemi.index.chunk-manifest.v1',\n generated_at: options.generatedAt ?? index.generated_at,\n source: index.source,\n source_export_schema_version: index.schema_version,\n total: items.length,\n part_size: partSize,\n facets: getAiwgFortemiFacets(items),\n parts: partRefs,\n ...(projection ? { projection, detail: { href: detailHref, encoding: idEncoding } } : {}),\n }\n\n return {\n manifest,\n parts,\n details: projection\n ? items.map((record) => ({\n id: record.id,\n href: aiwgDetailHrefForId({ href: detailHref, encoding: idEncoding }, record.id),\n record,\n }))\n : [],\n }\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 const title = recordTitle(item)\n const text = recordText(item)\n if (title.toLowerCase().includes(q)) matches.push({ field: 'title', value: title })\n if (text.toLowerCase().includes(q)) matches.push({ field: 'text', value: 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 for (const value of recordSearchValues(item)) {\n if (value !== title && value !== text && value.toLowerCase().includes(q)) {\n matches.push({ field: 'text', value, score: DEFAULT_QUERY_WEIGHTS.text })\n }\n }\n return matches\n}\n\nconst DISCOVERY_STOPWORDS = new Set([\n 'the', 'a', 'an', 'and', 'or', 'of', 'for', 'to', 'in', 'on',\n 'with', 'into', 'from', 'is', 'are', 'be', 'i', 'we', 'my',\n 'it', 'you', 'me', 'us', 'your', 'our', 'this', 'that', 'these', 'those',\n 'there', 'here', 'some', 'any', 'all', 'also', 'please', 'about',\n 'how', 'what', 'which', 'where', 'when', 'who', 'why',\n 'find', 'give', 'show', 'need', 'want', 'looking', 'look', 'help',\n 'do', 'does', 'did', 'can', 'could', 'should', 'would', 'will',\n 'handle', 'handles', 'handling',\n 'aiwg', 'skill', 'skills', 'agent', 'agents', 'command', 'commands',\n 'rule', 'rules', 'flow', 'flows', 'workflow', 'workflows',\n])\n\nfunction normalizeDiscoveryName(value: string): string {\n return value.toLowerCase().replace(/[-_\\s]+/g, ' ').trim()\n}\n\nfunction discoveryTokens(value: string): string[] {\n return value\n .toLowerCase()\n .split(/[^a-z0-9-]+/)\n .filter((token) => token.length > 1 && !DISCOVERY_STOPWORDS.has(token))\n}\n\nfunction facetValues(item: AiwgFortemiRecord, names: string[]): string[] {\n return names.flatMap((name) => item.facets[name] ?? [])\n}\n\nfunction addDiscoveryMatch(matches: AiwgIndexQueryMatch[], match: AiwgIndexQueryMatch) {\n if (!matches.some((existing) => existing.field === match.field && existing.value === match.value && existing.reason === match.reason)) {\n matches.push(match)\n }\n}\n\nfunction damerauLevenshteinAtMostOne(left: string, right: string): boolean {\n if (left === right) return true\n if (Math.abs(left.length - right.length) > 1) return false\n\n if (left.length === right.length) {\n let firstDiff = -1\n let diffCount = 0\n for (let index = 0; index < left.length; index += 1) {\n if (left[index] !== right[index]) {\n if (firstDiff < 0) firstDiff = index\n diffCount += 1\n }\n }\n if (diffCount === 1) return true\n return diffCount === 2\n && firstDiff + 1 < left.length\n && left[firstDiff] === right[firstDiff + 1]\n && left[firstDiff + 1] === right[firstDiff]\n }\n\n const shorter = left.length < right.length ? left : right\n const longer = left.length < right.length ? right : left\n let shorterIndex = 0\n let longerIndex = 0\n let edits = 0\n while (shorterIndex < shorter.length && longerIndex < longer.length) {\n if (shorter[shorterIndex] === longer[longerIndex]) {\n shorterIndex += 1\n longerIndex += 1\n } else {\n edits += 1\n if (edits > 1) return false\n longerIndex += 1\n }\n }\n return true\n}\n\nfunction nearDiscoveryNameMatch(query: string, name: string): boolean {\n const queryParts = normalizeDiscoveryName(query).split(/\\s+/).filter(Boolean)\n const nameParts = normalizeDiscoveryName(name).split(/\\s+/).filter(Boolean)\n if (queryParts.length !== nameParts.length) return false\n\n return queryParts.every((part, index) => {\n const target = nameParts[index]\n if (part === target) return true\n if (part.length < 5 || target.length < 5) return false\n return damerauLevenshteinAtMostOne(part, target)\n })\n}\n\nfunction lowerValues(values: string[]): string[] {\n return values.map((value) => value.toLowerCase())\n}\n\ninterface DiscoveryScoringOptions {\n relaxOverlap?: boolean\n}\n\nfunction discoveryMatches(item: AiwgFortemiRecord, query: string, options: DiscoveryScoringOptions = {}): AiwgIndexQueryMatch[] {\n if (!query) return []\n const matches: AiwgIndexQueryMatch[] = []\n const tokens = discoveryTokens(query)\n const lower = tokens.length > 0 ? tokens.join(' ') : query.toLowerCase().trim()\n const rawLower = query.toLowerCase().trim()\n const idParts = item.id.split(/[:/]/)\n const names = [\n item.id,\n recordTitle(item),\n item.search?.name,\n item.search?.title,\n ...(item.search?.aliases ?? []),\n ...idParts,\n ...facetValues(item, ['name', 'canonical_name', 'command', 'skill', 'agent', 'rule']),\n ].filter((value): value is string => hasString(value))\n const triggers = [\n ...facetValues(item, ['trigger', 'triggers', 'trigger_phrase', 'trigger_phrases']),\n ...(item.search?.triggers ?? []),\n ]\n const capabilities = [\n ...facetValues(item, ['capability', 'capabilities', 'summary', 'description']),\n item.search?.capability,\n item.search?.summary,\n item.search?.phase,\n item.search?.type,\n ...(item.search?.tags ?? []),\n ...item.concepts,\n ...item.tags,\n ].filter((value): value is string => hasString(value))\n const sourceValues = [item.source?.path, item.source?.repo_relative_path, item.source?.locator].filter((value): value is string => hasString(value))\n const title = recordTitle(item)\n const summary = [item.search?.summary, recordText(item)].filter((value): value is string => hasString(value)).join('\\n')\n const type = item.search?.type ?? item.type\n const tags = [...(item.search?.tags ?? []), ...item.tags]\n const useMultiToken = tokens.length > 1\n const minHits = useMultiToken ? (options.relaxOverlap ? 1 : Math.ceil(tokens.length / 2)) : 1\n const overlapOK = (hits: number): boolean => useMultiToken && hits >= minHits\n\n const addInfo = (match: AiwgIndexQueryMatch) => addDiscoveryMatch(matches, { ...match, score: 0 })\n const addScore = (score: number) => {\n if (score > 0) addDiscoveryMatch(matches, { field: 'id', value: item.id, score, reason: 'aiwg discovery score' })\n }\n\n for (const name of names) {\n if (normalizeDiscoveryName(query) === normalizeDiscoveryName(name)) {\n addInfo({ field: 'id', value: name, reason: 'exact canonical name' })\n addScore(1.001)\n return matches\n }\n if (nearDiscoveryNameMatch(query, name)) {\n addInfo({ field: 'id', value: name, reason: 'near canonical name' })\n addScore(0.951)\n return matches\n }\n }\n\n let score = 0\n const scoreText = (\n field: AiwgIndexQueryMatch['field'],\n value: string,\n reason: string,\n exactScore: number,\n overlapScore: number,\n weight: number,\n exactBonus = 0,\n ) => {\n const normalized = value.toLowerCase()\n if (normalized.includes(lower)) {\n score += exactScore * weight\n if (normalized === lower) score += exactBonus\n addInfo({ field, value, reason })\n } else if (useMultiToken) {\n const hits = tokens.filter((token) => normalized.includes(token)).length\n if (overlapOK(hits)) {\n score += overlapScore * weight * (hits / tokens.length)\n addInfo({ field, value, reason })\n }\n }\n }\n\n for (const trigger of lowerValues(triggers)) {\n if (trigger === lower || trigger === rawLower) {\n addInfo({ field: 'facet', value: trigger, reason: 'trigger phrase' })\n addScore(1.0008)\n return matches\n }\n }\n for (const trigger of triggers) {\n scoreText('facet', trigger, 'trigger phrase', 0.25, 0.06, 4)\n }\n for (const capability of capabilities) scoreText('concept', capability, 'capability overlap', 0.2, 0.1, 2)\n scoreText('title', title, 'title token overlap', 0.3, 0.08, 3, 0.2)\n for (const tag of tags) scoreText('tag', tag, 'tag token overlap', 0.2, 0.05, 2)\n if (summary) scoreText('text', summary, 'body token overlap', 0.15, 0.04, 1)\n for (const source of sourceValues) {\n scoreText('source', source, 'path overlap', 0.1, 0.03, 1)\n }\n if (type.toLowerCase().includes(lower)) {\n score += 0.1\n addInfo({ field: 'facet', value: type, reason: 'type overlap' })\n }\n addScore(Math.min(score, 1.0))\n\n return matches\n}\n\nfunction rankMatches(matches: AiwgIndexQueryMatch[], weights: AiwgIndexQueryWeights): number {\n return matches.reduce((total, match) => total + (match.score ?? 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 ?? recordText(item), 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 discoveryOptions: DiscoveryScoringOptions = {},\n): AiwgRankedEntry[] {\n const weights = { ...DEFAULT_QUERY_WEIGHTS, ...options.weights }\n const profile = options.searchProfile ?? 'default'\n return items.map((item, ordinal) => ({\n item,\n ordinal: ordinalBase + ordinal,\n matches: profile === 'aiwg-discovery' ? discoveryMatches(item, q, discoveryOptions) : queryMatches(item, q),\n }))\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 const entries = createRankedEntries(index.items, q, options)\n if (entries.length === 0 && q && options.searchProfile === 'aiwg-discovery') {\n return createQueryResultFromRankedEntries(createRankedEntries(index.items, q, options, 0, { relaxOverlap: true }), q, options)\n }\n return createQueryResultFromRankedEntries(entries, q, options)\n}\n\nfunction cosineSimilarity(left: number[], right: number[]): number {\n if (left.length !== right.length || left.length === 0) return 0\n let dot = 0\n let leftMag = 0\n let rightMag = 0\n for (let i = 0; i < left.length; i += 1) {\n const l = left[i]\n const r = right[i]\n dot += l * r\n leftMag += l * l\n rightMag += r * r\n }\n if (leftMag === 0 || rightMag === 0) return 0\n return dot / (Math.sqrt(leftMag) * Math.sqrt(rightMag))\n}\n\nexport function validateAiwgStaticEmbeddingSet(value: unknown): AiwgChunkedIndexValidationResult {\n const errors: string[] = []\n const data = isPlainRecord(value) ? value as Partial<AiwgStaticEmbeddingSet> : {}\n if (!isPlainRecord(value)) errors.push('embedding set must be an object')\n if (data?.schema_version !== 'aiwg.fortemi.embedding.set.v1') errors.push('schema_version must be aiwg.fortemi.embedding.set.v1')\n if (!hasString(data?.id)) errors.push('id is required')\n if (!hasString(data?.model)) errors.push('model is required')\n if (!hasPositiveInteger(data?.dimensions)) errors.push('dimensions must be a positive integer')\n if (!hasString(data?.generated_at)) errors.push('generated_at is required')\n if (!hasString(data?.granularity)) errors.push('granularity is required')\n if (!Array.isArray(data?.embeddings)) errors.push('embeddings must be an array')\n const embeddings = Array.isArray(data.embeddings) ? data.embeddings : []\n for (const [index, embedding] of embeddings.entries()) {\n if (!isPlainRecord(embedding)) {\n errors.push('embeddings[' + index + '] must be an object')\n continue\n }\n if (!hasString(embedding.record_id)) errors.push('embeddings[' + index + '].record_id is required')\n if (!hasString(embedding.input_hash)) errors.push('embeddings[' + index + '].input_hash is required')\n if (!Array.isArray(embedding.embedding)) errors.push('embeddings[' + index + '].embedding must be an array')\n else if (hasPositiveInteger(data?.dimensions) && embedding.embedding.length !== data.dimensions) {\n errors.push('embeddings[' + index + '].embedding length must match dimensions')\n } else if (!embedding.embedding.every((number) => typeof number === 'number' && Number.isFinite(number))) {\n errors.push('embeddings[' + index + '].embedding must contain finite numbers')\n }\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport function assertAiwgStaticEmbeddingSet(value: unknown): AiwgStaticEmbeddingSet {\n const result = validateAiwgStaticEmbeddingSet(value)\n if (!result.valid) throw new Error('Invalid AIWG Fortemi embedding set:\\n' + result.errors.join('\\n'))\n return value as AiwgStaticEmbeddingSet\n}\n\nexport function queryAiwgSemanticIndex(\n index: AiwgFortemiIndexExport,\n embeddingSet: AiwgStaticEmbeddingSet,\n queryEmbedding: number[],\n options: AiwgStaticSemanticQueryOptions = {},\n): AiwgStaticSemanticResult[] {\n assertAiwgStaticEmbeddingSet(embeddingSet)\n if (queryEmbedding.length !== embeddingSet.dimensions) throw new Error('query embedding length must match embedding set dimensions')\n const byId = new Map(index.items.map((item) => [item.id, item]))\n const offset = options.offset ?? 0\n const limit = options.limit ?? 20\n return embeddingSet.embeddings\n .map((embedding): AiwgStaticSemanticResult | null => {\n const item = byId.get(embedding.record_id)\n if (!item) return null\n return { item, embedding, score: cosineSimilarity(queryEmbedding, embedding.embedding) }\n })\n .filter((result): result is AiwgStaticSemanticResult => result !== null && result.score >= (options.minScore ?? -1))\n .sort((left, right) => right.score - left.score || left.item.id.localeCompare(right.item.id))\n .slice(offset, offset + limit)\n}\n\nexport function queryAiwgHybridIndex(\n index: AiwgFortemiIndexExport,\n embeddingSet: AiwgStaticEmbeddingSet,\n query: string,\n queryEmbedding: number[],\n options: AiwgStaticHybridQueryOptions = {},\n): AiwgStaticSemanticResult[] {\n const lexicalOptions: AiwgStaticHybridQueryOptions = { ...options }\n delete lexicalOptions.limit\n delete lexicalOptions.offset\n const lexical = queryAiwgFortemiIndex(index, query, { ...lexicalOptions, rank: true })\n const semantic = queryAiwgSemanticIndex(index, embeddingSet, queryEmbedding, { limit: index.items.length })\n const lexicalWeight = options.lexicalWeight ?? 0.5\n const semanticWeight = options.semanticWeight ?? 0.5\n const lexicalScores = new Map(lexical.rankedItems?.map((entry) => [entry.item.id, entry.rank]) ?? [])\n const maxLexical = Math.max(1, ...lexicalScores.values())\n const embeddingById = new Map(semantic.flatMap((entry) => entry.embedding ? [[entry.item.id, entry.embedding] as const] : []))\n const semanticScores = new Map(semantic.map((entry) => [entry.item.id, entry.score]))\n const ids = new Set([...lexicalScores.keys(), ...semanticScores.keys()])\n const offset = options.offset ?? 0\n const limit = options.limit ?? 20\n return [...ids]\n .map((id) => {\n const item = index.items.find((candidate) => candidate.id === id)\n const embedding = embeddingById.get(id)\n if (!item) return null\n return {\n item,\n ...(embedding ? { embedding } : {}),\n score: ((lexicalScores.get(id) ?? 0) / maxLexical) * lexicalWeight + (semanticScores.get(id) ?? 0) * semanticWeight,\n }\n })\n .filter((result): result is AiwgStaticSemanticResult => result !== null && result.score >= (options.minScore ?? -1))\n .sort((left, right) => right.score - left.score || left.item.id.localeCompare(right.item.id))\n .slice(offset, offset + limit)\n}\n\n// Default cap for the pairwise duplicate scan. The scan is O(n²) in the number\n// of embeddings, so an unbounded attacker-supplied set is a CPU DoS (SEC5). At\n// the default of 5000 the worst case is ~12.5M cosine comparisons; callers with\n// a trusted, larger set can raise the cap explicitly.\nexport const DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS = 5000\n\nexport function findAiwgStaticDuplicatePairs(\n index: AiwgFortemiIndexExport,\n embeddingSet: AiwgStaticEmbeddingSet,\n threshold = 0.9,\n options?: { maxEmbeddings?: number },\n): AiwgStaticDuplicatePair[] {\n assertAiwgStaticEmbeddingSet(embeddingSet)\n const maxEmbeddings = options?.maxEmbeddings ?? DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS\n if (embeddingSet.embeddings.length > maxEmbeddings) {\n throw new Error(\n 'Embedding set too large for duplicate scan: ' + embeddingSet.embeddings.length +\n ' > ' + maxEmbeddings + ' (raise options.maxEmbeddings to override for trusted input)',\n )\n }\n const byId = new Map(index.items.map((item) => [item.id, item]))\n const pairs: AiwgStaticDuplicatePair[] = []\n for (let leftIndex = 0; leftIndex < embeddingSet.embeddings.length; leftIndex += 1) {\n for (let rightIndex = leftIndex + 1; rightIndex < embeddingSet.embeddings.length; rightIndex += 1) {\n const leftEmbedding = embeddingSet.embeddings[leftIndex]\n const rightEmbedding = embeddingSet.embeddings[rightIndex]\n const left = byId.get(leftEmbedding.record_id)\n const right = byId.get(rightEmbedding.record_id)\n if (!left || !right) continue\n const score = cosineSimilarity(leftEmbedding.embedding, rightEmbedding.embedding)\n if (score >= threshold) pairs.push({ left, right, score })\n }\n }\n return pairs.sort((left, right) => right.score - left.score || left.left.id.localeCompare(right.left.id))\n}\n\ninterface AiwgChunkedIndexRuntime {\n manifest: AiwgFortemiChunkManifest\n loader: AiwgChunkedIndexLoader\n maxCachedParts: number\n partCache: Map<string, AiwgFortemiChunkPart>\n detailLoader?: AiwgChunkedIndexDetailLoader\n maxCachedDetails: number\n detailCache: Map<string, AiwgFortemiRecord>\n maxCachedMatches: number\n // query+filter+weights key -> the full filtered/ranked entry set for that\n // query (offset/limit/sort/snippets independent). LRU-ordered; bounded by\n // maxCachedMatches (total entries). Lets pagination reuse a single scan.\n matchCache: Map<string, AiwgRankedEntry[]>\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 clampMaxCachedDetails(value: number | undefined): number {\n if (!hasPositiveInteger(value)) return 32\n return value\n}\n\nfunction clampMaxCachedMatches(value: number | undefined): number {\n if (!hasPositiveInteger(value)) return 5000\n return value\n}\n\n// Stable key over the inputs that determine the filtered/ranked entry SET and\n// each entry's rank value — but not offset/limit/sort/snippets, which only shape\n// the page projected from a cached set. Caller-stable option objects (same field\n// order each page) hit the cache; a reordered object simply misses (still correct).\nfunction matchSetCacheKey(q: string, options: AiwgIndexQueryOptions): string {\n return JSON.stringify({\n q,\n types: options.types ?? null,\n facets: options.facets ?? null,\n tags: options.tags ?? null,\n concepts: options.concepts ?? null,\n privacy: options.privacy ?? null,\n rel: options.relationshipTargetId ?? null,\n searchProfile: options.searchProfile ?? 'default',\n weights: { ...DEFAULT_QUERY_WEIGHTS, ...options.weights },\n })\n}\n\nfunction cacheMatchEntries(runtime: AiwgChunkedIndexRuntime, key: string, entries: AiwgRankedEntry[]): void {\n runtime.matchCache.delete(key)\n runtime.matchCache.set(key, entries)\n let total = 0\n for (const set of runtime.matchCache.values()) total += set.length\n // Evict oldest sets until within budget, but always keep the just-inserted set\n // so paging a large result still benefits from the single scan.\n while (total > runtime.maxCachedMatches && runtime.matchCache.size > 1) {\n const oldest = runtime.matchCache.keys().next().value\n if (oldest === undefined || oldest === key) break\n total -= runtime.matchCache.get(oldest)?.length ?? 0\n runtime.matchCache.delete(oldest)\n }\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 getChunkRecord(runtime: AiwgChunkedIndexRuntime, id: string): Promise<AiwgFortemiRecord> {\n const cached = runtime.detailCache.get(id)\n if (cached) {\n runtime.detailCache.delete(id)\n runtime.detailCache.set(id, cached)\n return cached\n }\n // Whole-record parts already in cache: serve without a detail fetch.\n if (!runtime.manifest.projection) {\n for (const part of runtime.partCache.values()) {\n const found = part.items.find((item) => item.id === id)\n if (found) return found\n }\n }\n if (!runtime.detailLoader) {\n throw new Error('No detailLoader configured to resolve record ' + id)\n }\n const raw = await runtime.detailLoader(id, runtime.manifest)\n const record = assertAiwgFortemiIndexExport({\n schema_version: 'aiwg.fortemi.index.export.v1',\n generated_at: runtime.manifest.generated_at,\n source: runtime.manifest.source,\n items: [raw],\n }).items[0]\n if (record.id !== id) {\n throw new Error('Detail record id mismatch: expected ' + id + ', got ' + record.id)\n }\n runtime.detailCache.set(id, record)\n while (runtime.detailCache.size > runtime.maxCachedDetails) {\n const oldest = runtime.detailCache.keys().next().value\n if (oldest === undefined) break\n runtime.detailCache.delete(oldest)\n }\n return record\n}\n\nfunction relationshipTypeFilter(options?: AiwgRelationshipQueryOptions): string | undefined {\n return options?.relationshipType ?? options?.type\n}\n\nfunction edgeFromRelationship(sourceId: string, relationship: AiwgFortemiRelationship): AiwgRelationshipEdgeSummary {\n return {\n source_id: sourceId,\n target_id: relationship.target_id,\n type: relationship.type,\n ...(relationship.source_path ? { source_path: relationship.source_path } : {}),\n ...(relationship.target_path ? { target_path: relationship.target_path } : {}),\n ...(relationship.direction ? { direction: relationship.direction } : {}),\n }\n}\n\nfunction relationshipMatches(edge: AiwgRelationshipEdgeSummary, options: AiwgRelationshipQueryOptions = {}): boolean {\n const type = relationshipTypeFilter(options)\n if (type && edge.type !== type) return false\n if (options.relationshipDirection && edge.direction !== options.relationshipDirection) return false\n if (options.sourceId && edge.source_id !== options.sourceId) return false\n if (options.targetId && edge.target_id !== options.targetId) return false\n if (options.endpointId && edge.source_id !== options.endpointId && edge.target_id !== options.endpointId) return false\n return true\n}\n\nfunction assertRelationshipDirectionAnchor(options: AiwgRelationshipQueryOptions): void {\n if (options.direction === 'out' && !options.sourceId) {\n throw new Error(\"relationship direction 'out' requires sourceId\")\n }\n if (options.direction === 'in' && !options.targetId) {\n throw new Error(\"relationship direction 'in' requires targetId\")\n }\n}\n\nfunction nodeSummary(item: AiwgFortemiProjectedRecord): AiwgRelationshipNodeSummary {\n return { id: item.id, type: item.type, title: recordTitle(item) }\n}\n\nfunction addNode(nodes: Map<string, AiwgRelationshipNodeSummary>, item: AiwgFortemiProjectedRecord | undefined) {\n if (item) nodes.set(item.id, nodeSummary(item))\n}\n\nfunction relationshipResultFromRecords(\n records: AiwgFortemiProjectedRecord[],\n options: AiwgRelationshipQueryOptions = {},\n): AiwgRelationshipTraversalResult {\n assertRelationshipDirectionAnchor(options)\n const byId = new Map(records.map((record) => [record.id, record]))\n const edges: AiwgRelationshipEdgeSummary[] = []\n for (const record of records) {\n for (const relationship of record.relationships ?? []) {\n const edge = edgeFromRelationship(record.id, relationship)\n if (!relationshipMatches(edge, options)) continue\n edges.push(edge)\n }\n }\n const sortedEdges = edges.sort((left, right) => (\n left.source_id.localeCompare(right.source_id)\n || left.target_id.localeCompare(right.target_id)\n || left.type.localeCompare(right.type)\n ))\n const limitedEdges = options.limit ? sortedEdges.slice(0, options.limit) : sortedEdges\n const nodes = new Map<string, AiwgRelationshipNodeSummary>()\n for (const edge of limitedEdges) {\n addNode(nodes, byId.get(edge.source_id))\n addNode(nodes, byId.get(edge.target_id))\n }\n return {\n nodes: [...nodes.values()].sort((left, right) => left.id.localeCompare(right.id)),\n edges: limitedEdges,\n complete: true,\n }\n}\n\nfunction neighborQueryOptions(id: string, options: AiwgRelationshipTraversalOptions = {}): AiwgRelationshipQueryOptions {\n const direction = options.direction ?? 'both'\n return {\n ...options,\n ...(direction === 'out' ? { sourceId: id } : {}),\n ...(direction === 'in' ? { targetId: id } : {}),\n ...(direction === 'both' ? { endpointId: id } : {}),\n }\n}\n\nfunction filterNeighborResult(id: string, result: AiwgRelationshipTraversalResult, options: AiwgRelationshipTraversalOptions = {}): AiwgRelationshipTraversalResult {\n const direction = options.direction ?? 'both'\n const edges = result.edges.filter((edge) => {\n if (direction === 'out') return edge.source_id === id\n if (direction === 'in') return edge.target_id === id\n return edge.source_id === id || edge.target_id === id\n })\n const ids = new Set<string>()\n for (const edge of edges) {\n ids.add(edge.source_id)\n ids.add(edge.target_id)\n }\n return {\n ...result,\n edges,\n nodes: result.nodes.filter((node) => ids.has(node.id)),\n }\n}\n\nasync function recordsFromChunkedRuntime(\n runtime: AiwgChunkedIndexRuntime,\n onProgress?: (progress: AiwgChunkedIndexProgress) => void,\n): Promise<{ records: AiwgFortemiRecord[]; scannedParts: number; fetchedParts: number }> {\n let scannedParts = 0\n let fetchedParts = 0\n const records: AiwgFortemiRecord[] = []\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 onProgress?.({ phase: 'part', done: scannedParts, total: runtime.manifest.parts.length, href: partRef.href })\n for (const item of loaded.part.items) {\n records.push(item.relationships ? item : await getChunkRecord(runtime, item.id))\n }\n }\n return { records, scannedParts, fetchedParts }\n}\n\nasync function relationshipResultFromChunkedRuntime(\n runtime: AiwgChunkedIndexRuntime,\n options: AiwgRelationshipQueryOptions = {},\n): Promise<AiwgRelationshipTraversalResult> {\n const loaded = await recordsFromChunkedRuntime(runtime)\n return {\n ...relationshipResultFromRecords(loaded.records, options),\n scannedParts: loaded.scannedParts,\n fetchedParts: loaded.fetchedParts,\n }\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 // Reuse the filtered/ranked entry set across pages of the same query: the\n // expensive part scan is offset/limit/sort/snippet independent. A hit projects\n // a new page from cached entries without touching parts (scanned/fetched = 0).\n const matchKey = matchSetCacheKey(q, options)\n const cached = runtime.matchCache.get(matchKey)\n if (cached) {\n runtime.matchCache.delete(matchKey)\n runtime.matchCache.set(matchKey, cached)\n return {\n ...createQueryResultFromRankedEntries(cached, q, options),\n manifestTotal: runtime.manifest.total,\n scannedParts: 0,\n fetchedParts: 0,\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 cacheMatchEntries(runtime, matchKey, entries)\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 // Only the export schema_version is needed — so this works in chunked mode\n // (where no whole index is loaded) by passing a minimal source. See #178.\n source: Pick<AiwgFortemiIndexExport, 'schema_version'>,\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 detailLoader: options.detailLoader,\n maxCachedDetails: clampMaxCachedDetails(options.maxCachedDetails),\n detailCache: new Map(),\n maxCachedMatches: clampMaxCachedMatches(options.maxCachedMatches),\n matchCache: 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 async getRecord(id: string): Promise<AiwgFortemiRecord> {\n if (chunked) {\n try {\n return await getChunkRecord(chunked, id)\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n }\n const found = requireIndex().items.find((item) => item.id === id)\n if (!found) throw new Error('Record not found: ' + id)\n return found\n },\n async neighbors(id: string, options?: AiwgRelationshipTraversalOptions): Promise<AiwgRelationshipTraversalResult> {\n try {\n const queryOptions = neighborQueryOptions(id, options)\n const result = chunked\n ? await relationshipResultFromChunkedRuntime(chunked, queryOptions)\n : relationshipResultFromRecords(requireIndex().items, queryOptions)\n return filterNeighborResult(id, result, options)\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n },\n async relationshipQuery(options?: AiwgRelationshipQueryOptions): Promise<AiwgRelationshipTraversalResult> {\n try {\n return chunked\n ? await relationshipResultFromChunkedRuntime(chunked, options)\n : relationshipResultFromRecords(requireIndex().items, options)\n } catch (err) {\n error = err instanceof Error ? err : new Error(String(err))\n notify()\n throw error\n }\n },\n async relationshipSet(options: AiwgRelationshipSetOptions): Promise<AiwgRelationshipSetResult> {\n const [left, right] = await Promise.all([\n this.neighbors(options.a, options),\n this.neighbors(options.b, options),\n ])\n const leftIds = new Set(left.nodes.map((node) => node.id).filter((id) => id !== options.a))\n const rightIds = new Set(right.nodes.map((node) => node.id).filter((id) => id !== options.b))\n let ids: string[]\n if (options.op === 'intersection') ids = [...leftIds].filter((id) => rightIds.has(id))\n else if (options.op === 'difference') ids = [...leftIds].filter((id) => !rightIds.has(id))\n else ids = [...new Set([...leftIds, ...rightIds])]\n return { op: options.op, ids: ids.sort() }\n },\n clearChunkCache(): void {\n chunked?.partCache.clear()\n chunked?.detailCache.clear()\n chunked?.matchCache.clear()\n error = null\n notify()\n },\n toCommunityGraph(options?: AiwgIndexGraphOptions) {\n return aiwgFortemiIndexToCommunityGraph(requireIndex(), options)\n },\n async toCommunityGraphChunked(options?: AiwgIndexGraphOptions & { onProgress?: (progress: AiwgChunkedIndexProgress) => void }) {\n if (!chunked) return aiwgFortemiIndexToCommunityGraph(requireIndex(), options)\n const loaded = await recordsFromChunkedRuntime(chunked, options?.onProgress)\n return aiwgFortemiIndexToCommunityGraph({\n schema_version: 'aiwg.fortemi.index.export.v1',\n generated_at: chunked.manifest.generated_at,\n source: chunked.manifest.source,\n items: loaded.records,\n }, 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 // The review-decisions export only needs the export schema_version, not the\n // items — so it works in chunked mode by synthesizing a minimal source (#178).\n const source: Pick<AiwgFortemiIndexExport, 'schema_version'> | null =\n index ??\n (chunked\n ? { schema_version: chunked.manifest.source_export_schema_version ?? 'aiwg.fortemi.index.export.v1' }\n : null)\n if (!source) throw new Error('No AIWG index export or chunked manifest loaded')\n return createAiwgReviewDecisionExport(source, 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 ?? Object.create(null)\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 configuredWeight = Object.prototype.hasOwnProperty.call(relationshipWeights, kind)\n ? relationshipWeights[kind]\n : undefined\n const baseWeight = typeof configuredWeight === 'number' && Number.isFinite(configuredWeight)\n ? configuredWeight\n : 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","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://aiwg.io/schemas/aiwg-fortemi-index-export.json\",\n \"title\": \"AIWG Fortemi Index Export\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"generated_at\", \"source\", \"items\"],\n \"properties\": {\n \"schema_version\": {\n \"enum\": [\"aiwg.fortemi.index.export.v1\", \"aiwg.fortemi.index.export.v2\"]\n },\n \"generated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"source\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"repo\", \"privacy\"],\n \"properties\": {\n \"repo\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"graph\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"compatibility\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"previous_schema_version\", \"strategy\"],\n \"properties\": {\n \"previous_schema_version\": {\n \"const\": \"aiwg.fortemi.index.export.v1\"\n },\n \"strategy\": {\n \"const\": \"supported\"\n }\n }\n },\n \"items\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/record\"\n }\n }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.export.v1\"\n }\n }\n },\n \"then\": {\n \"not\": {\n \"required\": [\"compatibility\"]\n },\n \"properties\": {\n \"source\": {\n \"not\": {\n \"required\": [\"graph\"]\n }\n },\n \"items\": {\n \"items\": {\n \"allOf\": [\n {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.record.v1\"\n }\n }\n },\n {\n \"$ref\": \"#/$defs/v1RecordCompatibility\"\n }\n ]\n }\n }\n }\n }\n },\n {\n \"if\": {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.export.v2\"\n }\n }\n },\n \"then\": {\n \"required\": [\"compatibility\"],\n \"properties\": {\n \"source\": {\n \"required\": [\"graph\"]\n },\n \"items\": {\n \"items\": {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.record.v2\"\n }\n }\n }\n }\n }\n }\n }\n ],\n \"$defs\": {\n \"privacy\": {\n \"enum\": [\"private\", \"sanitized\", \"public\"]\n },\n \"recordType\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"stringArray\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"numberArray\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"number\"\n }\n },\n \"v1RecordCompatibility\": {\n \"type\": \"object\",\n \"not\": {\n \"anyOf\": [\n {\n \"required\": [\"name\"]\n },\n {\n \"required\": [\"summary\"]\n },\n {\n \"required\": [\"search\"]\n },\n {\n \"required\": [\"chunks\"]\n },\n {\n \"required\": [\"embeddings\"]\n },\n {\n \"required\": [\"compatibility\"]\n },\n {\n \"required\": [\"skos_concepts\"]\n },\n {\n \"required\": [\"skos_relations\"]\n },\n {\n \"required\": [\"provenance_events\"]\n },\n {\n \"required\": [\"operational_state\"]\n },\n {\n \"required\": [\"state_transfer\"]\n }\n ]\n },\n \"properties\": {\n \"source\": {\n \"not\": {\n \"anyOf\": [\n {\n \"required\": [\"origin\"]\n },\n {\n \"required\": [\"generated\"]\n },\n {\n \"required\": [\"checksum\"]\n },\n {\n \"required\": [\"updated_at\"]\n }\n ]\n }\n },\n \"relationships\": {\n \"items\": {\n \"not\": {\n \"anyOf\": [\n {\n \"required\": [\"target_path\"]\n },\n {\n \"required\": [\"direction\"]\n },\n {\n \"required\": [\"label\"]\n },\n {\n \"required\": [\"confidence\"]\n },\n {\n \"required\": [\"privacy\"]\n },\n {\n \"required\": [\"metadata\"]\n }\n ]\n }\n }\n },\n \"privacy\": {\n \"not\": {\n \"required\": [\"locality\"]\n }\n }\n }\n },\n \"record\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\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 \"properties\": {\n \"schema_version\": {\n \"enum\": [\n \"aiwg.fortemi.index.record.v1\",\n \"aiwg.fortemi.index.record.v2\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"type\": {\n \"$ref\": \"#/$defs/recordType\"\n },\n \"source\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\", \"repo_relative_path\", \"locator\"],\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"repo_relative_path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"locator\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"origin\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"generated\": {\n \"type\": \"boolean\"\n },\n \"checksum\": {\n \"type\": \"string\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"summary\": {\n \"type\": \"string\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"search\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"title\",\n \"body\",\n \"triggers\",\n \"aliases\",\n \"tags\",\n \"frontmatter\"\n ],\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"summary\": {\n \"type\": \"string\"\n },\n \"body\": {\n \"type\": \"string\"\n },\n \"triggers\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"aliases\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"capability\": {\n \"type\": \"string\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"phase\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"frontmatter\": {\n \"type\": \"object\"\n }\n }\n },\n \"facets\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/stringArray\"\n }\n },\n \"tags\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"concepts\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"relationships\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"target_id\"],\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"target_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"target_path\": {\n \"type\": \"string\"\n },\n \"direction\": {\n \"enum\": [\"upstream\", \"downstream\", \"related\"]\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"confidence\": {\n \"type\": \"number\"\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"metadata\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"provenance\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"field\", \"source\", \"path\", \"confidence\", \"privacy\"],\n \"properties\": {\n \"field\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"confidence\": {\n \"enum\": [\"source\", \"candidate\", \"reviewed\", \"rejected\"]\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n }\n }\n }\n },\n \"privacy\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"classification\", \"pii\"],\n \"properties\": {\n \"classification\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"pii\": {\n \"type\": \"boolean\"\n },\n \"locality\": {\n \"enum\": [\"project\", \"framework\", \"external\"]\n }\n }\n },\n \"chunks\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"body\": {\n \"type\": \"string\"\n },\n \"summary\": {\n \"type\": \"string\"\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"metadata\": {\n \"type\": \"object\"\n },\n \"checksum\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"embeddings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"model\": {\n \"type\": \"string\"\n },\n \"embedding\": {\n \"$ref\": \"#/$defs/numberArray\"\n },\n \"vector\": {\n \"$ref\": \"#/$defs/numberArray\"\n },\n \"granularity\": {\n \"type\": \"string\"\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"metadata\": {\n \"type\": \"object\"\n },\n \"chunk_id\": {\n \"type\": \"string\"\n },\n \"vector_ref\": {\n \"type\": \"string\"\n },\n \"input_hash\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"compatibility\": {\n \"type\": \"object\"\n },\n \"skos_concepts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"prefLabel\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"prefLabel\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"definition\": {\n \"type\": \"string\"\n },\n \"scheme\": {\n \"type\": \"string\"\n },\n \"notation\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"altLabels\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"metadata\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"skos_relations\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"source_id\", \"target_id\"],\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"target_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"metadata\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"provenance_events\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"activity\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"activity\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"agent\": {\n \"type\": \"string\"\n },\n \"started_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ended_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"path\": {\n \"type\": \"string\"\n },\n \"confidence\": {\n \"enum\": [\"source\", \"candidate\", \"reviewed\", \"rejected\"]\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"attributes\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"operational_state\": {\n \"$ref\": \"#/$defs/operationalState\"\n },\n \"state_transfer\": {\n \"$ref\": \"#/$defs/stateTransfer\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n },\n \"operationalState\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"classification\"],\n \"properties\": {\n \"source_repo\": { \"type\": \"string\", \"minLength\": 1 },\n \"source_kind\": { \"type\": \"string\", \"minLength\": 1 },\n \"source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"observed_state\": { \"type\": \"string\", \"minLength\": 1 },\n \"observed_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"source_updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"evidence_url\": { \"type\": \"string\", \"format\": \"uri\" },\n \"evidence_path\": { \"type\": \"string\", \"minLength\": 1 },\n \"observer\": { \"type\": \"string\", \"minLength\": 1 },\n \"supersedes\": { \"$ref\": \"#/$defs/stringArray\" },\n \"contradicts\": { \"$ref\": \"#/$defs/stringArray\" },\n \"stale_after\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"classification\": {\n \"enum\": [\"fresh\", \"historical\", \"superseded\", \"contradicted\", \"needs-source\"]\n },\n \"confidence\": {\n \"enum\": [\"source\", \"candidate\", \"reviewed\", \"rejected\"]\n },\n \"current_action_selector\": { \"type\": \"boolean\" }\n }\n },\n \"stateTransfer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"deleted_at\"],\n \"properties\": {\n \"deleted_at\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n }\n }\n }\n }\n}\n","import Ajv2020 from 'ajv/dist/2020.js'\nimport type { ErrorObject, ValidateFunction } from 'ajv'\nimport schema from '../schemas/aiwg-fortemi-index-export.schema.json' with { type: 'json' }\n\nexport interface AiwgIndexSchemaValidationResult {\n valid: boolean\n errors: string[]\n}\n\nconst PROJECTED_FIELDS = [\n 'schema_version',\n 'id',\n 'type',\n 'title',\n 'text',\n 'facets',\n 'tags',\n 'concepts',\n 'privacy',\n] as const\n\nlet ajvInstance: Ajv2020 | undefined\nlet exportValidator: ValidateFunction | undefined\nlet projectedRecordValidator: ValidateFunction | undefined\n\nexport function getAiwgFortemiIndexExportSchema(): unknown {\n return schema\n}\n\nfunction getAjv(): Ajv2020 {\n if (!ajvInstance) {\n ajvInstance = new Ajv2020({\n allErrors: true,\n strict: false,\n validateFormats: false,\n })\n ajvInstance.addSchema(schema)\n }\n return ajvInstance\n}\n\nfunction formatErrors(errors: ErrorObject[] | null | undefined): string[] {\n return (errors ?? []).map((error) => {\n const path = error.instancePath || '(root)'\n return `${path} ${error.message ?? 'is invalid'}`\n })\n}\n\nfunction getExportValidator(): ValidateFunction {\n exportValidator ??= getAjv().getSchema(schema.$id) ?? getAjv().compile(schema)\n return exportValidator\n}\n\nfunction getProjectedRecordValidator(): ValidateFunction {\n if (!projectedRecordValidator) {\n const properties = Object.fromEntries(Object.keys(schema.$defs.record.properties).map((field) => [\n field,\n { $ref: `${schema.$id}#/$defs/record/properties/${field}` },\n ]))\n projectedRecordValidator = getAjv().compile({\n type: 'object',\n required: PROJECTED_FIELDS,\n properties,\n additionalProperties: true,\n allOf: [\n {\n if: {\n properties: {\n schema_version: { const: 'aiwg.fortemi.index.record.v1' },\n },\n },\n then: { $ref: `${schema.$id}#/$defs/v1RecordCompatibility` },\n },\n ],\n })\n }\n return projectedRecordValidator\n}\n\nexport function validateAiwgFortemiIndexExportSchema(value: unknown): AiwgIndexSchemaValidationResult {\n const validate = getExportValidator()\n // `binary_sources` is a documented fortemi-react attachment-text extension;\n // upstream intentionally omits it. Validate every upstream field against the\n // pinned authority while keeping that local extension out of the schema input.\n const schemaValue = value && typeof value === 'object' && Array.isArray((value as { items?: unknown }).items)\n ? {\n ...(value as Record<string, unknown>),\n items: (value as { items: unknown[] }).items.map((item) => {\n if (!item || typeof item !== 'object' || Array.isArray(item)) return item\n const schemaRecord = { ...(item as Record<string, unknown>) }\n Reflect.deleteProperty(schemaRecord, 'binary_sources')\n return schemaRecord\n }),\n }\n : value\n const valid = validate(schemaValue)\n return { valid, errors: formatErrors(validate.errors) }\n}\n\nexport function validateAiwgFortemiProjectedRecordSchema(value: unknown): AiwgIndexSchemaValidationResult {\n const validate = getProjectedRecordValidator()\n const valid = validate(value)\n return { valid, errors: formatErrors(validate.errors) }\n}\n","/**\n * SHA-256 checksum utilities for shard integrity verification.\n * Uses the Web Crypto API (browser-native, no extra dependencies).\n */\n\n/**\n * Compute SHA-256 hex digest of a Uint8Array.\n * Returns lowercase hex string (64 characters).\n */\nexport async function sha256Hex(data: Uint8Array): Promise<string> {\n const buf = new ArrayBuffer(data.byteLength)\n new Uint8Array(buf).set(data)\n const hashBuffer = await crypto.subtle.digest('SHA-256', buf)\n const hashArray = new Uint8Array(hashBuffer)\n return Array.from(hashArray)\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n}\n\n/**\n * Validate checksums listed in a shard manifest against actual file contents.\n *\n * SECURITY (SEC7 — trust model): these checksums live *inside* the same archive\n * as the files they hash, so they detect **transport corruption**, not\n * **tampering**. An attacker who controls the archive controls both the file\n * bytes and the manifest hashes, so a passing result proves the archive is\n * internally consistent — nothing more. For provenance-sensitive imports, verify\n * integrity out-of-band: a signed manifest, or a caller-supplied expected digest\n * checked against the whole archive (see `prefetchShard`'s `expectedSha256`,\n * which is real integrity because the hash arrives on a separate channel).\n *\n * The signed-manifest path is now implemented: `verifyShardSignature`\n * (`shard-signature.ts`, #324/ADR-014) authenticates publisher provenance via\n * an Ed25519 signature over the manifest digest + blob-digest set, and\n * `importShard` runs it BEFORE any record or blob mutation. These in-archive\n * checksums remain the consistency layer *inside* that verified boundary.\n *\n * @returns Object with `valid` flag and list of failed filenames.\n */\nexport async function validateChecksums(\n checksums: Record<string, string>,\n files: Map<string, Uint8Array>,\n): Promise<{ valid: boolean; failures: string[] }> {\n const failures: string[] = []\n\n for (const [filename, expectedHash] of Object.entries(checksums)) {\n const fileData = files.get(filename)\n if (!fileData) {\n failures.push(filename)\n continue\n }\n const actualHash = await sha256Hex(fileData)\n if (actualHash !== expectedHash) {\n failures.push(filename)\n }\n }\n\n return { valid: failures.length === 0, failures }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 note record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"title\",\n \"original_content\",\n \"revised_content\",\n \"metadata\",\n \"format\",\n \"source\",\n \"starred\",\n \"archived\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\",\n \"tags\",\n \"attachments\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"title\": {\n \"type\": [\"string\", \"null\"]\n },\n \"original_content\": {\n \"type\": \"string\"\n },\n \"revised_content\": {\n \"type\": \"string\"\n },\n \"metadata\": true,\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"starred\": {\n \"type\": \"boolean\"\n },\n \"archived\": {\n \"type\": \"boolean\"\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"attachments\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/attachmentProjection\"\n }\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^blake3:[0-9a-f]{64}$\"\n },\n \"attachmentProjection\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"extracted_text\",\n \"extraction_status\",\n \"reason\",\n \"attachment\"\n ],\n \"properties\": {\n \"extracted_text\": {\n \"type\": [\"string\", \"null\"]\n },\n \"extraction_status\": {\n \"enum\": [\"extracted\", \"pending\", \"failed\", \"blocked\", \"deferred\"]\n },\n \"reason\": {\n \"enum\": [\n null,\n \"extraction_pending\",\n \"extractor_failed\",\n \"quarantined\",\n \"large_binary\",\n \"unsupported_mime\",\n \"no_extracted_text\"\n ]\n },\n \"attachment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"mime\", \"checksum\", \"bytes\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"mime\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"checksum\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"bytes\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n }\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 collection record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"name\", \"description\", \"parent_id\", \"created_at\", \"note_count\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"parent_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"note_count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 tag record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"created_at\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/template.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 template record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"content\",\n \"format\",\n \"default_tags\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"default_tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.0.0/core-v1/link.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 link record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"from_note_id\",\n \"to_note_id\",\n \"to_url\",\n \"kind\",\n \"score\",\n \"created_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"from_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_note_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"to_url\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"score\": {\n \"type\": \"number\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"metadata\": true\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"to_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_url\": {\n \"type\": \"null\"\n }\n }\n },\n {\n \"properties\": {\n \"to_note_id\": {\n \"type\": \"null\"\n },\n \"to_url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.1.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.1.0\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"const\": \"1.1.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.1.0/full-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.1.0\"\n },\n \"profile\": {\n \"const\": \"full-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"name\",\n \"version\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 33,\n \"maxItems\": 33,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"communities\",\n \"community_assignments\"\n ]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"$ref\": \"#/$defs/checksums\"\n },\n \"min_reader_version\": {\n \"const\": \"1.1.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"community_sets\",\n \"communities\",\n \"community_assignments\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_originals\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_original_history\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revised_current\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revisions\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_configs\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_set_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embeddings\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_activities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"named_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_devices\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_records\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_schemes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_concepts\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_labels\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_mapping_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_scheme_memberships\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_skos_tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collection_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_sources\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"communities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_assignments\": {\n \"$ref\": \"#/$defs/count\"\n }\n }\n },\n \"checksums\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\",\n \"note_originals.jsonl\",\n \"note_original_history.jsonl\",\n \"note_revised_current.jsonl\",\n \"note_revisions.jsonl\",\n \"embedding_configs.json\",\n \"embedding_sets.json\",\n \"embedding_set_members.jsonl\",\n \"embeddings.jsonl\",\n \"provenance_edges.jsonl\",\n \"provenance_activities.jsonl\",\n \"named_locations.jsonl\",\n \"provenance_locations.jsonl\",\n \"provenance_devices.jsonl\",\n \"provenance_records.jsonl\",\n \"skos_schemes.json\",\n \"skos_concepts.json\",\n \"skos_labels.jsonl\",\n \"skos_notes.jsonl\",\n \"skos_relations.jsonl\",\n \"skos_mapping_relations.jsonl\",\n \"skos_scheme_memberships.jsonl\",\n \"note_skos_tags.jsonl\",\n \"skos_collections.json\",\n \"skos_collection_members.jsonl\",\n \"graph_sources.json\",\n \"graph_edges.jsonl\",\n \"communities.json\",\n \"community_assignments.jsonl\"\n ],\n \"properties\": {\n \"notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"tags.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"templates.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"links.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_originals.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_original_history.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revised_current.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revisions.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_configs.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_sets.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_set_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embeddings.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_activities.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"named_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_devices.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_records.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_schemes.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_concepts.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_labels.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_mapping_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_scheme_memberships.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_skos_tags.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collection_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_sources.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"communities.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"community_assignments.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.1.0/full-v1/embedding.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"embedding_set_id\",\n \"chunk_index\",\n \"text\",\n \"vector\",\n \"model\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"chunk_index\": {\n \"type\": \"integer\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"vector\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": {\n \"type\": \"number\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.2.0\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"const\": \"1.2.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 note record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"title\",\n \"original_content\",\n \"revised_content\",\n \"metadata\",\n \"format\",\n \"source\",\n \"starred\",\n \"archived\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\",\n \"tags\",\n \"attachments\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"title\": {\n \"type\": [\"string\", \"null\"]\n },\n \"original_content\": {\n \"type\": \"string\"\n },\n \"revised_content\": {\n \"type\": \"string\"\n },\n \"metadata\": true,\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"starred\": {\n \"type\": \"boolean\"\n },\n \"archived\": {\n \"type\": \"boolean\"\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"deleted_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"attachments\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/attachmentProjection\"\n }\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^blake3:[0-9a-f]{64}$\"\n },\n \"attachmentProjection\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"extracted_text\",\n \"extraction_status\",\n \"reason\",\n \"attachment\"\n ],\n \"properties\": {\n \"extracted_text\": {\n \"type\": [\"string\", \"null\"]\n },\n \"extraction_status\": {\n \"enum\": [\"extracted\", \"pending\", \"failed\", \"blocked\", \"deferred\"]\n },\n \"reason\": {\n \"enum\": [\n null,\n \"extraction_pending\",\n \"extractor_failed\",\n \"quarantined\",\n \"large_binary\",\n \"unsupported_mime\",\n \"no_extracted_text\"\n ]\n },\n \"attachment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"mime\", \"checksum\", \"bytes\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"mime\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"checksum\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"bytes\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n }\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 collection record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"name\", \"description\", \"parent_id\", \"created_at\", \"note_count\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"parent_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"note_count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 tag record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"created_at\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/template.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 template record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"content\",\n \"format\",\n \"default_tags\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"default_tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/core-v1/link.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 link record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"from_note_id\",\n \"to_note_id\",\n \"to_url\",\n \"kind\",\n \"score\",\n \"created_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"from_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_note_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"to_url\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"score\": {\n \"type\": \"number\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"metadata\": true\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"to_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_url\": {\n \"type\": \"null\"\n }\n }\n },\n {\n \"properties\": {\n \"to_note_id\": {\n \"type\": \"null\"\n },\n \"to_url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"1.2.0\"\n },\n \"profile\": {\n \"const\": \"full-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"name\",\n \"version\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 33,\n \"maxItems\": 33,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"communities\",\n \"community_assignments\"\n ]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"$ref\": \"#/$defs/checksums\"\n },\n \"min_reader_version\": {\n \"const\": \"1.2.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"community_sets\",\n \"communities\",\n \"community_assignments\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_originals\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_original_history\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revised_current\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revisions\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_configs\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_set_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embeddings\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_activities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"named_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_devices\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_records\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_schemes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_concepts\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_labels\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_mapping_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_scheme_memberships\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_skos_tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collection_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_sources\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"communities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_assignments\": {\n \"$ref\": \"#/$defs/count\"\n }\n }\n },\n \"checksums\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\",\n \"note_originals.jsonl\",\n \"note_original_history.jsonl\",\n \"note_revised_current.jsonl\",\n \"note_revisions.jsonl\",\n \"embedding_configs.json\",\n \"embedding_sets.json\",\n \"embedding_set_members.jsonl\",\n \"embeddings.jsonl\",\n \"provenance_edges.jsonl\",\n \"provenance_activities.jsonl\",\n \"named_locations.jsonl\",\n \"provenance_locations.jsonl\",\n \"provenance_devices.jsonl\",\n \"provenance_records.jsonl\",\n \"skos_schemes.json\",\n \"skos_concepts.json\",\n \"skos_labels.jsonl\",\n \"skos_notes.jsonl\",\n \"skos_relations.jsonl\",\n \"skos_mapping_relations.jsonl\",\n \"skos_scheme_memberships.jsonl\",\n \"note_skos_tags.jsonl\",\n \"skos_collections.json\",\n \"skos_collection_members.jsonl\",\n \"graph_sources.json\",\n \"graph_edges.jsonl\",\n \"communities.json\",\n \"community_assignments.jsonl\"\n ],\n \"properties\": {\n \"notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"tags.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"templates.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"links.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_originals.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_original_history.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revised_current.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revisions.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_configs.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_sets.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_set_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embeddings.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_activities.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"named_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_devices.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_records.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_schemes.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_concepts.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_labels.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_mapping_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_scheme_memberships.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_skos_tags.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collection_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_sources.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"communities.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"community_assignments.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-original.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"content\",\n \"hash\",\n \"user_created_at\",\n \"user_last_edited_at\",\n \"version_number\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"user_created_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-original-history.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original history record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"version_number\",\n \"content\",\n \"hash\",\n \"created_at_utc\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-revised-current.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate current note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\",\n \"content\",\n \"last_revision_id\",\n \"ai_metadata\"\n ],\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"last_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"ai_metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-revision.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"parent_revision_id\",\n \"revision_number\",\n \"content\",\n \"type\",\n \"summary\",\n \"rationale\",\n \"created_at_utc\",\n \"ai_generated_at\",\n \"user_last_edited_at\",\n \"is_user_edited\",\n \"generation_count\",\n \"model\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"parent_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"revision_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"summary\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"rationale\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ai_generated_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"is_user_edited\": {\n \"type\": \"boolean\"\n },\n \"generation_count\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"model\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding-config.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding config record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"model\",\n \"dimension\",\n \"chunk_size\",\n \"chunk_overlap\",\n \"hnsw_m\",\n \"hnsw_ef_construction\",\n \"ivfflat_lists\",\n \"is_default\",\n \"supports_mrl\",\n \"matryoshka_dims\",\n \"default_truncate_dim\",\n \"provider\",\n \"provider_config\",\n \"content_types\",\n \"strengths\",\n \"limitations\",\n \"recommended_for\",\n \"benchmark_scores\",\n \"is_available\",\n \"document_composition\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"dimension\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_size\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_overlap\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"hnsw_m\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"hnsw_ef_construction\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"ivfflat_lists\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_default\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"supports_mrl\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"matryoshka_dims\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"default_truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"provider\": {\n \"enum\": [\n null,\n \"ollama\",\n \"openai\",\n \"voyage\",\n \"cohere\",\n \"custom\"\n ]\n },\n \"provider_config\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"content_types\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"strengths\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"limitations\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"recommended_for\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"benchmark_scores\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"is_available\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"document_composition\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"description\",\n \"purpose\",\n \"usage_hints\",\n \"keywords\",\n \"set_type\",\n \"mode\",\n \"criteria\",\n \"embedding_config_id\",\n \"truncate_dim\",\n \"auto_embed_rules\",\n \"index_status\",\n \"index_type\",\n \"last_indexed_at\",\n \"document_count\",\n \"embedding_count\",\n \"embeddings_current\",\n \"index_size_bytes\",\n \"is_system\",\n \"is_active\",\n \"auto_refresh\",\n \"refresh_interval\",\n \"last_refresh_at\",\n \"agent_metadata\",\n \"created_at\",\n \"updated_at\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"purpose\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"usage_hints\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"keywords\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"set_type\": {\n \"enum\": [\n \"filter\",\n \"full\"\n ]\n },\n \"mode\": {\n \"enum\": [\n \"auto\",\n \"manual\",\n \"mixed\"\n ]\n },\n \"criteria\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"embedding_config_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"auto_embed_rules\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"index_status\": {\n \"enum\": [\n \"empty\",\n \"pending\",\n \"building\",\n \"ready\",\n \"stale\",\n \"disabled\"\n ]\n },\n \"index_type\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_indexed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"document_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embedding_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embeddings_current\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"index_size_bytes\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_system\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"is_active\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"auto_refresh\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"refresh_interval\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_refresh_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"agent_metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding-set-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set member record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"embedding_set_id\",\n \"note_id\",\n \"membership_type\",\n \"added_at\",\n \"added_by\"\n ],\n \"properties\": {\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"membership_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"added_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"added_by\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/embedding.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"embedding_set_id\",\n \"chunk_index\",\n \"text\",\n \"vector\",\n \"model\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"chunk_index\": {\n \"type\": \"integer\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"vector\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": {\n \"type\": \"number\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"contract_fingerprint\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance edge record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"revision_id\",\n \"source_note_id\",\n \"source_url\",\n \"relation\",\n \"created_at_utc\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_url\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"relation\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-activity.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance activity record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"revision_id\",\n \"activity_type\",\n \"model_name\",\n \"started_at\",\n \"ended_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"model_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"started_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ended_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/named-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate named location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"display_name\",\n \"location_type\",\n \"point_ewkb_hex\",\n \"boundary_ewkb_hex\",\n \"radius_m\",\n \"address_line\",\n \"locality\",\n \"admin_area\",\n \"country\",\n \"country_code\",\n \"postal_code\",\n \"timezone\",\n \"altitude_m\",\n \"owner_id\",\n \"is_private\",\n \"metadata\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"display_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"location_type\": {\n \"enum\": [\n \"home\",\n \"work\",\n \"poi\",\n \"city\",\n \"region\",\n \"country\"\n ]\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"boundary_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"radius_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"address_line\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"locality\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"admin_area\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country_code\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"minLength\": 2,\n \"maxLength\": 2\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"postal_code\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"is_private\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"metadata\": {},\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableEwkb\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/ewkb\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"point_ewkb_hex\",\n \"horizontal_accuracy_m\",\n \"altitude_m\",\n \"vertical_accuracy_m\",\n \"heading_degrees\",\n \"speed_mps\",\n \"named_location_id\",\n \"source\",\n \"confidence\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/ewkb\"\n },\n \"horizontal_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"vertical_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"heading_degrees\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0,\n \"exclusiveMaximum\": 360\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"speed_mps\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"named_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source\": {\n \"enum\": [\n \"gps_exif\",\n \"device_api\",\n \"user_manual\",\n \"geocoded\",\n \"ai_estimated\",\n \"unknown\"\n ]\n },\n \"confidence\": {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-device.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance device record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"device_make\",\n \"device_model\",\n \"device_os\",\n \"device_os_version\",\n \"software\",\n \"software_version\",\n \"has_gps\",\n \"has_accelerometer\",\n \"sensor_metadata\",\n \"owner_id\",\n \"device_name\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"device_make\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"has_gps\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"has_accelerometer\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"sensor_metadata\": {},\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/provenance-record.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate unified provenance record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"attachment_id\",\n \"note_id\",\n \"capture_time\",\n \"capture_timezone\",\n \"capture_duration_seconds\",\n \"time_source\",\n \"time_confidence\",\n \"location_id\",\n \"device_id\",\n \"activity_id\",\n \"event_type\",\n \"event_title\",\n \"event_description\",\n \"raw_metadata\",\n \"ai_context\",\n \"ai_processed_at\",\n \"ai_model\",\n \"user_corrected\",\n \"original_capture_time\",\n \"original_location_id\",\n \"correction_note\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"attachment_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"capture_timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"capture_duration_seconds\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"time_source\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"exif\",\n \"file_mtime\",\n \"user_manual\",\n \"ai_estimated\",\n \"gps\",\n \"network\",\n \"manual\",\n \"file_metadata\",\n \"device_clock\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"time_confidence\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\",\n \"exact\",\n \"approximate\",\n \"estimated\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"event_type\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"photo\",\n \"video\",\n \"audio\",\n \"scan\",\n \"screenshot\",\n \"recording\",\n \"unknown\",\n \"created\",\n \"modified\",\n \"accessed\",\n \"shared\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"event_title\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"event_description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"raw_metadata\": {},\n \"ai_context\": {},\n \"ai_processed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"ai_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"user_corrected\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"original_capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"original_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"correction_note\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"anyOf\": [\n {\n \"properties\": {\n \"attachment_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n },\n {\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableTimestampRange\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/timestampRange\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"timestampRange\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"empty\",\n \"lower\",\n \"lower_inclusive\",\n \"lower_infinite\",\n \"upper\",\n \"upper_inclusive\",\n \"upper_infinite\"\n ],\n \"properties\": {\n \"empty\": {\n \"type\": \"boolean\"\n },\n \"lower\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"lower_inclusive\": {\n \"type\": \"boolean\"\n },\n \"lower_infinite\": {\n \"type\": \"boolean\"\n },\n \"upper\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"upper_inclusive\": {\n \"type\": \"boolean\"\n },\n \"upper_infinite\": {\n \"type\": \"boolean\"\n }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": {\n \"empty\": {\n \"const\": true\n }\n }\n },\n \"then\": {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": false\n },\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n \"else\": {\n \"allOf\": [\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"lower\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"lower_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n },\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"upper\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n }\n ]\n }\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-scheme.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept scheme\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"notation\", \"title\", \"description\", \"creator\", \"publisher\",\n \"rights\", \"version\", \"is_active\", \"is_system\", \"created_at\", \"updated_at\",\n \"issued_at\", \"modified_at\", \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": \"string\", \"minLength\": 1 },\n \"title\": { \"type\": \"string\", \"minLength\": 1 },\n \"description\": { \"type\": [\"string\", \"null\"] },\n \"creator\": { \"type\": [\"string\", \"null\"] },\n \"publisher\": { \"type\": [\"string\", \"null\"] },\n \"rights\": { \"type\": [\"string\", \"null\"] },\n \"version\": { \"type\": [\"string\", \"null\"] },\n \"is_active\": { \"type\": \"boolean\" },\n \"is_system\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"issued_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"modified_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-concept.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"primary_scheme_id\", \"uri\", \"notation\", \"facet_type\", \"facet_source\",\n \"facet_domain\", \"facet_scope\", \"status\", \"promoted_at\", \"deprecated_at\",\n \"deprecation_reason\", \"replaced_by_id\", \"note_count\", \"first_used_at\",\n \"last_used_at\", \"depth\", \"broader_count\", \"narrower_count\", \"related_count\",\n \"antipatterns\", \"antipattern_checked_at\", \"created_at\", \"updated_at\",\n \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"primary_scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"facet_type\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"personality\", \"matter\", \"energy\", \"space\", \"time\", null]\n },\n \"facet_source\": { \"type\": [\"string\", \"null\"] },\n \"facet_domain\": { \"type\": [\"string\", \"null\"] },\n \"facet_scope\": { \"type\": [\"string\", \"null\"] },\n \"status\": { \"enum\": [\"candidate\", \"approved\", \"deprecated\", \"obsolete\"] },\n \"promoted_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecation_reason\": { \"type\": [\"string\", \"null\"] },\n \"replaced_by_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"note_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"first_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"last_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"depth\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 5 },\n \"broader_count\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 3 },\n \"narrower_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"related_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"antipatterns\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"orphan\", \"over_tagged\", \"under_used\", \"too_broad\", \"too_deep\",\n \"polyhierarchy_excess\", \"missing_labels\", \"circular_hierarchy\"\n ]\n }\n },\n \"antipattern_checked_at\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-label.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS label\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"concept_id\", \"label_type\", \"value\", \"language\", \"created_at\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"label_type\": { \"enum\": [\"pref_label\", \"alt_label\", \"hidden_label\"] },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS note\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"note_type\", \"value\", \"language\", \"author\", \"source\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"note_type\": {\n \"enum\": [\n \"definition\", \"scope_note\", \"example\", \"history_note\",\n \"editorial_note\", \"change_note\", \"note\"\n ]\n },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"author\": { \"type\": [\"string\", \"null\"] },\n \"source\": { \"type\": [\"string\", \"null\"] },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS semantic relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"subject_id\", \"object_id\", \"relation_type\", \"inference_score\",\n \"is_inferred\", \"is_validated\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"subject_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"object_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"relation_type\": { \"enum\": [\"broader\", \"narrower\", \"related\"] },\n \"inference_score\": { \"type\": [\"number\", \"null\"] },\n \"is_inferred\": { \"type\": \"boolean\" },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-mapping-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS mapping relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"target_uri\", \"target_scheme_uri\", \"target_label\",\n \"relation_type\", \"confidence\", \"is_validated\", \"created_at\", \"validated_at\",\n \"validated_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"target_uri\": { \"type\": \"string\", \"format\": \"uri\" },\n \"target_scheme_uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"target_label\": { \"type\": [\"string\", \"null\"] },\n \"relation_type\": {\n \"enum\": [\n \"exact_match\", \"close_match\", \"broad_match\", \"narrow_match\", \"related_match\"\n ]\n },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"validated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"validated_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-scheme-membership.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS scheme membership\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"concept_id\", \"scheme_id\", \"is_top_concept\", \"added_at\"],\n \"properties\": {\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"is_top_concept\": { \"type\": \"boolean\" },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/note-skos-tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 note SKOS tag\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\", \"concept_id\", \"source\", \"confidence\", \"relevance_score\",\n \"is_primary\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"source\": { \"type\": \"string\", \"minLength\": 1 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"relevance_score\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_primary\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"pref_label\", \"definition\", \"is_ordered\", \"scheme_id\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"pref_label\": { \"type\": \"string\", \"minLength\": 1 },\n \"definition\": { \"type\": [\"string\", \"null\"] },\n \"is_ordered\": { \"type\": \"boolean\" },\n \"scheme_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/skos-collection-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection member\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"collection_id\", \"concept_id\", \"position\", \"added_at\"],\n \"properties\": {\n \"collection_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"position\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/graph-source.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph source\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"kind\",\n \"source_table\",\n \"embedding_set_id\",\n \"virtual_set_id\",\n \"model\",\n \"dimension\",\n \"truncate_dimension\",\n \"metric\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"kind\": {\n \"enum\": [\"link\", \"similarity\", \"search\", \"manual\", \"imported\"]\n },\n \"source_table\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"link\", \"embedding\", \"manual\", null]\n },\n \"embedding_set_id\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uuid\"\n },\n \"virtual_set_id\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"truncate_dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"metric\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"cosine\", \"inner_product\", \"l2\", null]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/graph-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph edge\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"graph_source_id\",\n \"from_note_id\",\n \"to_note_id\",\n \"weight\",\n \"kind\",\n \"rank\",\n \"metadata\"\n ],\n \"properties\": {\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"from_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"to_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"weight\": { \"type\": \"number\" },\n \"kind\": { \"enum\": [\"link\", \"similarity\", \"manual\"] },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/community-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community set\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"graph_source_id\",\n \"name\",\n \"source_type\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"communities\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"communities\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/community\" }\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"$defs\": {\n \"community\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"label\",\n \"rank\",\n \"size\",\n \"confidence\",\n \"representative_note_ids\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"label\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"size\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"representative_note_ids\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"format\": \"uuid\" }\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/community-assignment.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community assignment\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"community_set_id\",\n \"community_id\",\n \"note_id\",\n \"confidence\",\n \"source_type\",\n \"metadata\"\n ],\n \"properties\": {\n \"community_set_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"community_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/1.2.0/full-v1/signature.schema.json\",\n \"title\": \"Fortemi Knowledge Shard signature envelope\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"format_version\",\n \"signer\",\n \"manifest_digest\",\n \"blob_digests\",\n \"signature\"\n ],\n \"properties\": {\n \"format_version\": {\n \"const\": \"1\"\n },\n \"signer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"key_id\",\n \"algorithm\",\n \"public_key\"\n ],\n \"properties\": {\n \"key_id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 256\n },\n \"algorithm\": {\n \"const\": \"ed25519\"\n },\n \"public_key\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{43}$\"\n }\n }\n },\n \"manifest_digest\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"blob_digests\": {\n \"type\": \"array\",\n \"maxItems\": 64,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n },\n \"signature\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{86}$\"\n }\n },\n \"$defs\": {\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"2.0.0\"\n },\n \"profile\": {\n \"const\": \"core-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"version\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\"notes\", \"collections\", \"tags\", \"templates\", \"links\"]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"type\": \"object\",\n \"propertyNames\": {\n \"enum\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\"\n ]\n },\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n },\n \"min_reader_version\": {\n \"const\": \"2.0.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"embedding_configs\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"const\": 0\n },\n \"embedding_set_members\": {\n \"const\": 0\n },\n \"embeddings\": {\n \"const\": 0\n },\n \"embedding_configs\": {\n \"const\": 0\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 note record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"title\",\n \"original_content\",\n \"revised_content\",\n \"metadata\",\n \"format\",\n \"source\",\n \"starred\",\n \"archived\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\",\n \"tags\",\n \"attachments\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"title\": {\n \"type\": [\"string\", \"null\"]\n },\n \"original_content\": {\n \"type\": \"string\"\n },\n \"revised_content\": {\n \"type\": \"string\"\n },\n \"metadata\": true,\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"starred\": {\n \"type\": \"boolean\"\n },\n \"archived\": {\n \"type\": \"boolean\"\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"deleted_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"attachments\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/attachmentProjection\"\n }\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"format\": \"date-time\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^blake3:[0-9a-f]{64}$\"\n },\n \"attachmentProjection\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"extracted_text\",\n \"extraction_status\",\n \"reason\",\n \"attachment\"\n ],\n \"properties\": {\n \"extracted_text\": {\n \"type\": [\"string\", \"null\"]\n },\n \"extraction_status\": {\n \"enum\": [\"extracted\", \"pending\", \"failed\", \"blocked\", \"deferred\"]\n },\n \"reason\": {\n \"enum\": [\n null,\n \"extraction_pending\",\n \"extractor_failed\",\n \"quarantined\",\n \"large_binary\",\n \"unsupported_mime\",\n \"no_extracted_text\"\n ]\n },\n \"attachment\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"path\", \"mime\", \"checksum\", \"bytes\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"mime\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"checksum\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"bytes\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n }\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 collection record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"name\", \"description\", \"parent_id\", \"created_at\", \"note_count\"],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"parent_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"note_count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 tag record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"name\", \"created_at\"],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/template.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 template record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"content\",\n \"format\",\n \"default_tags\",\n \"collection_id\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\"string\", \"null\"]\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"format\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"default_tags\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"collection_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/core-v1/link.schema.json\",\n \"title\": \"Fortemi Knowledge Shard core-v1 link record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"from_note_id\",\n \"to_note_id\",\n \"to_url\",\n \"kind\",\n \"score\",\n \"created_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"from_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_note_id\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"to_url\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uri\"\n },\n \"kind\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"score\": {\n \"type\": \"number\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"metadata\": true\n },\n \"oneOf\": [\n {\n \"properties\": {\n \"to_note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"to_url\": {\n \"type\": \"null\"\n }\n }\n },\n {\n \"properties\": {\n \"to_note_id\": {\n \"type\": \"null\"\n },\n \"to_url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/manifest.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate manifest\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"version\",\n \"profile\",\n \"producer\",\n \"format\",\n \"created_at\",\n \"components\",\n \"counts\",\n \"checksums\",\n \"min_reader_version\"\n ],\n \"properties\": {\n \"version\": {\n \"const\": \"2.0.0\"\n },\n \"profile\": {\n \"const\": \"full-v1\"\n },\n \"producer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"name\",\n \"version\"\n ],\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"matric_version\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"deprecated\": true\n },\n \"format\": {\n \"const\": \"matric-shard\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 33,\n \"maxItems\": 33,\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"communities\",\n \"community_assignments\"\n ]\n }\n },\n \"counts\": {\n \"$ref\": \"#/$defs/counts\"\n },\n \"checksums\": {\n \"$ref\": \"#/$defs/checksums\"\n },\n \"min_reader_version\": {\n \"const\": \"2.0.0\"\n },\n \"migrated_from\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migration_history\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"from_version\",\n \"to_version\",\n \"migrated_at\",\n \"migrated_by\",\n \"changes\"\n ],\n \"properties\": {\n \"from_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"to_version\": {\n \"$ref\": \"#/$defs/strictSemVer\"\n },\n \"migrated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"migrated_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"changes\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n }\n }\n }\n },\n \"$defs\": {\n \"strictSemVer\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)$\"\n },\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"counts\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes\",\n \"collections\",\n \"tags\",\n \"templates\",\n \"links\",\n \"note_originals\",\n \"note_original_history\",\n \"note_revised_current\",\n \"note_revisions\",\n \"embedding_configs\",\n \"embedding_sets\",\n \"embedding_set_members\",\n \"embeddings\",\n \"provenance_edges\",\n \"provenance_activities\",\n \"named_locations\",\n \"provenance_locations\",\n \"provenance_devices\",\n \"provenance_records\",\n \"skos_schemes\",\n \"skos_concepts\",\n \"skos_labels\",\n \"skos_notes\",\n \"skos_relations\",\n \"skos_mapping_relations\",\n \"skos_scheme_memberships\",\n \"note_skos_tags\",\n \"skos_collections\",\n \"skos_collection_members\",\n \"graph_sources\",\n \"graph_edges\",\n \"community_sets\",\n \"communities\",\n \"community_assignments\"\n ],\n \"properties\": {\n \"notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"templates\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"links\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_originals\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_original_history\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revised_current\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_revisions\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_configs\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embedding_set_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"embeddings\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_activities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"named_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_locations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_devices\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"provenance_records\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_schemes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_concepts\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_labels\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_notes\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_mapping_relations\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_scheme_memberships\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"note_skos_tags\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collections\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"skos_collection_members\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_sources\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"graph_edges\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_sets\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"communities\": {\n \"$ref\": \"#/$defs/count\"\n },\n \"community_assignments\": {\n \"$ref\": \"#/$defs/count\"\n }\n }\n },\n \"checksums\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"notes.jsonl\",\n \"collections.json\",\n \"tags.json\",\n \"templates.json\",\n \"links.jsonl\",\n \"note_originals.jsonl\",\n \"note_original_history.jsonl\",\n \"note_revised_current.jsonl\",\n \"note_revisions.jsonl\",\n \"embedding_configs.json\",\n \"embedding_sets.json\",\n \"embedding_set_members.jsonl\",\n \"embeddings.jsonl\",\n \"provenance_edges.jsonl\",\n \"provenance_activities.jsonl\",\n \"named_locations.jsonl\",\n \"provenance_locations.jsonl\",\n \"provenance_devices.jsonl\",\n \"provenance_records.jsonl\",\n \"skos_schemes.json\",\n \"skos_concepts.json\",\n \"skos_labels.jsonl\",\n \"skos_notes.jsonl\",\n \"skos_relations.jsonl\",\n \"skos_mapping_relations.jsonl\",\n \"skos_scheme_memberships.jsonl\",\n \"note_skos_tags.jsonl\",\n \"skos_collections.json\",\n \"skos_collection_members.jsonl\",\n \"graph_sources.json\",\n \"graph_edges.jsonl\",\n \"communities.json\",\n \"community_assignments.jsonl\"\n ],\n \"properties\": {\n \"notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"tags.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"templates.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"links.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_originals.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_original_history.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revised_current.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_revisions.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_configs.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_sets.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embedding_set_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"embeddings.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_activities.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"named_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_locations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_devices.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"provenance_records.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_schemes.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_concepts.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_labels.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_notes.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_mapping_relations.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_scheme_memberships.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"note_skos_tags.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collections.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"skos_collection_members.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_sources.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"graph_edges.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"communities.json\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"community_assignments.jsonl\": {\n \"$ref\": \"#/$defs/sha256\"\n }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-original.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"content\",\n \"hash\",\n \"user_created_at\",\n \"user_last_edited_at\",\n \"version_number\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"user_created_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-original-history.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note original history record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"version_number\",\n \"content\",\n \"hash\",\n \"created_at_utc\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"version_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"hash\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-revised-current.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate current note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\",\n \"content\",\n \"last_revision_id\",\n \"ai_metadata\"\n ],\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"last_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"ai_metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-revision.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate note revision record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"parent_revision_id\",\n \"revision_number\",\n \"content\",\n \"type\",\n \"summary\",\n \"rationale\",\n \"created_at_utc\",\n \"ai_generated_at\",\n \"user_last_edited_at\",\n \"is_user_edited\",\n \"generation_count\",\n \"model\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"parent_revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"revision_number\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"content\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"summary\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"rationale\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ai_generated_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"user_last_edited_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"is_user_edited\": {\n \"type\": \"boolean\"\n },\n \"generation_count\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"model\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding-config.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding config record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"description\",\n \"model\",\n \"dimension\",\n \"chunk_size\",\n \"chunk_overlap\",\n \"hnsw_m\",\n \"hnsw_ef_construction\",\n \"ivfflat_lists\",\n \"is_default\",\n \"supports_mrl\",\n \"matryoshka_dims\",\n \"default_truncate_dim\",\n \"provider\",\n \"provider_config\",\n \"content_types\",\n \"strengths\",\n \"limitations\",\n \"recommended_for\",\n \"benchmark_scores\",\n \"is_available\",\n \"document_composition\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"dimension\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_size\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"chunk_overlap\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"hnsw_m\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"hnsw_ef_construction\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"ivfflat_lists\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_default\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"supports_mrl\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"matryoshka_dims\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 1,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"default_truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"provider\": {\n \"enum\": [\n null,\n \"ollama\",\n \"openai\",\n \"voyage\",\n \"cohere\",\n \"custom\"\n ]\n },\n \"provider_config\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"content_types\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"strengths\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"limitations\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"recommended_for\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"benchmark_scores\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"is_available\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"document_composition\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"description\",\n \"purpose\",\n \"usage_hints\",\n \"keywords\",\n \"set_type\",\n \"mode\",\n \"criteria\",\n \"embedding_config_id\",\n \"truncate_dim\",\n \"auto_embed_rules\",\n \"index_status\",\n \"index_type\",\n \"last_indexed_at\",\n \"document_count\",\n \"embedding_count\",\n \"embeddings_current\",\n \"index_size_bytes\",\n \"is_system\",\n \"is_active\",\n \"auto_refresh\",\n \"refresh_interval\",\n \"last_refresh_at\",\n \"agent_metadata\",\n \"created_at\",\n \"updated_at\",\n \"created_by\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"purpose\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"usage_hints\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"keywords\": {\n \"$ref\": \"#/$defs/nullableStringArray\"\n },\n \"set_type\": {\n \"enum\": [\n \"filter\",\n \"full\"\n ]\n },\n \"mode\": {\n \"enum\": [\n \"auto\",\n \"manual\",\n \"mixed\"\n ]\n },\n \"criteria\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"embedding_config_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"truncate_dim\": {\n \"$ref\": \"#/$defs/nullablePositiveInteger\"\n },\n \"auto_embed_rules\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"index_status\": {\n \"enum\": [\n \"empty\",\n \"pending\",\n \"building\",\n \"ready\",\n \"stale\",\n \"disabled\"\n ]\n },\n \"index_type\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_indexed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"document_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embedding_count\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"embeddings_current\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"index_size_bytes\": {\n \"$ref\": \"#/$defs/nullableNonNegativeInteger\"\n },\n \"is_system\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"is_active\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"auto_refresh\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"refresh_interval\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"last_refresh_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"agent_metadata\": {\n \"type\": [\n \"object\",\n \"null\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"created_by\": {\n \"$ref\": \"#/$defs/nullableString\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableNonNegativeInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 0\n },\n \"nullablePositiveInteger\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n },\n \"nullableStringArray\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding-set-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding set member record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"embedding_set_id\",\n \"note_id\",\n \"membership_type\",\n \"added_at\",\n \"added_by\"\n ],\n \"properties\": {\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"membership_type\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"added_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"added_by\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/embedding.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate embedding record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"embedding_set_id\",\n \"chunk_index\",\n \"text\",\n \"vector\",\n \"model\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"embedding_set_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"chunk_index\": {\n \"type\": \"integer\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"vector\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": {\n \"type\": \"number\"\n }\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"contract_fingerprint\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"created_at\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance edge record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"revision_id\",\n \"source_note_id\",\n \"source_url\",\n \"relation\",\n \"created_at_utc\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source_url\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"relation\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"created_at_utc\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-activity.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance activity record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"note_id\",\n \"revision_id\",\n \"activity_type\",\n \"model_name\",\n \"started_at\",\n \"ended_at\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"revision_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"model_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"started_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"ended_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"metadata\": {}\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/named-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate named location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"slug\",\n \"display_name\",\n \"location_type\",\n \"point_ewkb_hex\",\n \"boundary_ewkb_hex\",\n \"radius_m\",\n \"address_line\",\n \"locality\",\n \"admin_area\",\n \"country\",\n \"country_code\",\n \"postal_code\",\n \"timezone\",\n \"altitude_m\",\n \"owner_id\",\n \"is_private\",\n \"metadata\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"slug\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"display_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"location_type\": {\n \"enum\": [\n \"home\",\n \"work\",\n \"poi\",\n \"city\",\n \"region\",\n \"country\"\n ]\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"boundary_ewkb_hex\": {\n \"$ref\": \"#/$defs/nullableEwkb\"\n },\n \"radius_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"address_line\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"locality\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"admin_area\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"country_code\": {\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"minLength\": 2,\n \"maxLength\": 2\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"postal_code\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"is_private\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"metadata\": {},\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"updated_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableEwkb\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/ewkb\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-location.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance location record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"point_ewkb_hex\",\n \"horizontal_accuracy_m\",\n \"altitude_m\",\n \"vertical_accuracy_m\",\n \"heading_degrees\",\n \"speed_mps\",\n \"named_location_id\",\n \"source\",\n \"confidence\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"point_ewkb_hex\": {\n \"$ref\": \"#/$defs/ewkb\"\n },\n \"horizontal_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"altitude_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"vertical_accuracy_m\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"heading_degrees\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0,\n \"exclusiveMaximum\": 360\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"speed_mps\": {\n \"oneOf\": [\n {\n \"type\": \"number\",\n \"minimum\": 0\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"named_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"source\": {\n \"enum\": [\n \"gps_exif\",\n \"device_api\",\n \"user_manual\",\n \"geocoded\",\n \"ai_estimated\",\n \"unknown\"\n ]\n },\n \"confidence\": {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\"\n ]\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ewkb\": {\n \"type\": \"string\",\n \"minLength\": 2,\n \"pattern\": \"^[0-9a-f]+$\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-device.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate provenance device record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"device_make\",\n \"device_model\",\n \"device_os\",\n \"device_os_version\",\n \"software\",\n \"software_version\",\n \"has_gps\",\n \"has_accelerometer\",\n \"sensor_metadata\",\n \"owner_id\",\n \"device_name\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"device_make\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"device_os_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"software_version\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"has_gps\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"has_accelerometer\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"sensor_metadata\": {},\n \"owner_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_name\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/provenance-record.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 candidate unified provenance record\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"attachment_id\",\n \"note_id\",\n \"capture_time\",\n \"capture_timezone\",\n \"capture_duration_seconds\",\n \"time_source\",\n \"time_confidence\",\n \"location_id\",\n \"device_id\",\n \"activity_id\",\n \"event_type\",\n \"event_title\",\n \"event_description\",\n \"raw_metadata\",\n \"ai_context\",\n \"ai_processed_at\",\n \"ai_model\",\n \"user_corrected\",\n \"original_capture_time\",\n \"original_location_id\",\n \"correction_note\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"$ref\": \"#/$defs/uuid\"\n },\n \"attachment_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"note_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"capture_timezone\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"capture_duration_seconds\": {\n \"$ref\": \"#/$defs/nullableNumber\"\n },\n \"time_source\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"exif\",\n \"file_mtime\",\n \"user_manual\",\n \"ai_estimated\",\n \"gps\",\n \"network\",\n \"manual\",\n \"file_metadata\",\n \"device_clock\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"time_confidence\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"high\",\n \"medium\",\n \"low\",\n \"unknown\",\n \"exact\",\n \"approximate\",\n \"estimated\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"device_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"activity_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"event_type\": {\n \"oneOf\": [\n {\n \"enum\": [\n \"photo\",\n \"video\",\n \"audio\",\n \"scan\",\n \"screenshot\",\n \"recording\",\n \"unknown\",\n \"created\",\n \"modified\",\n \"accessed\",\n \"shared\"\n ]\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"event_title\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"event_description\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"raw_metadata\": {},\n \"ai_context\": {},\n \"ai_processed_at\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"ai_model\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"user_corrected\": {\n \"$ref\": \"#/$defs/nullableBoolean\"\n },\n \"original_capture_time\": {\n \"$ref\": \"#/$defs/nullableTimestampRange\"\n },\n \"original_location_id\": {\n \"$ref\": \"#/$defs/nullableUuid\"\n },\n \"correction_note\": {\n \"$ref\": \"#/$defs/nullableString\"\n },\n \"created_at\": {\n \"$ref\": \"#/$defs/dateTime\"\n }\n },\n \"anyOf\": [\n {\n \"properties\": {\n \"attachment_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n },\n {\n \"properties\": {\n \"note_id\": {\n \"$ref\": \"#/$defs/uuid\"\n }\n }\n }\n ],\n \"$defs\": {\n \"uuid\": {\n \"type\": \"string\",\n \"format\": \"uuid\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"nullableUuid\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/uuid\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableDateTime\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/dateTime\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"nullableString\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"nullableNumber\": {\n \"type\": [\n \"number\",\n \"null\"\n ]\n },\n \"nullableBoolean\": {\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"nullableTimestampRange\": {\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/timestampRange\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"timestampRange\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"empty\",\n \"lower\",\n \"lower_inclusive\",\n \"lower_infinite\",\n \"upper\",\n \"upper_inclusive\",\n \"upper_infinite\"\n ],\n \"properties\": {\n \"empty\": {\n \"type\": \"boolean\"\n },\n \"lower\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"lower_inclusive\": {\n \"type\": \"boolean\"\n },\n \"lower_infinite\": {\n \"type\": \"boolean\"\n },\n \"upper\": {\n \"$ref\": \"#/$defs/nullableDateTime\"\n },\n \"upper_inclusive\": {\n \"type\": \"boolean\"\n },\n \"upper_infinite\": {\n \"type\": \"boolean\"\n }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": {\n \"empty\": {\n \"const\": true\n }\n }\n },\n \"then\": {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": false\n },\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n \"else\": {\n \"allOf\": [\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"lower\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"lower_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"lower\": {\n \"type\": \"null\"\n },\n \"lower_inclusive\": {\n \"const\": false\n },\n \"lower_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n },\n {\n \"oneOf\": [\n {\n \"properties\": {\n \"upper\": {\n \"$ref\": \"#/$defs/dateTime\"\n },\n \"upper_infinite\": {\n \"const\": false\n }\n }\n },\n {\n \"properties\": {\n \"upper\": {\n \"type\": \"null\"\n },\n \"upper_inclusive\": {\n \"const\": false\n },\n \"upper_infinite\": {\n \"const\": true\n }\n }\n }\n ]\n }\n ]\n }\n }\n ]\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-scheme.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept scheme\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"notation\", \"title\", \"description\", \"creator\", \"publisher\",\n \"rights\", \"version\", \"is_active\", \"is_system\", \"created_at\", \"updated_at\",\n \"issued_at\", \"modified_at\", \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": \"string\", \"minLength\": 1 },\n \"title\": { \"type\": \"string\", \"minLength\": 1 },\n \"description\": { \"type\": [\"string\", \"null\"] },\n \"creator\": { \"type\": [\"string\", \"null\"] },\n \"publisher\": { \"type\": [\"string\", \"null\"] },\n \"rights\": { \"type\": [\"string\", \"null\"] },\n \"version\": { \"type\": [\"string\", \"null\"] },\n \"is_active\": { \"type\": \"boolean\" },\n \"is_system\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"issued_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"modified_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-concept.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS concept\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"primary_scheme_id\", \"uri\", \"notation\", \"facet_type\", \"facet_source\",\n \"facet_domain\", \"facet_scope\", \"status\", \"promoted_at\", \"deprecated_at\",\n \"deprecation_reason\", \"replaced_by_id\", \"note_count\", \"first_used_at\",\n \"last_used_at\", \"depth\", \"broader_count\", \"narrower_count\", \"related_count\",\n \"antipatterns\", \"antipattern_checked_at\", \"created_at\", \"updated_at\",\n \"embedding\", \"embedding_model\", \"embedded_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"primary_scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"notation\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"facet_type\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"personality\", \"matter\", \"energy\", \"space\", \"time\", null]\n },\n \"facet_source\": { \"type\": [\"string\", \"null\"] },\n \"facet_domain\": { \"type\": [\"string\", \"null\"] },\n \"facet_scope\": { \"type\": [\"string\", \"null\"] },\n \"status\": { \"enum\": [\"candidate\", \"approved\", \"deprecated\", \"obsolete\"] },\n \"promoted_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"deprecation_reason\": { \"type\": [\"string\", \"null\"] },\n \"replaced_by_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"note_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"first_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"last_used_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"depth\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 5 },\n \"broader_count\": { \"type\": \"integer\", \"minimum\": 0, \"maximum\": 3 },\n \"narrower_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"related_count\": { \"type\": \"integer\", \"minimum\": 0 },\n \"antipatterns\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": {\n \"enum\": [\n \"orphan\", \"over_tagged\", \"under_used\", \"too_broad\", \"too_deep\",\n \"polyhierarchy_excess\", \"missing_labels\", \"circular_hierarchy\"\n ]\n }\n },\n \"antipattern_checked_at\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"date-time\"\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"embedding\": {\n \"type\": [\"array\", \"null\"],\n \"minItems\": 768,\n \"maxItems\": 768,\n \"items\": { \"type\": \"number\" }\n },\n \"embedding_model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"embedded_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-label.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS label\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"concept_id\", \"label_type\", \"value\", \"language\", \"created_at\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"label_type\": { \"enum\": [\"pref_label\", \"alt_label\", \"hidden_label\"] },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-note.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS note\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"note_type\", \"value\", \"language\", \"author\", \"source\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"note_type\": {\n \"enum\": [\n \"definition\", \"scope_note\", \"example\", \"history_note\",\n \"editorial_note\", \"change_note\", \"note\"\n ]\n },\n \"value\": { \"type\": \"string\", \"minLength\": 1 },\n \"language\": { \"type\": \"string\", \"minLength\": 1 },\n \"author\": { \"type\": [\"string\", \"null\"] },\n \"source\": { \"type\": [\"string\", \"null\"] },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS semantic relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"subject_id\", \"object_id\", \"relation_type\", \"inference_score\",\n \"is_inferred\", \"is_validated\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"subject_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"object_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"relation_type\": { \"enum\": [\"broader\", \"narrower\", \"related\"] },\n \"inference_score\": { \"type\": [\"number\", \"null\"] },\n \"is_inferred\": { \"type\": \"boolean\" },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-mapping-relation.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS mapping relation\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"concept_id\", \"target_uri\", \"target_scheme_uri\", \"target_label\",\n \"relation_type\", \"confidence\", \"is_validated\", \"created_at\", \"validated_at\",\n \"validated_by\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"target_uri\": { \"type\": \"string\", \"format\": \"uri\" },\n \"target_scheme_uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"target_label\": { \"type\": [\"string\", \"null\"] },\n \"relation_type\": {\n \"enum\": [\n \"exact_match\", \"close_match\", \"broad_match\", \"narrow_match\", \"related_match\"\n ]\n },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_validated\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"validated_at\": { \"type\": [\"string\", \"null\"], \"format\": \"date-time\" },\n \"validated_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-scheme-membership.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS scheme membership\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"concept_id\", \"scheme_id\", \"is_top_concept\", \"added_at\"],\n \"properties\": {\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"scheme_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"is_top_concept\": { \"type\": \"boolean\" },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/note-skos-tag.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 note SKOS tag\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"note_id\", \"concept_id\", \"source\", \"confidence\", \"relevance_score\",\n \"is_primary\", \"created_at\", \"created_by\"\n ],\n \"properties\": {\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"source\": { \"type\": \"string\", \"minLength\": 1 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"relevance_score\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"is_primary\": { \"type\": \"boolean\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"created_by\": { \"type\": [\"string\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-collection.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\", \"uri\", \"pref_label\", \"definition\", \"is_ordered\", \"scheme_id\",\n \"created_at\", \"updated_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"uri\": { \"type\": [\"string\", \"null\"], \"format\": \"uri\" },\n \"pref_label\": { \"type\": \"string\", \"minLength\": 1 },\n \"definition\": { \"type\": [\"string\", \"null\"] },\n \"is_ordered\": { \"type\": \"boolean\" },\n \"scheme_id\": { \"type\": [\"string\", \"null\"], \"format\": \"uuid\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" },\n \"updated_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/skos-collection-member.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 SKOS collection member\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"collection_id\", \"concept_id\", \"position\", \"added_at\"],\n \"properties\": {\n \"collection_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"concept_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"position\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"added_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/graph-source.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph source\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"name\",\n \"kind\",\n \"source_table\",\n \"embedding_set_id\",\n \"virtual_set_id\",\n \"model\",\n \"dimension\",\n \"truncate_dimension\",\n \"metric\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"kind\": {\n \"enum\": [\"link\", \"similarity\", \"search\", \"manual\", \"imported\"]\n },\n \"source_table\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"link\", \"embedding\", \"manual\", null]\n },\n \"embedding_set_id\": {\n \"type\": [\"string\", \"null\"],\n \"format\": \"uuid\"\n },\n \"virtual_set_id\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"model\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"truncate_dimension\": { \"type\": [\"integer\", \"null\"], \"minimum\": 1 },\n \"metric\": {\n \"type\": [\"string\", \"null\"],\n \"enum\": [\"cosine\", \"inner_product\", \"l2\", null]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/graph-edge.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 graph edge\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"graph_source_id\",\n \"from_note_id\",\n \"to_note_id\",\n \"weight\",\n \"kind\",\n \"rank\",\n \"metadata\"\n ],\n \"properties\": {\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"from_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"to_note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"weight\": { \"type\": \"number\" },\n \"kind\": { \"enum\": [\"link\", \"similarity\", \"manual\"] },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/community-set.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community set\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"graph_source_id\",\n \"name\",\n \"source_type\",\n \"algorithm\",\n \"parameters\",\n \"input_hash\",\n \"freshness\",\n \"communities\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"graph_source_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"algorithm\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"parameters\": { \"type\": [\"object\", \"null\"] },\n \"input_hash\": { \"type\": \"string\", \"minLength\": 1 },\n \"freshness\": { \"type\": \"object\" },\n \"communities\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/community\" }\n },\n \"created_at\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"$defs\": {\n \"community\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"id\",\n \"label\",\n \"rank\",\n \"size\",\n \"confidence\",\n \"representative_note_ids\",\n \"metadata\"\n ],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"minLength\": 1 },\n \"label\": { \"type\": [\"string\", \"null\"], \"minLength\": 1 },\n \"rank\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"size\": { \"type\": [\"integer\", \"null\"], \"minimum\": 0 },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"representative_note_ids\": {\n \"type\": [\"array\", \"null\"],\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"format\": \"uuid\" }\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/community-assignment.schema.json\",\n \"title\": \"Fortemi Knowledge Shard full-v1 community assignment\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"community_set_id\",\n \"community_id\",\n \"note_id\",\n \"confidence\",\n \"source_type\",\n \"metadata\"\n ],\n \"properties\": {\n \"community_set_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"community_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"note_id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"confidence\": {\n \"type\": [\"number\", \"null\"],\n \"minimum\": 0,\n \"maximum\": 1\n },\n \"source_type\": {\n \"enum\": [\"precomputed\", \"dynamic-snapshot\", \"user-authored\", \"imported\"]\n },\n \"metadata\": { \"type\": [\"object\", \"null\"] }\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fortemi.dev/knowledge-shard/2.0.0/full-v1/signature.schema.json\",\n \"title\": \"Fortemi Knowledge Shard signature envelope\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"format_version\",\n \"signer\",\n \"manifest_digest\",\n \"blob_digests\",\n \"signature\"\n ],\n \"properties\": {\n \"format_version\": {\n \"const\": \"1\"\n },\n \"signer\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"key_id\",\n \"algorithm\",\n \"public_key\"\n ],\n \"properties\": {\n \"key_id\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 256\n },\n \"algorithm\": {\n \"const\": \"ed25519\"\n },\n \"public_key\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{43}$\"\n }\n }\n },\n \"manifest_digest\": {\n \"$ref\": \"#/$defs/sha256\"\n },\n \"blob_digests\": {\n \"type\": \"array\",\n \"maxItems\": 64,\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n },\n \"signature\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z0-9_-]{86}$\"\n }\n },\n \"$defs\": {\n \"sha256\": {\n \"type\": \"string\",\n \"pattern\": \"^[0-9a-f]{64}$\"\n }\n }\n}\n","/**\n * Minimal tar + gzip packing/unpacking for shard archives.\n *\n * Uses fflate for gzip compression and implements a lightweight POSIX tar\n * encoder/decoder (512-byte block headers, ustar format).\n */\n\nimport { gzipSync, gunzipSync } from 'fflate'\n\n// ── Tar constants ────────────────────────────────────────────────────────\n\nconst BLOCK_SIZE = 512\nconst USTAR_MAGIC = 'ustar\\x0000'\n\n// ── Tar encoder ──────────────────────────────────────────────────────────\n\nfunction writeString(buf: Uint8Array, offset: number, str: string, len: number) {\n for (let i = 0; i < Math.min(str.length, len); i++) {\n buf[offset + i] = str.charCodeAt(i)\n }\n}\n\nfunction writeOctal(buf: Uint8Array, offset: number, value: number, len: number) {\n const str = value.toString(8).padStart(len - 1, '0')\n writeString(buf, offset, str, len - 1)\n}\n\nfunction computeHeaderChecksum(header: Uint8Array): number {\n // For checksum computation, treat the checksum field (offset 148, 8 bytes) as spaces\n let sum = 0\n for (let i = 0; i < BLOCK_SIZE; i++) {\n sum += i >= 148 && i < 156 ? 32 : header[i]\n }\n return sum\n}\n\nfunction createTarHeader(filename: string, size: number): Uint8Array {\n const header = new Uint8Array(BLOCK_SIZE)\n\n // name (0, 100)\n writeString(header, 0, filename, 100)\n // mode (100, 8) — 0644\n writeOctal(header, 100, 0o644, 8)\n // uid (108, 8)\n writeOctal(header, 108, 0, 8)\n // gid (116, 8)\n writeOctal(header, 116, 0, 8)\n // size (124, 12)\n writeOctal(header, 124, size, 12)\n // mtime (136, 12) -- canonical zero keeps identical shard inputs byte-stable.\n writeOctal(header, 136, 0, 12)\n // typeflag (156) — '0' for regular file\n header[156] = 48 // ASCII '0'\n // magic (257, 8) — ustar\\000\n writeString(header, 257, USTAR_MAGIC, 8)\n\n // compute and write checksum (148, 8)\n const checksum = computeHeaderChecksum(header)\n const csStr = checksum.toString(8).padStart(6, '0')\n writeString(header, 148, csStr, 6)\n header[154] = 0 // null terminator\n header[155] = 32 // space\n\n return header\n}\n\nfunction encodeTar(files: Map<string, Uint8Array>): Uint8Array {\n const blocks: Uint8Array[] = []\n\n for (const [filename, data] of files) {\n blocks.push(createTarHeader(filename, data.byteLength))\n blocks.push(data)\n\n // Pad to 512-byte boundary\n const remainder = data.byteLength % BLOCK_SIZE\n if (remainder > 0) {\n blocks.push(new Uint8Array(BLOCK_SIZE - remainder))\n }\n }\n\n // Two zero blocks mark end of archive\n blocks.push(new Uint8Array(BLOCK_SIZE * 2))\n\n // Concatenate\n let totalLen = 0\n for (const b of blocks) totalLen += b.byteLength\n const result = new Uint8Array(totalLen)\n let offset = 0\n for (const b of blocks) {\n result.set(b, offset)\n offset += b.byteLength\n }\n return result\n}\n\n// ── Tar decoder ──────────────────────────────────────────────────────────\n\nfunction readString(buf: Uint8Array, offset: number, len: number): string {\n let end = offset\n const limit = offset + len\n while (end < limit && buf[end] !== 0) end++\n return String.fromCharCode(...buf.slice(offset, end))\n}\n\nfunction readOctal(buf: Uint8Array, offset: number, len: number): number {\n const str = readString(buf, offset, len).trim()\n return str.length > 0 ? parseInt(str, 8) : 0\n}\n\nfunction isZeroBlock(buf: Uint8Array, offset: number): boolean {\n for (let i = 0; i < BLOCK_SIZE; i++) {\n if (buf[offset + i] !== 0) return false\n }\n return true\n}\n\nfunction decodeTar(tarData: Uint8Array): Map<string, Uint8Array> {\n const files = new Map<string, Uint8Array>()\n let offset = 0\n\n while (offset + BLOCK_SIZE <= tarData.byteLength) {\n // Check for end-of-archive (two zero blocks)\n if (isZeroBlock(tarData, offset)) break\n\n const name = readString(tarData, offset, 100)\n const size = readOctal(tarData, offset + 124, 12)\n const typeflag = tarData[offset + 156]\n\n offset += BLOCK_SIZE // skip header\n\n // Only extract regular files (typeflag '0' or NUL)\n if (typeflag === 48 || typeflag === 0) {\n files.set(name, tarData.slice(offset, offset + size))\n }\n\n // Advance past data blocks (padded to 512-byte boundary)\n const dataBlocks = Math.ceil(size / BLOCK_SIZE)\n offset += dataBlocks * BLOCK_SIZE\n }\n\n return files\n}\n\n// ── Public API ───────────────────────────────────────────────────────────\n\n/**\n * Pack files into a gzip-compressed tar archive.\n *\n * @param files Map of filename → file contents\n * @returns Compressed archive bytes (suitable for .shard file)\n */\nexport function packTarGz(\n files: Map<string, Uint8Array>,\n opts?: { maxDecompressedBytes?: number },\n): Uint8Array {\n const tarData = encodeTar(files)\n const cap = opts?.maxDecompressedBytes ?? DEFAULT_MAX_DECOMPRESSED_BYTES\n if (tarData.byteLength > cap) {\n throw new Error(\n 'Refusing to create archive: uncompressed size ' + tarData.byteLength +\n ' exceeds cap ' + cap + ' bytes',\n )\n }\n return gzipSync(tarData, { mtime: 0 })\n}\n\n/**\n * Default cap on decompressed archive size (256 MiB). A gzip \"bomb\" is a tiny\n * compressed payload that expands to gigabytes; without a cap `gunzipSync`\n * allocates the whole thing before any checksum check runs (SEC3). Callers that\n * genuinely need larger archives can raise the cap explicitly.\n */\nexport const DEFAULT_MAX_DECOMPRESSED_BYTES = 256 * 1024 * 1024\n\n/**\n * Unpack a gzip-compressed tar archive.\n *\n * Before decompressing, the gzip ISIZE footer (declared uncompressed size) is\n * checked against `maxDecompressedBytes` and rejected if it exceeds the cap.\n * fflate independently verifies the actual output length against ISIZE, so a\n * lying footer fails during decompression — together this bounds the memory a\n * malicious archive can force us to allocate.\n *\n * @param data Compressed archive bytes\n * @param opts.maxDecompressedBytes Cap on decompressed size (default 256 MiB)\n * @returns Map of filename → file contents\n */\nexport function unpackTarGz(\n data: Uint8Array,\n opts?: { maxDecompressedBytes?: number },\n): Map<string, Uint8Array> {\n const cap = opts?.maxDecompressedBytes ?? DEFAULT_MAX_DECOMPRESSED_BYTES\n // gzip footer: last 4 bytes are ISIZE (uncompressed size mod 2^32, LE).\n if (data.byteLength < 18) {\n throw new Error('Invalid gzip archive: too short')\n }\n const view = new DataView(data.buffer, data.byteOffset, data.byteLength)\n const declaredSize = view.getUint32(data.byteLength - 4, true)\n if (declaredSize > cap) {\n throw new Error(\n 'Refusing to decompress archive: declared size ' + declaredSize +\n ' exceeds cap ' + cap + ' bytes',\n )\n }\n const tarData = gunzipSync(data)\n if (tarData.byteLength > cap) {\n // Defense against a footer that wrapped past 2^32; fflate would normally\n // have thrown on the ISIZE mismatch, but guard the boundary explicitly.\n throw new Error(\n 'Refusing to decompress archive: decompressed size ' + tarData.byteLength +\n ' exceeds cap ' + cap + ' bytes',\n )\n }\n return decodeTar(tarData)\n}\n","/**\n * Shard format types — matches the fortemi server matric-shard specification.\n *\n * A shard is a gzip-compressed tar archive (.shard) containing serialized\n * knowledge data with a manifest for integrity verification.\n *\n * @implements @.aiwg/adrs/ADR-011-shard-server-conformance-and-version-negotiation.md\n * @schema @packages/core/schemas/knowledge-shard.schema.receipt.json\n * @created 2026-07-17\n * @agent Codex\n */\n\nimport type { BlobStore } from '../blob-store.js'\nimport type { ShardTrustStore } from './shard-signature.js'\n\nexport const CURRENT_SHARD_VERSION = '1.2.0'\n/** Highest authority contract accepted by opt-in import paths. */\nexport const MAX_SHARD_READER_VERSION = '2.0.0'\nexport const SHARD_FORMAT = 'matric-shard'\n\nfunction parseVersion(value: string): number[] {\n return value.split('.').map((segment) => {\n const match = segment.match(/^\\d+/)\n return match ? Number.parseInt(match[0], 10) : 0\n })\n}\n\nexport function compareShardVersions(left: string, right: string): number {\n const leftParts = parseVersion(left)\n const rightParts = parseVersion(right)\n const length = Math.max(leftParts.length, rightParts.length)\n for (let index = 0; index < length; index += 1) {\n const leftValue = leftParts[index] ?? 0\n const rightValue = rightParts[index] ?? 0\n if (leftValue !== rightValue) return leftValue > rightValue ? 1 : -1\n }\n return 0\n}\n\n/** Components that can appear in a shard archive. */\nexport type ShardComponent =\n | 'notes'\n | 'collections'\n | 'tags'\n | 'templates'\n | 'links'\n | 'note_originals'\n | 'note_original_history'\n | 'note_revised_current'\n | 'note_revisions'\n | 'embedding_sets'\n | 'embedding_configs'\n | 'embedding_set_members'\n | 'embeddings'\n | 'provenance_activities'\n | 'named_locations'\n | 'provenance_locations'\n | 'provenance_devices'\n | 'provenance_records'\n | 'skos_schemes'\n | 'skos_concepts'\n | 'skos_labels'\n | 'skos_notes'\n | 'skos_relations'\n | 'skos_mapping_relations'\n | 'skos_scheme_memberships'\n | 'note_skos_tags'\n | 'skos_collections'\n | 'skos_collection_members'\n | 'provenance_edges'\n | 'community_assignments'\n | 'communities'\n | 'graph_edges'\n | 'graph_sources'\n\nexport type KnowledgeShardProfile = 'core-v1' | 'full-v1' | 'record-v1'\nexport type ShardBackend = 'pglite' | 'record-store'\nexport type ShardOperation = 'export' | 'import'\nexport type ShardAuthorityStatus =\n | 'supported'\n | 'candidate'\n | 'reserved'\n | 'unknown'\n | 'unprofiled'\n\nexport interface ShardProfileRegistryEntry {\n profile: KnowledgeShardProfile\n authority_status: 'supported' | 'candidate' | 'reserved'\n components: ShardComponent[]\n}\n\nexport interface ShardLossEntry {\n code: string\n message: string\n component?: ShardComponent\n count?: number\n record_id?: string\n field_path?: string\n source_state?: 'absent' | 'null' | 'empty' | 'value' | 'legacy-indeterminate'\n destination_capability?: string\n action?: 'reject' | 'omit' | 'default' | 'degrade'\n reason?: string\n}\n\nexport interface ShardCapabilityReport {\n schema_version: 'fortemi.shard.capability-report.v1'\n backend: ShardBackend\n operation: ShardOperation\n requested_profile: string | null\n requested_schema_version: string | null\n authority_status: ShardAuthorityStatus\n backend_supported: boolean\n portable: boolean\n authority: {\n repository: string\n commit: string\n contract_sha256: string\n contract_revision: string\n schema_version: string\n schema_bundle_sha256: string\n }\n advertised_profiles: KnowledgeShardProfile[]\n supported_components: ShardComponent[]\n declared_components: ShardComponent[]\n unsupported_components: ShardComponent[]\n omitted_components: ShardComponent[]\n losses: ShardLossEntry[]\n}\n\nexport interface ShardAttachmentReference {\n id: string\n path: string\n mime: string | null\n checksum: string\n bytes: number\n}\n\nexport interface ShardAttachmentProjection {\n extracted_text: string | null\n /** Legacy unprofiled relationship timestamp; outside core-v1. */\n created_at?: string\n /** Legacy unprofiled attachment tombstone; outside core-v1. */\n deleted_at?: string | null\n extraction_status?: 'extracted' | 'pending' | 'failed' | 'blocked' | 'deferred'\n reason?:\n | null\n | 'extraction_pending'\n | 'extractor_failed'\n | 'quarantined'\n | 'large_binary'\n | 'unsupported_mime'\n | 'no_extracted_text'\n attachment: ShardAttachmentReference\n}\n\n/** @deprecated Legacy React shard field name. Server shards use `attachments`. */\nexport type ShardBinarySource = ShardAttachmentProjection\n\n/**\n * Reference to one cluster file of a component split across addressable files\n * (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset` preserves deterministic\n * component order; readers discover each cluster's size from its contents.\n */\nexport interface ShardClusterRef {\n href: string // path within the shard, relative to manifest base\n offset: number // index of the first record in this cluster\n}\n\n/**\n * Optional clustered layout (additive — absent on monolithic shards). When a\n * component is present here, its records live in the listed cluster files instead\n * of (or in addition to) the single `<component>.jsonl`. Both `importShard` and\n * the in-place reader consume it; a monolithic shard omits `layout` entirely.\n */\nexport interface ShardLayout {\n clusters?: Partial<Record<ShardComponent, ShardClusterRef[]>>\n}\n\nexport interface ShardMigrationHistoryEntry {\n from_version: string\n to_version: string\n migrated_at: string\n migrated_by: string\n changes: string[]\n}\n\n/** Manifest included in every shard as manifest.json. */\nexport interface ShardProducer {\n name: string\n version: string\n revision?: string\n}\n\nexport interface ShardManifest {\n version: string\n /** Named server-owned portability profile. Required for canonical interchange. */\n profile?: string\n /** Structured producer identity used by canonical profiles. */\n producer?: ShardProducer\n /** @deprecated Legacy producer release field. */\n matric_version?: string\n format: typeof SHARD_FORMAT\n created_at: string // ISO 8601\n components: ShardComponent[]\n counts: Partial<Record<ShardComponent | 'community_sets', number>>\n checksums: Record<string, string> // filename → sha256 hex\n min_reader_version: string\n migrated_from?: string | null\n migration_history?: ShardMigrationHistoryEntry[]\n /** Clustered component layout for partial fetch (issue #189). Absent → monolithic. */\n layout?: ShardLayout\n}\n\n/** Options for shard export. */\nexport interface ExportOptions {\n /**\n * Explicit portability profile. Only profiles advertised by the selected\n * producer are accepted. Omit to retain the legacy unprofiled React archive.\n */\n profile?: string\n /** Explicit authority schema tuple; 2.0.0 is opt-in until matrix receipts pass. */\n schemaVersion?: '1.2.0' | '2.0.0'\n includeEmbeddings?: boolean\n /** Filter to specific collection (export only notes in this collection). */\n collectionId?: string\n /** Filter to notes with this tag (e.g. 'app:research' for app-scoped export). */\n tag?: string\n /** Export only these embedding sets and their member/vector rows. */\n embeddingSetIds?: string[]\n /** Preserve virtual selector materialization metadata and virtual member rows. */\n includeMaterializedSelectors?: boolean\n /**\n * When set to a positive integer, emit notes as clustered files\n * (`notes/000.jsonl`, …) of this many records each, and record the layout in\n * the manifest, so an in-place reader can fetch only the clusters it needs\n * (issue #189). Absent → a single monolithic `notes.jsonl` (unchanged).\n */\n clusterNotesSize?: number\n /**\n * Pack attachment bytes into a portable content-addressed `blobs/<hex>`\n * sidecar (Fortemi/fortemi#1046), producing a self-contained shard whose\n * attachments survive a round-trip (`getBlob()` returns real bytes on the\n * importing host). Requires {@link blobStore}. Absent/false → reference-only\n * (server default), which remains a valid shard.\n */\n includeBlobs?: boolean\n /**\n * Byte source for the sidecar. Required when `includeBlobs` is set; attachment\n * bytes are read by their `content_hash`. A blob the store cannot return is\n * skipped (its attachment stays reference-only) rather than failing export.\n */\n blobStore?: BlobStore\n /** Optional Ed25519 publisher envelope for newly produced archives. */\n signing?: {\n keyId: string\n privateKey: CryptoKey\n publicKey: string\n }\n}\n\n/** Conflict resolution strategy for shard import. */\nexport type ConflictStrategy = 'skip' | 'replace' | 'error'\n\n/** Options for shard import. */\nexport interface ImportOptions {\n conflictStrategy?: ConflictStrategy\n /** Rows processed between cooperative yields. Defaults to 250. */\n batchSize?: number\n /** Progress callback for long-running import phases. */\n onProgress?: (progress: ImportProgress) => void\n /**\n * Destination for hydrating attachment bytes from a portable `blobs/<hex>`\n * sidecar (Fortemi/fortemi#1046). When provided, sidecar entries whose bare\n * hex matches an imported attachment's `content_hash` are promoted before\n * the logical transaction. A transaction failure removes only bytes that\n * were absent before promotion. Stores without the optional `delete`\n * capability fail before promotion. Absent → reference-only metadata.\n */\n blobStore?: BlobStore\n /**\n * Publisher-provenance policy for signed shards (#324, ADR-014):\n * - `require` — reject unsigned or bad-signature shards (default when a\n * `trustStore` is supplied);\n * - `prefer` — verify signed shards; import unsigned ones with a warning;\n * still reject a present-but-invalid signature;\n * - `trusted-local-only` — ignore signatures (own-export import).\n * When both `trustStore` and this are omitted, verification is skipped\n * entirely (checksum-only, unchanged behavior).\n */\n verifySignature?: 'require' | 'prefer' | 'trusted-local-only'\n /** Trust store resolving signer key_id → public key (required for `require`/`prefer`). */\n trustStore?: ShardTrustStore\n}\n\nexport type ImportProgressPhase =\n | 'unpack'\n | 'validate'\n | 'collections'\n | 'notes'\n | 'skos'\n | 'templates'\n | 'links'\n | 'provenance'\n | 'embedding_sets'\n | 'embedding_configs'\n | 'embeddings'\n | 'embedding_set_members'\n | 'graph'\n | 'communities'\n | 'index'\n\nexport interface ImportProgress {\n phase: ImportProgressPhase\n done: number\n total: number\n}\n\n/** Per-entity import counts. */\nexport interface ImportCounts {\n notes: number\n collections: number\n templates: number\n tags: number\n links: number\n embedding_sets: number\n embedding_configs: number\n embedding_set_members: number\n embeddings: number\n skos_schemes: number\n skos_concepts: number\n skos_relations: number\n note_skos_tags: number\n provenance_edges: number\n graph_sources: number\n graph_edges: number\n community_sets: number\n communities: number\n community_assignments: number\n}\n\n/** Result of a shard import operation. */\nexport interface ImportResult {\n success: boolean\n counts: ImportCounts\n skipped: Partial<ImportCounts>\n warnings: string[]\n errors: string[]\n duration_ms: number\n capability_report: ShardCapabilityReport\n /** Complete manifest counts when a profile contains components outside legacy counters. */\n component_counts?: ShardManifest['counts']\n}\n\nexport interface ShardExportResult {\n success: boolean\n archive: Uint8Array | null\n errors: string[]\n capability_report: ShardCapabilityReport\n}\n\n// ── Shard-format entity shapes (server-compatible) ──────────────────────\n\n/** Note as serialized in the shard JSONL. */\nexport interface ShardNote {\n id: string\n title: string | null\n original_content: string\n revised_content: string | null\n metadata?: unknown\n collection_id?: string | null\n attachments?: ShardAttachmentProjection[]\n /** @deprecated Legacy React shard field name. Use `attachments`. */\n binary_sources?: ShardBinarySource[]\n format: string\n source: string\n starred: boolean\n archived: boolean\n tags: string[]\n created_at: string\n updated_at: string\n /** Schema 1.1 core-v1 tombstone; legacy unprofiled archives also carry it. */\n deleted_at?: string | null\n}\n\n/** Collection as serialized in the shard JSON array. */\nexport interface ShardCollection {\n id: string\n name: string\n description: string | null\n parent_id: string | null\n created_at: string\n /** Legacy unprofiled fields; outside core-v1. */\n updated_at?: string\n deleted_at?: string | null\n note_count?: number\n}\n\n/** Tag as serialized in the shard JSON array. */\nexport interface ShardTag {\n name: string\n created_at: string\n}\n\n/** Template as serialized in the shard JSON array. */\nexport interface ShardTemplate {\n id: string\n name: string\n description: string | null\n content: string\n format: string\n default_tags: string[]\n collection_id: string | null\n created_at: string\n updated_at: string\n}\n\n/** Link as serialized in the shard JSONL. */\nexport interface ShardLink {\n id: string\n from_note_id: string\n to_note_id: string | null\n /** Optional for legacy React shards exported before URL links existed. */\n to_url?: string | null\n kind: string\n score: number | null\n created_at: string\n /** Optional for legacy React shards exported before link metadata existed. */\n metadata?: unknown\n}\n\n/**\n * Embedding set as serialized in the shard JSON array.\n *\n * Fields beyond id/model/dimension are optional for backward compatibility:\n * legacy React shards omit them and import falls back to the same defaults\n * `embeddingSetFromShard` applies (name → model, is_system → false, …).\n */\nexport interface ShardEmbeddingSet {\n id: string\n name?: string\n slug?: string | null\n description?: string | null\n purpose?: string | null\n document_count?: number\n embedding_count?: number\n is_system?: boolean\n keywords?: string[]\n model: string\n dimension: number\n kind?: 'physical' | 'filter' | 'virtual'\n mode?: 'auto' | 'manual' | 'mixed' | null\n truncate_dimension?: number | null\n criteria?: Record<string, unknown> | null\n source?: Record<string, unknown> | null\n compatibility?: Record<string, unknown> | null\n materialization?: Record<string, unknown> | null\n freshness?: ShardArtifactFreshness | null\n created_at?: string\n updated_at?: string\n}\n\n/** Embedding set member as serialized in the shard JSONL. */\nexport interface ShardEmbeddingSetMember {\n embedding_set_id: string\n note_id: string\n /** Legacy React shard field; new exports use server membership metadata instead. */\n embedding_id?: string\n /** Optional for legacy React shards; import defaults to 'materialized'. */\n membership_type?: string\n /** Optional for legacy React shards; import falls back to the manifest timestamp. */\n added_at?: string\n /** Optional for legacy React shards; import defaults to NULL. */\n added_by?: string | null\n}\n\n/** Embedding config as serialized in the shard JSON array. */\nexport interface ShardEmbeddingConfig {\n id: string\n name: string\n description: string | null\n model: string\n dimension: number\n chunk_size: number\n chunk_overlap: number\n is_default: boolean\n}\n\n/**\n * Embedding as serialized in the shard JSONL.\n *\n * Server metadata fields (`chunk_index`, `text`, `model`) are optional for\n * backward compatibility: legacy React shards exported before migration 0016\n * carry only `id`, `note_id`, `embedding_set_id`, `vector`, `created_at`.\n * Import normalizes absent metadata to schema defaults (0, '', NULL).\n */\nexport interface ShardEmbedding {\n id: string\n note_id: string\n chunk_index?: number\n text?: string\n vector: number[]\n model?: string\n /** React shard extension used to preserve local embedding-set scoping. */\n embedding_set_id?: string\n /** React shard extension used to preserve local creation ordering. */\n created_at?: string\n}\n\n\n/** SKOS scheme as serialized in the shard JSON array. */\nexport interface ShardSkosScheme {\n id: string\n title: string\n description: string | null\n created_at: string\n updated_at: string\n}\n\n/** SKOS concept as serialized in the shard JSON array. */\nexport interface ShardSkosConcept {\n id: string\n scheme_id: string\n pref_label: string\n alt_labels: string[]\n definition: string | null\n created_at: string\n updated_at: string\n}\n\n/** SKOS concept relation as serialized in the shard JSONL. */\nexport interface ShardSkosRelation {\n id: string\n source_concept_id: string\n target_concept_id: string\n relation_type: 'broader' | 'narrower' | 'related'\n created_at: string\n}\n\n/** Note-to-SKOS-concept assignment as serialized in the shard JSONL. */\nexport interface ShardNoteSkosTag {\n id: string\n note_id: string\n concept_id: string\n created_at: string\n}\n\n/** Provenance edge as serialized in the shard JSONL. */\nexport interface ShardProvenanceEdge {\n id: string\n entity_type: string\n entity_id: string\n activity: string\n agent: string\n started_at: string\n ended_at: string | null\n attributes: Record<string, unknown> | null\n}\n\n\n// - Graph/community derived artifacts ---------------------------------------\n\nexport interface ShardArtifactFreshness {\n status: 'fresh' | 'stale' | 'unknown'\n checked_at?: string\n stale_reason?: string\n source_hashes?: {\n notes?: string\n links?: string\n embeddings?: string\n embedding_set_members?: string\n virtual_set_definition?: string\n parameters?: string\n }\n}\n\nexport interface ShardGraphSource {\n id: string\n name: string\n kind: 'link' | 'similarity' | 'search' | 'manual' | 'imported'\n source_table?: 'link' | 'embedding' | 'manual' | null\n embedding_set_id?: string | null\n virtual_set_id?: string | null\n model?: string | null\n dimension?: number | null\n truncate_dimension?: number | null\n metric?: 'cosine' | 'inner_product' | 'l2' | null\n algorithm?: string | null\n parameters?: Record<string, unknown>\n input_hash: string\n freshness: ShardArtifactFreshness\n created_at: string\n}\n\nexport interface ShardGraphEdge {\n graph_source_id: string\n from_note_id: string\n to_note_id: string\n weight: number\n kind: 'link' | 'similarity' | 'manual'\n rank?: number | null\n metadata?: Record<string, unknown>\n}\n\nexport interface ShardCommunitySet {\n id: string\n graph_source_id: string\n name: string\n source_type: 'precomputed' | 'dynamic-snapshot' | 'user-authored' | 'imported'\n algorithm?: string | null\n parameters?: Record<string, unknown>\n input_hash: string\n freshness: ShardArtifactFreshness\n communities: ShardCommunity[]\n created_at: string\n}\n\nexport interface ShardCommunity {\n id: string\n label?: string | null\n rank?: number | null\n size?: number | null\n confidence?: number | null\n representative_note_ids?: string[]\n metadata?: Record<string, unknown>\n}\n\nexport interface ShardCommunityAssignment {\n community_set_id: string\n community_id: string\n note_id: string\n confidence?: number | null\n source_type: 'precomputed' | 'dynamic-snapshot' | 'user-authored' | 'imported'\n metadata?: Record<string, unknown>\n}\n","import { sha256 } from '@noble/hashes/sha256'\nimport { blake3 } from '@noble/hashes/blake3'\nimport { bytesToHex } from '@noble/hashes/utils'\n\n/**\n * Compute a browser-local content-identity hash (SHA-256), encoded as\n * `sha256:<64-char lowercase hex>`.\n *\n * This is an internal identity/dedup digest used for note content, embedding\n * configs, the AIWG index, and graph identity — NOT the server's attachment\n * content-hash convention. Binary-attachment blobs use {@link computeBlobHash}\n * (BLAKE3), which is the canonical checksum defined by the binary-attachment\n * projection contract (`checksum: \"blake3:<hex>\"`). Keeping these two functions\n * separate preserves JSON format parity for the identity hashes above while\n * letting attachments match the server's `compute_content_hash`.\n *\n * @param data - Raw bytes to hash\n * @returns `'sha256:<64-char lowercase hex>'`\n */\nexport function computeHash(data: Uint8Array): string {\n const digest = sha256(data)\n return `sha256:${bytesToHex(digest)}`\n}\n\n/**\n * Compute the canonical attachment content hash: **BLAKE3**, encoded as\n * `blake3:<64-char lowercase hex>`.\n *\n * Matches the fortemi server (`crates/matric-db/src/file_storage.rs`\n * `compute_content_hash`) and the portable Knowledge-Shard byte-sidecar\n * contract, where the sidecar tar entry name is the bare hex (the `blake3:`\n * prefix stripped). SubtleCrypto has no BLAKE3, so this uses `@noble/hashes`.\n *\n * @param data - Raw attachment bytes to hash\n * @returns `'blake3:<64-char lowercase hex>'`\n */\nexport function computeBlobHash(data: Uint8Array): string {\n return `blake3:${bytesToHex(blake3(data))}`\n}\n","/**\n * Portable Knowledge-Shard byte sidecar (Fortemi/fortemi#1046).\n *\n * A portable shard MAY carry attachment bytes in a content-addressed sidecar\n * inside its `tar.gz`: one entry per distinct blob, named `blobs/<hex>` where\n * `<hex>` is the bare 64-char lowercase BLAKE3 digest of the entry bytes. A\n * projection record's `checksum` of `blake3:<hex>` resolves to `blobs/<hex>`\n * by stripping the `blake3:` prefix. Sidecars are optional: a missing entry\n * makes an attachment reference-only, which is valid; readers ignore unknown\n * or unreferenced `blobs/` entries without failing import.\n */\n\nexport const SIDECAR_PREFIX = 'blobs/'\n\n/**\n * Strip an `algorithm:hex` checksum down to the bare hex used as the sidecar\n * entry name. Passing a bare hex returns it unchanged.\n */\nexport function blobChecksumToHex(checksum: string): string {\n const sep = checksum.indexOf(':')\n return sep >= 0 ? checksum.slice(sep + 1) : checksum\n}\n\n/** Map a projection `checksum` to its sidecar tar entry name (`blobs/<hex>`). */\nexport function sidecarEntryName(checksum: string): string {\n return SIDECAR_PREFIX + blobChecksumToHex(checksum)\n}\n\n/** True when a tar entry name is a top-level `blobs/<hex>` sidecar entry. */\nexport function isSidecarEntry(name: string): boolean {\n if (!name.startsWith(SIDECAR_PREFIX)) return false\n const rest = name.slice(SIDECAR_PREFIX.length)\n return rest.length > 0 && !rest.includes('/')\n}\n\n/**\n * Collect the sidecar blobs from an unpacked archive, keyed by bare hex.\n * Nested or directory-like entries under `blobs/` are ignored.\n */\nexport function collectSidecarBlobs(\n files: Map<string, Uint8Array>,\n): Map<string, Uint8Array> {\n const blobs = new Map<string, Uint8Array>()\n for (const [name, bytes] of files) {\n if (isSidecarEntry(name)) {\n blobs.set(name.slice(SIDECAR_PREFIX.length), bytes)\n }\n }\n return blobs\n}\n","/**\n * Canonical and transitional Knowledge Shard validation.\n *\n * @implements @.aiwg/adrs/ADR-010-portable-schema-topology-and-source-of-truth.md\n * @implements @.aiwg/adrs/ADR-011-shard-server-conformance-and-version-negotiation.md\n * @schema @packages/core/schemas/knowledge-shard.schema.receipt.json\n * @created 2026-07-17\n * @agent Codex\n */\nimport Ajv2020 from 'ajv/dist/2020.js'\nimport type { ErrorObject, ValidateFunction } from 'ajv'\nimport legacySchema from '../../schemas/knowledge-shard.schema.json' with { type: 'json' }\nimport authorityReceipt from '../../schemas/knowledge-shard.schema.receipt.json' with { type: 'json' }\nimport legacyManifestSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport legacyNoteSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/note.schema.json' with { type: 'json' }\nimport legacyCollectionSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/collection.schema.json' with { type: 'json' }\nimport legacyTagSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/tag.schema.json' with { type: 'json' }\nimport legacyTemplateSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/template.schema.json' with { type: 'json' }\nimport legacyLinkSchema from '../../schemas/knowledge-shard/1.0.0/core-v1/link.schema.json' with { type: 'json' }\nimport v1_1CoreManifestSchema from '../../schemas/knowledge-shard/1.1.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport v1_1RecordManifestSchema from '../../schemas/knowledge-shard/1.1.0/record-v1/manifest.schema.json' with { type: 'json' }\nimport v1_1FullManifestSchema from '../../schemas/knowledge-shard/1.1.0/full-v1/manifest.schema.json' with { type: 'json' }\nimport v1_1FullEmbeddingSchema from '../../schemas/knowledge-shard/1.1.0/full-v1/embedding.schema.json' with { type: 'json' }\nimport manifestSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport noteSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/note.schema.json' with { type: 'json' }\nimport collectionSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/collection.schema.json' with { type: 'json' }\nimport tagSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/tag.schema.json' with { type: 'json' }\nimport templateSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/template.schema.json' with { type: 'json' }\nimport linkSchema from '../../schemas/knowledge-shard/1.2.0/core-v1/link.schema.json' with { type: 'json' }\nimport recordManifestSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/manifest.schema.json' with { type: 'json' }\nimport recordNoteSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/note.schema.json' with { type: 'json' }\nimport recordCollectionSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/collection.schema.json' with { type: 'json' }\nimport recordTagSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/tag.schema.json' with { type: 'json' }\nimport recordLinkSchema from '../../schemas/knowledge-shard/1.2.0/record-v1/link.schema.json' with { type: 'json' }\nimport fullManifestSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/manifest.schema.json' with { type: 'json' }\nimport fullNoteOriginalSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-original.schema.json' with { type: 'json' }\nimport fullNoteOriginalHistorySchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-original-history.schema.json' with { type: 'json' }\nimport fullNoteRevisedCurrentSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-revised-current.schema.json' with { type: 'json' }\nimport fullNoteRevisionSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-revision.schema.json' with { type: 'json' }\nimport fullEmbeddingConfigSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding-config.schema.json' with { type: 'json' }\nimport fullEmbeddingSetSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding-set.schema.json' with { type: 'json' }\nimport fullEmbeddingSetMemberSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding-set-member.schema.json' with { type: 'json' }\nimport fullEmbeddingSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/embedding.schema.json' with { type: 'json' }\nimport fullProvenanceEdgeSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-edge.schema.json' with { type: 'json' }\nimport fullProvenanceActivitySchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-activity.schema.json' with { type: 'json' }\nimport fullNamedLocationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/named-location.schema.json' with { type: 'json' }\nimport fullProvenanceLocationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-location.schema.json' with { type: 'json' }\nimport fullProvenanceDeviceSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-device.schema.json' with { type: 'json' }\nimport fullProvenanceRecordSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/provenance-record.schema.json' with { type: 'json' }\nimport fullSkosSchemeSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme.schema.json' with { type: 'json' }\nimport fullSkosConceptSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-concept.schema.json' with { type: 'json' }\nimport fullSkosLabelSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-label.schema.json' with { type: 'json' }\nimport fullSkosNoteSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-note.schema.json' with { type: 'json' }\nimport fullSkosRelationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-relation.schema.json' with { type: 'json' }\nimport fullSkosMappingRelationSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-mapping-relation.schema.json' with { type: 'json' }\nimport fullSkosSchemeMembershipSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-scheme-membership.schema.json' with { type: 'json' }\nimport fullNoteSkosTagSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/note-skos-tag.schema.json' with { type: 'json' }\nimport fullSkosCollectionSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-collection.schema.json' with { type: 'json' }\nimport fullSkosCollectionMemberSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/skos-collection-member.schema.json' with { type: 'json' }\nimport fullGraphSourceSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/graph-source.schema.json' with { type: 'json' }\nimport fullGraphEdgeSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/graph-edge.schema.json' with { type: 'json' }\nimport fullCommunitySetSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/community-set.schema.json' with { type: 'json' }\nimport fullCommunityAssignmentSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/community-assignment.schema.json' with { type: 'json' }\nimport fullSignatureSchema from '../../schemas/knowledge-shard/1.2.0/full-v1/signature.schema.json' with { type: 'json' }\nimport v2CoreManifestSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/manifest.schema.json' with { type: 'json' }\nimport v2CoreNoteSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/note.schema.json' with { type: 'json' }\nimport v2CoreCollectionSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/collection.schema.json' with { type: 'json' }\nimport v2CoreTagSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/tag.schema.json' with { type: 'json' }\nimport v2CoreTemplateSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/template.schema.json' with { type: 'json' }\nimport v2CoreLinkSchema from '../../schemas/knowledge-shard/2.0.0/core-v1/link.schema.json' with { type: 'json' }\nimport v2RecordManifestSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/manifest.schema.json' with { type: 'json' }\nimport v2RecordNoteSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/note.schema.json' with { type: 'json' }\nimport v2RecordCollectionSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/collection.schema.json' with { type: 'json' }\nimport v2RecordTagSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/tag.schema.json' with { type: 'json' }\nimport v2RecordLinkSchema from '../../schemas/knowledge-shard/2.0.0/record-v1/link.schema.json' with { type: 'json' }\nimport v2FullManifestSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/manifest.schema.json' with { type: 'json' }\nimport v2FullNoteOriginalSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-original.schema.json' with { type: 'json' }\nimport v2FullNoteOriginalHistorySchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-original-history.schema.json' with { type: 'json' }\nimport v2FullNoteRevisedCurrentSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-revised-current.schema.json' with { type: 'json' }\nimport v2FullNoteRevisionSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-revision.schema.json' with { type: 'json' }\nimport v2FullEmbeddingConfigSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding-config.schema.json' with { type: 'json' }\nimport v2FullEmbeddingSetSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding-set.schema.json' with { type: 'json' }\nimport v2FullEmbeddingSetMemberSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding-set-member.schema.json' with { type: 'json' }\nimport v2FullEmbeddingSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/embedding.schema.json' with { type: 'json' }\nimport v2FullProvenanceEdgeSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-edge.schema.json' with { type: 'json' }\nimport v2FullProvenanceActivitySchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-activity.schema.json' with { type: 'json' }\nimport v2FullNamedLocationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/named-location.schema.json' with { type: 'json' }\nimport v2FullProvenanceLocationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-location.schema.json' with { type: 'json' }\nimport v2FullProvenanceDeviceSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-device.schema.json' with { type: 'json' }\nimport v2FullProvenanceRecordSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/provenance-record.schema.json' with { type: 'json' }\nimport v2FullSkosSchemeSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme.schema.json' with { type: 'json' }\nimport v2FullSkosConceptSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-concept.schema.json' with { type: 'json' }\nimport v2FullSkosLabelSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-label.schema.json' with { type: 'json' }\nimport v2FullSkosNoteSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-note.schema.json' with { type: 'json' }\nimport v2FullSkosRelationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-relation.schema.json' with { type: 'json' }\nimport v2FullSkosMappingRelationSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-mapping-relation.schema.json' with { type: 'json' }\nimport v2FullSkosSchemeMembershipSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-scheme-membership.schema.json' with { type: 'json' }\nimport v2FullNoteSkosTagSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/note-skos-tag.schema.json' with { type: 'json' }\nimport v2FullSkosCollectionSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-collection.schema.json' with { type: 'json' }\nimport v2FullSkosCollectionMemberSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/skos-collection-member.schema.json' with { type: 'json' }\nimport v2FullGraphSourceSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/graph-source.schema.json' with { type: 'json' }\nimport v2FullGraphEdgeSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/graph-edge.schema.json' with { type: 'json' }\nimport v2FullCommunitySetSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/community-set.schema.json' with { type: 'json' }\nimport v2FullCommunityAssignmentSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/community-assignment.schema.json' with { type: 'json' }\nimport v2FullSignatureSchema from '../../schemas/knowledge-shard/2.0.0/full-v1/signature.schema.json' with { type: 'json' }\nimport { validateChecksums } from './checksum.js'\nimport { unpackTarGz } from './shard-tar.js'\nimport { CURRENT_SHARD_VERSION } from './types.js'\nimport type { ShardComponent, ShardManifest } from './types.js'\nimport { computeBlobHash } from '../hash.js'\nimport { isSidecarEntry, sidecarEntryName } from './blob-sidecar.js'\n\nexport interface ShardSchemaValidationResult {\n valid: boolean\n errors: string[]\n}\n\ntype ShardFiles = Map<string, Uint8Array>\ntype CoreV1Component = 'notes' | 'collections' | 'tags' | 'templates' | 'links'\ntype RecordV1Component = 'notes' | 'collections' | 'tags' | 'links'\ntype FullV1Component = ShardComponent\nexport type CoreV1SchemaVersion = '1.0.0' | '1.1.0' | '1.2.0' | '2.0.0'\ntype CurrentCanonicalSchemaVersion = '1.1.0' | '1.2.0'\ntype RecordV1SchemaVersion = CurrentCanonicalSchemaVersion | '2.0.0'\ntype FullV1SchemaVersion = CurrentCanonicalSchemaVersion | '2.0.0'\ntype RecordEncoding = 'json-array' | 'jsonl'\ntype IdentifiedSchema = object & { $id: string }\n\nconst decoder = new TextDecoder()\n\ntype LegacySchemaDefName =\n | 'manifest'\n | 'note'\n | 'collection'\n | 'tag'\n | 'template'\n | 'link'\n | 'embeddingSet'\n | 'embeddingSetMember'\n | 'embeddingConfig'\n | 'embedding'\n | 'skosScheme'\n | 'skosConcept'\n | 'skosRelation'\n | 'noteSkosTag'\n | 'provenanceEdge'\n | 'graphSource'\n | 'graphEdge'\n | 'communitySet'\n | 'communityAssignment'\n\nconst LEGACY_COMPONENT_SCHEMA_DEFS: Partial<\n Record<ShardComponent | 'templates', LegacySchemaDefName>\n> = {\n notes: 'note',\n collections: 'collection',\n tags: 'tag',\n templates: 'template',\n links: 'link',\n embedding_sets: 'embeddingSet',\n embedding_set_members: 'embeddingSetMember',\n embedding_configs: 'embeddingConfig',\n embeddings: 'embedding',\n skos_schemes: 'skosScheme',\n skos_concepts: 'skosConcept',\n skos_relations: 'skosRelation',\n note_skos_tags: 'noteSkosTag',\n provenance_edges: 'provenanceEdge',\n graph_sources: 'graphSource',\n graph_edges: 'graphEdge',\n communities: 'communitySet',\n community_assignments: 'communityAssignment',\n}\n\nconst LEGACY_COMPONENT_FILES: Partial<\n Record<ShardComponent, { file: string; encoding: RecordEncoding }>\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n templates: { file: 'templates.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n embedding_sets: { file: 'embedding_sets.json', encoding: 'json-array' },\n embedding_set_members: { file: 'embedding_set_members.jsonl', encoding: 'jsonl' },\n embedding_configs: { file: 'embedding_configs.json', encoding: 'json-array' },\n embeddings: { file: 'embeddings.jsonl', encoding: 'jsonl' },\n skos_schemes: { file: 'skos_schemes.json', encoding: 'json-array' },\n skos_concepts: { file: 'skos_concepts.json', encoding: 'json-array' },\n skos_relations: { file: 'skos_relations.jsonl', encoding: 'jsonl' },\n note_skos_tags: { file: 'note_skos_tags.jsonl', encoding: 'jsonl' },\n provenance_edges: { file: 'provenance_edges.jsonl', encoding: 'jsonl' },\n graph_sources: { file: 'graph_sources.json', encoding: 'json-array' },\n graph_edges: { file: 'graph_edges.jsonl', encoding: 'jsonl' },\n communities: { file: 'communities.json', encoding: 'json-array' },\n community_assignments: { file: 'community_assignments.jsonl', encoding: 'jsonl' },\n}\n\nconst CORE_V1_COMPONENT_FILES: Record<\n CoreV1Component,\n { file: string; encoding: RecordEncoding }\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n templates: { file: 'templates.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n}\n\nconst RECORD_V1_COMPONENT_FILES: Record<\n RecordV1Component,\n { file: string; encoding: RecordEncoding }\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n}\n\nexport const FULL_V1_COMPONENT_FILES: Record<\n FullV1Component,\n { file: string; encoding: RecordEncoding }\n> = {\n notes: { file: 'notes.jsonl', encoding: 'jsonl' },\n collections: { file: 'collections.json', encoding: 'json-array' },\n tags: { file: 'tags.json', encoding: 'json-array' },\n templates: { file: 'templates.json', encoding: 'json-array' },\n links: { file: 'links.jsonl', encoding: 'jsonl' },\n note_originals: { file: 'note_originals.jsonl', encoding: 'jsonl' },\n note_original_history: { file: 'note_original_history.jsonl', encoding: 'jsonl' },\n note_revised_current: { file: 'note_revised_current.jsonl', encoding: 'jsonl' },\n note_revisions: { file: 'note_revisions.jsonl', encoding: 'jsonl' },\n embedding_configs: { file: 'embedding_configs.json', encoding: 'json-array' },\n embedding_sets: { file: 'embedding_sets.json', encoding: 'json-array' },\n embedding_set_members: { file: 'embedding_set_members.jsonl', encoding: 'jsonl' },\n embeddings: { file: 'embeddings.jsonl', encoding: 'jsonl' },\n provenance_edges: { file: 'provenance_edges.jsonl', encoding: 'jsonl' },\n provenance_activities: { file: 'provenance_activities.jsonl', encoding: 'jsonl' },\n named_locations: { file: 'named_locations.jsonl', encoding: 'jsonl' },\n provenance_locations: { file: 'provenance_locations.jsonl', encoding: 'jsonl' },\n provenance_devices: { file: 'provenance_devices.jsonl', encoding: 'jsonl' },\n provenance_records: { file: 'provenance_records.jsonl', encoding: 'jsonl' },\n skos_schemes: { file: 'skos_schemes.json', encoding: 'json-array' },\n skos_concepts: { file: 'skos_concepts.json', encoding: 'json-array' },\n skos_labels: { file: 'skos_labels.jsonl', encoding: 'jsonl' },\n skos_notes: { file: 'skos_notes.jsonl', encoding: 'jsonl' },\n skos_relations: { file: 'skos_relations.jsonl', encoding: 'jsonl' },\n skos_mapping_relations: { file: 'skos_mapping_relations.jsonl', encoding: 'jsonl' },\n skos_scheme_memberships: { file: 'skos_scheme_memberships.jsonl', encoding: 'jsonl' },\n note_skos_tags: { file: 'note_skos_tags.jsonl', encoding: 'jsonl' },\n skos_collections: { file: 'skos_collections.json', encoding: 'json-array' },\n skos_collection_members: { file: 'skos_collection_members.jsonl', encoding: 'jsonl' },\n graph_sources: { file: 'graph_sources.json', encoding: 'json-array' },\n graph_edges: { file: 'graph_edges.jsonl', encoding: 'jsonl' },\n communities: { file: 'communities.json', encoding: 'json-array' },\n community_assignments: { file: 'community_assignments.jsonl', encoding: 'jsonl' },\n}\n\nconst CORE_V1_SCHEMAS: Record<\n CoreV1SchemaVersion,\n Record<CoreV1Component | 'manifest', IdentifiedSchema>\n> = {\n '1.0.0': {\n manifest: legacyManifestSchema,\n notes: legacyNoteSchema,\n collections: legacyCollectionSchema,\n tags: legacyTagSchema,\n templates: legacyTemplateSchema,\n links: legacyLinkSchema,\n },\n '1.1.0': {\n manifest: v1_1CoreManifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n },\n '1.2.0': {\n manifest: manifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n },\n '2.0.0': {\n manifest: v2CoreManifestSchema,\n notes: v2CoreNoteSchema,\n collections: v2CoreCollectionSchema,\n tags: v2CoreTagSchema,\n templates: v2CoreTemplateSchema,\n links: v2CoreLinkSchema,\n },\n}\n\nconst RECORD_V1_CURRENT_SCHEMAS: Record<\n RecordV1Component | 'manifest',\n IdentifiedSchema\n> = {\n manifest: recordManifestSchema,\n notes: recordNoteSchema,\n collections: recordCollectionSchema,\n tags: recordTagSchema,\n links: recordLinkSchema,\n}\n\nconst RECORD_V1_SCHEMAS: Record<\n RecordV1SchemaVersion,\n Record<RecordV1Component | 'manifest', IdentifiedSchema>\n> = {\n '1.1.0': {\n ...RECORD_V1_CURRENT_SCHEMAS,\n manifest: v1_1RecordManifestSchema,\n },\n '1.2.0': RECORD_V1_CURRENT_SCHEMAS,\n '2.0.0': {\n manifest: v2RecordManifestSchema,\n notes: v2RecordNoteSchema,\n collections: v2RecordCollectionSchema,\n tags: v2RecordTagSchema,\n links: v2RecordLinkSchema,\n },\n}\n\nconst FULL_V1_CURRENT_SCHEMAS: Record<\n FullV1Component | 'manifest' | 'signature',\n IdentifiedSchema\n> = {\n manifest: fullManifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n note_originals: fullNoteOriginalSchema,\n note_original_history: fullNoteOriginalHistorySchema,\n note_revised_current: fullNoteRevisedCurrentSchema,\n note_revisions: fullNoteRevisionSchema,\n embedding_configs: fullEmbeddingConfigSchema,\n embedding_sets: fullEmbeddingSetSchema,\n embedding_set_members: fullEmbeddingSetMemberSchema,\n embeddings: fullEmbeddingSchema,\n provenance_edges: fullProvenanceEdgeSchema,\n provenance_activities: fullProvenanceActivitySchema,\n named_locations: fullNamedLocationSchema,\n provenance_locations: fullProvenanceLocationSchema,\n provenance_devices: fullProvenanceDeviceSchema,\n provenance_records: fullProvenanceRecordSchema,\n skos_schemes: fullSkosSchemeSchema,\n skos_concepts: fullSkosConceptSchema,\n skos_labels: fullSkosLabelSchema,\n skos_notes: fullSkosNoteSchema,\n skos_relations: fullSkosRelationSchema,\n skos_mapping_relations: fullSkosMappingRelationSchema,\n skos_scheme_memberships: fullSkosSchemeMembershipSchema,\n note_skos_tags: fullNoteSkosTagSchema,\n skos_collections: fullSkosCollectionSchema,\n skos_collection_members: fullSkosCollectionMemberSchema,\n graph_sources: fullGraphSourceSchema,\n graph_edges: fullGraphEdgeSchema,\n communities: fullCommunitySetSchema,\n community_assignments: fullCommunityAssignmentSchema,\n signature: fullSignatureSchema,\n}\n\nconst FULL_V1_SCHEMAS: Record<\n FullV1SchemaVersion,\n Record<FullV1Component | 'manifest' | 'signature', IdentifiedSchema>\n> = {\n '1.1.0': {\n ...FULL_V1_CURRENT_SCHEMAS,\n manifest: v1_1FullManifestSchema,\n embeddings: v1_1FullEmbeddingSchema,\n },\n '1.2.0': FULL_V1_CURRENT_SCHEMAS,\n '2.0.0': {\n manifest: v2FullManifestSchema,\n notes: v2CoreNoteSchema,\n collections: v2CoreCollectionSchema,\n tags: v2CoreTagSchema,\n templates: v2CoreTemplateSchema,\n links: v2CoreLinkSchema,\n note_originals: v2FullNoteOriginalSchema,\n note_original_history: v2FullNoteOriginalHistorySchema,\n note_revised_current: v2FullNoteRevisedCurrentSchema,\n note_revisions: v2FullNoteRevisionSchema,\n embedding_configs: v2FullEmbeddingConfigSchema,\n embedding_sets: v2FullEmbeddingSetSchema,\n embedding_set_members: v2FullEmbeddingSetMemberSchema,\n embeddings: v2FullEmbeddingSchema,\n provenance_edges: v2FullProvenanceEdgeSchema,\n provenance_activities: v2FullProvenanceActivitySchema,\n named_locations: v2FullNamedLocationSchema,\n provenance_locations: v2FullProvenanceLocationSchema,\n provenance_devices: v2FullProvenanceDeviceSchema,\n provenance_records: v2FullProvenanceRecordSchema,\n skos_schemes: v2FullSkosSchemeSchema,\n skos_concepts: v2FullSkosConceptSchema,\n skos_labels: v2FullSkosLabelSchema,\n skos_notes: v2FullSkosNoteSchema,\n skos_relations: v2FullSkosRelationSchema,\n skos_mapping_relations: v2FullSkosMappingRelationSchema,\n skos_scheme_memberships: v2FullSkosSchemeMembershipSchema,\n note_skos_tags: v2FullNoteSkosTagSchema,\n skos_collections: v2FullSkosCollectionSchema,\n skos_collection_members: v2FullSkosCollectionMemberSchema,\n graph_sources: v2FullGraphSourceSchema,\n graph_edges: v2FullGraphEdgeSchema,\n communities: v2FullCommunitySetSchema,\n community_assignments: v2FullCommunityAssignmentSchema,\n signature: v2FullSignatureSchema,\n },\n}\n\nlet legacyAjvInstance: Ajv2020 | undefined\nlet coreAjvInstance: Ajv2020 | undefined\nlet recordAjvInstance: Ajv2020 | undefined\nlet fullAjvInstance: Ajv2020 | undefined\nconst legacyValidators = new Map<LegacySchemaDefName, ValidateFunction>()\nconst coreValidators = new Map<string, ValidateFunction>()\nconst recordValidators = new Map<string, ValidateFunction>()\nconst fullValidators = new Map<string, ValidateFunction>()\n\nexport function getKnowledgeShardSchema(): unknown {\n return {\n manifest: manifestSchema,\n notes: noteSchema,\n collections: collectionSchema,\n tags: tagSchema,\n templates: templateSchema,\n links: linkSchema,\n recordV1: {\n manifest: recordManifestSchema,\n notes: recordNoteSchema,\n collections: recordCollectionSchema,\n tags: recordTagSchema,\n links: recordLinkSchema,\n },\n fullV1: FULL_V1_CURRENT_SCHEMAS,\n fullV1V2: FULL_V1_SCHEMAS['2.0.0'],\n }\n}\n\nexport function getKnowledgeShardContractReceipt(): unknown {\n return authorityReceipt\n}\n\nfunction addCanonicalFormats(ajv: Ajv2020): void {\n ajv.addFormat('uuid', /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)\n ajv.addFormat('date-time', {\n type: 'string',\n validate: (value: string) =>\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$/.test(value)\n && !Number.isNaN(Date.parse(value)),\n })\n ajv.addFormat('uri', {\n type: 'string',\n validate: (value: string) => {\n try {\n return Boolean(new URL(value).protocol)\n } catch {\n return false\n }\n },\n })\n}\n\nfunction getLegacyAjv(): Ajv2020 {\n if (!legacyAjvInstance) {\n legacyAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: false,\n })\n legacyAjvInstance.addSchema(legacySchema)\n }\n return legacyAjvInstance\n}\n\nfunction getCoreAjv(): Ajv2020 {\n if (!coreAjvInstance) {\n coreAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: true,\n })\n addCanonicalFormats(coreAjvInstance)\n const registered = new Set<string>()\n for (const bundle of Object.values(CORE_V1_SCHEMAS)) {\n for (const schema of Object.values(bundle)) {\n if (!registered.has(schema.$id)) {\n coreAjvInstance.addSchema(schema)\n registered.add(schema.$id)\n }\n }\n }\n }\n return coreAjvInstance\n}\n\nfunction getRecordAjv(): Ajv2020 {\n if (!recordAjvInstance) {\n recordAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: true,\n })\n addCanonicalFormats(recordAjvInstance)\n const registered = new Set<string>()\n for (const bundle of Object.values(RECORD_V1_SCHEMAS)) {\n for (const schema of Object.values(bundle)) {\n if (!registered.has(schema.$id)) {\n recordAjvInstance.addSchema(schema)\n registered.add(schema.$id)\n }\n }\n }\n }\n return recordAjvInstance\n}\n\nfunction getFullAjv(): Ajv2020 {\n if (!fullAjvInstance) {\n fullAjvInstance = new Ajv2020({\n allErrors: true,\n strict: true,\n validateFormats: true,\n })\n addCanonicalFormats(fullAjvInstance)\n const registered = new Set<string>()\n for (const bundle of Object.values(FULL_V1_SCHEMAS)) {\n for (const schema of Object.values(bundle)) {\n if (!registered.has(schema.$id)) {\n fullAjvInstance.addSchema(schema)\n registered.add(schema.$id)\n }\n }\n }\n }\n return fullAjvInstance\n}\n\nfunction legacyValidatorFor(defName: LegacySchemaDefName): ValidateFunction {\n const cached = legacyValidators.get(defName)\n if (cached) return cached\n const validator = getLegacyAjv().getSchema(`${legacySchema.$id}#/$defs/${defName}`)\n ?? getLegacyAjv().compile({ $ref: `${legacySchema.$id}#/$defs/${defName}` })\n legacyValidators.set(defName, validator)\n return validator\n}\n\nfunction coreSchemaVersion(value: string): CoreV1SchemaVersion | undefined {\n return value === '1.0.0' || value === '1.1.0' || value === '1.2.0' || value === '2.0.0'\n ? value\n : undefined\n}\n\nfunction recordSchemaVersion(value: string): RecordV1SchemaVersion | undefined {\n return value === '1.1.0' || value === '1.2.0' || value === '2.0.0' ? value : undefined\n}\n\nfunction fullSchemaVersion(value: string): FullV1SchemaVersion | undefined {\n return value === '1.1.0' || value === '1.2.0' || value === '2.0.0' ? value : undefined\n}\n\nfunction coreValidatorFor(\n name: CoreV1Component | 'manifest',\n version: CoreV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ValidateFunction {\n const key = `${version}:${name}`\n const cached = coreValidators.get(key)\n if (cached) return cached\n const schema = CORE_V1_SCHEMAS[version][name]\n const validator = getCoreAjv().getSchema(schema.$id) ?? getCoreAjv().compile(schema)\n coreValidators.set(key, validator)\n return validator\n}\n\nfunction recordValidatorFor(\n name: RecordV1Component | 'manifest',\n version: RecordV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ValidateFunction {\n const key = `${version}:${name}`\n const cached = recordValidators.get(key)\n if (cached) return cached\n const schema = RECORD_V1_SCHEMAS[version][name]\n const validator = getRecordAjv().getSchema(schema.$id) ?? getRecordAjv().compile(schema)\n recordValidators.set(key, validator)\n return validator\n}\n\nfunction fullValidatorFor(\n name: FullV1Component | 'manifest' | 'signature',\n version: FullV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ValidateFunction {\n const key = `${version}:${name}`\n const cached = fullValidators.get(key)\n if (cached) return cached\n const schema = FULL_V1_SCHEMAS[version][name]\n const validator = getFullAjv().getSchema(schema.$id) ?? getFullAjv().compile(schema)\n fullValidators.set(key, validator)\n return validator\n}\n\nfunction formatErrors(errors: ErrorObject[] | null | undefined): string[] {\n return (errors ?? []).map((error) => {\n const path = error.instancePath || '(root)'\n return `${path} ${error.message ?? 'is invalid'}`\n })\n}\n\nfunction profileOf(value: unknown): string | undefined {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return undefined\n const profile = (value as Record<string, unknown>).profile\n return typeof profile === 'string' ? profile : undefined\n}\n\nexport function validateShardManifest(value: unknown): ShardSchemaValidationResult {\n let validate: ValidateFunction\n const profile = profileOf(value)\n if (profile === 'core-v1') {\n const version = value && typeof value === 'object' && !Array.isArray(value)\n ? coreSchemaVersion(String((value as Record<string, unknown>).version ?? ''))\n : undefined\n if (!version) {\n return {\n valid: false,\n errors: ['(root) uses an unsupported canonical core-v1 schema version'],\n }\n }\n validate = coreValidatorFor('manifest', version)\n } else if (profile === 'record-v1') {\n const version = value && typeof value === 'object' && !Array.isArray(value)\n ? recordSchemaVersion(String((value as Record<string, unknown>).version ?? ''))\n : undefined\n if (!version) {\n return {\n valid: false,\n errors: ['(root) uses an unsupported canonical record-v1 schema version'],\n }\n }\n validate = recordValidatorFor('manifest', version)\n } else if (profile === 'full-v1') {\n const version = value && typeof value === 'object' && !Array.isArray(value)\n ? fullSchemaVersion(String((value as Record<string, unknown>).version ?? ''))\n : undefined\n if (!version) {\n return {\n valid: false,\n errors: ['(root) uses an unsupported canonical full-v1 schema version'],\n }\n }\n validate = fullValidatorFor('manifest', version)\n } else {\n validate = legacyValidatorFor('manifest')\n }\n const valid = validate(value)\n return { valid, errors: formatErrors(validate.errors) }\n}\n\nfunction parseJsonArray(\n bytes: Uint8Array | undefined,\n path: string,\n): { records: unknown[]; errors: string[] } {\n if (!bytes) return { records: [], errors: [] }\n try {\n const value = JSON.parse(decoder.decode(bytes)) as unknown\n if (!Array.isArray(value)) return { records: [], errors: [`${path} must be a JSON array`] }\n return { records: value, errors: [] }\n } catch {\n return { records: [], errors: [`${path} failed to parse as JSON`] }\n }\n}\n\nfunction parseJsonl(\n bytes: Uint8Array | undefined,\n path: string,\n): { records: unknown[]; errors: string[] } {\n if (!bytes) return { records: [], errors: [] }\n const text = decoder.decode(bytes).trim()\n if (!text) return { records: [], errors: [] }\n const records: unknown[] = []\n const errors: string[] = []\n for (const [index, line] of text.split('\\n').entries()) {\n try {\n records.push(JSON.parse(line) as unknown)\n } catch {\n errors.push(`${path}:${index + 1} failed to parse as JSON`)\n }\n }\n return { records, errors }\n}\n\nfunction unpackShardFiles(input: Uint8Array | ArrayBuffer | ShardFiles): ShardFiles {\n if (input instanceof Map) return input\n return unpackTarGz(input instanceof ArrayBuffer ? new Uint8Array(input) : input)\n}\n\nfunction parseRecords(\n bytes: Uint8Array | undefined,\n path: string,\n encoding: RecordEncoding,\n): { records: unknown[]; errors: string[] } {\n return encoding === 'json-array' ? parseJsonArray(bytes, path) : parseJsonl(bytes, path)\n}\n\nfunction validateLegacyComponentRecords(\n component: ShardComponent,\n records: unknown[],\n path: string,\n): string[] {\n const errors: string[] = []\n for (const [index, record] of records.entries()) {\n const result = validateShardComponentRecord(component, record)\n if (!result.valid) {\n errors.push(...result.errors.map((error) => `${path}[${index}] ${error}`))\n }\n }\n return errors\n}\n\nfunction validateLegacyArchive(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const manifestResult = validateShardManifest(manifest)\n if (!manifestResult.valid) {\n errors.push(...manifestResult.errors.map((error) => `manifest.json ${error}`))\n }\n\n const componentsToValidate = new Set<ShardComponent>(manifest.components)\n for (const [component, spec] of Object.entries(LEGACY_COMPONENT_FILES) as Array<\n [ShardComponent, { file: string; encoding: RecordEncoding }]\n >) {\n if (files.has(spec.file)) componentsToValidate.add(component)\n }\n\n for (const component of componentsToValidate) {\n const spec = LEGACY_COMPONENT_FILES[component]\n if (!spec) continue\n if (component === 'notes' && manifest.layout?.clusters?.notes?.length) {\n for (const cluster of manifest.layout.clusters.notes) {\n const parsed = parseJsonl(files.get(cluster.href), cluster.href)\n errors.push(...parsed.errors)\n errors.push(...validateLegacyComponentRecords('notes', parsed.records, cluster.href))\n }\n continue\n }\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n errors.push(...validateLegacyComponentRecords(component, parsed.records, spec.file))\n }\n return errors\n}\n\nfunction coreReferenceErrors(records: Map<CoreV1Component, unknown[]>): string[] {\n const errors: string[] = []\n const notes = records.get('notes') as Array<Record<string, unknown>>\n const collections = records.get('collections') as Array<Record<string, unknown>>\n const tags = records.get('tags') as Array<Record<string, unknown>>\n const templates = records.get('templates') as Array<Record<string, unknown>>\n const links = records.get('links') as Array<Record<string, unknown>>\n const noteIds = new Set(notes.map((record) => record.id))\n const collectionIds = new Set(collections.map((record) => record.id))\n const tagNames = new Set(tags.map((record) => record.name))\n\n for (const [index, collection] of collections.entries()) {\n if (collection.parent_id !== null && !collectionIds.has(collection.parent_id)) {\n errors.push(`collections.json[${index}] parent_id does not reference a declared collection`)\n }\n }\n const collectionById = new Map(collections.map((collection) => [collection.id, collection]))\n const visiting = new Set<unknown>()\n const visited = new Set<unknown>()\n const visitCollection = (collection: Record<string, unknown>): void => {\n if (visited.has(collection.id)) return\n if (visiting.has(collection.id)) {\n errors.push(`collection hierarchy contains a cycle at ${String(collection.id)}`)\n return\n }\n visiting.add(collection.id)\n const parent = collection.parent_id === null\n ? undefined\n : collectionById.get(collection.parent_id)\n if (parent) visitCollection(parent)\n visiting.delete(collection.id)\n visited.add(collection.id)\n }\n for (const collection of collections) visitCollection(collection)\n for (const [index, note] of notes.entries()) {\n if (note.collection_id !== null && !collectionIds.has(note.collection_id)) {\n errors.push(`notes.jsonl[${index}] collection_id does not reference a declared collection`)\n }\n for (const tag of note.tags as string[]) {\n if (!tagNames.has(tag)) {\n errors.push(`notes.jsonl[${index}] tag does not reference a declared tag`)\n }\n }\n }\n for (const [index, template] of templates.entries()) {\n if (template.collection_id !== null && !collectionIds.has(template.collection_id)) {\n errors.push(`templates.json[${index}] collection_id does not reference a declared collection`)\n }\n for (const tag of template.default_tags as string[]) {\n if (!tagNames.has(tag)) {\n errors.push(`templates.json[${index}] default tag does not reference a declared tag`)\n }\n }\n }\n for (const [index, link] of links.entries()) {\n if (!noteIds.has(link.from_note_id)) {\n errors.push(`links.jsonl[${index}] from_note_id does not reference a declared note`)\n }\n if (link.to_note_id !== null && !noteIds.has(link.to_note_id)) {\n errors.push(`links.jsonl[${index}] to_note_id does not reference a declared note`)\n }\n }\n return errors\n}\n\nfunction validateCoreV1Structure(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const schemaVersion = coreSchemaVersion(manifest.version)\n if (!schemaVersion) {\n return ['manifest.json uses an unsupported canonical core-v1 schema version']\n }\n const manifestValidator = coreValidatorFor('manifest', schemaVersion)\n if (!manifestValidator(manifest)) {\n return formatErrors(manifestValidator.errors).map((error) => `manifest.json ${error}`)\n }\n\n const components = manifest.components as CoreV1Component[]\n const expectedFiles = new Set(components.map((component) => CORE_V1_COMPONENT_FILES[component].file))\n for (const filename of expectedFiles) {\n if (!files.has(filename)) errors.push(`${filename} is declared but missing`)\n if (!(filename in manifest.checksums)) errors.push(`${filename} is missing its declared checksum`)\n }\n for (const filename of Object.keys(manifest.checksums)) {\n if (!expectedFiles.has(filename)) {\n errors.push(`manifest checksum references undeclared file ${filename}`)\n }\n }\n for (const filename of files.keys()) {\n if (filename !== 'manifest.json' && !expectedFiles.has(filename)) {\n errors.push(`archive contains undeclared file ${filename}`)\n }\n }\n\n const records = new Map<CoreV1Component, unknown[]>()\n for (const component of components) {\n const spec = CORE_V1_COMPONENT_FILES[component]\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n const validator = coreValidatorFor(component, schemaVersion)\n for (const [index, record] of parsed.records.entries()) {\n if (!validator(record)) {\n errors.push(\n ...formatErrors(validator.errors).map((error) => `${spec.file}[${index}] ${error}`),\n )\n }\n }\n const expectedCount = manifest.counts[component]\n if (expectedCount !== parsed.records.length) {\n errors.push(\n `${spec.file} count mismatch: manifest=${String(expectedCount)} actual=${parsed.records.length}`,\n )\n }\n records.set(component, parsed.records)\n }\n for (const component of Object.keys(CORE_V1_COMPONENT_FILES) as CoreV1Component[]) {\n if (!records.has(component)) records.set(component, [])\n }\n\n if (errors.length === 0) errors.push(...coreReferenceErrors(records))\n return errors\n}\n\nfunction validateFullV1Structure(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const schemaVersion = fullSchemaVersion(manifest.version)\n if (!schemaVersion) {\n return ['manifest.json uses an unsupported canonical full-v1 schema version']\n }\n const manifestValidator = fullValidatorFor('manifest', schemaVersion)\n if (!manifestValidator(manifest)) {\n return formatErrors(manifestValidator.errors).map((error) => `manifest.json ${error}`)\n }\n\n const components = manifest.components as FullV1Component[]\n const expectedFiles = new Set(\n components.map((component) => FULL_V1_COMPONENT_FILES[component].file),\n )\n for (const filename of expectedFiles) {\n if (!files.has(filename)) errors.push(`${filename} is declared but missing`)\n if (!(filename in manifest.checksums)) errors.push(`${filename} is missing its declared checksum`)\n }\n for (const filename of Object.keys(manifest.checksums)) {\n if (!expectedFiles.has(filename)) {\n errors.push(`manifest checksum references undeclared file ${filename}`)\n }\n }\n for (const filename of files.keys()) {\n if (\n filename !== 'manifest.json'\n && filename !== 'signature.json'\n && !isSidecarEntry(filename)\n && !expectedFiles.has(filename)\n ) {\n errors.push(`archive contains undeclared file ${filename}`)\n }\n }\n\n const records = new Map<FullV1Component, unknown[]>()\n for (const component of components) {\n const spec = FULL_V1_COMPONENT_FILES[component]\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n const validator = fullValidatorFor(component, schemaVersion)\n for (const [index, record] of parsed.records.entries()) {\n if (!validator(record)) {\n errors.push(\n ...formatErrors(validator.errors).map((error) => `${spec.file}[${index}] ${error}`),\n )\n }\n }\n if (component !== 'communities') {\n const expectedCount = manifest.counts[component]\n if (expectedCount !== parsed.records.length) {\n errors.push(\n `${spec.file} count mismatch: manifest=${String(expectedCount)} actual=${parsed.records.length}`,\n )\n }\n }\n records.set(component, parsed.records)\n }\n\n const communitySets = records.get('communities') as Array<Record<string, unknown>>\n const communityCount = communitySets.reduce((total, set) => {\n const communities = Array.isArray(set.communities) ? set.communities : []\n return total + communities.length\n }, 0)\n if (manifest.counts.community_sets !== communitySets.length) {\n errors.push(\n `communities.json set count mismatch: manifest=${String(manifest.counts.community_sets)} actual=${communitySets.length}`,\n )\n }\n if (manifest.counts.communities !== communityCount) {\n errors.push(\n `communities.json community count mismatch: manifest=${String(manifest.counts.communities)} actual=${communityCount}`,\n )\n }\n\n const signatureBytes = files.get('signature.json')\n if (signatureBytes) {\n try {\n const signature = JSON.parse(decoder.decode(signatureBytes)) as unknown\n const signatureValidator = fullValidatorFor('signature', schemaVersion)\n if (!signatureValidator(signature)) {\n errors.push(\n ...formatErrors(signatureValidator.errors).map(\n (error) => `signature.json ${error}`,\n ),\n )\n }\n } catch {\n errors.push('signature.json failed to parse as JSON')\n }\n }\n\n const notes = records.get('notes') as Array<Record<string, unknown>>\n for (const [noteIndex, note] of notes.entries()) {\n const attachments = Array.isArray(note.attachments) ? note.attachments : []\n for (const [attachmentIndex, projection] of attachments.entries()) {\n const attachment = (\n projection as { attachment?: { checksum?: unknown } }\n ).attachment\n if (typeof attachment?.checksum !== 'string') continue\n const sidecar = sidecarEntryName(attachment.checksum)\n if (!files.has(sidecar)) {\n errors.push(\n `notes.jsonl[${noteIndex}].attachments[${attachmentIndex}] is missing mandatory sidecar ${sidecar}`,\n )\n }\n }\n }\n return errors\n}\n\nfunction validateRecordV1Structure(files: ShardFiles, manifest: ShardManifest): string[] {\n const errors: string[] = []\n const schemaVersion = recordSchemaVersion(manifest.version)\n if (!schemaVersion) {\n return ['manifest.json uses an unsupported canonical record-v1 schema version']\n }\n const manifestValidator = recordValidatorFor('manifest', schemaVersion)\n if (!manifestValidator(manifest)) {\n return formatErrors(manifestValidator.errors).map((error) => `manifest.json ${error}`)\n }\n\n const components = manifest.components as RecordV1Component[]\n const expectedFiles = new Set(\n components.map((component) => RECORD_V1_COMPONENT_FILES[component].file),\n )\n for (const filename of expectedFiles) {\n if (!files.has(filename)) errors.push(`${filename} is declared but missing`)\n if (!(filename in manifest.checksums)) errors.push(`${filename} is missing its declared checksum`)\n }\n for (const filename of Object.keys(manifest.checksums)) {\n if (!expectedFiles.has(filename)) {\n errors.push(`manifest checksum references undeclared file ${filename}`)\n }\n }\n for (const filename of files.keys()) {\n if (filename !== 'manifest.json' && !expectedFiles.has(filename)) {\n errors.push(`archive contains undeclared file ${filename}`)\n }\n }\n\n const records = new Map<CoreV1Component, unknown[]>()\n for (const component of components) {\n const spec = RECORD_V1_COMPONENT_FILES[component]\n const parsed = parseRecords(files.get(spec.file), spec.file, spec.encoding)\n errors.push(...parsed.errors)\n const validator = recordValidatorFor(component, schemaVersion)\n for (const [index, record] of parsed.records.entries()) {\n if (!validator(record)) {\n errors.push(\n ...formatErrors(validator.errors).map((error) => `${spec.file}[${index}] ${error}`),\n )\n }\n }\n const expectedCount = manifest.counts[component]\n if (expectedCount !== parsed.records.length) {\n errors.push(\n `${spec.file} count mismatch: manifest=${String(expectedCount)} actual=${parsed.records.length}`,\n )\n }\n records.set(component, parsed.records)\n }\n for (const component of Object.keys(CORE_V1_COMPONENT_FILES) as CoreV1Component[]) {\n if (!records.has(component)) records.set(component, [])\n }\n\n if (errors.length === 0) errors.push(...coreReferenceErrors(records))\n return errors\n}\n\nexport function validateShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): ShardSchemaValidationResult {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const profile = profileOf(manifest)\n const errors = profile === 'core-v1'\n ? validateCoreV1Structure(files, manifest)\n : profile === 'record-v1'\n ? validateRecordV1Structure(files, manifest)\n : profile === 'full-v1'\n ? validateFullV1Structure(files, manifest)\n : validateLegacyArchive(files, manifest)\n return { valid: errors.length === 0, errors }\n}\n\nexport async function validateCoreV1ShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): Promise<ShardSchemaValidationResult> {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const errors = validateCoreV1Structure(files, manifest)\n if (errors.length > 0) return { valid: false, errors }\n\n const checksumResult = await validateChecksums(manifest.checksums, files)\n if (!checksumResult.valid) {\n errors.push(...checksumResult.failures.map((filename) => `${filename} checksum mismatch`))\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport async function validateRecordV1ShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): Promise<ShardSchemaValidationResult> {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const errors = validateRecordV1Structure(files, manifest)\n if (errors.length > 0) return { valid: false, errors }\n\n const checksumResult = await validateChecksums(manifest.checksums, files)\n if (!checksumResult.valid) {\n errors.push(...checksumResult.failures.map((filename) => `${filename} checksum mismatch`))\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport async function validateFullV1ShardArchive(\n input: Uint8Array | ArrayBuffer | ShardFiles,\n): Promise<ShardSchemaValidationResult> {\n let files: ShardFiles\n try {\n files = unpackShardFiles(input)\n } catch {\n return { valid: false, errors: ['archive failed to unpack'] }\n }\n const manifestBytes = files.get('manifest.json')\n if (!manifestBytes) return { valid: false, errors: ['manifest.json is missing'] }\n\n let manifest: ShardManifest\n try {\n manifest = JSON.parse(decoder.decode(manifestBytes)) as ShardManifest\n } catch {\n return { valid: false, errors: ['manifest.json failed to parse as JSON'] }\n }\n\n const errors = validateFullV1Structure(files, manifest)\n if (errors.length > 0) return { valid: false, errors }\n\n const checksumResult = await validateChecksums(manifest.checksums, files)\n if (!checksumResult.valid) {\n errors.push(...checksumResult.failures.map((filename) => `${filename} checksum mismatch`))\n }\n\n const notesSpec = FULL_V1_COMPONENT_FILES.notes\n const parsedNotes = parseRecords(files.get(notesSpec.file), notesSpec.file, notesSpec.encoding)\n for (const [noteIndex, note] of (\n parsedNotes.records as Array<Record<string, unknown>>\n ).entries()) {\n const attachments = Array.isArray(note.attachments) ? note.attachments : []\n for (const [attachmentIndex, projection] of attachments.entries()) {\n const attachment = (\n projection as { attachment?: { checksum?: unknown } }\n ).attachment\n if (typeof attachment?.checksum !== 'string') continue\n const sidecar = sidecarEntryName(attachment.checksum)\n const bytes = files.get(sidecar)\n if (bytes && computeBlobHash(bytes) !== attachment.checksum) {\n errors.push(\n `notes.jsonl[${noteIndex}].attachments[${attachmentIndex}] sidecar checksum mismatch`,\n )\n }\n }\n }\n return { valid: errors.length === 0, errors }\n}\n\nexport function validateShardComponentRecord(\n component: ShardComponent | 'templates',\n value: unknown,\n profile?: 'core-v1' | 'record-v1' | 'full-v1',\n version: CoreV1SchemaVersion = CURRENT_SHARD_VERSION,\n): ShardSchemaValidationResult {\n let validate: ValidateFunction\n if (profile === 'core-v1' && component in CORE_V1_COMPONENT_FILES) {\n validate = coreValidatorFor(component as CoreV1Component, version)\n } else if (profile === 'record-v1' && component in RECORD_V1_COMPONENT_FILES) {\n const canonicalVersion = recordSchemaVersion(version)\n if (!canonicalVersion) {\n return {\n valid: false,\n errors: [`(root) uses an unsupported canonical record-v1 schema version ${version}`],\n }\n }\n validate = recordValidatorFor(component as RecordV1Component, canonicalVersion)\n } else if (profile === 'full-v1' && component in FULL_V1_COMPONENT_FILES) {\n const canonicalVersion = fullSchemaVersion(version)\n if (!canonicalVersion) {\n return {\n valid: false,\n errors: [`(root) uses an unsupported canonical full-v1 schema version ${version}`],\n }\n }\n validate = fullValidatorFor(component as FullV1Component, canonicalVersion)\n } else {\n const legacyDef = LEGACY_COMPONENT_SCHEMA_DEFS[component]\n if (!legacyDef) {\n return {\n valid: false,\n errors: [`(root) component '${component}' requires an explicit full-v1 profile`],\n }\n }\n validate = legacyValidatorFor(legacyDef)\n }\n const valid = validate(value)\n return { valid, errors: formatErrors(validate.errors) }\n}\n\nexport function assertShardComponentRecord(\n component: ShardComponent | 'templates',\n value: unknown,\n profile?: 'core-v1' | 'record-v1' | 'full-v1',\n version: CoreV1SchemaVersion = CURRENT_SHARD_VERSION,\n): void {\n const result = validateShardComponentRecord(component, value, profile, version)\n if (!result.valid) {\n throw new Error(`Invalid shard ${component} record:\\n${result.errors.join('\\n')}`)\n }\n}\n","{\n \"schemaVersion\": 1,\n \"source\": {\n \"repository\": \"https://git.integrolabs.net/Fortemi/fortemi\",\n \"commit\": \"6343bd899958445bbc7e7e87b0dc92a8429d5a06\",\n \"contractPath\": \"contracts/knowledge-shard/2.0.0/contract.json\",\n \"contractSha256\": \"5bf8d2fd8147d8df92599b1a3ce6b405ce022c83893f37547aefa7ca659f0783\"\n },\n \"knowledgeShard\": {\n \"format\": \"matric-shard\",\n \"schemaVersion\": \"2.0.0\",\n \"minimumReaderVersion\": \"2.0.0\",\n \"profileIdentity\": \"(manifest.version, manifest.profile)\",\n \"wireRepresentation\": \"direct-json-key-presence\"\n },\n \"status\": \"specified-implementation-pending\",\n \"schemaBundle\": {\n \"sourceRoot\": \"contracts/knowledge-shard/2.0.0\",\n \"vendoredRoot\": \"schemas/knowledge-shard/2.0.0\",\n \"aggregateAlgorithm\": \"sha256(raw file bytes concatenated in lexicographic path order)\",\n \"sha256\": \"66dee80876c73fdc8756541c72e96ae189c098113a831c849d619381c4121c02\",\n \"files\": {\n \"contract.schema.json\": \"7dc21c1d0efbad2aaa782c5c637c67268558a3822850eb3ac0c67e5a7baba427\",\n \"core-v1/collection.schema.json\": \"ed28f395e4bea9ae235bc32e9e4167abec4f318dc5335cea6aa2f4d1bdcf9705\",\n \"core-v1/link.schema.json\": \"7bc1531f785d8f5c0b442f09fd039adc0c170b65b9919e2f652b452f614071ea\",\n \"core-v1/manifest.schema.json\": \"f35775e0532c9b2c9f7543c0aef1f0836233253e8f8c7abab62d20824809aad8\",\n \"core-v1/note.schema.json\": \"c0c3c9fbd399b9f090eecd9477e5efcbe32fbff2278c38703075b8f0db9aa829\",\n \"core-v1/tag.schema.json\": \"49612a9ac9332127ee88084a22c845646ba702d7fdcc3fe12d99a825add1b0c7\",\n \"core-v1/template.schema.json\": \"cfd4b64b24e3690e9c97061c98809d3a9b75dc7d70a5bce19997f2eed5ac52a7\",\n \"field-semantics.json\": \"43e5704bc8d805158aa67f33eef6d440fecfeb8385d4f622d79084be3424da09\",\n \"field-semantics.schema.json\": \"3d244074067b57857efaa7ed8e027b47eb42855fc07a8abf1f389d232867cdd6\",\n \"full-v1/community-assignment.schema.json\": \"285763d54e08ecc1ff1d7665dc8363f537c5aab222c2a31e4c4d75f8fa0441f5\",\n \"full-v1/community-set.schema.json\": \"bd39af12cc1ae417cf4aa3e8b4b88defc7ffdd37cb77030bc451609d73907e38\",\n \"full-v1/embedding-config.schema.json\": \"8e2291167f25676e2263d5a4f493e07b8c8822caedcbd2b28c7a44d57e724870\",\n \"full-v1/embedding-set-member.schema.json\": \"73a4425a391666c604515daa4f71acc715a9ab5053f909bccca61717473a554b\",\n \"full-v1/embedding-set.schema.json\": \"9f6042775732605d902103614f7b4c338e6cf44f81682e74e630df36db62d53c\",\n \"full-v1/embedding.schema.json\": \"adab2243e811963aa55fbc51a1a73f5f2ee7258ebc87095b29d5c279cf7c79a8\",\n \"full-v1/graph-edge.schema.json\": \"3a4ab64860f8b0b4405676382844ccc33284d5d4a00e40b7670ee9040770e63e\",\n \"full-v1/graph-source.schema.json\": \"32ce0d400bc7bb753486691f6664bde82419a201e4d2726fbf933a41c9b5d501\",\n \"full-v1/manifest.schema.json\": \"ffad2eb31832eb611bdaed60e3dc51fc4d70be65110e477a03e298ed1e9fd3a8\",\n \"full-v1/named-location.schema.json\": \"6a8fa15c28a2cb652da3383545f0d4caa8fbd5b70bc0434a2c42f99b7973d1f1\",\n \"full-v1/note-original-history.schema.json\": \"2695be759371a0bc1ec7365a748b1e640e8e6d0460d01bdfd219c8ddf860fb4a\",\n \"full-v1/note-original.schema.json\": \"2f91b05391dde339e22bc5ef4b86cb3f65c175409ce197ad6ea95df3cd6b5080\",\n \"full-v1/note-revised-current.schema.json\": \"e56370d6574123490347e61d2e76305b26de2764d9b2c2a840c5f6b2b0a5857b\",\n \"full-v1/note-revision.schema.json\": \"21828d0d05f120387678a1f8c268373a2d336d48c98c77f86bd278ef7b88a8e8\",\n \"full-v1/note-skos-tag.schema.json\": \"f0fd53d1926cb7ad816668c0d5a9eeecdaf78a8aa34c637e6535d75efde71008\",\n \"full-v1/provenance-activity.schema.json\": \"cf2fe61eec8bb2e8a3a853aa4745921645b6dad275a8963c2b2d1b6fe7095abb\",\n \"full-v1/provenance-device.schema.json\": \"64e73ef83c9075af9575acf55afe6585a46d515c8b8e8cda4b07132de931fa04\",\n \"full-v1/provenance-edge.schema.json\": \"77e099b8cb550adca4f87675fecd46ddcb93a7f006b18fe29244a243baac70bc\",\n \"full-v1/provenance-location.schema.json\": \"ef66f850e57b38f074361c9801954296d1053a4fad8fa6f29630d8ada4af60cc\",\n \"full-v1/provenance-record.schema.json\": \"7e26dda2ec6d93adc943758a42cb9d59d5045c6a773e787bc056523b486957cb\",\n \"full-v1/signature.schema.json\": \"0a9c6bec61202daac9496b97206eb144bccca5eb96cd25fee51c6bdf676d88bf\",\n \"full-v1/skos-collection-member.schema.json\": \"868934af7206338d3b5d0ceee6004536d2556da673dfa27fb121397f92eaf90f\",\n \"full-v1/skos-collection.schema.json\": \"b3b853831c0303100ff9e163581726123c0cb4c4faab4beae8a084e2e05d1fd7\",\n \"full-v1/skos-concept.schema.json\": \"5bdc83d9105f272868e5ee4fa7cfcf62aec8abdfc7e37e5a039c4b452bad28a9\",\n \"full-v1/skos-label.schema.json\": \"58fb972b57d53de61935f48899ba8dce7e24d423cc5a5c97ea52ad56d6f410ee\",\n \"full-v1/skos-mapping-relation.schema.json\": \"f763a0a86312b3ae42ce4c0e1e899f0de074cf71f6c4d3fb6fe0483f8ef3772f\",\n \"full-v1/skos-note.schema.json\": \"a7eb2c2d985bb8cdead580cabe461d65b2789e9f9a43c817c6ee606a98e4bf7d\",\n \"full-v1/skos-relation.schema.json\": \"10673a317a05b20b00e2a7497f1d8c45801066c02958bfebc330e0b7dff37aa2\",\n \"full-v1/skos-scheme-membership.schema.json\": \"0b7138ce6bff393e3f3a9ce6828e36f2f6f8a73b17d14b3f98a53145b903710f\",\n \"full-v1/skos-scheme.schema.json\": \"0493f955db21746b42df64de993ef6fc1089a41280e097d6b3b24ffc760b9ac7\",\n \"record-v1/collection.schema.json\": \"7669aa38a5cd11b96a241e965c0a1774ed28ca47df005570b0ed4a975620462b\",\n \"record-v1/link.schema.json\": \"002faa3db2768add881324123aee7a8898883fd39697f4e1f14bcccf7a23c78c\",\n \"record-v1/manifest.schema.json\": \"927aac403b1e9178ac251b812b1a1431d15d6f2c0d9c5a7db0642931e1c22f8b\",\n \"record-v1/note.schema.json\": \"f1179454145737c5c7c1670c0ab04f4e809254f21a5a2e347987504db6a73b3c\",\n \"record-v1/tag.schema.json\": \"391ba45fcf440afc83ba25bae3482887bcd9ffbfe1df77277f91c2c26e66b571\"\n }\n },\n \"presenceSemantics\": {\n \"inventory\": \"contracts/knowledge-shard/2.0.0/field-semantics.json\",\n \"inventorySchema\": \"contracts/knowledge-shard/2.0.0/field-semantics.schema.json\",\n \"fieldCount\": 220,\n \"states\": [\n \"absent\",\n \"null\",\n \"empty\",\n \"value\",\n \"unsupported\"\n ]\n },\n \"canonicalCorpus\": {\n \"sourcePath\": \"tests/fixtures/shards/presence-semantics-v2.0.json\",\n \"vendoredPath\": \"src/__tests__/shard/fixtures/presence-semantics-v2.0.json\",\n \"sha256\": \"cdb069819bee1bf89abad6aab012629c0fc2f40044ca2510ae73f7fdfa3d8552\"\n },\n \"tracking\": {\n \"authority\": \"https://git.integrolabs.net/Fortemi/fortemi/issues/1083\",\n \"matrix\": \"https://git.integrolabs.net/Fortemi/fortemi/issues/1082\",\n \"reactPresence\": \"https://git.integrolabs.net/Fortemi/fortemi-react/issues/379\",\n \"reactPgliteFull\": \"https://git.integrolabs.net/Fortemi/fortemi-react/issues/380\",\n \"reactAiwg\": \"https://git.integrolabs.net/Fortemi/fortemi-react/issues/381\",\n \"hotm\": \"https://git.integrolabs.net/Fortemi/hotm/issues/272\"\n },\n \"claimPolicy\": \"This descriptor specifies the next authority contract and enables no support, portability, backup, or parity claim without matrix receipts.\"\n}\n","import type {\n AiwgFortemiIndexExport,\n AiwgFortemiRecord,\n AiwgFortemiSkosConcept,\n} from './aiwg-index.js'\nimport authorityReceipt from '../schemas/knowledge-shard-v2.schema.receipt.json' with { type: 'json' }\nimport { sha256Hex } from './shard/checksum.js'\nimport { FULL_V1_COMPONENT_FILES, validateFullV1ShardArchive } from './shard/schema-validator.js'\nimport { packTarGz } from './shard/shard-tar.js'\nimport { SHARD_FORMAT } from './shard/types.js'\nimport type { ShardComponent, ShardLossEntry, ShardManifest } from './shard/types.js'\nimport { v5 as uuidv5 } from 'uuid'\n\nconst encoder = new TextEncoder()\nconst UUID_NAMESPACE = '7ab5d1f8-29d2-5e35-9e2f-3a45de171a9e'\n\nexport interface AiwgFullV1ConversionOptions {\n createdAt?: string\n matricVersion?: string\n}\n\nexport interface AiwgFullV1ConversionResult {\n success: boolean\n archive: Uint8Array | null\n profile: 'full-v1'\n schema_version: '2.0.0'\n /** Structural validity is separate from semantic losslessness. */\n lossless: boolean\n losses: ShardLossEntry[]\n receipt: {\n schema_version: 'fortemi.aiwg-full-v1-conversion-receipt.v1'\n source_schema_version: 'aiwg.fortemi.index.export.v2'\n authority_repository: string\n authority_commit: string\n authority_contract_sha256: string\n authority_schema_bundle_sha256: string\n manifest_sha256: string | null\n component_checksums: Record<string, string>\n contract_valid: boolean\n signed: false\n }\n}\n\nfunction uuid(kind: string, id: string): string {\n return uuidv5(`${kind}:${id}`, UUID_NAMESPACE)\n}\n\nfunction own(value: object, field: PropertyKey): boolean {\n return Object.prototype.hasOwnProperty.call(value, field)\n}\n\nfunction timestamp(value: string | undefined): string | undefined {\n if (!value || Number.isNaN(Date.parse(value))) return undefined\n return new Date(value).toISOString()\n}\n\nfunction addLoss(\n losses: ShardLossEntry[],\n code: string,\n message: string,\n details: Partial<ShardLossEntry> = {},\n): void {\n losses.push({ code, message, ...details })\n}\n\nfunction encode(values: unknown[], encoding: 'json-array' | 'jsonl'): Uint8Array {\n return encoder.encode(encoding === 'json-array'\n ? JSON.stringify(values)\n : values.map((value) => JSON.stringify(value)).join('\\n'))\n}\n\nfunction noteTitle(record: AiwgFortemiRecord, losses: ShardLossEntry[]): string | null {\n if (own(record, 'title')) return record.title ?? null\n const derived = record.search?.title ?? record.search?.name\n addLoss(losses, 'aiwg-title-not-native', derived\n ? 'Title was derived from the AIWG search projection.'\n : 'AIWG supplied no title; the nullable destination field is null.', {\n component: 'notes', record_id: record.id, field_path: '/title', source_state: 'absent',\n destination_capability: 'nullable-value', action: derived ? 'degrade' : 'default',\n })\n return derived ?? null\n}\n\nfunction noteContent(record: AiwgFortemiRecord, losses: ShardLossEntry[]): string {\n if (own(record, 'text')) return record.text ?? ''\n if (own(record.search ?? {}, 'body')) {\n addLoss(losses, 'aiwg-content-search-projection',\n 'Content was derived from the AIWG search projection.', {\n component: 'notes', record_id: record.id, field_path: '/original_content',\n source_state: 'absent', destination_capability: 'required-string', action: 'degrade',\n })\n return record.search?.body ?? ''\n }\n if (record.chunks?.length) {\n addLoss(losses, 'aiwg-content-chunk-projection', 'Content was assembled from AIWG chunks.', {\n component: 'notes', record_id: record.id, field_path: '/original_content',\n source_state: 'absent', destination_capability: 'required-string', action: 'degrade',\n })\n return record.chunks.map((chunk) => {\n if (own(chunk, 'text')) return chunk.text ?? ''\n if (own(chunk, 'body')) return chunk.body ?? ''\n if (own(chunk, 'summary')) return chunk.summary ?? ''\n return ''\n }).join('\\n\\n')\n }\n addLoss(losses, 'aiwg-content-unavailable',\n 'AIWG supplied no body; the required destination string is empty.', {\n component: 'notes', record_id: record.id, field_path: '/original_content',\n source_state: 'absent', destination_capability: 'required-string', action: 'default',\n })\n return ''\n}\n\nfunction createdAt(record: AiwgFortemiRecord, losses: ShardLossEntry[]): string {\n const source = timestamp(record.source.updated_at)\n if (source) return source\n addLoss(losses, 'aiwg-created-at-unavailable',\n 'AIWG has no distinct creation timestamp; updated_at was used.', {\n component: 'notes', record_id: record.id, field_path: '/created_at',\n source_state: 'absent', destination_capability: 'required-date-time', action: 'default',\n })\n return new Date(record.updated_at).toISOString()\n}\n\nfunction safeUri(value: string | undefined): string | null {\n if (!value) return null\n try { return new URL(value).toString() } catch { return null }\n}\n\nfunction schemeName(concept: AiwgFortemiSkosConcept): string {\n return concept.scheme && concept.scheme.length > 0 ? concept.scheme : 'aiwg'\n}\n\n/** Build exact 2.0.0/full-v1 plus mandatory semantic-loss evidence. */\nexport async function convertAiwgIndexToFullV1(\n index: AiwgFortemiIndexExport,\n options: AiwgFullV1ConversionOptions = {},\n): Promise<AiwgFullV1ConversionResult> {\n const losses: ShardLossEntry[] = []\n const exportedAt = timestamp(options.createdAt) ?? new Date(index.generated_at).toISOString()\n const records = [...index.items].sort((a, b) => a.id.localeCompare(b.id))\n const noteIds = new Map(records.map((record) => [record.id, uuid('record', record.id)]))\n const rows = new Map<ShardComponent, Array<Record<string, unknown>>>()\n for (const component of Object.keys(FULL_V1_COMPONENT_FILES) as ShardComponent[]) rows.set(component, [])\n\n const tags = new Set<string>()\n for (const record of records) {\n const noteId = noteIds.get(record.id)!\n const content = noteContent(record, losses)\n const sourceCreatedAt = createdAt(record, losses)\n const updatedAt = new Date(record.updated_at).toISOString()\n const recordTags = [...new Set(record.tags)].sort()\n recordTags.forEach((tag) => tags.add(tag))\n if (record.binary_sources?.length) {\n addLoss(losses, 'aiwg-attachment-bytes-unavailable',\n 'Attachment references have no bytes, so full-v1 attachment projections were omitted.', {\n component: 'notes', count: record.binary_sources.length, record_id: record.id,\n field_path: '/attachments', source_state: 'value',\n destination_capability: 'mandatory-blob-sidecar', action: 'omit',\n })\n }\n const unmappedRecordFields = [\n Object.keys(record.facets).length > 0 ? 'facets' : null,\n record.search !== undefined ? 'search' : null,\n record.chunks !== undefined ? 'chunks' : null,\n record.compatibility !== undefined ? 'compatibility' : null,\n ].filter((field): field is string => field !== null)\n if (unmappedRecordFields.length > 0) {\n addLoss(losses, 'aiwg-record-fields-unmapped',\n 'AIWG fields without a native full-v1 component were not hidden in note metadata.', {\n component: 'notes', record_id: record.id, source_state: 'value', action: 'omit',\n destination_capability: 'native-full-v1-components',\n reason: unmappedRecordFields.join(','),\n })\n }\n rows.get('notes')!.push({\n id: noteId, title: noteTitle(record, losses), original_content: content,\n revised_content: content,\n metadata: { aiwg_source: { record_id: record.id, record_type: record.type,\n repository: index.source.repo, graph: index.source.graph ?? null,\n source: record.source, privacy: record.privacy } },\n format: 'markdown', source: 'aiwg-index', starred: false, archived: false,\n collection_id: null, created_at: sourceCreatedAt, updated_at: updatedAt,\n tags: recordTags, attachments: [],\n })\n const hash = await sha256Hex(encoder.encode(content))\n rows.get('note_originals')!.push({\n id: uuid('note-original', record.id), note_id: noteId, content,\n hash: `sha256:${hash}`, user_created_at: sourceCreatedAt,\n user_last_edited_at: updatedAt, version_number: 1,\n })\n rows.get('note_revised_current')!.push({\n note_id: noteId, content, last_revision_id: null, ai_metadata: null,\n })\n }\n rows.set('tags', [...tags].sort().map((name) => ({ name, created_at: exportedAt })))\n\n const relationshipInput: unknown[] = []\n for (const record of records) {\n for (const [position, relationship] of record.relationships.entries()) {\n const target = noteIds.get(relationship.target_id) ?? null\n const key = `${record.id}\\0${position}\\0${relationship.type}\\0${relationship.target_id}`\n rows.get('links')!.push({\n id: uuid('relationship', key), from_note_id: noteIds.get(record.id)!, to_note_id: target,\n to_url: target ? null : `aiwg://record/${encodeURIComponent(relationship.target_id)}`,\n kind: relationship.type,\n score: own(relationship, 'confidence') ? relationship.confidence ?? null : null,\n created_at: new Date(record.updated_at).toISOString(),\n metadata: target\n ? relationship.metadata ?? null\n : {\n direction: relationship.direction ?? null,\n label: relationship.label ?? null,\n privacy: relationship.privacy ?? null,\n source_path: relationship.source_path ?? null,\n target_path: relationship.target_path ?? null,\n source_metadata: relationship.metadata ?? null,\n },\n })\n relationshipInput.push({ source: record.id, position, relationship })\n if (!target) continue\n let weight = relationship.confidence\n if (weight === undefined) {\n weight = 1\n addLoss(losses, 'aiwg-relationship-weight-unavailable',\n 'Graph weight defaulted because relationship confidence is absent.', {\n component: 'graph_edges', record_id: record.id,\n field_path: `/relationships/${position}/confidence`, source_state: 'absent',\n destination_capability: 'required-number', action: 'default',\n })\n }\n rows.get('graph_edges')!.push({\n graph_source_id: 'aiwg-relationships', from_note_id: noteIds.get(record.id)!,\n to_note_id: target, weight, kind: 'manual', rank: position,\n metadata: { type: relationship.type, direction: relationship.direction ?? null,\n label: relationship.label ?? null, privacy: relationship.privacy ?? null,\n source_path: relationship.source_path ?? null, target_path: relationship.target_path ?? null,\n source_metadata: relationship.metadata ?? null },\n })\n }\n }\n if (rows.get('graph_edges')!.length) {\n rows.get('graph_sources')!.push({\n id: 'aiwg-relationships', name: 'AIWG relationships', kind: 'imported', source_table: 'manual',\n embedding_set_id: null, virtual_set_id: null, model: null, dimension: null,\n truncate_dimension: null, metric: null, algorithm: null, parameters: null,\n input_hash: `sha256:${await sha256Hex(encoder.encode(JSON.stringify(relationshipInput)))}`,\n freshness: { status: 'fresh', checked_at: exportedAt }, created_at: exportedAt,\n })\n }\n\n const concepts = new Map<string, AiwgFortemiSkosConcept>()\n const conceptMembers = new Map<string, AiwgFortemiRecord[]>()\n for (const record of records) {\n for (const id of record.concepts) {\n conceptMembers.set(id, [...(conceptMembers.get(id) ?? []), record])\n }\n for (const concept of record.skos_concepts ?? []) {\n const existing = concepts.get(concept.id)\n if (existing && JSON.stringify(existing) !== JSON.stringify(concept)) {\n addLoss(losses, 'aiwg-skos-concept-conflict',\n 'Different metadata was supplied for one concept; the first sorted record won.', {\n component: 'skos_concepts', record_id: concept.id,\n destination_capability: 'single-concept-identity', action: 'degrade',\n })\n } else if (!existing) concepts.set(concept.id, concept)\n }\n }\n for (const id of conceptMembers.keys()) {\n if (!concepts.has(id)) {\n concepts.set(id, { id, prefLabel: id })\n addLoss(losses, 'aiwg-skos-metadata-unavailable',\n 'A referenced concept had no SKOS metadata; its id is used as the label.', {\n component: 'skos_concepts', record_id: id, field_path: '/prefLabel',\n source_state: 'absent', destination_capability: 'required-label', action: 'default',\n })\n }\n }\n const schemeIds = new Map(\n [...new Set([...concepts.values()].map(schemeName))].sort()\n .map((name) => [name, uuid('skos-scheme', name)]),\n )\n for (const [name, id] of schemeIds) {\n rows.get('skos_schemes')!.push({\n id, uri: null, notation: name, title: name, description: null, creator: 'aiwg-index',\n publisher: null, rights: null, version: null, is_active: true, is_system: false,\n created_at: exportedAt, updated_at: exportedAt, issued_at: null, modified_at: null,\n embedding: null, embedding_model: null, embedded_at: null,\n })\n }\n const conceptIds = new Map([...concepts.keys()].sort().map((id) => [id, uuid('skos-concept', id)]))\n for (const [sourceId, concept] of [...concepts].sort(([a], [b]) => a.localeCompare(b))) {\n const id = conceptIds.get(sourceId)!\n const schemeId = schemeIds.get(schemeName(concept))!\n const memberCount = conceptMembers.get(sourceId)?.length ?? 0\n if (concept.uri && !safeUri(concept.uri)) addLoss(losses, 'aiwg-skos-uri-invalid',\n 'AIWG concept URI is not a valid authority URI and was mapped to null.', {\n component: 'skos_concepts', record_id: sourceId, field_path: '/uri',\n source_state: 'value', destination_capability: 'uri', action: 'omit',\n })\n const unmappedConceptMetadata = Object.keys(concept.metadata ?? {}).filter((key) => key !== 'domain')\n if (unmappedConceptMetadata.length > 0) addLoss(losses, 'aiwg-skos-metadata-unmapped',\n 'AIWG concept metadata without a native full-v1 field was omitted.', {\n component: 'skos_concepts', record_id: sourceId, source_state: 'value', action: 'omit',\n destination_capability: 'native-skos-fields', reason: unmappedConceptMetadata.join(','),\n })\n rows.get('skos_concepts')!.push({\n id, primary_scheme_id: schemeId, uri: safeUri(concept.uri),\n notation: concept.notation ?? sourceId, facet_type: null, facet_source: 'aiwg-index',\n facet_domain: typeof concept.metadata?.domain === 'string' ? concept.metadata.domain : null,\n facet_scope: null, status: 'candidate', promoted_at: null, deprecated_at: null,\n deprecation_reason: null, replaced_by_id: null, note_count: memberCount,\n first_used_at: memberCount ? exportedAt : null, last_used_at: memberCount ? exportedAt : null,\n depth: 0, broader_count: 0, narrower_count: 0, related_count: 0,\n antipatterns: null, antipattern_checked_at: null, created_at: exportedAt,\n updated_at: exportedAt, embedding: null, embedding_model: null, embedded_at: null,\n })\n rows.get('skos_scheme_memberships')!.push({\n concept_id: id, scheme_id: schemeId, is_top_concept: true, added_at: exportedAt,\n })\n rows.get('skos_labels')!.push({\n id: uuid('skos-label', `${sourceId}:pref:${concept.prefLabel}`), concept_id: id,\n label_type: 'pref_label', value: concept.prefLabel, language: 'und', created_at: exportedAt,\n })\n for (const label of concept.altLabels ?? []) rows.get('skos_labels')!.push({\n id: uuid('skos-label', `${sourceId}:alt:${label}`), concept_id: id,\n label_type: 'alt_label', value: label, language: 'und', created_at: exportedAt,\n })\n if (concept.definition !== undefined) rows.get('skos_notes')!.push({\n id: uuid('skos-note', `${sourceId}:definition`), concept_id: id,\n note_type: 'definition', value: concept.definition, language: 'und', author: null,\n source: concept.uri ?? null, created_at: exportedAt, updated_at: exportedAt,\n })\n }\n for (const record of records) {\n for (const [position, sourceId] of record.concepts.entries()) {\n const conceptId = conceptIds.get(sourceId)\n if (conceptId) rows.get('note_skos_tags')!.push({\n note_id: noteIds.get(record.id)!, concept_id: conceptId, source: 'aiwg-index',\n confidence: null, relevance_score: null, is_primary: position === 0,\n created_at: new Date(record.updated_at).toISOString(), created_by: 'aiwg-index',\n })\n }\n for (const relation of record.skos_relations ?? []) {\n const subject = conceptIds.get(relation.source_id)\n const object = conceptIds.get(relation.target_id)\n if (!subject || !object || !['broader', 'narrower', 'related'].includes(relation.type)) {\n addLoss(losses, 'aiwg-skos-relation-unrepresentable',\n 'SKOS relation could not be mapped to the native full-v1 relation enum.', {\n component: 'skos_relations', record_id: record.id,\n destination_capability: 'broader-narrower-related', action: 'omit',\n })\n continue\n }\n const unmappedRelationFields = [\n relation.source_path !== undefined ? 'source_path' : null,\n relation.metadata !== undefined ? 'metadata' : null,\n ].filter((field): field is string => field !== null)\n if (unmappedRelationFields.length > 0) {\n addLoss(losses, 'aiwg-skos-relation-fields-unmapped',\n 'AIWG SKOS relation fields have no native full-v1 destination fields.', {\n component: 'skos_relations', record_id: record.id,\n source_state: 'value', destination_capability: 'native-skos-relation-fields',\n action: 'omit', reason: unmappedRelationFields.join(','),\n })\n continue\n }\n rows.get('skos_relations')!.push({\n id: uuid('skos-relation', `${relation.source_id}:${relation.type}:${relation.target_id}`),\n subject_id: subject, object_id: object, relation_type: relation.type,\n inference_score: null, is_inferred: false, is_validated: false,\n created_at: new Date(record.updated_at).toISOString(), created_by: 'aiwg-index',\n })\n }\n }\n\n for (const record of records) {\n for (const [position, event] of (record.provenance_events ?? []).entries()) {\n const start = timestamp(event.started_at)\n if (!start) addLoss(losses, 'aiwg-provenance-start-unavailable',\n 'Activity start defaulted to record updated_at.', {\n component: 'provenance_activities', record_id: event.id ?? `${record.id}:${position}`,\n field_path: '/started_at', source_state: 'absent', action: 'default',\n })\n rows.get('provenance_activities')!.push({\n id: uuid('provenance-event', event.id ?? `${record.id}:${position}`),\n note_id: noteIds.get(record.id)!, revision_id: null, activity_type: event.activity,\n model_name: event.agent ?? null, started_at: start ?? new Date(record.updated_at).toISOString(),\n ended_at: timestamp(event.ended_at) ?? null,\n metadata: { source: event.source ?? null, path: event.path ?? null,\n confidence: event.confidence ?? null, privacy: event.privacy ?? null,\n attributes: event.attributes ?? null },\n })\n }\n for (const [position, provenance] of record.provenance.entries()) {\n rows.get('provenance_activities')!.push({\n id: uuid('provenance-field', `${record.id}:${position}:${provenance.field}`),\n note_id: noteIds.get(record.id)!, revision_id: null,\n activity_type: `source:${provenance.field}`, model_name: provenance.source,\n started_at: new Date(record.updated_at).toISOString(), ended_at: null,\n metadata: { path: provenance.path, confidence: provenance.confidence, privacy: provenance.privacy },\n })\n }\n }\n\n const embeddingGroups = new Map<string, { config: string; set: string; count: number }>()\n for (const record of records) {\n for (const [position, embedding] of (record.embeddings ?? []).entries()) {\n const vector = embedding.embedding ?? embedding.vector\n if (!vector || vector.length !== 768) {\n addLoss(losses, 'aiwg-embedding-dimension-unrepresentable',\n 'Only 768-dimensional vectors satisfy the full-v1 authority.', {\n component: 'embeddings', record_id: embedding.id ?? `${record.id}:${position}`,\n field_path: '/vector', source_state: vector ? 'value' : 'absent',\n destination_capability: '768-dimensional-vector', action: 'omit',\n })\n continue\n }\n const model = embedding.model ?? 'aiwg-unknown'\n if (!embedding.model) addLoss(losses, 'aiwg-embedding-model-unavailable',\n 'Embedding model defaulted because AIWG did not supply one.', {\n component: 'embeddings', record_id: embedding.id ?? `${record.id}:${position}`,\n field_path: '/model', source_state: 'absent', action: 'default',\n })\n let group = embeddingGroups.get(model)\n if (!group) {\n group = { config: uuid('embedding-config', model), set: uuid('embedding-set', model), count: 0 }\n embeddingGroups.set(model, group)\n }\n group.count += 1\n const unmappedEmbeddingFields = [\n embedding.granularity !== undefined ? 'granularity' : null,\n embedding.source_path !== undefined ? 'source_path' : null,\n embedding.metadata !== undefined ? 'metadata' : null,\n embedding.input_hash !== undefined && !/^[0-9a-f]{64}$/.test(embedding.input_hash)\n ? 'input_hash' : null,\n ].filter((field): field is string => field !== null)\n if (unmappedEmbeddingFields.length > 0) addLoss(losses, 'aiwg-embedding-fields-unmapped',\n 'AIWG embedding fields without a native full-v1 field were omitted.', {\n component: 'embeddings', record_id: embedding.id ?? `${record.id}:${position}`,\n source_state: 'value', action: 'omit', destination_capability: 'native-embedding-fields',\n reason: unmappedEmbeddingFields.join(','),\n })\n rows.get('embeddings')!.push({\n id: uuid('embedding', embedding.id ?? `${record.id}:${position}`),\n note_id: noteIds.get(record.id)!, embedding_set_id: group.set, chunk_index: position,\n text: record.text ?? '', vector, model,\n contract_fingerprint: /^[0-9a-f]{64}$/.test(embedding.input_hash ?? '') ? embedding.input_hash : null,\n created_at: new Date(record.updated_at).toISOString(),\n })\n }\n }\n for (const [model, group] of [...embeddingGroups].sort(([a], [b]) => a.localeCompare(b))) {\n rows.get('embedding_configs')!.push({\n id: group.config, name: model, description: null, model, dimension: 768,\n chunk_size: 1, chunk_overlap: 0, hnsw_m: null, hnsw_ef_construction: null,\n ivfflat_lists: null, is_default: null, supports_mrl: null, matryoshka_dims: null,\n default_truncate_dim: null, provider: null, provider_config: null, content_types: null,\n strengths: null, limitations: null, recommended_for: null, benchmark_scores: null,\n is_available: null, document_composition: {}, created_at: exportedAt, updated_at: exportedAt,\n })\n rows.get('embedding_sets')!.push({\n id: group.set, name: model, slug: uuid('embedding-slug', model), description: null,\n purpose: null, usage_hints: null, keywords: null, set_type: 'full', mode: 'manual',\n criteria: null, embedding_config_id: group.config, truncate_dim: null,\n auto_embed_rules: null, index_status: 'ready', index_type: null,\n last_indexed_at: exportedAt, document_count: null, embedding_count: group.count,\n embeddings_current: true, index_size_bytes: null, is_system: false, is_active: true,\n auto_refresh: false, refresh_interval: null, last_refresh_at: null, agent_metadata: null,\n created_at: exportedAt, updated_at: exportedAt, created_by: 'aiwg-index',\n })\n const noteIdSet = new Set(rows.get('embeddings')!\n .filter((item) => item.embedding_set_id === group.set).map((item) => item.note_id as string))\n for (const noteId of [...noteIdSet].sort()) rows.get('embedding_set_members')!.push({\n embedding_set_id: group.set, note_id: noteId, membership_type: 'materialized',\n added_at: exportedAt, added_by: 'aiwg-index',\n })\n }\n\n if (losses.length > 0) {\n return {\n success: false,\n archive: null,\n profile: 'full-v1',\n schema_version: '2.0.0',\n lossless: false,\n losses,\n receipt: {\n schema_version: 'fortemi.aiwg-full-v1-conversion-receipt.v1',\n source_schema_version: 'aiwg.fortemi.index.export.v2',\n authority_repository: authorityReceipt.source.repository,\n authority_commit: authorityReceipt.source.commit,\n authority_contract_sha256: authorityReceipt.source.contractSha256,\n authority_schema_bundle_sha256: authorityReceipt.schemaBundle.sha256,\n manifest_sha256: null,\n component_checksums: {},\n contract_valid: false,\n signed: false,\n },\n }\n }\n\n const files = new Map<string, Uint8Array>()\n const components = Object.keys(FULL_V1_COMPONENT_FILES) as ShardComponent[]\n const counts: ShardManifest['counts'] = { community_sets: 0 }\n for (const component of components) {\n const spec = FULL_V1_COMPONENT_FILES[component]\n const componentRows = rows.get(component) ?? []\n files.set(spec.file, encode(componentRows, spec.encoding))\n counts[component] = componentRows.length\n }\n const checksums: Record<string, string> = {}\n for (const [file, bytes] of files) checksums[file] = await sha256Hex(bytes)\n const manifest: ShardManifest = {\n version: '2.0.0', profile: 'full-v1',\n producer: { name: 'fortemi-core-aiwg-index', version: options.matricVersion ?? 'fortemi-core' },\n format: SHARD_FORMAT, created_at: exportedAt, components, counts, checksums,\n min_reader_version: '2.0.0',\n }\n const manifestBytes = encoder.encode(JSON.stringify(manifest, null, 2))\n files.set('manifest.json', manifestBytes)\n const validation = await validateFullV1ShardArchive(files)\n if (!validation.valid) {\n throw new Error(`Generated AIWG full-v1 shard failed authority validation: ${validation.errors.join('; ')}`)\n }\n return {\n success: true,\n archive: packTarGz(files), profile: 'full-v1', schema_version: '2.0.0',\n lossless: losses.length === 0, losses,\n receipt: {\n schema_version: 'fortemi.aiwg-full-v1-conversion-receipt.v1',\n source_schema_version: 'aiwg.fortemi.index.export.v2',\n authority_repository: authorityReceipt.source.repository,\n authority_commit: authorityReceipt.source.commit,\n authority_contract_sha256: authorityReceipt.source.contractSha256,\n authority_schema_bundle_sha256: authorityReceipt.schemaBundle.sha256,\n manifest_sha256: await sha256Hex(manifestBytes), component_checksums: checksums,\n contract_valid: true, signed: false,\n },\n }\n}\n","import type { AiwgFortemiIndexExport, AiwgFortemiRecord } from './aiwg-index.js'\nimport { validateAiwgFortemiIndexExport } from './aiwg-index.js'\nimport { validateAiwgFortemiIndexExportSchema } from './aiwg-index-schema.js'\nimport { sha256Hex as shardSha256Hex } from './shard/checksum.js'\nimport { validateCoreV1ShardArchive } from './shard/schema-validator.js'\nimport { packTarGz, unpackTarGz } from './shard/shard-tar.js'\nimport {\n CURRENT_SHARD_VERSION,\n SHARD_FORMAT,\n type ShardCollection,\n type ShardComponent,\n type ShardLink,\n type ShardManifest,\n type ShardNote,\n} from './shard/types.js'\nimport { v5 as uuidv5 } from 'uuid'\nimport {\n convertAiwgIndexToFullV1,\n type AiwgFullV1ConversionResult,\n} from './aiwg-index-full-shard.js'\n\nexport interface AiwgKnowledgeShardOptions {\n createdAt?: string\n matricVersion?: string\n /** Use the report-bearing entry point for rich conversion. */\n includeNativeRichComponents?: boolean\n}\n\nexport type AiwgKnowledgeShardConversionResult = AiwgFullV1ConversionResult\n\nconst AIWG_SHARD_UUID_NAMESPACE = '7ab5d1f8-29d2-5e35-9e2f-3a45de171a9e'\nconst shardEncoder = new TextEncoder()\nconst shardDecoder = new TextDecoder()\n\nfunction aiwgShardUuid(kind: string, id: string): string {\n return uuidv5(`${kind}:${id}`, AIWG_SHARD_UUID_NAMESPACE)\n}\n\nfunction aiwgShardTimestamp(value: string | undefined, fallback: string): string {\n if (!value || Number.isNaN(Date.parse(value))) return fallback\n return new Date(value).toISOString()\n}\n\nfunction aiwgRecordTitle(record: AiwgFortemiRecord): string {\n return record.title ?? record.search?.title ?? record.search?.name ?? record.id\n}\n\nfunction aiwgRecordContent(record: AiwgFortemiRecord): string {\n if (record.text) return record.text\n if (record.search?.body) return record.search.body\n const chunks = record.chunks\n ?.map((chunk) => chunk.text ?? chunk.body ?? chunk.summary ?? '')\n .filter(Boolean)\n if (chunks?.length) return chunks.join('\\n\\n')\n return record.search?.summary ?? ''\n}\n\nfunction aiwgRecordCollectionPaths(record: AiwgFortemiRecord): string[] {\n const segments = record.source.repo_relative_path\n .split('/')\n .filter((segment) => segment.length > 0 && segment !== '.')\n const directorySegments = segments.slice(0, -1)\n return directorySegments.map((_, index) => directorySegments.slice(0, index + 1).join('/'))\n}\n\nfunction aiwgShardMetadata(\n index: AiwgFortemiIndexExport,\n record: AiwgFortemiRecord,\n): Record<string, unknown> {\n return {\n aiwg_fortemi_index: {\n envelope: {\n schema_version: index.schema_version,\n generated_at: index.generated_at,\n source: index.source,\n ...(index.compatibility ? { compatibility: index.compatibility } : {}),\n },\n record,\n },\n }\n}\n\nfunction encodeJsonLines(values: unknown[]): Uint8Array {\n return shardEncoder.encode(values.map((value) => JSON.stringify(value)).join('\\n'))\n}\n\nfunction validateAiwgIndexForShard(index: AiwgFortemiIndexExport): void {\n const contractValidation = validateAiwgFortemiIndexExportSchema(index)\n const semanticValidation = validateAiwgFortemiIndexExport(index)\n const errors = [...contractValidation.errors, ...semanticValidation.errors]\n if (errors.length > 0) {\n throw new Error(`Invalid AIWG Fortemi index export:\\n${errors.join('\\n')}`)\n }\n}\n\n/**\n * Convert the static AIWG/Fortemi v2 index contract into a portable Knowledge\n * Shard. Every note retains the complete source envelope and record in metadata,\n * so the native note/link/SKOS/provenance projections are reversible.\n */\nexport async function aiwgFortemiIndexToKnowledgeShard(\n index: AiwgFortemiIndexExport,\n options: AiwgKnowledgeShardOptions = {},\n): Promise<Uint8Array> {\n if (options.includeNativeRichComponents) {\n throw new Error(\n 'Native AIWG full-v1 conversion requires aiwgFortemiIndexToKnowledgeShardWithReport so semantic losses cannot be discarded',\n )\n }\n validateAiwgIndexForShard(index)\n if (index.schema_version !== 'aiwg.fortemi.index.export.v2') {\n throw new Error('Knowledge Shard conversion requires aiwg.fortemi.index.export.v2')\n }\n const createdAt = aiwgShardTimestamp(options.createdAt ?? index.generated_at, new Date().toISOString())\n const noteIds = new Map(index.items.map((record) => [record.id, aiwgShardUuid('record', record.id)]))\n const collectionPaths = [...new Set(index.items.flatMap(aiwgRecordCollectionPaths))].sort()\n const collectionIds = new Map(\n collectionPaths.map((path) => [path, aiwgShardUuid('collection', path)]),\n )\n const collectionNoteCounts = new Map<string, number>()\n for (const record of index.items) {\n const collectionPath = aiwgRecordCollectionPaths(record).at(-1)\n if (collectionPath) {\n collectionNoteCounts.set(collectionPath, (collectionNoteCounts.get(collectionPath) ?? 0) + 1)\n }\n }\n const collections: ShardCollection[] = collectionPaths.map((path) => {\n const segments = path.split('/')\n const parentPath = segments.slice(0, -1).join('/')\n return {\n id: collectionIds.get(path)!,\n name: segments.at(-1)!,\n description: null,\n parent_id: parentPath ? collectionIds.get(parentPath)! : null,\n created_at: createdAt,\n note_count: collectionNoteCounts.get(path) ?? 0,\n }\n })\n const notes: ShardNote[] = index.items.map((record) => {\n const content = aiwgRecordContent(record)\n const recordCollectionPaths = aiwgRecordCollectionPaths(record)\n const collectionPath = recordCollectionPaths.at(-1)\n return {\n id: noteIds.get(record.id)!,\n title: aiwgRecordTitle(record),\n original_content: content,\n revised_content: content,\n metadata: aiwgShardMetadata(index, record),\n collection_id: collectionPath ? collectionIds.get(collectionPath)! : null,\n attachments: [],\n format: 'markdown',\n source: 'aiwg-index',\n starred: false,\n archived: false,\n tags: [...new Set(record.tags)].sort(),\n created_at: aiwgShardTimestamp(record.source.updated_at ?? record.updated_at, createdAt),\n updated_at: aiwgShardTimestamp(record.updated_at, createdAt),\n deleted_at: record.state_transfer?.deleted_at ?? null,\n }\n })\n\n const links: ShardLink[] = []\n for (const record of index.items) {\n for (const [position, relationship] of record.relationships.entries()) {\n const targetNoteId = noteIds.get(relationship.target_id) ?? null\n links.push({\n id: aiwgShardUuid(\n 'relationship',\n `${record.id}\\u0000${position}\\u0000${relationship.type}\\u0000${relationship.target_id}`,\n ),\n from_note_id: noteIds.get(record.id)!,\n to_note_id: targetNoteId,\n to_url: targetNoteId ? null : `aiwg://record/${encodeURIComponent(relationship.target_id)}`,\n kind: relationship.type,\n score: relationship.confidence ?? 1,\n created_at: aiwgShardTimestamp(record.updated_at, createdAt),\n metadata: {\n aiwg_fortemi_index: {\n source_record_id: record.id,\n target_record_id: relationship.target_id,\n relationship,\n },\n },\n })\n }\n }\n\n const files = new Map<string, Uint8Array>()\n const components: ShardComponent[] = ['notes']\n const counts: ShardManifest['counts'] = {\n notes: notes.length,\n }\n files.set('notes.jsonl', encodeJsonLines(notes))\n\n const addComponent = (\n component: ShardComponent,\n filename: string,\n values: unknown[],\n jsonLines = true,\n ) => {\n if (values.length === 0) return\n components.push(component)\n counts[component] = values.length\n files.set(filename, jsonLines ? encodeJsonLines(values) : shardEncoder.encode(JSON.stringify(values)))\n }\n addComponent('collections', 'collections.json', collections, false)\n const tags = [...new Set(notes.flatMap((note) => note.tags))]\n .sort()\n .map((name) => ({ name, created_at: createdAt }))\n components.push('tags')\n counts.tags = tags.length\n files.set('tags.json', shardEncoder.encode(JSON.stringify(tags)))\n addComponent('links', 'links.jsonl', links)\n\n const checksums: Record<string, string> = {}\n for (const [filename, bytes] of files) checksums[filename] = await shardSha256Hex(bytes)\n const manifest: ShardManifest = {\n version: CURRENT_SHARD_VERSION,\n profile: 'core-v1',\n producer: {\n name: 'fortemi-core-aiwg-index',\n version: options.matricVersion ?? 'fortemi-core',\n },\n format: SHARD_FORMAT,\n created_at: createdAt,\n components,\n counts: {\n notes: 0,\n collections: 0,\n tags: 0,\n templates: 0,\n links: 0,\n embedding_sets: 0,\n embedding_set_members: 0,\n embeddings: 0,\n embedding_configs: 0,\n ...counts,\n },\n checksums,\n min_reader_version: CURRENT_SHARD_VERSION,\n }\n files.set('manifest.json', shardEncoder.encode(JSON.stringify(manifest, null, 2)))\n const contractValidation = await validateCoreV1ShardArchive(files)\n if (!contractValidation.valid) {\n throw new Error(\n `Generated AIWG core-v1 shard failed canonical validation: ${contractValidation.errors.join('; ')}`,\n )\n }\n return packTarGz(files)\n}\n\n/** Convert AIWG v2 into exact 2.0.0/full-v1 with mandatory loss evidence. */\nexport async function aiwgFortemiIndexToKnowledgeShardWithReport(\n index: AiwgFortemiIndexExport,\n options: Omit<AiwgKnowledgeShardOptions, 'includeNativeRichComponents'> = {},\n): Promise<AiwgKnowledgeShardConversionResult> {\n validateAiwgIndexForShard(index)\n if (index.schema_version !== 'aiwg.fortemi.index.export.v2') {\n throw new Error('Full-v1 Knowledge Shard conversion requires aiwg.fortemi.index.export.v2')\n }\n return convertAiwgIndexToFullV1(index, options)\n}\n\n/**\n * Recover the exact AIWG index envelope and records embedded by\n * {@link aiwgFortemiIndexToKnowledgeShard}.\n */\nexport function aiwgFortemiIndexFromKnowledgeShard(bytes: Uint8Array): AiwgFortemiIndexExport {\n const files = unpackTarGz(bytes)\n const noteBytes = files.get('notes.jsonl')\n const notes = (noteBytes ? shardDecoder.decode(noteBytes) : '')\n .split('\\n')\n .filter(Boolean)\n .map((line) => JSON.parse(line) as ShardNote)\n if (notes.length === 0) throw new Error('Knowledge Shard contains no AIWG index notes')\n\n let envelope: Record<string, unknown> | undefined\n const items: AiwgFortemiRecord[] = []\n for (const note of notes) {\n const metadata = (\n note.metadata\n && typeof note.metadata === 'object'\n && !Array.isArray(note.metadata)\n )\n ? (note.metadata as Record<string, unknown>).aiwg_fortemi_index\n : undefined\n if (!metadata || typeof metadata !== 'object' || Array.isArray(metadata)) {\n throw new Error(`Knowledge Shard note ${note.id} has no AIWG index metadata`)\n }\n const value = metadata as Record<string, unknown>\n envelope ??= value.envelope as Record<string, unknown>\n items.push(value.record as AiwgFortemiRecord)\n }\n const restored = {\n ...envelope,\n items: items.sort((left, right) => left.id.localeCompare(right.id)),\n } as unknown as AiwgFortemiIndexExport\n const validation = validateAiwgFortemiIndexExport(restored)\n if (!validation.valid) {\n throw new Error(`Knowledge Shard contains invalid AIWG index metadata:\\n${validation.errors.join('\\n')}`)\n }\n return restored\n}\n"]}
|