@fortemi/core 2026.6.7 → 2026.6.8
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 +19 -0
- package/dist/aiwg-index.d.ts +41 -1
- package/dist/aiwg-index.js +56 -0
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +25 -25
- package/dist/index.js +57 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PGlite } from '@electric-sql/pglite';
|
|
2
2
|
import { z, ZodType } from 'zod';
|
|
3
|
-
export { AIWG_SCAN_REQUIRED_FIELDS, AiwgChunkedIndexBuildOptions, AiwgChunkedIndexBuildResult, AiwgChunkedIndexDetailLoader, AiwgChunkedIndexLoadOptions, AiwgChunkedIndexLoader, AiwgChunkedIndexProgress, AiwgChunkedIndexProgressPhase, AiwgChunkedIndexQueryOptions, AiwgChunkedIndexQueryResult, AiwgChunkedIndexValidationResult, AiwgFortemiChunkDetailRef, AiwgFortemiChunkManifest, AiwgFortemiChunkPart, AiwgFortemiChunkPartRef, AiwgFortemiIndexExport, AiwgFortemiProjectedRecord, AiwgFortemiProvenance, AiwgFortemiRecord, AiwgFortemiRecordSource, AiwgFortemiRecordType, AiwgFortemiRelationship, AiwgIndexController, AiwgIndexControllerListener, AiwgIndexControllerSnapshot, AiwgIndexGraphOptions, AiwgIndexQueryMatch, AiwgIndexQueryOptions, AiwgIndexQueryRankedItem, AiwgIndexQueryResult, AiwgIndexQueryWeights, AiwgIndexValidationResult, AiwgPrivacyClassification, AiwgProvenanceConfidence, AiwgReviewAction, AiwgReviewDecision, AiwgReviewDecisionExport, AiwgReviewInput, aiwgFortemiIndexToCommunityGraph, assertAiwgFortemiChunkManifest, assertAiwgFortemiChunkPart, assertAiwgFortemiIndexExport, buildAiwgChunkedIndex, createAiwgFetchChunkLoader, createAiwgFetchDetailLoader, createAiwgIndexController, createAiwgReviewDecisionExport, getAiwgFortemiFacets, queryAiwgFortemiIndex, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport } from './aiwg-index.js';
|
|
3
|
+
export { AIWG_SCAN_REQUIRED_FIELDS, AiwgChunkedIndexBuildOptions, AiwgChunkedIndexBuildResult, AiwgChunkedIndexDetailLoader, AiwgChunkedIndexLoadOptions, AiwgChunkedIndexLoader, AiwgChunkedIndexProgress, AiwgChunkedIndexProgressPhase, AiwgChunkedIndexQueryOptions, AiwgChunkedIndexQueryResult, AiwgChunkedIndexValidationResult, AiwgFortemiChunkDetailRef, AiwgFortemiChunkManifest, AiwgFortemiChunkPart, AiwgFortemiChunkPartRef, AiwgFortemiIndexExport, AiwgFortemiProjectedRecord, AiwgFortemiProvenance, AiwgFortemiProvenanceEvent, AiwgFortemiRecord, AiwgFortemiRecordSource, AiwgFortemiRecordType, AiwgFortemiRelationship, AiwgFortemiSkosConcept, AiwgFortemiSkosRelation, AiwgFortemiSkosRelationType, AiwgIndexController, AiwgIndexControllerListener, AiwgIndexControllerSnapshot, AiwgIndexGraphOptions, AiwgIndexQueryMatch, AiwgIndexQueryOptions, AiwgIndexQueryRankedItem, AiwgIndexQueryResult, AiwgIndexQueryWeights, AiwgIndexValidationResult, AiwgPrivacyClassification, AiwgProvenanceConfidence, AiwgReviewAction, AiwgReviewDecision, AiwgReviewDecisionExport, AiwgReviewInput, aiwgFortemiIndexToCommunityGraph, assertAiwgFortemiChunkManifest, assertAiwgFortemiChunkPart, assertAiwgFortemiIndexExport, buildAiwgChunkedIndex, createAiwgFetchChunkLoader, createAiwgFetchDetailLoader, createAiwgIndexController, createAiwgReviewDecisionExport, getAiwgFortemiFacets, queryAiwgFortemiIndex, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport } from './aiwg-index.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Generate a RFC 9562 UUIDv7 identifier.
|
|
@@ -2364,19 +2364,19 @@ declare const CaptureKnowledgeInputSchema: z.ZodObject<{
|
|
|
2364
2364
|
}, {
|
|
2365
2365
|
content: string;
|
|
2366
2366
|
title?: string | undefined;
|
|
2367
|
-
format?: "markdown" | "plain" | "html" | undefined;
|
|
2368
2367
|
tags?: string[] | undefined;
|
|
2368
|
+
format?: "markdown" | "plain" | "html" | undefined;
|
|
2369
2369
|
}>, "many">>;
|
|
2370
2370
|
template: z.ZodOptional<z.ZodString>;
|
|
2371
2371
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2372
2372
|
}, "strip", z.ZodTypeAny, {
|
|
2373
2373
|
source: string;
|
|
2374
2374
|
format: "markdown" | "plain" | "html";
|
|
2375
|
-
visibility: "private" | "
|
|
2375
|
+
visibility: "private" | "public" | "shared";
|
|
2376
2376
|
action: "create" | "bulk_create" | "from_template";
|
|
2377
2377
|
title?: string | undefined;
|
|
2378
|
-
archive_id?: string | undefined;
|
|
2379
2378
|
tags?: string[] | undefined;
|
|
2379
|
+
archive_id?: string | undefined;
|
|
2380
2380
|
content?: string | undefined;
|
|
2381
2381
|
notes?: {
|
|
2382
2382
|
format: "markdown" | "plain" | "html";
|
|
@@ -2390,16 +2390,16 @@ declare const CaptureKnowledgeInputSchema: z.ZodObject<{
|
|
|
2390
2390
|
action: "create" | "bulk_create" | "from_template";
|
|
2391
2391
|
source?: string | undefined;
|
|
2392
2392
|
title?: string | undefined;
|
|
2393
|
+
tags?: string[] | undefined;
|
|
2393
2394
|
archive_id?: string | undefined;
|
|
2394
2395
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2395
|
-
visibility?: "private" | "
|
|
2396
|
-
tags?: string[] | undefined;
|
|
2396
|
+
visibility?: "private" | "public" | "shared" | undefined;
|
|
2397
2397
|
content?: string | undefined;
|
|
2398
2398
|
notes?: {
|
|
2399
2399
|
content: string;
|
|
2400
2400
|
title?: string | undefined;
|
|
2401
|
-
format?: "markdown" | "plain" | "html" | undefined;
|
|
2402
2401
|
tags?: string[] | undefined;
|
|
2402
|
+
format?: "markdown" | "plain" | "html" | undefined;
|
|
2403
2403
|
}[] | undefined;
|
|
2404
2404
|
template?: string | undefined;
|
|
2405
2405
|
variables?: Record<string, string> | undefined;
|
|
@@ -2444,30 +2444,30 @@ declare const SearchInputSchema: z.ZodObject<{
|
|
|
2444
2444
|
visibility: z.ZodOptional<z.ZodEnum<["private", "shared", "public"]>>;
|
|
2445
2445
|
include_facets: z.ZodDefault<z.ZodBoolean>;
|
|
2446
2446
|
}, "strip", z.ZodTypeAny, {
|
|
2447
|
-
|
|
2447
|
+
query: string;
|
|
2448
2448
|
offset: number;
|
|
2449
|
+
limit: number;
|
|
2449
2450
|
include_facets: boolean;
|
|
2450
2451
|
mode: "text" | "semantic" | "hybrid";
|
|
2451
|
-
query: string;
|
|
2452
2452
|
source?: string | undefined;
|
|
2453
|
+
tags?: string[] | undefined;
|
|
2453
2454
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2454
|
-
visibility?: "private" | "
|
|
2455
|
+
visibility?: "private" | "public" | "shared" | undefined;
|
|
2455
2456
|
is_starred?: boolean | undefined;
|
|
2456
2457
|
is_archived?: boolean | undefined;
|
|
2457
|
-
tags?: string[] | undefined;
|
|
2458
2458
|
collection_id?: string | undefined;
|
|
2459
2459
|
date_from?: Date | undefined;
|
|
2460
2460
|
date_to?: Date | undefined;
|
|
2461
2461
|
}, {
|
|
2462
2462
|
query: string;
|
|
2463
2463
|
source?: string | undefined;
|
|
2464
|
+
tags?: string[] | undefined;
|
|
2465
|
+
offset?: number | undefined;
|
|
2464
2466
|
format?: "markdown" | "plain" | "html" | undefined;
|
|
2465
|
-
visibility?: "private" | "
|
|
2467
|
+
visibility?: "private" | "public" | "shared" | undefined;
|
|
2466
2468
|
is_starred?: boolean | undefined;
|
|
2467
2469
|
is_archived?: boolean | undefined;
|
|
2468
|
-
tags?: string[] | undefined;
|
|
2469
2470
|
limit?: number | undefined;
|
|
2470
|
-
offset?: number | undefined;
|
|
2471
2471
|
collection_id?: string | undefined;
|
|
2472
2472
|
date_from?: Date | undefined;
|
|
2473
2473
|
date_to?: Date | undefined;
|
|
@@ -2550,22 +2550,22 @@ declare const ListNotesInputSchema: z.ZodObject<{
|
|
|
2550
2550
|
collection_id: z.ZodOptional<z.ZodString>;
|
|
2551
2551
|
include_deleted: z.ZodOptional<z.ZodBoolean>;
|
|
2552
2552
|
}, "strip", z.ZodTypeAny, {
|
|
2553
|
-
sort: "
|
|
2554
|
-
limit: number;
|
|
2553
|
+
sort: "title" | "updated_at" | "created_at";
|
|
2555
2554
|
offset: number;
|
|
2555
|
+
limit: number;
|
|
2556
2556
|
order: "asc" | "desc";
|
|
2557
|
+
tags?: string[] | undefined;
|
|
2557
2558
|
is_starred?: boolean | undefined;
|
|
2558
2559
|
is_archived?: boolean | undefined;
|
|
2559
|
-
tags?: string[] | undefined;
|
|
2560
2560
|
include_deleted?: boolean | undefined;
|
|
2561
2561
|
collection_id?: string | undefined;
|
|
2562
2562
|
}, {
|
|
2563
|
-
|
|
2563
|
+
tags?: string[] | undefined;
|
|
2564
|
+
sort?: "title" | "updated_at" | "created_at" | undefined;
|
|
2565
|
+
offset?: number | undefined;
|
|
2564
2566
|
is_starred?: boolean | undefined;
|
|
2565
2567
|
is_archived?: boolean | undefined;
|
|
2566
|
-
tags?: string[] | undefined;
|
|
2567
2568
|
limit?: number | undefined;
|
|
2568
|
-
offset?: number | undefined;
|
|
2569
2569
|
order?: "asc" | "desc" | undefined;
|
|
2570
2570
|
include_deleted?: boolean | undefined;
|
|
2571
2571
|
collection_id?: string | undefined;
|
|
@@ -2579,12 +2579,12 @@ declare const ManageTagsInputSchema: z.ZodObject<{
|
|
|
2579
2579
|
tag: z.ZodOptional<z.ZodString>;
|
|
2580
2580
|
}, "strip", z.ZodTypeAny, {
|
|
2581
2581
|
action: "add" | "remove" | "list_for_note" | "list_all";
|
|
2582
|
-
note_id?: string | undefined;
|
|
2583
2582
|
tag?: string | undefined;
|
|
2583
|
+
note_id?: string | undefined;
|
|
2584
2584
|
}, {
|
|
2585
2585
|
action: "add" | "remove" | "list_for_note" | "list_all";
|
|
2586
|
-
note_id?: string | undefined;
|
|
2587
2586
|
tag?: string | undefined;
|
|
2587
|
+
note_id?: string | undefined;
|
|
2588
2588
|
}>;
|
|
2589
2589
|
type ManageTagsInput = z.infer<typeof ManageTagsInputSchema>;
|
|
2590
2590
|
interface ManageTagsResult {
|
|
@@ -2606,16 +2606,16 @@ declare const ManageCollectionsInputSchema: z.ZodObject<{
|
|
|
2606
2606
|
note_id: z.ZodOptional<z.ZodString>;
|
|
2607
2607
|
}, "strip", z.ZodTypeAny, {
|
|
2608
2608
|
action: "create" | "delete" | "list" | "assign" | "unassign" | "list_tree";
|
|
2609
|
+
name?: string | undefined;
|
|
2609
2610
|
collection_id?: string | undefined;
|
|
2610
2611
|
note_id?: string | undefined;
|
|
2611
|
-
name?: string | undefined;
|
|
2612
2612
|
description?: string | undefined;
|
|
2613
2613
|
parent_id?: string | undefined;
|
|
2614
2614
|
}, {
|
|
2615
2615
|
action: "create" | "delete" | "list" | "assign" | "unassign" | "list_tree";
|
|
2616
|
+
name?: string | undefined;
|
|
2616
2617
|
collection_id?: string | undefined;
|
|
2617
2618
|
note_id?: string | undefined;
|
|
2618
|
-
name?: string | undefined;
|
|
2619
2619
|
description?: string | undefined;
|
|
2620
2620
|
parent_id?: string | undefined;
|
|
2621
2621
|
}>;
|
|
@@ -3777,6 +3777,6 @@ declare function getPrefetchedSha256(url: string): string | undefined;
|
|
|
3777
3777
|
*/
|
|
3778
3778
|
declare function clearPrefetchedShard(url?: string): void;
|
|
3779
3779
|
|
|
3780
|
-
declare const VERSION = "2026.6.
|
|
3780
|
+
declare const VERSION = "2026.6.8";
|
|
3781
3781
|
|
|
3782
3782
|
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, type BlobStore, type BridgeCapability, type BridgeProviderInfo, type BrowserNoteExport, CURRENT_MIGRATION_HEAD, CURRENT_SHARD_VERSION, type CapabilityInfo, CapabilityManager, type CapabilityName, type CapabilityState, type CaptureKnowledgeInput, CaptureKnowledgeInputSchema, type CaptureKnowledgeResult, type CollectionCreateInput, type CollectionRow, CollectionsRepository, CommunitiesRepository, type CommunityAssignmentView, type CommunityCreateInput, type CommunityFilterDefinition, type CommunityGraph, type CommunityOptions, type CommunitySourceDescriptor, type CommunitySourceType, type CommunitySummary, type CompletionRequest, type CompletionResponse, type ConditionResult, type ConflictStrategy, type CooldownConfig, type CooldownEvent, type CosineSemanticProviderOptions, type CreatePGliteOptions, type CspDirectiveName, type CspDirectives, type CspViolationReport, DB_SNAPSHOT_SCHEMA_VERSION, type DataBackend, type DatabaseClient, type DbSnapshot, type DbSnapshotCompat, type DbSnapshotCompression, type DbSnapshotExpectations, type DbSnapshotMeta, type DbSnapshotSource, DbSnapshotVersionError, type DiscoveredProvider, type DiscoveryOptions, type DumpDbSnapshotOptions, type DumpableDb, EMBED_REQUEST_KIND, EMBED_RESPONSE_KIND, type EmbedFunction, type EmbedRequest, type EmbedRequestMessage, type EmbedResponse, type EmbedResponseMessage, type EmbedTransportPort, type EmbedWorkerOptions, type EmbeddingCompatibilityPolicy, type EmbeddingSetCreateInput, type EmbeddingSetCriteria, type EmbeddingSetDescriptor, type EmbeddingSetEmbeddingInput, type EmbeddingSetFreshness, type EmbeddingSetKind, type EmbeddingSetMode, type EmbeddingSetRow, type EmbeddingSetSelector, EmbeddingSetsRepository, type EnqueueJobInput, type ErrorCategory, type EventMap, type ExportOptions, 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 NoteSkosTag, type NoteSummary, type NoteUpdateInput, NotesRepository, OpenAICompatibleProvider, type OpenAIProviderConfig, type OpenShardOptions, type PGliteBackendOptions, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, type PGliteWorkerStorageBackendFactoryOptions, type PaginatedResult, type PersistenceMode, type PluginCspOptions, type PluginScriptDescriptor, type PluginScriptPolicy, type PrefetchOptions, type PrefetchResult, type ProbeResult, type ProbeStatus, type ProvenanceEdge, ProvenanceRepository, type ProviderCapabilities, ProviderRegistry, type ProviderTier, type QueryExecutor, type QueryResult, type RecommendedTier, type RecordProvenanceInput, type RemoteBackendConfig, type RemoteBackendPaths, type ResolvedEmbeddingRow, type ResolvedEmbeddingSet, type RestoreDbSnapshotOptions, type RouteHandler, SHARD_FORMAT, SUPPORTED_PGLITE_VERSION, type SWRegistrationResult, type SearchFacets, type SearchInput, SearchInputSchema, type SearchOptions, SearchRepository, type SearchResponse, type SearchResult, type ShardBackendOptions, type ShardClusterRef, type ShardCollection, type ShardComponent, type ShardComponentStore, type ShardEmbedding, type ShardEmbeddingSet, type ShardEmbeddingSetMember, type ShardLayout, type ShardLink, type ShardListOptions, type ShardManifest, type ShardNote, type ShardNoteFull, type ShardNoteSkosTag, type ShardProvenanceEdge, type ShardReader, type ShardReaderNote, type ShardReaderSource, type ShardSearchOptions, type ShardSearchRankedNote, type ShardSearchResult, type ShardSearchWeights, type ShardSkosConcept, type ShardSkosRelation, type ShardSkosScheme, type ShardTag, 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, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createBlobStore, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRemoteBackend, createRoutes, createShardBackend, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dumpDbSnapshot, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchPluginScript, fortemiManifest, fromPrefetched, generateId, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, 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, tagsFromShard, tagsToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, validateChecksums, verifyDbSnapshotMeta, verifySri };
|
package/dist/index.js
CHANGED
|
@@ -8129,6 +8129,61 @@ function isFacetCounts(value) {
|
|
|
8129
8129
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
8130
8130
|
return Object.values(value).every((counts) => !!counts && typeof counts === "object" && !Array.isArray(counts) && Object.values(counts).every((count) => hasNonNegativeInteger(count)));
|
|
8131
8131
|
}
|
|
8132
|
+
function isPlainRecord(value) {
|
|
8133
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
8134
|
+
}
|
|
8135
|
+
function isOptionalStringArray(value) {
|
|
8136
|
+
return value === void 0 || Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
8137
|
+
}
|
|
8138
|
+
function validateOptionalRichMetadata(item, index, errors) {
|
|
8139
|
+
if (item.skos_concepts !== void 0) {
|
|
8140
|
+
if (!Array.isArray(item.skos_concepts)) {
|
|
8141
|
+
errors.push("items[" + index + "].skos_concepts must be an array when present");
|
|
8142
|
+
} else {
|
|
8143
|
+
for (const [conceptIndex, concept] of item.skos_concepts.entries()) {
|
|
8144
|
+
if (!hasString(concept.id)) errors.push("items[" + index + "].skos_concepts[" + conceptIndex + "].id is required");
|
|
8145
|
+
if (!hasString(concept.prefLabel)) errors.push("items[" + index + "].skos_concepts[" + conceptIndex + "].prefLabel is required");
|
|
8146
|
+
if (!isOptionalStringArray(concept.altLabels)) errors.push("items[" + index + "].skos_concepts[" + conceptIndex + "].altLabels must be a string array");
|
|
8147
|
+
if (concept.metadata !== void 0 && !isPlainRecord(concept.metadata)) {
|
|
8148
|
+
errors.push("items[" + index + "].skos_concepts[" + conceptIndex + "].metadata must be an object");
|
|
8149
|
+
}
|
|
8150
|
+
}
|
|
8151
|
+
}
|
|
8152
|
+
}
|
|
8153
|
+
if (item.skos_relations !== void 0) {
|
|
8154
|
+
if (!Array.isArray(item.skos_relations)) {
|
|
8155
|
+
errors.push("items[" + index + "].skos_relations must be an array when present");
|
|
8156
|
+
} else {
|
|
8157
|
+
for (const [relationIndex, relation] of item.skos_relations.entries()) {
|
|
8158
|
+
if (!hasString(relation.type)) errors.push("items[" + index + "].skos_relations[" + relationIndex + "].type is required");
|
|
8159
|
+
if (!hasString(relation.source_id)) errors.push("items[" + index + "].skos_relations[" + relationIndex + "].source_id is required");
|
|
8160
|
+
if (!hasString(relation.target_id)) errors.push("items[" + index + "].skos_relations[" + relationIndex + "].target_id is required");
|
|
8161
|
+
if (relation.metadata !== void 0 && !isPlainRecord(relation.metadata)) {
|
|
8162
|
+
errors.push("items[" + index + "].skos_relations[" + relationIndex + "].metadata must be an object");
|
|
8163
|
+
}
|
|
8164
|
+
}
|
|
8165
|
+
}
|
|
8166
|
+
}
|
|
8167
|
+
if (item.provenance_events !== void 0) {
|
|
8168
|
+
if (!Array.isArray(item.provenance_events)) {
|
|
8169
|
+
errors.push("items[" + index + "].provenance_events must be an array when present");
|
|
8170
|
+
} else {
|
|
8171
|
+
for (const [eventIndex, event] of item.provenance_events.entries()) {
|
|
8172
|
+
if (!hasString(event.activity)) errors.push("items[" + index + "].provenance_events[" + eventIndex + "].activity is required");
|
|
8173
|
+
if (event.attributes !== void 0 && !isPlainRecord(event.attributes)) {
|
|
8174
|
+
errors.push("items[" + index + "].provenance_events[" + eventIndex + "].attributes must be an object");
|
|
8175
|
+
}
|
|
8176
|
+
}
|
|
8177
|
+
}
|
|
8178
|
+
}
|
|
8179
|
+
if (Array.isArray(item.relationships)) {
|
|
8180
|
+
for (const [relationshipIndex, relationship] of item.relationships.entries()) {
|
|
8181
|
+
if (relationship.metadata !== void 0 && !isPlainRecord(relationship.metadata)) {
|
|
8182
|
+
errors.push("items[" + index + "].relationships[" + relationshipIndex + "].metadata must be an object");
|
|
8183
|
+
}
|
|
8184
|
+
}
|
|
8185
|
+
}
|
|
8186
|
+
}
|
|
8132
8187
|
function validateAiwgFortemiIndexExport(value) {
|
|
8133
8188
|
const errors = [];
|
|
8134
8189
|
const counts = {};
|
|
@@ -8167,6 +8222,7 @@ function validateAiwgFortemiIndexExport(value) {
|
|
|
8167
8222
|
if (!Array.isArray(item.provenance) || item.provenance.length === 0) {
|
|
8168
8223
|
errors.push("items[" + index + "].provenance must be a non-empty array");
|
|
8169
8224
|
}
|
|
8225
|
+
validateOptionalRichMetadata(item, index, errors);
|
|
8170
8226
|
if (!item.privacy || typeof item.privacy.pii !== "boolean" || !hasString(item.privacy.classification)) {
|
|
8171
8227
|
errors.push("items[" + index + "].privacy requires classification and pii");
|
|
8172
8228
|
}
|
|
@@ -8852,7 +8908,7 @@ function communityIdsFor(item, options) {
|
|
|
8852
8908
|
}
|
|
8853
8909
|
|
|
8854
8910
|
// src/index.ts
|
|
8855
|
-
var VERSION = "2026.6.
|
|
8911
|
+
var VERSION = "2026.6.8";
|
|
8856
8912
|
|
|
8857
8913
|
export { AIWG_SCAN_REQUIRED_FIELDS, ArchiveManager, AttachmentsRepository, CURRENT_MIGRATION_HEAD, CURRENT_SHARD_VERSION, CapabilityManager, CaptureKnowledgeInputSchema, CollectionsRepository, CommunitiesRepository, DB_SNAPSHOT_SCHEMA_VERSION, DbSnapshotVersionError, EMBED_REQUEST_KIND, EMBED_RESPONSE_KIND, EmbeddingSetsRepository, FallbackRouter, FortemiToolManifest, GetNoteInputSchema, GraphRepository, JOB_CAPABILITIES, JOB_PRIORITIES, JobQueueWorker, LOCAL_ENDPOINTS, LinksRepository, ListNotesInputSchema, ManageArchiveInputSchema, ManageAttachmentsInputSchema, ManageCapabilitiesInputSchema, ManageCollectionsInputSchema, ManageLinksInputSchema, ManageNoteInputSchema, ManageTagsInputSchema, MemoryBlobStore, MigrationRunner, NotesRepository, OpenAICompatibleProvider, PGliteStorageBackend, PGliteStorageBackendFactory, PGliteWorkerClient, PGliteWorkerStorageBackend, PGliteWorkerStorageBackendFactory, ProvenanceRepository, ProviderRegistry, SHARD_FORMAT, SUPPORTED_PGLITE_VERSION, SearchInputSchema, SearchRepository, SkosRepository, TagsRepository, TransactionProxy, TypedEventBus, VERSION, aiRevisionHandler, aiwgFortemiIndexToCommunityGraph, allMigrations, appendPluginScript, assertAiwgFortemiChunkManifest, assertAiwgFortemiChunkPart, assertAiwgFortemiIndexExport, buildAiwgChunkedIndex, buildNoteConditions, buildPluginCsp, captureKnowledge, chunkText, classifyError, classifyModel, clearPrefetchedShard, collectionFromShard, collectionToShard, computeHash, computeSri, conceptTaggingHandler, cosineSimilarity, createAiwgFetchChunkLoader, createAiwgFetchDetailLoader, createAiwgIndexController, createAiwgReviewDecisionExport, createBlobStore, createCosineSemanticProvider, createCspReportHandler, createFortemi, createLegacyProvider, createPGliteBackend, createPGliteInstance, createRemoteBackend, createRoutes, createShardBackend, createWorkerEmbedFunction, defaultStorageBackendFactory, detectCommunities, detectGpuCapabilities, detectInferenceCapabilities, discoverLocalProviders, dumpDbSnapshot, embeddingFromShard, embeddingGenerationHandler, embeddingSetFromShard, embeddingSetMemberToShard, embeddingSetToShard, embeddingToShard, enqueueFullWorkflow, enqueueJob, enqueueNoteCreationJobs, estimateModelFit, estimateVramMB, estimateVramTier, exportShard, fetchPluginScript, fortemiManifest, fromPrefetched, generateId, getAiwgFortemiFacets, getEmbedFunction, getFortemiBridge, getFortemiSecretStore, getJobQueueStatus, getLlmFunction, getNote, getPrefetchedSha256, handleEmbedRequests, hasFortemiSecureSecrets, importShard, isPluginScriptAllowed, isShardPrefetched, linkFromShard, linkToShard, linkingHandler, listNotes, manageArchive, manageAttachments, manageCapabilities, manageCollections, manageLinks, manageNote, manageTags, matchRoute, noteFromShard, noteSkosTagToShard, noteToShard, openShard, packTarGz, parseCspReport, prefetchShard, provenanceEdgeToShard, queryAiwgFortemiIndex, registerLlmCapability, registerSemanticCapability, registerSemanticCapabilityWorker, registerServiceWorker, restoreDbSnapshot, searchTool, selectBackend, selectLlmModel, setEmbedFunction, setLlmFunction, sha256Hex, skosConceptToShard, skosRelationToShard, skosSchemeToShard, suggestTags, tagsFromShard, tagsToShard, titleGenerationHandler, unpackTarGz, unregisterLlmCapability, unregisterSemanticCapability, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport, validateChecksums, verifyDbSnapshotMeta, verifySri };
|
|
8858
8914
|
//# sourceMappingURL=index.js.map
|