@fortemi/core 2026.7.2 → 2026.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/aiwg-index-C2G7iy-b.d.ts +826 -0
- package/dist/aiwg-index.d.ts +1 -464
- package/dist/aiwg-index.js +1118 -89
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +213 -300
- package/dist/index.js +2914 -222
- package/dist/index.js.map +1 -1
- package/package.json +15 -3
- package/tools/verify-fortemi-compatibility.mjs +82 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PGlite } from '@electric-sql/pglite';
|
|
2
|
+
import { S as ShardAttachmentProjection, a as ShardCollection, b as ShardEmbeddingConfig, c as ShardEmbedding, d as ShardEmbeddingSet, e as ShardEmbeddingSetMember, f as ShardLink, g as ShardNote, h as ShardNoteSkosTag, i as ShardProvenanceEdge, j as ShardSkosConcept, k as ShardSkosRelation, l as ShardSkosScheme, m as ShardTag, n as ShardTemplate, o as ShardManifest, B as BlobStore, E as ExportOptions, I as ImportOptions, p as ImportResult, q as ShardComponent } from './aiwg-index-C2G7iy-b.js';
|
|
3
|
+
export { A as AIWG_SCAN_REQUIRED_FIELDS, r as AiwgChunkedIndexBuildOptions, s as AiwgChunkedIndexBuildResult, t as AiwgChunkedIndexDetailLoader, u as AiwgChunkedIndexLoadOptions, v as AiwgChunkedIndexLoader, w as AiwgChunkedIndexProgress, x as AiwgChunkedIndexProgressPhase, y as AiwgChunkedIndexQueryOptions, z as AiwgChunkedIndexQueryResult, C as AiwgChunkedIndexValidationResult, D as AiwgFortemiAttachmentReference, F as AiwgFortemiBinarySource, G as AiwgFortemiChunk, H as AiwgFortemiChunkDetailRef, J as AiwgFortemiChunkManifest, K as AiwgFortemiChunkPart, L as AiwgFortemiChunkPartRef, M as AiwgFortemiIndexExport, N as AiwgFortemiIndexExportSchemaVersion, O as AiwgFortemiProjectedRecord, P as AiwgFortemiProvenance, Q as AiwgFortemiProvenanceEvent, R as AiwgFortemiRecord, T as AiwgFortemiRecordEmbedding, U as AiwgFortemiRecordSchemaVersion, V as AiwgFortemiRecordSource, W as AiwgFortemiRecordType, X as AiwgFortemiRelationship, Y as AiwgFortemiRelationshipDirection, Z as AiwgFortemiSearchProjection, _ as AiwgFortemiSkosConcept, $ as AiwgFortemiSkosRelation, a0 as AiwgFortemiSkosRelationType, a1 as AiwgHeadlessEmbeddingBackend, a2 as AiwgIndexController, a3 as AiwgIndexControllerListener, a4 as AiwgIndexControllerSnapshot, a5 as AiwgIndexGraphOptions, a6 as AiwgIndexQueryMatch, a7 as AiwgIndexQueryOptions, a8 as AiwgIndexQueryRankedItem, a9 as AiwgIndexQueryResult, aa as AiwgIndexQueryWeights, ab as AiwgIndexValidationResult, ac as AiwgPrivacyClassification, ad as AiwgPrivacyFilterOptions, ae as AiwgProvenanceConfidence, af as AiwgRelationshipDirection, ag as AiwgRelationshipEdgeSummary, ah as AiwgRelationshipNodeSummary, ai as AiwgRelationshipQueryOptions, aj as AiwgRelationshipSetOperation, ak as AiwgRelationshipSetOptions, al as AiwgRelationshipSetResult, am as AiwgRelationshipTraversalOptions, an as AiwgRelationshipTraversalResult, ao as AiwgReviewAction, ap as AiwgReviewDecision, aq as AiwgReviewDecisionExport, ar as AiwgReviewInput, as as AiwgStaticDuplicatePair, at as AiwgStaticEmbeddingRecord, au as AiwgStaticEmbeddingSet, av as AiwgStaticHybridQueryOptions, aw as AiwgStaticSemanticQueryOptions, ax as AiwgStaticSemanticResult, ay as BuildAiwgStaticEmbeddingSetOptions, az as CURRENT_SHARD_VERSION, aA as ConflictStrategy, aB as ImportCounts, aC as ImportProgress, aD as ImportProgressPhase, aE as MemoryBlobStore, aF as SHARD_FORMAT, aG as ShardClusterRef, aH as ShardLayout, aI as aiwgFortemiIndexToCommunityGraph, aJ as assertAiwgFortemiChunkManifest, aK as assertAiwgFortemiChunkPart, aL as assertAiwgFortemiIndexExport, aM as assertAiwgStaticEmbeddingSet, aN as buildAiwgChunkedIndex, aO as buildAiwgStaticEmbeddingSet, aP as createAiwgFetchChunkLoader, aQ as createAiwgFetchDetailLoader, aR as createAiwgIndexController, aS as createAiwgReviewDecisionExport, aT as createBlobStore, aU as filterAiwgRecordsByPrivacy, aV as findAiwgStaticDuplicatePairs, aW as getAiwgFortemiFacets, aX as queryAiwgFortemiIndex, aY as queryAiwgHybridIndex, aZ as queryAiwgSemanticIndex, a_ as validateAiwgFortemiChunkManifest, a$ as validateAiwgFortemiChunkPart, b0 as validateAiwgFortemiIndexExport, b1 as validateAiwgStaticEmbeddingSet } from './aiwg-index-C2G7iy-b.js';
|
|
2
4
|
import { z, ZodType } from 'zod';
|
|
3
|
-
export { AIWG_SCAN_REQUIRED_FIELDS, AiwgChunkedIndexBuildOptions, AiwgChunkedIndexBuildResult, AiwgChunkedIndexDetailLoader, AiwgChunkedIndexLoadOptions, AiwgChunkedIndexLoader, AiwgChunkedIndexProgress, AiwgChunkedIndexProgressPhase, AiwgChunkedIndexQueryOptions, AiwgChunkedIndexQueryResult, AiwgChunkedIndexValidationResult, AiwgFortemiAttachmentReference, AiwgFortemiBinarySource, AiwgFortemiChunk, AiwgFortemiChunkDetailRef, AiwgFortemiChunkManifest, AiwgFortemiChunkPart, AiwgFortemiChunkPartRef, AiwgFortemiIndexExport, AiwgFortemiIndexExportSchemaVersion, AiwgFortemiKnownRecordType, AiwgFortemiProjectedRecord, AiwgFortemiProvenance, AiwgFortemiProvenanceEvent, AiwgFortemiRecord, AiwgFortemiRecordEmbedding, AiwgFortemiRecordSchemaVersion, AiwgFortemiRecordSource, AiwgFortemiRecordType, AiwgFortemiRelationship, AiwgFortemiRelationshipDirection, AiwgFortemiSearchProjection, AiwgFortemiSkosConcept, AiwgFortemiSkosRelation, AiwgFortemiSkosRelationType, AiwgHeadlessEmbeddingBackend, AiwgIndexController, AiwgIndexControllerListener, AiwgIndexControllerSnapshot, AiwgIndexGraphOptions, AiwgIndexQueryMatch, AiwgIndexQueryOptions, AiwgIndexQueryRankedItem, AiwgIndexQueryResult, AiwgIndexQueryWeights, AiwgIndexValidationResult, AiwgPrivacyClassification, AiwgProvenanceConfidence, AiwgRelationshipDirection, AiwgRelationshipEdgeSummary, AiwgRelationshipNodeSummary, AiwgRelationshipQueryOptions, AiwgRelationshipSetOperation, AiwgRelationshipSetOptions, AiwgRelationshipSetResult, AiwgRelationshipTraversalOptions, AiwgRelationshipTraversalResult, AiwgReviewAction, AiwgReviewDecision, AiwgReviewDecisionExport, AiwgReviewInput, AiwgStaticDuplicatePair, AiwgStaticEmbeddingRecord, AiwgStaticEmbeddingSet, AiwgStaticHybridQueryOptions, AiwgStaticSemanticQueryOptions, AiwgStaticSemanticResult, BuildAiwgStaticEmbeddingSetOptions, aiwgFortemiIndexToCommunityGraph, assertAiwgFortemiChunkManifest, assertAiwgFortemiChunkPart, assertAiwgFortemiIndexExport, assertAiwgStaticEmbeddingSet, buildAiwgChunkedIndex, buildAiwgStaticEmbeddingSet, createAiwgFetchChunkLoader, createAiwgFetchDetailLoader, createAiwgIndexController, createAiwgReviewDecisionExport, findAiwgStaticDuplicatePairs, getAiwgFortemiFacets, queryAiwgFortemiIndex, queryAiwgHybridIndex, queryAiwgSemanticIndex, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport, validateAiwgStaticEmbeddingSet } from './aiwg-index.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Generate a RFC 9562 UUIDv7 identifier.
|
|
@@ -128,6 +129,12 @@ declare class TypedEventBus {
|
|
|
128
129
|
* PGlite database factory.
|
|
129
130
|
* Enforces PGlite 0.4.x conventions (explicit database: 'postgres').
|
|
130
131
|
* Selects persistence adapter based on config.
|
|
132
|
+
*
|
|
133
|
+
* PGlite is loaded LAZILY via dynamic `import()` inside `createPGliteInstance`
|
|
134
|
+
* (issue #261) — the top-level import is type-only so the emitted `dist/index.js`
|
|
135
|
+
* carries no static `import '@electric-sql/pglite'`. Consumers that never boot a
|
|
136
|
+
* PGlite-backed store therefore do not pull the WASM engine into their bundle,
|
|
137
|
+
* and `@electric-sql/pglite` is an OPTIONAL dependency of `@fortemi/core`.
|
|
131
138
|
*/
|
|
132
139
|
|
|
133
140
|
type PersistenceMode = 'opfs' | 'idb' | 'memory';
|
|
@@ -356,6 +363,13 @@ declare class PGliteStorageBackend implements StorageBackend {
|
|
|
356
363
|
declare class PGliteStorageBackendFactory implements StorageBackendFactory {
|
|
357
364
|
open(input: StorageOpenRequest): Promise<StorageBackend>;
|
|
358
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
* Built-in PGlite backend factory — the opt-in default (issue #261). PGlite is
|
|
368
|
+
* loaded lazily by `createPGliteInstance` on first `open()`, so referencing
|
|
369
|
+
* this constant does not force the WASM engine into a consumer's static graph.
|
|
370
|
+
* Hosts wanting a different store pass their own `StorageBackendFactory` to
|
|
371
|
+
* `ArchiveManager` instead.
|
|
372
|
+
*/
|
|
359
373
|
declare const defaultStorageBackendFactory: PGliteStorageBackendFactory;
|
|
360
374
|
declare class PGliteWorkerStorageBackend implements StorageBackend {
|
|
361
375
|
readonly id: string;
|
|
@@ -376,254 +390,6 @@ declare class PGliteWorkerStorageBackendFactory implements StorageBackendFactory
|
|
|
376
390
|
open(input: StorageOpenRequest): Promise<StorageBackend>;
|
|
377
391
|
}
|
|
378
392
|
|
|
379
|
-
/**
|
|
380
|
-
* Shard format types — matches the fortemi server matric-shard specification.
|
|
381
|
-
*
|
|
382
|
-
* A shard is a gzip-compressed tar archive (.shard) containing serialized
|
|
383
|
-
* knowledge data with a manifest for integrity verification.
|
|
384
|
-
*/
|
|
385
|
-
declare const CURRENT_SHARD_VERSION = "1.0.0";
|
|
386
|
-
declare const SHARD_FORMAT = "matric-shard";
|
|
387
|
-
/** Components that can appear in a shard archive. */
|
|
388
|
-
type ShardComponent = 'notes' | 'collections' | 'tags' | 'links' | 'embedding_sets' | 'embedding_set_members' | 'embedding_configs' | 'embeddings' | 'skos_schemes' | 'skos_concepts' | 'skos_relations' | 'note_skos_tags' | 'provenance_edges' | 'community_assignments' | 'communities' | 'graph_edges' | 'graph_sources';
|
|
389
|
-
interface ShardAttachmentReference {
|
|
390
|
-
id: string;
|
|
391
|
-
path: string;
|
|
392
|
-
mime: string | null;
|
|
393
|
-
checksum: string;
|
|
394
|
-
bytes: number;
|
|
395
|
-
}
|
|
396
|
-
interface ShardBinarySource {
|
|
397
|
-
extracted_text: string;
|
|
398
|
-
attachment: ShardAttachmentReference;
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* Reference to one cluster file of a component split across addressable files
|
|
402
|
-
* (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset`/`count` are the record
|
|
403
|
-
* range within the component, so an in-place reader fetches only the clusters a
|
|
404
|
-
* query needs — the shard analog of the AIWG chunk-manifest scan parts.
|
|
405
|
-
*/
|
|
406
|
-
interface ShardClusterRef {
|
|
407
|
-
href: string;
|
|
408
|
-
offset: number;
|
|
409
|
-
count: number;
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
* Optional clustered layout (additive — absent on monolithic shards). When a
|
|
413
|
-
* component is present here, its records live in the listed cluster files instead
|
|
414
|
-
* of (or in addition to) the single `<component>.jsonl`. Both `importShard` and
|
|
415
|
-
* the in-place reader consume it; a monolithic shard omits `layout` entirely.
|
|
416
|
-
*/
|
|
417
|
-
interface ShardLayout {
|
|
418
|
-
clusters?: Partial<Record<ShardComponent, ShardClusterRef[]>>;
|
|
419
|
-
}
|
|
420
|
-
/** Manifest included in every shard as manifest.json. */
|
|
421
|
-
interface ShardManifest {
|
|
422
|
-
version: string;
|
|
423
|
-
matric_version: string;
|
|
424
|
-
format: typeof SHARD_FORMAT;
|
|
425
|
-
created_at: string;
|
|
426
|
-
components: ShardComponent[];
|
|
427
|
-
counts: Partial<Record<ShardComponent | 'community_sets', number>>;
|
|
428
|
-
checksums: Record<string, string>;
|
|
429
|
-
min_reader_version: string;
|
|
430
|
-
/** Clustered component layout for partial fetch (issue #189). Absent → monolithic. */
|
|
431
|
-
layout?: ShardLayout;
|
|
432
|
-
}
|
|
433
|
-
/** Options for shard export. */
|
|
434
|
-
interface ExportOptions {
|
|
435
|
-
includeEmbeddings?: boolean;
|
|
436
|
-
/** Filter to specific collection (export only notes in this collection). */
|
|
437
|
-
collectionId?: string;
|
|
438
|
-
/** Filter to notes with this tag (e.g. 'app:research' for app-scoped export). */
|
|
439
|
-
tag?: string;
|
|
440
|
-
/** Export only these embedding sets and their member/vector rows. */
|
|
441
|
-
embeddingSetIds?: string[];
|
|
442
|
-
/** Preserve virtual selector materialization metadata and virtual member rows. */
|
|
443
|
-
includeMaterializedSelectors?: boolean;
|
|
444
|
-
/**
|
|
445
|
-
* When set to a positive integer, emit notes as clustered files
|
|
446
|
-
* (`notes/000.jsonl`, …) of this many records each, and record the layout in
|
|
447
|
-
* the manifest, so an in-place reader can fetch only the clusters it needs
|
|
448
|
-
* (issue #189). Absent → a single monolithic `notes.jsonl` (unchanged).
|
|
449
|
-
*/
|
|
450
|
-
clusterNotesSize?: number;
|
|
451
|
-
}
|
|
452
|
-
/** Conflict resolution strategy for shard import. */
|
|
453
|
-
type ConflictStrategy = 'skip' | 'replace' | 'error';
|
|
454
|
-
/** Options for shard import. */
|
|
455
|
-
interface ImportOptions {
|
|
456
|
-
conflictStrategy?: ConflictStrategy;
|
|
457
|
-
/** Rows processed between cooperative yields. Defaults to 250. */
|
|
458
|
-
batchSize?: number;
|
|
459
|
-
/** Progress callback for long-running import phases. */
|
|
460
|
-
onProgress?: (progress: ImportProgress) => void;
|
|
461
|
-
}
|
|
462
|
-
type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'links' | 'provenance' | 'embedding_sets' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
|
|
463
|
-
interface ImportProgress {
|
|
464
|
-
phase: ImportProgressPhase;
|
|
465
|
-
done: number;
|
|
466
|
-
total: number;
|
|
467
|
-
}
|
|
468
|
-
/** Per-entity import counts. */
|
|
469
|
-
interface ImportCounts {
|
|
470
|
-
notes: number;
|
|
471
|
-
collections: number;
|
|
472
|
-
tags: number;
|
|
473
|
-
links: number;
|
|
474
|
-
embedding_sets: number;
|
|
475
|
-
embedding_set_members: number;
|
|
476
|
-
embeddings: number;
|
|
477
|
-
skos_schemes: number;
|
|
478
|
-
skos_concepts: number;
|
|
479
|
-
skos_relations: number;
|
|
480
|
-
note_skos_tags: number;
|
|
481
|
-
provenance_edges: number;
|
|
482
|
-
graph_sources: number;
|
|
483
|
-
graph_edges: number;
|
|
484
|
-
community_sets: number;
|
|
485
|
-
communities: number;
|
|
486
|
-
community_assignments: number;
|
|
487
|
-
}
|
|
488
|
-
/** Result of a shard import operation. */
|
|
489
|
-
interface ImportResult {
|
|
490
|
-
success: boolean;
|
|
491
|
-
counts: ImportCounts;
|
|
492
|
-
skipped: Partial<ImportCounts>;
|
|
493
|
-
warnings: string[];
|
|
494
|
-
errors: string[];
|
|
495
|
-
duration_ms: number;
|
|
496
|
-
}
|
|
497
|
-
/** Note as serialized in the shard JSONL. */
|
|
498
|
-
interface ShardNote {
|
|
499
|
-
id: string;
|
|
500
|
-
title: string | null;
|
|
501
|
-
original_content: string;
|
|
502
|
-
revised_content: string | null;
|
|
503
|
-
binary_sources?: ShardBinarySource[];
|
|
504
|
-
format: string;
|
|
505
|
-
source: string;
|
|
506
|
-
starred: boolean;
|
|
507
|
-
archived: boolean;
|
|
508
|
-
tags: string[];
|
|
509
|
-
created_at: string;
|
|
510
|
-
updated_at: string;
|
|
511
|
-
deleted_at: string | null;
|
|
512
|
-
}
|
|
513
|
-
/** Collection as serialized in the shard JSON array. */
|
|
514
|
-
interface ShardCollection {
|
|
515
|
-
id: string;
|
|
516
|
-
name: string;
|
|
517
|
-
description: string | null;
|
|
518
|
-
parent_id: string | null;
|
|
519
|
-
created_at: string;
|
|
520
|
-
note_count?: number;
|
|
521
|
-
}
|
|
522
|
-
/** Tag as serialized in the shard JSON array. */
|
|
523
|
-
interface ShardTag {
|
|
524
|
-
name: string;
|
|
525
|
-
created_at: string;
|
|
526
|
-
}
|
|
527
|
-
/** Link as serialized in the shard JSONL. */
|
|
528
|
-
interface ShardLink {
|
|
529
|
-
id: string;
|
|
530
|
-
from_note_id: string;
|
|
531
|
-
to_note_id: string;
|
|
532
|
-
kind: string;
|
|
533
|
-
score: number | null;
|
|
534
|
-
created_at: string;
|
|
535
|
-
metadata?: Record<string, unknown>;
|
|
536
|
-
}
|
|
537
|
-
/** Embedding set as serialized in the shard JSON array. */
|
|
538
|
-
interface ShardEmbeddingSet {
|
|
539
|
-
id: string;
|
|
540
|
-
name?: string;
|
|
541
|
-
purpose?: string | null;
|
|
542
|
-
model: string;
|
|
543
|
-
dimension: number;
|
|
544
|
-
kind?: 'physical' | 'filter' | 'virtual';
|
|
545
|
-
mode?: 'auto' | 'manual' | 'mixed' | null;
|
|
546
|
-
truncate_dimension?: number | null;
|
|
547
|
-
criteria?: Record<string, unknown> | null;
|
|
548
|
-
source?: Record<string, unknown> | null;
|
|
549
|
-
compatibility?: Record<string, unknown> | null;
|
|
550
|
-
materialization?: Record<string, unknown> | null;
|
|
551
|
-
freshness?: ShardArtifactFreshness | null;
|
|
552
|
-
created_at: string;
|
|
553
|
-
updated_at?: string;
|
|
554
|
-
}
|
|
555
|
-
/** Embedding set member as serialized in the shard JSONL. */
|
|
556
|
-
interface ShardEmbeddingSetMember {
|
|
557
|
-
embedding_set_id: string;
|
|
558
|
-
note_id: string;
|
|
559
|
-
embedding_id: string;
|
|
560
|
-
}
|
|
561
|
-
/** Embedding as serialized in the shard JSONL. */
|
|
562
|
-
interface ShardEmbedding {
|
|
563
|
-
id: string;
|
|
564
|
-
note_id: string;
|
|
565
|
-
embedding_set_id: string;
|
|
566
|
-
vector: number[];
|
|
567
|
-
created_at: string;
|
|
568
|
-
}
|
|
569
|
-
/** SKOS scheme as serialized in the shard JSON array. */
|
|
570
|
-
interface ShardSkosScheme {
|
|
571
|
-
id: string;
|
|
572
|
-
title: string;
|
|
573
|
-
description: string | null;
|
|
574
|
-
created_at: string;
|
|
575
|
-
updated_at: string;
|
|
576
|
-
}
|
|
577
|
-
/** SKOS concept as serialized in the shard JSON array. */
|
|
578
|
-
interface ShardSkosConcept {
|
|
579
|
-
id: string;
|
|
580
|
-
scheme_id: string;
|
|
581
|
-
pref_label: string;
|
|
582
|
-
alt_labels: string[];
|
|
583
|
-
definition: string | null;
|
|
584
|
-
created_at: string;
|
|
585
|
-
updated_at: string;
|
|
586
|
-
}
|
|
587
|
-
/** SKOS concept relation as serialized in the shard JSONL. */
|
|
588
|
-
interface ShardSkosRelation {
|
|
589
|
-
id: string;
|
|
590
|
-
source_concept_id: string;
|
|
591
|
-
target_concept_id: string;
|
|
592
|
-
relation_type: 'broader' | 'narrower' | 'related';
|
|
593
|
-
created_at: string;
|
|
594
|
-
}
|
|
595
|
-
/** Note-to-SKOS-concept assignment as serialized in the shard JSONL. */
|
|
596
|
-
interface ShardNoteSkosTag {
|
|
597
|
-
id: string;
|
|
598
|
-
note_id: string;
|
|
599
|
-
concept_id: string;
|
|
600
|
-
created_at: string;
|
|
601
|
-
}
|
|
602
|
-
/** Provenance edge as serialized in the shard JSONL. */
|
|
603
|
-
interface ShardProvenanceEdge {
|
|
604
|
-
id: string;
|
|
605
|
-
entity_type: string;
|
|
606
|
-
entity_id: string;
|
|
607
|
-
activity: string;
|
|
608
|
-
agent: string;
|
|
609
|
-
started_at: string;
|
|
610
|
-
ended_at: string | null;
|
|
611
|
-
attributes: Record<string, unknown> | null;
|
|
612
|
-
}
|
|
613
|
-
interface ShardArtifactFreshness {
|
|
614
|
-
status: 'fresh' | 'stale' | 'unknown';
|
|
615
|
-
checked_at?: string;
|
|
616
|
-
stale_reason?: string;
|
|
617
|
-
source_hashes?: {
|
|
618
|
-
notes?: string;
|
|
619
|
-
links?: string;
|
|
620
|
-
embeddings?: string;
|
|
621
|
-
embedding_set_members?: string;
|
|
622
|
-
virtual_set_definition?: string;
|
|
623
|
-
parameters?: string;
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
|
|
627
393
|
/**
|
|
628
394
|
* LinksRepository — bidirectional note link management.
|
|
629
395
|
*
|
|
@@ -717,7 +483,8 @@ interface BrowserNoteExport {
|
|
|
717
483
|
deleted_at: Date | string | null;
|
|
718
484
|
original_content: string;
|
|
719
485
|
revised_content: string | null;
|
|
720
|
-
|
|
486
|
+
collection_id?: string | null;
|
|
487
|
+
attachments?: ShardAttachmentProjection[];
|
|
721
488
|
tags: string[];
|
|
722
489
|
}
|
|
723
490
|
/** Convert a browser note to shard format. */
|
|
@@ -726,14 +493,26 @@ declare function noteToShard(note: BrowserNoteExport): ShardNote;
|
|
|
726
493
|
declare function noteFromShard(shard: ShardNote): BrowserNoteExport;
|
|
727
494
|
/** Convert a browser link to shard format. */
|
|
728
495
|
declare function linkToShard(link: LinkRow): ShardLink;
|
|
496
|
+
/** Convert a browser URL-target link row to shard format. */
|
|
497
|
+
declare function urlLinkToShard(link: {
|
|
498
|
+
id: string;
|
|
499
|
+
source_note_id: string;
|
|
500
|
+
to_url: string;
|
|
501
|
+
link_type: string;
|
|
502
|
+
confidence: number | null;
|
|
503
|
+
metadata_json?: Record<string, unknown> | string | null;
|
|
504
|
+
created_at: Date | string;
|
|
505
|
+
}): ShardLink;
|
|
729
506
|
/** Convert a shard link back to browser-insertable format. */
|
|
730
507
|
declare function linkFromShard(shard: ShardLink): {
|
|
731
508
|
id: string;
|
|
732
509
|
source_note_id: string;
|
|
733
|
-
target_note_id: string;
|
|
510
|
+
target_note_id: string | null;
|
|
511
|
+
to_url: string | null;
|
|
734
512
|
link_type: string;
|
|
735
513
|
confidence: number | null;
|
|
736
514
|
created_at: string;
|
|
515
|
+
metadata: Record<string, unknown> | null;
|
|
737
516
|
};
|
|
738
517
|
/** Convert a browser collection to shard format. */
|
|
739
518
|
declare function collectionToShard(collection: CollectionRow, noteCount?: number): ShardCollection;
|
|
@@ -753,16 +532,29 @@ declare function tagsToShard(allTags: Array<{
|
|
|
753
532
|
name: string;
|
|
754
533
|
created_at: Date | string;
|
|
755
534
|
}>): ShardTag[];
|
|
756
|
-
/**
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
535
|
+
/** Convert a browser template row to shard format. */
|
|
536
|
+
declare function templateToShard(template: {
|
|
537
|
+
id: string;
|
|
538
|
+
name: string;
|
|
539
|
+
description: string | null;
|
|
540
|
+
content: string;
|
|
541
|
+
format: string;
|
|
542
|
+
default_tags: string[] | string;
|
|
543
|
+
collection_id: string | null;
|
|
544
|
+
created_at: Date | string;
|
|
545
|
+
updated_at: Date | string;
|
|
546
|
+
}): ShardTemplate;
|
|
761
547
|
/** Convert a browser embedding_set to shard format. */
|
|
762
548
|
declare function embeddingSetToShard(set: {
|
|
763
549
|
id: string;
|
|
764
550
|
name?: string;
|
|
551
|
+
slug?: string | null;
|
|
552
|
+
description?: string | null;
|
|
765
553
|
purpose?: string | null;
|
|
554
|
+
document_count?: number | null;
|
|
555
|
+
embedding_count?: number | null;
|
|
556
|
+
is_system?: boolean | null;
|
|
557
|
+
keywords_json?: unknown | null;
|
|
766
558
|
model_name: string;
|
|
767
559
|
dimensions: number;
|
|
768
560
|
kind?: 'physical' | 'filter' | 'virtual';
|
|
@@ -777,10 +569,16 @@ declare function embeddingSetToShard(set: {
|
|
|
777
569
|
updated_at?: Date | string;
|
|
778
570
|
}): ShardEmbeddingSet;
|
|
779
571
|
/** Convert a shard embedding set back to browser format. */
|
|
780
|
-
declare function embeddingSetFromShard(shard: ShardEmbeddingSet): {
|
|
572
|
+
declare function embeddingSetFromShard(shard: ShardEmbeddingSet, fallbackCreatedAt: string): {
|
|
781
573
|
id: string;
|
|
782
574
|
name: string;
|
|
575
|
+
slug: string | null;
|
|
576
|
+
description: string | null;
|
|
783
577
|
purpose: string | null;
|
|
578
|
+
document_count: number | null;
|
|
579
|
+
embedding_count: number | null;
|
|
580
|
+
is_system: boolean;
|
|
581
|
+
keywords_json: string | null;
|
|
784
582
|
model_name: string;
|
|
785
583
|
dimensions: number;
|
|
786
584
|
kind: 'physical' | 'filter' | 'virtual';
|
|
@@ -798,23 +596,34 @@ declare function embeddingSetFromShard(shard: ShardEmbeddingSet): {
|
|
|
798
596
|
declare function embeddingSetMemberToShard(member: {
|
|
799
597
|
embedding_set_id: string;
|
|
800
598
|
note_id: string;
|
|
801
|
-
|
|
599
|
+
membership_type?: string | null;
|
|
600
|
+
added_at?: Date | string | null;
|
|
601
|
+
added_by?: string | null;
|
|
802
602
|
}): ShardEmbeddingSetMember;
|
|
603
|
+
/** Convert a browser embedding_config row to shard format. */
|
|
604
|
+
declare function embeddingConfigToShard(config: ShardEmbeddingConfig): ShardEmbeddingConfig;
|
|
803
605
|
/** Convert a browser embedding to shard format. */
|
|
804
606
|
declare function embeddingToShard(emb: {
|
|
805
607
|
id: string;
|
|
806
608
|
note_id: string;
|
|
807
609
|
embedding_set_id: string;
|
|
610
|
+
chunk_index?: number | null;
|
|
611
|
+
text?: string | null;
|
|
808
612
|
vector: string | number[];
|
|
613
|
+
model?: string | null;
|
|
614
|
+
model_name?: string | null;
|
|
809
615
|
created_at: Date | string;
|
|
810
616
|
}): ShardEmbedding;
|
|
811
617
|
/** Convert a shard embedding back to browser format. */
|
|
812
618
|
declare function embeddingFromShard(shard: ShardEmbedding): {
|
|
813
619
|
id: string;
|
|
814
620
|
note_id: string;
|
|
815
|
-
embedding_set_id: string;
|
|
621
|
+
embedding_set_id: string | null;
|
|
622
|
+
chunk_index: number;
|
|
623
|
+
text: string;
|
|
816
624
|
vector: string;
|
|
817
|
-
|
|
625
|
+
model: string;
|
|
626
|
+
created_at: string | null;
|
|
818
627
|
};
|
|
819
628
|
declare function skosSchemeToShard(scheme: {
|
|
820
629
|
id: string;
|
|
@@ -938,6 +747,8 @@ interface OpenShardOptions {
|
|
|
938
747
|
semantic?: StaticSemanticProvider;
|
|
939
748
|
/** Bounds the cross-page search match cache (total cached note records). Default 5000. */
|
|
940
749
|
maxCachedMatches?: number;
|
|
750
|
+
/** Maximum bytes fetched for any unpacked component. Default 256 MiB. */
|
|
751
|
+
maxComponentBytes?: number;
|
|
941
752
|
}
|
|
942
753
|
/** Reads shard component/cluster files from a packed map or a static base URL. */
|
|
943
754
|
interface ShardComponentStore {
|
|
@@ -1039,7 +850,8 @@ interface BackendNoteFull extends BackendNote {
|
|
|
1039
850
|
interface BackendLink {
|
|
1040
851
|
id: string;
|
|
1041
852
|
fromNoteId: string;
|
|
1042
|
-
toNoteId: string;
|
|
853
|
+
toNoteId: string | null;
|
|
854
|
+
toUrl?: string | null;
|
|
1043
855
|
kind: string;
|
|
1044
856
|
score: number | null;
|
|
1045
857
|
createdAt: string;
|
|
@@ -1300,6 +1112,20 @@ declare class ArchiveManager {
|
|
|
1300
1112
|
private archives;
|
|
1301
1113
|
private persistence;
|
|
1302
1114
|
private backendFactory;
|
|
1115
|
+
/**
|
|
1116
|
+
* Persistence is a PLUGGABLE, opt-in backend (issue #261). Pass a
|
|
1117
|
+
* `StorageBackendFactory` to run against any `StorageBackend`
|
|
1118
|
+
* implementation; PGlite is merely the built-in default, selected only when
|
|
1119
|
+
* the convenience `PersistenceMode` string form is used. Because
|
|
1120
|
+
* `defaultStorageBackendFactory` reaches PGlite through the lazily-imported
|
|
1121
|
+
* `createPGliteInstance` (see `db.ts`), a consumer that supplies its own
|
|
1122
|
+
* factory — or never opens an archive at all — never pulls the PGlite WASM
|
|
1123
|
+
* engine into its bundle.
|
|
1124
|
+
*
|
|
1125
|
+
* @param persistenceOrFactory `PersistenceMode` string (uses the built-in
|
|
1126
|
+
* PGlite backend) OR a custom `StorageBackendFactory`.
|
|
1127
|
+
* @param persistenceOverride persistence hint passed to a custom factory.
|
|
1128
|
+
*/
|
|
1303
1129
|
constructor(persistenceOrFactory: PersistenceMode | StorageBackendFactory, events?: TypedEventBus | undefined, persistenceOverride?: PersistenceMode);
|
|
1304
1130
|
getCurrentArchiveName(): string;
|
|
1305
1131
|
getDb(): StorageBackend | null;
|
|
@@ -1335,15 +1161,91 @@ interface FortemiCore {
|
|
|
1335
1161
|
declare function createFortemi(config: FortemiConfig): FortemiCore;
|
|
1336
1162
|
|
|
1337
1163
|
/**
|
|
1338
|
-
* Compute a
|
|
1164
|
+
* Compute a browser-local content-identity hash (SHA-256), encoded as
|
|
1165
|
+
* `sha256:<64-char lowercase hex>`.
|
|
1339
1166
|
*
|
|
1340
|
-
*
|
|
1341
|
-
*
|
|
1167
|
+
* This is an internal identity/dedup digest used for note content, embedding
|
|
1168
|
+
* configs, the AIWG index, and graph identity — NOT the server's attachment
|
|
1169
|
+
* content-hash convention. Binary-attachment blobs use {@link computeBlobHash}
|
|
1170
|
+
* (BLAKE3), which is the canonical checksum defined by the binary-attachment
|
|
1171
|
+
* projection contract (`checksum: "blake3:<hex>"`). Keeping these two functions
|
|
1172
|
+
* separate preserves JSON format parity for the identity hashes above while
|
|
1173
|
+
* letting attachments match the server's `compute_content_hash`.
|
|
1342
1174
|
*
|
|
1343
1175
|
* @param data - Raw bytes to hash
|
|
1344
1176
|
* @returns `'sha256:<64-char lowercase hex>'`
|
|
1345
1177
|
*/
|
|
1346
1178
|
declare function computeHash(data: Uint8Array): string;
|
|
1179
|
+
/**
|
|
1180
|
+
* Compute the canonical attachment content hash: **BLAKE3**, encoded as
|
|
1181
|
+
* `blake3:<64-char lowercase hex>`.
|
|
1182
|
+
*
|
|
1183
|
+
* Matches the fortemi server (`crates/matric-db/src/file_storage.rs`
|
|
1184
|
+
* `compute_content_hash`) and the portable Knowledge-Shard byte-sidecar
|
|
1185
|
+
* contract, where the sidecar tar entry name is the bare hex (the `blake3:`
|
|
1186
|
+
* prefix stripped). SubtleCrypto has no BLAKE3, so this uses `@noble/hashes`.
|
|
1187
|
+
*
|
|
1188
|
+
* @param data - Raw attachment bytes to hash
|
|
1189
|
+
* @returns `'blake3:<64-char lowercase hex>'`
|
|
1190
|
+
*/
|
|
1191
|
+
declare function computeBlobHash(data: Uint8Array): string;
|
|
1192
|
+
|
|
1193
|
+
declare const FORTEMI_COMPATIBILITY_PATH = "/api/v1/system/compatibility";
|
|
1194
|
+
declare const FORTEMI_COMPATIBILITY_STATES: readonly ["available", "degraded", "preview", "unavailable", "unknown"];
|
|
1195
|
+
type FortemiCompatibilityState = (typeof FORTEMI_COMPATIBILITY_STATES)[number];
|
|
1196
|
+
declare const FORTEMI_REQUIRED_COMPATIBILITY_CAPABILITIES: readonly ["core_notes", "search", "jobs", "realtime_activity", "hosted_auth", "premium_components", "backoffice_api", "audit_posture", "quota_status", "kms_status", "mcp_scope_gate"];
|
|
1197
|
+
type FortemiRequiredCompatibilityCapability = (typeof FORTEMI_REQUIRED_COMPATIBILITY_CAPABILITIES)[number];
|
|
1198
|
+
interface FortemiCompatibilityCapability {
|
|
1199
|
+
state: FortemiCompatibilityState;
|
|
1200
|
+
reason_code?: string;
|
|
1201
|
+
}
|
|
1202
|
+
interface FortemiCompatibilityResponse {
|
|
1203
|
+
schema_version: number;
|
|
1204
|
+
contract_revision: string;
|
|
1205
|
+
api: {
|
|
1206
|
+
name: string;
|
|
1207
|
+
version: string;
|
|
1208
|
+
minimum_hotm_enterprise_client: string;
|
|
1209
|
+
git_sha_present: boolean;
|
|
1210
|
+
build_date_present: boolean;
|
|
1211
|
+
};
|
|
1212
|
+
deployment: {
|
|
1213
|
+
mode: string;
|
|
1214
|
+
edition: string;
|
|
1215
|
+
hosted_multi_tenant_ready: boolean;
|
|
1216
|
+
};
|
|
1217
|
+
auth: {
|
|
1218
|
+
required: boolean;
|
|
1219
|
+
mode: string;
|
|
1220
|
+
oauth_issuer_configured: boolean;
|
|
1221
|
+
tenant_context_available: boolean;
|
|
1222
|
+
};
|
|
1223
|
+
capabilities: Record<string, FortemiCompatibilityCapability>;
|
|
1224
|
+
links: {
|
|
1225
|
+
openapi: string;
|
|
1226
|
+
asyncapi: string;
|
|
1227
|
+
health: string;
|
|
1228
|
+
streaming_health: string;
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
interface FortemiCompatibilityValidationResult {
|
|
1232
|
+
ok: boolean;
|
|
1233
|
+
errors: string[];
|
|
1234
|
+
warnings: string[];
|
|
1235
|
+
response?: FortemiCompatibilityResponse;
|
|
1236
|
+
}
|
|
1237
|
+
interface FetchFortemiCompatibilityOptions {
|
|
1238
|
+
baseUrl?: string;
|
|
1239
|
+
fetchImpl?: typeof fetch;
|
|
1240
|
+
timeoutMs?: number;
|
|
1241
|
+
}
|
|
1242
|
+
declare function fortemiCompatibilityUrl(baseUrl?: string): string;
|
|
1243
|
+
declare function validateFortemiCompatibilityResponse(raw: unknown): FortemiCompatibilityValidationResult;
|
|
1244
|
+
declare function formatFortemiCompatibilitySummary(response: FortemiCompatibilityResponse): string;
|
|
1245
|
+
declare function fetchAndValidateFortemiCompatibility(options?: FetchFortemiCompatibilityOptions): Promise<FortemiCompatibilityValidationResult & {
|
|
1246
|
+
url: string;
|
|
1247
|
+
status?: number;
|
|
1248
|
+
}>;
|
|
1347
1249
|
|
|
1348
1250
|
interface SWRegistrationResult {
|
|
1349
1251
|
registered: boolean;
|
|
@@ -1377,36 +1279,6 @@ declare function createRoutes(): RouteHandler[];
|
|
|
1377
1279
|
*/
|
|
1378
1280
|
declare function matchRoute(routes: RouteHandler[], request: Request, url: URL): RouteHandler | null;
|
|
1379
1281
|
|
|
1380
|
-
/**
|
|
1381
|
-
* Content-addressable blob storage.
|
|
1382
|
-
*
|
|
1383
|
-
* Path format: blobs/{dir1}/{dir2}/{hash}
|
|
1384
|
-
* dir1 = first 2 hex chars of hash
|
|
1385
|
-
* dir2 = next 2 hex chars of hash
|
|
1386
|
-
* filename = full hash
|
|
1387
|
-
*
|
|
1388
|
-
* Two implementations are provided:
|
|
1389
|
-
* - OpfsBlobStore — Origin Private File System (Chrome/Edge 86+)
|
|
1390
|
-
* - IdbBlobStore — IndexedDB fallback (Firefox, Safari)
|
|
1391
|
-
*
|
|
1392
|
-
* Use createBlobStore() to get the best available implementation.
|
|
1393
|
-
* Export MemoryBlobStore for use in tests.
|
|
1394
|
-
*/
|
|
1395
|
-
interface BlobStore {
|
|
1396
|
-
write(hash: string, data: Uint8Array): Promise<void>;
|
|
1397
|
-
read(hash: string): Promise<Uint8Array | null>;
|
|
1398
|
-
remove(hash: string): Promise<void>;
|
|
1399
|
-
exists(hash: string): Promise<boolean>;
|
|
1400
|
-
}
|
|
1401
|
-
declare class MemoryBlobStore implements BlobStore {
|
|
1402
|
-
private store;
|
|
1403
|
-
write(hash: string, data: Uint8Array): Promise<void>;
|
|
1404
|
-
read(hash: string): Promise<Uint8Array | null>;
|
|
1405
|
-
remove(hash: string): Promise<void>;
|
|
1406
|
-
exists(hash: string): Promise<boolean>;
|
|
1407
|
-
}
|
|
1408
|
-
declare function createBlobStore(archiveName: string): BlobStore;
|
|
1409
|
-
|
|
1410
1282
|
/**
|
|
1411
1283
|
* Shared postMessage protocol types for the PGlite worker.
|
|
1412
1284
|
*
|
|
@@ -2776,9 +2648,11 @@ declare class AttachmentsRepository {
|
|
|
2776
2648
|
/**
|
|
2777
2649
|
* Attach a binary file to a note.
|
|
2778
2650
|
*
|
|
2779
|
-
* If a blob with the same
|
|
2651
|
+
* If a blob with the same BLAKE3 content hash already exists, the existing
|
|
2780
2652
|
* blob row is reused (deduplication). Otherwise a new blob row is inserted
|
|
2781
|
-
* and the raw bytes are written to the BlobStore.
|
|
2653
|
+
* and the raw bytes are written to the BlobStore. The BLAKE3 `content_hash`
|
|
2654
|
+
* (`blake3:<hex>`) matches the server convention and is the key used by the
|
|
2655
|
+
* portable Knowledge-Shard byte sidecar.
|
|
2782
2656
|
*
|
|
2783
2657
|
* Returns the newly created AttachmentRow.
|
|
2784
2658
|
*/
|
|
@@ -3574,14 +3448,25 @@ declare function createCspReportHandler(onReport: (report: CspViolationReport) =
|
|
|
3574
3448
|
* @param files Map of filename → file contents
|
|
3575
3449
|
* @returns Compressed archive bytes (suitable for .shard file)
|
|
3576
3450
|
*/
|
|
3577
|
-
declare function packTarGz(files: Map<string, Uint8Array
|
|
3451
|
+
declare function packTarGz(files: Map<string, Uint8Array>, opts?: {
|
|
3452
|
+
maxDecompressedBytes?: number;
|
|
3453
|
+
}): Uint8Array;
|
|
3578
3454
|
/**
|
|
3579
3455
|
* Unpack a gzip-compressed tar archive.
|
|
3580
3456
|
*
|
|
3457
|
+
* Before decompressing, the gzip ISIZE footer (declared uncompressed size) is
|
|
3458
|
+
* checked against `maxDecompressedBytes` and rejected if it exceeds the cap.
|
|
3459
|
+
* fflate independently verifies the actual output length against ISIZE, so a
|
|
3460
|
+
* lying footer fails during decompression — together this bounds the memory a
|
|
3461
|
+
* malicious archive can force us to allocate.
|
|
3462
|
+
*
|
|
3581
3463
|
* @param data Compressed archive bytes
|
|
3464
|
+
* @param opts.maxDecompressedBytes Cap on decompressed size (default 256 MiB)
|
|
3582
3465
|
* @returns Map of filename → file contents
|
|
3583
3466
|
*/
|
|
3584
|
-
declare function unpackTarGz(data: Uint8Array
|
|
3467
|
+
declare function unpackTarGz(data: Uint8Array, opts?: {
|
|
3468
|
+
maxDecompressedBytes?: number;
|
|
3469
|
+
}): Map<string, Uint8Array>;
|
|
3585
3470
|
|
|
3586
3471
|
/**
|
|
3587
3472
|
* SHA-256 checksum utilities for shard integrity verification.
|
|
@@ -3595,6 +3480,15 @@ declare function sha256Hex(data: Uint8Array): Promise<string>;
|
|
|
3595
3480
|
/**
|
|
3596
3481
|
* Validate checksums listed in a shard manifest against actual file contents.
|
|
3597
3482
|
*
|
|
3483
|
+
* SECURITY (SEC7 — trust model): these checksums live *inside* the same archive
|
|
3484
|
+
* as the files they hash, so they detect **transport corruption**, not
|
|
3485
|
+
* **tampering**. An attacker who controls the archive controls both the file
|
|
3486
|
+
* bytes and the manifest hashes, so a passing result proves the archive is
|
|
3487
|
+
* internally consistent — nothing more. For provenance-sensitive imports, verify
|
|
3488
|
+
* integrity out-of-band: a signed manifest, or a caller-supplied expected digest
|
|
3489
|
+
* checked against the whole archive (see `prefetchShard`'s `expectedSha256`,
|
|
3490
|
+
* which is real integrity because the hash arrives on a separate channel).
|
|
3491
|
+
*
|
|
3598
3492
|
* @returns Object with `valid` flag and list of failed filenames.
|
|
3599
3493
|
*/
|
|
3600
3494
|
declare function validateChecksums(checksums: Record<string, string>, files: Map<string, Uint8Array>): Promise<{
|
|
@@ -3637,6 +3531,17 @@ declare function exportShard(db: DatabaseClient, options?: ExportOptions): Promi
|
|
|
3637
3531
|
*/
|
|
3638
3532
|
declare function importShard(db: DatabaseClient, data: Uint8Array | ArrayBuffer, options?: ImportOptions): Promise<ImportResult>;
|
|
3639
3533
|
|
|
3534
|
+
interface ShardSchemaValidationResult {
|
|
3535
|
+
valid: boolean;
|
|
3536
|
+
errors: string[];
|
|
3537
|
+
}
|
|
3538
|
+
type ShardFiles = Map<string, Uint8Array>;
|
|
3539
|
+
declare function getKnowledgeShardSchema(): unknown;
|
|
3540
|
+
declare function validateShardManifest(value: unknown): ShardSchemaValidationResult;
|
|
3541
|
+
declare function validateShardArchive(input: Uint8Array | ArrayBuffer | ShardFiles): ShardSchemaValidationResult;
|
|
3542
|
+
declare function validateShardComponentRecord(component: ShardComponent | 'templates', value: unknown): ShardSchemaValidationResult;
|
|
3543
|
+
declare function assertShardComponentRecord(component: ShardComponent | 'templates', value: unknown): void;
|
|
3544
|
+
|
|
3640
3545
|
/**
|
|
3641
3546
|
* Pluggable semantic providers for the in-place shard reader (issue #189).
|
|
3642
3547
|
*
|
|
@@ -3803,6 +3708,14 @@ declare function getPrefetchedSha256(url: string): string | undefined;
|
|
|
3803
3708
|
*/
|
|
3804
3709
|
declare function clearPrefetchedShard(url?: string): void;
|
|
3805
3710
|
|
|
3806
|
-
|
|
3711
|
+
interface AiwgIndexSchemaValidationResult {
|
|
3712
|
+
valid: boolean;
|
|
3713
|
+
errors: string[];
|
|
3714
|
+
}
|
|
3715
|
+
declare function getAiwgFortemiIndexExportSchema(): unknown;
|
|
3716
|
+
declare function validateAiwgFortemiIndexExportSchema(value: unknown): AiwgIndexSchemaValidationResult;
|
|
3717
|
+
declare function validateAiwgFortemiProjectedRecordSchema(value: unknown): AiwgIndexSchemaValidationResult;
|
|
3718
|
+
|
|
3719
|
+
declare const VERSION = "2026.7.4";
|
|
3807
3720
|
|
|
3808
|
-
export { type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BackendCandidate, type BackendCapabilities, type BackendConcept, type BackendLink, type BackendListOptions, type BackendNote, type BackendNoteFull, type BackendProvenanceEdge, type BackendRequest, type BackendSearchHit, type BackendSearchQueryOptions, type BackendSearchResult, type BackendSelection, type BackendSemanticTier, type BackendStartupCost,
|
|
3721
|
+
export { type AiwgIndexSchemaValidationResult, type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BackendCandidate, type BackendCapabilities, type BackendConcept, type BackendLink, type BackendListOptions, type BackendNote, type BackendNoteFull, type BackendProvenanceEdge, type BackendRequest, type BackendSearchHit, type BackendSearchQueryOptions, type BackendSearchResult, type BackendSelection, type BackendSemanticTier, type BackendStartupCost, BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, CURRENT_MIGRATION_HEAD, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type CooldownConfig, type CooldownEvent, type CosineSemanticProviderOptions, type CreatePGliteOptions, type CspDirectiveName, type CspDirectives, type CspViolationReport, DB_SNAPSHOT_SCHEMA_VERSION, type DataBackend, type DatabaseClient, type DbSnapshot, type DbSnapshotCompat, type DbSnapshotCompression, type DbSnapshotExpectations, type DbSnapshotMeta, type DbSnapshotSource, DbSnapshotVersionError, type DiscoveredProvider, type DiscoveryOptions, type DumpDbSnapshotOptions, type DumpableDb, EMBED_REQUEST_KIND, EMBED_RESPONSE_KIND, type EmbedFunction, type EmbedRequest, type EmbedRequestMessage, type EmbedResponse, type EmbedResponseMessage, type EmbedTransportPort, type EmbedWorkerOptions, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, ExportOptions, FORTEMI_COMPATIBILITY_PATH, FORTEMI_COMPATIBILITY_STATES, FORTEMI_REQUIRED_COMPATIBILITY_CAPABILITIES, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FetchFortemiCompatibilityOptions, type FortemiBridge, type FortemiBridgeCapabilities, type FortemiBridgeHost, type FortemiCompatibilityCapability, type FortemiCompatibilityResponse, type FortemiCompatibilityState, type FortemiCompatibilityValidationResult, type FortemiConfig, type FortemiCore, type FortemiInferenceRouter, type FortemiRequiredCompatibilityCapability, type FortemiSecretStore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, ImportOptions, ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type NoteSkosTag, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, type OpenShardOptions, type PGliteBackendOptions, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, type PGliteWorkerStorageBackendFactoryOptions, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type PrefetchOptions, type PrefetchResult, type ProbeResult, type ProbeStatus, type ProvenanceEdge, ProvenanceRepository, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type RecordProvenanceInput, type RemoteBackendConfig, type RemoteBackendPaths, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RestoreDbSnapshotOptions, type RouteHandler, SUPPORTED_PGLITE_VERSION, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardBackendOptions, ShardCollection, ShardComponent, type ShardComponentStore, ShardEmbedding, ShardEmbeddingConfig, ShardEmbeddingSet, ShardEmbeddingSetMember, ShardLink, type ShardListOptions, ShardManifest, ShardNote, type ShardNoteFull, ShardNoteSkosTag, ShardProvenanceEdge, type ShardReader, type ShardReaderNote, type ShardReaderSource, type ShardSchemaValidationResult, type ShardSearchOptions, type ShardSearchRankedNote, type ShardSearchResult, type ShardSearchWeights, ShardSkosConcept, ShardSkosRelation, ShardSkosScheme, ShardTag, ShardTemplate, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StaticSemanticProvider, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VectorEntry, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, allMigrations, appendPluginScript, assertShardComponentRecord, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeBlobHash, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRemoteBackend, createRoutes, createShardBackend, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dumpDbSnapshot, embeddingConfigToShard, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchAndValidateFortemiCompatibility, fetchPluginScript, formatFortemiCompatibilitySummary, fortemiCompatibilityUrl, fortemiManifest, fromPrefetched, generateId, getAiwgFortemiIndexExportSchema, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getKnowledgeShardSchema, getLlmFunction, getNote, getPrefetchedSha256, handleEmbedRequests, hasFortemiSecureSecrets, importShard, isPluginScriptAllowed, isShardPrefetched, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, openShard, packTarGz, parseCspReport, prefetchShard, provenanceEdgeToShard, registerLlmCapability, registerSemanticCapability, registerSemanticCapabilityWorker, registerServiceWorker, restoreDbSnapshot, searchTool, selectBackend, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsToShard, templateToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, urlLinkToShard, validateAiwgFortemiIndexExportSchema, validateAiwgFortemiProjectedRecordSchema, validateChecksums, validateFortemiCompatibilityResponse, validateShardArchive, validateShardComponentRecord, validateShardManifest, verifyDbSnapshotMeta, verifySri };
|