@fortemi/core 2026.5.4 → 2026.6.1
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 +4 -4
- package/dist/index.d.ts +249 -53
- package/dist/index.js +495 -130
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Most browser note and knowledge apps choose between a thin IndexedDB wrapper, a
|
|
|
38
38
|
| Queryable knowledge | SQL-backed repositories for notes, links, tags, collections, SKOS concepts, jobs, and search |
|
|
39
39
|
| Retrieval quality | Full-text search, pgvector-backed semantic search, hybrid ranking, snippets, facets, and filters |
|
|
40
40
|
| AI-ready workflows | Optional embeddings, local LLM capability discovery, job provenance, and fallback routing |
|
|
41
|
-
| Portable archives | Knowledge Shard tar.gz import/export with checksums and JSON format parity |
|
|
41
|
+
| Portable archives | Knowledge Shard tar.gz import/export with set-scoped exports, chunked imports, checksums, and JSON format parity |
|
|
42
42
|
| Agent integration | Manifest-backed tools and direct helper functions for bridge adapters and automation |
|
|
43
43
|
| UI freedom | A headless package you can use from React, another framework, a browser extension, or a custom host |
|
|
44
44
|
|
|
@@ -111,7 +111,7 @@ await registerServiceWorker()
|
|
|
111
111
|
| Event bus | Typed subscriptions for note, job, archive, and capability events |
|
|
112
112
|
| Capability system | Embeddings, local LLM, GPU detection, local-provider discovery, fallback routing |
|
|
113
113
|
| Job queue | Server-compatible background workflow for revisions, titles, embeddings, concepts, and links |
|
|
114
|
-
| Knowledge Shards | Tar.gz import/export with checksums and JSON format parity |
|
|
114
|
+
| Knowledge Shards | Tar.gz import/export with checksums, progress callbacks, yielding imports, set-scoped embedding exports, and JSON format parity |
|
|
115
115
|
| Service-worker helpers | Route registration primitives for standalone browser integration |
|
|
116
116
|
|
|
117
117
|
## Search and Knowledge Model
|
|
@@ -144,11 +144,11 @@ Use the manifest when a host needs to advertise Fortemi operations to an agent r
|
|
|
144
144
|
| `idb` | IndexedDB-backed PGlite data directory | Firefox and broad compatibility |
|
|
145
145
|
| `memory` | In-memory database | Tests, demos, restricted browser contexts |
|
|
146
146
|
|
|
147
|
-
Data stays in the selected browser storage mode unless your application explicitly exports it, imports it, or wires external providers. Optional AI capabilities are opt-in and can be routed to local WASM, local provider servers, or host-provided integrations depending on your product requirements.
|
|
147
|
+
Data stays in the selected browser storage mode unless your application explicitly exports it, imports it, or wires external providers. Optional AI capabilities are opt-in and can be routed to local WASM, local provider servers, OpenAI-compatible APIs, or host-provided integrations depending on your product requirements. API keys should live only in browser or machine secure storage; if secure storage is unavailable, do not persist them.
|
|
148
148
|
|
|
149
149
|
## React Bindings
|
|
150
150
|
|
|
151
|
-
For React applications, install `@fortemi/react`. It wraps `@fortemi/core` with `FortemiProvider`, context access, and
|
|
151
|
+
For React applications, install `@fortemi/react`. It wraps `@fortemi/core` with `FortemiProvider`, context access, worker-mode PGlite, graph visualization primitives, and the React hook surface.
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
154
|
pnpm add @fortemi/react @fortemi/core react
|
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,13 @@ interface EventMap {
|
|
|
52
52
|
name: string;
|
|
53
53
|
progress?: number;
|
|
54
54
|
};
|
|
55
|
+
'capability.required': {
|
|
56
|
+
name: string;
|
|
57
|
+
jobId: string;
|
|
58
|
+
noteId: string;
|
|
59
|
+
type: string;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
55
62
|
'job.completed': {
|
|
56
63
|
id: string;
|
|
57
64
|
noteId: string;
|
|
@@ -63,6 +70,13 @@ interface EventMap {
|
|
|
63
70
|
type: string;
|
|
64
71
|
error: string;
|
|
65
72
|
};
|
|
73
|
+
'job.blocked': {
|
|
74
|
+
id: string;
|
|
75
|
+
noteId: string;
|
|
76
|
+
type: string;
|
|
77
|
+
capability: string;
|
|
78
|
+
message: string;
|
|
79
|
+
};
|
|
66
80
|
'archive.switched': {
|
|
67
81
|
name: string;
|
|
68
82
|
};
|
|
@@ -118,6 +132,56 @@ declare class TypedEventBus {
|
|
|
118
132
|
type PersistenceMode = 'opfs' | 'idb' | 'memory';
|
|
119
133
|
declare function createPGliteInstance(persistence: PersistenceMode, archiveName?: string): Promise<PGlite>;
|
|
120
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Type-safe client for the PGlite Worker.
|
|
137
|
+
*
|
|
138
|
+
* PGliteWorkerClient wraps a Worker instance and exposes the same surface as
|
|
139
|
+
* PGlite (query / exec / transaction) but serialises every call to a typed
|
|
140
|
+
* postMessage exchange. Each outgoing request is tagged with a UUIDv7 `id`;
|
|
141
|
+
* the worker echoes that id in its reply so the client can resolve or reject
|
|
142
|
+
* the matching Promise.
|
|
143
|
+
*
|
|
144
|
+
* TransactionProxy is a lightweight wrapper handed to the callback in
|
|
145
|
+
* transaction(), forwarding TX_QUERY / TX_EXEC messages with the active txId.
|
|
146
|
+
*/
|
|
147
|
+
declare class PGliteWorkerClient {
|
|
148
|
+
private worker;
|
|
149
|
+
private pending;
|
|
150
|
+
private readyPromise;
|
|
151
|
+
private resolveReady;
|
|
152
|
+
constructor(worker: Worker);
|
|
153
|
+
/** Resolves when the worker broadcasts READY after database initialisation. */
|
|
154
|
+
waitReady(): Promise<void>;
|
|
155
|
+
private send;
|
|
156
|
+
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<{
|
|
157
|
+
rows: T[];
|
|
158
|
+
fields?: Array<{
|
|
159
|
+
name: string;
|
|
160
|
+
dataTypeID: number;
|
|
161
|
+
}>;
|
|
162
|
+
}>;
|
|
163
|
+
exec(sql: string): Promise<void>;
|
|
164
|
+
transaction<T>(fn: (tx: TransactionProxy) => Promise<T>): Promise<T>;
|
|
165
|
+
/** Forward TX_QUERY for TransactionProxy — not part of the public surface. */
|
|
166
|
+
_txQuery<T>(txId: string, sql: string, params?: unknown[]): Promise<{
|
|
167
|
+
rows: T[];
|
|
168
|
+
}>;
|
|
169
|
+
/** Forward TX_EXEC for TransactionProxy — not part of the public surface. */
|
|
170
|
+
_txExec(txId: string, sql: string): Promise<void>;
|
|
171
|
+
ping(): Promise<void>;
|
|
172
|
+
close(): Promise<void>;
|
|
173
|
+
}
|
|
174
|
+
/** Proxy passed to the transaction callback — scopes queries to the active txId. */
|
|
175
|
+
declare class TransactionProxy {
|
|
176
|
+
private client;
|
|
177
|
+
private txId;
|
|
178
|
+
constructor(client: PGliteWorkerClient, txId: string);
|
|
179
|
+
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<{
|
|
180
|
+
rows: T[];
|
|
181
|
+
}>;
|
|
182
|
+
exec(sql: string): Promise<void>;
|
|
183
|
+
}
|
|
184
|
+
|
|
121
185
|
interface QueryResult<T = Record<string, unknown>> {
|
|
122
186
|
rows: T[];
|
|
123
187
|
fields?: Array<{
|
|
@@ -163,6 +227,24 @@ declare class PGliteStorageBackendFactory implements StorageBackendFactory {
|
|
|
163
227
|
open(input: StorageOpenRequest): Promise<StorageBackend>;
|
|
164
228
|
}
|
|
165
229
|
declare const defaultStorageBackendFactory: PGliteStorageBackendFactory;
|
|
230
|
+
declare class PGliteWorkerStorageBackend implements StorageBackend {
|
|
231
|
+
readonly id: string;
|
|
232
|
+
private client;
|
|
233
|
+
readonly mode = "readwrite";
|
|
234
|
+
constructor(id: string, client: PGliteWorkerClient);
|
|
235
|
+
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<QueryResult<T>>;
|
|
236
|
+
exec(sql: string): Promise<unknown>;
|
|
237
|
+
transaction<T>(fn: (tx: QueryExecutor) => Promise<T>): Promise<T>;
|
|
238
|
+
close(): Promise<void>;
|
|
239
|
+
}
|
|
240
|
+
interface PGliteWorkerStorageBackendFactoryOptions {
|
|
241
|
+
createWorker: () => Worker;
|
|
242
|
+
}
|
|
243
|
+
declare class PGliteWorkerStorageBackendFactory implements StorageBackendFactory {
|
|
244
|
+
private options;
|
|
245
|
+
constructor(options: PGliteWorkerStorageBackendFactoryOptions);
|
|
246
|
+
open(input: StorageOpenRequest): Promise<StorageBackend>;
|
|
247
|
+
}
|
|
166
248
|
|
|
167
249
|
/**
|
|
168
250
|
* Capability module system (ADR-002).
|
|
@@ -275,7 +357,7 @@ declare class ArchiveManager {
|
|
|
275
357
|
private archives;
|
|
276
358
|
private persistence;
|
|
277
359
|
private backendFactory;
|
|
278
|
-
constructor(persistenceOrFactory: PersistenceMode | StorageBackendFactory, events?: TypedEventBus | undefined);
|
|
360
|
+
constructor(persistenceOrFactory: PersistenceMode | StorageBackendFactory, events?: TypedEventBus | undefined, persistenceOverride?: PersistenceMode);
|
|
279
361
|
getCurrentArchiveName(): string;
|
|
280
362
|
getDb(): StorageBackend | null;
|
|
281
363
|
open(archiveName?: string): Promise<StorageBackend>;
|
|
@@ -457,56 +539,6 @@ type WorkerResponse = {
|
|
|
457
539
|
type: 'READY';
|
|
458
540
|
};
|
|
459
541
|
|
|
460
|
-
/**
|
|
461
|
-
* Type-safe client for the PGlite Worker.
|
|
462
|
-
*
|
|
463
|
-
* PGliteWorkerClient wraps a Worker instance and exposes the same surface as
|
|
464
|
-
* PGlite (query / exec / transaction) but serialises every call to a typed
|
|
465
|
-
* postMessage exchange. Each outgoing request is tagged with a UUIDv7 `id`;
|
|
466
|
-
* the worker echoes that id in its reply so the client can resolve or reject
|
|
467
|
-
* the matching Promise.
|
|
468
|
-
*
|
|
469
|
-
* TransactionProxy is a lightweight wrapper handed to the callback in
|
|
470
|
-
* transaction(), forwarding TX_QUERY / TX_EXEC messages with the active txId.
|
|
471
|
-
*/
|
|
472
|
-
declare class PGliteWorkerClient {
|
|
473
|
-
private worker;
|
|
474
|
-
private pending;
|
|
475
|
-
private readyPromise;
|
|
476
|
-
private resolveReady;
|
|
477
|
-
constructor(worker: Worker);
|
|
478
|
-
/** Resolves when the worker broadcasts READY after database initialisation. */
|
|
479
|
-
waitReady(): Promise<void>;
|
|
480
|
-
private send;
|
|
481
|
-
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<{
|
|
482
|
-
rows: T[];
|
|
483
|
-
fields?: Array<{
|
|
484
|
-
name: string;
|
|
485
|
-
dataTypeID: number;
|
|
486
|
-
}>;
|
|
487
|
-
}>;
|
|
488
|
-
exec(sql: string): Promise<void>;
|
|
489
|
-
transaction<T>(fn: (tx: TransactionProxy) => Promise<T>): Promise<T>;
|
|
490
|
-
/** Forward TX_QUERY for TransactionProxy — not part of the public surface. */
|
|
491
|
-
_txQuery<T>(txId: string, sql: string, params?: unknown[]): Promise<{
|
|
492
|
-
rows: T[];
|
|
493
|
-
}>;
|
|
494
|
-
/** Forward TX_EXEC for TransactionProxy — not part of the public surface. */
|
|
495
|
-
_txExec(txId: string, sql: string): Promise<void>;
|
|
496
|
-
ping(): Promise<void>;
|
|
497
|
-
close(): Promise<void>;
|
|
498
|
-
}
|
|
499
|
-
/** Proxy passed to the transaction callback — scopes queries to the active txId. */
|
|
500
|
-
declare class TransactionProxy {
|
|
501
|
-
private client;
|
|
502
|
-
private txId;
|
|
503
|
-
constructor(client: PGliteWorkerClient, txId: string);
|
|
504
|
-
query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<{
|
|
505
|
-
rows: T[];
|
|
506
|
-
}>;
|
|
507
|
-
exec(sql: string): Promise<void>;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
542
|
/**
|
|
511
543
|
* EmbeddingSetsRepository - named, filter, and virtual embedding set API.
|
|
512
544
|
*/
|
|
@@ -1177,6 +1209,7 @@ declare class JobQueueWorker {
|
|
|
1177
1209
|
processOnce(): Promise<number>;
|
|
1178
1210
|
private poll;
|
|
1179
1211
|
private processPendingJobs;
|
|
1212
|
+
private blockForCapability;
|
|
1180
1213
|
getBackoffDelay(retryCount: number): number;
|
|
1181
1214
|
}
|
|
1182
1215
|
/** Title generation: LLM first, fallback to first-line extraction */
|
|
@@ -2335,6 +2368,50 @@ declare class FallbackRouter implements InferenceProvider {
|
|
|
2335
2368
|
private applyCooldown;
|
|
2336
2369
|
}
|
|
2337
2370
|
|
|
2371
|
+
interface FortemiBridgeCapabilities {
|
|
2372
|
+
secureSecrets: boolean;
|
|
2373
|
+
providerRouting: boolean;
|
|
2374
|
+
localNetworkAccess: boolean;
|
|
2375
|
+
auditLog: boolean;
|
|
2376
|
+
}
|
|
2377
|
+
interface FortemiSecretStore {
|
|
2378
|
+
isAvailable(): boolean | Promise<boolean>;
|
|
2379
|
+
getSecret(key: string): Promise<string | null>;
|
|
2380
|
+
setSecret(key: string, value: string): Promise<void>;
|
|
2381
|
+
deleteSecret(key: string): Promise<void>;
|
|
2382
|
+
}
|
|
2383
|
+
interface BridgeProviderInfo {
|
|
2384
|
+
id: string;
|
|
2385
|
+
name: string;
|
|
2386
|
+
tier: 'remote' | 'local-server' | 'in-browser' | 'chrome-ai';
|
|
2387
|
+
requiresApiKey: boolean;
|
|
2388
|
+
capabilities: {
|
|
2389
|
+
chat?: boolean;
|
|
2390
|
+
embeddings?: boolean;
|
|
2391
|
+
streaming?: boolean;
|
|
2392
|
+
};
|
|
2393
|
+
}
|
|
2394
|
+
interface FortemiInferenceRouter {
|
|
2395
|
+
listProviders(): Promise<BridgeProviderInfo[]>;
|
|
2396
|
+
probeProvider(providerId: string): Promise<ProbeResult>;
|
|
2397
|
+
complete(providerId: string, request: CompletionRequest): Promise<CompletionResponse>;
|
|
2398
|
+
embed(providerId: string, request: EmbedRequest): Promise<EmbedResponse>;
|
|
2399
|
+
stream?(providerId: string, request: CompletionRequest): AsyncIterable<StreamChunk>;
|
|
2400
|
+
}
|
|
2401
|
+
interface FortemiBridge {
|
|
2402
|
+
version: string;
|
|
2403
|
+
capabilities(): Promise<FortemiBridgeCapabilities>;
|
|
2404
|
+
secrets: FortemiSecretStore;
|
|
2405
|
+
inference?: FortemiInferenceRouter;
|
|
2406
|
+
}
|
|
2407
|
+
interface FortemiBridgeHost {
|
|
2408
|
+
fortemiBridge?: FortemiBridge;
|
|
2409
|
+
fortemiSecureStorage?: FortemiSecretStore;
|
|
2410
|
+
}
|
|
2411
|
+
declare function getFortemiBridge(host?: FortemiBridgeHost | undefined): FortemiBridge | null;
|
|
2412
|
+
declare function getFortemiSecretStore(host?: FortemiBridgeHost | undefined): FortemiSecretStore | null;
|
|
2413
|
+
declare function hasFortemiSecureSecrets(host?: FortemiBridgeHost | undefined): Promise<boolean>;
|
|
2414
|
+
|
|
2338
2415
|
type CspDirectiveName = 'default-src' | 'base-uri' | 'object-src' | 'frame-ancestors' | 'img-src' | 'font-src' | 'style-src' | 'script-src' | 'connect-src' | 'worker-src' | 'manifest-src' | 'report-uri';
|
|
2339
2416
|
type CspDirectives = Partial<Record<CspDirectiveName, string[]>>;
|
|
2340
2417
|
interface PluginCspOptions {
|
|
@@ -2410,12 +2487,24 @@ interface ExportOptions {
|
|
|
2410
2487
|
collectionId?: string;
|
|
2411
2488
|
/** Filter to notes with this tag (e.g. 'app:research' for app-scoped export). */
|
|
2412
2489
|
tag?: string;
|
|
2490
|
+
/** Export only these embedding sets and their member/vector rows. */
|
|
2491
|
+
embeddingSetIds?: string[];
|
|
2413
2492
|
}
|
|
2414
2493
|
/** Conflict resolution strategy for shard import. */
|
|
2415
2494
|
type ConflictStrategy = 'skip' | 'replace' | 'error';
|
|
2416
2495
|
/** Options for shard import. */
|
|
2417
2496
|
interface ImportOptions {
|
|
2418
2497
|
conflictStrategy?: ConflictStrategy;
|
|
2498
|
+
/** Rows processed between cooperative yields. Defaults to 250. */
|
|
2499
|
+
batchSize?: number;
|
|
2500
|
+
/** Progress callback for long-running import phases. */
|
|
2501
|
+
onProgress?: (progress: ImportProgress) => void;
|
|
2502
|
+
}
|
|
2503
|
+
type ImportProgressPhase = 'unpack' | 'validate' | 'collections' | 'notes' | 'skos' | 'links' | 'provenance' | 'embedding_sets' | 'embeddings' | 'embedding_set_members' | 'graph' | 'communities' | 'index';
|
|
2504
|
+
interface ImportProgress {
|
|
2505
|
+
phase: ImportProgressPhase;
|
|
2506
|
+
done: number;
|
|
2507
|
+
total: number;
|
|
2419
2508
|
}
|
|
2420
2509
|
/** Per-entity import counts. */
|
|
2421
2510
|
interface ImportCounts {
|
|
@@ -2808,6 +2897,113 @@ declare function exportShard(db: DatabaseClient, options?: ExportOptions): Promi
|
|
|
2808
2897
|
*/
|
|
2809
2898
|
declare function importShard(db: DatabaseClient, data: Uint8Array | ArrayBuffer, options?: ImportOptions): Promise<ImportResult>;
|
|
2810
2899
|
|
|
2811
|
-
|
|
2900
|
+
type AiwgFortemiRecordType = 'crm.contact' | 'crm.organization' | 'crm.event' | 'crm.interaction' | 'aiwg.artifact';
|
|
2901
|
+
type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public';
|
|
2902
|
+
type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected';
|
|
2903
|
+
type AiwgReviewAction = 'accept' | 'reject' | 'defer';
|
|
2904
|
+
interface AiwgFortemiRecordSource {
|
|
2905
|
+
path: string;
|
|
2906
|
+
repo_relative_path: string;
|
|
2907
|
+
locator: string;
|
|
2908
|
+
}
|
|
2909
|
+
interface AiwgFortemiRelationship {
|
|
2910
|
+
type: string;
|
|
2911
|
+
target_id: string;
|
|
2912
|
+
source_path?: string;
|
|
2913
|
+
}
|
|
2914
|
+
interface AiwgFortemiProvenance {
|
|
2915
|
+
field: string;
|
|
2916
|
+
source: string;
|
|
2917
|
+
path: string;
|
|
2918
|
+
confidence: AiwgProvenanceConfidence;
|
|
2919
|
+
privacy: AiwgPrivacyClassification;
|
|
2920
|
+
}
|
|
2921
|
+
interface AiwgFortemiRecord {
|
|
2922
|
+
schema_version: 'aiwg.fortemi.index.record.v1';
|
|
2923
|
+
id: string;
|
|
2924
|
+
type: AiwgFortemiRecordType;
|
|
2925
|
+
source: AiwgFortemiRecordSource;
|
|
2926
|
+
title: string;
|
|
2927
|
+
text: string;
|
|
2928
|
+
facets: Record<string, string[]>;
|
|
2929
|
+
tags: string[];
|
|
2930
|
+
concepts: string[];
|
|
2931
|
+
relationships: AiwgFortemiRelationship[];
|
|
2932
|
+
provenance: AiwgFortemiProvenance[];
|
|
2933
|
+
privacy: {
|
|
2934
|
+
classification: AiwgPrivacyClassification;
|
|
2935
|
+
pii: boolean;
|
|
2936
|
+
};
|
|
2937
|
+
updated_at: string;
|
|
2938
|
+
}
|
|
2939
|
+
interface AiwgFortemiIndexExport {
|
|
2940
|
+
schema_version: 'aiwg.fortemi.index.export.v1';
|
|
2941
|
+
generated_at: string;
|
|
2942
|
+
source: {
|
|
2943
|
+
repo: string;
|
|
2944
|
+
privacy: AiwgPrivacyClassification;
|
|
2945
|
+
};
|
|
2946
|
+
items: AiwgFortemiRecord[];
|
|
2947
|
+
}
|
|
2948
|
+
interface AiwgIndexValidationResult {
|
|
2949
|
+
valid: boolean;
|
|
2950
|
+
errors: string[];
|
|
2951
|
+
counts: Partial<Record<AiwgFortemiRecordType, number>>;
|
|
2952
|
+
}
|
|
2953
|
+
interface AiwgIndexQueryOptions {
|
|
2954
|
+
types?: AiwgFortemiRecordType[];
|
|
2955
|
+
facets?: Record<string, string[]>;
|
|
2956
|
+
tags?: string[];
|
|
2957
|
+
concepts?: string[];
|
|
2958
|
+
privacy?: AiwgPrivacyClassification[];
|
|
2959
|
+
relationshipTargetId?: string;
|
|
2960
|
+
limit?: number;
|
|
2961
|
+
offset?: number;
|
|
2962
|
+
}
|
|
2963
|
+
interface AiwgIndexQueryResult {
|
|
2964
|
+
items: AiwgFortemiRecord[];
|
|
2965
|
+
total: number;
|
|
2966
|
+
facets: Record<string, Record<string, number>>;
|
|
2967
|
+
}
|
|
2968
|
+
interface AiwgReviewDecision {
|
|
2969
|
+
item_id: string;
|
|
2970
|
+
action: AiwgReviewAction;
|
|
2971
|
+
reason?: string;
|
|
2972
|
+
updated_at: string;
|
|
2973
|
+
}
|
|
2974
|
+
interface AiwgReviewDecisionExport {
|
|
2975
|
+
schema_version: 'aiwg.fortemi.review-decisions.v1';
|
|
2976
|
+
generated_at: string;
|
|
2977
|
+
source_export_schema_version: string;
|
|
2978
|
+
decisions: AiwgReviewDecision[];
|
|
2979
|
+
}
|
|
2980
|
+
interface AiwgIndexGraphOptions {
|
|
2981
|
+
communityFacet?: string;
|
|
2982
|
+
communityTagPrefix?: string;
|
|
2983
|
+
relationshipWeights?: Record<string, number>;
|
|
2984
|
+
includeDanglingRelationships?: boolean;
|
|
2985
|
+
}
|
|
2986
|
+
declare function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult;
|
|
2987
|
+
declare function assertAiwgFortemiIndexExport(value: unknown): AiwgFortemiIndexExport;
|
|
2988
|
+
declare function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>>;
|
|
2989
|
+
declare function queryAiwgFortemiIndex(index: AiwgFortemiIndexExport, query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
|
|
2990
|
+
declare function createAiwgReviewDecisionExport(source: AiwgFortemiIndexExport, decisions: AiwgReviewDecision[], generatedAt?: string): AiwgReviewDecisionExport;
|
|
2991
|
+
declare function aiwgFortemiIndexToCommunityGraph(index: AiwgFortemiIndexExport, options?: AiwgIndexGraphOptions): {
|
|
2992
|
+
nodes: {
|
|
2993
|
+
id: string;
|
|
2994
|
+
}[];
|
|
2995
|
+
edges: {
|
|
2996
|
+
source: string;
|
|
2997
|
+
target: string;
|
|
2998
|
+
kind: string;
|
|
2999
|
+
weight: number;
|
|
3000
|
+
}[];
|
|
3001
|
+
communities: {
|
|
3002
|
+
id: string;
|
|
3003
|
+
nodes: string[];
|
|
3004
|
+
}[];
|
|
3005
|
+
};
|
|
3006
|
+
|
|
3007
|
+
declare const VERSION = "2026.6.1";
|
|
2812
3008
|
|
|
2813
|
-
export { type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BlobStore, type BridgeCapability, type BrowserNoteExport, CURRENT_SHARD_VERSION, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type ConflictStrategy, type CooldownConfig, type CooldownEvent, type CspDirectiveName, type CspDirectives, type CspViolationReport, type DatabaseClient, type DiscoveredProvider, type DiscoveryOptions, type EmbedFunction, type EmbedRequest, type EmbedResponse, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, type ExportOptions, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FortemiConfig, type FortemiCore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, type ImportCounts, type ImportOptions, type ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, MemoryBlobStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type ProbeResult, type ProbeStatus, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RouteHandler, SHARD_FORMAT, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardCollection, type ShardComponent, type ShardEmbedding, type ShardEmbeddingSet, type ShardEmbeddingSetMember, type ShardLink, type ShardManifest, type ShardNote, type ShardNoteSkosTag, type ShardProvenanceEdge, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, allMigrations, appendPluginScript, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, collectionFromShard, collectionToShard, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createBlobStore, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteInstance, createRoutes, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchPluginScript, fortemiManifest, generateId, getEmbedFunction, getJobQueueStatus, getLlmFunction, getNote, importShard, isPluginScriptAllowed, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, packTarGz, parseCspReport, provenanceEdgeToShard, registerLlmCapability, registerSemanticCapability, registerServiceWorker, searchTool, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsFromShard, tagsToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, validateChecksums, verifySri };
|
|
3009
|
+
export { type AiwgFortemiIndexExport, type AiwgFortemiProvenance, type AiwgFortemiRecord, type AiwgFortemiRecordSource, type AiwgFortemiRecordType, type AiwgFortemiRelationship, type AiwgIndexGraphOptions, type AiwgIndexQueryOptions, type AiwgIndexQueryResult, type AiwgIndexValidationResult, type AiwgPrivacyClassification, type AiwgProvenanceConfidence, type AiwgReviewAction, type AiwgReviewDecision, type AiwgReviewDecisionExport, type ArchiveInfo, ArchiveManager, type AttachInput, type AttachmentBlobRow, type AttachmentRow, AttachmentsRepository, type BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, CURRENT_SHARD_VERSION, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type ConflictStrategy, type CooldownConfig, type CooldownEvent, type CspDirectiveName, type CspDirectives, type CspViolationReport, type DatabaseClient, type DiscoveredProvider, type DiscoveryOptions, type EmbedFunction, type EmbedRequest, type EmbedResponse, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, type ExportOptions, type FallbackEvent, FallbackRouter, type FallbackRouterConfig, type FortemiBridge, type FortemiBridgeCapabilities, type FortemiBridgeHost, type FortemiConfig, type FortemiCore, type FortemiInferenceRouter, type FortemiSecretStore, type FortemiToolDefinition, FortemiToolManifest, type GetNoteInput, GetNoteInputSchema, type GpuCapabilities, type GraphCommunity, type GraphEdge, type GraphNode, GraphRepository, type IDisposable, type ImportCounts, type ImportOptions, type ImportProgress, type ImportProgressPhase, type ImportResult, type InferenceCapabilities, type InferenceProvider, JOB_CAPABILITIES, JOB_PRIORITIES, type JobQueueOptions, JobQueueWorker, type JobStatus, type JobType, LOCAL_ENDPOINTS, type LinkRow, LinksRepository, type ListNotesInput, ListNotesInputSchema, type LlmCapabilityOptions, type LlmCompleteFn, type LoadedPluginScript, type LocalEndpoint, type ManageArchiveInput, ManageArchiveInputSchema, type ManageArchiveResult, type ManageAttachmentsInput, ManageAttachmentsInputSchema, type ManageAttachmentsResult, type ManageCapabilitiesInput, ManageCapabilitiesInputSchema, type ManageCapabilitiesResult, type ManageCollectionsInput, ManageCollectionsInputSchema, type ManageCollectionsResult, type ManageLinksInput, ManageLinksInputSchema, type ManageLinksResult, type ManageNoteInput, ManageNoteInputSchema, type ManageNoteResult, type ManageTagsInput, ManageTagsInputSchema, type ManageTagsResult, MemoryBlobStore, type Migration, MigrationRunner, type ModelCategory, type ModelFitResult, type ModelInfo, type NoteCreateInput, type NoteFull, type NoteListOptions, type NoteRevision, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, type PGliteWorkerStorageBackendFactoryOptions, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type ProbeResult, type ProbeStatus, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RouteHandler, SHARD_FORMAT, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardCollection, type ShardComponent, type ShardEmbedding, type ShardEmbeddingSet, type ShardEmbeddingSetMember, type ShardLink, type ShardManifest, type ShardNote, type ShardNoteSkosTag, type ShardProvenanceEdge, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, type SimilarityGraphCacheKey, type SimilarityGraphOptions, type SimilarityGraphRequest, type SimilarityGraphResult, type SkosConcept, type SkosRelation, SkosRepository, type SkosScheme, type StorageBackend, type StorageBackendFactory, type StorageOpenRequest, type StorageTopology, type StreamChunk, TagsRepository, TransactionProxy, TypedEventBus, VERSION, type VirtualEmbeddingSetDefinition, type VirtualEmbeddingSetSource, type VirtualEmbeddingSetValidationError, type VirtualMaterializationPolicy, type VramTier, type WorkerRequest, type WorkerResponse, aiRevisionHandler, aiwgFortemiIndexToCommunityGraph, allMigrations, appendPluginScript, assertAiwgFortemiIndexExport, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, collectionFromShard, collectionToShard, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createAiwgReviewDecisionExport, createBlobStore, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteInstance, createRoutes, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchPluginScript, fortemiManifest, generateId, getAiwgFortemiFacets, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getLlmFunction, getNote, hasFortemiSecureSecrets, importShard, isPluginScriptAllowed, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, packTarGz, parseCspReport, provenanceEdgeToShard, queryAiwgFortemiIndex, registerLlmCapability, registerSemanticCapability, registerServiceWorker, searchTool, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsFromShard, tagsToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, validateAiwgFortemiIndexExport, validateChecksums, verifySri };
|