@fortemi/core 2026.7.12 → 2026.7.13

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,8 +1,9 @@
1
1
  import { PGlite } from '@electric-sql/pglite';
2
- import { ProbeReport } from '@bytecask/core';
2
+ import { S as ShardAttachmentProjection, a as ShardCollection, b as ShardEmbeddingConfig, c as ShardEmbedding, d as ShardEmbeddingSet, e as ShardEmbeddingSetMember, f as ShardLink, g as ShardNote, h as ShardNoteSkosTag, i as ShardProvenanceEdge, j as ShardSkosConcept, k as ShardSkosRelation, l as ShardSkosScheme, m as ShardTag, n as ShardTemplate, o as ShardManifest, B as BlobStore, p as BlobReconcileOptions, q as BlobReconcileResult, r as BlobGcOptions, s as BlobGcResult, t as ShardBackend, u as ShardOperation, v as ShardComponent, w as ShardLossEntry, x as ShardCapabilityReport, y as ShardProfileRegistryEntry, E as ExportOptions, z as ShardExportResult, I as ImportOptions, A as ImportResult } from './aiwg-index-shard-BhF8kKAU.js';
3
+ export { C as AIWG_SCAN_REQUIRED_FIELDS, D as AiwgChunkedIndexBuildOptions, F as AiwgChunkedIndexBuildResult, G as AiwgChunkedIndexDetailLoader, H as AiwgChunkedIndexLoadOptions, J as AiwgChunkedIndexLoader, K as AiwgChunkedIndexProgress, L as AiwgChunkedIndexProgressPhase, M as AiwgChunkedIndexQueryOptions, N as AiwgChunkedIndexQueryResult, O as AiwgChunkedIndexValidationResult, P as AiwgFortemiAttachmentReference, Q as AiwgFortemiBinarySource, R as AiwgFortemiChunk, T as AiwgFortemiChunkDetailRef, U as AiwgFortemiChunkManifest, V as AiwgFortemiChunkPart, W as AiwgFortemiChunkPartRef, X as AiwgFortemiIndexExport, Y as AiwgFortemiIndexExportSchemaVersion, Z as AiwgFortemiProjectedRecord, _ as AiwgFortemiProvenance, $ as AiwgFortemiProvenanceEvent, a0 as AiwgFortemiRecord, a1 as AiwgFortemiRecordEmbedding, a2 as AiwgFortemiRecordSchemaVersion, a3 as AiwgFortemiRecordSource, a4 as AiwgFortemiRecordType, a5 as AiwgFortemiRelationship, a6 as AiwgFortemiRelationshipDirection, a7 as AiwgFortemiSearchProjection, a8 as AiwgFortemiSkosConcept, a9 as AiwgFortemiSkosRelation, aa as AiwgFortemiSkosRelationType, ab as AiwgHeadlessEmbeddingBackend, ac as AiwgIndexController, ad as AiwgIndexControllerListener, ae as AiwgIndexControllerSnapshot, af as AiwgIndexGraphOptions, ag as AiwgIndexQueryMatch, ah as AiwgIndexQueryOptions, ai as AiwgIndexQueryRankedItem, aj as AiwgIndexQueryResult, ak as AiwgIndexQueryWeights, al as AiwgIndexValidationResult, am as AiwgKnowledgeShardConversionResult, an as AiwgKnowledgeShardOptions, ao as AiwgPrivacyClassification, ap as AiwgPrivacyFilterOptions, aq as AiwgProvenanceConfidence, ar as AiwgRelationshipDirection, as as AiwgRelationshipEdgeSummary, at as AiwgRelationshipNodeSummary, au as AiwgRelationshipQueryOptions, av as AiwgRelationshipSetOperation, aw as AiwgRelationshipSetOptions, ax as AiwgRelationshipSetResult, ay as AiwgRelationshipTraversalOptions, az as AiwgRelationshipTraversalResult, aA as AiwgReviewAction, aB as AiwgReviewDecision, aC as AiwgReviewDecisionExport, aD as AiwgReviewInput, aE as AiwgStaticDuplicatePair, aF as AiwgStaticEmbeddingRecord, aG as AiwgStaticEmbeddingSet, aH as AiwgStaticHybridQueryOptions, aI as AiwgStaticSemanticQueryOptions, aJ as AiwgStaticSemanticResult, aK as AllowlistTrustStore, aL as BlobBackendKind, aM as BlobStoreDiagnostics, aN as BuildAiwgStaticEmbeddingSetOptions, aO as CURRENT_SHARD_VERSION, aP as ConflictStrategy, aQ as CreateBlobStoreOptions, aR as ImportCounts, aS as ImportProgress, aT as ImportProgressPhase, aU as KnowledgeShardProfile, aV as MemoryBlobStore, aW as SHARD_FORMAT, aX as SIGNATURE_ENTRY, aY as SIGNING_ENVELOPE_VERSION, aZ as ShardAuthorityStatus, a_ as ShardClusterRef, a$ as ShardLayout, b0 as ShardSignatureEnvelope, b1 as ShardSignatureVerdict, b2 as ShardSigner, b3 as ShardSigningPayload, b4 as ShardTrustStore, b5 as SignShardInput, b6 as TrustedKey, b7 as VerifyShardSignatureInput, b8 as aiwgFortemiIndexFromKnowledgeShard, b9 as aiwgFortemiIndexToCommunityGraph, ba as aiwgFortemiIndexToKnowledgeShard, bb as aiwgFortemiIndexToKnowledgeShardWithReport, bc as assertAiwgFortemiChunkManifest, bd as assertAiwgFortemiChunkPart, be as assertAiwgFortemiIndexExport, bf as assertAiwgStaticEmbeddingSet, bg as buildAiwgChunkedIndex, bh as buildAiwgStaticEmbeddingSet, bi as createAiwgFetchChunkLoader, bj as createAiwgFetchDetailLoader, bk as createAiwgIndexController, bl as createAiwgReviewDecisionExport, bm as createBlobStore, bn as createLazyBlobStore, bo as filterAiwgRecordsByPrivacy, bp as findAiwgStaticDuplicatePairs, bq as getAiwgFortemiFacets, br as isShardSigningSupported, bs as queryAiwgFortemiIndex, bt as queryAiwgHybridIndex, bu as queryAiwgSemanticIndex, bv as sidecarBlobDigests, bw as signShard, bx as validateAiwgFortemiChunkManifest, by as validateAiwgFortemiChunkPart, bz as validateAiwgFortemiIndexExport, bA as validateAiwgStaticEmbeddingSet, bB as verifyShardSignature } from './aiwg-index-shard-BhF8kKAU.js';
3
4
  import { z, ZodType } from 'zod';
