@fortemi/core 2026.7.4 → 2026.7.5

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/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { PGlite } from '@electric-sql/pglite';
2
- import { S as ShardAttachmentProjection, a as ShardCollection, b as ShardEmbeddingConfig, c as ShardEmbedding, d as ShardEmbeddingSet, e as ShardEmbeddingSetMember, f as ShardLink, g as ShardNote, h as ShardNoteSkosTag, i as ShardProvenanceEdge, j as ShardSkosConcept, k as ShardSkosRelation, l as ShardSkosScheme, m as ShardTag, n as ShardTemplate, o as ShardManifest, B as BlobStore, E as ExportOptions, I as ImportOptions, p as ImportResult, q as ShardComponent } from './aiwg-index-C2G7iy-b.js';
3
- export { A as AIWG_SCAN_REQUIRED_FIELDS, r as AiwgChunkedIndexBuildOptions, s as AiwgChunkedIndexBuildResult, t as AiwgChunkedIndexDetailLoader, u as AiwgChunkedIndexLoadOptions, v as AiwgChunkedIndexLoader, w as AiwgChunkedIndexProgress, x as AiwgChunkedIndexProgressPhase, y as AiwgChunkedIndexQueryOptions, z as AiwgChunkedIndexQueryResult, C as AiwgChunkedIndexValidationResult, D as AiwgFortemiAttachmentReference, F as AiwgFortemiBinarySource, G as AiwgFortemiChunk, H as AiwgFortemiChunkDetailRef, J as AiwgFortemiChunkManifest, K as AiwgFortemiChunkPart, L as AiwgFortemiChunkPartRef, M as AiwgFortemiIndexExport, N as AiwgFortemiIndexExportSchemaVersion, O as AiwgFortemiProjectedRecord, P as AiwgFortemiProvenance, Q as AiwgFortemiProvenanceEvent, R as AiwgFortemiRecord, T as AiwgFortemiRecordEmbedding, U as AiwgFortemiRecordSchemaVersion, V as AiwgFortemiRecordSource, W as AiwgFortemiRecordType, X as AiwgFortemiRelationship, Y as AiwgFortemiRelationshipDirection, Z as AiwgFortemiSearchProjection, _ as AiwgFortemiSkosConcept, $ as AiwgFortemiSkosRelation, a0 as AiwgFortemiSkosRelationType, a1 as AiwgHeadlessEmbeddingBackend, a2 as AiwgIndexController, a3 as AiwgIndexControllerListener, a4 as AiwgIndexControllerSnapshot, a5 as AiwgIndexGraphOptions, a6 as AiwgIndexQueryMatch, a7 as AiwgIndexQueryOptions, a8 as AiwgIndexQueryRankedItem, a9 as AiwgIndexQueryResult, aa as AiwgIndexQueryWeights, ab as AiwgIndexValidationResult, ac as AiwgPrivacyClassification, ad as AiwgPrivacyFilterOptions, ae as AiwgProvenanceConfidence, af as AiwgRelationshipDirection, ag as AiwgRelationshipEdgeSummary, ah as AiwgRelationshipNodeSummary, ai as AiwgRelationshipQueryOptions, aj as AiwgRelationshipSetOperation, ak as AiwgRelationshipSetOptions, al as AiwgRelationshipSetResult, am as AiwgRelationshipTraversalOptions, an as AiwgRelationshipTraversalResult, ao as AiwgReviewAction, ap as AiwgReviewDecision, aq as AiwgReviewDecisionExport, ar as AiwgReviewInput, as as AiwgStaticDuplicatePair, at as AiwgStaticEmbeddingRecord, au as AiwgStaticEmbeddingSet, av as AiwgStaticHybridQueryOptions, aw as AiwgStaticSemanticQueryOptions, ax as AiwgStaticSemanticResult, ay as BuildAiwgStaticEmbeddingSetOptions, az as CURRENT_SHARD_VERSION, aA as ConflictStrategy, aB as ImportCounts, aC as ImportProgress, aD as ImportProgressPhase, aE as MemoryBlobStore, aF as SHARD_FORMAT, aG as ShardClusterRef, aH as ShardLayout, aI as aiwgFortemiIndexToCommunityGraph, aJ as assertAiwgFortemiChunkManifest, aK as assertAiwgFortemiChunkPart, aL as assertAiwgFortemiIndexExport, aM as assertAiwgStaticEmbeddingSet, aN as buildAiwgChunkedIndex, aO as buildAiwgStaticEmbeddingSet, aP as createAiwgFetchChunkLoader, aQ as createAiwgFetchDetailLoader, aR as createAiwgIndexController, aS as createAiwgReviewDecisionExport, aT as createBlobStore, aU as filterAiwgRecordsByPrivacy, aV as findAiwgStaticDuplicatePairs, aW as getAiwgFortemiFacets, aX as queryAiwgFortemiIndex, aY as queryAiwgHybridIndex, aZ as queryAiwgSemanticIndex, a_ as validateAiwgFortemiChunkManifest, a$ as validateAiwgFortemiChunkPart, b0 as validateAiwgFortemiIndexExport, b1 as validateAiwgStaticEmbeddingSet } from './aiwg-index-C2G7iy-b.js';
4
2
  import { z, ZodType } from 'zod';
3
+ export { AiwgIndexSchemaValidationResult, getAiwgFortemiIndexExportSchema, validateAiwgFortemiIndexExportSchema, validateAiwgFortemiProjectedRecordSchema } from './aiwg-index-schema.js';
5
4
 
