@equationalapplications/core-llm-wiki 9.5.2 → 9.6.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.
- package/dist/{chunk-7HJXGKQO.mjs → chunk-TZMLWQ3G.mjs} +328 -102
- package/dist/chunk-TZMLWQ3G.mjs.map +1 -0
- package/dist/index.d.mts +49 -3
- package/dist/index.d.ts +49 -3
- package/dist/index.js +362 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -12
- package/dist/index.mjs.map +1 -1
- package/dist/{testing-BA6CedgZ.d.mts → testing-BBeQQIYp.d.mts} +134 -11
- package/dist/{testing-BA6CedgZ.d.ts → testing-BBeQQIYp.d.ts} +134 -11
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +288 -61
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-7HJXGKQO.mjs.map +0 -1
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import { OkfSource, OkfVerifiedEntry, OkfSourceUsageWindow } from '@equationalapplications/core-okf';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* System-One config surface (specs/system-one-config §1, §10).
|
|
5
|
+
*
|
|
6
|
+
* Boundary: S1-0 owns exactly `typing`, `minConfidence` (with the `'typing'`
|
|
7
|
+
* member), and `onLowConfidence`. Later PRs add more threshold sites
|
|
8
|
+
* (`'edges'`, `'resolve'`, `'healScreen'`) — each as one new line in
|
|
9
|
+
* `SystemOneThresholdSite`, so sibling PRs merge cleanly. Nothing outside
|
|
10
|
+
* that boundary belongs here.
|
|
11
|
+
*/
|
|
12
|
+
/** Sites a System-One threshold can apply to. Exactly one member today (§10 fence). */
|
|
13
|
+
type SystemOneThresholdSite = 'typing';
|
|
14
|
+
interface SystemOneConfig {
|
|
15
|
+
/**
|
|
16
|
+
* Typing mode for ontology backfill. `'auto'` uses
|
|
17
|
+
* `llmProvider.classify` when present (no edges proposed); `'llm'`
|
|
18
|
+
* always uses the generative path. Default `'llm'`.
|
|
19
|
+
*/
|
|
20
|
+
typing?: 'auto' | 'llm';
|
|
21
|
+
/** Per-site minimum confidence. Only the classifier path reads a floor. */
|
|
22
|
+
minConfidence?: Partial<Record<SystemOneThresholdSite, number>>;
|
|
23
|
+
/**
|
|
24
|
+
* Routing for classifier low-confidence outcomes (and abstains).
|
|
25
|
+
* `'leave'` (default) keeps them untyped and cooldown-stamped; `'llm'`
|
|
26
|
+
* escalates them to the generative step of the same pass. A cost and
|
|
27
|
+
* quality setting, not a safety mechanism; a no-op when typing resolves
|
|
28
|
+
* `'llm'`.
|
|
29
|
+
*/
|
|
30
|
+
onLowConfidence?: 'leave' | 'llm';
|
|
31
|
+
}
|
|
32
|
+
|
|
3
33
|
/**
|
|
4
34
|
* Platform-agnostic SQLite driver interface.
|
|
5
35
|
* Each platform package (wiki-expo, wiki-react) provides an adapter
|
|
@@ -53,6 +83,7 @@ interface PromptOverrides {
|
|
|
53
83
|
guidance?: string;
|
|
54
84
|
}
|
|
55
85
|
type OntologyMode = 'strict' | 'emergent' | 'off';
|
|
86
|
+
|
|
56
87
|
interface OntologyNodeType {
|
|
57
88
|
type: string;
|
|
58
89
|
description: string;
|
|
@@ -98,6 +129,13 @@ interface OntologyConfig {
|
|
|
98
129
|
backfillClassifier?: 'auto' | 'llm';
|
|
99
130
|
/** Minimum classifier confidence to apply a node type. Finite, in [0, 1]. Default 0.5. */
|
|
100
131
|
classifyMinConfidence?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Batch size for scheduler-driven (`runPendingMaintenance`) ontology
|
|
134
|
+
* backfill passes. Finite integer >= 1; invalid values fall back to the
|
|
135
|
+
* default. Default 50. Does not change the manual `runOntologyBackfill`
|
|
136
|
+
* default (25).
|
|
137
|
+
*/
|
|
138
|
+
schedulerBatchSize?: number;
|
|
101
139
|
}
|
|
102
140
|
interface ExtractedFactEdge {
|
|
103
141
|
edge_type: string;
|
|
@@ -112,7 +150,7 @@ interface OntologyPromptContext {
|
|
|
112
150
|
ontologyModeInstructions: string;
|
|
113
151
|
}
|
|
114
152
|
/** Result of a single ontology backfill run. Omissions (facts the model declined
|
|
115
|
-
* to classify) are
|
|
153
|
+
* to classify) are carried by `abstained`, not derived from the other counters. */
|
|
116
154
|
interface OntologyBackfillResult {
|
|
117
155
|
/** Untyped facts sent to the model this run. */
|
|
118
156
|
scanned: number;
|
|
@@ -120,6 +158,12 @@ interface OntologyBackfillResult {
|
|
|
120
158
|
typed: number;
|
|
121
159
|
/** Model classifications rejected (unknown/duplicate id, non-manifest type). */
|
|
122
160
|
failedValidation: number;
|
|
161
|
+
/** Untyped facts the typing model declined to classify — classifier abstains under
|
|
162
|
+
* `onLowConfidence: 'leave'`, and generative omissions (facts the model sent no
|
|
163
|
+
* classification for, including the `changes === 0` race). `scanned − typed −
|
|
164
|
+
* failedValidation` no longer pins this down once escalation routes facts
|
|
165
|
+
* between steps (specs/system-one-config §4-§5). */
|
|
166
|
+
abstained: number;
|
|
123
167
|
/** Edges persisted. */
|
|
124
168
|
edgesAdded: number;
|
|
125
169
|
/** Untyped facts still eligible after this run — safe host convergence signal: loop while > 0.
|
|
@@ -353,6 +397,13 @@ interface WikiConfig {
|
|
|
353
397
|
*/
|
|
354
398
|
enableOutbox?: boolean;
|
|
355
399
|
ontology?: OntologyConfig;
|
|
400
|
+
/**
|
|
401
|
+
* System-One config surface (specs/system-one-config §1): typing mode,
|
|
402
|
+
* per-site confidence floor, and low-confidence routing. Resolution chains
|
|
403
|
+
* live in `utils/engineDefaults.ts` (`resolveSystemOneTyping`,
|
|
404
|
+
* `resolveTypingMinConfidence`).
|
|
405
|
+
*/
|
|
406
|
+
systemOne?: SystemOneConfig;
|
|
356
407
|
/** Default node cap for traverseGraph(), unless overridden per-call. Default 20. */
|
|
357
408
|
maxTraversalNodes?: number;
|
|
358
409
|
/**
|
|
@@ -873,7 +924,7 @@ type WikiDiagnosticSeverity = 'info' | 'warn' | 'error';
|
|
|
873
924
|
* Closed for this release series, but new codes are added in minor versions:
|
|
874
925
|
* hosts must tolerate codes they do not recognize.
|
|
875
926
|
*/
|
|
876
|
-
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' | 'context_overflow_skipped' | 'llm_usage' | 'librarian_gate' | 'librarian_op_rejected' | 'contradicts_document' | 'resolve_failed' | 'read_budget' | 'event_retention_held' | 'prune_checkpoint_incomplete' | 'erase_secure_delete_off' | 'erase_entity_skipped' | 'erase_retired_vtab_undroppable' | 'erase_fts_orphan_cleared' | 'erase_retired_remaining' | 'erase_tombstones_remaining' | 'erase_retired_read_failed' | 'erase_registry_sweep_skipped' | 'import_tombstone_skipped' | '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';
|
|
927
|
+
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' | 'classification_abstained' | 'node_type_assigned' | 'context_overflow_skipped' | 'llm_usage' | 'librarian_gate' | 'librarian_op_rejected' | 'contradicts_document' | 'ontology_backfill_held' | 'resolve_failed' | 'read_budget' | 'event_retention_held' | 'prune_checkpoint_incomplete' | 'erase_secure_delete_off' | 'erase_entity_skipped' | 'erase_retired_vtab_undroppable' | 'erase_fts_orphan_cleared' | 'erase_retired_remaining' | 'erase_tombstones_remaining' | 'erase_retired_read_failed' | 'erase_registry_sweep_skipped' | 'import_tombstone_skipped' | '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';
|
|
877
928
|
/** The service run that emitted the diagnostic. */
|
|
878
929
|
type WikiDiagnosticOperation = 'ingest' | 'upsertGraph' | 'librarian' | 'heal' | 'ontologyBackfill' | 'reembed' | 'importDump' | 'write' | 'supersede' | 'remember' | 'read' | 'prune' | 'externalDeletion' | 'sourceStore' | 'erase';
|
|
879
930
|
/** `'auto'` when a write threshold started the run (auto-librarian / auto-heal); `'call'` when the host did. */
|
|
@@ -894,6 +945,10 @@ interface WikiDiagnosticDetail {
|
|
|
894
945
|
itemIndex?: number;
|
|
895
946
|
/** Machine-readable sub-reason, e.g. `'target_not_found'`. */
|
|
896
947
|
reason?: string;
|
|
948
|
+
/** `node_type_assigned` only: the manifest slug applied to the fact. */
|
|
949
|
+
okfType?: string;
|
|
950
|
+
/** Typing receipts only: which path produced the outcome. */
|
|
951
|
+
writer?: 'classifier' | 'llm';
|
|
897
952
|
/** Aggregated `ingest_chunk_failed` only; the first 20 failed chunk indexes. */
|
|
898
953
|
chunkIndexes?: number[];
|
|
899
954
|
/** Aggregated emissions only. */
|
|
@@ -1554,7 +1609,7 @@ interface WikiInstructions {
|
|
|
1554
1609
|
*/
|
|
1555
1610
|
ontologyBackfill: string;
|
|
1556
1611
|
}
|
|
1557
|
-
type MaintenanceJob = 'librarian' | 'heal' | 'reembed' | 'externalDeletions';
|
|
1612
|
+
type MaintenanceJob = 'librarian' | 'heal' | 'reembed' | 'externalDeletions' | 'ontologyBackfill';
|
|
1558
1613
|
/** The jobs that hold a per-entity lock (everything but `externalDeletions`). */
|
|
1559
1614
|
type LockedMaintenanceJob = Exclude<MaintenanceJob, 'externalDeletions'>;
|
|
1560
1615
|
interface PendingMaintenance {
|
|
@@ -1573,6 +1628,13 @@ interface PendingMaintenance {
|
|
|
1573
1628
|
reembedPending: boolean;
|
|
1574
1629
|
/** Removals still owed to the host's vector index for this entity (absent when none). */
|
|
1575
1630
|
pendingExternalDeletions?: number;
|
|
1631
|
+
/**
|
|
1632
|
+
* Untyped facts still eligible for ontology typing (absent when none).
|
|
1633
|
+
* Counts only facts outside the recheck cooldown — `deferred` ones are
|
|
1634
|
+
* waiting, not work the next pass will attempt. Always false-shaped (absent)
|
|
1635
|
+
* while ontology is off for the entity.
|
|
1636
|
+
*/
|
|
1637
|
+
pendingOntologyBackfill?: number;
|
|
1576
1638
|
}
|
|
1577
1639
|
interface RunPendingMaintenanceOptions {
|
|
1578
1640
|
/** Default: every entity with pending work. */
|
|
@@ -1581,7 +1643,7 @@ interface RunPendingMaintenanceOptions {
|
|
|
1581
1643
|
tokenBudget?: number;
|
|
1582
1644
|
/** Wall-clock milliseconds from the call. Checked between units; a unit in flight is never interrupted. */
|
|
1583
1645
|
deadlineMs?: number;
|
|
1584
|
-
/** Default all
|
|
1646
|
+
/** Default all five. `externalDeletions` runs first and is not metered by `tokenBudget`. */
|
|
1585
1647
|
jobs?: MaintenanceJob[];
|
|
1586
1648
|
}
|
|
1587
1649
|
type MaintenanceStopReason = {
|
|
@@ -1592,7 +1654,7 @@ type MaintenanceStopReason = {
|
|
|
1592
1654
|
reason: 'budget_exhausted';
|
|
1593
1655
|
} | {
|
|
1594
1656
|
reason: 'budget_too_small';
|
|
1595
|
-
job: 'librarian' | 'heal';
|
|
1657
|
+
job: 'librarian' | 'heal' | 'ontologyBackfill';
|
|
1596
1658
|
entityId: string;
|
|
1597
1659
|
requiredEstimate: number;
|
|
1598
1660
|
};
|
|
@@ -1602,6 +1664,10 @@ interface EntityMaintenanceReport {
|
|
|
1602
1664
|
factsWritten: number;
|
|
1603
1665
|
healPasses: number;
|
|
1604
1666
|
reembedded: boolean;
|
|
1667
|
+
/** Scheduler-driven ontology-backfill passes run for this entity (0 when the job was off). */
|
|
1668
|
+
ontologyBackfillPasses: number;
|
|
1669
|
+
/** Facts that received an okf_type during this run's ontology-backfill passes. */
|
|
1670
|
+
typed: number;
|
|
1605
1671
|
/** Set when a lock was held elsewhere; nothing ran for that job. */
|
|
1606
1672
|
busy?: LockedMaintenanceJob[];
|
|
1607
1673
|
/**
|
|
@@ -2895,6 +2961,18 @@ declare class JobManager {
|
|
|
2895
2961
|
private _notifyStatusSubscribers;
|
|
2896
2962
|
}
|
|
2897
2963
|
|
|
2964
|
+
/**
|
|
2965
|
+
* Reserved abstain sentinel (specs/system-one-config §5): appended to the
|
|
2966
|
+
* classifier choice question so a classifier can decline every offered
|
|
2967
|
+
* manifest slug. Comparison is case-insensitive and whitespace-trimmed, and
|
|
2968
|
+
* the reservation is enforced on the write paths (`setOntologyManifests`,
|
|
2969
|
+
* `mergeEmergentUpdates`) — per-read `validateManifest` is deliberately
|
|
2970
|
+
* untouched (coordination decree C4), so a legacy manifest carrying the slug
|
|
2971
|
+
* only forecloses the classifier fast path; it never breaks reads.
|
|
2972
|
+
*/
|
|
2973
|
+
declare const ONTOLOGY_ABSTAIN_SENTINEL = "none_of_these";
|
|
2974
|
+
/** True when a raw slug is the reserved abstain sentinel (case/trim-insensitive). */
|
|
2975
|
+
declare function isReservedAbstainSlug(raw: unknown): boolean;
|
|
2898
2976
|
declare function validateManifest(manifest: OntologyManifest): void;
|
|
2899
2977
|
type EdgeDropReason = 'no_source_type' | 'invalid_shape' | 'type_not_in_manifest' | 'target_not_found' | 'target_type_mismatch';
|
|
2900
2978
|
/** A dropped LLM-proposed edge. Slugs only — `target_title` is content and is never recorded. */
|
|
@@ -3849,6 +3927,13 @@ interface LibrarianResult {
|
|
|
3849
3927
|
declare const ONTOLOGY_BACKFILL_BATCH_SIZE = 25;
|
|
3850
3928
|
declare const ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS = 40000;
|
|
3851
3929
|
declare const ONTOLOGY_BACKFILL_RECHECK_MS: number;
|
|
3930
|
+
/**
|
|
3931
|
+
* Upper bound on one classifier choice question (specs/system-one-config §5):
|
|
3932
|
+
* manifest slugs plus the abstain sentinel. A manifest with more slugs than
|
|
3933
|
+
* the cap allows, or carrying the reserved sentinel slug, falls back to the
|
|
3934
|
+
* generative path for the pass.
|
|
3935
|
+
*/
|
|
3936
|
+
declare const CLASSIFIER_MAX_CHOICES: 255;
|
|
3852
3937
|
|
|
3853
3938
|
/**
|
|
3854
3939
|
* Heal candidates fetched per pass. Bounds the pool runBatched draws from, not
|
|
@@ -3994,6 +4079,21 @@ declare class MaintenanceService {
|
|
|
3994
4079
|
classifier?: 'auto' | 'llm';
|
|
3995
4080
|
tokenBudget?: number;
|
|
3996
4081
|
}): Promise<OntologyBackfillResult>;
|
|
4082
|
+
/**
|
|
4083
|
+
* Scheduler read view (specs/system-one-config §8): untyped facts still
|
|
4084
|
+
* eligible for typing this pass — outside the 7-day recheck cooldown — or 0
|
|
4085
|
+
* when ontology is off for the entity (nothing is ever eligible there).
|
|
4086
|
+
* Read-only: never materializes a seed manifest, never writes.
|
|
4087
|
+
*/
|
|
4088
|
+
pendingOntologyBackfill(entityId: string): Promise<number>;
|
|
4089
|
+
/**
|
|
4090
|
+
* Emit `ontology_backfill_held` (severity `info`) when the scheduler found
|
|
4091
|
+
* the entity's `ontologyBackfill` lock held by another job. The lock state
|
|
4092
|
+
* names no content, so the fixed template carries all the information a
|
|
4093
|
+
* host needs; `JobManager.isBlocked` does not identify the blocker and the
|
|
4094
|
+
* diagnostic detail surface stays identifier-typed.
|
|
4095
|
+
*/
|
|
4096
|
+
noteOntologyBackfillHeld(entityId: string): void;
|
|
3997
4097
|
/**
|
|
3998
4098
|
* Re-embed facts, honouring per-row failure markers and exponential backoff.
|
|
3999
4099
|
*
|
|
@@ -4137,12 +4237,33 @@ declare class MaintenanceService {
|
|
|
4137
4237
|
classifier?: 'auto' | 'llm';
|
|
4138
4238
|
tokenBudget?: number;
|
|
4139
4239
|
meter?: UsageMeter;
|
|
4240
|
+
/** Diagnostic trigger stamped on every diagnostic this pass emits. Default `'call'`. */
|
|
4241
|
+
trigger?: WikiDiagnosticTrigger;
|
|
4140
4242
|
}): Promise<OntologyBackfillResult>;
|
|
4141
4243
|
/**
|
|
4142
|
-
*
|
|
4143
|
-
*
|
|
4144
|
-
*
|
|
4145
|
-
*
|
|
4244
|
+
* Low-confidence routing (specs/system-one-config §4): `'leave'` (default)
|
|
4245
|
+
* keeps classifier abstains/low-confidence facts untyped and
|
|
4246
|
+
* cooldown-stamped; `'llm'` escalates them to the generative step. Invalid
|
|
4247
|
+
* config warns once and is treated as unset. Cost/quality setting, not a
|
|
4248
|
+
* safety mechanism — it cannot catch a confidently wrong classifier.
|
|
4249
|
+
*/
|
|
4250
|
+
private resolveSystemOneOnLowConfidence;
|
|
4251
|
+
/**
|
|
4252
|
+
* Generative-mode backfill step: the original `generateText` pass over
|
|
4253
|
+
* `candidates`. Also the escalation target of the classifier step (§4) —
|
|
4254
|
+
* there `candidates` holds only the escalated facts and `batchSize` is
|
|
4255
|
+
* sized to send them in one batch.
|
|
4256
|
+
*/
|
|
4257
|
+
private _runGenerativeBackfill;
|
|
4258
|
+
/**
|
|
4259
|
+
* Classifier-mode backfill (spec §7.3, S1-0 §5): one `choice` question per
|
|
4260
|
+
* untyped fact over the effective manifest's node-type slugs plus the
|
|
4261
|
+
* reserved abstain sentinel. Accepted answers go through
|
|
4262
|
+
* `_applyOntologyBackfillBatch` exactly like LLM classifications. No edges
|
|
4263
|
+
* are proposed. Abstains and low-confidence answers are cooldown-stamped
|
|
4264
|
+
* omissions under `onLowConfidence: 'leave'`; under `'llm'` they are
|
|
4265
|
+
* returned un-stamped in `escalated` for the generative step. Always
|
|
4266
|
+
* returns the `OntologyBackfillResult` for its step plus escalation state.
|
|
4146
4267
|
*/
|
|
4147
4268
|
private _runClassifierBackfill;
|
|
4148
4269
|
/**
|
|
@@ -4193,6 +4314,8 @@ declare class MaintenanceScheduler {
|
|
|
4193
4314
|
private vectorRemovalService;
|
|
4194
4315
|
private vectorRemovalRepo;
|
|
4195
4316
|
constructor(db: SQLiteAdapter, options: WikiOptions, maintenanceService: MaintenanceService, metadataRepo: MetadataRepository, eventRepo: EventRepository, entryRepo: EntryRepository, jobManager: JobManager, vectorRemovalService: VectorRemovalService, vectorRemovalRepo: VectorRemovalRepository);
|
|
4317
|
+
/** Batch size for scheduler-driven ontology passes; resolved once (spec §8). */
|
|
4318
|
+
private readonly schedulerBatchSize;
|
|
4196
4319
|
/**
|
|
4197
4320
|
* Entities with **any** pending work only, sorted by `pendingEvents` desc
|
|
4198
4321
|
* then `entityId` asc. Token estimate is ceil(pending summary chars / 4),
|
|
@@ -5058,5 +5181,5 @@ declare class WikiMemory {
|
|
|
5058
5181
|
setGeneratedByTask(taskId: string, entityId: string, actor: string): Promise<void>;
|
|
5059
5182
|
}
|
|
5060
5183
|
|
|
5061
|
-
export {
|
|
5062
|
-
export type {
|
|
5184
|
+
export { ONTOLOGY_BACKFILL_RECHECK_MS as $, HEAL_RECHECK_MS as A, HOOK_TIMEOUT_MARKER as B, CLASSIFIER_MAX_CHOICES as C, HEAL_BATCH_SIZE as H, ONTOLOGY_ABSTAIN_SENTINEL as Y, ONTOLOGY_BACKFILL_BATCH_SIZE as Z, ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS as _, EmbeddingService as a$, WikiDraftNotFound as aB, WikiDuplicateHashError as aC, WikiExternalDeletionError as aF, WikiGraphNodeOwnershipConflict as aH, WikiIngestEmptyError as aI, WikiInvalidReadOptions as aK, WikiMigrationRequiredError as aN, WikiParseError as aP, WikiSearchUnavailableError as aQ, WikiSourceRefHashCollision as aS, WikiStrictOntologyViolation as aT, WikiSupersedeError as aU, WikiTransactionError as aX, isReservedAbstainSlug as aY, isWikiSearchUnavailableError as aZ, validateManifest as a_, PromptService as aa, PrunePartialFailureError as ab, WikiBusyError as as, ImportExportService as b0, IngestionService as b1, JobManager as b2, MaintenanceService as b3, RetrievalService as b4, SearchService as b5, WriteService as b6, WikiMemory as e, CheckpointIncompleteError as f, EraseStepError as r };
|
|
5185
|
+
export type { DegradedRecord as D, EmbedFactResult as E, FormatContextOptions as F, GraphNeighborhood as G, HealResult as I, ImportDumpResult as J, IngestDocumentResult as K, LLMProvider as L, MemoryBundle as M, LibrarianConfig as N, OntologyMode as O, LibrarianGateConfig as P, LockedMaintenanceJob as Q, ReadOptions as R, SQLiteAdapter as S, MaintenanceJob as T, MaintenanceStopReason as U, MemoryDumpEntity as V, WikiConfig as W, MigrationPolicy as X, MemoryDump as a, OntologyBackfillResult as a0, OntologyEdgeType as a1, OntologyManifest as a2, OntologyNodeType as a3, OntologyPromptContext as a4, OntologyUpdates as a5, PendingMaintenance as a6, PendingMigrationWork as a7, PendingSourceStatus as a8, PromptOverrides as a9, WikiDiagnosticTrigger as aA, WikiEdge as aD, WikiEvent as aE, WikiFact as aG, WikiInstructions as aJ, WikiLintReport as aL, WikiMemoryTestAccess as aM, WikiOutboxEvent as aO, WikiSourcePointer as aR, WikiSupersedeReason as aV, WikiTask as aW, ReembedResult as ac, RememberInput as ad, RunPendingMaintenanceOptions as ae, RunPendingMaintenanceResult as af, SourcePassage as ag, StoreSourceResult as ah, StoredSource as ai, StoredSourceDump as aj, StoredSourceSummary as ak, SupersedeReplacement as al, SystemOneConfig as am, SystemOneThresholdSite as an, VectorRanker as ao, VectorRankerFallback as ap, VectorRankerRankArgs as aq, VectorRankerSemanticResult as ar, WikiBusyOperation as at, WikiCheckpoint as au, WikiDiagnostic as av, WikiDiagnosticCode as aw, WikiDiagnosticDetail as ax, WikiDiagnosticOperation as ay, WikiDiagnosticSeverity as az, FormattedMemoryDump as b, OntologyConfig as c, WikiOptions as d, ChunkFailure as g, ClassifierAnswer as h, ClassifierQuestion as i, ClassifyRequest as j, ClassifyResponse as k, DraftPage as l, EmbedFailureKind as m, EmbeddingMarkerKind as n, EntityMaintenanceReport as o, EntityStatus as p, EraseReport as q, ExtractedFact as s, ExtractedFactEdge as t, ExtractedFactWithOntology as u, ExtractedTask as v, ForgetParams as w, ForgetResult as x, GraphTraversalOptions as y, GroundingConfig as z };
|
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import { OkfSource, OkfVerifiedEntry, OkfSourceUsageWindow } from '@equationalapplications/core-okf';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* System-One config surface (specs/system-one-config §1, §10).
|
|
5
|
+
*
|
|
6
|
+
* Boundary: S1-0 owns exactly `typing`, `minConfidence` (with the `'typing'`
|
|
7
|
+
* member), and `onLowConfidence`. Later PRs add more threshold sites
|
|
8
|
+
* (`'edges'`, `'resolve'`, `'healScreen'`) — each as one new line in
|
|
9
|
+
* `SystemOneThresholdSite`, so sibling PRs merge cleanly. Nothing outside
|
|
10
|
+
* that boundary belongs here.
|
|
11
|
+
*/
|
|
12
|
+
/** Sites a System-One threshold can apply to. Exactly one member today (§10 fence). */
|
|
13
|
+
type SystemOneThresholdSite = 'typing';
|
|
14
|
+
interface SystemOneConfig {
|
|
15
|
+
/**
|
|
16
|
+
* Typing mode for ontology backfill. `'auto'` uses
|
|
17
|
+
* `llmProvider.classify` when present (no edges proposed); `'llm'`
|
|
18
|
+
* always uses the generative path. Default `'llm'`.
|
|
19
|
+
*/
|
|
20
|
+
typing?: 'auto' | 'llm';
|
|
21
|
+
/** Per-site minimum confidence. Only the classifier path reads a floor. */
|
|
22
|
+
minConfidence?: Partial<Record<SystemOneThresholdSite, number>>;
|
|
23
|
+
/**
|
|
24
|
+
* Routing for classifier low-confidence outcomes (and abstains).
|
|
25
|
+
* `'leave'` (default) keeps them untyped and cooldown-stamped; `'llm'`
|
|
26
|
+
* escalates them to the generative step of the same pass. A cost and
|
|
27
|
+
* quality setting, not a safety mechanism; a no-op when typing resolves
|
|
28
|
+
* `'llm'`.
|
|
29
|
+
*/
|
|
30
|
+
onLowConfidence?: 'leave' | 'llm';
|
|
31
|
+
}
|
|
32
|
+
|
|
3
33
|
/**
|
|
4
34
|
* Platform-agnostic SQLite driver interface.
|
|
5
35
|
* Each platform package (wiki-expo, wiki-react) provides an adapter
|
|
@@ -53,6 +83,7 @@ interface PromptOverrides {
|
|
|
53
83
|
guidance?: string;
|
|
54
84
|
}
|
|
55
85
|
type OntologyMode = 'strict' | 'emergent' | 'off';
|
|
86
|
+
|
|
56
87
|
interface OntologyNodeType {
|
|
57
88
|
type: string;
|
|
58
89
|
description: string;
|
|
@@ -98,6 +129,13 @@ interface OntologyConfig {
|
|
|
98
129
|
backfillClassifier?: 'auto' | 'llm';
|
|
99
130
|
/** Minimum classifier confidence to apply a node type. Finite, in [0, 1]. Default 0.5. */
|
|
100
131
|
classifyMinConfidence?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Batch size for scheduler-driven (`runPendingMaintenance`) ontology
|
|
134
|
+
* backfill passes. Finite integer >= 1; invalid values fall back to the
|
|
135
|
+
* default. Default 50. Does not change the manual `runOntologyBackfill`
|
|
136
|
+
* default (25).
|
|
137
|
+
*/
|
|
138
|
+
schedulerBatchSize?: number;
|
|
101
139
|
}
|
|
102
140
|
interface ExtractedFactEdge {
|
|
103
141
|
edge_type: string;
|
|
@@ -112,7 +150,7 @@ interface OntologyPromptContext {
|
|
|
112
150
|
ontologyModeInstructions: string;
|
|
113
151
|
}
|
|
114
152
|
/** Result of a single ontology backfill run. Omissions (facts the model declined
|
|
115
|
-
* to classify) are
|
|
153
|
+
* to classify) are carried by `abstained`, not derived from the other counters. */
|
|
116
154
|
interface OntologyBackfillResult {
|
|
117
155
|
/** Untyped facts sent to the model this run. */
|
|
118
156
|
scanned: number;
|
|
@@ -120,6 +158,12 @@ interface OntologyBackfillResult {
|
|
|
120
158
|
typed: number;
|
|
121
159
|
/** Model classifications rejected (unknown/duplicate id, non-manifest type). */
|
|
122
160
|
failedValidation: number;
|
|
161
|
+
/** Untyped facts the typing model declined to classify — classifier abstains under
|
|
162
|
+
* `onLowConfidence: 'leave'`, and generative omissions (facts the model sent no
|
|
163
|
+
* classification for, including the `changes === 0` race). `scanned − typed −
|
|
164
|
+
* failedValidation` no longer pins this down once escalation routes facts
|
|
165
|
+
* between steps (specs/system-one-config §4-§5). */
|
|
166
|
+
abstained: number;
|
|
123
167
|
/** Edges persisted. */
|
|
124
168
|
edgesAdded: number;
|
|
125
169
|
/** Untyped facts still eligible after this run — safe host convergence signal: loop while > 0.
|
|
@@ -353,6 +397,13 @@ interface WikiConfig {
|
|
|
353
397
|
*/
|
|
354
398
|
enableOutbox?: boolean;
|
|
355
399
|
ontology?: OntologyConfig;
|
|
400
|
+
/**
|
|
401
|
+
* System-One config surface (specs/system-one-config §1): typing mode,
|
|
402
|
+
* per-site confidence floor, and low-confidence routing. Resolution chains
|
|
403
|
+
* live in `utils/engineDefaults.ts` (`resolveSystemOneTyping`,
|
|
404
|
+
* `resolveTypingMinConfidence`).
|
|
405
|
+
*/
|
|
406
|
+
systemOne?: SystemOneConfig;
|
|
356
407
|
/** Default node cap for traverseGraph(), unless overridden per-call. Default 20. */
|
|
357
408
|
maxTraversalNodes?: number;
|
|
358
409
|
/**
|
|
@@ -873,7 +924,7 @@ type WikiDiagnosticSeverity = 'info' | 'warn' | 'error';
|
|
|
873
924
|
* Closed for this release series, but new codes are added in minor versions:
|
|
874
925
|
* hosts must tolerate codes they do not recognize.
|
|
875
926
|
*/
|
|
876
|
-
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' | 'context_overflow_skipped' | 'llm_usage' | 'librarian_gate' | 'librarian_op_rejected' | 'contradicts_document' | 'resolve_failed' | 'read_budget' | 'event_retention_held' | 'prune_checkpoint_incomplete' | 'erase_secure_delete_off' | 'erase_entity_skipped' | 'erase_retired_vtab_undroppable' | 'erase_fts_orphan_cleared' | 'erase_retired_remaining' | 'erase_tombstones_remaining' | 'erase_retired_read_failed' | 'erase_registry_sweep_skipped' | 'import_tombstone_skipped' | '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';
|
|
927
|
+
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' | 'classification_abstained' | 'node_type_assigned' | 'context_overflow_skipped' | 'llm_usage' | 'librarian_gate' | 'librarian_op_rejected' | 'contradicts_document' | 'ontology_backfill_held' | 'resolve_failed' | 'read_budget' | 'event_retention_held' | 'prune_checkpoint_incomplete' | 'erase_secure_delete_off' | 'erase_entity_skipped' | 'erase_retired_vtab_undroppable' | 'erase_fts_orphan_cleared' | 'erase_retired_remaining' | 'erase_tombstones_remaining' | 'erase_retired_read_failed' | 'erase_registry_sweep_skipped' | 'import_tombstone_skipped' | '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';
|
|
877
928
|
/** The service run that emitted the diagnostic. */
|
|
878
929
|
type WikiDiagnosticOperation = 'ingest' | 'upsertGraph' | 'librarian' | 'heal' | 'ontologyBackfill' | 'reembed' | 'importDump' | 'write' | 'supersede' | 'remember' | 'read' | 'prune' | 'externalDeletion' | 'sourceStore' | 'erase';
|
|
879
930
|
/** `'auto'` when a write threshold started the run (auto-librarian / auto-heal); `'call'` when the host did. */
|
|
@@ -894,6 +945,10 @@ interface WikiDiagnosticDetail {
|
|
|
894
945
|
itemIndex?: number;
|
|
895
946
|
/** Machine-readable sub-reason, e.g. `'target_not_found'`. */
|
|
896
947
|
reason?: string;
|
|
948
|
+
/** `node_type_assigned` only: the manifest slug applied to the fact. */
|
|
949
|
+
okfType?: string;
|
|
950
|
+
/** Typing receipts only: which path produced the outcome. */
|
|
951
|
+
writer?: 'classifier' | 'llm';
|
|
897
952
|
/** Aggregated `ingest_chunk_failed` only; the first 20 failed chunk indexes. */
|
|
898
953
|
chunkIndexes?: number[];
|
|
899
954
|
/** Aggregated emissions only. */
|
|
@@ -1554,7 +1609,7 @@ interface WikiInstructions {
|
|
|
1554
1609
|
*/
|
|
1555
1610
|
ontologyBackfill: string;
|
|
1556
1611
|
}
|
|
1557
|
-
type MaintenanceJob = 'librarian' | 'heal' | 'reembed' | 'externalDeletions';
|
|
1612
|
+
type MaintenanceJob = 'librarian' | 'heal' | 'reembed' | 'externalDeletions' | 'ontologyBackfill';
|
|
1558
1613
|
/** The jobs that hold a per-entity lock (everything but `externalDeletions`). */
|
|
1559
1614
|
type LockedMaintenanceJob = Exclude<MaintenanceJob, 'externalDeletions'>;
|
|
1560
1615
|
interface PendingMaintenance {
|
|
@@ -1573,6 +1628,13 @@ interface PendingMaintenance {
|
|
|
1573
1628
|
reembedPending: boolean;
|
|
1574
1629
|
/** Removals still owed to the host's vector index for this entity (absent when none). */
|
|
1575
1630
|
pendingExternalDeletions?: number;
|
|
1631
|
+
/**
|
|
1632
|
+
* Untyped facts still eligible for ontology typing (absent when none).
|
|
1633
|
+
* Counts only facts outside the recheck cooldown — `deferred` ones are
|
|
1634
|
+
* waiting, not work the next pass will attempt. Always false-shaped (absent)
|
|
1635
|
+
* while ontology is off for the entity.
|
|
1636
|
+
*/
|
|
1637
|
+
pendingOntologyBackfill?: number;
|
|
1576
1638
|
}
|
|
1577
1639
|
interface RunPendingMaintenanceOptions {
|
|
1578
1640
|
/** Default: every entity with pending work. */
|
|
@@ -1581,7 +1643,7 @@ interface RunPendingMaintenanceOptions {
|
|
|
1581
1643
|
tokenBudget?: number;
|
|
1582
1644
|
/** Wall-clock milliseconds from the call. Checked between units; a unit in flight is never interrupted. */
|
|
1583
1645
|
deadlineMs?: number;
|
|
1584
|
-
/** Default all
|
|
1646
|
+
/** Default all five. `externalDeletions` runs first and is not metered by `tokenBudget`. */
|
|
1585
1647
|
jobs?: MaintenanceJob[];
|
|
1586
1648
|
}
|
|
1587
1649
|
type MaintenanceStopReason = {
|
|
@@ -1592,7 +1654,7 @@ type MaintenanceStopReason = {
|
|
|
1592
1654
|
reason: 'budget_exhausted';
|
|
1593
1655
|
} | {
|
|
1594
1656
|
reason: 'budget_too_small';
|
|
1595
|
-
job: 'librarian' | 'heal';
|
|
1657
|
+
job: 'librarian' | 'heal' | 'ontologyBackfill';
|
|
1596
1658
|
entityId: string;
|
|
1597
1659
|
requiredEstimate: number;
|
|
1598
1660
|
};
|
|
@@ -1602,6 +1664,10 @@ interface EntityMaintenanceReport {
|
|
|
1602
1664
|
factsWritten: number;
|
|
1603
1665
|
healPasses: number;
|
|
1604
1666
|
reembedded: boolean;
|
|
1667
|
+
/** Scheduler-driven ontology-backfill passes run for this entity (0 when the job was off). */
|
|
1668
|
+
ontologyBackfillPasses: number;
|
|
1669
|
+
/** Facts that received an okf_type during this run's ontology-backfill passes. */
|
|
1670
|
+
typed: number;
|
|
1605
1671
|
/** Set when a lock was held elsewhere; nothing ran for that job. */
|
|
1606
1672
|
busy?: LockedMaintenanceJob[];
|
|
1607
1673
|
/**
|
|
@@ -2895,6 +2961,18 @@ declare class JobManager {
|
|
|
2895
2961
|
private _notifyStatusSubscribers;
|
|
2896
2962
|
}
|
|
2897
2963
|
|
|
2964
|
+
/**
|
|
2965
|
+
* Reserved abstain sentinel (specs/system-one-config §5): appended to the
|
|
2966
|
+
* classifier choice question so a classifier can decline every offered
|
|
2967
|
+
* manifest slug. Comparison is case-insensitive and whitespace-trimmed, and
|
|
2968
|
+
* the reservation is enforced on the write paths (`setOntologyManifests`,
|
|
2969
|
+
* `mergeEmergentUpdates`) — per-read `validateManifest` is deliberately
|
|
2970
|
+
* untouched (coordination decree C4), so a legacy manifest carrying the slug
|
|
2971
|
+
* only forecloses the classifier fast path; it never breaks reads.
|
|
2972
|
+
*/
|
|
2973
|
+
declare const ONTOLOGY_ABSTAIN_SENTINEL = "none_of_these";
|
|
2974
|
+
/** True when a raw slug is the reserved abstain sentinel (case/trim-insensitive). */
|
|
2975
|
+
declare function isReservedAbstainSlug(raw: unknown): boolean;
|
|
2898
2976
|
declare function validateManifest(manifest: OntologyManifest): void;
|
|
2899
2977
|
type EdgeDropReason = 'no_source_type' | 'invalid_shape' | 'type_not_in_manifest' | 'target_not_found' | 'target_type_mismatch';
|
|
2900
2978
|
/** A dropped LLM-proposed edge. Slugs only — `target_title` is content and is never recorded. */
|
|
@@ -3849,6 +3927,13 @@ interface LibrarianResult {
|
|
|
3849
3927
|
declare const ONTOLOGY_BACKFILL_BATCH_SIZE = 25;
|
|
3850
3928
|
declare const ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS = 40000;
|
|
3851
3929
|
declare const ONTOLOGY_BACKFILL_RECHECK_MS: number;
|
|
3930
|
+
/**
|
|
3931
|
+
* Upper bound on one classifier choice question (specs/system-one-config §5):
|
|
3932
|
+
* manifest slugs plus the abstain sentinel. A manifest with more slugs than
|
|
3933
|
+
* the cap allows, or carrying the reserved sentinel slug, falls back to the
|
|
3934
|
+
* generative path for the pass.
|
|
3935
|
+
*/
|
|
3936
|
+
declare const CLASSIFIER_MAX_CHOICES: 255;
|
|
3852
3937
|
|
|
3853
3938
|
/**
|
|
3854
3939
|
* Heal candidates fetched per pass. Bounds the pool runBatched draws from, not
|
|
@@ -3994,6 +4079,21 @@ declare class MaintenanceService {
|
|
|
3994
4079
|
classifier?: 'auto' | 'llm';
|
|
3995
4080
|
tokenBudget?: number;
|
|
3996
4081
|
}): Promise<OntologyBackfillResult>;
|
|
4082
|
+
/**
|
|
4083
|
+
* Scheduler read view (specs/system-one-config §8): untyped facts still
|
|
4084
|
+
* eligible for typing this pass — outside the 7-day recheck cooldown — or 0
|
|
4085
|
+
* when ontology is off for the entity (nothing is ever eligible there).
|
|
4086
|
+
* Read-only: never materializes a seed manifest, never writes.
|
|
4087
|
+
*/
|
|
4088
|
+
pendingOntologyBackfill(entityId: string): Promise<number>;
|
|
4089
|
+
/**
|
|
4090
|
+
* Emit `ontology_backfill_held` (severity `info`) when the scheduler found
|
|
4091
|
+
* the entity's `ontologyBackfill` lock held by another job. The lock state
|
|
4092
|
+
* names no content, so the fixed template carries all the information a
|
|
4093
|
+
* host needs; `JobManager.isBlocked` does not identify the blocker and the
|
|
4094
|
+
* diagnostic detail surface stays identifier-typed.
|
|
4095
|
+
*/
|
|
4096
|
+
noteOntologyBackfillHeld(entityId: string): void;
|
|
3997
4097
|
/**
|
|
3998
4098
|
* Re-embed facts, honouring per-row failure markers and exponential backoff.
|
|
3999
4099
|
*
|
|
@@ -4137,12 +4237,33 @@ declare class MaintenanceService {
|
|
|
4137
4237
|
classifier?: 'auto' | 'llm';
|
|
4138
4238
|
tokenBudget?: number;
|
|
4139
4239
|
meter?: UsageMeter;
|
|
4240
|
+
/** Diagnostic trigger stamped on every diagnostic this pass emits. Default `'call'`. */
|
|
4241
|
+
trigger?: WikiDiagnosticTrigger;
|
|
4140
4242
|
}): Promise<OntologyBackfillResult>;
|
|
4141
4243
|
/**
|
|
4142
|
-
*
|
|
4143
|
-
*
|
|
4144
|
-
*
|
|
4145
|
-
*
|
|
4244
|
+
* Low-confidence routing (specs/system-one-config §4): `'leave'` (default)
|
|
4245
|
+
* keeps classifier abstains/low-confidence facts untyped and
|
|
4246
|
+
* cooldown-stamped; `'llm'` escalates them to the generative step. Invalid
|
|
4247
|
+
* config warns once and is treated as unset. Cost/quality setting, not a
|
|
4248
|
+
* safety mechanism — it cannot catch a confidently wrong classifier.
|
|
4249
|
+
*/
|
|
4250
|
+
private resolveSystemOneOnLowConfidence;
|
|
4251
|
+
/**
|
|
4252
|
+
* Generative-mode backfill step: the original `generateText` pass over
|
|
4253
|
+
* `candidates`. Also the escalation target of the classifier step (§4) —
|
|
4254
|
+
* there `candidates` holds only the escalated facts and `batchSize` is
|
|
4255
|
+
* sized to send them in one batch.
|
|
4256
|
+
*/
|
|
4257
|
+
private _runGenerativeBackfill;
|
|
4258
|
+
/**
|
|
4259
|
+
* Classifier-mode backfill (spec §7.3, S1-0 §5): one `choice` question per
|
|
4260
|
+
* untyped fact over the effective manifest's node-type slugs plus the
|
|
4261
|
+
* reserved abstain sentinel. Accepted answers go through
|
|
4262
|
+
* `_applyOntologyBackfillBatch` exactly like LLM classifications. No edges
|
|
4263
|
+
* are proposed. Abstains and low-confidence answers are cooldown-stamped
|
|
4264
|
+
* omissions under `onLowConfidence: 'leave'`; under `'llm'` they are
|
|
4265
|
+
* returned un-stamped in `escalated` for the generative step. Always
|
|
4266
|
+
* returns the `OntologyBackfillResult` for its step plus escalation state.
|
|
4146
4267
|
*/
|
|
4147
4268
|
private _runClassifierBackfill;
|
|
4148
4269
|
/**
|
|
@@ -4193,6 +4314,8 @@ declare class MaintenanceScheduler {
|
|
|
4193
4314
|
private vectorRemovalService;
|
|
4194
4315
|
private vectorRemovalRepo;
|
|
4195
4316
|
constructor(db: SQLiteAdapter, options: WikiOptions, maintenanceService: MaintenanceService, metadataRepo: MetadataRepository, eventRepo: EventRepository, entryRepo: EntryRepository, jobManager: JobManager, vectorRemovalService: VectorRemovalService, vectorRemovalRepo: VectorRemovalRepository);
|
|
4317
|
+
/** Batch size for scheduler-driven ontology passes; resolved once (spec §8). */
|
|
4318
|
+
private readonly schedulerBatchSize;
|
|
4196
4319
|
/**
|
|
4197
4320
|
* Entities with **any** pending work only, sorted by `pendingEvents` desc
|
|
4198
4321
|
* then `entityId` asc. Token estimate is ceil(pending summary chars / 4),
|
|
@@ -5058,5 +5181,5 @@ declare class WikiMemory {
|
|
|
5058
5181
|
setGeneratedByTask(taskId: string, entityId: string, actor: string): Promise<void>;
|
|
5059
5182
|
}
|
|
5060
5183
|
|
|
5061
|
-
export {
|
|
5062
|
-
export type {
|
|
5184
|
+
export { ONTOLOGY_BACKFILL_RECHECK_MS as $, HEAL_RECHECK_MS as A, HOOK_TIMEOUT_MARKER as B, CLASSIFIER_MAX_CHOICES as C, HEAL_BATCH_SIZE as H, ONTOLOGY_ABSTAIN_SENTINEL as Y, ONTOLOGY_BACKFILL_BATCH_SIZE as Z, ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS as _, EmbeddingService as a$, WikiDraftNotFound as aB, WikiDuplicateHashError as aC, WikiExternalDeletionError as aF, WikiGraphNodeOwnershipConflict as aH, WikiIngestEmptyError as aI, WikiInvalidReadOptions as aK, WikiMigrationRequiredError as aN, WikiParseError as aP, WikiSearchUnavailableError as aQ, WikiSourceRefHashCollision as aS, WikiStrictOntologyViolation as aT, WikiSupersedeError as aU, WikiTransactionError as aX, isReservedAbstainSlug as aY, isWikiSearchUnavailableError as aZ, validateManifest as a_, PromptService as aa, PrunePartialFailureError as ab, WikiBusyError as as, ImportExportService as b0, IngestionService as b1, JobManager as b2, MaintenanceService as b3, RetrievalService as b4, SearchService as b5, WriteService as b6, WikiMemory as e, CheckpointIncompleteError as f, EraseStepError as r };
|
|
5185
|
+
export type { DegradedRecord as D, EmbedFactResult as E, FormatContextOptions as F, GraphNeighborhood as G, HealResult as I, ImportDumpResult as J, IngestDocumentResult as K, LLMProvider as L, MemoryBundle as M, LibrarianConfig as N, OntologyMode as O, LibrarianGateConfig as P, LockedMaintenanceJob as Q, ReadOptions as R, SQLiteAdapter as S, MaintenanceJob as T, MaintenanceStopReason as U, MemoryDumpEntity as V, WikiConfig as W, MigrationPolicy as X, MemoryDump as a, OntologyBackfillResult as a0, OntologyEdgeType as a1, OntologyManifest as a2, OntologyNodeType as a3, OntologyPromptContext as a4, OntologyUpdates as a5, PendingMaintenance as a6, PendingMigrationWork as a7, PendingSourceStatus as a8, PromptOverrides as a9, WikiDiagnosticTrigger as aA, WikiEdge as aD, WikiEvent as aE, WikiFact as aG, WikiInstructions as aJ, WikiLintReport as aL, WikiMemoryTestAccess as aM, WikiOutboxEvent as aO, WikiSourcePointer as aR, WikiSupersedeReason as aV, WikiTask as aW, ReembedResult as ac, RememberInput as ad, RunPendingMaintenanceOptions as ae, RunPendingMaintenanceResult as af, SourcePassage as ag, StoreSourceResult as ah, StoredSource as ai, StoredSourceDump as aj, StoredSourceSummary as ak, SupersedeReplacement as al, SystemOneConfig as am, SystemOneThresholdSite as an, VectorRanker as ao, VectorRankerFallback as ap, VectorRankerRankArgs as aq, VectorRankerSemanticResult as ar, WikiBusyOperation as at, WikiCheckpoint as au, WikiDiagnostic as av, WikiDiagnosticCode as aw, WikiDiagnosticDetail as ax, WikiDiagnosticOperation as ay, WikiDiagnosticSeverity as az, FormattedMemoryDump as b, OntologyConfig as c, WikiOptions as d, ChunkFailure as g, ClassifierAnswer as h, ClassifierQuestion as i, ClassifyRequest as j, ClassifyResponse as k, DraftPage as l, EmbedFailureKind as m, EmbeddingMarkerKind as n, EntityMaintenanceReport as o, EntityStatus as p, EraseReport as q, ExtractedFact as s, ExtractedFactEdge as t, ExtractedFactWithOntology as u, ExtractedTask as v, ForgetParams as w, ForgetResult as x, GraphTraversalOptions as y, GroundingConfig as z };
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a$ as EmbeddingService, b0 as ImportExportService, b1 as IngestionService, b2 as JobManager, b2 as JobManagerType, b3 as MaintenanceService, b4 as RetrievalService, b5 as SearchService, b5 as SearchServiceType, aM as WikiMemoryTestAccess, b6 as WriteService } from './testing-BBeQQIYp.mjs';
|
|
2
2
|
import '@equationalapplications/core-okf';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a$ as EmbeddingService, b0 as ImportExportService, b1 as IngestionService, b2 as JobManager, b2 as JobManagerType, b3 as MaintenanceService, b4 as RetrievalService, b5 as SearchService, b5 as SearchServiceType, aM as WikiMemoryTestAccess, b6 as WriteService } from './testing-BBeQQIYp.js';
|
|
2
2
|
import '@equationalapplications/core-okf';
|