@equationalapplications/core-llm-wiki 9.1.0 → 9.2.0

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.
@@ -278,6 +278,11 @@ interface LibrarianConfig {
278
278
  guidanceForEntity?: (entityId: string) => string | undefined;
279
279
  }
280
280
  interface WikiConfig {
281
+ /** Source-store limits (spec source-store section 9). Defaults live in SourceStoreService. */
282
+ sourceStore?: {
283
+ maxCharsPerSource?: number;
284
+ maxTotalChars?: number;
285
+ };
281
286
  /**
282
287
  * Prefix applied to every SQL table/index/trigger name. Must match
283
288
  * `^[A-Za-z][A-Za-z0-9_]{0,30}_$` (letter, then alphanumeric/underscore,
@@ -414,6 +419,16 @@ interface WikiConfig {
414
419
  setupBudgetMs?: number;
415
420
  }
416
421
  interface ReadOptions {
422
+ /**
423
+ * Opt in to stored-source passages (spec source-store section 7). Per entity:
424
+ * at most `maxPassages` (default 8) windows, each at most `charBudget`
425
+ * (default 4,000) UTF-16 code units.
426
+ */
427
+ sources?: {
428
+ query: string;
429
+ maxPassages?: number;
430
+ charBudget?: number;
431
+ };
417
432
  maxResults?: number;
418
433
  /**
419
434
  * undefined → use WikiConfig.preFilterLimit (or no pre-filter if also unset).
@@ -847,9 +862,9 @@ type WikiDiagnosticSeverity = 'info' | 'warn' | 'error';
847
862
  * Closed for this release series, but new codes are added in minor versions:
848
863
  * hosts must tolerate codes they do not recognize.
849
864
  */
850
- type WikiDiagnosticCode = 'ingest_chunk_failed' | 'fact_rejected' | 'task_rejected' | 'fact_deduplicated' | 'edge_dropped' | 'embedding_failed' | 'hook_failed' | 'background_job_failed' | 'heal_skipped' | 'grounding_missing' | 'grounding_failed' | 'classification_low_confidence' | 'classification_invalid' | 'llm_usage' | 'librarian_gate' | 'librarian_op_rejected' | 'contradicts_document' | 'resolve_failed' | 'read_budget' | 'event_retention_held' | 'event_created_at_clamped' | 'event_created_at_restamped' | 'external_deletion_pending' | 'external_deletion_discarded' | 'guidance_too_long' | 'guidance_resolver_failed' | 'source_pointer_unresolved' | 'source_pointer_invalid';
865
+ type WikiDiagnosticCode = 'ingest_chunk_failed' | 'fact_rejected' | 'task_rejected' | 'fact_deduplicated' | 'edge_dropped' | 'embedding_failed' | 'hook_failed' | 'background_job_failed' | 'heal_skipped' | 'grounding_missing' | 'grounding_failed' | 'classification_low_confidence' | 'classification_invalid' | 'llm_usage' | 'librarian_gate' | 'librarian_op_rejected' | 'contradicts_document' | 'resolve_failed' | 'read_budget' | 'event_retention_held' | 'event_created_at_clamped' | 'event_created_at_restamped' | 'external_deletion_pending' | 'external_deletion_discarded' | 'guidance_too_long' | 'guidance_resolver_failed' | 'source_pointer_unresolved' | 'source_pointer_invalid' | 'source_store_source_too_large' | 'source_store_budget_exceeded' | 'source_store_hash_mismatch' | 'source_store_duplicate_hash' | 'source_store_text_not_storable';
851
866
  /** The service run that emitted the diagnostic. */
852
- type WikiDiagnosticOperation = 'ingest' | 'upsertGraph' | 'librarian' | 'heal' | 'ontologyBackfill' | 'reembed' | 'importDump' | 'write' | 'supersede' | 'remember' | 'read' | 'prune' | 'externalDeletion';
867
+ type WikiDiagnosticOperation = 'ingest' | 'upsertGraph' | 'librarian' | 'heal' | 'ontologyBackfill' | 'reembed' | 'importDump' | 'write' | 'supersede' | 'remember' | 'read' | 'prune' | 'externalDeletion' | 'sourceStore';
853
868
  /** `'auto'` when a write threshold started the run (auto-librarian / auto-heal); `'call'` when the host did. */
854
869
  type WikiDiagnosticTrigger = 'call' | 'auto';
855
870
  /** Identifiers only — never titles, bodies, quotes, LLM output, provider messages, or hashes of content. */
@@ -1001,16 +1016,33 @@ interface WikiOptions {
1001
1016
  */
1002
1017
  onDiagnostic?: (diagnostic: WikiDiagnostic) => void;
1003
1018
  }
1019
+ /** One windowed stored-source passage in a `read()` `sources` group (spec source-store section 7). */
1020
+ interface SourcePassage {
1021
+ entityId: string;
1022
+ sourceRef: string;
1023
+ sourceHash: string;
1024
+ seq: number;
1025
+ /** UTF-16 offset of `text` within the stored source, inclusive. */
1026
+ startOffset: number;
1027
+ /** UTF-16 offset, exclusive: `storedText.slice(startOffset, endOffset) === text`. */
1028
+ endOffset: number;
1029
+ /** True when `text` is a window cut from a larger passage. */
1030
+ truncated: boolean;
1031
+ text: string;
1032
+ }
1004
1033
  interface MemoryBundle {
1005
1034
  facts: WikiFact[];
1035
+ /** Present only when `read()` was given the `sources` option. Per-entity groups, never merged. */
1036
+ sources?: SourcePassage[];
1006
1037
  tasks: WikiTask[];
1007
1038
  events: WikiEvent[];
1008
1039
  edges?: WikiEdge[];
1009
1040
  /** Entity summary prose for OKF profile ≥ 1 round-trip. Omitted = no summary (Clanker default). */
1010
1041
  summary?: string;
1011
1042
  /**
1012
- * The source store's librarian position. Set by export only; the importer
1013
- * trusts events at or before it as consolidated at the source.
1043
+ * The exporting database's librarian position. Set by export only; the
1044
+ * importer trusts events at or before it as consolidated at the exporting
1045
+ * database. (Not the source text store; spec source-store §8 naming note.)
1014
1046
  */
1015
1047
  librarian_watermark?: {
1016
1048
  at: number;
@@ -1025,9 +1057,63 @@ interface MemoryBundle {
1025
1057
  tierFloors?: Record<string, number>;
1026
1058
  };
1027
1059
  }
1060
+ /** Result of `storeSource` (spec source-store §7). Refusals return `stored: false` with their diagnostics. */
1061
+ type StoreSourceResult = {
1062
+ stored: true;
1063
+ sourceRef: string;
1064
+ sourceHash: string;
1065
+ charCount: number;
1066
+ passageCount: number;
1067
+ storedAt: number;
1068
+ } | {
1069
+ stored: false;
1070
+ diagnostics: WikiDiagnostic[];
1071
+ };
1072
+ /** A stored source's text and metadata, as returned by `getStoredSource`. */
1073
+ interface StoredSource {
1074
+ sourceRef: string;
1075
+ sourceHash: string;
1076
+ text: string;
1077
+ charCount: number;
1078
+ storedAt: number;
1079
+ }
1080
+ /** One entry of `listStoredSources`. */
1081
+ interface StoredSourceSummary {
1082
+ sourceRef: string;
1083
+ sourceHash: string;
1084
+ charCount: number;
1085
+ passageCount: number;
1086
+ storedAt: number;
1087
+ }
1088
+ /** One stored source in a `MemoryDump` (spec source-store §8). Import re-derives passages and `text_hash` from `text`. */
1089
+ interface StoredSourceDump {
1090
+ sourceRef: string;
1091
+ sourceHash: string;
1092
+ text: string;
1093
+ textHash: string;
1094
+ charCount: number;
1095
+ storedAt: number;
1096
+ /** Fidelity only: import ignores this and re-cuts from `text`. */
1097
+ passages: Array<{
1098
+ seq: number;
1099
+ startOffset: number;
1100
+ endOffset: number;
1101
+ }>;
1102
+ }
1103
+ /** Result of `importDump` (spec source-store §8): sources the import refused. */
1104
+ interface ImportDumpResult {
1105
+ skippedSources: Array<{
1106
+ sourceRef: string;
1107
+ code: WikiDiagnosticCode;
1108
+ }>;
1109
+ }
1110
+ /** A dump entity: the bundle plus its stored sources (dump-only; `MemoryBundle` stays the read shape). */
1111
+ type MemoryDumpEntity = MemoryBundle & {
1112
+ storedSources?: StoredSourceDump[];
1113
+ };
1028
1114
  interface MemoryDump {
1029
1115
  generatedAt: number;
1030
- entities: Record<string, MemoryBundle>;
1116
+ entities: Record<string, MemoryDumpEntity>;
1031
1117
  /**
1032
1118
  * Source-pointer parse report (specs/source-pointers §Export, import, and OKF).
1033
1119
  * Present ONLY when `parseOkfBundle` dropped a malformed `source_pointer`
@@ -1077,7 +1163,7 @@ interface EntityStatus {
1077
1163
  * Exhaustive `switch` / narrowing on this type must be updated (or given a
1078
1164
  * `default` arm) to compile without errors.
1079
1165
  */
1080
- type WikiBusyOperation = 'ingest' | 'librarian' | 'heal' | 'prune' | 'reembed' | 'import' | 'forget' | 'ontologyBackfill';
1166
+ type WikiBusyOperation = 'ingest' | 'librarian' | 'heal' | 'prune' | 'reembed' | 'import' | 'forget' | 'ontologyBackfill' | 'store';
1081
1167
  /**
1082
1168
  * Thrown when a background mutator is already running for the requested entity.
1083
1169
  */
@@ -1954,6 +2040,11 @@ declare class EntryRepository extends BaseRepository {
1954
2040
  sourceHash: string | null;
1955
2041
  factCount: number;
1956
2042
  lastIngestedAt: number;
2043
+ /** Spec source-store §4 three-state: exact pair / stale hash / nothing stored. */
2044
+ stored?: {
2045
+ charCount: number;
2046
+ staleHash?: true;
2047
+ } | null;
1957
2048
  }>>;
1958
2049
  /**
1959
2050
  * Count live entries for an entity across all source_refs/source_hashes.
@@ -2222,6 +2313,23 @@ interface IndexSearchResult {
2222
2313
  */
2223
2314
  entity_id: string;
2224
2315
  }
2316
+ /**
2317
+ * One passage hit with everything the read window needs. `text` is the whole
2318
+ * passage, sliced in JS from `source_documents.text` at [start_offset,
2319
+ * end_offset) (spec source-store section 7; never SQL substr).
2320
+ */
2321
+ interface PassageHit {
2322
+ id: string;
2323
+ entity_id: string;
2324
+ document_id: string;
2325
+ score: number;
2326
+ seq: number;
2327
+ start_offset: number;
2328
+ end_offset: number;
2329
+ source_ref: string;
2330
+ source_hash: string;
2331
+ text: string;
2332
+ }
2225
2333
  /** One drain turn's shape (spec #280 Change 3 "drain interface"). */
2226
2334
  interface DrainOptions$1 {
2227
2335
  /** `monotonicNow()` timestamp, checked between chunk transactions. Full mode only; default now + the strategy's budget. */
@@ -2321,6 +2429,15 @@ interface IndexStrategy {
2321
2429
  * transactions.
2322
2430
  */
2323
2431
  drain?(opts?: DrainOptions$1): Promise<void>;
2432
+ /**
2433
+ * Best-match-first stored-source passage search (spec source-store section 7),
2434
+ * optional like `drain?`. A strategy without it, or the degraded stand-in,
2435
+ * yields no passages.
2436
+ */
2437
+ searchPassages?(query: string, options: {
2438
+ entityIds: string[];
2439
+ limit: number;
2440
+ }): Promise<PassageHit[]>;
2324
2441
  }
2325
2442
 
2326
2443
  interface ScoredRow {
@@ -2466,6 +2583,19 @@ declare class SearchService {
2466
2583
  * Executes a keyword search against the active index strategy.
2467
2584
  */
2468
2585
  searchKeyword(query: string, entityIds: string[], limit: number): Promise<IndexSearchResult[]>;
2586
+ /**
2587
+ * Post-commit passage index sync (spec source-store section 6). FTS5: drains the
2588
+ * passage ledger (per document, entity-scoped when given). MiniSearch: reloads
2589
+ * the entity's stored passages (all stored entities when omitted: the open-time
2590
+ * pass). Serialized on the sync chain; never rejects, like sync().
2591
+ */
2592
+ syncPassages(db: SQLiteAdapter, prefix: string, entityId?: string, deadline?: number): Promise<void>;
2593
+ /**
2594
+ * Stored-source passage search for ONE entity (spec source-store section 7:
2595
+ * ranking and caps are per entity). Rides the active strategy; a strategy
2596
+ * without passage search yields none.
2597
+ */
2598
+ searchPassages(query: string, entityId: string, limit: number): Promise<PassageHit[]>;
2469
2599
  /**
2470
2600
  * Pre-fetches keyword scores for candidate hydration, used during hybrid weighting.
2471
2601
  */
@@ -2495,7 +2625,7 @@ declare class SearchService {
2495
2625
  private _compareSearchResults;
2496
2626
  }
2497
2627
 
2498
- type OperationType = 'prune' | 'librarian' | 'heal' | 'ingest' | 'reembed' | 'global_reembed' | 'import' | 'global_import' | 'forget' | 'ontologyBackfill';
2628
+ type OperationType = 'prune' | 'librarian' | 'heal' | 'ingest' | 'reembed' | 'global_reembed' | 'import' | 'global_import' | 'forget' | 'ontologyBackfill' | 'store';
2499
2629
  declare class JobManager {
2500
2630
  private prefix;
2501
2631
  private activeMaintenanceJobs;
@@ -2547,6 +2677,7 @@ declare class JobManager {
2547
2677
  private _globalImportKey;
2548
2678
  private _forgetKey;
2549
2679
  private _librarianKey;
2680
+ private _storeKey;
2550
2681
  private _healKey;
2551
2682
  private _ontologyBackfillKey;
2552
2683
  /**
@@ -2572,6 +2703,7 @@ declare class JobManager {
2572
2703
  */
2573
2704
  isAnyReembedActive(): boolean;
2574
2705
  private _isImportActiveFor;
2706
+ private _isStoreActiveFor;
2575
2707
  private _isForgetActiveFor;
2576
2708
  private _isAnyMaintenanceActiveWithSuffix;
2577
2709
  private _hasIngestJob;
@@ -3669,6 +3801,8 @@ declare class MaintenanceService {
3669
3801
  * as WikiMemory.setup() documents.
3670
3802
  */
3671
3803
  private sourceRefIndexPresent;
3804
+ /** A never-set-up store has no source-store tables (#316 recovery); nothing to delete there. */
3805
+ private sourceStorePresent;
3672
3806
  /**
3673
3807
  * Read-only dry-run preview of {@link forget}. Returns the same shape as a
3674
3808
  * real call would, without acquiring the lock, opening a transaction, staging
@@ -3854,17 +3988,32 @@ declare class ImportExportService {
3854
3988
  private embeddingService;
3855
3989
  private options;
3856
3990
  private vectorRemoval?;
3857
- constructor(db: SQLiteAdapter, entryRepo: EntryRepository, taskRepo: TaskRepository, eventRepo: EventRepository, edgeRepo: EdgeRepository, metadataRepo: MetadataRepository, searchService: SearchService, jobManager: JobManager, embeddingService: EmbeddingService, options?: Pick<WikiOptions, 'onDiagnostic' | 'forceDeleteIgnoreRankerHook'>, vectorRemoval?: VectorRemovalService | undefined);
3991
+ /** Table prefix for the source store; undefined (unit-test mocks) means no store access. */
3992
+ private prefix?;
3993
+ constructor(db: SQLiteAdapter, entryRepo: EntryRepository, taskRepo: TaskRepository, eventRepo: EventRepository, edgeRepo: EdgeRepository, metadataRepo: MetadataRepository, searchService: SearchService, jobManager: JobManager, embeddingService: EmbeddingService, options?: Pick<WikiOptions, 'onDiagnostic' | 'forceDeleteIgnoreRankerHook' | 'config'>, vectorRemoval?: VectorRemovalService | undefined,
3994
+ /** Table prefix for the source store; undefined (unit-test mocks) means no store access. */
3995
+ prefix?: string | undefined);
3858
3996
  exportDump(entityIds?: string[]): Promise<MemoryDump>;
3859
3997
  importDump(dump: MemoryDump, opts?: {
3860
3998
  merge?: boolean;
3861
- }): Promise<void>;
3999
+ }): Promise<ImportDumpResult>;
4000
+ private storePrefix;
4001
+ private storePresent;
4002
+ /** Spec source-store §8: stored sources for one exported entity; [] when none. */
4003
+ private exportStoredSources;
4004
+ /**
4005
+ * Spec source-store §8/§9 import step, inside the import transaction. One
4006
+ * source at a time; a refusal skips that source only. Uses the
4007
+ * same upsert helper as SourceStoreService.storeSource, inside this transaction. A ref already stored is replaced: the dump is the
4008
+ * truth for that ref (so no hash_mismatch refusal on import).
4009
+ */
4010
+ private importStoredSources;
3862
4011
  getFullBundle(entityId: string, opts?: {
3863
4012
  maxEvents?: number;
3864
4013
  includeBlobs?: boolean;
3865
4014
  }): Promise<MemoryBundle>;
3866
4015
  /** Single-entity import transaction + post-processing; package-internal hook for tests. */
3867
- doImportEntity(entityId: string, bundle: MemoryBundle, merge: boolean): Promise<void>;
4016
+ doImportEntity(entityId: string, bundle: MemoryDumpEntity, merge: boolean): Promise<ImportDumpResult['skippedSources']>;
3868
4017
  private _warnCrossEntityCollision;
3869
4018
  private _normalizeImportedSourceType;
3870
4019
  assertNoLegacySourceTypes(): Promise<void>;
@@ -3879,6 +4028,13 @@ declare class RetrievalService {
3879
4028
  private searchService;
3880
4029
  constructor(options: WikiOptions, entryRepo: EntryRepository, taskRepo: TaskRepository, eventRepo: EventRepository, metadataRepo: MetadataRepository, searchService: SearchService);
3881
4030
  read(entityId: string | string[], query: string, options?: ReadOptions): Promise<MemoryBundle>;
4031
+ /**
4032
+ * The `sources` group (spec source-store section 7). One search per entity,
4033
+ * so ranking and caps never cross entities. No model call anywhere.
4034
+ * `charBudget` is per entity: windows are cut in rank order against the
4035
+ * entity's remaining budget, and once it is spent lower-ranked hits are not returned.
4036
+ */
4037
+ private _readSources;
3882
4038
  /**
3883
4039
  * Returns entity IDs that will participate in scored retrieval.
3884
4040
  * Excludes zero-weight entities unless includeZeroWeightEntities is true.
@@ -4020,6 +4176,7 @@ declare class WikiMemory {
4020
4176
  private importExportService;
4021
4177
  private retrievalService;
4022
4178
  private writeService;
4179
+ private sourceStoreService;
4023
4180
  private promptService;
4024
4181
  private ontologyService;
4025
4182
  private graphTraversalService;
@@ -4086,9 +4243,13 @@ declare class WikiMemory {
4086
4243
  * host runs a plain `setup()` outside the lease.
4087
4244
  *
4088
4245
  * Keyword-index catch-up work is bounded by `config.setupBudgetMs`; anything
4089
- * left converges on later opens and no-arg `syncSearchIndex()` calls. Not
4090
- * bounded: an index reset (tokenizer change, re-attach after detach, a lost
4091
- * or inconsistent index), which runs as one unchunked transaction.
4246
+ * left converges on later opens, and on no-arg `syncSearchIndex()` calls for
4247
+ * the entries ledger. Passage-ledger leftover converges on later opens and on
4248
+ * passage-store writes for the entity (`storeSource`, `forget`,
4249
+ * `importDump`), which drain that entity's rows; no-arg calls do not touch
4250
+ * the passage ledger. Not bounded: an index reset (tokenizer change, re-attach
4251
+ * after detach, a lost or inconsistent index), which runs as one unchunked
4252
+ * transaction.
4092
4253
  */
4093
4254
  setup(opts?: {
4094
4255
  migrations?: MigrationPolicy;
@@ -4172,6 +4333,10 @@ declare class WikiMemory {
4172
4333
  sourceHash: string | null;
4173
4334
  factCount: number;
4174
4335
  lastIngestedAt: number;
4336
+ stored?: {
4337
+ charCount: number;
4338
+ staleHash?: true;
4339
+ } | null;
4175
4340
  }>>;
4176
4341
  /**
4177
4342
  * Returns the live source_refs for an entity that hold the given source_hash.
@@ -4344,7 +4509,7 @@ declare class WikiMemory {
4344
4509
  getEntitySummary(entityId: string): Promise<string | null>;
4345
4510
  importDump(dump: MemoryDump, opts?: {
4346
4511
  merge?: boolean;
4347
- }): Promise<void>;
4512
+ }): Promise<ImportDumpResult>;
4348
4513
  /**
4349
4514
  * Soft-delete facts and tasks by id, by source, or all of them (`clearAll`).
4350
4515
  * `clearAll` also deletes the entity's edges and its source-ref index rows.
@@ -4366,6 +4531,14 @@ declare class WikiMemory {
4366
4531
  forget(entityId: string, params: ForgetParams, opts?: {
4367
4532
  dryRun?: boolean;
4368
4533
  }): Promise<ForgetResult>;
4534
+ /** Store a source's text (spec source-store §7). Refusals return `stored: false`; a busy lock throws. */
4535
+ storeSource(entityId: string, params: {
4536
+ sourceRef: string;
4537
+ sourceHash: string;
4538
+ text: string;
4539
+ }): Promise<StoreSourceResult>;
4540
+ getStoredSource(entityId: string, sourceRef: string): Promise<StoredSource | null>;
4541
+ listStoredSources(entityId: string): Promise<StoredSourceSummary[]>;
4369
4542
  /**
4370
4543
  * End `oldId`'s validity and link it to its replacement (spec §4.3). One
4371
4544
  * transaction. Throws `WikiSupersedeError` for missing, foreign, already
@@ -4592,5 +4765,5 @@ declare class WikiMemory {
4592
4765
  setGeneratedByTask(taskId: string, entityId: string, actor: string): Promise<void>;
4593
4766
  }
4594
4767
 
4595
- export { HEAL_BATCH_SIZE as H, ONTOLOGY_BACKFILL_BATCH_SIZE as K, ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS as N, ONTOLOGY_BACKFILL_RECHECK_MS as P, PromptService as a2, PrunePartialFailureError as a3, WikiParseError as aB, WikiSearchUnavailableError as aC, WikiSourceRefHashCollision as aE, WikiStrictOntologyViolation as aF, WikiSupersedeError as aG, WikiTransactionError as aJ, isWikiSearchUnavailableError as aK, validateManifest as aL, EmbeddingService as aM, ImportExportService as aN, IngestionService as aO, JobManager as aP, MaintenanceService as aQ, RetrievalService as aR, SearchService as aS, WriteService as aT, WikiBusyError as ad, WikiDraftNotFound as an, WikiDuplicateHashError as ao, WikiExternalDeletionError as ar, WikiGraphNodeOwnershipConflict as at, WikiIngestEmptyError as au, WikiInvalidReadOptions as aw, WikiMigrationRequiredError as az, WikiMemory as c, HEAL_RECHECK_MS as u, HOOK_TIMEOUT_MARKER as v };
4596
- export type { PendingMigrationWork as $, MaintenanceJob as A, MaintenanceStopReason as B, ChunkFailure as C, DegradedRecord as D, EmbedFactResult as E, FormatContextOptions as F, GraphNeighborhood as G, IngestDocumentResult as I, MigrationPolicy as J, LLMProvider as L, MemoryBundle as M, OntologyMode as O, OntologyBackfillResult as Q, ReadOptions as R, SQLiteAdapter as S, OntologyConfig as T, OntologyEdgeType as U, OntologyManifest as V, WikiOptions as W, OntologyNodeType as X, OntologyPromptContext as Y, OntologyUpdates as Z, PendingMaintenance as _, MemoryDump as a, PendingSourceStatus as a0, PromptOverrides as a1, ReembedResult as a4, RememberInput as a5, RunPendingMaintenanceOptions as a6, RunPendingMaintenanceResult as a7, SupersedeReplacement as a8, VectorRanker as a9, WikiOutboxEvent as aA, WikiSourcePointer as aD, WikiSupersedeReason as aH, WikiTask as aI, VectorRankerFallback as aa, VectorRankerRankArgs as ab, VectorRankerSemanticResult as ac, WikiBusyOperation as ae, WikiCheckpoint as af, WikiConfig as ag, WikiDiagnostic as ah, WikiDiagnosticCode as ai, WikiDiagnosticDetail as aj, WikiDiagnosticOperation as ak, WikiDiagnosticSeverity as al, WikiDiagnosticTrigger as am, WikiEdge as ap, WikiEvent as aq, WikiFact as as, WikiInstructions as av, WikiLintReport as ax, WikiMemoryTestAccess as ay, FormattedMemoryDump as b, ClassifierAnswer as d, ClassifierQuestion as e, ClassifyRequest as f, ClassifyResponse as g, DraftPage as h, EmbedFailureKind as i, EmbeddingMarkerKind as j, EntityMaintenanceReport as k, EntityStatus as l, ExtractedFact as m, ExtractedFactEdge as n, ExtractedFactWithOntology as o, ExtractedTask as p, ForgetParams as q, ForgetResult as r, GraphTraversalOptions as s, GroundingConfig as t, HealResult as w, LibrarianConfig as x, LibrarianGateConfig as y, LockedMaintenanceJob as z };
4768
+ export { HEAL_BATCH_SIZE as H, ONTOLOGY_BACKFILL_BATCH_SIZE as P, ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS as Q, ONTOLOGY_BACKFILL_RECHECK_MS as T, PromptService as a4, PrunePartialFailureError as a5, WikiGraphNodeOwnershipConflict as aA, WikiIngestEmptyError as aB, WikiInvalidReadOptions as aD, WikiMigrationRequiredError as aG, WikiParseError as aI, WikiSearchUnavailableError as aJ, WikiSourceRefHashCollision as aL, WikiStrictOntologyViolation as aM, WikiSupersedeError as aN, WikiTransactionError as aQ, isWikiSearchUnavailableError as aR, validateManifest as aS, EmbeddingService as aT, ImportExportService as aU, IngestionService as aV, JobManager as aW, MaintenanceService as aX, RetrievalService as aY, SearchService as aZ, WriteService as a_, WikiBusyError as ak, WikiDraftNotFound as au, WikiDuplicateHashError as av, WikiExternalDeletionError as ay, WikiMemory as c, HEAL_RECHECK_MS as u, HOOK_TIMEOUT_MARKER as v };
4769
+ export type { OntologyUpdates as $, LockedMaintenanceJob as A, MaintenanceJob as B, ChunkFailure as C, DegradedRecord as D, EmbedFactResult as E, FormatContextOptions as F, GraphNeighborhood as G, ImportDumpResult as I, MaintenanceStopReason as J, MemoryDumpEntity as K, LLMProvider as L, MemoryBundle as M, MigrationPolicy as N, OntologyMode as O, ReadOptions as R, SQLiteAdapter as S, OntologyBackfillResult as U, OntologyConfig as V, WikiOptions as W, OntologyEdgeType as X, OntologyManifest as Y, OntologyNodeType as Z, OntologyPromptContext as _, MemoryDump as a, PendingMaintenance as a0, PendingMigrationWork as a1, PendingSourceStatus as a2, PromptOverrides as a3, ReembedResult as a6, RememberInput as a7, RunPendingMaintenanceOptions as a8, RunPendingMaintenanceResult as a9, WikiInstructions as aC, WikiLintReport as aE, WikiMemoryTestAccess as aF, WikiOutboxEvent as aH, WikiSourcePointer as aK, WikiSupersedeReason as aO, WikiTask as aP, SourcePassage as aa, StoreSourceResult as ab, StoredSource as ac, StoredSourceDump as ad, StoredSourceSummary as ae, SupersedeReplacement as af, VectorRanker as ag, VectorRankerFallback as ah, VectorRankerRankArgs as ai, VectorRankerSemanticResult as aj, WikiBusyOperation as al, WikiCheckpoint as am, WikiConfig as an, WikiDiagnostic as ao, WikiDiagnosticCode as ap, WikiDiagnosticDetail as aq, WikiDiagnosticOperation as ar, WikiDiagnosticSeverity as as, WikiDiagnosticTrigger as at, WikiEdge as aw, WikiEvent as ax, WikiFact as az, FormattedMemoryDump as b, ClassifierAnswer as d, ClassifierQuestion as e, ClassifyRequest as f, ClassifyResponse as g, DraftPage as h, EmbedFailureKind as i, EmbeddingMarkerKind as j, EntityMaintenanceReport as k, EntityStatus as l, ExtractedFact as m, ExtractedFactEdge as n, ExtractedFactWithOntology as o, ExtractedTask as p, ForgetParams as q, ForgetResult as r, GraphTraversalOptions as s, GroundingConfig as t, HealResult as w, IngestDocumentResult as x, LibrarianConfig as y, LibrarianGateConfig as z };