@fortemi/core 2026.7.4 → 2026.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aiwg-index-schema.d.ts +9 -0
- package/dist/aiwg-index-schema.js +724 -0
- package/dist/aiwg-index-schema.js.map +1 -0
- package/dist/aiwg-index.d.ts +493 -1
- package/dist/aiwg-index.js +15 -2375
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +820 -8
- package/dist/index.js +1229 -1061
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
- package/dist/aiwg-index-C2G7iy-b.d.ts +0 -826
|
@@ -1,826 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content-addressable blob storage.
|
|
3
|
-
*
|
|
4
|
-
* Path format: blobs/{dir1}/{dir2}/{hash}
|
|
5
|
-
* dir1 = first 2 hex chars of hash
|
|
6
|
-
* dir2 = next 2 hex chars of hash
|
|
7
|
-
* filename = full hash
|
|
8
|
-
*
|
|
9
|
-
* Two implementations are provided:
|
|
10
|
-
* - OpfsBlobStore — Origin Private File System (Chrome/Edge 86+)
|
|
11
|
-
* - IdbBlobStore — IndexedDB fallback (Firefox, Safari)
|
|
12
|
-
*
|
|
13
|
-
* Use createBlobStore() to get the best available implementation.
|
|
14
|
-
* Export MemoryBlobStore for use in tests.
|
|
15
|
-
*/
|
|
16
|
-
interface BlobStore {
|
|
17
|
-
write(hash: string, data: Uint8Array): Promise<void>;
|
|
18
|
-
read(hash: string): Promise<Uint8Array | null>;
|
|
19
|
-
remove(hash: string): Promise<void>;
|
|
20
|
-
exists(hash: string): Promise<boolean>;
|
|
21
|
-
}
|
|
22
|
-
declare class MemoryBlobStore implements BlobStore {
|
|
23
|
-
private store;
|
|
24
|
-
write(hash: string, data: Uint8Array): Promise<void>;
|
|
25
|
-
read(hash: string): Promise<Uint8Array | null>;
|
|
26
|
-
remove(hash: string): Promise<void>;
|
|
27
|
-
exists(hash: string): Promise<boolean>;
|
|
28
|
-
}
|
|
29
|
-
declare function createBlobStore(archiveName: string): BlobStore;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Shard format types — matches the fortemi server matric-shard specification.
|
|
33
|
-
*
|
|
34
|
-
* A shard is a gzip-compressed tar archive (.shard) containing serialized
|
|
35
|
-
* knowledge data with a manifest for integrity verification.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
declare const CURRENT_SHARD_VERSION = "1.0.0";
|
|
39
|
-
declare const SHARD_FORMAT = "matric-shard";
|
|
40
|
-
/** Components that can appear in a shard archive. */
|
|
41
|
-
type ShardComponent = 'notes' | 'collections' | 'tags' | 'templates' | 'links' | 'embedding_sets' | 'embedding_configs' | 'embedding_set_members' | 'embeddings' | 'skos_schemes' | 'skos_concepts' | 'skos_relations' | 'note_skos_tags' | 'provenance_edges' | 'community_assignments' | 'communities' | 'graph_edges' | 'graph_sources';
|
|
42
|
-
interface ShardAttachmentReference {
|
|
43
|
-
id: string;
|
|
44
|
-
path: string;
|
|
45
|
-
mime: string | null;
|
|
46
|
-
checksum: string;
|
|
47
|
-
bytes: number;
|
|
48
|
-
}
|
|
49
|
-
interface ShardAttachmentProjection {
|
|
50
|
-
extracted_text: string | null;
|
|
51
|
-
attachment: ShardAttachmentReference;
|
|
52
|
-
}
|
|
53
|
-
/** @deprecated Legacy React shard field name. Server shards use `attachments`. */
|
|
54
|
-
type ShardBinarySource = ShardAttachmentProjection;
|
|
55
|
-
/**
|
|
56
|
-
* Reference to one cluster file of a component split across addressable files
|
|
57
|
-
* (`notes/000.jsonl`, `notes/001.jsonl`, …). `offset` preserves deterministic
|
|
58
|
-
* component order; readers discover each cluster's size from its contents.
|
|
59
|
-
*/
|
|
60
|
-
interface ShardClusterRef {
|
|
61
|
-
href: string;
|
|
62
|
-
offset: number;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Optional clustered layout (additive — absent on monolithic shards). When a
|
|
66
|
-
* component is present here, its records live in the listed cluster files instead
|
|
67
|
-
* of (or in addition to) the single `<component>.jsonl`. Both `importShard` and
|
|
68
|
-
* the in-place reader consume it; a monolithic shard omits `layout` entirely.
|
|
69
|
-
*/
|
|
70
|
-
interface ShardLayout {
|
|
71
|
-
clusters?: Partial<Record<ShardComponent, ShardClusterRef[]>>;
|
|
72
|
-
}
|
|
73
|
-
interface ShardMigrationHistoryEntry {
|
|
74
|
-
from_version: string;
|
|
75
|
-
to_version: string;
|
|
76
|
-
migrated_at: string;
|
|
77
|
-
migrated_by: string;
|
|
78
|
-
changes: string[];
|
|
79
|
-
}
|
|
80
|
-
/** Manifest included in every shard as manifest.json. */
|
|
81
|
-
interface ShardManifest {
|
|
82
|
-
version: string;
|
|
83
|
-
matric_version: string;
|
|
84
|
-
format: typeof SHARD_FORMAT;
|
|
85
|
-
created_at: string;
|
|
86
|
-
components: ShardComponent[];
|
|
87
|
-
counts: Partial<Record<ShardComponent | 'community_sets', number>>;
|
|
88
|
-
checksums: Record<string, string>;
|
|
89
|
-
min_reader_version: string;
|
|
90
|
-
migrated_from?: string | null;
|
|
91
|
-
migration_history?: ShardMigrationHistoryEntry[];
|
|
92
|
-
/** Clustered component layout for partial fetch (issue #189). Absent → monolithic. */
|
|
93
|
-
layout?: ShardLayout;
|
|
94
|
-
}
|
|
95
|
-
/** Options for shard export. */
|
|
96
|
-
interface ExportOptions {
|
|
97
|
-
includeEmbeddings?: boolean;
|
|
98
|
-
/** Filter to specific collection (export only notes in this collection). */
|
|
99
|
-
collectionId?: string;
|
|
100
|
-
/** Filter to notes with this tag (e.g. 'app:research' for app-scoped export). */
|
|
101
|
-
tag?: string;
|
|
102
|
-
/** Export only these embedding sets and their member/vector rows. */
|
|
103
|
-
embeddingSetIds?: string[];
|
|
104
|
-
/** Preserve virtual selector materialization metadata and virtual member rows. */
|
|
105
|
-
includeMaterializedSelectors?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* When set to a positive integer, emit notes as clustered files
|
|
108
|
-
* (`notes/000.jsonl`, …) of this many records each, and record the layout in
|
|
109
|
-
* the manifest, so an in-place reader can fetch only the clusters it needs
|
|
110
|
-
* (issue #189). Absent → a single monolithic `notes.jsonl` (unchanged).
|
|
111
|
-
*/
|
|
112
|
-
clusterNotesSize?: number;
|
|
113
|
-
/**
|
|
114
|
-
* Pack attachment bytes into a portable content-addressed `blobs/<hex>`
|
|
115
|
-
* sidecar (Fortemi/fortemi#1046), producing a self-contained shard whose
|
|
116
|
-
* attachments survive a round-trip (`getBlob()` returns real bytes on the
|
|
117
|
-
* importing host). Requires {@link blobStore}. Absent/false → reference-only
|
|
118
|
-
* (server default), which remains a valid shard.
|
|
119
|
-
*/
|
|
120
|
-
includeBlobs?: boolean;
|
|
121
|
-
/**
|
|
122
|
-
* Byte source for the sidecar. Required when `includeBlobs` is set; attachment
|
|
123
|
-
* bytes are read by their `content_hash`. A blob the store cannot return is
|
|
124
|
-
* skipped (its attachment stays reference-only) rather than failing export.
|
|
125
|
-
*/
|
|
126
|
-
blobStore?: BlobStore;
|
|
127
|
-
}
|
|
128
|
-
/** Conflict resolution strategy for shard import. */
|
|
129
|
-
type ConflictStrategy = 'skip' | 'replace' | 'error';
|
|
130
|
-
/** Options for shard import. */
|
|
131
|
-
interface ImportOptions {
|
|
132
|
-
conflictStrategy?: ConflictStrategy;
|
|
133
|
-
/** Rows processed between cooperative yields. Defaults to 250. */
|
|
134
|
-
batchSize?: number;
|
|
135
|
-
/** Progress callback for long-running import phases. */
|
|
136
|
-
onProgress?: (progress: ImportProgress) => void;
|
|
137
|
-
/**
|
|
138
|
-
* Destination for hydrating attachment bytes from a portable `blobs/<hex>`
|
|
139
|
-
* sidecar (Fortemi/fortemi#1046). When provided, sidecar entries whose bare
|
|
140
|
-
* hex matches an imported attachment's `content_hash` are written to this
|
|
141
|
-
* store after the import transaction commits, so `getBlob()` returns real
|
|
142
|
-
* bytes. Absent → attachments import as reference-only metadata (unchanged).
|
|
143
|
-
*/
|
|
144
|
-
blobStore?: BlobStore;
|
|
145
|
-
}
|
|
146
|
-
type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'templates' | 'links' | 'provenance' | 'embedding_sets' | 'embedding_configs' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
|
|
147
|
-
interface ImportProgress {
|
|
148
|
-
phase: ImportProgressPhase;
|
|
149
|
-
done: number;
|
|
150
|
-
total: number;
|
|
151
|
-
}
|
|
152
|
-
/** Per-entity import counts. */
|
|
153
|
-
interface ImportCounts {
|
|
154
|
-
notes: number;
|
|
155
|
-
collections: number;
|
|
156
|
-
templates: number;
|
|
157
|
-
tags: number;
|
|
158
|
-
links: number;
|
|
159
|
-
embedding_sets: number;
|
|
160
|
-
embedding_configs: number;
|
|
161
|
-
embedding_set_members: number;
|
|
162
|
-
embeddings: number;
|
|
163
|
-
skos_schemes: number;
|
|
164
|
-
skos_concepts: number;
|
|
165
|
-
skos_relations: number;
|
|
166
|
-
note_skos_tags: number;
|
|
167
|
-
provenance_edges: number;
|
|
168
|
-
graph_sources: number;
|
|
169
|
-
graph_edges: number;
|
|
170
|
-
community_sets: number;
|
|
171
|
-
communities: number;
|
|
172
|
-
community_assignments: number;
|
|
173
|
-
}
|
|
174
|
-
/** Result of a shard import operation. */
|
|
175
|
-
interface ImportResult {
|
|
176
|
-
success: boolean;
|
|
177
|
-
counts: ImportCounts;
|
|
178
|
-
skipped: Partial<ImportCounts>;
|
|
179
|
-
warnings: string[];
|
|
180
|
-
errors: string[];
|
|
181
|
-
duration_ms: number;
|
|
182
|
-
}
|
|
183
|
-
/** Note as serialized in the shard JSONL. */
|
|
184
|
-
interface ShardNote {
|
|
185
|
-
id: string;
|
|
186
|
-
title: string | null;
|
|
187
|
-
original_content: string;
|
|
188
|
-
revised_content: string | null;
|
|
189
|
-
collection_id?: string | null;
|
|
190
|
-
attachments?: ShardAttachmentProjection[];
|
|
191
|
-
/** @deprecated Legacy React shard field name. Use `attachments`. */
|
|
192
|
-
binary_sources?: ShardBinarySource[];
|
|
193
|
-
format: string;
|
|
194
|
-
source: string;
|
|
195
|
-
starred: boolean;
|
|
196
|
-
archived: boolean;
|
|
197
|
-
tags: string[];
|
|
198
|
-
created_at: string;
|
|
199
|
-
updated_at: string;
|
|
200
|
-
deleted_at: string | null;
|
|
201
|
-
}
|
|
202
|
-
/** Collection as serialized in the shard JSON array. */
|
|
203
|
-
interface ShardCollection {
|
|
204
|
-
id: string;
|
|
205
|
-
name: string;
|
|
206
|
-
description: string | null;
|
|
207
|
-
parent_id: string | null;
|
|
208
|
-
created_at: string;
|
|
209
|
-
note_count?: number;
|
|
210
|
-
}
|
|
211
|
-
/** Tag as serialized in the shard JSON array. */
|
|
212
|
-
interface ShardTag {
|
|
213
|
-
name: string;
|
|
214
|
-
created_at: string;
|
|
215
|
-
}
|
|
216
|
-
/** Template as serialized in the shard JSON array. */
|
|
217
|
-
interface ShardTemplate {
|
|
218
|
-
id: string;
|
|
219
|
-
name: string;
|
|
220
|
-
description: string | null;
|
|
221
|
-
content: string;
|
|
222
|
-
format: string;
|
|
223
|
-
default_tags: string[];
|
|
224
|
-
collection_id: string | null;
|
|
225
|
-
created_at: string;
|
|
226
|
-
updated_at: string;
|
|
227
|
-
}
|
|
228
|
-
/** Link as serialized in the shard JSONL. */
|
|
229
|
-
interface ShardLink {
|
|
230
|
-
id: string;
|
|
231
|
-
from_note_id: string;
|
|
232
|
-
to_note_id: string | null;
|
|
233
|
-
to_url: string | null;
|
|
234
|
-
kind: string;
|
|
235
|
-
score: number | null;
|
|
236
|
-
created_at: string;
|
|
237
|
-
metadata: Record<string, unknown> | null;
|
|
238
|
-
}
|
|
239
|
-
/** Embedding set as serialized in the shard JSON array. */
|
|
240
|
-
interface ShardEmbeddingSet {
|
|
241
|
-
id: string;
|
|
242
|
-
name: string;
|
|
243
|
-
slug: string | null;
|
|
244
|
-
description: string | null;
|
|
245
|
-
purpose: string | null;
|
|
246
|
-
document_count: number;
|
|
247
|
-
embedding_count: number;
|
|
248
|
-
is_system: boolean;
|
|
249
|
-
keywords: string[];
|
|
250
|
-
model: string;
|
|
251
|
-
dimension: number;
|
|
252
|
-
kind?: 'physical' | 'filter' | 'virtual';
|
|
253
|
-
mode?: 'auto' | 'manual' | 'mixed' | null;
|
|
254
|
-
truncate_dimension?: number | null;
|
|
255
|
-
criteria?: Record<string, unknown> | null;
|
|
256
|
-
source?: Record<string, unknown> | null;
|
|
257
|
-
compatibility?: Record<string, unknown> | null;
|
|
258
|
-
materialization?: Record<string, unknown> | null;
|
|
259
|
-
freshness?: ShardArtifactFreshness | null;
|
|
260
|
-
created_at?: string;
|
|
261
|
-
updated_at?: string;
|
|
262
|
-
}
|
|
263
|
-
/** Embedding set member as serialized in the shard JSONL. */
|
|
264
|
-
interface ShardEmbeddingSetMember {
|
|
265
|
-
embedding_set_id: string;
|
|
266
|
-
note_id: string;
|
|
267
|
-
/** Legacy React shard field; new exports use server membership metadata instead. */
|
|
268
|
-
embedding_id?: string;
|
|
269
|
-
membership_type: string;
|
|
270
|
-
added_at: string;
|
|
271
|
-
added_by: string | null;
|
|
272
|
-
}
|
|
273
|
-
/** Embedding config as serialized in the shard JSON array. */
|
|
274
|
-
interface ShardEmbeddingConfig {
|
|
275
|
-
id: string;
|
|
276
|
-
name: string;
|
|
277
|
-
description: string | null;
|
|
278
|
-
model: string;
|
|
279
|
-
dimension: number;
|
|
280
|
-
chunk_size: number;
|
|
281
|
-
chunk_overlap: number;
|
|
282
|
-
is_default: boolean;
|
|
283
|
-
}
|
|
284
|
-
/** Embedding as serialized in the shard JSONL. */
|
|
285
|
-
interface ShardEmbedding {
|
|
286
|
-
id: string;
|
|
287
|
-
note_id: string;
|
|
288
|
-
chunk_index: number;
|
|
289
|
-
text: string;
|
|
290
|
-
vector: number[];
|
|
291
|
-
model: string;
|
|
292
|
-
/** React shard extension used to preserve local embedding-set scoping. */
|
|
293
|
-
embedding_set_id?: string;
|
|
294
|
-
/** React shard extension used to preserve local creation ordering. */
|
|
295
|
-
created_at?: string;
|
|
296
|
-
}
|
|
297
|
-
/** SKOS scheme as serialized in the shard JSON array. */
|
|
298
|
-
interface ShardSkosScheme {
|
|
299
|
-
id: string;
|
|
300
|
-
title: string;
|
|
301
|
-
description: string | null;
|
|
302
|
-
created_at: string;
|
|
303
|
-
updated_at: string;
|
|
304
|
-
}
|
|
305
|
-
/** SKOS concept as serialized in the shard JSON array. */
|
|
306
|
-
interface ShardSkosConcept {
|
|
307
|
-
id: string;
|
|
308
|
-
scheme_id: string;
|
|
309
|
-
pref_label: string;
|
|
310
|
-
alt_labels: string[];
|
|
311
|
-
definition: string | null;
|
|
312
|
-
created_at: string;
|
|
313
|
-
updated_at: string;
|
|
314
|
-
}
|
|
315
|
-
/** SKOS concept relation as serialized in the shard JSONL. */
|
|
316
|
-
interface ShardSkosRelation {
|
|
317
|
-
id: string;
|
|
318
|
-
source_concept_id: string;
|
|
319
|
-
target_concept_id: string;
|
|
320
|
-
relation_type: 'broader' | 'narrower' | 'related';
|
|
321
|
-
created_at: string;
|
|
322
|
-
}
|
|
323
|
-
/** Note-to-SKOS-concept assignment as serialized in the shard JSONL. */
|
|
324
|
-
interface ShardNoteSkosTag {
|
|
325
|
-
id: string;
|
|
326
|
-
note_id: string;
|
|
327
|
-
concept_id: string;
|
|
328
|
-
created_at: string;
|
|
329
|
-
}
|
|
330
|
-
/** Provenance edge as serialized in the shard JSONL. */
|
|
331
|
-
interface ShardProvenanceEdge {
|
|
332
|
-
id: string;
|
|
333
|
-
entity_type: string;
|
|
334
|
-
entity_id: string;
|
|
335
|
-
activity: string;
|
|
336
|
-
agent: string;
|
|
337
|
-
started_at: string;
|
|
338
|
-
ended_at: string | null;
|
|
339
|
-
attributes: Record<string, unknown> | null;
|
|
340
|
-
}
|
|
341
|
-
interface ShardArtifactFreshness {
|
|
342
|
-
status: 'fresh' | 'stale' | 'unknown';
|
|
343
|
-
checked_at?: string;
|
|
344
|
-
stale_reason?: string;
|
|
345
|
-
source_hashes?: {
|
|
346
|
-
notes?: string;
|
|
347
|
-
links?: string;
|
|
348
|
-
embeddings?: string;
|
|
349
|
-
embedding_set_members?: string;
|
|
350
|
-
virtual_set_definition?: string;
|
|
351
|
-
parameters?: string;
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
type AiwgFortemiRecordType = string;
|
|
356
|
-
type AiwgFortemiRecordSchemaVersion = 'aiwg.fortemi.index.record.v1' | 'aiwg.fortemi.index.record.v2';
|
|
357
|
-
type AiwgFortemiIndexExportSchemaVersion = 'aiwg.fortemi.index.export.v1' | 'aiwg.fortemi.index.export.v2';
|
|
358
|
-
type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public';
|
|
359
|
-
type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected';
|
|
360
|
-
type AiwgReviewAction = 'accept' | 'reject' | 'defer';
|
|
361
|
-
type AiwgFortemiRelationshipDirection = 'upstream' | 'downstream' | 'related';
|
|
362
|
-
interface AiwgFortemiRecordSource {
|
|
363
|
-
path: string;
|
|
364
|
-
repo_relative_path: string;
|
|
365
|
-
locator: string;
|
|
366
|
-
origin?: string;
|
|
367
|
-
generated?: boolean;
|
|
368
|
-
checksum?: string;
|
|
369
|
-
updated_at?: string;
|
|
370
|
-
}
|
|
371
|
-
interface AiwgFortemiRelationship {
|
|
372
|
-
type: string;
|
|
373
|
-
target_id: string;
|
|
374
|
-
source_path?: string;
|
|
375
|
-
target_path?: string;
|
|
376
|
-
direction?: AiwgFortemiRelationshipDirection;
|
|
377
|
-
label?: string;
|
|
378
|
-
confidence?: number;
|
|
379
|
-
privacy?: AiwgPrivacyClassification;
|
|
380
|
-
metadata?: Record<string, unknown>;
|
|
381
|
-
}
|
|
382
|
-
interface AiwgFortemiProvenance {
|
|
383
|
-
field: string;
|
|
384
|
-
source: string;
|
|
385
|
-
path: string;
|
|
386
|
-
confidence: AiwgProvenanceConfidence;
|
|
387
|
-
privacy: AiwgPrivacyClassification;
|
|
388
|
-
}
|
|
389
|
-
type AiwgFortemiSkosRelationType = 'broader' | 'narrower' | 'related' | string;
|
|
390
|
-
interface AiwgFortemiSkosConcept {
|
|
391
|
-
id: string;
|
|
392
|
-
prefLabel: string;
|
|
393
|
-
definition?: string;
|
|
394
|
-
scheme?: string;
|
|
395
|
-
notation?: string;
|
|
396
|
-
uri?: string;
|
|
397
|
-
altLabels?: string[];
|
|
398
|
-
metadata?: Record<string, unknown>;
|
|
399
|
-
}
|
|
400
|
-
interface AiwgFortemiSkosRelation {
|
|
401
|
-
type: AiwgFortemiSkosRelationType;
|
|
402
|
-
source_id: string;
|
|
403
|
-
target_id: string;
|
|
404
|
-
source_path?: string;
|
|
405
|
-
metadata?: Record<string, unknown>;
|
|
406
|
-
}
|
|
407
|
-
interface AiwgFortemiProvenanceEvent {
|
|
408
|
-
id?: string;
|
|
409
|
-
activity: string;
|
|
410
|
-
agent?: string;
|
|
411
|
-
started_at?: string;
|
|
412
|
-
ended_at?: string;
|
|
413
|
-
source?: string;
|
|
414
|
-
path?: string;
|
|
415
|
-
confidence?: AiwgProvenanceConfidence;
|
|
416
|
-
privacy?: AiwgPrivacyClassification;
|
|
417
|
-
attributes?: Record<string, unknown>;
|
|
418
|
-
}
|
|
419
|
-
interface AiwgFortemiSearchProjection {
|
|
420
|
-
title?: string;
|
|
421
|
-
name?: string;
|
|
422
|
-
summary?: string;
|
|
423
|
-
body?: string;
|
|
424
|
-
triggers?: string[];
|
|
425
|
-
aliases?: string[];
|
|
426
|
-
capability?: string;
|
|
427
|
-
tags?: string[];
|
|
428
|
-
phase?: string;
|
|
429
|
-
type?: string;
|
|
430
|
-
frontmatter?: Record<string, unknown>;
|
|
431
|
-
}
|
|
432
|
-
interface AiwgFortemiChunk {
|
|
433
|
-
id?: string;
|
|
434
|
-
text?: string;
|
|
435
|
-
body?: string;
|
|
436
|
-
summary?: string;
|
|
437
|
-
source_path?: string;
|
|
438
|
-
metadata?: Record<string, unknown>;
|
|
439
|
-
}
|
|
440
|
-
interface AiwgFortemiRecordEmbedding {
|
|
441
|
-
id?: string;
|
|
442
|
-
embedding?: number[];
|
|
443
|
-
vector?: number[];
|
|
444
|
-
model?: string;
|
|
445
|
-
granularity?: string;
|
|
446
|
-
input_hash?: string;
|
|
447
|
-
source_path?: string;
|
|
448
|
-
metadata?: Record<string, unknown>;
|
|
449
|
-
}
|
|
450
|
-
type AiwgFortemiAttachmentReference = ShardAttachmentReference;
|
|
451
|
-
type AiwgFortemiBinarySource = ShardBinarySource;
|
|
452
|
-
interface AiwgFortemiRecord {
|
|
453
|
-
schema_version: AiwgFortemiRecordSchemaVersion;
|
|
454
|
-
id: string;
|
|
455
|
-
type: AiwgFortemiRecordType;
|
|
456
|
-
source: AiwgFortemiRecordSource;
|
|
457
|
-
title?: string;
|
|
458
|
-
text?: string;
|
|
459
|
-
facets: Record<string, string[]>;
|
|
460
|
-
tags: string[];
|
|
461
|
-
concepts: string[];
|
|
462
|
-
relationships: AiwgFortemiRelationship[];
|
|
463
|
-
provenance: AiwgFortemiProvenance[];
|
|
464
|
-
search?: AiwgFortemiSearchProjection;
|
|
465
|
-
chunks?: AiwgFortemiChunk[];
|
|
466
|
-
binary_sources?: AiwgFortemiBinarySource[];
|
|
467
|
-
embeddings?: AiwgFortemiRecordEmbedding[];
|
|
468
|
-
compatibility?: Record<string, unknown>;
|
|
469
|
-
/** Optional rich SKOS metadata for static consumers that need labels/definitions without opening a shard. */
|
|
470
|
-
skos_concepts?: AiwgFortemiSkosConcept[];
|
|
471
|
-
/** Optional SKOS relationship edges among concepts referenced by this record. */
|
|
472
|
-
skos_relations?: AiwgFortemiSkosRelation[];
|
|
473
|
-
/** Optional W3C PROV-style activity chain for this record. */
|
|
474
|
-
provenance_events?: AiwgFortemiProvenanceEvent[];
|
|
475
|
-
privacy: {
|
|
476
|
-
classification: AiwgPrivacyClassification;
|
|
477
|
-
pii: boolean;
|
|
478
|
-
locality?: string;
|
|
479
|
-
};
|
|
480
|
-
updated_at: string;
|
|
481
|
-
}
|
|
482
|
-
interface AiwgFortemiIndexExport {
|
|
483
|
-
schema_version: AiwgFortemiIndexExportSchemaVersion;
|
|
484
|
-
generated_at: string;
|
|
485
|
-
source: {
|
|
486
|
-
repo: string;
|
|
487
|
-
privacy: AiwgPrivacyClassification;
|
|
488
|
-
graph?: string;
|
|
489
|
-
};
|
|
490
|
-
items: AiwgFortemiRecord[];
|
|
491
|
-
compatibility?: {
|
|
492
|
-
previous_schema_version: 'aiwg.fortemi.index.export.v1';
|
|
493
|
-
strategy: 'supported';
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
interface AiwgFortemiChunkPartRef {
|
|
497
|
-
href: string;
|
|
498
|
-
offset: number;
|
|
499
|
-
count: number;
|
|
500
|
-
}
|
|
501
|
-
declare const AIWG_SCAN_REQUIRED_FIELDS: Array<keyof AiwgFortemiRecord>;
|
|
502
|
-
type AiwgFortemiProjectedRecord = Pick<AiwgFortemiRecord, 'schema_version' | 'id' | 'type' | 'title' | 'text' | 'facets' | 'tags' | 'concepts' | 'privacy'> & Partial<AiwgFortemiRecord>;
|
|
503
|
-
type AiwgDetailIdEncoding = 'uri' | 'base64url';
|
|
504
|
-
interface AiwgFortemiChunkDetailRef {
|
|
505
|
-
href: string;
|
|
506
|
-
encoding?: AiwgDetailIdEncoding;
|
|
507
|
-
}
|
|
508
|
-
interface AiwgFortemiChunkManifest {
|
|
509
|
-
schema_version: 'aiwg.fortemi.index.chunk-manifest.v1';
|
|
510
|
-
generated_at: string;
|
|
511
|
-
source: AiwgFortemiIndexExport['source'];
|
|
512
|
-
source_export_schema_version?: AiwgFortemiIndexExportSchemaVersion;
|
|
513
|
-
total: number;
|
|
514
|
-
part_size: number;
|
|
515
|
-
facets?: Record<string, Record<string, number>>;
|
|
516
|
-
projection?: Array<keyof AiwgFortemiRecord>;
|
|
517
|
-
detail?: AiwgFortemiChunkDetailRef;
|
|
518
|
-
parts: AiwgFortemiChunkPartRef[];
|
|
519
|
-
}
|
|
520
|
-
interface AiwgFortemiChunkPart {
|
|
521
|
-
schema_version: 'aiwg.fortemi.index.chunk.v1';
|
|
522
|
-
manifest_schema_version: 'aiwg.fortemi.index.chunk-manifest.v1';
|
|
523
|
-
offset: number;
|
|
524
|
-
items: AiwgFortemiRecord[];
|
|
525
|
-
}
|
|
526
|
-
interface AiwgIndexValidationResult {
|
|
527
|
-
valid: boolean;
|
|
528
|
-
errors: string[];
|
|
529
|
-
counts: Partial<Record<string, number>>;
|
|
530
|
-
}
|
|
531
|
-
interface AiwgChunkedIndexValidationResult {
|
|
532
|
-
valid: boolean;
|
|
533
|
-
errors: string[];
|
|
534
|
-
}
|
|
535
|
-
interface AiwgIndexQueryOptions {
|
|
536
|
-
types?: AiwgFortemiRecordType[];
|
|
537
|
-
facets?: Record<string, string[]>;
|
|
538
|
-
tags?: string[];
|
|
539
|
-
concepts?: string[];
|
|
540
|
-
privacy?: AiwgPrivacyClassification[];
|
|
541
|
-
relationshipTargetId?: string;
|
|
542
|
-
limit?: number;
|
|
543
|
-
offset?: number;
|
|
544
|
-
rank?: boolean;
|
|
545
|
-
snippets?: boolean;
|
|
546
|
-
snippetLength?: number;
|
|
547
|
-
weights?: Partial<AiwgIndexQueryWeights>;
|
|
548
|
-
includeMatches?: boolean;
|
|
549
|
-
searchProfile?: 'default' | 'aiwg-discovery';
|
|
550
|
-
}
|
|
551
|
-
interface AiwgIndexQueryWeights {
|
|
552
|
-
title: number;
|
|
553
|
-
text: number;
|
|
554
|
-
tag: number;
|
|
555
|
-
concept: number;
|
|
556
|
-
facet: number;
|
|
557
|
-
id: number;
|
|
558
|
-
source: number;
|
|
559
|
-
}
|
|
560
|
-
interface AiwgIndexQueryMatch {
|
|
561
|
-
field: 'title' | 'text' | 'tag' | 'concept' | 'facet' | 'id' | 'source';
|
|
562
|
-
value: string;
|
|
563
|
-
score?: number;
|
|
564
|
-
reason?: string;
|
|
565
|
-
}
|
|
566
|
-
interface AiwgIndexQueryRankedItem {
|
|
567
|
-
item: AiwgFortemiRecord;
|
|
568
|
-
rank: number;
|
|
569
|
-
snippet?: string;
|
|
570
|
-
matches?: AiwgIndexQueryMatch[];
|
|
571
|
-
}
|
|
572
|
-
interface AiwgIndexQueryResult {
|
|
573
|
-
items: AiwgFortemiRecord[];
|
|
574
|
-
total: number;
|
|
575
|
-
facets: Record<string, Record<string, number>>;
|
|
576
|
-
rankedItems?: AiwgIndexQueryRankedItem[];
|
|
577
|
-
}
|
|
578
|
-
type AiwgChunkedIndexLoader = (part: AiwgFortemiChunkPartRef, manifest: AiwgFortemiChunkManifest) => Promise<unknown>;
|
|
579
|
-
type AiwgChunkedIndexDetailLoader = (id: string, manifest: AiwgFortemiChunkManifest) => Promise<unknown>;
|
|
580
|
-
interface AiwgChunkedIndexLoadOptions {
|
|
581
|
-
maxCachedParts?: number;
|
|
582
|
-
detailLoader?: AiwgChunkedIndexDetailLoader;
|
|
583
|
-
maxCachedDetails?: number;
|
|
584
|
-
maxCachedMatches?: number;
|
|
585
|
-
}
|
|
586
|
-
type AiwgChunkedIndexProgressPhase = 'part' | 'query';
|
|
587
|
-
interface AiwgChunkedIndexProgress {
|
|
588
|
-
phase: AiwgChunkedIndexProgressPhase;
|
|
589
|
-
done: number;
|
|
590
|
-
total: number;
|
|
591
|
-
href?: string;
|
|
592
|
-
}
|
|
593
|
-
interface AiwgChunkedIndexQueryOptions extends AiwgIndexQueryOptions {
|
|
594
|
-
onProgress?: (progress: AiwgChunkedIndexProgress) => void;
|
|
595
|
-
}
|
|
596
|
-
interface AiwgChunkedIndexQueryResult extends AiwgIndexQueryResult {
|
|
597
|
-
manifestTotal: number;
|
|
598
|
-
scannedParts: number;
|
|
599
|
-
fetchedParts: number;
|
|
600
|
-
complete: boolean;
|
|
601
|
-
}
|
|
602
|
-
interface AiwgReviewDecision {
|
|
603
|
-
item_id: string;
|
|
604
|
-
action: AiwgReviewAction;
|
|
605
|
-
reason?: string;
|
|
606
|
-
updated_at: string;
|
|
607
|
-
}
|
|
608
|
-
interface AiwgReviewDecisionExport {
|
|
609
|
-
schema_version: 'aiwg.fortemi.review-decisions.v1';
|
|
610
|
-
generated_at: string;
|
|
611
|
-
source_export_schema_version: AiwgFortemiIndexExportSchemaVersion;
|
|
612
|
-
decisions: AiwgReviewDecision[];
|
|
613
|
-
}
|
|
614
|
-
interface AiwgIndexGraphOptions {
|
|
615
|
-
communityFacet?: string;
|
|
616
|
-
communityTagPrefix?: string;
|
|
617
|
-
relationshipWeights?: Record<string, number>;
|
|
618
|
-
includeDanglingRelationships?: boolean;
|
|
619
|
-
}
|
|
620
|
-
type AiwgRelationshipDirection = 'in' | 'out' | 'both';
|
|
621
|
-
type AiwgRelationshipSetOperation = 'intersection' | 'union' | 'difference';
|
|
622
|
-
interface AiwgRelationshipTraversalOptions {
|
|
623
|
-
direction?: AiwgRelationshipDirection;
|
|
624
|
-
relationshipType?: string;
|
|
625
|
-
relationshipDirection?: AiwgFortemiRelationshipDirection;
|
|
626
|
-
limit?: number;
|
|
627
|
-
}
|
|
628
|
-
interface AiwgRelationshipQueryOptions extends AiwgRelationshipTraversalOptions {
|
|
629
|
-
sourceId?: string;
|
|
630
|
-
targetId?: string;
|
|
631
|
-
endpointId?: string;
|
|
632
|
-
type?: string;
|
|
633
|
-
}
|
|
634
|
-
interface AiwgRelationshipEdgeSummary {
|
|
635
|
-
source_id: string;
|
|
636
|
-
target_id: string;
|
|
637
|
-
type: string;
|
|
638
|
-
source_path?: string;
|
|
639
|
-
target_path?: string;
|
|
640
|
-
direction?: AiwgFortemiRelationshipDirection;
|
|
641
|
-
}
|
|
642
|
-
interface AiwgRelationshipNodeSummary {
|
|
643
|
-
id: string;
|
|
644
|
-
type: AiwgFortemiRecordType;
|
|
645
|
-
title: string;
|
|
646
|
-
}
|
|
647
|
-
interface AiwgRelationshipTraversalResult {
|
|
648
|
-
nodes: AiwgRelationshipNodeSummary[];
|
|
649
|
-
edges: AiwgRelationshipEdgeSummary[];
|
|
650
|
-
complete: boolean;
|
|
651
|
-
scannedParts?: number;
|
|
652
|
-
fetchedParts?: number;
|
|
653
|
-
}
|
|
654
|
-
interface AiwgRelationshipSetOptions extends AiwgRelationshipTraversalOptions {
|
|
655
|
-
op: AiwgRelationshipSetOperation;
|
|
656
|
-
a: string;
|
|
657
|
-
b: string;
|
|
658
|
-
}
|
|
659
|
-
interface AiwgRelationshipSetResult {
|
|
660
|
-
ids: string[];
|
|
661
|
-
op: AiwgRelationshipSetOperation;
|
|
662
|
-
}
|
|
663
|
-
interface AiwgStaticEmbeddingRecord {
|
|
664
|
-
record_id: string;
|
|
665
|
-
embedding: number[];
|
|
666
|
-
embedding_id?: string;
|
|
667
|
-
granularity?: string;
|
|
668
|
-
input_hash: string;
|
|
669
|
-
source_path?: string;
|
|
670
|
-
}
|
|
671
|
-
interface AiwgStaticEmbeddingSet {
|
|
672
|
-
schema_version: 'aiwg.fortemi.embedding.set.v1';
|
|
673
|
-
id: string;
|
|
674
|
-
model: string;
|
|
675
|
-
dimensions: number;
|
|
676
|
-
generated_at: string;
|
|
677
|
-
granularity: 'title-summary' | 'body' | 'chunked-body' | string;
|
|
678
|
-
metric?: 'cosine' | 'dot' | 'euclidean';
|
|
679
|
-
input_hash_algorithm?: string;
|
|
680
|
-
embeddings: AiwgStaticEmbeddingRecord[];
|
|
681
|
-
}
|
|
682
|
-
interface AiwgHeadlessEmbeddingBackend {
|
|
683
|
-
model: string;
|
|
684
|
-
dimensions: number;
|
|
685
|
-
embed(input: string, record: AiwgFortemiRecord): number[] | Promise<number[]>;
|
|
686
|
-
}
|
|
687
|
-
interface AiwgPrivacyFilterOptions {
|
|
688
|
-
/** Include records classified `private` (default false). */
|
|
689
|
-
includePrivate?: boolean;
|
|
690
|
-
/** Include records flagged `pii` (default false). */
|
|
691
|
-
includePii?: boolean;
|
|
692
|
-
}
|
|
693
|
-
/** Drop `private`/`pii` records unless explicitly opted in (SEC6, default-safe). */
|
|
694
|
-
declare function filterAiwgRecordsByPrivacy(records: AiwgFortemiRecord[], options?: AiwgPrivacyFilterOptions): AiwgFortemiRecord[];
|
|
695
|
-
interface BuildAiwgStaticEmbeddingSetOptions {
|
|
696
|
-
id: string;
|
|
697
|
-
backend: AiwgHeadlessEmbeddingBackend;
|
|
698
|
-
records?: AiwgFortemiRecord[];
|
|
699
|
-
generatedAt?: string | Date;
|
|
700
|
-
granularity?: AiwgStaticEmbeddingSet['granularity'];
|
|
701
|
-
metric?: AiwgStaticEmbeddingSet['metric'];
|
|
702
|
-
textForRecord?: (record: AiwgFortemiRecord) => string;
|
|
703
|
-
/** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */
|
|
704
|
-
privacy?: AiwgPrivacyFilterOptions;
|
|
705
|
-
}
|
|
706
|
-
interface AiwgStaticSemanticQueryOptions {
|
|
707
|
-
limit?: number;
|
|
708
|
-
offset?: number;
|
|
709
|
-
minScore?: number;
|
|
710
|
-
}
|
|
711
|
-
interface AiwgStaticSemanticResult {
|
|
712
|
-
item: AiwgFortemiRecord;
|
|
713
|
-
score: number;
|
|
714
|
-
embedding?: AiwgStaticEmbeddingRecord;
|
|
715
|
-
}
|
|
716
|
-
interface AiwgStaticHybridQueryOptions extends AiwgStaticSemanticQueryOptions, AiwgIndexQueryOptions {
|
|
717
|
-
lexicalWeight?: number;
|
|
718
|
-
semanticWeight?: number;
|
|
719
|
-
}
|
|
720
|
-
interface AiwgStaticDuplicatePair {
|
|
721
|
-
left: AiwgFortemiRecord;
|
|
722
|
-
right: AiwgFortemiRecord;
|
|
723
|
-
score: number;
|
|
724
|
-
}
|
|
725
|
-
interface AiwgReviewInput {
|
|
726
|
-
item_id: string;
|
|
727
|
-
action: AiwgReviewAction;
|
|
728
|
-
reason?: string;
|
|
729
|
-
}
|
|
730
|
-
interface AiwgIndexControllerSnapshot {
|
|
731
|
-
index: AiwgFortemiIndexExport | null;
|
|
732
|
-
chunked: {
|
|
733
|
-
manifest: AiwgFortemiChunkManifest;
|
|
734
|
-
cachedParts: number;
|
|
735
|
-
maxCachedParts: number;
|
|
736
|
-
} | null;
|
|
737
|
-
data: AiwgIndexQueryResult | null;
|
|
738
|
-
error: Error | null;
|
|
739
|
-
reviewDecisions: AiwgReviewDecision[];
|
|
740
|
-
}
|
|
741
|
-
type AiwgIndexControllerListener = (snapshot: AiwgIndexControllerSnapshot) => void;
|
|
742
|
-
interface AiwgIndexController {
|
|
743
|
-
loadIndex(value: unknown): AiwgFortemiIndexExport;
|
|
744
|
-
loadChunkedIndex(manifest: unknown, loader: AiwgChunkedIndexLoader, options?: AiwgChunkedIndexLoadOptions): AiwgFortemiChunkManifest;
|
|
745
|
-
getIndex(): AiwgFortemiIndexExport | null;
|
|
746
|
-
getChunkedManifest(): AiwgFortemiChunkManifest | null;
|
|
747
|
-
getSnapshot(): AiwgIndexControllerSnapshot;
|
|
748
|
-
query(query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
|
|
749
|
-
queryChunked(query?: string, options?: AiwgChunkedIndexQueryOptions): Promise<AiwgChunkedIndexQueryResult>;
|
|
750
|
-
getRecord(id: string): Promise<AiwgFortemiRecord>;
|
|
751
|
-
neighbors(id: string, options?: AiwgRelationshipTraversalOptions): Promise<AiwgRelationshipTraversalResult>;
|
|
752
|
-
relationshipQuery(options?: AiwgRelationshipQueryOptions): Promise<AiwgRelationshipTraversalResult>;
|
|
753
|
-
relationshipSet(options: AiwgRelationshipSetOptions): Promise<AiwgRelationshipSetResult>;
|
|
754
|
-
clearChunkCache(): void;
|
|
755
|
-
toCommunityGraph(options?: AiwgIndexGraphOptions): ReturnType<typeof aiwgFortemiIndexToCommunityGraph>;
|
|
756
|
-
toCommunityGraphChunked(options?: AiwgIndexGraphOptions & {
|
|
757
|
-
onProgress?: (progress: AiwgChunkedIndexProgress) => void;
|
|
758
|
-
}): Promise<ReturnType<typeof aiwgFortemiIndexToCommunityGraph>>;
|
|
759
|
-
setReviewDecision(input: AiwgReviewInput): AiwgReviewDecision;
|
|
760
|
-
clearReviewDecision(itemId: string): void;
|
|
761
|
-
createReviewDecisionExport(generatedAt?: string): AiwgReviewDecisionExport;
|
|
762
|
-
subscribe(listener: AiwgIndexControllerListener): () => void;
|
|
763
|
-
}
|
|
764
|
-
declare function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult;
|
|
765
|
-
declare function assertAiwgFortemiIndexExport(value: unknown): AiwgFortemiIndexExport;
|
|
766
|
-
declare function validateAiwgFortemiChunkManifest(value: unknown): AiwgChunkedIndexValidationResult;
|
|
767
|
-
declare function assertAiwgFortemiChunkManifest(value: unknown): AiwgFortemiChunkManifest;
|
|
768
|
-
declare function validateAiwgFortemiChunkPart(value: unknown, partRef?: AiwgFortemiChunkPartRef, manifest?: AiwgFortemiChunkManifest): AiwgChunkedIndexValidationResult;
|
|
769
|
-
declare function assertAiwgFortemiChunkPart(value: unknown, partRef?: AiwgFortemiChunkPartRef, manifest?: AiwgFortemiChunkManifest): AiwgFortemiChunkPart;
|
|
770
|
-
declare function resolveAiwgFetchUrl(href: string, baseUrl?: string | URL): string;
|
|
771
|
-
declare function createAiwgFetchChunkLoader(baseUrl?: string | URL): AiwgChunkedIndexLoader;
|
|
772
|
-
declare function encodeAiwgDetailId(id: string, encoding?: AiwgDetailIdEncoding): string;
|
|
773
|
-
declare function aiwgDetailHrefForId(detail: AiwgFortemiChunkDetailRef, id: string): string;
|
|
774
|
-
declare function createAiwgFetchDetailLoader(baseUrl?: string | URL): AiwgChunkedIndexDetailLoader;
|
|
775
|
-
declare function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>>;
|
|
776
|
-
declare function buildAiwgStaticEmbeddingSet(index: AiwgFortemiIndexExport, options: BuildAiwgStaticEmbeddingSetOptions): Promise<AiwgStaticEmbeddingSet>;
|
|
777
|
-
interface AiwgChunkedIndexBuildOptions {
|
|
778
|
-
partSize?: number;
|
|
779
|
-
projection?: Array<keyof AiwgFortemiRecord>;
|
|
780
|
-
detailHref?: string;
|
|
781
|
-
idEncoding?: AiwgDetailIdEncoding;
|
|
782
|
-
generatedAt?: string;
|
|
783
|
-
/** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */
|
|
784
|
-
privacy?: AiwgPrivacyFilterOptions;
|
|
785
|
-
}
|
|
786
|
-
interface AiwgChunkedIndexBuildResult {
|
|
787
|
-
manifest: AiwgFortemiChunkManifest;
|
|
788
|
-
parts: Array<{
|
|
789
|
-
href: string;
|
|
790
|
-
part: AiwgFortemiChunkPart;
|
|
791
|
-
}>;
|
|
792
|
-
details: Array<{
|
|
793
|
-
id: string;
|
|
794
|
-
href: string;
|
|
795
|
-
record: AiwgFortemiRecord;
|
|
796
|
-
}>;
|
|
797
|
-
}
|
|
798
|
-
declare function buildAiwgChunkedIndex(index: AiwgFortemiIndexExport, options?: AiwgChunkedIndexBuildOptions): AiwgChunkedIndexBuildResult;
|
|
799
|
-
declare function queryAiwgFortemiIndex(index: AiwgFortemiIndexExport, query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
|
|
800
|
-
declare function validateAiwgStaticEmbeddingSet(value: unknown): AiwgChunkedIndexValidationResult;
|
|
801
|
-
declare function assertAiwgStaticEmbeddingSet(value: unknown): AiwgStaticEmbeddingSet;
|
|
802
|
-
declare function queryAiwgSemanticIndex(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, queryEmbedding: number[], options?: AiwgStaticSemanticQueryOptions): AiwgStaticSemanticResult[];
|
|
803
|
-
declare function queryAiwgHybridIndex(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, query: string, queryEmbedding: number[], options?: AiwgStaticHybridQueryOptions): AiwgStaticSemanticResult[];
|
|
804
|
-
declare const DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS = 5000;
|
|
805
|
-
declare function findAiwgStaticDuplicatePairs(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, threshold?: number, options?: {
|
|
806
|
-
maxEmbeddings?: number;
|
|
807
|
-
}): AiwgStaticDuplicatePair[];
|
|
808
|
-
declare function createAiwgReviewDecisionExport(source: Pick<AiwgFortemiIndexExport, 'schema_version'>, decisions: AiwgReviewDecision[], generatedAt?: string): AiwgReviewDecisionExport;
|
|
809
|
-
declare function createAiwgIndexController(initialIndex?: AiwgFortemiIndexExport): AiwgIndexController;
|
|
810
|
-
declare function aiwgFortemiIndexToCommunityGraph(index: AiwgFortemiIndexExport, options?: AiwgIndexGraphOptions): {
|
|
811
|
-
nodes: {
|
|
812
|
-
id: string;
|
|
813
|
-
}[];
|
|
814
|
-
edges: {
|
|
815
|
-
source: string;
|
|
816
|
-
target: string;
|
|
817
|
-
kind: string;
|
|
818
|
-
weight: number;
|
|
819
|
-
}[];
|
|
820
|
-
communities: {
|
|
821
|
-
id: string;
|
|
822
|
-
nodes: string[];
|
|
823
|
-
}[];
|
|
824
|
-
};
|
|
825
|
-
|
|
826
|
-
export { type AiwgFortemiSkosRelation as $, AIWG_SCAN_REQUIRED_FIELDS as A, type BlobStore as B, type AiwgChunkedIndexValidationResult as C, type AiwgFortemiAttachmentReference as D, type ExportOptions as E, type AiwgFortemiBinarySource as F, type AiwgFortemiChunk as G, type AiwgFortemiChunkDetailRef as H, type ImportOptions as I, type AiwgFortemiChunkManifest as J, type AiwgFortemiChunkPart as K, type AiwgFortemiChunkPartRef as L, type AiwgFortemiIndexExport as M, type AiwgFortemiIndexExportSchemaVersion as N, type AiwgFortemiProjectedRecord as O, type AiwgFortemiProvenance as P, type AiwgFortemiProvenanceEvent as Q, type AiwgFortemiRecord as R, type ShardAttachmentProjection as S, type AiwgFortemiRecordEmbedding as T, type AiwgFortemiRecordSchemaVersion as U, type AiwgFortemiRecordSource as V, type AiwgFortemiRecordType as W, type AiwgFortemiRelationship as X, type AiwgFortemiRelationshipDirection as Y, type AiwgFortemiSearchProjection as Z, type AiwgFortemiSkosConcept as _, type ShardCollection as a, validateAiwgFortemiChunkPart as a$, type AiwgFortemiSkosRelationType as a0, type AiwgHeadlessEmbeddingBackend as a1, type AiwgIndexController as a2, type AiwgIndexControllerListener as a3, type AiwgIndexControllerSnapshot as a4, type AiwgIndexGraphOptions as a5, type AiwgIndexQueryMatch as a6, type AiwgIndexQueryOptions as a7, type AiwgIndexQueryRankedItem as a8, type AiwgIndexQueryResult as a9, type ConflictStrategy as aA, type ImportCounts as aB, type ImportProgress as aC, type ImportProgressPhase as aD, MemoryBlobStore as aE, SHARD_FORMAT as aF, type ShardClusterRef as aG, type ShardLayout as aH, aiwgFortemiIndexToCommunityGraph as aI, assertAiwgFortemiChunkManifest as aJ, assertAiwgFortemiChunkPart as aK, assertAiwgFortemiIndexExport as aL, assertAiwgStaticEmbeddingSet as aM, buildAiwgChunkedIndex as aN, buildAiwgStaticEmbeddingSet as aO, createAiwgFetchChunkLoader as aP, createAiwgFetchDetailLoader as aQ, createAiwgIndexController as aR, createAiwgReviewDecisionExport as aS, createBlobStore as aT, filterAiwgRecordsByPrivacy as aU, findAiwgStaticDuplicatePairs as aV, getAiwgFortemiFacets as aW, queryAiwgFortemiIndex as aX, queryAiwgHybridIndex as aY, queryAiwgSemanticIndex as aZ, validateAiwgFortemiChunkManifest as a_, type AiwgIndexQueryWeights as aa, type AiwgIndexValidationResult as ab, type AiwgPrivacyClassification as ac, type AiwgPrivacyFilterOptions as ad, type AiwgProvenanceConfidence as ae, type AiwgRelationshipDirection as af, type AiwgRelationshipEdgeSummary as ag, type AiwgRelationshipNodeSummary as ah, type AiwgRelationshipQueryOptions as ai, type AiwgRelationshipSetOperation as aj, type AiwgRelationshipSetOptions as ak, type AiwgRelationshipSetResult as al, type AiwgRelationshipTraversalOptions as am, type AiwgRelationshipTraversalResult as an, type AiwgReviewAction as ao, type AiwgReviewDecision as ap, type AiwgReviewDecisionExport as aq, type AiwgReviewInput as ar, type AiwgStaticDuplicatePair as as, type AiwgStaticEmbeddingRecord as at, type AiwgStaticEmbeddingSet as au, type AiwgStaticHybridQueryOptions as av, type AiwgStaticSemanticQueryOptions as aw, type AiwgStaticSemanticResult as ax, type BuildAiwgStaticEmbeddingSetOptions as ay, CURRENT_SHARD_VERSION as az, type ShardEmbeddingConfig as b, validateAiwgFortemiIndexExport as b0, validateAiwgStaticEmbeddingSet as b1, type AiwgDetailIdEncoding as b2, DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS as b3, aiwgDetailHrefForId as b4, encodeAiwgDetailId as b5, resolveAiwgFetchUrl as b6, type ShardEmbedding as c, type ShardEmbeddingSet as d, type ShardEmbeddingSetMember as e, type ShardLink as f, type ShardNote as g, type ShardNoteSkosTag as h, type ShardProvenanceEdge as i, type ShardSkosConcept as j, type ShardSkosRelation as k, type ShardSkosScheme as l, type ShardTag as m, type ShardTemplate as n, type ShardManifest as o, type ImportResult as p, type ShardComponent as q, type AiwgChunkedIndexBuildOptions as r, type AiwgChunkedIndexBuildResult as s, type AiwgChunkedIndexDetailLoader as t, type AiwgChunkedIndexLoadOptions as u, type AiwgChunkedIndexLoader as v, type AiwgChunkedIndexProgress as w, type AiwgChunkedIndexProgressPhase as x, type AiwgChunkedIndexQueryOptions as y, type AiwgChunkedIndexQueryResult as z };
|