4
- export { A as AIWG_SCAN_REQUIRED_FIELDS, a as AiwgChunkedIndexBuildOptions, b as AiwgChunkedIndexBuildResult, c as AiwgChunkedIndexDetailLoader, d as AiwgChunkedIndexLoadOptions, e as AiwgChunkedIndexLoader, f as AiwgChunkedIndexProgress, g as AiwgChunkedIndexProgressPhase, h as AiwgChunkedIndexQueryOptions, i as AiwgChunkedIndexQueryResult, j as AiwgChunkedIndexValidationResult, k as AiwgFortemiAttachmentReference, l as AiwgFortemiBinarySource, m as AiwgFortemiChunk, n as AiwgFortemiChunkDetailRef, o as AiwgFortemiChunkManifest, p as AiwgFortemiChunkPart, q as AiwgFortemiChunkPartRef, r as AiwgFortemiIndexExport, s as AiwgFortemiIndexExportSchemaVersion, t as AiwgFortemiProjectedRecord, u as AiwgFortemiProvenance, v as AiwgFortemiProvenanceEvent, w as AiwgFortemiRecord, x as AiwgFortemiRecordEmbedding, y as AiwgFortemiRecordSchemaVersion, z as AiwgFortemiRecordSource, B as AiwgFortemiRecordType, C as AiwgFortemiRelationship, D as AiwgFortemiRelationshipDirection, E as AiwgFortemiSearchProjection, F as AiwgFortemiSkosConcept, G as AiwgFortemiSkosRelation, H as AiwgFortemiSkosRelationType, I as AiwgHeadlessEmbeddingBackend, J as AiwgIndexController, K as AiwgIndexControllerListener, L as AiwgIndexControllerSnapshot, M as AiwgIndexGraphOptions, N as AiwgIndexQueryMatch, O as AiwgIndexQueryOptions, P as AiwgIndexQueryRankedItem, Q as AiwgIndexQueryResult, R as AiwgIndexQueryWeights, S as AiwgIndexValidationResult, T as AiwgKnowledgeShardOptions, U as AiwgPrivacyClassification, V as AiwgPrivacyFilterOptions, W as AiwgProvenanceConfidence, X as AiwgRelationshipDirection, Y as AiwgRelationshipEdgeSummary, Z as AiwgRelationshipNodeSummary, _ as AiwgRelationshipQueryOptions, $ as AiwgRelationshipSetOperation, a0 as AiwgRelationshipSetOptions, a1 as AiwgRelationshipSetResult, a2 as AiwgRelationshipTraversalOptions, a3 as AiwgRelationshipTraversalResult, a4 as AiwgReviewAction, a5 as AiwgReviewDecision, a6 as AiwgReviewDecisionExport, a7 as AiwgReviewInput, a8 as AiwgStaticDuplicatePair, a9 as AiwgStaticEmbeddingRecord, aa as AiwgStaticEmbeddingSet, ab as AiwgStaticHybridQueryOptions, ac as AiwgStaticSemanticQueryOptions, ad as AiwgStaticSemanticResult, ae as BuildAiwgStaticEmbeddingSetOptions, af as aiwgFortemiIndexFromKnowledgeShard, ag as aiwgFortemiIndexToCommunityGraph, ah as aiwgFortemiIndexToKnowledgeShard, ai as assertAiwgFortemiChunkManifest, aj as assertAiwgFortemiChunkPart, ak as assertAiwgFortemiIndexExport, al as assertAiwgStaticEmbeddingSet, am as buildAiwgChunkedIndex, an as buildAiwgStaticEmbeddingSet, ao as createAiwgFetchChunkLoader, ap as createAiwgFetchDetailLoader, aq as createAiwgIndexController, ar as createAiwgReviewDecisionExport, as as filterAiwgRecordsByPrivacy, at as findAiwgStaticDuplicatePairs, au as getAiwgFortemiFacets, av as queryAiwgFortemiIndex, aw as queryAiwgHybridIndex, ax as queryAiwgSemanticIndex, ay as validateAiwgFortemiChunkManifest, az as validateAiwgFortemiChunkPart, aA as validateAiwgFortemiIndexExport, aB as validateAiwgStaticEmbeddingSet } from './aiwg-index-shard-oG45XSCU.js';
5
5
  export { AiwgIndexSchemaValidationResult, getAiwgFortemiIndexExportSchema, validateAiwgFortemiIndexExportSchema, validateAiwgFortemiProjectedRecordSchema } from './aiwg-index-schema.js';
6
+ import '@bytecask/core';
6
7
 
