@fortemi/core 2026.7.5 → 2026.7.7

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,4 +1,5 @@
1
1
  import { PGlite } from '@electric-sql/pglite';
2
+ import { ProbeReport } from '@bytecask/core';
2
3
  import { z, ZodType } from 'zod';
3
4
  export { AiwgIndexSchemaValidationResult, getAiwgFortemiIndexExportSchema, validateAiwgFortemiIndexExportSchema, validateAiwgFortemiProjectedRecordSchema } from './aiwg-index-schema.js';
4
5
 
@@ -390,34 +391,233 @@ declare class PGliteWorkerStorageBackendFactory implements StorageBackendFactory
390
391
  }
391
392
 
392
393
  /**
393
- * Content-addressable blob storage.
394
+ * Content-addressed attachment-byte storage — the Fortemi `BlobStore` seam.
394
395
  *
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
396
+ * The store computes the key: `put(bytes)` BLAKE3-hashes the payload and
397
+ * returns the canonical checksum encoding `blake3:<64-char lowercase hex>`
398
+ * (server convention; ADR-012 D1/D3). Every method at this seam speaks that
399
+ * canonical encoding — the bare-hex ⇄ prefixed conversions live in
400
+ * `shard/blob-sidecar.ts` helpers and inside the bytecask adapter here, and
401
+ * nowhere else.
399
402
  *
400
- * Two implementations are provided:
401
- * - OpfsBlobStore — Origin Private File System (Chrome/Edge 86+)
402
- * - IdbBlobStore — IndexedDB fallback (Firefox, Safari)
403
+ * Lifecycle authority (ADR-013 D2): canonical attachment manifests decide
404
+ * which bytes are live. `reconcile(liveChecksums)` hands that authoritative
405
+ * set to the store; `gc()` physically removes only unreferenced,
406
+ * age-thresholded objects. Internal refcounts are an implementation detail,
407
+ * never a source of truth.
403
408
  *
404
- * Use createBlobStore() to get the best available implementation.
405
- * Export MemoryBlobStore for use in tests.
409
+ * Implementations:
410
+ * - `createBlobStore()` — `@bytecask/core` behind a dynamic import
411
+ * (IndexedDB tier by default, OPFS opt-in, memory fallback). Zero bundle
412
+ * cost until the first byte operation (ADR-012 D6).
413
+ * - `createLazyBlobStore()` — synchronous facade that defers the dynamic
414
+ * import until the first method call (what `FortemiProvider` wires).
415
+ * - `MemoryBlobStore` — dependency-free in-process implementation for
416
+ * tests and the no-persistence tier.
417
+ */
418
+
419
+ type BlobBackendKind = 'idb' | 'opfs' | 'memory';
420
+ interface BlobStoreDiagnostics {
421
+ /** The storage tier actually serving bytes. */
422
+ backend: BlobBackendKind;
423
+ /** Tier-probe outcome from `@bytecask/core` (null for memory/test stores). */
424
+ probe: ProbeReport | null;
425
+ }
426
+ interface BlobReconcileOptions {
427
+ /** Physically remove unreferenced objects now instead of leaving them for gc(). */
428
+ removeUnreferenced?: boolean;
429
+ }
430
+ interface BlobReconcileResult {
431
+ /** Live checksums whose bytes are present. */
432
+ referenced: number;
433
+ /** Live checksums whose bytes are absent — the reference-only set. */
434
+ missing: string[];
435
+ /** Stored checksums not in the live set — GC candidates. */
436
+ unreferenced: string[];
437
+ /** Objects physically removed (only when `removeUnreferenced`). */
438
+ removed: number;
439
+ bytesFreed: number;
440
+ }
441
+ interface BlobGcOptions {
442
+ /** Collect only unreferenced objects at least this old (ms). Default 0. */
443
+ minAgeMs?: number;
444
+ }
445
+ interface BlobGcResult {
446
+ collected: number;
447
+ bytesFreed: number;
448
+ }
449
+ /**
450
+ * The Fortemi attachment-byte seam. All checksums are the canonical
451
+ * `blake3:<hex>` encoding stored in `attachment_blob.content_hash` and shard
452
+ * projection records.
406
453
  */
407
454
  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>;
455
+ /** Store bytes, return their canonical checksum. Idempotent (content-addressed). */
456
+ put(bytes: Uint8Array): Promise<string>;
457
+ /** Fetch bytes by canonical checksum; null when absent (reference-only). */
458
+ read(checksum: string): Promise<Uint8Array | null>;
459
+ /** True when the bytes for this checksum are physically present. */
460
+ has(checksum: string): Promise<boolean>;
461
+ /**
462
+ * Reconcile stored bytes against the authoritative live-checksum set
463
+ * derived from canonical attachment manifests (ADR-013 D4).
464
+ */
465
+ reconcile(liveChecksums: Iterable<string>, opts?: BlobReconcileOptions): Promise<BlobReconcileResult>;
466
+ /** Physically remove unreferenced, age-thresholded objects. */
467
+ gc(opts?: BlobGcOptions): Promise<BlobGcResult>;
468
+ /** Selected backend + probe report, for capability/diagnostic surfaces. */
469
+ diagnostics(): Promise<BlobStoreDiagnostics>;
470
+ close(): Promise<void>;
412
471
  }
413
472
  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>;
473
+ private now;
474
+ private entries;
475
+ constructor(now?: () => number);
476
+ put(bytes: Uint8Array): Promise<string>;
477
+ read(checksum: string): Promise<Uint8Array | null>;
478
+ has(checksum: string): Promise<boolean>;
479
+ reconcile(liveChecksums: Iterable<string>, opts?: BlobReconcileOptions): Promise<BlobReconcileResult>;
480
+ gc(opts?: BlobGcOptions): Promise<BlobGcResult>;
481
+ diagnostics(): Promise<BlobStoreDiagnostics>;
482
+ close(): Promise<void>;
419
483
  }
