omnius 1.0.923 → 1.0.925
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/{providerRegistry.d.ts → _types/backend-vllm/providerRegistry.d.ts} +0 -1
- package/dist/_types/backend-vllm/types.d.ts +209 -0
- package/dist/_types/execution/av/media-capability.d.ts +94 -0
- package/dist/_types/execution/delegation-contract.d.ts +102 -0
- package/dist/_types/execution/evidence.d.ts +68 -0
- package/dist/_types/execution/html-source-evidence.d.ts +65 -0
- package/dist/_types/execution/mcp/types.d.ts +169 -0
- package/dist/_types/execution/mutation-contract.d.ts +102 -0
- package/dist/_types/execution/nol/artifacts.d.ts +39 -0
- package/dist/_types/execution/nol/checkpoint-edits.d.ts +98 -0
- package/dist/_types/execution/nol/distributions.d.ts +128 -0
- package/dist/_types/execution/nol/gguf-checkpoint-edits.d.ts +194 -0
- package/dist/_types/execution/nol/gguf-control-reader.d.ts +224 -0
- package/dist/_types/execution/nol/lora-exports.d.ts +129 -0
- package/dist/_types/execution/nol/neuronary.d.ts +212 -0
- package/dist/_types/execution/nol/pytorch-control-reader.d.ts +143 -0
- package/dist/_types/execution/nol/qwen35-head-sites.d.ts +61 -0
- package/dist/_types/execution/nol/worker-assets.d.ts +82 -0
- package/dist/_types/execution/nol/worker-protocol.d.ts +94 -0
- package/dist/_types/execution/page-content-source.d.ts +40 -0
- package/dist/_types/execution/rapid-computer-use/artifact-store.d.ts +21 -0
- package/dist/_types/execution/rapid-computer-use/contracts.d.ts +320 -0
- package/dist/_types/execution/rapid-computer-use/decision.d.ts +70 -0
- package/dist/_types/execution/rapid-computer-use/desktop-verification.d.ts +23 -0
- package/dist/_types/execution/rapid-computer-use/geometry.d.ts +57 -0
- package/dist/_types/execution/rapid-computer-use/planner.d.ts +78 -0
- package/dist/_types/execution/rapid-computer-use/trace.d.ts +80 -0
- package/dist/_types/execution/rapid-computer-use/visual.d.ts +48 -0
- package/dist/_types/execution/shell-runs.d.ts +78 -0
- package/dist/_types/execution/streamed-web-source.d.ts +64 -0
- package/dist/_types/execution/tools/browser-page-fallback.d.ts +25 -0
- package/dist/_types/execution/tools/network-egress-policy.d.ts +30 -0
- package/dist/_types/execution/tools/pdf-native-tables.d.ts +46 -0
- package/dist/_types/execution/tools/todo-store.d.ts +133 -0
- package/dist/_types/execution/tools/web-fetch.d.ts +57 -0
- package/dist/_types/execution/tools/workboard.d.ts +1223 -0
- package/dist/_types/execution/types.d.ts +549 -0
- package/dist/_types/execution/web-source.d.ts +14 -0
- package/dist/_types/memory/artifactReviewSourceIndex.d.ts +133 -0
- package/dist/_types/memory/contextMemoryLedger.d.ts +213 -0
- package/dist/_types/memory/db.d.ts +12 -0
- package/dist/_types/memory/embeddings.d.ts +36 -0
- package/dist/_types/memory/immutableEvidenceStore.d.ts +165 -0
- package/dist/_types/memory/memoryIngestion.d.ts +65 -0
- package/dist/_types/memory/memoryTypes.d.ts +312 -0
- package/dist/_types/memory/sourceCorpusStore.d.ts +331 -0
- package/dist/_types/memory/structuredMemoryStore.d.ts +105 -0
- package/dist/_types/memory/unifiedMemoryStore.d.ts +127 -0
- package/dist/_types/memory/virtualMemory.d.ts +187 -0
- package/dist/_types/orchestrator/agentic-page-content-receipt.d.ts +20 -0
- package/dist/_types/orchestrator/agentic-web-fetch-receipt.d.ts +20 -0
- package/dist/_types/orchestrator/agenticRunner.d.ts +5219 -0
- package/dist/_types/orchestrator/app-state.d.ts +171 -0
- package/dist/_types/orchestrator/artifactClaimCritic.d.ts +63 -0
- package/dist/_types/orchestrator/artifactQuality.d.ts +15 -0
- package/dist/_types/orchestrator/artifactSemanticIntegrity.d.ts +203 -0
- package/dist/_types/orchestrator/canonical-context-projection.d.ts +254 -0
- package/dist/_types/orchestrator/canonical-source-body-projection.d.ts +51 -0
- package/dist/_types/orchestrator/completion-review-pending.d.ts +24 -0
- package/dist/_types/orchestrator/completionContract.d.ts +103 -0
- package/dist/_types/orchestrator/completionFinalization.d.ts +224 -0
- package/dist/_types/orchestrator/completionLedger.d.ts +429 -0
- package/dist/_types/orchestrator/completionReadiness.d.ts +234 -0
- package/dist/_types/orchestrator/context-admission.d.ts +93 -0
- package/dist/_types/orchestrator/context-dump-retention.d.ts +25 -0
- package/dist/_types/orchestrator/context-fabric.d.ts +133 -0
- package/dist/_types/orchestrator/contextEngine.d.ts +68 -0
- package/dist/_types/orchestrator/contextWindowDump.d.ts +327 -0
- package/dist/_types/orchestrator/convergence-breaker.d.ts +225 -0
- package/dist/_types/orchestrator/convergence-progress.d.ts +66 -0
- package/dist/_types/orchestrator/deliveryCoverage.d.ts +181 -0
- package/dist/_types/orchestrator/document-persistence-goal-binding.d.ts +106 -0
- package/dist/_types/orchestrator/durable-document-worker.d.ts +85 -0
- package/dist/_types/orchestrator/evidenceBranch.d.ts +291 -0
- package/dist/_types/orchestrator/expected-inference-response.d.ts +55 -0
- package/dist/_types/orchestrator/expectedOutcomeContract.d.ts +58 -0
- package/dist/_types/orchestrator/failure-taxonomy.d.ts +36 -0
- package/dist/_types/orchestrator/focusSupervisor.d.ts +436 -0
- package/dist/_types/orchestrator/forced-update-requirement-recovery.d.ts +105 -0
- package/dist/_types/orchestrator/hooks.d.ts +100 -0
- package/dist/_types/orchestrator/inference-pressure.d.ts +61 -0
- package/dist/_types/orchestrator/integrationClosure.d.ts +89 -0
- package/dist/_types/orchestrator/interruption-lifecycle.d.ts +154 -0
- package/dist/_types/orchestrator/live-memory-passages.d.ts +51 -0
- package/dist/_types/orchestrator/liveVirtualContext.d.ts +84 -0
- package/dist/_types/orchestrator/memory-compiler.d.ts +254 -0
- package/dist/_types/orchestrator/memory-consolidation.d.ts +134 -0
- package/dist/_types/orchestrator/model-router.d.ts +17 -0
- package/dist/_types/orchestrator/modelResponseDiagnostics.d.ts +71 -0
- package/dist/_types/orchestrator/nativeRequirementAmendment.d.ts +63 -0
- package/dist/_types/orchestrator/nol/coordinator.d.ts +204 -0
- package/dist/_types/orchestrator/nol/datasets.d.ts +58 -0
- package/dist/_types/orchestrator/nol/discovery.d.ts +286 -0
- package/dist/_types/orchestrator/nol/evaluation.d.ts +59 -0
- package/dist/_types/orchestrator/nol/model-validation.d.ts +198 -0
- package/dist/_types/orchestrator/nol/statistics.d.ts +142 -0
- package/dist/_types/orchestrator/nol/store.d.ts +133 -0
- package/dist/_types/orchestrator/nol/variant-registry.d.ts +292 -0
- package/dist/_types/orchestrator/ollama-context-policy.d.ts +34 -0
- package/dist/_types/orchestrator/personality.d.ts +66 -0
- package/dist/_types/orchestrator/prompt-cache.d.ts +24 -0
- package/dist/_types/orchestrator/remote-inference-fallback.d.ts +224 -0
- package/dist/_types/orchestrator/remote-inference-policy.d.ts +58 -0
- package/dist/_types/orchestrator/request-budget.d.ts +75 -0
- package/dist/_types/orchestrator/requirementCoverage.d.ts +69 -0
- package/dist/_types/orchestrator/reviewedInterpretation.d.ts +111 -0
- package/dist/_types/orchestrator/runEvents.d.ts +115 -0
- package/dist/_types/orchestrator/runtime-rollout.d.ts +63 -0
- package/dist/_types/orchestrator/semanticVerification.d.ts +135 -0
- package/dist/_types/orchestrator/source-wide-extraction.d.ts +202 -0
- package/dist/_types/orchestrator/steeringIntake.d.ts +123 -0
- package/dist/_types/orchestrator/structured-memory-extraction-worker.d.ts +89 -0
- package/dist/_types/orchestrator/structuredMemoryInference.d.ts +62 -0
- package/dist/_types/orchestrator/successful-procedure-memory.d.ts +127 -0
- package/dist/_types/orchestrator/supportedAnswer.d.ts +68 -0
- package/dist/_types/orchestrator/taskEffectEvidence.d.ts +38 -0
- package/dist/_types/orchestrator/taskExecutionSnapshot.d.ts +67 -0
- package/dist/_types/orchestrator/taskObjective.d.ts +310 -0
- package/dist/_types/orchestrator/taskObjectiveContinuation.d.ts +134 -0
- package/dist/_types/orchestrator/taskRequirementReview.d.ts +246 -0
- package/dist/_types/orchestrator/taskRequirements.d.ts +80 -0
- package/dist/_types/orchestrator/taskSemanticAdmission.d.ts +159 -0
- package/dist/_types/orchestrator/taskWorkDelegation.d.ts +147 -0
- package/dist/_types/orchestrator/taskWorkPlan.d.ts +177 -0
- package/dist/_types/orchestrator/telegram-passive-history.d.ts +42 -0
- package/dist/_types/orchestrator/terminalTaskReport.d.ts +91 -0
- package/dist/_types/orchestrator/todoObservability.d.ts +147 -0
- package/dist/_types/orchestrator/tool-exposure-policy.d.ts +100 -0
- package/dist/_types/orchestrator/trajectory-checkpoint.d.ts +159 -0
- package/dist/_types/orchestrator/types.d.ts +185 -0
- package/dist/_types/schemas/dispatch.d.ts +53 -0
- package/dist/_types/schemas/feature-workflow.d.ts +362 -0
- package/dist/_types/schemas/messages.d.ts +15 -0
- package/dist/_types/schemas/nol-assets.d.ts +955 -0
- package/dist/_types/schemas/nol-json.d.ts +2 -0
- package/dist/_types/schemas/nol.d.ts +3995 -0
- package/dist/_types/schemas/patch.d.ts +47 -0
- package/dist/_types/schemas/plan.d.ts +47 -0
- package/dist/_types/schemas/repoProfile.d.ts +116 -0
- package/dist/_types/schemas/retrieval.d.ts +44 -0
- package/dist/_types/schemas/task.d.ts +57 -0
- package/dist/_types/schemas/tools.d.ts +16 -0
- package/dist/_types/schemas/verification.d.ts +31 -0
- package/dist/api/py-embed.js +3353 -1829
- package/dist/assets/nol-checkpoint-editor.py +701 -0
- package/dist/assets/nol-gguf-checkpoint-editor.py +785 -0
- package/dist/assets/nol-gguf-control-reader.py +428 -0
- package/dist/assets/nol-gne-tools-worker.py +425 -0
- package/dist/assets/nol-gne-worker.py +1081 -0
- package/dist/assets/nol-lora-exporter.py +349 -0
- package/dist/assets/nol-pytorch-control-reader.py +470 -0
- package/dist/assets/nol-transformers-nnsight-worker.py +512 -0
- package/dist/assets/nol-transformers-peft-validation-worker.py +385 -0
- package/dist/assets/nol-transformers-peft-worker.py +488 -0
- package/dist/assets/nol-transformers-research-worker.py +472 -0
- package/dist/assets/nol-transformers-worker.py +920 -0
- package/dist/assets/nol-vllm-owned-worker.py +803 -0
- package/dist/assets/nol-vllm-runtime.py +695 -0
- package/dist/assets/nol-vllm-tokenizer.py +93 -0
- package/dist/assets/nol-vllm-worker.py +201 -0
- package/dist/computer-use/configured-planner.d.ts +37 -0
- package/dist/computer-use/configured-point.d.ts +35 -0
- package/dist/computer-use/host-session.d.ts +60 -0
- package/dist/computer-use/runner-ui-port.d.ts +37 -0
- package/dist/computer-use/session-review.d.ts +14 -0
- package/dist/computer-use/task-spec.d.ts +84 -0
- package/dist/discovery.d.ts +16 -2
- package/dist/index.js +2 -2
- package/dist/library.d.ts +94 -10
- package/dist/library.js +144003 -87414
- package/dist/memory-maintenance-worker.js +1676 -511
- package/dist/nol/cpu-control-reader-profile.d.ts +93 -0
- package/dist/nol/cpu-control-reader-service.d.ts +87 -0
- package/dist/nol/cuda-lease.d.ts +111 -0
- package/dist/nol/cuda-mutations.d.ts +34 -0
- package/dist/nol/export-runtime-config.d.ts +114 -0
- package/dist/nol/export-service.d.ts +143 -0
- package/dist/nol/facade.d.ts +147 -0
- package/dist/nol/gguf-cpu-control-reader-profile.d.ts +106 -0
- package/dist/nol/gguf-cpu-control-reader-service.d.ts +91 -0
- package/dist/nol/gguf-model-control-verifier.d.ts +120 -0
- package/dist/nol/gguf-parameter-inventory.d.ts +28 -0
- package/dist/nol/gne-adapter.d.ts +134 -0
- package/dist/nol/gne-agent-evaluation.d.ts +84 -0
- package/dist/nol/gne-profile.d.ts +124 -0
- package/dist/nol/gne-tools-profile.d.ts +148 -0
- package/dist/nol/gne-tools-transport.d.ts +194 -0
- package/dist/nol/model-actions.d.ts +662 -0
- package/dist/nol/model-control-verifier.d.ts +135 -0
- package/dist/nol/model-json-scorer.d.ts +13 -0
- package/dist/nol/model-runtime-config.d.ts +830 -0
- package/dist/nol/model-serving.d.ts +130 -0
- package/dist/nol/model-subject-adapter.d.ts +72 -0
- package/dist/nol/model-validation-factory.d.ts +113 -0
- package/dist/nol/neuronary-catalog.d.ts +130 -0
- package/dist/nol/orphan-custody.d.ts +72 -0
- package/dist/nol/peft-conformance.d.ts +48 -0
- package/dist/nol/peft-control-types.d.ts +137 -0
- package/dist/nol/peft-control-verifier.d.ts +8 -0
- package/dist/nol/peft-model-actions.d.ts +41 -0
- package/dist/nol/peft-model-authority.d.ts +146 -0
- package/dist/nol/peft-model-controls.d.ts +20 -0
- package/dist/nol/peft-model-host.d.ts +47 -0
- package/dist/nol/peft-model-profile.d.ts +161 -0
- package/dist/nol/peft-model-runtime-config.d.ts +174 -0
- package/dist/nol/peft-model-subject-adapter.d.ts +36 -0
- package/dist/nol/peft-validation.d.ts +105 -0
- package/dist/nol/persistent-parameter-inventory.d.ts +32 -0
- package/dist/nol/runtime.d.ts +100 -0
- package/dist/nol/sqlite-store.d.ts +80 -0
- package/dist/nol/transformers-adapter.d.ts +119 -0
- package/dist/nol/transformers-nnsight.d.ts +87 -0
- package/dist/nol/transformers-peft.d.ts +107 -0
- package/dist/nol/transformers-research.d.ts +114 -0
- package/dist/nol/variant-service.d.ts +143 -0
- package/dist/nol/variant-store.d.ts +51 -0
- package/dist/nol/vllm-actions.d.ts +774 -0
- package/dist/nol/vllm-adapter.d.ts +1473 -0
- package/dist/nol/vllm-authority.d.ts +55 -0
- package/dist/nol/vllm-conformance.d.ts +662 -0
- package/dist/nol/vllm-profile.d.ts +850 -0
- package/dist/nol/vllm-protocol.d.ts +1505 -0
- package/dist/nol/vllm-runtime-config.d.ts +120 -0
- package/dist/nol/vllm-runtime.d.ts +34 -0
- package/dist/nol/vllm-startup.d.ts +235 -0
- package/dist/omni-setup-worker.js +3433 -1909
- package/dist/service-version.d.ts +0 -1
- package/dist/tui/async-process.d.ts +27 -0
- package/dist/tui/native/worker.js +3 -1
- package/dist/tui/telegram-action-session-registry.d.ts +136 -0
- package/dist/tui/telegram-cognition-queue.d.ts +154 -0
- package/dist/tui/telegram-context-packet-v2.d.ts +99 -0
- package/dist/tui/telegram-input-ownership.d.ts +78 -0
- package/dist/tui/telegram-turn-contract-v2.d.ts +62 -0
- package/dist/update-worker-runtime.js +4216 -2603
- package/docs/DISCOVERY.json +389 -0
- package/docs/DISCOVERY.md +4 -0
- package/npm-shrinkwrap.json +28 -12
- package/package.json +3 -2
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation boundary for inference-driven memory compaction.
|
|
3
|
+
*
|
|
4
|
+
* The inference worker proposes a MemoryDelta; this module verifies that the
|
|
5
|
+
* proposal respects the exact request budget, authority boundary, and active
|
|
6
|
+
* dependency graph before any caller may apply it. Invalid proposals become a
|
|
7
|
+
* safe `hold`, never a heuristic deletion.
|
|
8
|
+
*/
|
|
9
|
+
import type { ContextMemoryLedger, ContextMemoryRecord } from "../memory/contextMemoryLedger.js";
|
|
10
|
+
import type { OutboundRequestBudget } from "./request-budget.js";
|
|
11
|
+
/**
|
|
12
|
+
* The v2 plan is the only shape that may eventually change a rendered
|
|
13
|
+
* request. It intentionally describes *how* each candidate is represented
|
|
14
|
+
* instead of treating compaction as a binary retain/archive list. In
|
|
15
|
+
* particular, an inference worker never returns source text: a later trusted
|
|
16
|
+
* materializer resolves exact excerpts from the immutable artifact identified
|
|
17
|
+
* here.
|
|
18
|
+
*/
|
|
19
|
+
export declare const MEMORY_COMPILATION_DISPOSITIONS: readonly [
|
|
20
|
+
"retain_full",
|
|
21
|
+
"retain_partial",
|
|
22
|
+
"retain_reference",
|
|
23
|
+
"compact_event",
|
|
24
|
+
"compact_summary",
|
|
25
|
+
"archive"
|
|
26
|
+
];
|
|
27
|
+
export type MemoryCompilationDisposition = typeof MEMORY_COMPILATION_DISPOSITIONS[number];
|
|
28
|
+
export interface MemoryCompilationLineSpan {
|
|
29
|
+
/** One-based inclusive source lines. */
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
}
|
|
33
|
+
/** A durable resolver target. `artifactUri` is deliberately content-addressed. */
|
|
34
|
+
export interface MemoryCompilationArtifactReference {
|
|
35
|
+
artifactUri: string;
|
|
36
|
+
contentHash: string;
|
|
37
|
+
sourceUri?: string;
|
|
38
|
+
sourceRevision?: string;
|
|
39
|
+
sourceRange?: MemoryCompilationLineSpan;
|
|
40
|
+
}
|
|
41
|
+
export interface MemoryCompilationCoverage {
|
|
42
|
+
/** Candidate claim records this representation supports. */
|
|
43
|
+
claimIds: string[];
|
|
44
|
+
/** Stable requirement IDs resolved by this representation, when known. */
|
|
45
|
+
requirementIds: string[];
|
|
46
|
+
/** Requirement IDs deliberately left unresolved; these cannot be hidden. */
|
|
47
|
+
unresolvedRequirementIds: string[];
|
|
48
|
+
}
|
|
49
|
+
export interface MemoryCompilationEvent {
|
|
50
|
+
type: string;
|
|
51
|
+
message: string;
|
|
52
|
+
}
|
|
53
|
+
export interface MemoryCompilationCandidate {
|
|
54
|
+
id: string;
|
|
55
|
+
disposition: MemoryCompilationDisposition;
|
|
56
|
+
/** A bounded explanation of why this is signal, partial signal, or noise. */
|
|
57
|
+
rationale: string;
|
|
58
|
+
/** Estimated tokens after trusted materialization, not model-authored body text. */
|
|
59
|
+
renderedTokens: number;
|
|
60
|
+
coverage: MemoryCompilationCoverage;
|
|
61
|
+
/** Required for artifact representations that are not fully inlined. */
|
|
62
|
+
artifact?: MemoryCompilationArtifactReference;
|
|
63
|
+
/** Required for retain_partial; resolved by a trusted line-range reader. */
|
|
64
|
+
spans?: MemoryCompilationLineSpan[];
|
|
65
|
+
/** Required for retain_reference and must equal artifact.artifactUri. */
|
|
66
|
+
referenceUri?: string;
|
|
67
|
+
/** Required for compact_event. */
|
|
68
|
+
event?: MemoryCompilationEvent;
|
|
69
|
+
/** Required for compact_summary; orientation only, never canonical source. */
|
|
70
|
+
summary?: string;
|
|
71
|
+
/** Required only for archive. */
|
|
72
|
+
archiveReason?: "completed" | "superseded" | "noise";
|
|
73
|
+
}
|
|
74
|
+
export interface MemoryCompilationPlan {
|
|
75
|
+
schemaVersion: 2;
|
|
76
|
+
decision: "compact" | "hold";
|
|
77
|
+
requestFingerprint: string;
|
|
78
|
+
candidates: MemoryCompilationCandidate[];
|
|
79
|
+
supersede: Array<{
|
|
80
|
+
old: string;
|
|
81
|
+
next: string;
|
|
82
|
+
}>;
|
|
83
|
+
unresolvedClaims: string[];
|
|
84
|
+
orientation?: string;
|
|
85
|
+
coverage: {
|
|
86
|
+
allCandidatesClassified: boolean;
|
|
87
|
+
};
|
|
88
|
+
confidence: number;
|
|
89
|
+
/** Deterministically checked against per-candidate rendered token estimates. */
|
|
90
|
+
estimatedPostCompactionTokens: number;
|
|
91
|
+
}
|
|
92
|
+
export interface MemoryCompilationPlanValidationInput {
|
|
93
|
+
plan: MemoryCompilationPlan;
|
|
94
|
+
budget: OutboundRequestBudget;
|
|
95
|
+
epoch: string;
|
|
96
|
+
candidateRecords: ContextMemoryRecord[];
|
|
97
|
+
activeRecordIds: string[];
|
|
98
|
+
ledger: ContextMemoryLedger;
|
|
99
|
+
}
|
|
100
|
+
export interface MemoryCompilationPlanValidation {
|
|
101
|
+
accepted: boolean;
|
|
102
|
+
appliedDecision: "compact" | "hold";
|
|
103
|
+
reasons: string[];
|
|
104
|
+
retainedIds: Set<string>;
|
|
105
|
+
archivedIds: Set<string>;
|
|
106
|
+
candidates: Map<string, MemoryCompilationCandidate>;
|
|
107
|
+
estimatedPostCompactionTokens?: number;
|
|
108
|
+
}
|
|
109
|
+
export interface MemoryDelta {
|
|
110
|
+
decision: "compact" | "hold";
|
|
111
|
+
requestFingerprint: string;
|
|
112
|
+
retain: string[];
|
|
113
|
+
archive: Array<{
|
|
114
|
+
id: string;
|
|
115
|
+
reason: "completed" | "superseded" | "noise";
|
|
116
|
+
}>;
|
|
117
|
+
supersede: Array<{
|
|
118
|
+
old: string;
|
|
119
|
+
next: string;
|
|
120
|
+
}>;
|
|
121
|
+
unresolvedClaims: string[];
|
|
122
|
+
orientation?: string;
|
|
123
|
+
coverage: {
|
|
124
|
+
allCandidatesClassified: boolean;
|
|
125
|
+
};
|
|
126
|
+
confidence: number;
|
|
127
|
+
}
|
|
128
|
+
export interface MemoryDeltaValidationInput {
|
|
129
|
+
delta: MemoryDelta;
|
|
130
|
+
budget: OutboundRequestBudget;
|
|
131
|
+
epoch: string;
|
|
132
|
+
candidateRecords: ContextMemoryRecord[];
|
|
133
|
+
activeRecordIds: string[];
|
|
134
|
+
ledger: ContextMemoryLedger;
|
|
135
|
+
}
|
|
136
|
+
export interface MemoryDeltaValidation {
|
|
137
|
+
accepted: boolean;
|
|
138
|
+
appliedDecision: "compact" | "hold";
|
|
139
|
+
reasons: string[];
|
|
140
|
+
retainedIds: Set<string>;
|
|
141
|
+
archivedIds: Set<string>;
|
|
142
|
+
}
|
|
143
|
+
/** Minimal backend boundary used by the isolated, read-only memory compiler. */
|
|
144
|
+
export interface MemoryCompilerBackend {
|
|
145
|
+
chatCompletion(request: {
|
|
146
|
+
messages: Array<{
|
|
147
|
+
role: "system" | "user";
|
|
148
|
+
content: string;
|
|
149
|
+
}>;
|
|
150
|
+
tools: unknown[];
|
|
151
|
+
temperature: number;
|
|
152
|
+
maxTokens: number;
|
|
153
|
+
timeoutMs: number;
|
|
154
|
+
think?: boolean;
|
|
155
|
+
disableEmptyContentRecovery?: boolean;
|
|
156
|
+
preferNativeOllamaChat?: boolean;
|
|
157
|
+
numCtx?: number;
|
|
158
|
+
poolQueueTimeoutMs?: number;
|
|
159
|
+
responseFormat?: Record<string, unknown>;
|
|
160
|
+
}): Promise<{
|
|
161
|
+
choices?: Array<{
|
|
162
|
+
message?: {
|
|
163
|
+
content?: string | null;
|
|
164
|
+
};
|
|
165
|
+
}>;
|
|
166
|
+
/** Provider-normalized indication that generation ended at its output limit. */
|
|
167
|
+
outputTruncated?: boolean;
|
|
168
|
+
}>;
|
|
169
|
+
}
|
|
170
|
+
export interface MemoryCompilerAnalysisInput {
|
|
171
|
+
epoch: string;
|
|
172
|
+
budget: OutboundRequestBudget;
|
|
173
|
+
candidates: ContextMemoryRecord[];
|
|
174
|
+
activeRecordIds: string[];
|
|
175
|
+
/** Footer-only progress hook. Candidate bodies and provider text never cross it. */
|
|
176
|
+
onProgress?: (progress: MemoryCompilerProgress) => void;
|
|
177
|
+
}
|
|
178
|
+
export type MemoryCompilerErrorKind = "invalid_output" | "timeout" | "rate_limited" | "server_error" | "connection" | "request_rejected" | "unknown";
|
|
179
|
+
/** Body-free reasons why a fulfilled compiler response could not be admitted. */
|
|
180
|
+
export type MemoryCompilerInvalidOutputDetail = "empty_content" | "reasoning_only" | "no_complete_json" | "malformed_json" | "schema_invalid" | "duplicate_candidate_id" | "unknown_candidate_id" | "locked_candidate_id";
|
|
181
|
+
export interface MemoryCompilerProgress {
|
|
182
|
+
phase: "request" | "retry_wait";
|
|
183
|
+
attempt: number;
|
|
184
|
+
maxAttempts: number;
|
|
185
|
+
errorKind?: MemoryCompilerErrorKind;
|
|
186
|
+
invalidOutputDetail?: MemoryCompilerInvalidOutputDetail;
|
|
187
|
+
outputTruncated?: boolean;
|
|
188
|
+
}
|
|
189
|
+
/** Body-free outcome retained even when no usable plan was produced. */
|
|
190
|
+
export interface MemoryCompilationAnalysis {
|
|
191
|
+
plan: MemoryCompilationPlan | null;
|
|
192
|
+
outcome: "plan" | "invalid_output" | "backend_error";
|
|
193
|
+
attempts: number;
|
|
194
|
+
/** Allowlisted diagnostic only; exception messages and response bodies are excluded. */
|
|
195
|
+
errorKind?: MemoryCompilerErrorKind;
|
|
196
|
+
errorStatus?: number;
|
|
197
|
+
/** Allowlisted parse/admission detail; never includes provider output. */
|
|
198
|
+
invalidOutputDetail?: MemoryCompilerInvalidOutputDetail;
|
|
199
|
+
/** Whether any fulfilled attempt ended at the provider output limit, when known. */
|
|
200
|
+
outputTruncated?: boolean;
|
|
201
|
+
/** Whether a future invocation may succeed without changing the request. */
|
|
202
|
+
retryable?: boolean;
|
|
203
|
+
}
|
|
204
|
+
/** Parse only the v2 plan. Unknown/malformed proposals are rejected before validation. */
|
|
205
|
+
export declare function parseMemoryCompilationPlan(value: unknown): MemoryCompilationPlan | null;
|
|
206
|
+
/**
|
|
207
|
+
* Execute the memory compiler as a strictly isolated inference operation.
|
|
208
|
+
* Candidate bodies are data, not instructions; the response is still only a
|
|
209
|
+
* proposal and must pass `validateMemoryDelta` before any caller may act.
|
|
210
|
+
*/
|
|
211
|
+
export declare function analyzeMemoryDelta(backend: MemoryCompilerBackend, input: MemoryCompilerAnalysisInput): Promise<MemoryDelta | null>;
|
|
212
|
+
/**
|
|
213
|
+
* Run the v2 compiler. The worker gets typed metadata plus bounded candidate
|
|
214
|
+
* previews, but no tool access and no ability to mutate a request. Omitted
|
|
215
|
+
* sparse rows default to retain_full, and its JSON remains untrusted until
|
|
216
|
+
* `validateMemoryCompilationPlan` accepts the host-expanded plan.
|
|
217
|
+
*/
|
|
218
|
+
export declare function analyzeMemoryCompilationPlan(backend: MemoryCompilerBackend, input: MemoryCompilerAnalysisInput): Promise<MemoryCompilationPlan | null>;
|
|
219
|
+
export declare function analyzeMemoryCompilationPlanWithOutcome(backend: MemoryCompilerBackend, input: MemoryCompilerAnalysisInput): Promise<MemoryCompilationAnalysis>;
|
|
220
|
+
/**
|
|
221
|
+
* Validate an inference proposal. Authority is protected independently of
|
|
222
|
+
* relevance, and a graph cut is allowed only if it preserves all active
|
|
223
|
+
* dependencies and their containing tool transactions.
|
|
224
|
+
*/
|
|
225
|
+
export declare function validateMemoryDelta(input: MemoryDeltaValidationInput): MemoryDeltaValidation;
|
|
226
|
+
/**
|
|
227
|
+
* An optimistic lower bound under the validator's existing accounting. Even
|
|
228
|
+
* pretending every mutable body costs zero cannot shrink locked authority or
|
|
229
|
+
* fixed schema/envelope input overhead. This proves only an impossible target; it never
|
|
230
|
+
* chooses a representation, retires a source, or makes possible plans valid.
|
|
231
|
+
*/
|
|
232
|
+
export declare function memoryCompilationTargetReachability(input: {
|
|
233
|
+
budget: OutboundRequestBudget;
|
|
234
|
+
candidateRecords: ContextMemoryRecord[];
|
|
235
|
+
}): {
|
|
236
|
+
targetPossible: boolean;
|
|
237
|
+
candidateTokens: number;
|
|
238
|
+
fixedTokens: number;
|
|
239
|
+
lockedTokens: number;
|
|
240
|
+
optimisticMinimumTokens: number;
|
|
241
|
+
targetMaximumTokens: number;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Validate a v2 plan before it is handed to a renderer. A bad plan is never
|
|
245
|
+
* partially applied: the caller gets a hold together with every candidate
|
|
246
|
+
* retained. This deliberately does not mutate the ledger or the request.
|
|
247
|
+
*/
|
|
248
|
+
export declare function validateMemoryCompilationPlan(input: MemoryCompilationPlanValidationInput): MemoryCompilationPlanValidation;
|
|
249
|
+
/** Stable per-request cache: unchanged state must not trigger new inference. */
|
|
250
|
+
export declare class MemoryDeltaCache {
|
|
251
|
+
private readonly values;
|
|
252
|
+
get(requestFingerprint: string): MemoryDeltaValidation | undefined;
|
|
253
|
+
set(requestFingerprint: string, result: MemoryDeltaValidation): void;
|
|
254
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* memory-consolidation.ts — auto-mulling trigger + note scoring + pruning /
|
|
3
|
+
* consolidation, grounded in 2023–2026 agent-memory literature:
|
|
4
|
+
*
|
|
5
|
+
* - Generative Agents (arXiv 2304.03442): retrieval score =
|
|
6
|
+
* recency · importance · relevance; reflection fires when summed importance
|
|
7
|
+
* of recent events crosses a threshold (their value: 150).
|
|
8
|
+
* - MemoryBank (2305.10250): Ebbinghaus forgetting curve — strength decays
|
|
9
|
+
* with time but is reinforced on each recall; weak/un-recalled notes are
|
|
10
|
+
* eviction candidates.
|
|
11
|
+
* - Mem0 (2504.19413): extract → consolidate → DEDUP at ingest; never store
|
|
12
|
+
* raw transcripts.
|
|
13
|
+
* - Episodic→semantic distillation (2505.00675 / 2502.06975): periodically
|
|
14
|
+
* distill prunable episodic notes into protected semantic notes; version so
|
|
15
|
+
* newer wins on conflict without catastrophic overwrite.
|
|
16
|
+
*
|
|
17
|
+
* Pure + dependency-free → directly unit-testable. The agentic runner / dream
|
|
18
|
+
* engine calls these to decide WHEN to mull and WHAT to keep/merge/prune.
|
|
19
|
+
*/
|
|
20
|
+
export type MemoryTier = "episodic" | "semantic";
|
|
21
|
+
export interface UserTaskNoteScope {
|
|
22
|
+
workspaceKey: string;
|
|
23
|
+
ownerKey: string;
|
|
24
|
+
surface: string;
|
|
25
|
+
}
|
|
26
|
+
/** Host lifecycle provenance, never inferred from a prompt or a model claim. */
|
|
27
|
+
export interface UserTaskNoteProvenance extends UserTaskNoteScope {
|
|
28
|
+
schema: "omnius.user-task-note.v1";
|
|
29
|
+
purpose: "user_task";
|
|
30
|
+
runId: string;
|
|
31
|
+
taskEpoch: number;
|
|
32
|
+
outcome: "success" | "failed" | "aborted" | "incomplete_verification" | "timeout";
|
|
33
|
+
traceRef: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function isUserTaskNoteScope(value: unknown): value is UserTaskNoteScope;
|
|
36
|
+
export declare function isUserTaskNoteProvenance(value: unknown): value is UserTaskNoteProvenance;
|
|
37
|
+
export declare function userTaskNoteMatchesScope(note: MemoryNote, scope: UserTaskNoteScope): boolean;
|
|
38
|
+
export interface MemoryNote {
|
|
39
|
+
id: string;
|
|
40
|
+
tier: MemoryTier;
|
|
41
|
+
content: string;
|
|
42
|
+
keywords: string[];
|
|
43
|
+
/** LLM-rated salience 1–10 (Generative Agents importance). */
|
|
44
|
+
importance: number;
|
|
45
|
+
createdAt: number;
|
|
46
|
+
lastAccessedMs: number;
|
|
47
|
+
accessCount: number;
|
|
48
|
+
/** Small inline embedding for relevance/dedup (optional). */
|
|
49
|
+
embedding?: number[];
|
|
50
|
+
/** Structural source hint for soft relevance tuning across surfaces. */
|
|
51
|
+
sourceSurface?: string;
|
|
52
|
+
/** Optional source/session key for future scoped recall. */
|
|
53
|
+
sourceKey?: string;
|
|
54
|
+
/** Absent on legacy notes; those remain stored but cannot enter scoped recall. */
|
|
55
|
+
provenance?: UserTaskNoteProvenance;
|
|
56
|
+
/** Monotonic version; newer wins on conflict. */
|
|
57
|
+
version?: number;
|
|
58
|
+
}
|
|
59
|
+
export declare function cosine(a: number[], b: number[]): number;
|
|
60
|
+
/**
|
|
61
|
+
* Accumulates the importance of events since the last consolidation. When the
|
|
62
|
+
* running sum crosses `threshold` (default 150, per Generative Agents), it is
|
|
63
|
+
* time to auto-kick a mulling/consolidation pass — a non-failure-based, cadence-
|
|
64
|
+
* stable trigger (NOT every turn, NOT only on error).
|
|
65
|
+
*/
|
|
66
|
+
export declare class ImportanceBudget {
|
|
67
|
+
private threshold;
|
|
68
|
+
private sum;
|
|
69
|
+
constructor(threshold?: number);
|
|
70
|
+
add(importance: number): void;
|
|
71
|
+
/** True when the accumulated importance warrants a consolidation pass. */
|
|
72
|
+
shouldConsolidate(): boolean;
|
|
73
|
+
current(): number;
|
|
74
|
+
/** Call after a consolidation pass runs. */
|
|
75
|
+
reset(): void;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Ebbinghaus retention in [0,1]: decays with time since last access, but each
|
|
79
|
+
* recall (accessCount) flattens the curve (spaced-repetition reinforcement).
|
|
80
|
+
* `importance` raises the floor so salient notes resist forgetting.
|
|
81
|
+
*/
|
|
82
|
+
export declare function retentionStrength(note: MemoryNote, now?: number): number;
|
|
83
|
+
export interface ScoreWeights {
|
|
84
|
+
recency: number;
|
|
85
|
+
importance: number;
|
|
86
|
+
relevance: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Deterministic low-cost lexical embedding for note recall.
|
|
90
|
+
*
|
|
91
|
+
* This is not a semantic model replacement; it fills the previous gap where
|
|
92
|
+
* note relevance defaulted to neutral because no embedding existed at all.
|
|
93
|
+
* Hashed token+bigrams keep the scorer vector-similarity based without brittle
|
|
94
|
+
* phrase blocklists.
|
|
95
|
+
*/
|
|
96
|
+
export declare function textToHashEmbedding(text: string, dimensions?: number): number[];
|
|
97
|
+
/** recency · importance · relevance, each normalized to [0,1], weighted-summed. */
|
|
98
|
+
export declare function scoreNote(note: MemoryNote, opts?: {
|
|
99
|
+
now?: number;
|
|
100
|
+
queryEmbedding?: number[];
|
|
101
|
+
weights?: ScoreWeights;
|
|
102
|
+
}): number;
|
|
103
|
+
/** Top-k notes to surface for the next instruction (highest score first). */
|
|
104
|
+
export declare function selectTopNotes(notes: MemoryNote[], k: number, opts?: {
|
|
105
|
+
now?: number;
|
|
106
|
+
queryEmbedding?: number[];
|
|
107
|
+
weights?: ScoreWeights;
|
|
108
|
+
minRelevance?: number;
|
|
109
|
+
scope?: UserTaskNoteScope;
|
|
110
|
+
}): MemoryNote[];
|
|
111
|
+
/** Group near-duplicate notes (embedding cosine ≥ threshold, or identical keyword sets). */
|
|
112
|
+
export declare function findDuplicateGroups(notes: MemoryNote[], simThreshold?: number): MemoryNote[][];
|
|
113
|
+
export interface ConsolidationPlan {
|
|
114
|
+
/** Note ids to KEEP as-is. */
|
|
115
|
+
keep: string[];
|
|
116
|
+
/** Note ids to PRUNE (low retention + low importance, never-recalled). */
|
|
117
|
+
prune: string[];
|
|
118
|
+
/** Groups of duplicate ids to MERGE (keep the highest-importance, drop rest). */
|
|
119
|
+
merge: string[][];
|
|
120
|
+
/** Episodic note ids that are good DISTILLATION candidates → semantic tier. */
|
|
121
|
+
distill: string[];
|
|
122
|
+
}
|
|
123
|
+
export interface ConsolidationOptions {
|
|
124
|
+
now?: number;
|
|
125
|
+
/** Below this retention → prune candidate (unless important). */
|
|
126
|
+
pruneRetention?: number;
|
|
127
|
+
/** Importance at/above which a note is never pruned. */
|
|
128
|
+
protectImportance?: number;
|
|
129
|
+
/** Min recalls for an episodic note to be worth distilling to semantic. */
|
|
130
|
+
distillMinAccess?: number;
|
|
131
|
+
simThreshold?: number;
|
|
132
|
+
}
|
|
133
|
+
/** Decide what to keep, prune, merge, and distill. Semantic tier is protected from pruning. */
|
|
134
|
+
export declare function planConsolidation(notes: MemoryNote[], opts?: ConsolidationOptions): ConsolidationPlan;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface CheapModelRoute {
|
|
2
|
+
provider: string;
|
|
3
|
+
model: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
routingReason: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ModelRoutingConfig {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
cheapModel: {
|
|
11
|
+
provider: string;
|
|
12
|
+
model: string;
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare function chooseCheapModelRoute(userMessage: string, routingConfig?: ModelRoutingConfig | null): CheapModelRoute | null;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** Metadata only: never retain model text, reasoning, tool arguments, or request URLs. */
|
|
2
|
+
export interface NativeResponseMetrics {
|
|
3
|
+
promptEvalCachedCount?: number;
|
|
4
|
+
promptEvalDurationNs?: number;
|
|
5
|
+
evalDurationNs?: number;
|
|
6
|
+
loadDurationNs?: number;
|
|
7
|
+
totalDurationNs?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface NativeResponseTransport {
|
|
10
|
+
/** Local identity of this physical fetch, distinct from retry idempotence. */
|
|
11
|
+
physicalRequestId: string;
|
|
12
|
+
brokerRequestId?: string;
|
|
13
|
+
brokerLogicalRequestId?: string;
|
|
14
|
+
lane?: string;
|
|
15
|
+
queueMs?: number;
|
|
16
|
+
responseReplayed?: boolean;
|
|
17
|
+
/** performance.now() in this process; not a cross-process wall clock. */
|
|
18
|
+
dispatchMonotonicMs?: number;
|
|
19
|
+
headersMonotonicMs?: number;
|
|
20
|
+
/** First observed content/thinking/tool frame; unary observes it after JSON decoding. */
|
|
21
|
+
firstTokenObservedMonotonicMs?: number;
|
|
22
|
+
doneObservedMonotonicMs?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface ModelResponseDiagnostics {
|
|
25
|
+
schema: "omnius.model-response-diagnostics.v1";
|
|
26
|
+
transport: "ollama-native";
|
|
27
|
+
mode: "unary" | "stream";
|
|
28
|
+
logicalRequestId?: string;
|
|
29
|
+
model?: string;
|
|
30
|
+
frameCount: number;
|
|
31
|
+
messageFrames: number;
|
|
32
|
+
contentChars: number;
|
|
33
|
+
thinkingChars: number;
|
|
34
|
+
/** Raw entries across frames, before tool-call normalization or accumulation. */
|
|
35
|
+
rawToolCallEntries: number;
|
|
36
|
+
done: boolean;
|
|
37
|
+
finishReason: "stop" | "length" | "load" | "unload" | "tool_calls" | "unknown" | "other";
|
|
38
|
+
usage?: {
|
|
39
|
+
promptTokens: number;
|
|
40
|
+
completionTokens: number;
|
|
41
|
+
totalTokens: number;
|
|
42
|
+
};
|
|
43
|
+
nativeMetrics?: NativeResponseMetrics;
|
|
44
|
+
requestTrace?: NativeResponseTransport;
|
|
45
|
+
}
|
|
46
|
+
export interface ModelResponseDiagnosticReceipt extends ModelResponseDiagnostics {
|
|
47
|
+
runId: string;
|
|
48
|
+
taskEpoch: number;
|
|
49
|
+
turn: number;
|
|
50
|
+
visibleChars: number;
|
|
51
|
+
normalizedToolCalls: number;
|
|
52
|
+
}
|
|
53
|
+
/** A malformed provider field must never make observability fail the request. */
|
|
54
|
+
export declare class NativeModelResponseDiagnostics {
|
|
55
|
+
private readonly value;
|
|
56
|
+
constructor(mode: "unary" | "stream", logicalRequestId?: string, model?: string);
|
|
57
|
+
dispatched(physicalRequestId: string, at?: number): void;
|
|
58
|
+
receivedHeaders(headers: Pick<Headers, "get">, at?: number): void;
|
|
59
|
+
observe(frame: unknown): void;
|
|
60
|
+
snapshot(): ModelResponseDiagnostics;
|
|
61
|
+
}
|
|
62
|
+
/** Whitelist fields at the owner boundary; unknown adapter data is not evidence. */
|
|
63
|
+
export declare function modelResponseDiagnosticReceipt(input: {
|
|
64
|
+
diagnostics: unknown;
|
|
65
|
+
logicalRequestId?: string;
|
|
66
|
+
runId: string;
|
|
67
|
+
taskEpoch: number;
|
|
68
|
+
turn: number;
|
|
69
|
+
visibleChars: number;
|
|
70
|
+
normalizedToolCalls: number;
|
|
71
|
+
}): ModelResponseDiagnosticReceipt | undefined;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type CompletionLedger } from "./completionLedger.js";
|
|
2
|
+
import { type ExpectedOutcomeContractV1 } from "./expectedOutcomeContract.js";
|
|
3
|
+
import { type TaskObjectiveContractV1 } from "./taskObjective.js";
|
|
4
|
+
import { type TaskRequirementNativeEvidenceV1 } from "./taskRequirements.js";
|
|
5
|
+
import { type TaskWorkPlanV1 } from "./taskWorkPlan.js";
|
|
6
|
+
import { type TaskNativeExecutionScopeV1 } from "./reviewedInterpretation.js";
|
|
7
|
+
export interface NativeTaskRequirementAmendmentV1 {
|
|
8
|
+
schema: "omnius.native-requirement-amendment.v1";
|
|
9
|
+
inputId: string;
|
|
10
|
+
scope: TaskNativeExecutionScopeV1;
|
|
11
|
+
nativeEvidence: TaskRequirementNativeEvidenceV1[];
|
|
12
|
+
nextContract: TaskObjectiveContractV1;
|
|
13
|
+
nextExpectedOutcome: ExpectedOutcomeContractV1;
|
|
14
|
+
nextWorkPlan: TaskWorkPlanV1;
|
|
15
|
+
nextIssuedDecision: {
|
|
16
|
+
decisionId: string;
|
|
17
|
+
payload: unknown;
|
|
18
|
+
payloadSha256: string;
|
|
19
|
+
};
|
|
20
|
+
/** Exact host-admitted new native source criteria, never inferred from an ID or prose. */
|
|
21
|
+
addedSourceCriterionIds?: string[];
|
|
22
|
+
review: {
|
|
23
|
+
schema: "omnius.native-requirement-amendment-review.v1";
|
|
24
|
+
requestId: string;
|
|
25
|
+
model: string;
|
|
26
|
+
providerProtocol: string;
|
|
27
|
+
reviewRequestSha256: string;
|
|
28
|
+
reviewResultSha256: string;
|
|
29
|
+
priorContractSha256: string;
|
|
30
|
+
priorExpectedOutcomeSha256: string;
|
|
31
|
+
nextContractSha256: string;
|
|
32
|
+
nextExpectedOutcomeSha256: string;
|
|
33
|
+
nativeEvidenceSnapshotSha256: string;
|
|
34
|
+
currentNativeInputSha256: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface NativeTaskRequirementAmendmentRecordV1 {
|
|
38
|
+
schema: "omnius.native-requirement-amendment-record.v1";
|
|
39
|
+
id: string;
|
|
40
|
+
authority: NativeTaskRequirementAmendmentV1;
|
|
41
|
+
provenanceEvidenceId: string;
|
|
42
|
+
priorContract: TaskObjectiveContractV1;
|
|
43
|
+
priorExpectedOutcome: ExpectedOutcomeContractV1;
|
|
44
|
+
priorScope: TaskNativeExecutionScopeV1;
|
|
45
|
+
priorEvidence: CompletionLedger["evidence"];
|
|
46
|
+
priorWorkPlan?: TaskWorkPlanV1;
|
|
47
|
+
}
|
|
48
|
+
/** Persisted authority is checked again before a cold checkpoint can restore it. */
|
|
49
|
+
export declare function validateNativeTaskRequirementAmendmentRecordV1(record: NativeTaskRequirementAmendmentRecordV1, evidence: CompletionLedger["evidence"]): boolean;
|
|
50
|
+
/** The caller must independently authenticate native records and issue the semantic review.
|
|
51
|
+
* The runner additionally requires an existing Telegram human-steering intake at a safe boundary. */
|
|
52
|
+
export declare function applyNativeTaskRequirementAmendmentV1(input: {
|
|
53
|
+
ledger: CompletionLedger;
|
|
54
|
+
priorExpectedOutcome: ExpectedOutcomeContractV1;
|
|
55
|
+
priorScope: TaskNativeExecutionScopeV1;
|
|
56
|
+
amendment: NativeTaskRequirementAmendmentV1;
|
|
57
|
+
steering: {
|
|
58
|
+
inputId: string;
|
|
59
|
+
source: string;
|
|
60
|
+
taskEpoch?: number;
|
|
61
|
+
intent: string;
|
|
62
|
+
};
|
|
63
|
+
}): CompletionLedger;
|