7
8
  /**
8
9
  * Generate a RFC 9562 UUIDv7 identifier.
@@ -391,673 +392,6 @@ declare class PGliteWorkerStorageBackendFactory implements StorageBackendFactory
391
392
  open(input: StorageOpenRequest): Promise<StorageBackend>;
392
393
  }
393
394
 
394
- /**
395
- * Content-addressed attachment-byte storage — the Fortemi `BlobStore` seam.
396
- *
397
- * The store computes the key: `put(bytes)` BLAKE3-hashes the payload and
398
- * returns the canonical checksum encoding `blake3:<64-char lowercase hex>`
399
- * (server convention; ADR-012 D1/D3). Every method at this seam speaks that
400
- * canonical encoding — the bare-hex ⇄ prefixed conversions live in
401
- * `shard/blob-sidecar.ts` helpers and inside the bytecask adapter here, and
402
- * nowhere else.
403
- *
404
- * Lifecycle authority (ADR-013 D2): canonical attachment manifests decide
405
- * which bytes are live. `reconcile(liveChecksums)` hands that authoritative
406
- * set to the store; `gc()` physically removes only unreferenced,
407
- * age-thresholded objects. Internal refcounts are an implementation detail,
408
- * never a source of truth.
409
- *
410
- * Implementations:
411
- * - `createBlobStore()` — `@bytecask/core` behind a dynamic import
412
- * (IndexedDB tier by default, OPFS opt-in, memory fallback). Zero bundle
413
- * cost until the first byte operation (ADR-012 D6).
414
- * - `createLazyBlobStore()` — synchronous facade that defers the dynamic
415
- * import until the first method call (what `FortemiProvider` wires).
416
- * - `MemoryBlobStore` — dependency-free in-process implementation for
417
- * tests and the no-persistence tier.
418
- */
419
-
420
- type BlobBackendKind = 'idb' | 'opfs' | 'memory';
421
- interface BlobStoreDiagnostics {
422
- /** The storage tier actually serving bytes. */
423
- backend: BlobBackendKind;
424
- /** Tier-probe outcome from `@bytecask/core` (null for memory/test stores). */
425
- probe: ProbeReport | null;
426
- }
427
- interface BlobReconcileOptions {
428
- /** Physically remove unreferenced objects now instead of leaving them for gc(). */
429
- removeUnreferenced?: boolean;
430
- }
431
- interface BlobReconcileResult {
432
- /** Live checksums whose bytes are present. */
433
- referenced: number;
434
- /** Live checksums whose bytes are absent — the reference-only set. */
435
- missing: string[];
436
- /** Stored checksums not in the live set — GC candidates. */
437
- unreferenced: string[];
438
- /** Objects physically removed (only when `removeUnreferenced`). */
439
- removed: number;
440
- bytesFreed: number;
441
- }
442
- interface BlobGcOptions {
443
- /** Collect only unreferenced objects at least this old (ms). Default 0. */
444
- minAgeMs?: number;
445
- }
446
- interface BlobGcResult {
447
- collected: number;
448
- bytesFreed: number;
449
- }
450
- /**
451
- * The Fortemi attachment-byte seam. All checksums are the canonical
452
- * `blake3:<hex>` encoding stored in `attachment_blob.content_hash` and shard
453
- * projection records.
454
- */
455
- interface BlobStore {
456
- /** Store bytes, return their canonical checksum. Idempotent (content-addressed). */
457
- put(bytes: Uint8Array): Promise<string>;
458
- /** Fetch bytes by canonical checksum; null when absent (reference-only). */
459
- read(checksum: string): Promise<Uint8Array | null>;
460
- /** True when the bytes for this checksum are physically present. */
461
- has(checksum: string): Promise<boolean>;
462
- /**
463
- * Physically remove one checksum. Import staging uses this only to roll back
464
- * content that was absent before promotion.
465
- */
466
- delete?(checksum: string): Promise<boolean>;
467
- /**
468
- * Reconcile stored bytes against the authoritative live-checksum set
469
- * derived from canonical attachment manifests (ADR-013 D4).
470
- */
471
- reconcile(liveChecksums: Iterable<string>, opts?: BlobReconcileOptions): Promise<BlobReconcileResult>;
472
- /** Physically remove unreferenced, age-thresholded objects. */
473
- gc(opts?: BlobGcOptions): Promise<BlobGcResult>;
474
- /** Selected backend + probe report, for capability/diagnostic surfaces. */
475
- diagnostics(): Promise<BlobStoreDiagnostics>;
476
- close(): Promise<void>;
477
- }
478
- declare class MemoryBlobStore implements BlobStore {
479
- private now;
480
- private entries;
481
- constructor(now?: () => number);
482
- put(bytes: Uint8Array): Promise<string>;
483
- read(checksum: string): Promise<Uint8Array | null>;
484
- has(checksum: string): Promise<boolean>;
485
- delete(checksum: string): Promise<boolean>;
486
- reconcile(liveChecksums: Iterable<string>, opts?: BlobReconcileOptions): Promise<BlobReconcileResult>;
487
- gc(opts?: BlobGcOptions): Promise<BlobGcResult>;
488
- diagnostics(): Promise<BlobStoreDiagnostics>;
489
- close(): Promise<void>;
490
- }
491
- interface CreateBlobStoreOptions {
492
- /** Force a tier; omit to probe IndexedDB → OPFS → memory (measured default). */
493
- backend?: BlobBackendKind;
494
- /** Injectable IDBFactory for tests (fake-indexeddb). Defaults to the global. */
495
- indexedDB?: IDBFactory;
496
- /** Skip the one-shot migration of the pre-bytecask blob layout. */
497
- migrateLegacy?: boolean;
498
- }
499
- /**
500
- * Construct the bytecask-backed BlobStore for one archive namespace.
501
- *
502
- * `@bytecask/core` is reached only through a dynamic `import()` here, so
503
- * hosts that never touch attachment bytes never load it. The namespace is a
504
- * function of `archiveName` alone — identical in DB-free and PGlite modes.
505
- *
506
- * Tiering: IndexedDB by default (measured default per bytecask's C3
507
- * benchmark), memory fallback when IndexedDB is unavailable. The OPFS opt-in
508
- * tier arrives with the upstream `createBlobStore()` factory switch
509
- * (`@bytecask/core` 2026.7.2); requesting it now fails loudly rather than
510
- * silently falling back.
511
- */
512
- declare function createBlobStore(archiveName: string, options?: CreateBlobStoreOptions): Promise<BlobStore>;
513
- /**
514
- * Synchronous facade over {@link createBlobStore}: construction is free, the
515
- * dynamic import happens on the first byte operation. This is what
516
- * `FortemiProvider` wires so hosts that never touch attachment bytes never
517
- * pay for the substrate (ADR-012 D6).
518
- */
519
- declare function createLazyBlobStore(archiveName: string, options?: CreateBlobStoreOptions): BlobStore;
520
-
521
- /**
522
- * Signed Knowledge-Shard verification (#324, ADR-014).
523
- *
524
- * Authenticity — as distinct from the consistency the in-archive checksums
525
- * provide (SEC7) — comes from an Ed25519 signature over a canonical payload
526
- * that commits to the manifest digest and the referenced blob-byte digests.
527
- * Verification is pure and side-effect-free; it runs BEFORE any record or
528
- * blob mutation (ADR-013 D6 / ADR-014 D3). Bytecask never sees keys.
529
- */
530
-
531
- declare const SIGNATURE_ENTRY = "signature.json";
532
- declare const SIGNING_ENVELOPE_VERSION = "1";
533
- declare const SIGNING_ALGORITHM = "ed25519";
534
- interface ShardSigner {
535
- key_id: string;
536
- algorithm: typeof SIGNING_ALGORITHM;
537
- /** Raw 32-byte Ed25519 public key, base64url. */
538
- public_key: string;
539
- }
540
- /** The signed payload (never contains its own signature — ADR-014 D2). */
541
- interface ShardSigningPayload {
542
- format_version: typeof SIGNING_ENVELOPE_VERSION;
543
- signer: ShardSigner;
544
- /** SHA-256 hex of the canonical manifest.json bytes. */
545
- manifest_digest: string;
546
- /** Sorted bare-hex BLAKE3 digests of referenced sidecar blobs. */
547
- blob_digests: string[];
548
- }
549
- /** `signature.json` archive entry: the payload plus its base64url signature. */
550
- interface ShardSignatureEnvelope extends ShardSigningPayload {
551
- signature: string;
552
- }
553
- interface TrustedKey {
554
- key_id: string;
555
- /** Raw 32-byte Ed25519 public key, base64url. */
556
- public_key: string;
557
- revoked?: boolean;
558
- }
559
- interface ShardTrustStore {
560
- resolve(keyId: string): TrustedKey | null | Promise<TrustedKey | null>;
561
- }
562
- /** In-memory allowlist trust store seeded from `{ key_id, public_key }` entries. */
563
- declare class AllowlistTrustStore implements ShardTrustStore {
564
- private keys;
565
- constructor(keys: TrustedKey[]);
566
- resolve(keyId: string): TrustedKey | null;
567
- /** Mark a key revoked without removing it (still resolvable, verdict `revoked`). */
568
- revoke(keyId: string): void;
569
- }
570
- type ShardSignatureVerdict = {
571
- ok: true;
572
- keyId: string;
573
- } | {
574
- ok: false;
575
- reason: 'unsigned';
576
- } | {
577
- ok: false;
578
- reason: 'malformed';
579
- detail: string;
580
- } | {
581
- ok: false;
582
- reason: 'unknown-signer';
583
- keyId: string;
584
- } | {
585
- ok: false;
586
- reason: 'revoked';
587
- keyId: string;
588
- } | {
589
- ok: false;
590
- reason: 'bad-signature';
591
- keyId: string;
592
- } | {
593
- ok: false;
594
- reason: 'content-mismatch';
595
- detail: string;
596
- } | {
597
- ok: false;
598
- reason: 'unsupported';
599
- };
600
- /** True when this runtime's WebCrypto verifies Ed25519 (ADR-014 D1). */
601
- declare function isShardSigningSupported(): Promise<boolean>;
602
- /** Sorted bare-hex BLAKE3 digests of the sidecar blobs present in the archive. */
603
- declare function sidecarBlobDigests(files: Map<string, Uint8Array>): string[];
604
- interface VerifyShardSignatureInput {
605
- files: Map<string, Uint8Array>;
606
- trustStore: ShardTrustStore;
607
- }
608
- /**
609
- * Verify a shard's Ed25519 signature over its canonical payload. Pure: reads
610
- * archive bytes, resolves the key, checks the signature and the
611
- * manifest/blob-digest commitments. No persistence, no mutation.
612
- */
613
- declare function verifyShardSignature(input: VerifyShardSignatureInput): Promise<ShardSignatureVerdict>;
614
- interface SignShardInput {
615
- files: Map<string, Uint8Array>;
616
- keyId: string;
617
- /** Ed25519 private key (raw 32-byte seed or PKCS8), imported by the caller. */
618
- privateKey: CryptoKey;
619
- /** Raw 32-byte public key, base64url — embedded in the envelope + trust store. */
620
- publicKey: string;
621
- }
622
- /**
623
- * Produce the `signature.json` envelope for an assembled archive `files` map.
624
- * The caller adds the returned bytes to the archive under {@link SIGNATURE_ENTRY}
625
- * (excluded from manifest.checksums — it post-dates the manifest).
626
- */
627
- declare function signShard(input: SignShardInput): Promise<Uint8Array>;
628
-
629
- /**
630
- * Shard format types — matches the fortemi server matric-shard specification.
631
- *
632
- * A shard is a gzip-compressed tar archive (.shard) containing serialized
633
- * knowledge data with a manifest for integrity verification.
634
- *
635
- * @implements @.aiwg/adrs/ADR-011-shard-server-conformance-and-version-negotiation.md
636
- * @schema @packages/core/schemas/knowledge-shard.schema.receipt.json
637
- * @created 2026-07-17
638
- * @agent Codex
639
- */
640
-
641
- declare const CURRENT_SHARD_VERSION = "1.2.0";
642
- declare const SHARD_FORMAT = "matric-shard";
643
- /** Components that can appear in a shard archive. */
644
- type ShardComponent = 'notes' | 'collections' | 'tags' | 'templates' | 'links' | 'note_originals' | 'note_original_history' | 'note_revised_current' | 'note_revisions' | 'embedding_sets' | 'embedding_configs' | 'embedding_set_members' | 'embeddings' | 'provenance_activities' | 'named_locations' | 'provenance_locations' | 'provenance_devices' | 'provenance_records' | 'skos_schemes' | 'skos_concepts' | 'skos_labels' | 'skos_notes' | 'skos_relations' | 'skos_mapping_relations' | 'skos_scheme_memberships' | 'note_skos_tags' | 'skos_collections' | 'skos_collection_members' | 'provenance_edges' | 'community_assignments' | 'communities' | 'graph_edges' | 'graph_sources';
645
- type KnowledgeShardProfile = 'core-v1' | 'full-v1' | 'record-v1';
646
- type ShardBackend = 'pglite' | 'record-store';
647
- type ShardOperation = 'export' | 'import';
648
- type ShardAuthorityStatus = 'supported' | 'candidate' | 'reserved' | 'unknown' | 'unprofiled';
649
- interface ShardProfileRegistryEntry {
650
- profile: KnowledgeShardProfile;
651
- authority_status: 'supported' | 'candidate' | 'reserved';
652
- components: ShardComponent[];
653
- }
654
- interface ShardLossEntry {
655
- code: string;
656
- message: string;
657
- component?: ShardComponent;
658
- count?: number;
659
- }
660
- interface ShardCapabilityReport {
661
- schema_version: 'fortemi.shard.capability-report.v1';
662
- backend: ShardBackend;
663
- operation: ShardOperation;
664
- requested_profile: string | null;
665
- authority_status: ShardAuthorityStatus;
666
- backend_supported: boolean;
667
- portable: boolean;
668
- authority: {
669
- repository: string;
670
- commit: string;
671
- contract_sha256: string;
672
- contract_revision: string;
673
- schema_version: string;
674
- schema_bundle_sha256: string;
675
- };
676
- advertised_profiles: KnowledgeShardProfile[];
677
- supported_components: ShardComponent[];
678
- declared_components: ShardComponent[];
679
- unsupported_components: ShardComponent[];
680
- omitted_components: ShardComponent[];
681
- losses: ShardLossEntry[];
682
- }
683
- interface ShardAttachmentReference {
684
- id: string;
685
- path: string;
686
- mime: string | null;
687
- checksum: string;
688
- bytes: number;
689
- }
690
- interface ShardAttachmentProjection {
691
- extracted_text: string | null;
692
- /** Legacy unprofiled relationship timestamp; outside core-v1. */
693
- created_at?: string;
694
- /** Legacy unprofiled attachment tombstone; outside core-v1. */
695
- deleted_at?: string | null;
696
- extraction_status?: 'extracted' | 'pending' | 'failed' | 'blocked' | 'deferred';
697
- reason?: null | 'extraction_pending' | 'extractor_failed' | 'quarantined' | 'large_binary' | 'unsupported_mime' | 'no_extracted_text';
698
- attachment: ShardAttachmentReference;
699
- }
700
- /** @deprecated Legacy React shard field name. Server shards use `attachments`. */
701
- type ShardBinarySource = ShardAttachmentProjection;
702
- /**
703
- * Reference to one cluster file of a component split across addressable files
704
- * (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset` preserves deterministic
705
- * component order; readers discover each cluster's size from its contents.
706
- */
707
- interface ShardClusterRef {
708
- href: string;
709
- offset: number;
710
- }
711
- /**
712
- * Optional clustered layout (additive — absent on monolithic shards). When a
713
- * component is present here, its records live in the listed cluster files instead
714
- * of (or in addition to) the single `<component>.jsonl`. Both `importShard` and
715
- * the in-place reader consume it; a monolithic shard omits `layout` entirely.
716
- */
717
- interface ShardLayout {
718
- clusters?: Partial<Record<ShardComponent, ShardClusterRef[]>>;
719
- }
720
- interface ShardMigrationHistoryEntry {
721
- from_version: string;
722
- to_version: string;
723
- migrated_at: string;
724
- migrated_by: string;
725
- changes: string[];
726
- }
727
- /** Manifest included in every shard as manifest.json. */
728
- interface ShardProducer {
729
- name: string;
730
- version: string;
731
- revision?: string;
732
- }
733
- interface ShardManifest {
734
- version: string;
735
- /** Named server-owned portability profile. Required for canonical interchange. */
736
- profile?: string;
737
- /** Structured producer identity used by canonical profiles. */
738
- producer?: ShardProducer;
739
- /** @deprecated Legacy producer release field. */
740
- matric_version?: string;
741
- format: typeof SHARD_FORMAT;
742
- created_at: string;
743
- components: ShardComponent[];
744
- counts: Partial<Record<ShardComponent | 'community_sets', number>>;
745
- checksums: Record<string, string>;
746
- min_reader_version: string;
747
- migrated_from?: string | null;
748
- migration_history?: ShardMigrationHistoryEntry[];
749
- /** Clustered component layout for partial fetch (issue #189). Absent → monolithic. */
750
- layout?: ShardLayout;
751
- }
752
- /** Options for shard export. */
753
- interface ExportOptions {
754
- /**
755
- * Explicit portability profile. Only profiles advertised by the selected
756
- * producer are accepted. Omit to retain the legacy unprofiled React archive.
757
- */
758
- profile?: string;
759
- includeEmbeddings?: boolean;
760
- /** Filter to specific collection (export only notes in this collection). */
761
- collectionId?: string;
762
- /** Filter to notes with this tag (e.g. 'app:research' for app-scoped export). */
763
- tag?: string;
764
- /** Export only these embedding sets and their member/vector rows. */
765
- embeddingSetIds?: string[];
766
- /** Preserve virtual selector materialization metadata and virtual member rows. */
767
- includeMaterializedSelectors?: boolean;
768
- /**
769
- * When set to a positive integer, emit notes as clustered files
770
- * (`notes/000.jsonl`, …) of this many records each, and record the layout in
771
- * the manifest, so an in-place reader can fetch only the clusters it needs
772
- * (issue #189). Absent → a single monolithic `notes.jsonl` (unchanged).
773
- */
774
- clusterNotesSize?: number;
775
- /**
776
- * Pack attachment bytes into a portable content-addressed `blobs/<hex>`
777
- * sidecar (Fortemi/fortemi#1046), producing a self-contained shard whose
778
- * attachments survive a round-trip (`getBlob()` returns real bytes on the
779
- * importing host). Requires {@link blobStore}. Absent/false → reference-only
780
- * (server default), which remains a valid shard.
781
- */
782
- includeBlobs?: boolean;
783
- /**
784
- * Byte source for the sidecar. Required when `includeBlobs` is set; attachment
785
- * bytes are read by their `content_hash`. A blob the store cannot return is
786
- * skipped (its attachment stays reference-only) rather than failing export.
787
- */
788
- blobStore?: BlobStore;
789
- }
790
- /** Conflict resolution strategy for shard import. */
791
- type ConflictStrategy = 'skip' | 'replace' | 'error';
792
- /** Options for shard import. */
793
- interface ImportOptions {
794
- conflictStrategy?: ConflictStrategy;
795
- /** Rows processed between cooperative yields. Defaults to 250. */
796
- batchSize?: number;
797
- /** Progress callback for long-running import phases. */
798
- onProgress?: (progress: ImportProgress) => void;
799
- /**
800
- * Destination for hydrating attachment bytes from a portable `blobs/<hex>`
801
- * sidecar (Fortemi/fortemi#1046). When provided, sidecar entries whose bare
802
- * hex matches an imported attachment's `content_hash` are promoted before
803
- * the logical transaction. A transaction failure removes only bytes that
804
- * were absent before promotion. Stores without the optional `delete`
805
- * capability fail before promotion. Absent → reference-only metadata.
806
- */
807
- blobStore?: BlobStore;
808
- /**
809
- * Publisher-provenance policy for signed shards (#324, ADR-014):
810
- * - `require` — reject unsigned or bad-signature shards (default when a
811
- * `trustStore` is supplied);
812
- * - `prefer` — verify signed shards; import unsigned ones with a warning;
813
- * still reject a present-but-invalid signature;
814
- * - `trusted-local-only` — ignore signatures (own-export import).
815
- * When both `trustStore` and this are omitted, verification is skipped
816
- * entirely (checksum-only, unchanged behavior).
817
- */
818
- verifySignature?: 'require' | 'prefer' | 'trusted-local-only';
819
- /** Trust store resolving signer key_id → public key (required for `require`/`prefer`). */
820
- trustStore?: ShardTrustStore;
821
- }
822
- type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'templates' | 'links' | 'provenance' | 'embedding_sets' | 'embedding_configs' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
823
- interface ImportProgress {
824
- phase: ImportProgressPhase;
825
- done: number;
826
- total: number;
827
- }
828
- /** Per-entity import counts. */
829
- interface ImportCounts {
830
- notes: number;
831
- collections: number;
832
- templates: number;
833
- tags: number;
834
- links: number;
835
- embedding_sets: number;
836
- embedding_configs: number;
837
- embedding_set_members: number;
838
- embeddings: number;
839
- skos_schemes: number;
840
- skos_concepts: number;
841
- skos_relations: number;
842
- note_skos_tags: number;
843
- provenance_edges: number;
844
- graph_sources: number;
845
- graph_edges: number;
846
- community_sets: number;
847
- communities: number;
848
- community_assignments: number;
849
- }
850
- /** Result of a shard import operation. */
851
- interface ImportResult {
852
- success: boolean;
853
- counts: ImportCounts;
854
- skipped: Partial<ImportCounts>;
855
- warnings: string[];
856
- errors: string[];
857
- duration_ms: number;
858
- capability_report: ShardCapabilityReport;
859
- }
860
- interface ShardExportResult {
861
- success: boolean;
862
- archive: Uint8Array | null;
863
- errors: string[];
864
- capability_report: ShardCapabilityReport;
865
- }
866
- /** Note as serialized in the shard JSONL. */
867
- interface ShardNote {
868
- id: string;
869
- title: string | null;
870
- original_content: string;
871
- revised_content: string | null;
872
- metadata?: Record<string, unknown> | null;
873
- collection_id?: string | null;
874
- attachments?: ShardAttachmentProjection[];
875
- /** @deprecated Legacy React shard field name. Use `attachments`. */
876
- binary_sources?: ShardBinarySource[];
877
- format: string;
878
- source: string;
879
- starred: boolean;
880
- archived: boolean;
881
- tags: string[];
882
- created_at: string;
883
- updated_at: string;
884
- /** Schema 1.1 core-v1 tombstone; legacy unprofiled archives also carry it. */
885
- deleted_at?: string | null;
886
- }
887
- /** Collection as serialized in the shard JSON array. */
888
- interface ShardCollection {
889
- id: string;
890
- name: string;
891
- description: string | null;
892
- parent_id: string | null;
893
- created_at: string;
894
- /** Legacy unprofiled fields; outside core-v1. */
895
- updated_at?: string;
896
- deleted_at?: string | null;
897
- note_count?: number;
898
- }
899
- /** Tag as serialized in the shard JSON array. */
900
- interface ShardTag {
901
- name: string;
902
- created_at: string;
903
- }
904
- /** Template as serialized in the shard JSON array. */
905
- interface ShardTemplate {
906
- id: string;
907
- name: string;
908
- description: string | null;
909
- content: string;
910
- format: string;
911
- default_tags: string[];
912
- collection_id: string | null;
913
- created_at: string;
914
- updated_at: string;
915
- }
916
- /** Link as serialized in the shard JSONL. */
917
- interface ShardLink {
918
- id: string;
919
- from_note_id: string;
920
- to_note_id: string | null;
921
- /** Optional for legacy React shards exported before URL links existed. */
922
- to_url?: string | null;
923
- kind: string;
924
- score: number | null;
925
- created_at: string;
926
- /** Optional for legacy React shards exported before link metadata existed. */
927
- metadata?: Record<string, unknown> | null;
928
- }
929
- /**
930
- * Embedding set as serialized in the shard JSON array.
931
- *
932
- * Fields beyond id/model/dimension are optional for backward compatibility:
933
- * legacy React shards omit them and import falls back to the same defaults
934
- * `embeddingSetFromShard` applies (name → model, is_system → false, …).
935
- */
936
- interface ShardEmbeddingSet {
937
- id: string;
938
- name?: string;
939
- slug?: string | null;
940
- description?: string | null;
941
- purpose?: string | null;
942
- document_count?: number;
943
- embedding_count?: number;
944
- is_system?: boolean;
945
- keywords?: string[];
946
- model: string;
947
- dimension: number;
948
- kind?: 'physical' | 'filter' | 'virtual';
949
- mode?: 'auto' | 'manual' | 'mixed' | null;
950
- truncate_dimension?: number | null;
951
- criteria?: Record<string, unknown> | null;
952
- source?: Record<string, unknown> | null;
953
- compatibility?: Record<string, unknown> | null;
954
- materialization?: Record<string, unknown> | null;
955
- freshness?: ShardArtifactFreshness | null;
956
- created_at?: string;
957
- updated_at?: string;
958
- }
959
- /** Embedding set member as serialized in the shard JSONL. */
960
- interface ShardEmbeddingSetMember {
961
- embedding_set_id: string;
962
- note_id: string;
963
- /** Legacy React shard field; new exports use server membership metadata instead. */
964
- embedding_id?: string;
965
- /** Optional for legacy React shards; import defaults to 'materialized'. */
966
- membership_type?: string;
967
- /** Optional for legacy React shards; import falls back to the manifest timestamp. */
968
- added_at?: string;
969
- /** Optional for legacy React shards; import defaults to NULL. */
970
- added_by?: string | null;
971
- }
972
- /** Embedding config as serialized in the shard JSON array. */
973
- interface ShardEmbeddingConfig {
974
- id: string;
975
- name: string;
976
- description: string | null;
977
- model: string;
978
- dimension: number;
979
- chunk_size: number;
980
- chunk_overlap: number;
981
- is_default: boolean;
982
- }
983
- /**
984
- * Embedding as serialized in the shard JSONL.
985
- *
986
- * Server metadata fields (`chunk_index`, `text`, `model`) are optional for
987
- * backward compatibility: legacy React shards exported before migration 0016
988
- * carry only `id`, `note_id`, `embedding_set_id`, `vector`, `created_at`.
989
- * Import normalizes absent metadata to schema defaults (0, '', NULL).
990
- */
991
- interface ShardEmbedding {
992
- id: string;
993
- note_id: string;
994
- chunk_index?: number;
995
- text?: string;
996
- vector: number[];
997
- model?: string;
998
- /** React shard extension used to preserve local embedding-set scoping. */
999
- embedding_set_id?: string;
1000
- /** React shard extension used to preserve local creation ordering. */
1001
- created_at?: string;
1002
- }
1003
- /** SKOS scheme as serialized in the shard JSON array. */
1004
- interface ShardSkosScheme {
1005
- id: string;
1006
- title: string;
1007
- description: string | null;
1008
- created_at: string;
1009
- updated_at: string;
1010
- }
1011
- /** SKOS concept as serialized in the shard JSON array. */
1012
- interface ShardSkosConcept {
1013
- id: string;
1014
- scheme_id: string;
1015
- pref_label: string;
1016
- alt_labels: string[];
1017
- definition: string | null;
1018
- created_at: string;
1019
- updated_at: string;
1020
- }
1021
- /** SKOS concept relation as serialized in the shard JSONL. */
1022
- interface ShardSkosRelation {
1023
- id: string;
1024
- source_concept_id: string;
1025
- target_concept_id: string;
1026
- relation_type: 'broader' | 'narrower' | 'related';
1027
- created_at: string;
1028
- }
1029
- /** Note-to-SKOS-concept assignment as serialized in the shard JSONL. */
1030
- interface ShardNoteSkosTag {
1031
- id: string;
1032
- note_id: string;
1033
- concept_id: string;
1034
- created_at: string;
1035
- }
1036
- /** Provenance edge as serialized in the shard JSONL. */
1037
- interface ShardProvenanceEdge {
1038
- id: string;
1039
- entity_type: string;
1040
- entity_id: string;
1041
- activity: string;
1042
- agent: string;
1043
- started_at: string;
1044
- ended_at: string | null;
1045
- attributes: Record<string, unknown> | null;
1046
- }
1047
- interface ShardArtifactFreshness {
1048
- status: 'fresh' | 'stale' | 'unknown';
1049
- checked_at?: string;
1050
- stale_reason?: string;
1051
- source_hashes?: {
1052
- notes?: string;
1053
- links?: string;
1054
- embeddings?: string;
1055
- embedding_set_members?: string;
1056
- virtual_set_definition?: string;
1057
- parameters?: string;
1058
- };
1059
- }
1060
-
1061
395
  /**
1062
396
  * Field mapper — converts between browser schema and shard (server) schema.
1063
397
  *
@@ -1083,7 +417,7 @@ interface BrowserNoteExport {
1083
417
  deleted_at: Date | string | null;
1084
418
  original_content: string;
1085
419
  revised_content: string | null;
1086
- ai_metadata?: Record<string, unknown> | null;
420
+ ai_metadata?: unknown;
1087
421
  collection_id?: string | null;
1088
422
  attachments?: ShardAttachmentProjection[];
1089
423
  tags: string[];
@@ -1126,7 +460,7 @@ declare function linkFromShard(shard: ShardLink): {
1126
460
  created_at: string;
1127
461
  updated_at: string | null;
1128
462
  deleted_at: string | null;
1129
- metadata: Record<string, unknown> | null;
463
+ metadata: unknown;
1130
464
  };
1131
465
  /** Convert a browser collection to shard format (accepts SQL rows or canonical ISO-string records). */
