@equationalapplications/core-llm-wiki 9.5.1 → 9.5.3
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-Q6ZS2RKS.mjs → chunk-QIS2SGUM.mjs} +287 -26
- package/dist/chunk-QIS2SGUM.mjs.map +1 -0
- package/dist/index.d.mts +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +285 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{testing-BZyrIoJp.d.mts → testing-BA6CedgZ.d.mts} +17 -2
- package/dist/{testing-BZyrIoJp.d.ts → testing-BA6CedgZ.d.ts} +17 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +304 -23
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-Q6ZS2RKS.mjs.map +0 -1
|
@@ -129,8 +129,15 @@ interface OntologyBackfillResult {
|
|
|
129
129
|
/** Untyped facts inside the recheck cooldown. */
|
|
130
130
|
deferred: number;
|
|
131
131
|
/** Facts a batch could not process even alone, skipped so the pass could finish.
|
|
132
|
-
*
|
|
132
|
+
* Counts both unstamped `threw` skips (no cooldown; retried next pass) and stamped
|
|
133
|
+
* `overflow_skip` skips (recheck cooldown, so they reappear as `deferred` next pass). */
|
|
133
134
|
skipped: number;
|
|
135
|
+
/** Present when a token budget stopped the pass early (spec §10.5). Unattempted facts stay
|
|
136
|
+
* eligible (never cooldown-stamped). A host loop runs while `remaining > 0 && !budgetStop`,
|
|
137
|
+
* else a fixed budget never converges. */
|
|
138
|
+
budgetStop?: {
|
|
139
|
+
requiredEstimate: number;
|
|
140
|
+
};
|
|
134
141
|
}
|
|
135
142
|
/** Result of a single `runReembed` sweep. */
|
|
136
143
|
interface ReembedResult {
|
|
@@ -789,6 +796,10 @@ type ClassifierAnswer = {
|
|
|
789
796
|
};
|
|
790
797
|
interface ClassifyResponse {
|
|
791
798
|
answers: Record<string, ClassifierAnswer>;
|
|
799
|
+
usage?: {
|
|
800
|
+
inputTokens: number;
|
|
801
|
+
outputTokens: number;
|
|
802
|
+
};
|
|
792
803
|
}
|
|
793
804
|
/**
|
|
794
805
|
* Result of semantic ranking for a single fact.
|
|
@@ -862,7 +873,7 @@ type WikiDiagnosticSeverity = 'info' | 'warn' | 'error';
|
|
|
862
873
|
* Closed for this release series, but new codes are added in minor versions:
|
|
863
874
|
* hosts must tolerate codes they do not recognize.
|
|
864
875
|
*/
|
|
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' | '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';
|
|
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';
|
|
866
877
|
/** The service run that emitted the diagnostic. */
|
|
867
878
|
type WikiDiagnosticOperation = 'ingest' | 'upsertGraph' | 'librarian' | 'heal' | 'ontologyBackfill' | 'reembed' | 'importDump' | 'write' | 'supersede' | 'remember' | 'read' | 'prune' | 'externalDeletion' | 'sourceStore' | 'erase';
|
|
868
879
|
/** `'auto'` when a write threshold started the run (auto-librarian / auto-heal); `'call'` when the host did. */
|
|
@@ -3981,6 +3992,7 @@ declare class MaintenanceService {
|
|
|
3981
3992
|
promptOverride?: string;
|
|
3982
3993
|
batchSize?: number;
|
|
3983
3994
|
classifier?: 'auto' | 'llm';
|
|
3995
|
+
tokenBudget?: number;
|
|
3984
3996
|
}): Promise<OntologyBackfillResult>;
|
|
3985
3997
|
/**
|
|
3986
3998
|
* Re-embed facts, honouring per-row failure markers and exponential backoff.
|
|
@@ -4123,6 +4135,8 @@ declare class MaintenanceService {
|
|
|
4123
4135
|
promptOverride?: string;
|
|
4124
4136
|
batchSize?: number;
|
|
4125
4137
|
classifier?: 'auto' | 'llm';
|
|
4138
|
+
tokenBudget?: number;
|
|
4139
|
+
meter?: UsageMeter;
|
|
4126
4140
|
}): Promise<OntologyBackfillResult>;
|
|
4127
4141
|
/**
|
|
4128
4142
|
* Classifier-mode backfill (spec §7.3): one `choice` question per untyped
|
|
@@ -4701,6 +4715,7 @@ declare class WikiMemory {
|
|
|
4701
4715
|
promptOverride?: string;
|
|
4702
4716
|
batchSize?: number;
|
|
4703
4717
|
classifier?: 'auto' | 'llm';
|
|
4718
|
+
tokenBudget?: number;
|
|
4704
4719
|
}): Promise<OntologyBackfillResult>;
|
|
4705
4720
|
runReembed(entityId?: string, opts?: {
|
|
4706
4721
|
force?: boolean;
|
|
@@ -129,8 +129,15 @@ interface OntologyBackfillResult {
|
|
|
129
129
|
/** Untyped facts inside the recheck cooldown. */
|
|
130
130
|
deferred: number;
|
|
131
131
|
/** Facts a batch could not process even alone, skipped so the pass could finish.
|
|
132
|
-
*
|
|
132
|
+
* Counts both unstamped `threw` skips (no cooldown; retried next pass) and stamped
|
|
133
|
+
* `overflow_skip` skips (recheck cooldown, so they reappear as `deferred` next pass). */
|
|
133
134
|
skipped: number;
|
|
135
|
+
/** Present when a token budget stopped the pass early (spec §10.5). Unattempted facts stay
|
|
136
|
+
* eligible (never cooldown-stamped). A host loop runs while `remaining > 0 && !budgetStop`,
|
|
137
|
+
* else a fixed budget never converges. */
|
|
138
|
+
budgetStop?: {
|
|
139
|
+
requiredEstimate: number;
|
|
140
|
+
};
|
|
134
141
|
}
|
|
135
142
|
/** Result of a single `runReembed` sweep. */
|
|
136
143
|
interface ReembedResult {
|
|
@@ -789,6 +796,10 @@ type ClassifierAnswer = {
|
|
|
789
796
|
};
|
|
790
797
|
interface ClassifyResponse {
|
|
791
798
|
answers: Record<string, ClassifierAnswer>;
|
|
799
|
+
usage?: {
|
|
800
|
+
inputTokens: number;
|
|
801
|
+
outputTokens: number;
|
|
802
|
+
};
|
|
792
803
|
}
|
|
793
804
|
/**
|
|
794
805
|
* Result of semantic ranking for a single fact.
|
|
@@ -862,7 +873,7 @@ type WikiDiagnosticSeverity = 'info' | 'warn' | 'error';
|
|
|
862
873
|
* Closed for this release series, but new codes are added in minor versions:
|
|
863
874
|
* hosts must tolerate codes they do not recognize.
|
|
864
875
|
*/
|
|
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' | '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';
|
|
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';
|
|
866
877
|
/** The service run that emitted the diagnostic. */
|
|
867
878
|
type WikiDiagnosticOperation = 'ingest' | 'upsertGraph' | 'librarian' | 'heal' | 'ontologyBackfill' | 'reembed' | 'importDump' | 'write' | 'supersede' | 'remember' | 'read' | 'prune' | 'externalDeletion' | 'sourceStore' | 'erase';
|
|
868
879
|
/** `'auto'` when a write threshold started the run (auto-librarian / auto-heal); `'call'` when the host did. */
|
|
@@ -3981,6 +3992,7 @@ declare class MaintenanceService {
|
|
|
3981
3992
|
promptOverride?: string;
|
|
3982
3993
|
batchSize?: number;
|
|
3983
3994
|
classifier?: 'auto' | 'llm';
|
|
3995
|
+
tokenBudget?: number;
|
|
3984
3996
|
}): Promise<OntologyBackfillResult>;
|
|
3985
3997
|
/**
|
|
3986
3998
|
* Re-embed facts, honouring per-row failure markers and exponential backoff.
|
|
@@ -4123,6 +4135,8 @@ declare class MaintenanceService {
|
|
|
4123
4135
|
promptOverride?: string;
|
|
4124
4136
|
batchSize?: number;
|
|
4125
4137
|
classifier?: 'auto' | 'llm';
|
|
4138
|
+
tokenBudget?: number;
|
|
4139
|
+
meter?: UsageMeter;
|
|
4126
4140
|
}): Promise<OntologyBackfillResult>;
|
|
4127
4141
|
/**
|
|
4128
4142
|
* Classifier-mode backfill (spec §7.3): one `choice` question per untyped
|
|
@@ -4701,6 +4715,7 @@ declare class WikiMemory {
|
|
|
4701
4715
|
promptOverride?: string;
|
|
4702
4716
|
batchSize?: number;
|
|
4703
4717
|
classifier?: 'auto' | 'llm';
|
|
4718
|
+
tokenBudget?: number;
|
|
4704
4719
|
}): Promise<OntologyBackfillResult>;
|
|
4705
4720
|
runReembed(entityId?: string, opts?: {
|
|
4706
4721
|
force?: boolean;
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { aW as EmbeddingService, aX as ImportExportService, aY as IngestionService, aZ as JobManager, aZ as JobManagerType, a_ as MaintenanceService, a$ as RetrievalService, b0 as SearchService, b0 as SearchServiceType, aI as WikiMemoryTestAccess, b1 as WriteService } from './testing-
|
|
1
|
+
export { aW as EmbeddingService, aX as ImportExportService, aY as IngestionService, aZ as JobManager, aZ as JobManagerType, a_ as MaintenanceService, a$ as RetrievalService, b0 as SearchService, b0 as SearchServiceType, aI as WikiMemoryTestAccess, b1 as WriteService } from './testing-BA6CedgZ.mjs';
|
|
2
2
|
import '@equationalapplications/core-okf';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { aW as EmbeddingService, aX as ImportExportService, aY as IngestionService, aZ as JobManager, aZ as JobManagerType, a_ as MaintenanceService, a$ as RetrievalService, b0 as SearchService, b0 as SearchServiceType, aI as WikiMemoryTestAccess, b1 as WriteService } from './testing-
|
|
1
|
+
export { aW as EmbeddingService, aX as ImportExportService, aY as IngestionService, aZ as JobManager, aZ as JobManagerType, a_ as MaintenanceService, a$ as RetrievalService, b0 as SearchService, b0 as SearchServiceType, aI as WikiMemoryTestAccess, b1 as WriteService } from './testing-BA6CedgZ.js';
|
|
2
2
|
import '@equationalapplications/core-okf';
|