420
- declare function createBlobStore(archiveName: string): BlobStore;
484
+ interface CreateBlobStoreOptions {
485
+ /** Force a tier; omit to probe IndexedDB → OPFS → memory (measured default). */
486
+ backend?: BlobBackendKind;
487
+ /** Injectable IDBFactory for tests (fake-indexeddb). Defaults to the global. */
488
+ indexedDB?: IDBFactory;
489
+ /** Skip the one-shot migration of the pre-bytecask blob layout. */
490
+ migrateLegacy?: boolean;
491
+ }
492
+ /**
493
+ * Construct the bytecask-backed BlobStore for one archive namespace.
494
+ *
495
+ * `@bytecask/core` is reached only through a dynamic `import()` here, so
496
+ * hosts that never touch attachment bytes never load it. The namespace is a
497
+ * function of `archiveName` alone — identical in DB-free and PGlite modes.
498
+ *
499
+ * Tiering: IndexedDB by default (measured default per bytecask's C3
500
+ * benchmark), memory fallback when IndexedDB is unavailable. The OPFS opt-in
501
+ * tier arrives with the upstream `createBlobStore()` factory switch
502
+ * (`@bytecask/core` 2026.7.2); requesting it now fails loudly rather than
503
+ * silently falling back.
504
+ */
505
+ declare function createBlobStore(archiveName: string, options?: CreateBlobStoreOptions): Promise<BlobStore>;
506
+ /**
507
+ * Synchronous facade over {@link createBlobStore}: construction is free, the
508
+ * dynamic import happens on the first byte operation. This is what
509
+ * `FortemiProvider` wires so hosts that never touch attachment bytes never
510
+ * pay for the substrate (ADR-012 D6).
511
+ */
512
+ declare function createLazyBlobStore(archiveName: string, options?: CreateBlobStoreOptions): BlobStore;
513
+
514
+ /**
515
+ * Signed Knowledge-Shard verification (#324, ADR-014).
516
+ *
517
+ * Authenticity — as distinct from the consistency the in-archive checksums
518
+ * provide (SEC7) — comes from an Ed25519 signature over a canonical payload
519
+ * that commits to the manifest digest and the referenced blob-byte digests.
520
+ * Verification is pure and side-effect-free; it runs BEFORE any record or
521
+ * blob mutation (ADR-013 D6 / ADR-014 D3). Bytecask never sees keys.
522
+ */
523
+
524
+ declare const SIGNATURE_ENTRY = "signature.json";
525
+ declare const SIGNING_ENVELOPE_VERSION = "1";
526
+ declare const SIGNING_ALGORITHM = "ed25519";
527
+ interface ShardSigner {
528
+ key_id: string;
529
+ algorithm: typeof SIGNING_ALGORITHM;
530
+ /** Raw 32-byte Ed25519 public key, base64url. */
531
+ public_key: string;
532
+ }
533
+ /** The signed payload (never contains its own signature — ADR-014 D2). */
534
+ interface ShardSigningPayload {
535
+ format_version: typeof SIGNING_ENVELOPE_VERSION;
536
+ signer: ShardSigner;
537
+ /** SHA-256 hex of the canonical manifest.json bytes. */
538
+ manifest_digest: string;
539
+ /** Sorted bare-hex BLAKE3 digests of referenced sidecar blobs. */
540
+ blob_digests: string[];
541
+ }
542
+ /** `signature.json` archive entry: the payload plus its base64url signature. */
543
+ interface ShardSignatureEnvelope extends ShardSigningPayload {
544
+ signature: string;
545
+ }
546
+ interface TrustedKey {
547
+ key_id: string;
548
+ /** Raw 32-byte Ed25519 public key, base64url. */
549
+ public_key: string;
550
+ revoked?: boolean;
551
+ }
552
+ interface ShardTrustStore {
553
+ resolve(keyId: string): TrustedKey | null | Promise<TrustedKey | null>;
554
+ }
555
+ /** In-memory allowlist trust store seeded from `{ key_id, public_key }` entries. */
556
+ declare class AllowlistTrustStore implements ShardTrustStore {
557
+ private keys;
558
+ constructor(keys: TrustedKey[]);
559
+ resolve(keyId: string): TrustedKey | null;
560
+ /** Mark a key revoked without removing it (still resolvable, verdict `revoked`). */
561
+ revoke(keyId: string): void;
562
+ }
563
+ type ShardSignatureVerdict = {
564
+ ok: true;
565
+ keyId: string;
566
+ } | {
567
+ ok: false;
568
+ reason: 'unsigned';
569
+ } | {
570
+ ok: false;
571
+ reason: 'malformed';
572
+ detail: string;
573
+ } | {
574
+ ok: false;
575
+ reason: 'unknown-signer';
576
+ keyId: string;
577
+ } | {
578
+ ok: false;
579
+ reason: 'revoked';
580
+ keyId: string;
581
+ } | {
582
+ ok: false;
583
+ reason: 'bad-signature';
584
+ keyId: string;
585
+ } | {
586
+ ok: false;
587
+ reason: 'content-mismatch';
588
+ detail: string;
589
+ } | {
590
+ ok: false;
591
+ reason: 'unsupported';
592
+ };
593
+ /** True when this runtime's WebCrypto verifies Ed25519 (ADR-014 D1). */
594
+ declare function isShardSigningSupported(): Promise<boolean>;
595
+ /** Sorted bare-hex BLAKE3 digests of the sidecar blobs present in the archive. */
596
+ declare function sidecarBlobDigests(files: Map<string, Uint8Array>): string[];
597
+ interface VerifyShardSignatureInput {
598
+ files: Map<string, Uint8Array>;
599
+ trustStore: ShardTrustStore;
600
+ }
601
+ /**
602
+ * Verify a shard's Ed25519 signature over its canonical payload. Pure: reads
603
+ * archive bytes, resolves the key, checks the signature and the
604
+ * manifest/blob-digest commitments. No persistence, no mutation.
605
+ */
606
+ declare function verifyShardSignature(input: VerifyShardSignatureInput): Promise<ShardSignatureVerdict>;
607
+ interface SignShardInput {
608
+ files: Map<string, Uint8Array>;
609
+ keyId: string;
610
+ /** Ed25519 private key (raw 32-byte seed or PKCS8), imported by the caller. */
611
+ privateKey: CryptoKey;
612
+ /** Raw 32-byte public key, base64url — embedded in the envelope + trust store. */
613
+ publicKey: string;
614
+ }
615
+ /**
616
+ * Produce the `signature.json` envelope for an assembled archive `files` map.
617
+ * The caller adds the returned bytes to the archive under {@link SIGNATURE_ENTRY}
618
+ * (excluded from manifest.checksums — it post-dates the manifest).
619
+ */
620
+ declare function signShard(input: SignShardInput): Promise<Uint8Array>;
421
621
 
