@fortemi/core 2026.7.3 → 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/README.md +3 -3
- package/dist/aiwg-index-schema.d.ts +9 -0
- package/dist/aiwg-index-schema.js +724 -0
- package/dist/aiwg-index-schema.js.map +1 -0
- package/dist/aiwg-index.d.ts +32 -17
- package/dist/aiwg-index.js +15 -1463
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +803 -96
- package/dist/index.js +2932 -223
- package/dist/index.js.map +1 -1
- package/package.json +19 -3
- package/tools/verify-fortemi-compatibility.mjs +82 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PGlite } from '@electric-sql/pglite';
|
|
2
2
|
import { z, ZodType } from 'zod';
|
|
3
|
-
export {
|
|
3
|
+
export { AiwgIndexSchemaValidationResult, getAiwgFortemiIndexExportSchema, validateAiwgFortemiIndexExportSchema, validateAiwgFortemiProjectedRecordSchema } from './aiwg-index-schema.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Generate a RFC 9562 UUIDv7 identifier.
|
|
@@ -128,6 +128,12 @@ declare class TypedEventBus {
|
|
|
128
128
|
* PGlite database factory.
|
|
129
129
|
* Enforces PGlite 0.4.x conventions (explicit database: 'postgres').
|
|
130
130
|
* Selects persistence adapter based on config.
|
|
131
|
+
*
|
|
132
|
+
* PGlite is loaded LAZILY via dynamic `import()` inside `createPGliteInstance`
|
|
133
|
+
* (issue #261) — the top-level import is type-only so the emitted `dist/index.js`
|
|
134
|
+
* carries no static `import '@electric-sql/pglite'`. Consumers that never boot a
|
|
135
|
+
* PGlite-backed store therefore do not pull the WASM engine into their bundle,
|
|
136
|
+
* and `@electric-sql/pglite` is an OPTIONAL dependency of `@fortemi/core`.
|
|
131
137
|
*/
|
|
132
138
|
|
|
133
139
|
type PersistenceMode = 'opfs' | 'idb' | 'memory';
|
|
@@ -356,6 +362,13 @@ declare class PGliteStorageBackend implements StorageBackend {
|
|
|
356
362
|
declare class PGliteStorageBackendFactory implements StorageBackendFactory {
|
|
357
363
|
open(input: StorageOpenRequest): Promise<StorageBackend>;
|
|
358
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* Built-in PGlite backend factory — the opt-in default (issue #261). PGlite is
|
|
367
|
+
* loaded lazily by `createPGliteInstance` on first `open()`, so referencing
|
|
368
|
+
* this constant does not force the WASM engine into a consumer's static graph.
|
|
369
|
+
* Hosts wanting a different store pass their own `StorageBackendFactory` to
|
|
370
|
+
* `ArchiveManager` instead.
|
|
371
|
+
*/
|
|
359
372
|
declare const defaultStorageBackendFactory: PGliteStorageBackendFactory;
|
|
360
373
|
declare class PGliteWorkerStorageBackend implements StorageBackend {
|
|
361
374
|
readonly id: string;
|
|
@@ -376,16 +389,47 @@ declare class PGliteWorkerStorageBackendFactory implements StorageBackendFactory
|
|
|
376
389
|
open(input: StorageOpenRequest): Promise<StorageBackend>;
|
|
377
390
|
}
|
|
378
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
|
+
|
|
379
422
|
/**
|
|
380
423
|
* Shard format types — matches the fortemi server matric-shard specification.
|
|
381
424
|
*
|
|
382
425
|
* A shard is a gzip-compressed tar archive (.shard) containing serialized
|
|
383
426
|
* knowledge data with a manifest for integrity verification.
|
|
384
427
|
*/
|
|
428
|
+
|
|
385
429
|
declare const CURRENT_SHARD_VERSION = "1.0.0";
|
|
386
430
|
declare const SHARD_FORMAT = "matric-shard";
|
|
387
431
|
/** Components that can appear in a shard archive. */
|
|
388
|
-
type ShardComponent = 'notes' | 'collections' | 'tags' | 'links' | 'embedding_sets' | '
|
|
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';
|
|
389
433
|
interface ShardAttachmentReference {
|
|
390
434
|
id: string;
|
|
391
435
|
path: string;
|
|
@@ -393,20 +437,20 @@ interface ShardAttachmentReference {
|
|
|
393
437
|
checksum: string;
|
|
394
438
|
bytes: number;
|
|
395
439
|
}
|
|
396
|
-
interface
|
|
397
|
-
extracted_text: string;
|
|
440
|
+
interface ShardAttachmentProjection {
|
|
441
|
+
extracted_text: string | null;
|
|
398
442
|
attachment: ShardAttachmentReference;
|
|
399
443
|
}
|
|
444
|
+
/** @deprecated Legacy React shard field name. Server shards use `attachments`. */
|
|
445
|
+
type ShardBinarySource = ShardAttachmentProjection;
|
|
400
446
|
/**
|
|
401
447
|
* Reference to one cluster file of a component split across addressable files
|
|
402
|
-
* (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset
|
|
403
|
-
*
|
|
404
|
-
* query needs — the shard analog of the AIWG chunk-manifest scan parts.
|
|
448
|
+
* (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset` preserves deterministic
|
|
449
|
+
* component order; readers discover each cluster's size from its contents.
|
|
405
450
|
*/
|
|
406
451
|
interface ShardClusterRef {
|
|
407
452
|
href: string;
|
|
408
453
|
offset: number;
|
|
409
|
-
count: number;
|
|
410
454
|
}
|
|
411
455
|
/**
|
|
412
456
|
* Optional clustered layout (additive — absent on monolithic shards). When a
|
|
@@ -417,6 +461,13 @@ interface ShardClusterRef {
|
|
|
417
461
|
interface ShardLayout {
|
|
418
462
|
clusters?: Partial<Record<ShardComponent, ShardClusterRef[]>>;
|
|
419
463
|
}
|
|
464
|
+
interface ShardMigrationHistoryEntry {
|
|
465
|
+
from_version: string;
|
|
466
|
+
to_version: string;
|
|
467
|
+
migrated_at: string;
|
|
468
|
+
migrated_by: string;
|
|
469
|
+
changes: string[];
|
|
470
|
+
}
|
|
420
471
|
/** Manifest included in every shard as manifest.json. */
|
|
421
472
|
interface ShardManifest {
|
|
422
473
|
version: string;
|
|
@@ -427,6 +478,8 @@ interface ShardManifest {
|
|
|
427
478
|
counts: Partial<Record<ShardComponent | 'community_sets', number>>;
|
|
428
479
|
checksums: Record<string, string>;
|
|
429
480
|
min_reader_version: string;
|
|
481
|
+
migrated_from?: string | null;
|
|
482
|
+
migration_history?: ShardMigrationHistoryEntry[];
|
|
430
483
|
/** Clustered component layout for partial fetch (issue #189). Absent → monolithic. */
|
|
431
484
|
layout?: ShardLayout;
|
|
432
485
|
}
|
|
@@ -448,6 +501,20 @@ interface ExportOptions {
|
|
|
448
501
|
* (issue #189). Absent → a single monolithic `notes.jsonl` (unchanged).
|
|
449
502
|
*/
|
|
450
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;
|
|
451
518
|
}
|
|
452
519
|
/** Conflict resolution strategy for shard import. */
|
|
453
520
|
type ConflictStrategy = 'skip' | 'replace' | 'error';
|
|
@@ -458,8 +525,16 @@ interface ImportOptions {
|
|
|
458
525
|
batchSize?: number;
|
|
459
526
|
/** Progress callback for long-running import phases. */
|
|
460
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;
|
|
461
536
|
}
|
|
462
|
-
type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'links' | 'provenance' | 'embedding_sets' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
|
|
537
|
+
type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'templates' | 'links' | 'provenance' | 'embedding_sets' | 'embedding_configs' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
|
|
463
538
|
interface ImportProgress {
|
|
464
539
|
phase: ImportProgressPhase;
|
|
465
540
|
done: number;
|
|
@@ -469,9 +544,11 @@ interface ImportProgress {
|
|
|
469
544
|
interface ImportCounts {
|
|
470
545
|
notes: number;
|
|
471
546
|
collections: number;
|
|
547
|
+
templates: number;
|
|
472
548
|
tags: number;
|
|
473
549
|
links: number;
|
|
474
550
|
embedding_sets: number;
|
|
551
|
+
embedding_configs: number;
|
|
475
552
|
embedding_set_members: number;
|
|
476
553
|
embeddings: number;
|
|
477
554
|
skos_schemes: number;
|
|
@@ -500,6 +577,9 @@ interface ShardNote {
|
|
|
500
577
|
title: string | null;
|
|
501
578
|
original_content: string;
|
|
502
579
|
revised_content: string | null;
|
|
580
|
+
collection_id?: string | null;
|
|
581
|
+
attachments?: ShardAttachmentProjection[];
|
|
582
|
+
/** @deprecated Legacy React shard field name. Use `attachments`. */
|
|
503
583
|
binary_sources?: ShardBinarySource[];
|
|
504
584
|
format: string;
|
|
505
585
|
source: string;
|
|
@@ -524,21 +604,40 @@ interface ShardTag {
|
|
|
524
604
|
name: string;
|
|
525
605
|
created_at: string;
|
|
526
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
|
+
}
|
|
527
619
|
/** Link as serialized in the shard JSONL. */
|
|
528
620
|
interface ShardLink {
|
|
529
621
|
id: string;
|
|
530
622
|
from_note_id: string;
|
|
531
|
-
to_note_id: string;
|
|
623
|
+
to_note_id: string | null;
|
|
624
|
+
to_url: string | null;
|
|
532
625
|
kind: string;
|
|
533
626
|
score: number | null;
|
|
534
627
|
created_at: string;
|
|
535
|
-
metadata
|
|
628
|
+
metadata: Record<string, unknown> | null;
|
|
536
629
|
}
|
|
537
630
|
/** Embedding set as serialized in the shard JSON array. */
|
|
538
631
|
interface ShardEmbeddingSet {
|
|
539
632
|
id: string;
|
|
540
|
-
name
|
|
541
|
-
|
|
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[];
|
|
542
641
|
model: string;
|
|
543
642
|
dimension: number;
|
|
544
643
|
kind?: 'physical' | 'filter' | 'virtual';
|
|
@@ -549,22 +648,42 @@ interface ShardEmbeddingSet {
|
|
|
549
648
|
compatibility?: Record<string, unknown> | null;
|
|
550
649
|
materialization?: Record<string, unknown> | null;
|
|
551
650
|
freshness?: ShardArtifactFreshness | null;
|
|
552
|
-
created_at
|
|
651
|
+
created_at?: string;
|
|
553
652
|
updated_at?: string;
|
|
554
653
|
}
|
|
555
654
|
/** Embedding set member as serialized in the shard JSONL. */
|
|
556
655
|
interface ShardEmbeddingSetMember {
|
|
557
656
|
embedding_set_id: string;
|
|
558
657
|
note_id: string;
|
|
559
|
-
|
|
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;
|
|
560
674
|
}
|
|
561
675
|
/** Embedding as serialized in the shard JSONL. */
|
|
562
676
|
interface ShardEmbedding {
|
|
563
677
|
id: string;
|
|
564
678
|
note_id: string;
|
|
565
|
-
|
|
679
|
+
chunk_index: number;
|
|
680
|
+
text: string;
|
|
566
681
|
vector: number[];
|
|
567
|
-
|
|
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;
|
|
568
687
|
}
|
|
569
688
|
/** SKOS scheme as serialized in the shard JSON array. */
|
|
570
689
|
interface ShardSkosScheme {
|
|
@@ -717,7 +836,8 @@ interface BrowserNoteExport {
|
|
|
717
836
|
deleted_at: Date | string | null;
|
|
718
837
|
original_content: string;
|
|
719
838
|
revised_content: string | null;
|
|
720
|
-
|
|
839
|
+
collection_id?: string | null;
|
|
840
|
+
attachments?: ShardAttachmentProjection[];
|
|
721
841
|
tags: string[];
|
|
722
842
|
}
|
|
723
843
|
/** Convert a browser note to shard format. */
|
|
@@ -726,14 +846,26 @@ declare function noteToShard(note: BrowserNoteExport): ShardNote;
|
|
|
726
846
|
declare function noteFromShard(shard: ShardNote): BrowserNoteExport;
|
|
727
847
|
/** Convert a browser link to shard format. */
|
|
728
848
|
declare function linkToShard(link: LinkRow): ShardLink;
|
|
849
|
+
/** Convert a browser URL-target link row to shard format. */
|
|
850
|
+
declare function urlLinkToShard(link: {
|
|
851
|
+
id: string;
|
|
852
|
+
source_note_id: string;
|
|
853
|
+
to_url: string;
|
|
854
|
+
link_type: string;
|
|
855
|
+
confidence: number | null;
|
|
856
|
+
metadata_json?: Record<string, unknown> | string | null;
|
|
857
|
+
created_at: Date | string;
|
|
858
|
+
}): ShardLink;
|
|
729
859
|
/** Convert a shard link back to browser-insertable format. */
|
|
730
860
|
declare function linkFromShard(shard: ShardLink): {
|
|
731
861
|
id: string;
|
|
732
862
|
source_note_id: string;
|
|
733
|
-
target_note_id: string;
|
|
863
|
+
target_note_id: string | null;
|
|
864
|
+
to_url: string | null;
|
|
734
865
|
link_type: string;
|
|
735
866
|
confidence: number | null;
|
|
736
867
|
created_at: string;
|
|
868
|
+
metadata: Record<string, unknown> | null;
|
|
737
869
|
};
|
|
738
870
|
/** Convert a browser collection to shard format. */
|
|
739
871
|
declare function collectionToShard(collection: CollectionRow, noteCount?: number): ShardCollection;
|
|
@@ -753,16 +885,29 @@ declare function tagsToShard(allTags: Array<{
|
|
|
753
885
|
name: string;
|
|
754
886
|
created_at: Date | string;
|
|
755
887
|
}>): ShardTag[];
|
|
756
|
-
/**
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
888
|
+
/** Convert a browser template row to shard format. */
|
|
889
|
+
declare function templateToShard(template: {
|
|
890
|
+
id: string;
|
|
891
|
+
name: string;
|
|
892
|
+
description: string | null;
|
|
893
|
+
content: string;
|
|
894
|
+
format: string;
|
|
895
|
+
default_tags: string[] | string;
|
|
896
|
+
collection_id: string | null;
|
|
897
|
+
created_at: Date | string;
|
|
898
|
+
updated_at: Date | string;
|
|
899
|
+
}): ShardTemplate;
|
|
761
900
|
/** Convert a browser embedding_set to shard format. */
|
|
762
901
|
declare function embeddingSetToShard(set: {
|
|
763
902
|
id: string;
|
|
764
903
|
name?: string;
|
|
904
|
+
slug?: string | null;
|
|
905
|
+
description?: string | null;
|
|
765
906
|
purpose?: string | null;
|
|
907
|
+
document_count?: number | null;
|
|
908
|
+
embedding_count?: number | null;
|
|
909
|
+
is_system?: boolean | null;
|
|
910
|
+
keywords_json?: unknown | null;
|
|
766
911
|
model_name: string;
|
|
767
912
|
dimensions: number;
|
|
768
913
|
kind?: 'physical' | 'filter' | 'virtual';
|
|
@@ -777,10 +922,16 @@ declare function embeddingSetToShard(set: {
|
|
|
777
922
|
updated_at?: Date | string;
|
|
778
923
|
}): ShardEmbeddingSet;
|
|
779
924
|
/** Convert a shard embedding set back to browser format. */
|
|
780
|
-
declare function embeddingSetFromShard(shard: ShardEmbeddingSet): {
|
|
925
|
+
declare function embeddingSetFromShard(shard: ShardEmbeddingSet, fallbackCreatedAt: string): {
|
|
781
926
|
id: string;
|
|
782
927
|
name: string;
|
|
928
|
+
slug: string | null;
|
|
929
|
+
description: string | null;
|
|
783
930
|
purpose: string | null;
|
|
931
|
+
document_count: number | null;
|
|
932
|
+
embedding_count: number | null;
|
|
933
|
+
is_system: boolean;
|
|
934
|
+
keywords_json: string | null;
|
|
784
935
|
model_name: string;
|
|
785
936
|
dimensions: number;
|
|
786
937
|
kind: 'physical' | 'filter' | 'virtual';
|
|
@@ -798,23 +949,34 @@ declare function embeddingSetFromShard(shard: ShardEmbeddingSet): {
|
|
|
798
949
|
declare function embeddingSetMemberToShard(member: {
|
|
799
950
|
embedding_set_id: string;
|
|
800
951
|
note_id: string;
|
|
801
|
-
|
|
952
|
+
membership_type?: string | null;
|
|
953
|
+
added_at?: Date | string | null;
|
|
954
|
+
added_by?: string | null;
|
|
802
955
|
}): ShardEmbeddingSetMember;
|
|
956
|
+
/** Convert a browser embedding_config row to shard format. */
|
|
957
|
+
declare function embeddingConfigToShard(config: ShardEmbeddingConfig): ShardEmbeddingConfig;
|
|
803
958
|
/** Convert a browser embedding to shard format. */
|
|
804
959
|
declare function embeddingToShard(emb: {
|
|
805
960
|
id: string;
|
|
806
961
|
note_id: string;
|
|
807
962
|
embedding_set_id: string;
|
|
963
|
+
chunk_index?: number | null;
|
|
964
|
+
text?: string | null;
|
|
808
965
|
vector: string | number[];
|
|
966
|
+
model?: string | null;
|
|
967
|
+
model_name?: string | null;
|
|
809
968
|
created_at: Date | string;
|
|
810
969
|
}): ShardEmbedding;
|
|
811
970
|
/** Convert a shard embedding back to browser format. */
|
|
812
971
|
declare function embeddingFromShard(shard: ShardEmbedding): {
|
|
813
972
|
id: string;
|
|
814
973
|
note_id: string;
|
|
815
|
-
embedding_set_id: string;
|
|
974
|
+
embedding_set_id: string | null;
|
|
975
|
+
chunk_index: number;
|
|
976
|
+
text: string;
|
|
816
977
|
vector: string;
|
|
817
|
-
|
|
978
|
+
model: string;
|
|
979
|
+
created_at: string | null;
|
|
818
980
|
};
|
|
819
981
|
declare function skosSchemeToShard(scheme: {
|
|
820
982
|
id: string;
|
|
@@ -938,6 +1100,8 @@ interface OpenShardOptions {
|
|
|
938
1100
|
semantic?: StaticSemanticProvider;
|
|
939
1101
|
/** Bounds the cross-page search match cache (total cached note records). Default 5000. */
|
|
940
1102
|
maxCachedMatches?: number;
|
|
1103
|
+
/** Maximum bytes fetched for any unpacked component. Default 256 MiB. */
|
|
1104
|
+
maxComponentBytes?: number;
|
|
941
1105
|
}
|
|
942
1106
|
/** Reads shard component/cluster files from a packed map or a static base URL. */
|
|
943
1107
|
interface ShardComponentStore {
|
|
@@ -1039,7 +1203,8 @@ interface BackendNoteFull extends BackendNote {
|
|
|
1039
1203
|
interface BackendLink {
|
|
1040
1204
|
id: string;
|
|
1041
1205
|
fromNoteId: string;
|
|
1042
|
-
toNoteId: string;
|
|
1206
|
+
toNoteId: string | null;
|
|
1207
|
+
toUrl?: string | null;
|
|
1043
1208
|
kind: string;
|
|
1044
1209
|
score: number | null;
|
|
1045
1210
|
createdAt: string;
|
|
@@ -1300,6 +1465,20 @@ declare class ArchiveManager {
|
|
|
1300
1465
|
private archives;
|
|
1301
1466
|
private persistence;
|
|
1302
1467
|
private backendFactory;
|
|
1468
|
+
/**
|
|
1469
|
+
* Persistence is a PLUGGABLE, opt-in backend (issue #261). Pass a
|
|
1470
|
+
* `StorageBackendFactory` to run against any `StorageBackend`
|
|
1471
|
+
* implementation; PGlite is merely the built-in default, selected only when
|
|
1472
|
+
* the convenience `PersistenceMode` string form is used. Because
|
|
1473
|
+
* `defaultStorageBackendFactory` reaches PGlite through the lazily-imported
|
|
1474
|
+
* `createPGliteInstance` (see `db.ts`), a consumer that supplies its own
|
|
1475
|
+
* factory — or never opens an archive at all — never pulls the PGlite WASM
|
|
1476
|
+
* engine into its bundle.
|
|
1477
|
+
*
|
|
1478
|
+
* @param persistenceOrFactory `PersistenceMode` string (uses the built-in
|
|
1479
|
+
* PGlite backend) OR a custom `StorageBackendFactory`.
|
|
1480
|
+
* @param persistenceOverride persistence hint passed to a custom factory.
|
|
1481
|
+
*/
|
|
1303
1482
|
constructor(persistenceOrFactory: PersistenceMode | StorageBackendFactory, events?: TypedEventBus | undefined, persistenceOverride?: PersistenceMode);
|
|
1304
1483
|
getCurrentArchiveName(): string;
|
|
1305
1484
|
getDb(): StorageBackend | null;
|
|
@@ -1335,15 +1514,91 @@ interface FortemiCore {
|
|
|
1335
1514
|
declare function createFortemi(config: FortemiConfig): FortemiCore;
|
|
1336
1515
|
|
|
1337
1516
|
/**
|
|
1338
|
-
* Compute a
|
|
1517
|
+
* Compute a browser-local content-identity hash (SHA-256), encoded as
|
|
1518
|
+
* `sha256:<64-char lowercase hex>`.
|
|
1339
1519
|
*
|
|
1340
|
-
*
|
|
1341
|
-
*
|
|
1520
|
+
* This is an internal identity/dedup digest used for note content, embedding
|
|
1521
|
+
* configs, the AIWG index, and graph identity — NOT the server's attachment
|
|
1522
|
+
* content-hash convention. Binary-attachment blobs use {@link computeBlobHash}
|
|
1523
|
+
* (BLAKE3), which is the canonical checksum defined by the binary-attachment
|
|
1524
|
+
* projection contract (`checksum: "blake3:<hex>"`). Keeping these two functions
|
|
1525
|
+
* separate preserves JSON format parity for the identity hashes above while
|
|
1526
|
+
* letting attachments match the server's `compute_content_hash`.
|
|
1342
1527
|
*
|
|
1343
1528
|
* @param data - Raw bytes to hash
|
|
1344
1529
|
* @returns `'sha256:<64-char lowercase hex>'`
|
|
1345
1530
|
*/
|
|
1346
1531
|
declare function computeHash(data: Uint8Array): string;
|
|
1532
|
+
/**
|
|
1533
|
+
* Compute the canonical attachment content hash: **BLAKE3**, encoded as
|
|
1534
|
+
* `blake3:<64-char lowercase hex>`.
|
|
1535
|
+
*
|
|
1536
|
+
* Matches the fortemi server (`crates/matric-db/src/file_storage.rs`
|
|
1537
|
+
* `compute_content_hash`) and the portable Knowledge-Shard byte-sidecar
|
|
1538
|
+
* contract, where the sidecar tar entry name is the bare hex (the `blake3:`
|
|
1539
|
+
* prefix stripped). SubtleCrypto has no BLAKE3, so this uses `@noble/hashes`.
|
|
1540
|
+
*
|
|
1541
|
+
* @param data - Raw attachment bytes to hash
|
|
1542
|
+
* @returns `'blake3:<64-char lowercase hex>'`
|
|
1543
|
+
*/
|
|
1544
|
+
declare function computeBlobHash(data: Uint8Array): string;
|
|
1545
|
+
|
|
1546
|
+
declare const FORTEMI_COMPATIBILITY_PATH = "/api/v1/system/compatibility";
|
|
1547
|
+
declare const FORTEMI_COMPATIBILITY_STATES: readonly ["available", "degraded", "preview", "unavailable", "unknown"];
|
|
1548
|
+
type FortemiCompatibilityState = (typeof FORTEMI_COMPATIBILITY_STATES)[number];
|
|
1549
|
+
declare const FORTEMI_REQUIRED_COMPATIBILITY_CAPABILITIES: readonly ["core_notes", "search", "jobs", "realtime_activity", "hosted_auth", "premium_components", "backoffice_api", "audit_posture", "quota_status", "kms_status", "mcp_scope_gate"];
|
|
1550
|
+
type FortemiRequiredCompatibilityCapability = (typeof FORTEMI_REQUIRED_COMPATIBILITY_CAPABILITIES)[number];
|
|
1551
|
+
interface FortemiCompatibilityCapability {
|
|
1552
|
+
state: FortemiCompatibilityState;
|
|
1553
|
+
reason_code?: string;
|
|
1554
|
+
}
|
|
1555
|
+
interface FortemiCompatibilityResponse {
|
|
1556
|
+
schema_version: number;
|
|
1557
|
+
contract_revision: string;
|
|
1558
|
+
api: {
|
|
1559
|
+
name: string;
|
|
1560
|
+
version: string;
|
|
1561
|
+
minimum_hotm_enterprise_client: string;
|
|
1562
|
+
git_sha_present: boolean;
|
|
1563
|
+
build_date_present: boolean;
|
|
1564
|
+
};
|
|
1565
|
+
deployment: {
|
|
1566
|
+
mode: string;
|
|
1567
|
+
edition: string;
|
|
1568
|
+
hosted_multi_tenant_ready: boolean;
|
|
1569
|
+
};
|
|
1570
|
+
auth: {
|
|
1571
|
+
required: boolean;
|
|
1572
|
+
mode: string;
|
|
1573
|
+
oauth_issuer_configured: boolean;
|
|
1574
|
+
tenant_context_available: boolean;
|
|
1575
|
+
};
|
|
1576
|
+
capabilities: Record<string, FortemiCompatibilityCapability>;
|
|
1577
|
+
links: {
|
|
1578
|
+
openapi: string;
|
|
1579
|
+
asyncapi: string;
|
|
1580
|
+
health: string;
|
|
1581
|
+
streaming_health: string;
|
|
1582
|
+
};
|
|
1583
|
+
}
|
|
1584
|
+
interface FortemiCompatibilityValidationResult {
|
|
1585
|
+
ok: boolean;
|
|
1586
|
+
errors: string[];
|
|
1587
|
+
warnings: string[];
|
|
1588
|
+
response?: FortemiCompatibilityResponse;
|
|
1589
|
+
}
|
|
1590
|
+
interface FetchFortemiCompatibilityOptions {
|
|
1591
|
+
baseUrl?: string;
|
|
1592
|
+
fetchImpl?: typeof fetch;
|
|
1593
|
+
timeoutMs?: number;
|
|
1594
|
+
}
|
|
1595
|
+
declare function fortemiCompatibilityUrl(baseUrl?: string): string;
|
|
1596
|
+
declare function validateFortemiCompatibilityResponse(raw: unknown): FortemiCompatibilityValidationResult;
|
|
1597
|
+
declare function formatFortemiCompatibilitySummary(response: FortemiCompatibilityResponse): string;
|
|
1598
|
+
declare function fetchAndValidateFortemiCompatibility(options?: FetchFortemiCompatibilityOptions): Promise<FortemiCompatibilityValidationResult & {
|
|
1599
|
+
url: string;
|
|
1600
|
+
status?: number;
|
|
1601
|
+
}>;
|
|
1347
1602
|
|
|
1348
1603
|
interface SWRegistrationResult {
|
|
1349
1604
|
registered: boolean;
|
|
@@ -1377,36 +1632,6 @@ declare function createRoutes(): RouteHandler[];
|
|
|
1377
1632
|
*/
|
|
1378
1633
|
declare function matchRoute(routes: RouteHandler[], request: Request, url: URL): RouteHandler | null;
|
|
1379
1634
|
|
|
1380
|
-
/**
|
|
1381
|
-
* Content-addressable blob storage.
|
|
1382
|
-
*
|
|
1383
|
-
* Path format: blobs/{dir1}/{dir2}/{hash}
|
|
1384
|
-
* dir1 = first 2 hex chars of hash
|
|
1385
|
-
* dir2 = next 2 hex chars of hash
|
|
1386
|
-
* filename = full hash
|
|
1387
|
-
*
|
|
1388
|
-
* Two implementations are provided:
|
|
1389
|
-
* - OpfsBlobStore — Origin Private File System (Chrome/Edge 86+)
|
|
1390
|
-
* - IdbBlobStore — IndexedDB fallback (Firefox, Safari)
|
|
1391
|
-
*
|
|
1392
|
-
* Use createBlobStore() to get the best available implementation.
|
|
1393
|
-
* Export MemoryBlobStore for use in tests.
|
|
1394
|
-
*/
|
|
1395
|
-
interface BlobStore {
|
|
1396
|
-
write(hash: string, data: Uint8Array): Promise<void>;
|
|
1397
|
-
read(hash: string): Promise<Uint8Array | null>;
|
|
1398
|
-
remove(hash: string): Promise<void>;
|
|
1399
|
-
exists(hash: string): Promise<boolean>;
|
|
1400
|
-
}
|
|
1401
|
-
declare class MemoryBlobStore implements BlobStore {
|
|
1402
|
-
private store;
|
|
1403
|
-
write(hash: string, data: Uint8Array): Promise<void>;
|
|
1404
|
-
read(hash: string): Promise<Uint8Array | null>;
|
|
1405
|
-
remove(hash: string): Promise<void>;
|
|
1406
|
-
exists(hash: string): Promise<boolean>;
|
|
1407
|
-
}
|
|
1408
|
-
declare function createBlobStore(archiveName: string): BlobStore;
|
|
1409
|
-
|
|
1410
1635
|
/**
|
|
1411
1636
|
* Shared postMessage protocol types for the PGlite worker.
|
|
1412
1637
|
*
|
|
@@ -2378,19 +2603,19 @@ declare const CaptureKnowledgeInputSchema: z.ZodObject<{
|
|
|
2378
2603
|
}, {
|
|
2379
2604
|
content: string;
|
|
2380
2605
|
title?: string | undefined;
|
|
2381
|
-
tags?: string[] | undefined;
|
|
2382
2606
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2607
|
+
tags?: string[] | undefined;
|
|
2383
2608
|
}>, "many">>;
|
|
2384
2609
|
template: z.ZodOptional<z.ZodString>;
|
|
2385
2610
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2386
2611
|
}, "strip", z.ZodTypeAny, {
|
|
2387
2612
|
source: string;
|
|
2388
2613
|
format: "markdown" | "plain" | "html";
|
|
2389
|
-
visibility: "private" | "
|
|
2614
|
+
visibility: "private" | "shared" | "public";
|
|
2390
2615
|
action: "create" | "bulk_create" | "from_template";
|
|
2391
2616
|
title?: string | undefined;
|
|
2392
|
-
tags?: string[] | undefined;
|
|
2393
2617
|
archive_id?: string | undefined;
|
|
2618
|
+
tags?: string[] | undefined;
|
|
2394
2619
|
content?: string | undefined;
|
|
2395
2620
|
notes?: {
|
|
2396
2621
|
format: "markdown" | "plain" | "html";
|
|
@@ -2404,16 +2629,16 @@ declare const CaptureKnowledgeInputSchema: z.ZodObject<{
|
|
|
2404
2629
|
action: "create" | "bulk_create" | "from_template";
|
|
2405
2630
|
source?: string | undefined;
|
|
2406
2631
|
title?: string | undefined;
|
|
2407
|
-
tags?: string[] | undefined;
|
|
2408
2632
|
archive_id?: string | undefined;
|
|
2409
2633
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2410
|
-
visibility?: "private" | "
|
|
2634
|
+
visibility?: "private" | "shared" | "public" | undefined;
|
|
2635
|
+
tags?: string[] | undefined;
|
|
2411
2636
|
content?: string | undefined;
|
|
2412
2637
|
notes?: {
|
|
2413
2638
|
content: string;
|
|
2414
2639
|
title?: string | undefined;
|
|
2415
|
-
tags?: string[] | undefined;
|
|
2416
2640
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2641
|
+
tags?: string[] | undefined;
|
|
2417
2642
|
}[] | undefined;
|
|
2418
2643
|
template?: string | undefined;
|
|
2419
2644
|
variables?: Record<string, string> | undefined;
|
|
@@ -2460,17 +2685,17 @@ declare const SearchInputSchema: z.ZodObject<{
|
|
|
2460
2685
|
visibility: z.ZodOptional<z.ZodEnum<["private", "shared", "public"]>>;
|
|
2461
2686
|
include_facets: z.ZodDefault<z.ZodBoolean>;
|
|
2462
2687
|
}, "strip", z.ZodTypeAny, {
|
|
2463
|
-
query: string;
|
|
2464
|
-
offset: number;
|
|
2465
2688
|
limit: number;
|
|
2689
|
+
offset: number;
|
|
2466
2690
|
include_facets: boolean;
|
|
2467
|
-
mode: "
|
|
2691
|
+
mode: "auto" | "text" | "semantic" | "hybrid";
|
|
2692
|
+
query: string;
|
|
2468
2693
|
source?: string | undefined;
|
|
2469
|
-
tags?: string[] | undefined;
|
|
2470
2694
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2471
|
-
visibility?: "private" | "
|
|
2695
|
+
visibility?: "private" | "shared" | "public" | undefined;
|
|
2472
2696
|
is_starred?: boolean | undefined;
|
|
2473
2697
|
is_archived?: boolean | undefined;
|
|
2698
|
+
tags?: string[] | undefined;
|
|
2474
2699
|
collection_id?: string | undefined;
|
|
2475
2700
|
date_from?: Date | undefined;
|
|
2476
2701
|
date_to?: Date | undefined;
|
|
@@ -2479,18 +2704,18 @@ declare const SearchInputSchema: z.ZodObject<{
|
|
|
2479
2704
|
}, {
|
|
2480
2705
|
query: string;
|
|
2481
2706
|
source?: string | undefined;
|
|
2482
|
-
tags?: string[] | undefined;
|
|
2483
|
-
offset?: number | undefined;
|
|
2484
|
-
limit?: number | undefined;
|
|
2485
2707
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2486
|
-
visibility?: "private" | "
|
|
2708
|
+
visibility?: "private" | "shared" | "public" | undefined;
|
|
2487
2709
|
is_starred?: boolean | undefined;
|
|
2488
2710
|
is_archived?: boolean | undefined;
|
|
2711
|
+
tags?: string[] | undefined;
|
|
2712
|
+
limit?: number | undefined;
|
|
2713
|
+
offset?: number | undefined;
|
|
2489
2714
|
collection_id?: string | undefined;
|
|
2490
2715
|
date_from?: Date | undefined;
|
|
2491
2716
|
date_to?: Date | undefined;
|
|
2492
2717
|
include_facets?: boolean | undefined;
|
|
2493
|
-
mode?: "
|
|
2718
|
+
mode?: "auto" | "text" | "semantic" | "hybrid" | undefined;
|
|
2494
2719
|
embeddingSetId?: string | undefined;
|
|
2495
2720
|
query_embedding?: number[] | undefined;
|
|
2496
2721
|
}>;
|
|
@@ -2570,22 +2795,22 @@ declare const ListNotesInputSchema: z.ZodObject<{
|
|
|
2570
2795
|
collection_id: z.ZodOptional<z.ZodString>;
|
|
2571
2796
|
include_deleted: z.ZodOptional<z.ZodBoolean>;
|
|
2572
2797
|
}, "strip", z.ZodTypeAny, {
|
|
2573
|
-
sort: "
|
|
2574
|
-
offset: number;
|
|
2798
|
+
sort: "created_at" | "updated_at" | "title";
|
|
2575
2799
|
limit: number;
|
|
2800
|
+
offset: number;
|
|
2576
2801
|
order: "asc" | "desc";
|
|
2577
|
-
tags?: string[] | undefined;
|
|
2578
2802
|
is_starred?: boolean | undefined;
|
|
2579
2803
|
is_archived?: boolean | undefined;
|
|
2804
|
+
tags?: string[] | undefined;
|
|
2580
2805
|
include_deleted?: boolean | undefined;
|
|
2581
2806
|
collection_id?: string | undefined;
|
|
2582
2807
|
}, {
|
|
2583
|
-
|
|
2584
|
-
sort?: "title" | "updated_at" | "created_at" | undefined;
|
|
2585
|
-
offset?: number | undefined;
|
|
2586
|
-
limit?: number | undefined;
|
|
2808
|
+
sort?: "created_at" | "updated_at" | "title" | undefined;
|
|
2587
2809
|
is_starred?: boolean | undefined;
|
|
2588
2810
|
is_archived?: boolean | undefined;
|
|
2811
|
+
tags?: string[] | undefined;
|
|
2812
|
+
limit?: number | undefined;
|
|
2813
|
+
offset?: number | undefined;
|
|
2589
2814
|
order?: "asc" | "desc" | undefined;
|
|
2590
2815
|
include_deleted?: boolean | undefined;
|
|
2591
2816
|
collection_id?: string | undefined;
|
|
@@ -2599,12 +2824,12 @@ declare const ManageTagsInputSchema: z.ZodObject<{
|
|
|
2599
2824
|
tag: z.ZodOptional<z.ZodString>;
|
|
2600
2825
|
}, "strip", z.ZodTypeAny, {
|
|
2601
2826
|
action: "add" | "remove" | "list_for_note" | "list_all";
|
|
2602
|
-
tag?: string | undefined;
|
|
2603
2827
|
note_id?: string | undefined;
|
|
2828
|
+
tag?: string | undefined;
|
|
2604
2829
|
}, {
|
|
2605
2830
|
action: "add" | "remove" | "list_for_note" | "list_all";
|
|
2606
|
-
tag?: string | undefined;
|
|
2607
2831
|
note_id?: string | undefined;
|
|
2832
|
+
tag?: string | undefined;
|
|
2608
2833
|
}>;
|
|
2609
2834
|
type ManageTagsInput = z.infer<typeof ManageTagsInputSchema>;
|
|
2610
2835
|
interface ManageTagsResult {
|
|
@@ -2626,17 +2851,17 @@ declare const ManageCollectionsInputSchema: z.ZodObject<{
|
|
|
2626
2851
|
note_id: z.ZodOptional<z.ZodString>;
|
|
2627
2852
|
}, "strip", z.ZodTypeAny, {
|
|
2628
2853
|
action: "create" | "delete" | "list" | "assign" | "unassign" | "list_tree";
|
|
2629
|
-
name?: string | undefined;
|
|
2630
|
-
description?: string | undefined;
|
|
2631
2854
|
collection_id?: string | undefined;
|
|
2632
2855
|
note_id?: string | undefined;
|
|
2856
|
+
name?: string | undefined;
|
|
2857
|
+
description?: string | undefined;
|
|
2633
2858
|
parent_id?: string | undefined;
|
|
2634
2859
|
}, {
|
|
2635
2860
|
action: "create" | "delete" | "list" | "assign" | "unassign" | "list_tree";
|
|
2636
|
-
name?: string | undefined;
|
|
2637
|
-
description?: string | undefined;
|
|
2638
2861
|
collection_id?: string | undefined;
|
|
2639
2862
|
note_id?: string | undefined;
|
|
2863
|
+
name?: string | undefined;
|
|
2864
|
+
description?: string | undefined;
|
|
2640
2865
|
parent_id?: string | undefined;
|
|
2641
2866
|
}>;
|
|
2642
2867
|
type ManageCollectionsInput = z.infer<typeof ManageCollectionsInputSchema>;
|
|
@@ -2776,9 +3001,11 @@ declare class AttachmentsRepository {
|
|
|
2776
3001
|
/**
|
|
2777
3002
|
* Attach a binary file to a note.
|
|
2778
3003
|
*
|
|
2779
|
-
* If a blob with the same
|
|
3004
|
+
* If a blob with the same BLAKE3 content hash already exists, the existing
|
|
2780
3005
|
* blob row is reused (deduplication). Otherwise a new blob row is inserted
|
|
2781
|
-
* and the raw bytes are written to the BlobStore.
|
|
3006
|
+
* and the raw bytes are written to the BlobStore. The BLAKE3 `content_hash`
|
|
3007
|
+
* (`blake3:<hex>`) matches the server convention and is the key used by the
|
|
3008
|
+
* portable Knowledge-Shard byte sidecar.
|
|
2782
3009
|
*
|
|
2783
3010
|
* Returns the newly created AttachmentRow.
|
|
2784
3011
|
*/
|
|
@@ -3574,7 +3801,9 @@ declare function createCspReportHandler(onReport: (report: CspViolationReport) =
|
|
|
3574
3801
|
* @param files Map of filename → file contents
|
|
3575
3802
|
* @returns Compressed archive bytes (suitable for .shard file)
|
|
3576
3803
|
*/
|
|
3577
|
-
declare function packTarGz(files: Map<string, Uint8Array
|
|
3804
|
+
declare function packTarGz(files: Map<string, Uint8Array>, opts?: {
|
|
3805
|
+
maxDecompressedBytes?: number;
|
|
3806
|
+
}): Uint8Array;
|
|
3578
3807
|
/**
|
|
3579
3808
|
* Unpack a gzip-compressed tar archive.
|
|
3580
3809
|
*
|
|
@@ -3655,6 +3884,17 @@ declare function exportShard(db: DatabaseClient, options?: ExportOptions): Promi
|
|
|
3655
3884
|
*/
|
|
3656
3885
|
declare function importShard(db: DatabaseClient, data: Uint8Array | ArrayBuffer, options?: ImportOptions): Promise<ImportResult>;
|
|
3657
3886
|
|
|
3887
|
+
interface ShardSchemaValidationResult {
|
|
3888
|
+
valid: boolean;
|
|
3889
|
+
errors: string[];
|
|
3890
|
+
}
|
|
3891
|
+
type ShardFiles = Map<string, Uint8Array>;
|
|
3892
|
+
declare function getKnowledgeShardSchema(): unknown;
|
|
3893
|
+
declare function validateShardManifest(value: unknown): ShardSchemaValidationResult;
|
|
3894
|
+
declare function validateShardArchive(input: Uint8Array | ArrayBuffer | ShardFiles): ShardSchemaValidationResult;
|
|
3895
|
+
declare function validateShardComponentRecord(component: ShardComponent | 'templates', value: unknown): ShardSchemaValidationResult;
|
|
3896
|
+
declare function assertShardComponentRecord(component: ShardComponent | 'templates', value: unknown): void;
|
|
3897
|
+
|
|
3658
3898
|
/**
|
|
3659
3899
|
* Pluggable semantic providers for the in-place shard reader (issue #189).
|
|
3660
3900
|
*
|
|
@@ -3821,6 +4061,473 @@ declare function getPrefetchedSha256(url: string): string | undefined;
|
|
|
3821
4061
|
*/
|
|
3822
4062
|
declare function clearPrefetchedShard(url?: string): void;
|
|
3823
4063
|
|
|
3824
|
-
|
|
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 {
|
|
4236
|
+
valid: boolean;
|
|
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;
|
|
4304
|
+
}
|
|
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
|
+
};
|
|
4530
|
+
|
|
4531
|
+
declare const VERSION = "2026.7.5";
|
|
3825
4532
|
|
|
3826
|
-
export { 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, 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, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FortemiBridge, type FortemiBridgeCapabilities, type FortemiBridgeHost, type FortemiConfig, type FortemiCore, type FortemiInferenceRouter, type FortemiSecretStore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, type ImportCounts, type ImportOptions, type ImportProgress, type ImportProgressPhase, type ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, MemoryBlobStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type 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 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 ShardSearchOptions, type ShardSearchRankedNote, type ShardSearchResult, type ShardSearchWeights, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, 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, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createBlobStore, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRemoteBackend, createRoutes, createShardBackend, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dumpDbSnapshot, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchPluginScript, fortemiManifest, fromPrefetched, generateId, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, 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, tagsFromShard, tagsToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, validateChecksums, 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 };
|