1132
466
  declare function collectionToShard(collection: {
@@ -2990,35 +2324,35 @@ declare const CaptureKnowledgeInputSchema: z.ZodObject<{
2990
2324
  }, "strip", z.ZodTypeAny, {
2991
2325
  source: string;
2992
2326
  format: "markdown" | "plain" | "html";
2993
- visibility: "private" | "shared" | "public";
2327
+ visibility: "private" | "public" | "shared";
2994
2328
  action: "create" | "bulk_create" | "from_template";
2995
2329
  title?: string | undefined;
2330
+ tags?: string[] | undefined;
2331
+ archive_id?: string | undefined;
2332
+ content?: string | undefined;
2996
2333
  notes?: {
2997
2334
  format: "markdown" | "plain" | "html";
2998
2335
  content: string;
2999
2336
  title?: string | undefined;
3000
2337
  tags?: string[] | undefined;
3001
2338
  }[] | undefined;
3002
- tags?: string[] | undefined;
3003
- archive_id?: string | undefined;
3004
- content?: string | undefined;
3005
2339
  template?: string | undefined;
3006
2340
  variables?: Record<string, string> | undefined;
3007
2341
  }, {
3008
2342
  action: "create" | "bulk_create" | "from_template";
2343
+ source?: string | undefined;
3009
2344
  title?: string | undefined;
2345
+ tags?: string[] | undefined;
2346
+ format?: "markdown" | "plain" | "html" | undefined;
2347
+ archive_id?: string | undefined;
2348
+ visibility?: "private" | "public" | "shared" | undefined;
2349
+ content?: string | undefined;
3010
2350
  notes?: {
3011
2351
  content: string;
3012
2352
  title?: string | undefined;
3013
2353
  tags?: string[] | undefined;
3014
2354
  format?: "markdown" | "plain" | "html" | undefined;
3015
2355
  }[] | undefined;
3016
- tags?: string[] | undefined;
3017
- source?: string | undefined;
3018
- archive_id?: string | undefined;
3019
- format?: "markdown" | "plain" | "html" | undefined;
3020
- visibility?: "private" | "shared" | "public" | undefined;
3021
- content?: string | undefined;
3022
2356
  template?: string | undefined;
3023
2357
  variables?: Record<string, string> | undefined;
3024
2358
  }>;
@@ -3067,12 +2401,12 @@ declare const SearchInputSchema: z.ZodObject<{
3067
2401
  limit: number;
3068
2402
  offset: number;
3069
2403
  include_facets: boolean;
3070
- mode: "auto" | "text" | "semantic" | "hybrid";
2404
+ mode: "text" | "auto" | "semantic" | "hybrid";
3071
2405
  query: string;
3072
- tags?: string[] | undefined;
3073
2406
  source?: string | undefined;
2407
+ tags?: string[] | undefined;
3074
2408
  format?: "markdown" | "plain" | "html" | undefined;
3075
- visibility?: "private" | "shared" | "public" | undefined;
2409
+ visibility?: "private" | "public" | "shared" | undefined;
3076
2410
  is_starred?: boolean | undefined;
3077
2411
  is_archived?: boolean | undefined;
3078
2412
  collection_id?: string | undefined;
@@ -3082,10 +2416,10 @@ declare const SearchInputSchema: z.ZodObject<{
3082
2416
  query_embedding?: number[] | undefined;
3083
2417
  }, {
3084
2418
  query: string;
3085
- tags?: string[] | undefined;
3086
2419
  source?: string | undefined;
2420
+ tags?: string[] | undefined;
3087
2421
  format?: "markdown" | "plain" | "html" | undefined;
3088
- visibility?: "private" | "shared" | "public" | undefined;
2422
+ visibility?: "private" | "public" | "shared" | undefined;
3089
2423
  is_starred?: boolean | undefined;
3090
2424
  is_archived?: boolean | undefined;
3091
2425
  limit?: number | undefined;
@@ -3094,7 +2428,7 @@ declare const SearchInputSchema: z.ZodObject<{
3094
2428
  date_from?: Date | undefined;
3095
2429
  date_to?: Date | undefined;
3096
2430
  include_facets?: boolean | undefined;
3097
- mode?: "auto" | "text" | "semantic" | "hybrid" | undefined;
2431
+ mode?: "text" | "auto" | "semantic" | "hybrid" | undefined;
3098
2432
  embeddingSetId?: string | undefined;
3099
2433
  query_embedding?: number[] | undefined;
3100
2434
  }>;
@@ -3174,7 +2508,7 @@ declare const ListNotesInputSchema: z.ZodObject<{
3174
2508
  collection_id: z.ZodOptional<z.ZodString>;
3175
2509
  include_deleted: z.ZodOptional<z.ZodBoolean>;
3176
2510
  }, "strip", z.ZodTypeAny, {
3177
- sort: "title" | "created_at" | "updated_at";
2511
+ sort: "updated_at" | "title" | "created_at";
3178
2512
  limit: number;
3179
2513
  offset: number;
3180
2514
  order: "asc" | "desc";
@@ -3185,7 +2519,7 @@ declare const ListNotesInputSchema: z.ZodObject<{
3185
2519
  collection_id?: string | undefined;
3186
2520
  }, {
3187
2521
  tags?: string[] | undefined;
3188
- sort?: "title" | "created_at" | "updated_at" | undefined;
2522
+ sort?: "updated_at" | "title" | "created_at" | undefined;
3189
2523
  is_starred?: boolean | undefined;
3190
2524
  is_archived?: boolean | undefined;
3191
2525
  limit?: number | undefined;
@@ -3457,8 +2791,8 @@ declare const ManageAttachmentsInputSchema: z.ZodObject<{
3457
2791
  display_name: z.ZodOptional<z.ZodString>;
3458
2792
  }, "strip", z.ZodTypeAny, {
3459
2793
  action: "delete" | "list" | "attach" | "get" | "get_blob";
3460
- filename?: string | undefined;
3461
2794
  note_id?: string | undefined;
2795
+ filename?: string | undefined;
3462
2796
  extracted_text?: string | undefined;
3463
2797
  attachment_id?: string | undefined;
3464
2798
  data_base64?: string | undefined;
@@ -3466,8 +2800,8 @@ declare const ManageAttachmentsInputSchema: z.ZodObject<{
3466
2800
  display_name?: string | undefined;
3467
2801
  }, {
3468
2802
  action: "delete" | "list" | "attach" | "get" | "get_blob";
3469
- filename?: string | undefined;
3470
2803
  note_id?: string | undefined;
2804
+ filename?: string | undefined;
3471
2805
  extracted_text?: string | undefined;
3472
2806
  attachment_id?: string | undefined;
3473
2807
  data_base64?: string | undefined;
@@ -4217,6 +3551,7 @@ interface CreateShardCapabilityReportInput {
4217
3551
  backend: ShardBackend;
4218
3552
  operation: ShardOperation;
4219
3553
  requestedProfile: string | null;
3554
+ requestedSchemaVersion?: string | null;
4220
3555
  declaredComponents?: readonly ShardComponent[];
4221
3556
  omittedComponents?: readonly ShardComponent[];
4222
3557
  losses?: readonly ShardLossEntry[];
@@ -4290,6 +3625,12 @@ declare function validateChecksums(checksums: Record<string, string>, files: Map
4290
3625
  failures: string[];
4291
3626
  }>;
4292
3627
 
3628
+ /** Presence semantics for Knowledge Shard schema 2.0 (Fortemi #1083). */
3629
+
3630
+ type ShardPresenceState = 'absent' | 'null' | 'empty' | 'value';
3631
+ type StoredPresenceState = ShardPresenceState | 'legacy-indeterminate';
3632
+ type ShardPresenceMap = Record<string, StoredPresenceState>;
3633
+
4293
3634
  /**
4294
3635
  * Shard export pipeline — query all entities, serialize, pack into .shard archive.
4295
3636
  *
@@ -4344,7 +3685,7 @@ interface ShardSchemaValidationResult {
4344
3685
  errors: string[];
4345
3686
  }
4346
3687
  type ShardFiles = Map<string, Uint8Array>;
4347
- type CoreV1SchemaVersion = '1.0.0' | '1.1.0' | '1.2.0';
3688
+ type CoreV1SchemaVersion = '1.0.0' | '1.1.0' | '1.2.0' | '2.0.0';
4348
3689
  declare function getKnowledgeShardSchema(): unknown;
4349
3690
  declare function getKnowledgeShardContractReceipt(): unknown;
4350
3691
  declare function validateShardManifest(value: unknown): ShardSchemaValidationResult;
@@ -4530,7 +3871,12 @@ declare function clearPrefetchedShard(url?: string): void;
4530
3871
  * replay of the change journal — rebuildable at any time without touching
4531
3872
  * canonical records or attachment bytes.
4532
3873
  */
4533
- interface NoteRecord0 {
3874
+
3875
+ interface PresenceTrackedRecord {
3876
+ /** Internal schema-2.0 state; never serialized as a shard component field. */
3877
+ __fortemi_presence?: ShardPresenceMap;
3878
+ }
3879
+ interface NoteRecord0 extends PresenceTrackedRecord {
4534
3880
  id: string;
4535
3881
  archive_id: string | null;
4536
3882
  title: string | null;
@@ -4545,14 +3891,14 @@ interface NoteRecord0 {
4545
3891
  updated_at: string;
4546
3892
  deleted_at: string | null;
4547
3893
  }
4548
- interface NoteOriginalRecord {
3894
+ interface NoteOriginalRecord extends PresenceTrackedRecord {
4549
3895
  id: string;
4550
3896
  note_id: string;
4551
3897
  content: string;
4552
3898
  content_hash: string;
4553
3899
  created_at: string;
4554
3900
  }
4555
- interface NoteRevisedCurrentRecord {
3901
+ interface NoteRevisedCurrentRecord extends PresenceTrackedRecord {
4556
3902
  /** Keyed by note id (mirrors the SQL PK `note_id`). */
4557
3903
  id: string;
4558
3904
  content: string | null;
@@ -4562,21 +3908,23 @@ interface NoteRevisedCurrentRecord {
4562
3908
  is_user_edited: boolean;
4563
3909
  updated_at: string;
4564
3910
  }
4565
- interface NoteTagRecord {
3911
+ interface NoteTagRecord extends PresenceTrackedRecord {
4566
3912
  id: string;
4567
3913
  note_id: string;
4568
3914
  tag: string;
4569
3915
  created_at: string;
4570
3916
  }
4571
- interface LinkRecord0 {
3917
+ interface LinkRecord0 extends PresenceTrackedRecord {
4572
3918
  id: string;
4573
3919
  source_note_id: string;
4574
3920
  target_note_id: string;
4575
3921
  link_type: string;
4576
3922
  created_at: string;
4577
3923
  deleted_at: string | null;
3924
+ /** Exact record-v1 shard metadata; internal projection state, not a domain field. */
3925
+ __fortemi_shard_metadata?: unknown;
4578
3926
  }
4579
- interface CollectionRecord {
3927
+ interface CollectionRecord extends PresenceTrackedRecord {
4580
3928
  id: string;
4581
3929
  name: string;
4582
3930
  description: string | null;
@@ -4586,13 +3934,13 @@ interface CollectionRecord {
4586
3934
  updated_at: string;
4587
3935
  deleted_at: string | null;
4588
3936
  }
4589
- interface CollectionNoteRecord {
3937
+ interface CollectionNoteRecord extends PresenceTrackedRecord {
4590
3938
  id: string;
4591
3939
  collection_id: string;
4592
3940
  note_id: string;
4593
3941
  created_at: string;
4594
3942
  }
4595
- interface AttachmentRecord {
3943
+ interface AttachmentRecord extends PresenceTrackedRecord {
4596
3944
  id: string;
4597
3945
  note_id: string;
4598
3946
  blob_id: string;
@@ -4604,13 +3952,21 @@ interface AttachmentRecord {
4604
3952
  position: number;
4605
3953
  created_at: string;
4606
3954
  deleted_at: string | null;
3955
+ /** Exact record-v1 extraction projection state. */
3956
+ __fortemi_extraction_status?: 'extracted' | 'pending' | 'failed' | 'blocked' | 'deferred';
3957
+ __fortemi_extraction_reason?: unknown;
3958
+ __fortemi_projection_presence?: ShardPresenceMap;
4607
3959
  }
4608
- interface AttachmentBlobRecord {
3960
+ interface AttachmentBlobRecord extends PresenceTrackedRecord {
4609
3961
  id: string;
4610
3962
  content_hash: string;
4611
3963
  size_bytes: number;
4612
3964
  created_at: string;
4613
3965
  }
3966
+ interface ShardManifestRecord extends PresenceTrackedRecord {
3967
+ id: string;
3968
+ manifest: Record<string, unknown>;
3969
+ }
4614
3970
  /** Collection name → record type. The store is generic over this map. */
4615
3971
  interface RecordCollections {
4616
3972
  note: NoteRecord0;
@@ -4622,6 +3978,7 @@ interface RecordCollections {
4622
3978
  collection_note: CollectionNoteRecord;
4623
3979
  attachment: AttachmentRecord;
4624
3980
  attachment_blob: AttachmentBlobRecord;
3981
+ shard_manifest: ShardManifestRecord;
4625
3982
  }
4626
3983
  type RecordCollectionName = keyof RecordCollections;
4627
3984
  declare const RECORD_COLLECTIONS: readonly RecordCollectionName[];
@@ -5036,6 +4393,6 @@ declare function importShardToRecords(store: RecordStore, data: Uint8Array | Arr
5036
4393
  * @created 2026-07-17
5037
4394
  * @agent Codex
5038
4395
  */
5039
- declare const VERSION = "2026.7.12";
4396
+ declare const VERSION = "2026.7.13";
5040
4397
 
5041
- export { 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, CORE_V1_COMPONENTS, 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, type KnowledgeShardProfile, 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 NoteProjectionResult, 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 RecordBackendManageNoteResult, type RecordBackendOptions, type RecordCollectionName, type RecordCollections, type RecordListOptions, type RecordMutation, type RecordProjectionResult, 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 ShardAuthorityStatus, type ShardBackend, type ShardBackendOptions, type ShardCapabilityReport, type ShardClusterRef, type ShardCollection, type ShardComponent, type ShardComponentStore, type ShardEmbedding, type ShardEmbeddingConfig, type ShardEmbeddingSet, type ShardEmbeddingSetMember, type ShardExportResult, type ShardLayout, type ShardLink, type ShardListOptions, type ShardLossEntry, type ShardManifest, type ShardNote, type ShardNoteFull, type ShardNoteSkosTag, type ShardOperation, type ShardProfileRegistryEntry, 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, allMigrations, appendPluginScript, assertShardComponentRecord, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeBlobHash, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createBlobStore, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLazyBlobStore, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRecordBackend, createRecordStore, createRemoteBackend, createRoutes, createShardBackend, createShardCapabilityReport, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dropAttachmentProjection, dropNoteProjection, dumpDbSnapshot, embeddingConfigToShard, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, exportShardFromRecords, exportShardFromRecordsWithReport, exportShardWithReport, fetchAndValidateFortemiCompatibility, fetchPluginScript, formatFortemiCompatibilitySummary, fortemiCompatibilityUrl, fortemiManifest, fromPrefetched, generateId, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getKnowledgeShardContractReceipt, getKnowledgeShardProfileRegistry, getKnowledgeShardSchema, getLlmFunction, getNote, getPrefetchedSha256, handleEmbedRequests, hasFortemiSecureSecrets, importShard, importShardToRecords, isPluginScriptAllowed, isShardPrefetched, isShardSigningSupported, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, migrateLegacyBlobStore, noteFromShard, noteSkosTagToShard, noteToShard, openShard, packTarGz, parseCspReport, prefetchShard, profileSupportError, projectAttachments, projectNotes, projectRecords, provenanceEdgeToShard, registerLlmCapability, registerSemanticCapability, registerSemanticCapabilityWorker, registerServiceWorker, restoreDbSnapshot, searchTool, selectBackend, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, sidecarBlobDigests, signShard, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsToShard, templateToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, urlLinkToShard, validateChecksums, validateCoreV1ShardArchive, validateFortemiCompatibilityResponse, validateFullV1ShardArchive, validateRecordV1ShardArchive, validateShardArchive, validateShardComponentRecord, validateShardManifest, verifyDbSnapshotMeta, verifyShardSignature, verifySri };
4398
+ export { 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, BlobGcOptions, BlobGcResult, BlobReconcileOptions, BlobReconcileResult, BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, CORE_V1_COMPONENTS, CURRENT_MIGRATION_HEAD, 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 CooldownConfig, type CooldownEvent, type CosineSemanticProviderOptions, 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, 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, ImportOptions, 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, MemoryRecordStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteOriginalRecord, type NoteProjectionResult, 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 PresenceTrackedRecord, 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 RecordBackendManageNoteResult, type RecordBackendOptions, type RecordCollectionName, type RecordCollections, type RecordListOptions, type RecordMutation, type RecordProjectionResult, type RecordProvenanceInput, type RecordStore, type RecordStoreCapabilities, type RemoteBackendConfig, type RemoteBackendPaths, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RestoreDbSnapshotOptions, type RouteHandler, SUPPORTED_PGLITE_VERSION, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, ShardBackend, type ShardBackendOptions, ShardCapabilityReport, ShardCollection, ShardComponent, type ShardComponentStore, ShardEmbedding, ShardEmbeddingConfig, ShardEmbeddingSet, ShardEmbeddingSetMember, ShardExportResult, ShardLink, type ShardListOptions, ShardLossEntry, ShardManifest, ShardNote, type ShardNoteFull, ShardNoteSkosTag, ShardOperation, ShardProfileRegistryEntry, ShardProvenanceEdge, type ShardReader, type ShardReaderNote, type ShardReaderSource, type ShardSchemaValidationResult, type ShardSearchOptions, type ShardSearchRankedNote, type ShardSearchResult, type ShardSearchWeights, ShardSkosConcept, ShardSkosRelation, ShardSkosScheme, ShardTag, ShardTemplate, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StaticSemanticProvider, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VectorEntry, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, allMigrations, appendPluginScript, assertShardComponentRecord, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeBlobHash, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRecordBackend, createRecordStore, createRemoteBackend, createRoutes, createShardBackend, createShardCapabilityReport, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dropAttachmentProjection, dropNoteProjection, dumpDbSnapshot, embeddingConfigToShard, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, exportShardFromRecords, exportShardFromRecordsWithReport, exportShardWithReport, fetchAndValidateFortemiCompatibility, fetchPluginScript, formatFortemiCompatibilitySummary, fortemiCompatibilityUrl, fortemiManifest, fromPrefetched, generateId, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getKnowledgeShardContractReceipt, getKnowledgeShardProfileRegistry, getKnowledgeShardSchema, getLlmFunction, getNote, getPrefetchedSha256, handleEmbedRequests, hasFortemiSecureSecrets, importShard, importShardToRecords, isPluginScriptAllowed, isShardPrefetched, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, migrateLegacyBlobStore, noteFromShard, noteSkosTagToShard, noteToShard, openShard, packTarGz, parseCspReport, prefetchShard, profileSupportError, projectAttachments, projectNotes, projectRecords, provenanceEdgeToShard, registerLlmCapability, registerSemanticCapability, registerSemanticCapabilityWorker, registerServiceWorker, restoreDbSnapshot, searchTool, selectBackend, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsToShard, templateToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, urlLinkToShard, validateChecksums, validateCoreV1ShardArchive, validateFortemiCompatibilityResponse, validateFullV1ShardArchive, validateRecordV1ShardArchive, validateShardArchive, validateShardComponentRecord, validateShardManifest, verifyDbSnapshotMeta, verifySri };