422
622
  /**
423
623
  * Shard format types — matches the fortemi server matric-shard specification.
@@ -533,6 +733,19 @@ interface ImportOptions {
533
733
  * bytes. Absent → attachments import as reference-only metadata (unchanged).
534
734
  */
535
735
  blobStore?: BlobStore;
736
+ /**
737
+ * Publisher-provenance policy for signed shards (#324, ADR-014):
738
+ * - `require` — reject unsigned or bad-signature shards (default when a
739
+ * `trustStore` is supplied);
740
+ * - `prefer` — verify signed shards; import unsigned ones with a warning;
741
+ * still reject a present-but-invalid signature;
742
+ * - `trusted-local-only` — ignore signatures (own-export import).
743
+ * When both `trustStore` and this are omitted, verification is skipped
744
+ * entirely (checksum-only, unchanged behavior).
745
+ */
746
+ verifySignature?: 'require' | 'prefer' | 'trusted-local-only';
747
+ /** Trust store resolving signer key_id → public key (required for `require`/`prefer`). */
748
+ trustStore?: ShardTrustStore;
536
749
  }
537
750
  type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'templates' | 'links' | 'provenance' | 'embedding_sets' | 'embedding_configs' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
538
751
  interface ImportProgress {
@@ -577,6 +790,7 @@ interface ShardNote {
577
790
  title: string | null;
578
791
  original_content: string;
579
792
  revised_content: string | null;
793
+ metadata?: Record<string, unknown> | null;
580
794
  collection_id?: string | null;
581
795
  attachments?: ShardAttachmentProjection[];
582
796
  /** @deprecated Legacy React shard field name. Use `attachments`. */
@@ -621,23 +835,31 @@ interface ShardLink {
621
835
  id: string;
622
836
  from_note_id: string;
623
837
  to_note_id: string | null;
624
- to_url: string | null;
838
+ /** Optional for legacy React shards exported before URL links existed. */
839
+ to_url?: string | null;
625
840
  kind: string;
626
841
  score: number | null;
627
842
  created_at: string;
628
- metadata: Record<string, unknown> | null;
843
+ /** Optional for legacy React shards exported before link metadata existed. */
844
+ metadata?: Record<string, unknown> | null;
629
845
  }
630
- /** Embedding set as serialized in the shard JSON array. */
846
+ /**
847
+ * Embedding set as serialized in the shard JSON array.
848
+ *
849
+ * Fields beyond id/model/dimension are optional for backward compatibility:
850
+ * legacy React shards omit them and import falls back to the same defaults
851
+ * `embeddingSetFromShard` applies (name → model, is_system → false, …).
852
+ */
631
853
  interface ShardEmbeddingSet {
632
854
  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[];
855
+ name?: string;
856
+ slug?: string | null;
857
+ description?: string | null;
858
+ purpose?: string | null;
859
+ document_count?: number;
860
+ embedding_count?: number;
861
+ is_system?: boolean;
862
+ keywords?: string[];
641
863
  model: string;
642
864
  dimension: number;
643
865
  kind?: 'physical' | 'filter' | 'virtual';
@@ -657,9 +879,12 @@ interface ShardEmbeddingSetMember {
657
879
  note_id: string;
658
880
  /** Legacy React shard field; new exports use server membership metadata instead. */
659
881
  embedding_id?: string;
660
- membership_type: string;
661
- added_at: string;
662
- added_by: string | null;
882
+ /** Optional for legacy React shards; import defaults to 'materialized'. */
883
+ membership_type?: string;
884
+ /** Optional for legacy React shards; import falls back to the manifest timestamp. */
885
+ added_at?: string;
886
+ /** Optional for legacy React shards; import defaults to NULL. */
887
+ added_by?: string | null;
663
888
  }
664
889
  /** Embedding config as serialized in the shard JSON array. */
665
890
  interface ShardEmbeddingConfig {
@@ -672,14 +897,21 @@ interface ShardEmbeddingConfig {
672
897
  chunk_overlap: number;
673
898
  is_default: boolean;
674
899
  }
675
- /** Embedding as serialized in the shard JSONL. */
900
+ /**
901
+ * Embedding as serialized in the shard JSONL.
902
+ *
903
+ * Server metadata fields (`chunk_index`, `text`, `model`) are optional for
904
+ * backward compatibility: legacy React shards exported before migration 0016
905
+ * carry only `id`, `note_id`, `embedding_set_id`, `vector`, `created_at`.
906
+ * Import normalizes absent metadata to schema defaults (0, '', NULL).
907
+ */
676
908
  interface ShardEmbedding {
677
909
  id: string;
678
910
  note_id: string;
679
- chunk_index: number;
680
- text: string;
911
+ chunk_index?: number;
912
+ text?: string;
681
913
  vector: number[];
682
- model: string;
914
+ model?: string;
683
915
  /** React shard extension used to preserve local embedding-set scoping. */
684
916
  embedding_set_id?: string;
685
917
  /** React shard extension used to preserve local creation ordering. */
@@ -836,6 +1068,7 @@ interface BrowserNoteExport {
836
1068
  deleted_at: Date | string | null;
837
1069
  original_content: string;
838
1070
  revised_content: string | null;
1071
+ ai_metadata?: Record<string, unknown> | null;
839
1072
  collection_id?: string | null;
840
1073
  attachments?: ShardAttachmentProjection[];
841
1074
  tags: string[];
@@ -975,7 +1208,7 @@ declare function embeddingFromShard(shard: ShardEmbedding): {
975
1208
  chunk_index: number;
976
1209
  text: string;
977
1210
  vector: string;
978
- model: string;
1211
+ model: string | null;
979
1212
  created_at: string | null;
980
1213
  };
981
1214
  declare function skosSchemeToShard(scheme: {
@@ -1632,6 +1865,34 @@ declare function createRoutes(): RouteHandler[];
1632
1865
  */
1633
1866
  declare function matchRoute(routes: RouteHandler[], request: Request, url: URL): RouteHandler | null;
1634
1867
 
1868
+ /**
1869
+ * One-shot migration of the pre-bytecask blob layout into the new store.
1870
+ *
1871
+ * The legacy layout (shipped through v2026.7.x) was:
1872
+ * - IndexedDB: database `fortemi-<archive>-blobs`, object store `blobs`,
1873
+ * values keyed by the full checksum string (`blake3:<hex>`, historically
1874
+ * also `sha256:<hex>`).
1875
+ * - OPFS: directory `fortemi-<archive>-blobs/<h0h1>/<h2h3>/<checksum>`.
1876
+ *
1877
+ * Migration re-`put()`s every payload — the new store recomputes BLAKE3, so
1878
+ * legacy `sha256:`-keyed entries converge to canonical keys for free
1879
+ * (ADR-012 D3). The legacy source is deleted only after every entry migrated
1880
+ * without error; any failure leaves it untouched for the next attempt.
1881
+ */
1882
+
1883
+ /** Outcome of one migration attempt (for diagnostics/logging). */
1884
+ interface LegacyMigrationReport {
1885
+ migrated: number;
1886
+ /** Migration aborted without deleting the legacy source. */
1887
+ failed: boolean;
1888
+ }
1889
+ /**
1890
+ * Migrate any legacy blob layout for `archiveName` into `target`, then delete
1891
+ * the legacy source. Failures are contained: the legacy data stays in place
1892
+ * and the new store keeps whatever was already re-put (idempotent on retry).
1893
+ */
1894
+ declare function migrateLegacyBlobStore(archiveName: string, target: BlobStore, indexedDbFactory?: IDBFactory): Promise<LegacyMigrationReport>;
1895
+
1635
1896
  /**
1636
1897
  * Shared postMessage protocol types for the PGlite worker.
1637
1898
  *
@@ -1967,6 +2228,13 @@ interface NoteCreateInput {
1967
2228
  visibility?: string;
1968
2229
  tags?: string[];
1969
2230
  archive_id?: string;
2231
+ /**
2232
+ * Explicit primary key. When omitted a UUIDv7 is minted (the default). Supply
2233
+ * this only for deterministic seeding or cross-instance identity — e.g. two
2234
+ * in-browser databases that must agree on a shared note's id so a shard swap
2235
+ * can dedupe it under the `skip` conflict strategy.
2236
+ */
2237
+ id?: string;
1970
2238
  }
1971
2239
  interface NoteUpdateInput {
1972
2240
  title?: string;
@@ -2959,11 +3227,13 @@ declare function manageCapabilities(capabilityManager: CapabilityManager, rawInp
2959
3227
  * AttachmentsRepository — attach and retrieve binary files linked to notes.
2960
3228
  *
2961
3229
  * Responsibilities:
2962
- * - Content-addressed blob deduplication via SHA-256 hash
3230
+ * - Content-addressed blob deduplication via the store-computed BLAKE3 hash
2963
3231
  * - Store blob metadata in DatabaseClient (attachment_blob table)
2964
- * - Store binary data in a BlobStore implementation
3232
+ * - Store binary data in a BlobStore implementation (bytes-first ordering)
2965
3233
  * - Create/soft-delete attachment records linked to notes
2966
3234
  * - List active attachments for a note
3235
+ * - Reconcile/GC blob bytes against the canonical manifest live set
3236
+ * (ADR-013 D2/D4: manifests are the sole lifecycle authority)
2967
3237
  */
2968
3238
 
2969
3239
  interface AttachmentRow {
@@ -3001,11 +3271,16 @@ declare class AttachmentsRepository {
3001
3271
  /**
3002
3272
  * Attach a binary file to a note.
3003
3273
  *
3004
- * If a blob with the same BLAKE3 content hash already exists, the existing
3005
- * blob row is reused (deduplication). Otherwise a new blob row is inserted
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.
3274
+ * Bytes are written first (`put()` is idempotent content addressing makes
3275
+ * replays safe), then the metadata rows commit (ADR-013 D5). A crash
3276
+ * between the two leaves an unreferenced blob that reconcile/gc sweeps
3277
+ * never a manifest without recoverable state. The store-computed BLAKE3
3278
+ * `content_hash` (`blake3:<hex>`) matches the server convention and is the
3279
+ * key used by the portable Knowledge-Shard byte sidecar.
3280
+ *
3281
+ * If a blob row with the same content hash already exists, it is reused
3282
+ * (deduplication) — re-putting the bytes also heals a previously
3283
+ * reference-only blob whose bytes went missing.
3009
3284
  *
3010
3285
  * Returns the newly created AttachmentRow.
3011
3286
  */
@@ -3017,9 +3292,16 @@ declare class AttachmentsRepository {
3017
3292
  get(id: string): Promise<AttachmentRow>;
3018
3293
  /**
3019
3294
  * Retrieve the raw binary data for an attachment.
3020
- * Returns null if the blob cannot be found in the BlobStore.
3295
+ * Returns null when the bytes are not present the attachment is then in
3296
+ * the recoverable reference-only state (metadata intact, bytes
3297
+ * re-hydratable from a shard sidecar or a re-attach of the same content).
3021
3298
  */
3022
3299
  getBlob(attachmentId: string): Promise<Uint8Array | null>;
3300
+ /**
3301
+ * True when the attachment's bytes are physically present in the BlobStore.
3302
+ * False means reference-only (recoverable), not an error.
3303
+ */
3304
+ hasBlob(attachmentId: string): Promise<boolean>;
3023
3305
  /**
3024
3306
  * List active (non-deleted) attachments for a note.
3025
3307
  * Ordered by position ascending, then created_at ascending.
@@ -3027,9 +3309,29 @@ declare class AttachmentsRepository {
3027
3309
  list(noteId: string): Promise<AttachmentRow[]>;
3028
3310
  /**
3029
3311
  * Soft-delete an attachment by setting deleted_at to the current timestamp.
3030
- * The underlying blob row and BlobStore data are not removed.
3312
+ * The blob row is untouched and no bytes are removed inline — physical
3313
+ * removal happens only through deferred `reconcileBlobs()`/`gcBlobs()`
3314
+ * against the canonical live set (ADR-013 D4).
3031
3315
  */
3032
3316
  delete(id: string): Promise<void>;
3317
+ /**
3318
+ * The authoritative live-checksum set: content hashes referenced by at
3319
+ * least one non-deleted attachment. This — not any refcount — decides
3320
+ * which bytes are reachable.
3321
+ */
3322
+ liveBlobChecksums(): Promise<string[]>;
3323
+ /**
3324
+ * Reconcile the BlobStore against the canonical live set (startup, after
3325
+ * quota events, after interrupted writes). `missing` lists reference-only
3326
+ * checksums; `unreferenced` lists GC candidates.
3327
+ */
3328
+ reconcileBlobs(opts?: BlobReconcileOptions): Promise<BlobReconcileResult>;
3329
+ /**
3330
+ * Deferred, age-thresholded physical removal of unreachable bytes.
3331
+ * Runs a reconcile first so GC always acts on current manifest truth.
3332
+ */
3333
+ gcBlobs(opts?: BlobGcOptions): Promise<BlobGcResult>;
3334
+ private blobChecksumOf;
3033
3335
  }
3034
3336
 
3035
3337
  declare const ManageAttachmentsInputSchema: z.ZodObject<{
@@ -3842,6 +4144,12 @@ declare function sha256Hex(data: Uint8Array): Promise<string>;
3842
4144
  * checked against the whole archive (see `prefetchShard`'s `expectedSha256`,
3843
4145
  * which is real integrity because the hash arrives on a separate channel).
3844
4146
  *
4147
+ * The signed-manifest path is now implemented: `verifyShardSignature`
4148
+ * (`shard-signature.ts`, #324/ADR-014) authenticates publisher provenance via
4149
+ * an Ed25519 signature over the manifest digest + blob-digest set, and
4150
+ * `importShard` runs it BEFORE any record or blob mutation. These in-archive
4151
+ * checksums remain the consistency layer *inside* that verified boundary.
4152
+ *
3845
4153
  * @returns Object with `valid` flag and list of failed filenames.
3846
4154
  */
3847
4155
  declare function validateChecksums(checksums: Record<string, string>, files: Map<string, Uint8Array>): Promise<{
@@ -4237,6 +4545,16 @@ interface AiwgIndexValidationResult {
4237
4545
  errors: string[];
4238
4546
  counts: Partial<Record<string, number>>;
4239
4547
  }
4548
+ interface AiwgKnowledgeShardOptions {
4549
+ createdAt?: string;
4550
+ matricVersion?: string;
4551
+ /**
4552
+ * Include React-native SKOS and provenance component files. The default
4553
+ * portable profile keeps those projections in lossless note metadata so the
4554
+ * shard remains importable by the current Fortemi server.
4555
+ */
4556
+ includeNativeRichComponents?: boolean;
4557
+ }
4240
4558
  interface AiwgChunkedIndexValidationResult {
4241
4559
  valid: boolean;
4242
4560
  errors: string[];
@@ -4527,7 +4845,375 @@ declare function aiwgFortemiIndexToCommunityGraph(index: AiwgFortemiIndexExport,
4527
4845
  nodes: string[];
4528
4846
  }[];
4529
4847
  };
4848
+ /**
4849
+ * Convert the static AIWG/Fortemi v2 index contract into a portable Knowledge
4850
+ * Shard. Every note retains the complete source envelope and record in metadata,
4851
+ * so the native note/link/SKOS/provenance projections are reversible.
4852
+ */
4853
+ declare function aiwgFortemiIndexToKnowledgeShard(index: AiwgFortemiIndexExport, options?: AiwgKnowledgeShardOptions): Promise<Uint8Array>;
4854
+ /**
4855
+ * Recover the exact AIWG index envelope and records embedded by
4856
+ * {@link aiwgFortemiIndexToKnowledgeShard}.
4857
+ */
4858
+ declare function aiwgFortemiIndexFromKnowledgeShard(bytes: Uint8Array): AiwgFortemiIndexExport;
4859
+
4860
+ /**
4861
+ * Canonical RecordStore contract — the writable structured-record layer that
4862
+ * exists independently of PGlite (#323, ADR-013 D3).
4863
+ *
4864
+ * Records mirror the browser SQL rows one-to-one (same field names, ISO-8601
4865
+ * timestamp strings) so the optional PGlite projection is a row-for-row
4866
+ * replay of the change journal — rebuildable at any time without touching
4867
+ * canonical records or attachment bytes.
4868
+ */
4869
+ interface NoteRecord0 {
4870
+ id: string;
4871
+ archive_id: string | null;
4872
+ title: string | null;
4873
+ format: string;
4874
+ source: string;
4875
+ visibility: string;
4876
+ revision_mode: string;
4877
+ is_starred: boolean;
4878
+ is_pinned: boolean;
4879
+ is_archived: boolean;
4880
+ created_at: string;
4881
+ updated_at: string;
4882
+ deleted_at: string | null;
4883
+ }
4884
+ interface NoteOriginalRecord {
4885
+ id: string;
4886
+ note_id: string;
4887
+ content: string;
4888
+ content_hash: string;
4889
+ created_at: string;
4890
+ }
4891
+ interface NoteRevisedCurrentRecord {
4892
+ /** Keyed by note id (mirrors the SQL PK `note_id`). */
4893
+ id: string;
4894
+ content: string;
4895
+ ai_metadata: unknown | null;
4896
+ generation_count: number;
4897
+ model: string | null;
4898
+ is_user_edited: boolean;
4899
+ updated_at: string;
4900
+ }
4901
+ interface NoteTagRecord {
4902
+ id: string;
4903
+ note_id: string;
4904
+ tag: string;
4905
+ created_at: string;
4906
+ }
4907
+ interface LinkRecord0 {
4908
+ id: string;
4909
+ source_note_id: string;
4910
+ target_note_id: string;
4911
+ link_type: string;
4912
+ created_at: string;
4913
+ deleted_at: string | null;
4914
+ }
4915
+ interface CollectionRecord {
4916
+ id: string;
4917
+ name: string;
4918
+ description: string | null;
4919
+ created_at: string;
4920
+ updated_at: string;
4921
+ deleted_at: string | null;
4922
+ }
4923
+ interface CollectionNoteRecord {
4924
+ id: string;
4925
+ collection_id: string;
4926
+ note_id: string;
4927
+ created_at: string;
4928
+ }
4929
+ interface AttachmentRecord {
4930
+ id: string;
4931
+ note_id: string;
4932
+ blob_id: string;
4933
+ document_type_id: string | null;
4934
+ mime_type: string | null;
4935
+ extracted_text: string | null;
4936
+ filename: string;
4937
+ display_name: string | null;
4938
+ position: number;
4939
+ created_at: string;
4940
+ deleted_at: string | null;
4941
+ }
4942
+ interface AttachmentBlobRecord {
4943
+ id: string;
4944
+ content_hash: string;
4945
+ size_bytes: number;
4946
+ created_at: string;
4947
+ }
4948
+ /** Collection name → record type. The store is generic over this map. */
4949
+ interface RecordCollections {
4950
+ note: NoteRecord0;
4951
+ note_original: NoteOriginalRecord;
4952
+ note_revised_current: NoteRevisedCurrentRecord;
4953
+ note_tag: NoteTagRecord;
4954
+ link: LinkRecord0;
4955
+ collection: CollectionRecord;
4956
+ collection_note: CollectionNoteRecord;
4957
+ attachment: AttachmentRecord;
4958
+ attachment_blob: AttachmentBlobRecord;
4959
+ }
4960
+ type RecordCollectionName = keyof RecordCollections;
4961
+ declare const RECORD_COLLECTIONS: readonly RecordCollectionName[];
4962
+ /**
4963
+ * One committed mutation. Journal entries carry the full record snapshot so
4964
+ * the PGlite projection (and any other consumer) can replay mutations without
4965
+ * re-reading canonical state, and so a rebuild has a total order to follow.
4966
+ */
4967
+ interface JournalEntry {
4968
+ /** Monotonically increasing commit sequence (assigned by the store). */
4969
+ seq: number;
4970
+ /** ISO-8601 commit timestamp. */
4971
+ ts: string;
4972
+ op: 'put' | 'delete';
4973
+ collection: RecordCollectionName;
4974
+ id: string;
4975
+ /** Snapshot for `put`; absent for `delete`. */
4976
+ record?: RecordCollections[RecordCollectionName];
4977
+ }
4978
+ /**
4979
+ * What the canonical record tier can and cannot serve, reported explicitly
4980
+ * (never emulated badly). Advanced capabilities may require the optional
4981
+ * PGlite projection (ADR-013 D3).
4982
+ */
4983
+ interface RecordStoreCapabilities {
4984
+ crud: true;
4985
+ journal: true;
4986
+ /** Bounded substring scan over titles/content — not ranked FTS. */
4987
+ boundedTextScan: true;
4988
+ fullTextSearch: false;
4989
+ vectorSearch: false;
4990
+ sqlJoins: false;
4991
+ }
4992
+ declare const RECORD_STORE_CAPABILITIES: RecordStoreCapabilities;
4993
+ interface RecordListOptions {
4994
+ /** Maximum records returned (applied after filtering). */
4995
+ limit?: number;
4996
+ }
4997
+ /**
4998
+ * The writable canonical structured-record store. Implementations MUST make
4999
+ * each `put`/`remove` an atomic commit of the record mutation plus its
5000
+ * journal entry (the recoverable commit protocol): a torn write leaves
5001
+ * neither, never one without the other.
5002
+ */
5003
+ interface RecordStore {
5004
+ get<C extends RecordCollectionName>(collection: C, id: string): Promise<RecordCollections[C] | null>;
5005
+ /** Insert or replace one record, journaled atomically. */
5006
+ put<C extends RecordCollectionName>(collection: C, record: RecordCollections[C]): Promise<JournalEntry>;
5007
+ /** Hard-remove one record, journaled atomically (soft-delete is a field upstream). */
5008
+ remove(collection: RecordCollectionName, id: string): Promise<JournalEntry>;
5009
+ /** All records of a collection (insertion order not guaranteed). */
5010
+ list<C extends RecordCollectionName>(collection: C, opts?: RecordListOptions): Promise<RecordCollections[C][]>;
5011
+ /** Journal entries with `seq > sinceSeq`, ascending. */
5012
+ journalSince(sinceSeq: number, limit?: number): Promise<JournalEntry[]>;
5013
+ /** Highest committed sequence (0 when empty). */
5014
+ headSeq(): Promise<number>;
5015
+ readonly capabilities: RecordStoreCapabilities;
5016
+ close(): Promise<void>;
5017
+ }
5018
+
5019
+ /**
5020
+ * In-memory RecordStore — the test/SSR tier of the canonical record layer.
5021
+ * Same commit semantics as the durable store: record + journal move together.
5022
+ */
5023
+
5024
+ declare class MemoryRecordStore implements RecordStore {
5025
+ readonly capabilities: RecordStoreCapabilities;
5026
+ private collections;
5027
+ private journal;
5028
+ private seq;
5029
+ private table;
5030
+ get<C extends RecordCollectionName>(collection: C, id: string): Promise<RecordCollections[C] | null>;
5031
+ put<C extends RecordCollectionName>(collection: C, record: RecordCollections[C]): Promise<JournalEntry>;
5032
+ remove(collection: RecordCollectionName, id: string): Promise<JournalEntry>;
5033
+ list<C extends RecordCollectionName>(collection: C, opts?: RecordListOptions): Promise<RecordCollections[C][]>;
5034
+ journalSince(sinceSeq: number, limit?: number): Promise<JournalEntry[]>;
5035
+ headSeq(): Promise<number>;
5036
+ close(): Promise<void>;
5037
+ }
5038
+
5039
+ /**
5040
+ * Durable canonical RecordStore over IndexedDB (#323, ADR-013 D3).
5041
+ *
5042
+ * One database per archive namespace: `fortemi-<archive>-records`. Object
5043
+ * stores: one per record collection (keyPath `id`), plus `journal`
5044
+ * (autoIncrement `seq`) and `meta` (schema version).
5045
+ *
5046
+ * Recoverable commit protocol (ADR-013 D5): every mutation writes the record
5047
+ * change AND its journal entry in a single IndexedDB transaction, so a torn
5048
+ * write commits neither. The journal `seq` is the total order the optional
5049
+ * PGlite projection consumes.
5050
+ *
5051
+ * Schema evolution: `meta.schemaVersion` records the logical record-schema
5052
+ * version; `migrate` hooks run inside the version-change transaction when the
5053
+ * database structure grows. Additive-only, mirroring the SQL migration
5054
+ * discipline.
5055
+ */
5056
+
5057
+ /** Logical record-schema version stored in `meta` (independent of DB_VERSION). */
5058
+ declare const RECORD_SCHEMA_VERSION = 1;
5059
+ interface CreateRecordStoreOptions {
5060
+ /** Injectable factory for tests (fake-indexeddb). Defaults to the global. */
5061
+ indexedDB?: IDBFactory;
5062
+ }
5063
+ declare class IdbRecordStore implements RecordStore {
5064
+ private db;
5065
+ readonly capabilities: RecordStoreCapabilities;
5066
+ private constructor();
5067
+ static open(archiveName: string, options?: CreateRecordStoreOptions): Promise<IdbRecordStore>;
5068
+ private ensureSchemaVersion;
5069
+ get<C extends RecordCollectionName>(collection: C, id: string): Promise<RecordCollections[C] | null>;
5070
+ put<C extends RecordCollectionName>(collection: C, record: RecordCollections[C]): Promise<JournalEntry>;
5071
+ remove(collection: RecordCollectionName, id: string): Promise<JournalEntry>;
5072
+ list<C extends RecordCollectionName>(collection: C, opts?: RecordListOptions): Promise<RecordCollections[C][]>;
5073
+ journalSince(sinceSeq: number, limit?: number): Promise<JournalEntry[]>;
5074
+ headSeq(): Promise<number>;
5075
+ close(): Promise<void>;
5076
+ }
5077
+ /** Open the durable canonical record store for one archive namespace. */
5078
+ declare function createRecordStore(archiveName: string, options?: CreateRecordStoreOptions): Promise<IdbRecordStore>;
5079
+
5080
+ /**
5081
+ * Canonical notes repository — DB-free note/tag/link/collection workflows
5082
+ * over the RecordStore (#323). Mirrors the SQL repositories' semantics
5083
+ * (UUIDv7 ids, immutable note_original, mutable note_revised_current,
5084
+ * soft-delete everywhere) so the PGlite projection replay is row-for-row.
5085
+ *
5086
+ * Query tier: id/recent/tag/link/collection lookups plus a bounded substring
5087
+ * text scan. Ranked FTS, vectors, and complex joins are explicitly NOT
5088
+ * served here — `store.capabilities` reports the boundary (ADR-013 D3).
5089
+ */
5090
+
5091
+ interface CanonicalNoteCreateInput {
5092
+ id?: string;
5093
+ title?: string;
5094
+ content: string;
5095
+ format?: string;
5096
+ source?: string;
5097
+ visibility?: string;
5098
+ }
5099
+ interface CanonicalNoteUpdateInput {
5100
+ title?: string;
5101
+ content?: string;
5102
+ is_starred?: boolean;
5103
+ is_pinned?: boolean;
5104
+ is_archived?: boolean;
5105
+ }
5106
+ interface CanonicalNoteView {
5107
+ note: NoteRecord0;
5108
+ original_content: string;
5109
+ revised_content: string;
5110
+ tags: string[];
5111
+ }
5112
+ declare class CanonicalNotesRepository {
5113
+ private store;
5114
+ constructor(store: RecordStore);
5115
+ create(input: CanonicalNoteCreateInput): Promise<CanonicalNoteView>;
5116
+ get(noteId: string): Promise<CanonicalNoteView | null>;
5117
+ update(noteId: string, input: CanonicalNoteUpdateInput): Promise<CanonicalNoteView>;
5118
+ /** Soft-delete: sets `deleted_at`; the record (and history) remains. */
5119
+ softDelete(noteId: string): Promise<void>;
5120
+ restore(noteId: string): Promise<void>;
5121
+ /** Non-deleted notes, most recently updated first. */
5122
+ listRecent(limit?: number): Promise<NoteRecord0[]>;
5123
+ /**
5124
+ * Bounded substring scan over title + revised content (case-insensitive).
5125
+ * This is deliberately not ranked FTS — see `store.capabilities`.
5126
+ */
5127
+ searchText(query: string, limit?: number): Promise<NoteRecord0[]>;
5128
+ addTag(noteId: string, tag: string): Promise<void>;
5129
+ removeTag(noteId: string, tag: string): Promise<void>;
5130
+ notesByTag(tag: string): Promise<NoteRecord0[]>;
5131
+ createLink(sourceNoteId: string, targetNoteId: string, linkType?: string): Promise<LinkRecord0>;
5132
+ softDeleteLink(linkId: string): Promise<void>;
5133
+ /** Active links touching a note (either direction). */
5134
+ linksOf(noteId: string): Promise<LinkRecord0[]>;
5135
+ createCollection(name: string, description?: string): Promise<CollectionRecord>;
5136
+ addNoteToCollection(collectionId: string, noteId: string): Promise<void>;
5137
+ notesInCollection(collectionId: string): Promise<NoteRecord0[]>;
5138
+ }
5139
+
5140
+ /**
5141
+ * Canonical attachments repository — DB-free attachment manifests over the
5142
+ * RecordStore, bytes through the Bytecask BlobStore (#323, ADR-013 D2/D4/D5).
5143
+ *
5144
+ * Same lifecycle semantics as the SQL-backed AttachmentsRepository: bytes
5145
+ * first (idempotent put), then manifest commit; soft-delete never removes
5146
+ * bytes inline; the manifest-derived live set drives reconcile/gc; missing
5147
+ * bytes are the recoverable reference-only state.
5148
+ */
5149
+
5150
+ interface CanonicalAttachInput {
5151
+ noteId: string;
5152
+ data: Uint8Array;
5153
+ filename: string;
5154
+ mimeType?: string;
5155
+ extractedText?: string;
5156
+ displayName?: string;
5157
+ }
5158
+ declare class CanonicalAttachmentsRepository {
5159
+ private store;
5160
+ private blobStore;
5161
+ constructor(store: RecordStore, blobStore: BlobStore);
5162
+ /** Bytes-first attach (ADR-013 D5); dedupes on the store-computed hash. */
5163
+ attach(input: CanonicalAttachInput): Promise<AttachmentRecord>;
5164
+ get(id: string): Promise<AttachmentRecord>;
5165
+ /** Null when bytes are absent — the recoverable reference-only state. */
5166
+ getBlob(attachmentId: string): Promise<Uint8Array | null>;
5167
+ hasBlob(attachmentId: string): Promise<boolean>;
5168
+ list(noteId: string): Promise<AttachmentRecord[]>;
5169
+ /** Soft-delete the manifest; bytes are only swept via reconcile/gc. */
5170
+ delete(id: string): Promise<void>;
5171
+ /** Authoritative live set: hashes referenced by non-deleted manifests. */
5172
+ liveBlobChecksums(): Promise<string[]>;
5173
+ /** Startup / post-quota reconciliation against canonical manifests (ADR-013 D4). */
5174
+ reconcileBlobs(opts?: BlobReconcileOptions): Promise<BlobReconcileResult>;
5175
+ /** Deferred reachability-based blob GC. */
5176
+ gcBlobs(opts?: BlobGcOptions): Promise<BlobGcResult>;
5177
+ private checksumOf;
5178
+ }
5179
+
5180
+ /**
5181
+ * PGlite attachment projection (#320, ADR-013 D3).
5182
+ *
5183
+ * Projects canonical attachment state (RecordStore) into the optional PGlite
5184
+ * `attachment_blob` / `attachment` tables. Properties:
5185
+ *
5186
+ * - Idempotent: every row upserts on its primary key; re-running with the
5187
+ * same canonical state changes nothing.
5188
+ * - Rebuildable: dropping the projection rows and re-projecting yields
5189
+ * equivalent query results — the canonical records are the source of truth.
5190
+ * - Derived refcounts: `attachment_blob.reference_count` is recomputed from
5191
+ * live manifests on every projection pass; it is never lifecycle authority
5192
+ * and no trigger touches it.
5193
+ * - Bytes never enter PGlite; only metadata is projected.
5194
+ */
5195
+
5196
+ interface AttachmentProjectionResult {
5197
+ blobs: number;
5198
+ attachments: number;
5199
+ }
5200
+ /**
5201
+ * Project all canonical attachment records into PGlite. Safe to run at any
5202
+ * time: startup, after journal consumption, or as a full rebuild after the
5203
+ * projection was dropped.
5204
+ *
5205
+ * The parent `note` rows must already exist in the projection (note
5206
+ * projection is the #323 cycle-2 surface); this function owns only the
5207
+ * attachment tables.
5208
+ */
5209
+ declare function projectAttachments(db: DatabaseClient, store: RecordStore): Promise<AttachmentProjectionResult>;
5210
+ /**
5211
+ * Drop the attachment projection rows (test/rebuild support). Canonical
5212
+ * records and Bytecask bytes are untouched — this is the "PGlite can be
5213
+ * dropped and rebuilt" invariant made executable.
5214
+ */
5215
+ declare function dropAttachmentProjection(db: DatabaseClient): Promise<void>;
4530
5216
 
4531
- declare const VERSION = "2026.7.5";
5217
+ declare const VERSION = "2026.7.7";
4532
5218
 
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 };
5219
+ 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 AiwgKnowledgeShardOptions, 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, AllowlistTrustStore, type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRecord, type AttachmentBlobRow, type AttachmentProjectionResult, type AttachmentRecord, 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 BlobBackendKind, type BlobGcOptions, type BlobGcResult, type BlobReconcileOptions, type BlobReconcileResult, type BlobStore, type BlobStoreDiagnostics, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, type BuildAiwgStaticEmbeddingSetOptions, CURRENT_MIGRATION_HEAD, CURRENT_SHARD_VERSION, type CanonicalAttachInput, CanonicalAttachmentsRepository, type CanonicalNoteCreateInput, type CanonicalNoteUpdateInput, type CanonicalNoteView, CanonicalNotesRepository, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionNoteRecord, type CollectionRecord, 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 CreateBlobStoreOptions, type CreatePGliteOptions, type CreateRecordStoreOptions, 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, IdbRecordStore, 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, type JournalEntry, LOCAL_ENDPOINTS, type LegacyMigrationReport, type LinkRecord0, 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, MemoryRecordStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteOriginalRecord, type NoteRecord0, type NoteRevisedCurrentRecord, type NoteRevision, type NoteSkosTag, type NoteSummary, type NoteTagRecord, 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, RECORD_COLLECTIONS, RECORD_SCHEMA_VERSION, RECORD_STORE_CAPABILITIES, type RecommendedTier, type RecordCollectionName, type RecordCollections, type RecordListOptions, type RecordProvenanceInput, type RecordStore, type RecordStoreCapabilities, type RemoteBackendConfig, type RemoteBackendPaths, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RestoreDbSnapshotOptions, type RouteHandler, SHARD_FORMAT, SIGNATURE_ENTRY, SIGNING_ENVELOPE_VERSION, 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 ShardSignatureEnvelope, type ShardSignatureVerdict, type ShardSigner, type ShardSigningPayload, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, type ShardTemplate, type ShardTrustStore, type SignShardInput, 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, type TrustedKey, TypedEventBus, VERSION, type VectorEntry, type VerifyShardSignatureInput, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, aiwgFortemiIndexFromKnowledgeShard, aiwgFortemiIndexToCommunityGraph, aiwgFortemiIndexToKnowledgeShard, 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, createLazyBlobStore, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRecordStore, createRemoteBackend, createRoutes, createShardBackend, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dropAttachmentProjection, 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, isShardSigningSupported, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, migrateLegacyBlobStore, noteFromShard, noteSkosTagToShard, noteToShard, openShard, packTarGz, parseCspReport, prefetchShard, projectAttachments, provenanceEdgeToShard, queryAiwgFortemiIndex, queryAiwgHybridIndex, queryAiwgSemanticIndex, registerLlmCapability, registerSemanticCapability, registerSemanticCapabilityWorker, registerServiceWorker, restoreDbSnapshot, searchTool, selectBackend, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, sidecarBlobDigests, signShard, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsToShard, templateToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, urlLinkToShard, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport, validateAiwgStaticEmbeddingSet, validateChecksums, validateFortemiCompatibilityResponse, validateShardArchive, validateShardComponentRecord, validateShardManifest, verifyDbSnapshotMeta, verifyShardSignature, verifySri };