6
5
  /**
7
6
  * Generate a RFC 9562 UUIDv7 identifier.
@@ -390,6 +389,360 @@ declare class PGliteWorkerStorageBackendFactory implements StorageBackendFactory
390
389
  open(input: StorageOpenRequest): Promise<StorageBackend>;
391
390
  }
392
391
 
392
+ /**
393
+ * Content-addressable blob storage.
394
+ *
395
+ * Path format: blobs/{dir1}/{dir2}/{hash}
396
+ * dir1 = first 2 hex chars of hash
397
+ * dir2 = next 2 hex chars of hash
398
+ * filename = full hash
399
+ *
400
+ * Two implementations are provided:
401
+ * - OpfsBlobStore — Origin Private File System (Chrome/Edge 86+)
402
+ * - IdbBlobStore — IndexedDB fallback (Firefox, Safari)
403
+ *
404
+ * Use createBlobStore() to get the best available implementation.
405
+ * Export MemoryBlobStore for use in tests.
406
+ */
407
+ interface BlobStore {
408
+ write(hash: string, data: Uint8Array): Promise<void>;
409
+ read(hash: string): Promise<Uint8Array | null>;
410
+ remove(hash: string): Promise<void>;
411
+ exists(hash: string): Promise<boolean>;
412
+ }
413
+ declare class MemoryBlobStore implements BlobStore {
414
+ private store;
415
+ write(hash: string, data: Uint8Array): Promise<void>;
416
+ read(hash: string): Promise<Uint8Array | null>;
417
+ remove(hash: string): Promise<void>;
418
+ exists(hash: string): Promise<boolean>;
419
+ }
420
+ declare function createBlobStore(archiveName: string): BlobStore;
421
+
422
+ /**
423
+ * Shard format types — matches the fortemi server matric-shard specification.
424
+ *
425
+ * A shard is a gzip-compressed tar archive (.shard) containing serialized
426
+ * knowledge data with a manifest for integrity verification.
427
+ */
428
+
429
+ declare const CURRENT_SHARD_VERSION = "1.0.0";
430
+ declare const SHARD_FORMAT = "matric-shard";
431
+ /** Components that can appear in a shard archive. */
432
+ type ShardComponent = 'notes' | 'collections' | 'tags' | 'templates' | 'links' | 'embedding_sets' | 'embedding_configs' | 'embedding_set_members' | 'embeddings' | 'skos_schemes' | 'skos_concepts' | 'skos_relations' | 'note_skos_tags' | 'provenance_edges' | 'community_assignments' | 'communities' | 'graph_edges' | 'graph_sources';
433
+ interface ShardAttachmentReference {
434
+ id: string;
435
+ path: string;
436
+ mime: string | null;
437
+ checksum: string;
438
+ bytes: number;
439
+ }
440
+ interface ShardAttachmentProjection {
441
+ extracted_text: string | null;
442
+ attachment: ShardAttachmentReference;
443
+ }
444
+ /** @deprecated Legacy React shard field name. Server shards use `attachments`. */
445
+ type ShardBinarySource = ShardAttachmentProjection;
446
+ /**
447
+ * Reference to one cluster file of a component split across addressable files
448
+ * (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset` preserves deterministic
449
+ * component order; readers discover each cluster's size from its contents.
450
+ */
451
+ interface ShardClusterRef {
452
+ href: string;
453
+ offset: number;
454
+ }
455
+ /**
456
+ * Optional clustered layout (additive — absent on monolithic shards). When a
457
+ * component is present here, its records live in the listed cluster files instead
458
+ * of (or in addition to) the single `<component>.jsonl`. Both `importShard` and
459
+ * the in-place reader consume it; a monolithic shard omits `layout` entirely.
460
+ */
461
+ interface ShardLayout {
462
+ clusters?: Partial<Record<ShardComponent, ShardClusterRef[]>>;
463
+ }
464
+ interface ShardMigrationHistoryEntry {
465
+ from_version: string;
466
+ to_version: string;
467
+ migrated_at: string;
468
+ migrated_by: string;
469
+ changes: string[];
470
+ }
471
+ /** Manifest included in every shard as manifest.json. */
472
+ interface ShardManifest {
473
+ version: string;
474
+ matric_version: string;
475
+ format: typeof SHARD_FORMAT;
476
+ created_at: string;
477
+ components: ShardComponent[];
478
+ counts: Partial<Record<ShardComponent | 'community_sets', number>>;
479
+ checksums: Record<string, string>;
480
+ min_reader_version: string;
481
+ migrated_from?: string | null;
482
+ migration_history?: ShardMigrationHistoryEntry[];
483
+ /** Clustered component layout for partial fetch (issue #189). Absent → monolithic. */
484
+ layout?: ShardLayout;
485
+ }
486
+ /** Options for shard export. */
487
+ interface ExportOptions {
488
+ includeEmbeddings?: boolean;
489
+ /** Filter to specific collection (export only notes in this collection). */
490
+ collectionId?: string;
491
+ /** Filter to notes with this tag (e.g. 'app:research' for app-scoped export). */
492
+ tag?: string;
493
+ /** Export only these embedding sets and their member/vector rows. */
494
+ embeddingSetIds?: string[];
495
+ /** Preserve virtual selector materialization metadata and virtual member rows. */
496
+ includeMaterializedSelectors?: boolean;
497
+ /**
498
+ * When set to a positive integer, emit notes as clustered files
499
+ * (`notes/000.jsonl`, …) of this many records each, and record the layout in
500
+ * the manifest, so an in-place reader can fetch only the clusters it needs
501
+ * (issue #189). Absent → a single monolithic `notes.jsonl` (unchanged).
502
+ */
503
+ clusterNotesSize?: number;
504
+ /**
505
+ * Pack attachment bytes into a portable content-addressed `blobs/<hex>`
506
+ * sidecar (Fortemi/fortemi#1046), producing a self-contained shard whose
507
+ * attachments survive a round-trip (`getBlob()` returns real bytes on the
508
+ * importing host). Requires {@link blobStore}. Absent/false → reference-only
509
+ * (server default), which remains a valid shard.
510
+ */
511
+ includeBlobs?: boolean;
512
+ /**
513
+ * Byte source for the sidecar. Required when `includeBlobs` is set; attachment
514
+ * bytes are read by their `content_hash`. A blob the store cannot return is
515
+ * skipped (its attachment stays reference-only) rather than failing export.
516
+ */
517
+ blobStore?: BlobStore;
518
+ }
519
+ /** Conflict resolution strategy for shard import. */
520
+ type ConflictStrategy = 'skip' | 'replace' | 'error';
521
+ /** Options for shard import. */
522
+ interface ImportOptions {
523
+ conflictStrategy?: ConflictStrategy;
524
+ /** Rows processed between cooperative yields. Defaults to 250. */
525
+ batchSize?: number;
526
+ /** Progress callback for long-running import phases. */
527
+ onProgress?: (progress: ImportProgress) => void;
528
+ /**
529
+ * Destination for hydrating attachment bytes from a portable `blobs/<hex>`
530
+ * sidecar (Fortemi/fortemi#1046). When provided, sidecar entries whose bare
531
+ * hex matches an imported attachment's `content_hash` are written to this
532
+ * store after the import transaction commits, so `getBlob()` returns real
533
+ * bytes. Absent → attachments import as reference-only metadata (unchanged).
534
+ */
535
+ blobStore?: BlobStore;
536
+ }
537
+ type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'templates' | 'links' | 'provenance' | 'embedding_sets' | 'embedding_configs' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
538
+ interface ImportProgress {
539
+ phase: ImportProgressPhase;
540
+ done: number;
541
+ total: number;
542
+ }
543
+ /** Per-entity import counts. */
544
+ interface ImportCounts {
545
+ notes: number;
546
+ collections: number;
547
+ templates: number;
548
+ tags: number;
549
+ links: number;
550
+ embedding_sets: number;
551
+ embedding_configs: number;
552
+ embedding_set_members: number;
553
+ embeddings: number;
554
+ skos_schemes: number;
555
+ skos_concepts: number;
556
+ skos_relations: number;
557
+ note_skos_tags: number;
558
+ provenance_edges: number;
559
+ graph_sources: number;
560
+ graph_edges: number;
561
+ community_sets: number;
562
+ communities: number;
563
+ community_assignments: number;
564
+ }
565
+ /** Result of a shard import operation. */
566
+ interface ImportResult {
567
+ success: boolean;
568
+ counts: ImportCounts;
569
+ skipped: Partial<ImportCounts>;
570
+ warnings: string[];
571
+ errors: string[];
572
+ duration_ms: number;
573
+ }
574
+ /** Note as serialized in the shard JSONL. */
575
+ interface ShardNote {
576
+ id: string;
577
+ title: string | null;
578
+ original_content: string;
579
+ revised_content: string | null;
580
+ collection_id?: string | null;
581
+ attachments?: ShardAttachmentProjection[];
582
+ /** @deprecated Legacy React shard field name. Use `attachments`. */
583
+ binary_sources?: ShardBinarySource[];
584
+ format: string;
585
+ source: string;
586
+ starred: boolean;
587
+ archived: boolean;
588
+ tags: string[];
589
+ created_at: string;
590
+ updated_at: string;
591
+ deleted_at: string | null;
592
+ }
593
+ /** Collection as serialized in the shard JSON array. */
594
+ interface ShardCollection {
595
+ id: string;
596
+ name: string;
597
+ description: string | null;
598
+ parent_id: string | null;
599
+ created_at: string;
600
+ note_count?: number;
601
+ }
602
+ /** Tag as serialized in the shard JSON array. */
603
+ interface ShardTag {
604
+ name: string;
605
+ created_at: string;
606
+ }
607
+ /** Template as serialized in the shard JSON array. */
608
+ interface ShardTemplate {
609
+ id: string;
610
+ name: string;
611
+ description: string | null;
612
+ content: string;
613
+ format: string;
614
+ default_tags: string[];
615
+ collection_id: string | null;
616
+ created_at: string;
617
+ updated_at: string;
618
+ }
619
+ /** Link as serialized in the shard JSONL. */
620
+ interface ShardLink {
621
+ id: string;
622
+ from_note_id: string;
623
+ to_note_id: string | null;
624
+ to_url: string | null;
625
+ kind: string;
626
+ score: number | null;
627
+ created_at: string;
628
+ metadata: Record<string, unknown> | null;
629
+ }
630
+ /** Embedding set as serialized in the shard JSON array. */
631
+ interface ShardEmbeddingSet {
632
+ id: string;
633
+ name: string;
634
+ slug: string | null;
635
+ description: string | null;
636
+ purpose: string | null;
637
+ document_count: number;
638
+ embedding_count: number;
639
+ is_system: boolean;
640
+ keywords: string[];
641
+ model: string;
642
+ dimension: number;
643
+ kind?: 'physical' | 'filter' | 'virtual';
644
+ mode?: 'auto' | 'manual' | 'mixed' | null;
645
+ truncate_dimension?: number | null;
646
+ criteria?: Record<string, unknown> | null;
647
+ source?: Record<string, unknown> | null;
648
+ compatibility?: Record<string, unknown> | null;
649
+ materialization?: Record<string, unknown> | null;
650
+ freshness?: ShardArtifactFreshness | null;
651
+ created_at?: string;
652
+ updated_at?: string;
653
+ }
654
+ /** Embedding set member as serialized in the shard JSONL. */
655
+ interface ShardEmbeddingSetMember {
656
+ embedding_set_id: string;
657
+ note_id: string;
658
+ /** Legacy React shard field; new exports use server membership metadata instead. */
659
+ embedding_id?: string;
660
+ membership_type: string;
661
+ added_at: string;
662
+ added_by: string | null;
663
+ }
664
+ /** Embedding config as serialized in the shard JSON array. */
665
+ interface ShardEmbeddingConfig {
666
+ id: string;
667
+ name: string;
668
+ description: string | null;
669
+ model: string;
670
+ dimension: number;
671
+ chunk_size: number;
672
+ chunk_overlap: number;
673
+ is_default: boolean;
674
+ }
675
+ /** Embedding as serialized in the shard JSONL. */
676
+ interface ShardEmbedding {
677
+ id: string;
678
+ note_id: string;
679
+ chunk_index: number;
680
+ text: string;
681
+ vector: number[];
682
+ model: string;
683
+ /** React shard extension used to preserve local embedding-set scoping. */
684
+ embedding_set_id?: string;
685
+ /** React shard extension used to preserve local creation ordering. */
686
+ created_at?: string;
687
+ }
688
+ /** SKOS scheme as serialized in the shard JSON array. */
689
+ interface ShardSkosScheme {
690
+ id: string;
691
+ title: string;
692
+ description: string | null;
693
+ created_at: string;
694
+ updated_at: string;
695
+ }
696
+ /** SKOS concept as serialized in the shard JSON array. */
697
+ interface ShardSkosConcept {
698
+ id: string;
699
+ scheme_id: string;
700
+ pref_label: string;
701
+ alt_labels: string[];
702
+ definition: string | null;
703
+ created_at: string;
704
+ updated_at: string;
705
+ }
706
+ /** SKOS concept relation as serialized in the shard JSONL. */
707
+ interface ShardSkosRelation {
708
+ id: string;
709
+ source_concept_id: string;
710
+ target_concept_id: string;
711
+ relation_type: 'broader' | 'narrower' | 'related';
712
+ created_at: string;
713
+ }
714
+ /** Note-to-SKOS-concept assignment as serialized in the shard JSONL. */
715
+ interface ShardNoteSkosTag {
716
+ id: string;
717
+ note_id: string;
718
+ concept_id: string;
719
+ created_at: string;
720
+ }
721
+ /** Provenance edge as serialized in the shard JSONL. */
722
+ interface ShardProvenanceEdge {
723
+ id: string;
724
+ entity_type: string;
725
+ entity_id: string;
726
+ activity: string;
727
+ agent: string;
728
+ started_at: string;
729
+ ended_at: string | null;
730
+ attributes: Record<string, unknown> | null;
731
+ }
732
+ interface ShardArtifactFreshness {
733
+ status: 'fresh' | 'stale' | 'unknown';
734
+ checked_at?: string;
735
+ stale_reason?: string;
736
+ source_hashes?: {
737
+ notes?: string;
738
+ links?: string;
739
+ embeddings?: string;
740
+ embedding_set_members?: string;
741
+ virtual_set_definition?: string;
742
+ parameters?: string;
743
+ };
744
+ }
745
+
393
746
  /**
394
747
  * LinksRepository — bidirectional note link management.
395
748
  *
@@ -3708,14 +4061,473 @@ declare function getPrefetchedSha256(url: string): string | undefined;
3708
4061
  */
3709
4062
  declare function clearPrefetchedShard(url?: string): void;
3710
4063
 
3711
- interface AiwgIndexSchemaValidationResult {
4064
+ type AiwgFortemiRecordType = string;
4065
+ type AiwgFortemiRecordSchemaVersion = 'aiwg.fortemi.index.record.v1' | 'aiwg.fortemi.index.record.v2';
4066
+ type AiwgFortemiIndexExportSchemaVersion = 'aiwg.fortemi.index.export.v1' | 'aiwg.fortemi.index.export.v2';
4067
+ type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public';
4068
+ type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected';
4069
+ type AiwgReviewAction = 'accept' | 'reject' | 'defer';
4070
+ type AiwgFortemiRelationshipDirection = 'upstream' | 'downstream' | 'related';
4071
+ interface AiwgFortemiRecordSource {
4072
+ path: string;
4073
+ repo_relative_path: string;
4074
+ locator: string;
4075
+ origin?: string;
4076
+ generated?: boolean;
4077
+ checksum?: string;
4078
+ updated_at?: string;
4079
+ }
4080
+ interface AiwgFortemiRelationship {
4081
+ type: string;
4082
+ target_id: string;
4083
+ source_path?: string;
4084
+ target_path?: string;
4085
+ direction?: AiwgFortemiRelationshipDirection;
4086
+ label?: string;
4087
+ confidence?: number;
4088
+ privacy?: AiwgPrivacyClassification;
4089
+ metadata?: Record<string, unknown>;
4090
+ }
4091
+ interface AiwgFortemiProvenance {
4092
+ field: string;
4093
+ source: string;
4094
+ path: string;
4095
+ confidence: AiwgProvenanceConfidence;
4096
+ privacy: AiwgPrivacyClassification;
4097
+ }
4098
+ type AiwgFortemiSkosRelationType = 'broader' | 'narrower' | 'related' | string;
4099
+ interface AiwgFortemiSkosConcept {
4100
+ id: string;
4101
+ prefLabel: string;
4102
+ definition?: string;
4103
+ scheme?: string;
4104
+ notation?: string;
4105
+ uri?: string;
4106
+ altLabels?: string[];
4107
+ metadata?: Record<string, unknown>;
4108
+ }
4109
+ interface AiwgFortemiSkosRelation {
4110
+ type: AiwgFortemiSkosRelationType;
4111
+ source_id: string;
4112
+ target_id: string;
4113
+ source_path?: string;
4114
+ metadata?: Record<string, unknown>;
4115
+ }
4116
+ interface AiwgFortemiProvenanceEvent {
4117
+ id?: string;
4118
+ activity: string;
4119
+ agent?: string;
4120
+ started_at?: string;
4121
+ ended_at?: string;
4122
+ source?: string;
4123
+ path?: string;
4124
+ confidence?: AiwgProvenanceConfidence;
4125
+ privacy?: AiwgPrivacyClassification;
4126
+ attributes?: Record<string, unknown>;
4127
+ }
4128
+ interface AiwgFortemiSearchProjection {
4129
+ title?: string;
4130
+ name?: string;
4131
+ summary?: string;
4132
+ body?: string;
4133
+ triggers?: string[];
4134
+ aliases?: string[];
4135
+ capability?: string;
4136
+ tags?: string[];
4137
+ phase?: string;
4138
+ type?: string;
4139
+ frontmatter?: Record<string, unknown>;
4140
+ }
4141
+ interface AiwgFortemiChunk {
4142
+ id?: string;
4143
+ text?: string;
4144
+ body?: string;
4145
+ summary?: string;
4146
+ source_path?: string;
4147
+ metadata?: Record<string, unknown>;
4148
+ }
4149
+ interface AiwgFortemiRecordEmbedding {
4150
+ id?: string;
4151
+ embedding?: number[];
4152
+ vector?: number[];
4153
+ model?: string;
4154
+ granularity?: string;
4155
+ input_hash?: string;
4156
+ source_path?: string;
4157
+ metadata?: Record<string, unknown>;
4158
+ }
4159
+ type AiwgFortemiAttachmentReference = ShardAttachmentReference;
4160
+ type AiwgFortemiBinarySource = ShardBinarySource;
4161
+ interface AiwgFortemiRecord {
4162
+ schema_version: AiwgFortemiRecordSchemaVersion;
4163
+ id: string;
4164
+ type: AiwgFortemiRecordType;
4165
+ source: AiwgFortemiRecordSource;
4166
+ title?: string;
4167
+ text?: string;
4168
+ facets: Record<string, string[]>;
4169
+ tags: string[];
4170
+ concepts: string[];
4171
+ relationships: AiwgFortemiRelationship[];
4172
+ provenance: AiwgFortemiProvenance[];
4173
+ search?: AiwgFortemiSearchProjection;
4174
+ chunks?: AiwgFortemiChunk[];
4175
+ binary_sources?: AiwgFortemiBinarySource[];
4176
+ embeddings?: AiwgFortemiRecordEmbedding[];
4177
+ compatibility?: Record<string, unknown>;
4178
+ /** Optional rich SKOS metadata for static consumers that need labels/definitions without opening a shard. */
4179
+ skos_concepts?: AiwgFortemiSkosConcept[];
4180
+ /** Optional SKOS relationship edges among concepts referenced by this record. */
4181
+ skos_relations?: AiwgFortemiSkosRelation[];
4182
+ /** Optional W3C PROV-style activity chain for this record. */
4183
+ provenance_events?: AiwgFortemiProvenanceEvent[];
4184
+ privacy: {
4185
+ classification: AiwgPrivacyClassification;
4186
+ pii: boolean;
4187
+ locality?: string;
4188
+ };
4189
+ updated_at: string;
4190
+ }
4191
+ interface AiwgFortemiIndexExport {
4192
+ schema_version: AiwgFortemiIndexExportSchemaVersion;
4193
+ generated_at: string;
4194
+ source: {
4195
+ repo: string;
4196
+ privacy: AiwgPrivacyClassification;
4197
+ graph?: string;
4198
+ };
4199
+ items: AiwgFortemiRecord[];
4200
+ compatibility?: {
4201
+ previous_schema_version: 'aiwg.fortemi.index.export.v1';
4202
+ strategy: 'supported';
4203
+ };
4204
+ }
4205
+ interface AiwgFortemiChunkPartRef {
4206
+ href: string;
4207
+ offset: number;
4208
+ count: number;
4209
+ }
4210
+ declare const AIWG_SCAN_REQUIRED_FIELDS: Array<keyof AiwgFortemiRecord>;
4211
+ type AiwgFortemiProjectedRecord = Pick<AiwgFortemiRecord, 'schema_version' | 'id' | 'type' | 'title' | 'text' | 'facets' | 'tags' | 'concepts' | 'privacy'> & Partial<AiwgFortemiRecord>;
4212
+ type AiwgDetailIdEncoding = 'uri' | 'base64url';
4213
+ interface AiwgFortemiChunkDetailRef {
4214
+ href: string;
4215
+ encoding?: AiwgDetailIdEncoding;
4216
+ }
4217
+ interface AiwgFortemiChunkManifest {
4218
+ schema_version: 'aiwg.fortemi.index.chunk-manifest.v1';
4219
+ generated_at: string;
4220
+ source: AiwgFortemiIndexExport['source'];
4221
+ source_export_schema_version?: AiwgFortemiIndexExportSchemaVersion;
4222
+ total: number;
4223
+ part_size: number;
4224
+ facets?: Record<string, Record<string, number>>;
4225
+ projection?: Array<keyof AiwgFortemiRecord>;
4226
+ detail?: AiwgFortemiChunkDetailRef;
4227
+ parts: AiwgFortemiChunkPartRef[];
4228
+ }
4229
+ interface AiwgFortemiChunkPart {
4230
+ schema_version: 'aiwg.fortemi.index.chunk.v1';
4231
+ manifest_schema_version: 'aiwg.fortemi.index.chunk-manifest.v1';
4232
+ offset: number;
4233
+ items: AiwgFortemiRecord[];
4234
+ }
4235
+ interface AiwgIndexValidationResult {
3712
4236
  valid: boolean;
3713
4237
  errors: string[];
4238
+ counts: Partial<Record<string, number>>;
4239
+ }
4240
+ interface AiwgChunkedIndexValidationResult {
4241
+ valid: boolean;
4242
+ errors: string[];
4243
+ }
4244
+ interface AiwgIndexQueryOptions {
4245
+ types?: AiwgFortemiRecordType[];
4246
+ facets?: Record<string, string[]>;
4247
+ tags?: string[];
4248
+ concepts?: string[];
4249
+ privacy?: AiwgPrivacyClassification[];
4250
+ relationshipTargetId?: string;
4251
+ limit?: number;
4252
+ offset?: number;
4253
+ rank?: boolean;
4254
+ snippets?: boolean;
4255
+ snippetLength?: number;
4256
+ weights?: Partial<AiwgIndexQueryWeights>;
4257
+ includeMatches?: boolean;
4258
+ searchProfile?: 'default' | 'aiwg-discovery';
4259
+ }
4260
+ interface AiwgIndexQueryWeights {
4261
+ title: number;
4262
+ text: number;
4263
+ tag: number;
4264
+ concept: number;
4265
+ facet: number;
4266
+ id: number;
4267
+ source: number;
4268
+ }
4269
+ interface AiwgIndexQueryMatch {
4270
+ field: 'title' | 'text' | 'tag' | 'concept' | 'facet' | 'id' | 'source';
4271
+ value: string;
4272
+ score?: number;
4273
+ reason?: string;
4274
+ }
4275
+ interface AiwgIndexQueryRankedItem {
4276
+ item: AiwgFortemiRecord;
4277
+ rank: number;
4278
+ snippet?: string;
4279
+ matches?: AiwgIndexQueryMatch[];
4280
+ }
4281
+ interface AiwgIndexQueryResult {
4282
+ items: AiwgFortemiRecord[];
4283
+ total: number;
4284
+ facets: Record<string, Record<string, number>>;
4285
+ rankedItems?: AiwgIndexQueryRankedItem[];
4286
+ }
4287
+ type AiwgChunkedIndexLoader = (part: AiwgFortemiChunkPartRef, manifest: AiwgFortemiChunkManifest) => Promise<unknown>;
4288
+ type AiwgChunkedIndexDetailLoader = (id: string, manifest: AiwgFortemiChunkManifest) => Promise<unknown>;
4289
+ interface AiwgChunkedIndexLoadOptions {
4290
+ maxCachedParts?: number;
4291
+ detailLoader?: AiwgChunkedIndexDetailLoader;
4292
+ maxCachedDetails?: number;
4293
+ maxCachedMatches?: number;
4294
+ }
4295
+ type AiwgChunkedIndexProgressPhase = 'part' | 'query';
4296
+ interface AiwgChunkedIndexProgress {
4297
+ phase: AiwgChunkedIndexProgressPhase;
4298
+ done: number;
4299
+ total: number;
4300
+ href?: string;
4301
+ }
4302
+ interface AiwgChunkedIndexQueryOptions extends AiwgIndexQueryOptions {
4303
+ onProgress?: (progress: AiwgChunkedIndexProgress) => void;
3714
4304
  }
3715
- declare function getAiwgFortemiIndexExportSchema(): unknown;
3716
- declare function validateAiwgFortemiIndexExportSchema(value: unknown): AiwgIndexSchemaValidationResult;
3717
- declare function validateAiwgFortemiProjectedRecordSchema(value: unknown): AiwgIndexSchemaValidationResult;
4305
+ interface AiwgChunkedIndexQueryResult extends AiwgIndexQueryResult {
4306
+ manifestTotal: number;
4307
+ scannedParts: number;
4308
+ fetchedParts: number;
4309
+ complete: boolean;
4310
+ }
4311
+ interface AiwgReviewDecision {
4312
+ item_id: string;
4313
+ action: AiwgReviewAction;
4314
+ reason?: string;
4315
+ updated_at: string;
4316
+ }
4317
+ interface AiwgReviewDecisionExport {
4318
+ schema_version: 'aiwg.fortemi.review-decisions.v1';
4319
+ generated_at: string;
4320
+ source_export_schema_version: AiwgFortemiIndexExportSchemaVersion;
4321
+ decisions: AiwgReviewDecision[];
4322
+ }
4323
+ interface AiwgIndexGraphOptions {
4324
+ communityFacet?: string;
4325
+ communityTagPrefix?: string;
4326
+ relationshipWeights?: Record<string, number>;
4327
+ includeDanglingRelationships?: boolean;
4328
+ }
4329
+ type AiwgRelationshipDirection = 'in' | 'out' | 'both';
4330
+ type AiwgRelationshipSetOperation = 'intersection' | 'union' | 'difference';
4331
+ interface AiwgRelationshipTraversalOptions {
4332
+ direction?: AiwgRelationshipDirection;
4333
+ relationshipType?: string;
4334
+ relationshipDirection?: AiwgFortemiRelationshipDirection;
4335
+ limit?: number;
4336
+ }
4337
+ interface AiwgRelationshipQueryOptions extends AiwgRelationshipTraversalOptions {
4338
+ sourceId?: string;
4339
+ targetId?: string;
4340
+ endpointId?: string;
4341
+ type?: string;
4342
+ }
4343
+ interface AiwgRelationshipEdgeSummary {
4344
+ source_id: string;
4345
+ target_id: string;
4346
+ type: string;
4347
+ source_path?: string;
4348
+ target_path?: string;
4349
+ direction?: AiwgFortemiRelationshipDirection;
4350
+ }
4351
+ interface AiwgRelationshipNodeSummary {
4352
+ id: string;
4353
+ type: AiwgFortemiRecordType;
4354
+ title: string;
4355
+ }
4356
+ interface AiwgRelationshipTraversalResult {
4357
+ nodes: AiwgRelationshipNodeSummary[];
4358
+ edges: AiwgRelationshipEdgeSummary[];
4359
+ complete: boolean;
4360
+ scannedParts?: number;
4361
+ fetchedParts?: number;
4362
+ }
4363
+ interface AiwgRelationshipSetOptions extends AiwgRelationshipTraversalOptions {
4364
+ op: AiwgRelationshipSetOperation;
4365
+ a: string;
4366
+ b: string;
4367
+ }
4368
+ interface AiwgRelationshipSetResult {
4369
+ ids: string[];
4370
+ op: AiwgRelationshipSetOperation;
4371
+ }
4372
+ interface AiwgStaticEmbeddingRecord {
4373
+ record_id: string;
4374
+ embedding: number[];
4375
+ embedding_id?: string;
4376
+ granularity?: string;
4377
+ input_hash: string;
4378
+ source_path?: string;
4379
+ }
4380
+ interface AiwgStaticEmbeddingSet {
4381
+ schema_version: 'aiwg.fortemi.embedding.set.v1';
4382
+ id: string;
4383
+ model: string;
4384
+ dimensions: number;
4385
+ generated_at: string;
4386
+ granularity: 'title-summary' | 'body' | 'chunked-body' | string;
4387
+ metric?: 'cosine' | 'dot' | 'euclidean';
4388
+ input_hash_algorithm?: string;
4389
+ embeddings: AiwgStaticEmbeddingRecord[];
4390
+ }
4391
+ interface AiwgHeadlessEmbeddingBackend {
4392
+ model: string;
4393
+ dimensions: number;
4394
+ embed(input: string, record: AiwgFortemiRecord): number[] | Promise<number[]>;
4395
+ }
4396
+ interface AiwgPrivacyFilterOptions {
4397
+ /** Include records classified `private` (default false). */
4398
+ includePrivate?: boolean;
4399
+ /** Include records flagged `pii` (default false). */
4400
+ includePii?: boolean;
4401
+ }
4402
+ /** Drop `private`/`pii` records unless explicitly opted in (SEC6, default-safe). */
4403
+ declare function filterAiwgRecordsByPrivacy(records: AiwgFortemiRecord[], options?: AiwgPrivacyFilterOptions): AiwgFortemiRecord[];
4404
+ interface BuildAiwgStaticEmbeddingSetOptions {
4405
+ id: string;
4406
+ backend: AiwgHeadlessEmbeddingBackend;
4407
+ records?: AiwgFortemiRecord[];
4408
+ generatedAt?: string | Date;
4409
+ granularity?: AiwgStaticEmbeddingSet['granularity'];
4410
+ metric?: AiwgStaticEmbeddingSet['metric'];
4411
+ textForRecord?: (record: AiwgFortemiRecord) => string;
4412
+ /** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */
4413
+ privacy?: AiwgPrivacyFilterOptions;
4414
+ }
4415
+ interface AiwgStaticSemanticQueryOptions {
4416
+ limit?: number;
4417
+ offset?: number;
4418
+ minScore?: number;
4419
+ }
4420
+ interface AiwgStaticSemanticResult {
4421
+ item: AiwgFortemiRecord;
4422
+ score: number;
4423
+ embedding?: AiwgStaticEmbeddingRecord;
4424
+ }
4425
+ interface AiwgStaticHybridQueryOptions extends AiwgStaticSemanticQueryOptions, AiwgIndexQueryOptions {
4426
+ lexicalWeight?: number;
4427
+ semanticWeight?: number;
4428
+ }
4429
+ interface AiwgStaticDuplicatePair {
4430
+ left: AiwgFortemiRecord;
4431
+ right: AiwgFortemiRecord;
4432
+ score: number;
4433
+ }
4434
+ interface AiwgReviewInput {
4435
+ item_id: string;
4436
+ action: AiwgReviewAction;
4437
+ reason?: string;
4438
+ }
4439
+ interface AiwgIndexControllerSnapshot {
4440
+ index: AiwgFortemiIndexExport | null;
4441
+ chunked: {
4442
+ manifest: AiwgFortemiChunkManifest;
4443
+ cachedParts: number;
4444
+ maxCachedParts: number;
4445
+ } | null;
4446
+ data: AiwgIndexQueryResult | null;
4447
+ error: Error | null;
4448
+ reviewDecisions: AiwgReviewDecision[];
4449
+ }
4450
+ type AiwgIndexControllerListener = (snapshot: AiwgIndexControllerSnapshot) => void;
4451
+ interface AiwgIndexController {
4452
+ loadIndex(value: unknown): AiwgFortemiIndexExport;
4453
+ loadChunkedIndex(manifest: unknown, loader: AiwgChunkedIndexLoader, options?: AiwgChunkedIndexLoadOptions): AiwgFortemiChunkManifest;
4454
+ getIndex(): AiwgFortemiIndexExport | null;
4455
+ getChunkedManifest(): AiwgFortemiChunkManifest | null;
4456
+ getSnapshot(): AiwgIndexControllerSnapshot;
4457
+ query(query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
4458
+ queryChunked(query?: string, options?: AiwgChunkedIndexQueryOptions): Promise<AiwgChunkedIndexQueryResult>;
4459
+ getRecord(id: string): Promise<AiwgFortemiRecord>;
4460
+ neighbors(id: string, options?: AiwgRelationshipTraversalOptions): Promise<AiwgRelationshipTraversalResult>;
4461
+ relationshipQuery(options?: AiwgRelationshipQueryOptions): Promise<AiwgRelationshipTraversalResult>;
4462
+ relationshipSet(options: AiwgRelationshipSetOptions): Promise<AiwgRelationshipSetResult>;
4463
+ clearChunkCache(): void;
4464
+ toCommunityGraph(options?: AiwgIndexGraphOptions): ReturnType<typeof aiwgFortemiIndexToCommunityGraph>;
4465
+ toCommunityGraphChunked(options?: AiwgIndexGraphOptions & {
4466
+ onProgress?: (progress: AiwgChunkedIndexProgress) => void;
4467
+ }): Promise<ReturnType<typeof aiwgFortemiIndexToCommunityGraph>>;
4468
+ setReviewDecision(input: AiwgReviewInput): AiwgReviewDecision;
4469
+ clearReviewDecision(itemId: string): void;
4470
+ createReviewDecisionExport(generatedAt?: string): AiwgReviewDecisionExport;
4471
+ subscribe(listener: AiwgIndexControllerListener): () => void;
4472
+ }
4473
+ declare function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult;
4474
+ declare function assertAiwgFortemiIndexExport(value: unknown): AiwgFortemiIndexExport;
4475
+ declare function validateAiwgFortemiChunkManifest(value: unknown): AiwgChunkedIndexValidationResult;
4476
+ declare function assertAiwgFortemiChunkManifest(value: unknown): AiwgFortemiChunkManifest;
4477
+ declare function validateAiwgFortemiChunkPart(value: unknown, partRef?: AiwgFortemiChunkPartRef, manifest?: AiwgFortemiChunkManifest): AiwgChunkedIndexValidationResult;
4478
+ declare function assertAiwgFortemiChunkPart(value: unknown, partRef?: AiwgFortemiChunkPartRef, manifest?: AiwgFortemiChunkManifest): AiwgFortemiChunkPart;
4479
+ declare function createAiwgFetchChunkLoader(baseUrl?: string | URL): AiwgChunkedIndexLoader;
4480
+ declare function createAiwgFetchDetailLoader(baseUrl?: string | URL): AiwgChunkedIndexDetailLoader;
4481
+ declare function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>>;
4482
+ declare function buildAiwgStaticEmbeddingSet(index: AiwgFortemiIndexExport, options: BuildAiwgStaticEmbeddingSetOptions): Promise<AiwgStaticEmbeddingSet>;
4483
+ interface AiwgChunkedIndexBuildOptions {
4484
+ partSize?: number;
4485
+ projection?: Array<keyof AiwgFortemiRecord>;
4486
+ detailHref?: string;
4487
+ idEncoding?: AiwgDetailIdEncoding;
4488
+ generatedAt?: string;
4489
+ /** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */
4490
+ privacy?: AiwgPrivacyFilterOptions;
4491
+ }
4492
+ interface AiwgChunkedIndexBuildResult {
4493
+ manifest: AiwgFortemiChunkManifest;
4494
+ parts: Array<{
4495
+ href: string;
4496
+ part: AiwgFortemiChunkPart;
4497
+ }>;
4498
+ details: Array<{
4499
+ id: string;
4500
+ href: string;
4501
+ record: AiwgFortemiRecord;
4502
+ }>;
4503
+ }
4504
+ declare function buildAiwgChunkedIndex(index: AiwgFortemiIndexExport, options?: AiwgChunkedIndexBuildOptions): AiwgChunkedIndexBuildResult;
4505
+ declare function queryAiwgFortemiIndex(index: AiwgFortemiIndexExport, query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
4506
+ declare function validateAiwgStaticEmbeddingSet(value: unknown): AiwgChunkedIndexValidationResult;
4507
+ declare function assertAiwgStaticEmbeddingSet(value: unknown): AiwgStaticEmbeddingSet;
4508
+ declare function queryAiwgSemanticIndex(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, queryEmbedding: number[], options?: AiwgStaticSemanticQueryOptions): AiwgStaticSemanticResult[];
4509
+ declare function queryAiwgHybridIndex(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, query: string, queryEmbedding: number[], options?: AiwgStaticHybridQueryOptions): AiwgStaticSemanticResult[];
4510
+ declare function findAiwgStaticDuplicatePairs(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, threshold?: number, options?: {
4511
+ maxEmbeddings?: number;
4512
+ }): AiwgStaticDuplicatePair[];
4513
+ declare function createAiwgReviewDecisionExport(source: Pick<AiwgFortemiIndexExport, 'schema_version'>, decisions: AiwgReviewDecision[], generatedAt?: string): AiwgReviewDecisionExport;
4514
+ declare function createAiwgIndexController(initialIndex?: AiwgFortemiIndexExport): AiwgIndexController;
4515
+ declare function aiwgFortemiIndexToCommunityGraph(index: AiwgFortemiIndexExport, options?: AiwgIndexGraphOptions): {
4516
+ nodes: {
4517
+ id: string;
4518
+ }[];
4519
+ edges: {
4520
+ source: string;
4521
+ target: string;
4522
+ kind: string;
4523
+ weight: number;
4524
+ }[];
4525
+ communities: {
4526
+ id: string;
4527
+ nodes: string[];
4528
+ }[];
4529
+ };
3718
4530
 
3719
- declare const VERSION = "2026.7.4";
4531
+ declare const VERSION = "2026.7.5";
3720
4532
 
3721
- export { type AiwgIndexSchemaValidationResult, type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BackendCandidate, type BackendCapabilities, type BackendConcept, type BackendLink, type BackendListOptions, type BackendNote, type BackendNoteFull, type BackendProvenanceEdge, type BackendRequest, type BackendSearchHit, type BackendSearchQueryOptions, type BackendSearchResult, type BackendSelection, type BackendSemanticTier, type BackendStartupCost, BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, CURRENT_MIGRATION_HEAD, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type CooldownConfig, type CooldownEvent, type CosineSemanticProviderOptions, type CreatePGliteOptions, type CspDirectiveName, type CspDirectives, type CspViolationReport, DB_SNAPSHOT_SCHEMA_VERSION, type DataBackend, type DatabaseClient, type DbSnapshot, type DbSnapshotCompat, type DbSnapshotCompression, type DbSnapshotExpectations, type DbSnapshotMeta, type DbSnapshotSource, DbSnapshotVersionError, type DiscoveredProvider, type DiscoveryOptions, type DumpDbSnapshotOptions, type DumpableDb, EMBED_REQUEST_KIND, EMBED_RESPONSE_KIND, type EmbedFunction, type EmbedRequest, type EmbedRequestMessage, type EmbedResponse, type EmbedResponseMessage, type EmbedTransportPort, type EmbedWorkerOptions, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, ExportOptions, FORTEMI_COMPATIBILITY_PATH, FORTEMI_COMPATIBILITY_STATES, FORTEMI_REQUIRED_COMPATIBILITY_CAPABILITIES, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FetchFortemiCompatibilityOptions, type FortemiBridge, type FortemiBridgeCapabilities, type FortemiBridgeHost, type FortemiCompatibilityCapability, type FortemiCompatibilityResponse, type FortemiCompatibilityState, type FortemiCompatibilityValidationResult, type FortemiConfig, type FortemiCore, type FortemiInferenceRouter, type FortemiRequiredCompatibilityCapability, type FortemiSecretStore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, ImportOptions, ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type NoteSkosTag, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, type OpenShardOptions, type PGliteBackendOptions, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, type PGliteWorkerStorageBackendFactoryOptions, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type PrefetchOptions, type PrefetchResult, type ProbeResult, type ProbeStatus, type ProvenanceEdge, ProvenanceRepository, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type RecordProvenanceInput, type RemoteBackendConfig, type RemoteBackendPaths, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RestoreDbSnapshotOptions, type RouteHandler, SUPPORTED_PGLITE_VERSION, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardBackendOptions, ShardCollection, ShardComponent, type ShardComponentStore, ShardEmbedding, ShardEmbeddingConfig, ShardEmbeddingSet, ShardEmbeddingSetMember, ShardLink, type ShardListOptions, ShardManifest, ShardNote, type ShardNoteFull, ShardNoteSkosTag, ShardProvenanceEdge, type ShardReader, type ShardReaderNote, type ShardReaderSource, type ShardSchemaValidationResult, type ShardSearchOptions, type ShardSearchRankedNote, type ShardSearchResult, type ShardSearchWeights, ShardSkosConcept, ShardSkosRelation, ShardSkosScheme, ShardTag, ShardTemplate, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StaticSemanticProvider, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VectorEntry, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, allMigrations, appendPluginScript, assertShardComponentRecord, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeBlobHash, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRemoteBackend, createRoutes, createShardBackend, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dumpDbSnapshot, embeddingConfigToShard, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchAndValidateFortemiCompatibility, fetchPluginScript, formatFortemiCompatibilitySummary, fortemiCompatibilityUrl, fortemiManifest, fromPrefetched, generateId, getAiwgFortemiIndexExportSchema, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getKnowledgeShardSchema, getLlmFunction, getNote, getPrefetchedSha256, handleEmbedRequests, hasFortemiSecureSecrets, importShard, isPluginScriptAllowed, isShardPrefetched, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, openShard, packTarGz, parseCspReport, prefetchShard, provenanceEdgeToShard, registerLlmCapability, registerSemanticCapability, registerSemanticCapabilityWorker, registerServiceWorker, restoreDbSnapshot, searchTool, selectBackend, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsToShard, templateToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, urlLinkToShard, validateAiwgFortemiIndexExportSchema, validateAiwgFortemiProjectedRecordSchema, validateChecksums, validateFortemiCompatibilityResponse, validateShardArchive, validateShardComponentRecord, validateShardManifest, verifyDbSnapshotMeta, verifySri };
4533
+ export { AIWG_SCAN_REQUIRED_FIELDS, type AiwgChunkedIndexBuildOptions, type AiwgChunkedIndexBuildResult, type AiwgChunkedIndexDetailLoader, type AiwgChunkedIndexLoadOptions, type AiwgChunkedIndexLoader, type AiwgChunkedIndexProgress, type AiwgChunkedIndexProgressPhase, type AiwgChunkedIndexQueryOptions, type AiwgChunkedIndexQueryResult, type AiwgChunkedIndexValidationResult, type AiwgFortemiAttachmentReference, type AiwgFortemiBinarySource, type AiwgFortemiChunk, type AiwgFortemiChunkDetailRef, type AiwgFortemiChunkManifest, type AiwgFortemiChunkPart, type AiwgFortemiChunkPartRef, type AiwgFortemiIndexExport, type AiwgFortemiIndexExportSchemaVersion, type AiwgFortemiProjectedRecord, type AiwgFortemiProvenance, type AiwgFortemiProvenanceEvent, type AiwgFortemiRecord, type AiwgFortemiRecordEmbedding, type AiwgFortemiRecordSchemaVersion, type AiwgFortemiRecordSource, type AiwgFortemiRecordType, type AiwgFortemiRelationship, type AiwgFortemiRelationshipDirection, type AiwgFortemiSearchProjection, type AiwgFortemiSkosConcept, type AiwgFortemiSkosRelation, type AiwgFortemiSkosRelationType, type AiwgHeadlessEmbeddingBackend, type AiwgIndexController, type AiwgIndexControllerListener, type AiwgIndexControllerSnapshot, type AiwgIndexGraphOptions, type AiwgIndexQueryMatch, type AiwgIndexQueryOptions, type AiwgIndexQueryRankedItem, type AiwgIndexQueryResult, type AiwgIndexQueryWeights, type AiwgIndexValidationResult, type AiwgPrivacyClassification, type AiwgPrivacyFilterOptions, type AiwgProvenanceConfidence, type AiwgRelationshipDirection, type AiwgRelationshipEdgeSummary, type AiwgRelationshipNodeSummary, type AiwgRelationshipQueryOptions, type AiwgRelationshipSetOperation, type AiwgRelationshipSetOptions, type AiwgRelationshipSetResult, type AiwgRelationshipTraversalOptions, type AiwgRelationshipTraversalResult, type AiwgReviewAction, type AiwgReviewDecision, type AiwgReviewDecisionExport, type AiwgReviewInput, type AiwgStaticDuplicatePair, type AiwgStaticEmbeddingRecord, type AiwgStaticEmbeddingSet, type AiwgStaticHybridQueryOptions, type AiwgStaticSemanticQueryOptions, type AiwgStaticSemanticResult, type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BackendCandidate, type BackendCapabilities, type BackendConcept, type BackendLink, type BackendListOptions, type BackendNote, type BackendNoteFull, type BackendProvenanceEdge, type BackendRequest, type BackendSearchHit, type BackendSearchQueryOptions, type BackendSearchResult, type BackendSelection, type BackendSemanticTier, type BackendStartupCost, type BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, type BuildAiwgStaticEmbeddingSetOptions, CURRENT_MIGRATION_HEAD, CURRENT_SHARD_VERSION, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type ConflictStrategy, type CooldownConfig, type CooldownEvent, type CosineSemanticProviderOptions, type CreatePGliteOptions, type CspDirectiveName, type CspDirectives, type CspViolationReport, DB_SNAPSHOT_SCHEMA_VERSION, type DataBackend, type DatabaseClient, type DbSnapshot, type DbSnapshotCompat, type DbSnapshotCompression, type DbSnapshotExpectations, type DbSnapshotMeta, type DbSnapshotSource, DbSnapshotVersionError, type DiscoveredProvider, type DiscoveryOptions, type DumpDbSnapshotOptions, type DumpableDb, EMBED_REQUEST_KIND, EMBED_RESPONSE_KIND, type EmbedFunction, type EmbedRequest, type EmbedRequestMessage, type EmbedResponse, type EmbedResponseMessage, type EmbedTransportPort, type EmbedWorkerOptions, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, type ExportOptions, FORTEMI_COMPATIBILITY_PATH, FORTEMI_COMPATIBILITY_STATES, FORTEMI_REQUIRED_COMPATIBILITY_CAPABILITIES, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FetchFortemiCompatibilityOptions, type FortemiBridge, type FortemiBridgeCapabilities, type FortemiBridgeHost, type FortemiCompatibilityCapability, type FortemiCompatibilityResponse, type FortemiCompatibilityState, type FortemiCompatibilityValidationResult, type FortemiConfig, type FortemiCore, type FortemiInferenceRouter, type FortemiRequiredCompatibilityCapability, type FortemiSecretStore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, type ImportCounts, type ImportOptions, type ImportProgress, type ImportProgressPhase, type ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, MemoryBlobStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type NoteSkosTag, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, type OpenShardOptions, type PGliteBackendOptions, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, type PGliteWorkerStorageBackendFactoryOptions, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type PrefetchOptions, type PrefetchResult, type ProbeResult, type ProbeStatus, type ProvenanceEdge, ProvenanceRepository, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type RecordProvenanceInput, type RemoteBackendConfig, type RemoteBackendPaths, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RestoreDbSnapshotOptions, type RouteHandler, SHARD_FORMAT, SUPPORTED_PGLITE_VERSION, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardBackendOptions, type ShardClusterRef, type ShardCollection, type ShardComponent, type ShardComponentStore, type ShardEmbedding, type ShardEmbeddingConfig, type ShardEmbeddingSet, type ShardEmbeddingSetMember, type ShardLayout, type ShardLink, type ShardListOptions, type ShardManifest, type ShardNote, type ShardNoteFull, type ShardNoteSkosTag, type ShardProvenanceEdge, type ShardReader, type ShardReaderNote, type ShardReaderSource, type ShardSchemaValidationResult, type ShardSearchOptions, type ShardSearchRankedNote, type ShardSearchResult, type ShardSearchWeights, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, type ShardTemplate, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StaticSemanticProvider, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VectorEntry, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, aiwgFortemiIndexToCommunityGraph, allMigrations, appendPluginScript, assertAiwgFortemiChunkManifest, assertAiwgFortemiChunkPart, assertAiwgFortemiIndexExport, assertAiwgStaticEmbeddingSet, assertShardComponentRecord, buildAiwgChunkedIndex, buildAiwgStaticEmbeddingSet, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeBlobHash, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createAiwgFetchChunkLoader, createAiwgFetchDetailLoader, createAiwgIndexController, createAiwgReviewDecisionExport, createBlobStore, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRemoteBackend, createRoutes, createShardBackend, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dumpDbSnapshot, embeddingConfigToShard, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchAndValidateFortemiCompatibility, fetchPluginScript, filterAiwgRecordsByPrivacy, findAiwgStaticDuplicatePairs, formatFortemiCompatibilitySummary, fortemiCompatibilityUrl, fortemiManifest, fromPrefetched, generateId, getAiwgFortemiFacets, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getKnowledgeShardSchema, getLlmFunction, getNote, getPrefetchedSha256, handleEmbedRequests, hasFortemiSecureSecrets, importShard, isPluginScriptAllowed, isShardPrefetched, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, openShard, packTarGz, parseCspReport, prefetchShard, provenanceEdgeToShard, queryAiwgFortemiIndex, queryAiwgHybridIndex, queryAiwgSemanticIndex, registerLlmCapability, registerSemanticCapability, registerSemanticCapabilityWorker, registerServiceWorker, restoreDbSnapshot, searchTool, selectBackend, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsToShard, templateToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, urlLinkToShard, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport, validateAiwgStaticEmbeddingSet, validateChecksums, validateFortemiCompatibilityResponse, validateShardArchive, validateShardComponentRecord, validateShardManifest, verifyDbSnapshotMeta, verifySri };