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.
Files changed (239) hide show
  1. package/dist/{providerRegistry.d.ts → _types/backend-vllm/providerRegistry.d.ts} +0 -1
  2. package/dist/_types/backend-vllm/types.d.ts +209 -0
  3. package/dist/_types/execution/av/media-capability.d.ts +94 -0
  4. package/dist/_types/execution/delegation-contract.d.ts +102 -0
  5. package/dist/_types/execution/evidence.d.ts +68 -0
  6. package/dist/_types/execution/html-source-evidence.d.ts +65 -0
  7. package/dist/_types/execution/mcp/types.d.ts +169 -0
  8. package/dist/_types/execution/mutation-contract.d.ts +102 -0
  9. package/dist/_types/execution/nol/artifacts.d.ts +39 -0
  10. package/dist/_types/execution/nol/checkpoint-edits.d.ts +98 -0
  11. package/dist/_types/execution/nol/distributions.d.ts +128 -0
  12. package/dist/_types/execution/nol/gguf-checkpoint-edits.d.ts +194 -0
  13. package/dist/_types/execution/nol/gguf-control-reader.d.ts +224 -0
  14. package/dist/_types/execution/nol/lora-exports.d.ts +129 -0
  15. package/dist/_types/execution/nol/neuronary.d.ts +212 -0
  16. package/dist/_types/execution/nol/pytorch-control-reader.d.ts +143 -0
  17. package/dist/_types/execution/nol/qwen35-head-sites.d.ts +61 -0
  18. package/dist/_types/execution/nol/worker-assets.d.ts +82 -0
  19. package/dist/_types/execution/nol/worker-protocol.d.ts +94 -0
  20. package/dist/_types/execution/page-content-source.d.ts +40 -0
  21. package/dist/_types/execution/rapid-computer-use/artifact-store.d.ts +21 -0
  22. package/dist/_types/execution/rapid-computer-use/contracts.d.ts +320 -0
  23. package/dist/_types/execution/rapid-computer-use/decision.d.ts +70 -0
  24. package/dist/_types/execution/rapid-computer-use/desktop-verification.d.ts +23 -0
  25. package/dist/_types/execution/rapid-computer-use/geometry.d.ts +57 -0
  26. package/dist/_types/execution/rapid-computer-use/planner.d.ts +78 -0
  27. package/dist/_types/execution/rapid-computer-use/trace.d.ts +80 -0
  28. package/dist/_types/execution/rapid-computer-use/visual.d.ts +48 -0
  29. package/dist/_types/execution/shell-runs.d.ts +78 -0
  30. package/dist/_types/execution/streamed-web-source.d.ts +64 -0
  31. package/dist/_types/execution/tools/browser-page-fallback.d.ts +25 -0
  32. package/dist/_types/execution/tools/network-egress-policy.d.ts +30 -0
  33. package/dist/_types/execution/tools/pdf-native-tables.d.ts +46 -0
  34. package/dist/_types/execution/tools/todo-store.d.ts +133 -0
  35. package/dist/_types/execution/tools/web-fetch.d.ts +57 -0
  36. package/dist/_types/execution/tools/workboard.d.ts +1223 -0
  37. package/dist/_types/execution/types.d.ts +549 -0
  38. package/dist/_types/execution/web-source.d.ts +14 -0
  39. package/dist/_types/memory/artifactReviewSourceIndex.d.ts +133 -0
  40. package/dist/_types/memory/contextMemoryLedger.d.ts +213 -0
  41. package/dist/_types/memory/db.d.ts +12 -0
  42. package/dist/_types/memory/embeddings.d.ts +36 -0
  43. package/dist/_types/memory/immutableEvidenceStore.d.ts +165 -0
  44. package/dist/_types/memory/memoryIngestion.d.ts +65 -0
  45. package/dist/_types/memory/memoryTypes.d.ts +312 -0
  46. package/dist/_types/memory/sourceCorpusStore.d.ts +331 -0
  47. package/dist/_types/memory/structuredMemoryStore.d.ts +105 -0
  48. package/dist/_types/memory/unifiedMemoryStore.d.ts +127 -0
  49. package/dist/_types/memory/virtualMemory.d.ts +187 -0
  50. package/dist/_types/orchestrator/agentic-page-content-receipt.d.ts +20 -0
  51. package/dist/_types/orchestrator/agentic-web-fetch-receipt.d.ts +20 -0
  52. package/dist/_types/orchestrator/agenticRunner.d.ts +5219 -0
  53. package/dist/_types/orchestrator/app-state.d.ts +171 -0
  54. package/dist/_types/orchestrator/artifactClaimCritic.d.ts +63 -0
  55. package/dist/_types/orchestrator/artifactQuality.d.ts +15 -0
  56. package/dist/_types/orchestrator/artifactSemanticIntegrity.d.ts +203 -0
  57. package/dist/_types/orchestrator/canonical-context-projection.d.ts +254 -0
  58. package/dist/_types/orchestrator/canonical-source-body-projection.d.ts +51 -0
  59. package/dist/_types/orchestrator/completion-review-pending.d.ts +24 -0
  60. package/dist/_types/orchestrator/completionContract.d.ts +103 -0
  61. package/dist/_types/orchestrator/completionFinalization.d.ts +224 -0
  62. package/dist/_types/orchestrator/completionLedger.d.ts +429 -0
  63. package/dist/_types/orchestrator/completionReadiness.d.ts +234 -0
  64. package/dist/_types/orchestrator/context-admission.d.ts +93 -0
  65. package/dist/_types/orchestrator/context-dump-retention.d.ts +25 -0
  66. package/dist/_types/orchestrator/context-fabric.d.ts +133 -0
  67. package/dist/_types/orchestrator/contextEngine.d.ts +68 -0
  68. package/dist/_types/orchestrator/contextWindowDump.d.ts +327 -0
  69. package/dist/_types/orchestrator/convergence-breaker.d.ts +225 -0
  70. package/dist/_types/orchestrator/convergence-progress.d.ts +66 -0
  71. package/dist/_types/orchestrator/deliveryCoverage.d.ts +181 -0
  72. package/dist/_types/orchestrator/document-persistence-goal-binding.d.ts +106 -0
  73. package/dist/_types/orchestrator/durable-document-worker.d.ts +85 -0
  74. package/dist/_types/orchestrator/evidenceBranch.d.ts +291 -0
  75. package/dist/_types/orchestrator/expected-inference-response.d.ts +55 -0
  76. package/dist/_types/orchestrator/expectedOutcomeContract.d.ts +58 -0
  77. package/dist/_types/orchestrator/failure-taxonomy.d.ts +36 -0
  78. package/dist/_types/orchestrator/focusSupervisor.d.ts +436 -0
  79. package/dist/_types/orchestrator/forced-update-requirement-recovery.d.ts +105 -0
  80. package/dist/_types/orchestrator/hooks.d.ts +100 -0
  81. package/dist/_types/orchestrator/inference-pressure.d.ts +61 -0
  82. package/dist/_types/orchestrator/integrationClosure.d.ts +89 -0
  83. package/dist/_types/orchestrator/interruption-lifecycle.d.ts +154 -0
  84. package/dist/_types/orchestrator/live-memory-passages.d.ts +51 -0
  85. package/dist/_types/orchestrator/liveVirtualContext.d.ts +84 -0
  86. package/dist/_types/orchestrator/memory-compiler.d.ts +254 -0
  87. package/dist/_types/orchestrator/memory-consolidation.d.ts +134 -0
  88. package/dist/_types/orchestrator/model-router.d.ts +17 -0
  89. package/dist/_types/orchestrator/modelResponseDiagnostics.d.ts +71 -0
  90. package/dist/_types/orchestrator/nativeRequirementAmendment.d.ts +63 -0
  91. package/dist/_types/orchestrator/nol/coordinator.d.ts +204 -0
  92. package/dist/_types/orchestrator/nol/datasets.d.ts +58 -0
  93. package/dist/_types/orchestrator/nol/discovery.d.ts +286 -0
  94. package/dist/_types/orchestrator/nol/evaluation.d.ts +59 -0
  95. package/dist/_types/orchestrator/nol/model-validation.d.ts +198 -0
  96. package/dist/_types/orchestrator/nol/statistics.d.ts +142 -0
  97. package/dist/_types/orchestrator/nol/store.d.ts +133 -0
  98. package/dist/_types/orchestrator/nol/variant-registry.d.ts +292 -0
  99. package/dist/_types/orchestrator/ollama-context-policy.d.ts +34 -0
  100. package/dist/_types/orchestrator/personality.d.ts +66 -0
  101. package/dist/_types/orchestrator/prompt-cache.d.ts +24 -0
  102. package/dist/_types/orchestrator/remote-inference-fallback.d.ts +224 -0
  103. package/dist/_types/orchestrator/remote-inference-policy.d.ts +58 -0
  104. package/dist/_types/orchestrator/request-budget.d.ts +75 -0
  105. package/dist/_types/orchestrator/requirementCoverage.d.ts +69 -0
  106. package/dist/_types/orchestrator/reviewedInterpretation.d.ts +111 -0
  107. package/dist/_types/orchestrator/runEvents.d.ts +115 -0
  108. package/dist/_types/orchestrator/runtime-rollout.d.ts +63 -0
  109. package/dist/_types/orchestrator/semanticVerification.d.ts +135 -0
  110. package/dist/_types/orchestrator/source-wide-extraction.d.ts +202 -0
  111. package/dist/_types/orchestrator/steeringIntake.d.ts +123 -0
  112. package/dist/_types/orchestrator/structured-memory-extraction-worker.d.ts +89 -0
  113. package/dist/_types/orchestrator/structuredMemoryInference.d.ts +62 -0
  114. package/dist/_types/orchestrator/successful-procedure-memory.d.ts +127 -0
  115. package/dist/_types/orchestrator/supportedAnswer.d.ts +68 -0
  116. package/dist/_types/orchestrator/taskEffectEvidence.d.ts +38 -0
  117. package/dist/_types/orchestrator/taskExecutionSnapshot.d.ts +67 -0
  118. package/dist/_types/orchestrator/taskObjective.d.ts +310 -0
  119. package/dist/_types/orchestrator/taskObjectiveContinuation.d.ts +134 -0
  120. package/dist/_types/orchestrator/taskRequirementReview.d.ts +246 -0
  121. package/dist/_types/orchestrator/taskRequirements.d.ts +80 -0
  122. package/dist/_types/orchestrator/taskSemanticAdmission.d.ts +159 -0
  123. package/dist/_types/orchestrator/taskWorkDelegation.d.ts +147 -0
  124. package/dist/_types/orchestrator/taskWorkPlan.d.ts +177 -0
  125. package/dist/_types/orchestrator/telegram-passive-history.d.ts +42 -0
  126. package/dist/_types/orchestrator/terminalTaskReport.d.ts +91 -0
  127. package/dist/_types/orchestrator/todoObservability.d.ts +147 -0
  128. package/dist/_types/orchestrator/tool-exposure-policy.d.ts +100 -0
  129. package/dist/_types/orchestrator/trajectory-checkpoint.d.ts +159 -0
  130. package/dist/_types/orchestrator/types.d.ts +185 -0
  131. package/dist/_types/schemas/dispatch.d.ts +53 -0
  132. package/dist/_types/schemas/feature-workflow.d.ts +362 -0
  133. package/dist/_types/schemas/messages.d.ts +15 -0
  134. package/dist/_types/schemas/nol-assets.d.ts +955 -0
  135. package/dist/_types/schemas/nol-json.d.ts +2 -0
  136. package/dist/_types/schemas/nol.d.ts +3995 -0
  137. package/dist/_types/schemas/patch.d.ts +47 -0
  138. package/dist/_types/schemas/plan.d.ts +47 -0
  139. package/dist/_types/schemas/repoProfile.d.ts +116 -0
  140. package/dist/_types/schemas/retrieval.d.ts +44 -0
  141. package/dist/_types/schemas/task.d.ts +57 -0
  142. package/dist/_types/schemas/tools.d.ts +16 -0
  143. package/dist/_types/schemas/verification.d.ts +31 -0
  144. package/dist/api/py-embed.js +3353 -1829
  145. package/dist/assets/nol-checkpoint-editor.py +701 -0
  146. package/dist/assets/nol-gguf-checkpoint-editor.py +785 -0
  147. package/dist/assets/nol-gguf-control-reader.py +428 -0
  148. package/dist/assets/nol-gne-tools-worker.py +425 -0
  149. package/dist/assets/nol-gne-worker.py +1081 -0
  150. package/dist/assets/nol-lora-exporter.py +349 -0
  151. package/dist/assets/nol-pytorch-control-reader.py +470 -0
  152. package/dist/assets/nol-transformers-nnsight-worker.py +512 -0
  153. package/dist/assets/nol-transformers-peft-validation-worker.py +385 -0
  154. package/dist/assets/nol-transformers-peft-worker.py +488 -0
  155. package/dist/assets/nol-transformers-research-worker.py +472 -0
  156. package/dist/assets/nol-transformers-worker.py +920 -0
  157. package/dist/assets/nol-vllm-owned-worker.py +803 -0
  158. package/dist/assets/nol-vllm-runtime.py +695 -0
  159. package/dist/assets/nol-vllm-tokenizer.py +93 -0
  160. package/dist/assets/nol-vllm-worker.py +201 -0
  161. package/dist/computer-use/configured-planner.d.ts +37 -0
  162. package/dist/computer-use/configured-point.d.ts +35 -0
  163. package/dist/computer-use/host-session.d.ts +60 -0
  164. package/dist/computer-use/runner-ui-port.d.ts +37 -0
  165. package/dist/computer-use/session-review.d.ts +14 -0
  166. package/dist/computer-use/task-spec.d.ts +84 -0
  167. package/dist/discovery.d.ts +16 -2
  168. package/dist/index.js +2 -2
  169. package/dist/library.d.ts +94 -10
  170. package/dist/library.js +144003 -87414
  171. package/dist/memory-maintenance-worker.js +1676 -511
  172. package/dist/nol/cpu-control-reader-profile.d.ts +93 -0
  173. package/dist/nol/cpu-control-reader-service.d.ts +87 -0
  174. package/dist/nol/cuda-lease.d.ts +111 -0
  175. package/dist/nol/cuda-mutations.d.ts +34 -0
  176. package/dist/nol/export-runtime-config.d.ts +114 -0
  177. package/dist/nol/export-service.d.ts +143 -0
  178. package/dist/nol/facade.d.ts +147 -0
  179. package/dist/nol/gguf-cpu-control-reader-profile.d.ts +106 -0
  180. package/dist/nol/gguf-cpu-control-reader-service.d.ts +91 -0
  181. package/dist/nol/gguf-model-control-verifier.d.ts +120 -0
  182. package/dist/nol/gguf-parameter-inventory.d.ts +28 -0
  183. package/dist/nol/gne-adapter.d.ts +134 -0
  184. package/dist/nol/gne-agent-evaluation.d.ts +84 -0
  185. package/dist/nol/gne-profile.d.ts +124 -0
  186. package/dist/nol/gne-tools-profile.d.ts +148 -0
  187. package/dist/nol/gne-tools-transport.d.ts +194 -0
  188. package/dist/nol/model-actions.d.ts +662 -0
  189. package/dist/nol/model-control-verifier.d.ts +135 -0
  190. package/dist/nol/model-json-scorer.d.ts +13 -0
  191. package/dist/nol/model-runtime-config.d.ts +830 -0
  192. package/dist/nol/model-serving.d.ts +130 -0
  193. package/dist/nol/model-subject-adapter.d.ts +72 -0
  194. package/dist/nol/model-validation-factory.d.ts +113 -0
  195. package/dist/nol/neuronary-catalog.d.ts +130 -0
  196. package/dist/nol/orphan-custody.d.ts +72 -0
  197. package/dist/nol/peft-conformance.d.ts +48 -0
  198. package/dist/nol/peft-control-types.d.ts +137 -0
  199. package/dist/nol/peft-control-verifier.d.ts +8 -0
  200. package/dist/nol/peft-model-actions.d.ts +41 -0
  201. package/dist/nol/peft-model-authority.d.ts +146 -0
  202. package/dist/nol/peft-model-controls.d.ts +20 -0
  203. package/dist/nol/peft-model-host.d.ts +47 -0
  204. package/dist/nol/peft-model-profile.d.ts +161 -0
  205. package/dist/nol/peft-model-runtime-config.d.ts +174 -0
  206. package/dist/nol/peft-model-subject-adapter.d.ts +36 -0
  207. package/dist/nol/peft-validation.d.ts +105 -0
  208. package/dist/nol/persistent-parameter-inventory.d.ts +32 -0
  209. package/dist/nol/runtime.d.ts +100 -0
  210. package/dist/nol/sqlite-store.d.ts +80 -0
  211. package/dist/nol/transformers-adapter.d.ts +119 -0
  212. package/dist/nol/transformers-nnsight.d.ts +87 -0
  213. package/dist/nol/transformers-peft.d.ts +107 -0
  214. package/dist/nol/transformers-research.d.ts +114 -0
  215. package/dist/nol/variant-service.d.ts +143 -0
  216. package/dist/nol/variant-store.d.ts +51 -0
  217. package/dist/nol/vllm-actions.d.ts +774 -0
  218. package/dist/nol/vllm-adapter.d.ts +1473 -0
  219. package/dist/nol/vllm-authority.d.ts +55 -0
  220. package/dist/nol/vllm-conformance.d.ts +662 -0
  221. package/dist/nol/vllm-profile.d.ts +850 -0
  222. package/dist/nol/vllm-protocol.d.ts +1505 -0
  223. package/dist/nol/vllm-runtime-config.d.ts +120 -0
  224. package/dist/nol/vllm-runtime.d.ts +34 -0
  225. package/dist/nol/vllm-startup.d.ts +235 -0
  226. package/dist/omni-setup-worker.js +3433 -1909
  227. package/dist/service-version.d.ts +0 -1
  228. package/dist/tui/async-process.d.ts +27 -0
  229. package/dist/tui/native/worker.js +3 -1
  230. package/dist/tui/telegram-action-session-registry.d.ts +136 -0
  231. package/dist/tui/telegram-cognition-queue.d.ts +154 -0
  232. package/dist/tui/telegram-context-packet-v2.d.ts +99 -0
  233. package/dist/tui/telegram-input-ownership.d.ts +78 -0
  234. package/dist/tui/telegram-turn-contract-v2.d.ts +62 -0
  235. package/dist/update-worker-runtime.js +4216 -2603
  236. package/docs/DISCOVERY.json +389 -0
  237. package/docs/DISCOVERY.md +4 -0
  238. package/npm-shrinkwrap.json +28 -12
  239. package/package.json +3 -2
@@ -0,0 +1,254 @@
1
+ import { type QualifiedSourceBodyObservation } from "./canonical-source-body-projection.js";
2
+ export declare const CANONICAL_CONTEXT_PROJECTION_SCHEMA: "omnius.canonical-context-projection.v1";
3
+ export declare const CANONICAL_TASK_FRAME_MARKER: "[CANONICAL ACTIVE TASK FRAME v1]";
4
+ export declare const CANONICAL_EVIDENCE_RECEIPT_MARKER: "[CANONICAL EVIDENCE RECEIPT v1]";
5
+ export type CanonicalProjectionStatus = "ok" | "overflow" | "invalid";
6
+ export type CanonicalContextSlot = "current_goal" | "constraint_set" | "todo_workboard_frontier" | "next_action" | "unresolved_claim" | "source_evidence" | "supporting_context" | "verifier_state" | "unacknowledged_steering" | "focus_directive" | "pending_mutation";
7
+ export type CanonicalProtectionReason = "current_user_authority" | "active_requirement" | "active_action" | "unacknowledged_steering" | "required_evidence" | "pending_mutation" | "verifier_result" | "unresolved_contradiction" | "focus_constraint" | "tool_protocol" | "runtime_policy";
8
+ export interface CanonicalContextSignal {
9
+ /** Stable semantic identity. Revisions of one fact reuse this id. */
10
+ id: string;
11
+ slot: CanonicalContextSlot;
12
+ content: string;
13
+ /** Exact source bytes must not undergo host-prose whitespace normalization. */
14
+ preserveExactContent?: boolean;
15
+ source: string;
16
+ revision?: number;
17
+ turn?: number;
18
+ priority?: number;
19
+ /** Stable identity for plural signals that are semantically equivalent. */
20
+ dedupeKey?: string;
21
+ /** Exact signal ids required to interpret or execute this signal. */
22
+ dependsOn?: string[];
23
+ protection?: CanonicalProtectionReason[];
24
+ allowTruncate?: boolean;
25
+ minContentBytes?: number;
26
+ }
27
+ export interface CanonicalProjectionDecision {
28
+ id: string;
29
+ revision?: number;
30
+ status: "selected" | "dropped" | "truncated";
31
+ reason: "selected" | "older_revision" | "superseded_slot" | "semantic_duplicate" | "outside_dependency_closure" | "superseded_by_canonical_frame" | "stale_work_scope" | "alternate_transaction_representation" | "repeated_completed_observation" | "source_body_referenced" | "missing_protected_dependency" | "budget" | "truncated_to_budget";
32
+ bytes: number;
33
+ }
34
+ export interface CanonicalTaskFrameTrace {
35
+ schema: typeof CANONICAL_CONTEXT_PROJECTION_SCHEMA;
36
+ status: CanonicalProjectionStatus;
37
+ maxBytes?: number;
38
+ finalBytes: number;
39
+ overflowBytes: number;
40
+ selectedSignalIds: string[];
41
+ requiredProtectedIds: string[];
42
+ selectedProtectedIds: string[];
43
+ missingProtectedDependencyIds: string[];
44
+ droppedSignalIds: string[];
45
+ truncatedSignalIds: string[];
46
+ decisions: CanonicalProjectionDecision[];
47
+ }
48
+ export interface CanonicalTaskFrameProjection {
49
+ content: string | null;
50
+ included: CanonicalContextSignal[];
51
+ trace: CanonicalTaskFrameTrace;
52
+ }
53
+ export interface CanonicalTaskFrameInput {
54
+ signals: CanonicalContextSignal[];
55
+ /** Optional caller-selected frame budget; omission preserves full protected content. */
56
+ maxBytes?: number;
57
+ }
58
+ export type CanonicalHistoryKind = "stable" | "current_user_authority" | "mutable_projection" | "tool_transaction_raw" | "evidence_receipt";
59
+ export type CanonicalTransactionRelevance = "active" | "historical";
60
+ /** Host-selected representation; elapsed turns alone do not establish input pressure. */
61
+ export type CanonicalHistoricalTransactionPolicy = "receipt" | "retain_raw";
62
+ export interface CanonicalHistoryEntry<TMessage extends object> {
63
+ id: string;
64
+ message: TMessage;
65
+ kind: CanonicalHistoryKind;
66
+ ordinal: number;
67
+ turn?: number;
68
+ revision?: number;
69
+ priority?: number;
70
+ protection?: CanonicalProtectionReason[];
71
+ /** Required for mutable projections. */
72
+ mutableKey?: string;
73
+ /** Mutable slots represented by this historical projection. */
74
+ mutableSlots?: CanonicalContextSlot[];
75
+ /** Required for raw and receipt transaction representations. */
76
+ transactionId?: string;
77
+ transactionRelevance?: CanonicalTransactionRelevance;
78
+ /** Producer-owned body policy, independent of the generic inline-byte cap. */
79
+ historicalBodyPolicy?: "retain" | "receipt";
80
+ /** Required for compact receipts. The locator is immutable evidence provenance. */
81
+ artifactLocator?: string;
82
+ /** Keeps linked assistant/tool protocol messages atomic during budgeting. */
83
+ atomicGroup?: string;
84
+ /** Exact identity for invariant policy copies that are byte-equivalent. */
85
+ stableKey?: string;
86
+ /** Host-issued successful observation; absent for unknown/effectful operations. */
87
+ completedObservation?: {
88
+ sourceRead?: {
89
+ path: string;
90
+ hash: string;
91
+ startLine: number;
92
+ endLine: number | null;
93
+ };
94
+ equivalenceKey: string;
95
+ resultSha256: string;
96
+ observedAt: string;
97
+ artifactLocator: string;
98
+ evidenceId: string;
99
+ };
100
+ }
101
+ export interface CanonicalHistoryProjection<TMessage extends object> {
102
+ entries: CanonicalHistoryEntry<TMessage>[];
103
+ decisions: CanonicalProjectionDecision[];
104
+ }
105
+ export interface CanonicalEvidenceReceiptInput {
106
+ transactionId: string;
107
+ toolName: string;
108
+ artifactLocator: string;
109
+ evidenceId?: string;
110
+ success?: boolean;
111
+ summary?: string;
112
+ }
113
+ export type CanonicalToolBaselineRole = "capability_discovery" | "completion" | "deferred";
114
+ export interface CanonicalToolPromotion {
115
+ activatedTurn: number;
116
+ ttlTurns: number;
117
+ actionId?: string;
118
+ actionCompleted?: boolean;
119
+ }
120
+ export interface CanonicalToolDescriptor<TDefinition extends object> {
121
+ name: string;
122
+ definition: TDefinition;
123
+ baselineRole?: CanonicalToolBaselineRole;
124
+ priority?: number;
125
+ promotion?: CanonicalToolPromotion;
126
+ }
127
+ export interface CanonicalToolProjectionInput<TDefinition extends object> {
128
+ tools: CanonicalToolDescriptor<TDefinition>[];
129
+ currentTurn: number;
130
+ maxSchemaBytes: number;
131
+ requiredToolNames?: string[];
132
+ capabilityToolNames?: string[];
133
+ /**
134
+ * Capability names that may be evicted to stay inside the schema budget,
135
+ * best-first.
136
+ *
137
+ * A `capabilityToolNames` entry is mandatory, and the budget loop can only
138
+ * evict non-mandatory entries. Promoting more tools than the cap can carry
139
+ * therefore produced an `overflow` projection with nothing evictable, which
140
+ * the caller turns into a throw and a fall back to the baseline tools — so a
141
+ * model was told a tool was callable and then could not call it. Discovery
142
+ * promotions belong here instead: the best-ranked survive, the rest are
143
+ * dropped with a `schema_budget` decision the caller can report.
144
+ */
145
+ evictableCapabilityToolNames?: string[];
146
+ }
147
+ export interface CanonicalToolDecision {
148
+ name: string;
149
+ status: "selected" | "dropped";
150
+ reason: "baseline" | "action_contract" | "capability_contract" | "active_promotion" | "deferred" | "promotion_expired" | "action_completed" | "schema_budget";
151
+ bytes: number;
152
+ mandatory: boolean;
153
+ }
154
+ export interface CanonicalToolProjection<TDefinition extends object> {
155
+ status: CanonicalProjectionStatus;
156
+ definitions: TDefinition[];
157
+ selectedNames: string[];
158
+ missingRequiredToolNames: string[];
159
+ schemaBytes: number;
160
+ maxSchemaBytes: number;
161
+ overflowBytes: number;
162
+ decisions: CanonicalToolDecision[];
163
+ }
164
+ export interface CanonicalModelRequestInput<TMessage extends object, TToolDefinition extends object> {
165
+ baseRequest?: Record<string, unknown>;
166
+ history: CanonicalHistoryEntry<TMessage>[];
167
+ signals: CanonicalContextSignal[];
168
+ makeFrameMessage: (content: string) => TMessage;
169
+ /** Host-only observational encoding. Omission preserves all original pairs. */
170
+ encodeRepeatedObservations?: boolean;
171
+ /** Producer-qualified source spans; every budget pass resolves its own resident keeper. */
172
+ sourceBodyProjection?: {
173
+ scope: string;
174
+ observations: readonly QualifiedSourceBodyObservation[];
175
+ };
176
+ /** Exact protected user carrier authorizing a late current frame; missing anchors retain established placement. */
177
+ frameAfterHistoryId?: string;
178
+ maxFrameBytes?: number;
179
+ maxRequestBytes?: number;
180
+ /** Optional caller-selected input-token ceiling. */
181
+ maxInputTokens?: number;
182
+ /** Measures the fully materialized request using the transport accountant. */
183
+ measureInputTokens?: (request: Record<string, unknown>) => number;
184
+ /** Retain available historical source bodies while the complete request fits. */
185
+ historicalTransactionPolicy?: CanonicalHistoricalTransactionPolicy;
186
+ /** Offload large historical results with durable receipts; active/unread pairs stay exact. */
187
+ historicalToolInlineBytes?: number;
188
+ /** Exclude task projections while retaining protected unacknowledged user authority. */
189
+ excludeMutableProjections?: boolean;
190
+ toolProjection?: CanonicalToolProjection<TToolDefinition>;
191
+ }
192
+ export interface CanonicalRequestTrace {
193
+ schema: typeof CANONICAL_CONTEXT_PROJECTION_SCHEMA;
194
+ status: CanonicalProjectionStatus;
195
+ maxRequestBytes?: number;
196
+ finalRequestBytes: number;
197
+ maxInputTokens?: number;
198
+ finalInputTokens?: number;
199
+ overflowBytes: number;
200
+ requestHash: string;
201
+ selectedMessageIds: string[];
202
+ droppedMessageIds: string[];
203
+ historyDecisions: CanonicalProjectionDecision[];
204
+ frame: CanonicalTaskFrameTrace;
205
+ tools?: {
206
+ selectedNames: string[];
207
+ schemaBytes: number;
208
+ maxSchemaBytes: number;
209
+ overflowBytes: number;
210
+ };
211
+ }
212
+ export interface CanonicalModelRequestProjection<TMessage extends object, TToolDefinition extends object> {
213
+ request: Record<string, unknown> & {
214
+ messages: TMessage[];
215
+ tools?: TToolDefinition[];
216
+ };
217
+ serializedRequest: string;
218
+ /** Normalized semantic winners used to construct the active frame. */
219
+ frame: CanonicalTaskFrameProjection;
220
+ trace: CanonicalRequestTrace;
221
+ }
222
+ /**
223
+ * Resolve the effective protection attached to a signal. Schema-defaulted
224
+ * slots receive their protection even when the producer omits
225
+ * a redundant explicit value. This is the single source used by projection
226
+ * and rollout evidence.
227
+ */
228
+ export declare function canonicalSignalProtection(signal: Pick<CanonicalContextSignal, "slot" | "protection">): CanonicalProtectionReason[];
229
+ /**
230
+ * Return semantic protection identities for the authoritative revision,
231
+ * dedupe, and singular-slot winners. Replacing a stale singular signal moves
232
+ * coverage to its successor instead of inventing a false protected loss.
233
+ */
234
+ export declare function canonicalProtectedSignalCoverage(signals: CanonicalContextSignal[]): string[];
235
+ export declare function projectCanonicalTaskFrame(input: CanonicalTaskFrameInput): CanonicalTaskFrameProjection;
236
+ export declare function normalizeCanonicalHistory<TMessage extends object>(history: CanonicalHistoryEntry<TMessage>[], options?: {
237
+ historicalTransactionPolicy?: CanonicalHistoricalTransactionPolicy;
238
+ historicalToolInlineBytes?: number;
239
+ }): CanonicalHistoryProjection<TMessage>;
240
+ export declare function renderCanonicalEvidenceReceipt(input: CanonicalEvidenceReceiptInput): string;
241
+ export declare function encodeRepeatedCompletedObservations<TMessage extends object>(history: CanonicalHistoryEntry<TMessage>[], makeMessage: (content: string) => TMessage, options?: {
242
+ deferSourceBodies?: boolean;
243
+ }): CanonicalHistoryProjection<TMessage>;
244
+ export declare function projectCanonicalToolSchemas<TDefinition extends object>(input: CanonicalToolProjectionInput<TDefinition>): CanonicalToolProjection<TDefinition>;
245
+ export declare function buildCanonicalModelRequest<TMessage extends object, TToolDefinition extends object>(input: CanonicalModelRequestInput<TMessage, TToolDefinition>): CanonicalModelRequestProjection<TMessage, TToolDefinition>;
246
+ export declare function canonicalRequestHasTransportParity<TMessage extends object, TToolDefinition extends object>(projection: CanonicalModelRequestProjection<TMessage, TToolDefinition>): boolean;
247
+ /** Validate assistant tool-call and tool-result ordering after projection. */
248
+ export declare function canonicalRequestHasValidRoleOrder(messages: Array<{
249
+ role?: unknown;
250
+ tool_call_id?: unknown;
251
+ tool_calls?: Array<{
252
+ id?: unknown;
253
+ }>;
254
+ }>): boolean;
@@ -0,0 +1,51 @@
1
+ /** Process-local custody, issued only after the producer validates source bytes. */
2
+ export interface QualifiedSourceBodyObservation {
3
+ readonly scope: string;
4
+ readonly callId: string;
5
+ readonly toolName?: "file_read" | "web_fetch";
6
+ readonly path: string;
7
+ readonly sourceHash: string;
8
+ readonly startLine: number;
9
+ readonly endLine: number;
10
+ readonly artifactLocator: string;
11
+ readonly format: "raw" | "numbered";
12
+ readonly body: string;
13
+ readonly rows: readonly {
14
+ line: number;
15
+ text: string;
16
+ }[];
17
+ }
18
+ export declare function issueQualifiedSourceBodyObservation(input: {
19
+ scope: string;
20
+ callId: string;
21
+ toolName?: "file_read" | "web_fetch";
22
+ path: string;
23
+ sourceHash: string;
24
+ startLine: number;
25
+ endLine: number;
26
+ artifactLocator: string;
27
+ format: "raw" | "numbered";
28
+ body: string;
29
+ }): QualifiedSourceBodyObservation | null;
30
+ export interface SourceBodyReferenceDecision {
31
+ messageIndex: number;
32
+ callId: string;
33
+ bodyCallId: string;
34
+ path: string;
35
+ sourceHash: string;
36
+ range: {
37
+ startLine: number;
38
+ endLine: number;
39
+ };
40
+ bytesSaved: number;
41
+ }
42
+ /** Fold only qualified source spans that are covered by one body in this packet. */
43
+ export declare function projectQualifiedSourceBodies<TMessage extends object>(input: {
44
+ messages: readonly TMessage[];
45
+ scope: string;
46
+ observations: readonly QualifiedSourceBodyObservation[];
47
+ protectedMessageIndices?: ReadonlySet<number>;
48
+ }): {
49
+ messages: TMessage[];
50
+ decisions: SourceBodyReferenceDecision[];
51
+ };
@@ -0,0 +1,24 @@
1
+ /** Host-authored reviewer availability feedback; never a completion receipt. */
2
+ export interface CompletionReviewPendingV1 {
3
+ schema: "omnius.completion-review-pending.v1";
4
+ phase: "artifact_semantic" | "artifact_claim";
5
+ retryable: true;
6
+ resumeTool: "task_complete";
7
+ resumeArgs: {
8
+ resume_review: true;
9
+ };
10
+ }
11
+ /** Accepted host-owned closeout restored without changing model tool arguments. */
12
+ export interface CompletionRestoredPayloadV1 {
13
+ schema: "omnius.completion-restored-payload.v1";
14
+ userReply: string;
15
+ summary: string;
16
+ status?: string;
17
+ question?: string;
18
+ missingCriterionIds?: readonly string[];
19
+ }
20
+ export declare function isCompletionReviewPendingV1(value: unknown): value is CompletionReviewPendingV1;
21
+ /** Only a registered host completion rejection can describe pending review. */
22
+ export declare function isCompletionReviewPendingResult(toolName: string, result: unknown): boolean;
23
+ export declare function isCompletionRestoredPayloadV1(value: unknown): value is CompletionRestoredPayloadV1;
24
+ export declare function completionReviewPendingGuard(value: CompletionReviewPendingV1): string;
@@ -0,0 +1,103 @@
1
+ /**
2
+ * completionContract.ts — evidence-backed completion framing.
3
+ *
4
+ * This module carries the operator request, proposed completion claims, and
5
+ * observed run data into a review packet that asks the reviewing model to
6
+ * derive the live completion scenario.
7
+ */
8
+ export type CompletionSurface = string;
9
+ export type CompletionEvidenceKind = string;
10
+ export interface CompletionVariableField {
11
+ key: string;
12
+ label: string;
13
+ fieldType: "text" | "number" | "boolean" | "json";
14
+ elevation: "required" | "preferred" | "optional";
15
+ sourceMode: "manual" | "template_variable" | "data_library" | "connector" | "external" | "derived";
16
+ description: string;
17
+ acceptanceCriteria: string;
18
+ }
19
+ export interface CompletionRequirement {
20
+ id: string;
21
+ surface: CompletionSurface;
22
+ label: string;
23
+ evidenceKind: CompletionEvidenceKind;
24
+ acceptanceCriteria: string;
25
+ variableKeys: string[];
26
+ }
27
+ export interface CompletionPhase {
28
+ key: string;
29
+ label: string;
30
+ instructions: string;
31
+ requirementIds: string[];
32
+ fields: CompletionVariableField[];
33
+ gate: {
34
+ key: string;
35
+ instructions: string;
36
+ };
37
+ }
38
+ export interface CompletionWorkspaceInventoryEntry {
39
+ path: string;
40
+ bytes?: number;
41
+ mtimeMs?: number;
42
+ }
43
+ export interface CompletionWorkspaceInventory {
44
+ root: string;
45
+ files: CompletionWorkspaceInventoryEntry[];
46
+ dirs?: string[];
47
+ truncated: boolean;
48
+ maxFiles: number;
49
+ maxDirs: number;
50
+ generatedAtIso: string;
51
+ }
52
+ export interface CompletionContract {
53
+ goalSummary: string;
54
+ surfaces: CompletionSurface[];
55
+ fields: CompletionVariableField[];
56
+ requirements: CompletionRequirement[];
57
+ phases: CompletionPhase[];
58
+ acceptanceCriteria: string[];
59
+ }
60
+ export interface CompletionEvidenceLogEntry {
61
+ name: string;
62
+ argsKey?: string;
63
+ success?: boolean;
64
+ outputPreview?: string;
65
+ mutated?: boolean;
66
+ mutatedFiles?: string[];
67
+ turn?: number;
68
+ }
69
+ export interface CompletionScenarioPlanEntry {
70
+ content: string;
71
+ status?: string;
72
+ reconciled?: string;
73
+ rationale?: string;
74
+ }
75
+ export interface CompletionScenarioFileEntry {
76
+ path: string;
77
+ status?: string;
78
+ bytes?: number;
79
+ }
80
+ export interface CompletionScenarioInput {
81
+ contract: CompletionContract;
82
+ taskText?: string;
83
+ proposedSummary?: string;
84
+ answerText?: string;
85
+ log?: CompletionEvidenceLogEntry[];
86
+ openLoops?: string[];
87
+ recentFailures?: string[];
88
+ planStatus?: CompletionScenarioPlanEntry[];
89
+ modifiedFiles?: CompletionScenarioFileEntry[];
90
+ workspaceInventory?: CompletionWorkspaceInventory;
91
+ }
92
+ export interface CompletionScenarioDecomposition {
93
+ scenarioSeed: string;
94
+ prompt: string;
95
+ proposedClaimText: string;
96
+ observedEvidence: string[];
97
+ unresolvedSignals: string[];
98
+ }
99
+ export declare function normalizeCompletionKey(value: unknown, fallback?: string): string;
100
+ export declare function inferCompletionContract(taskText: string): CompletionContract;
101
+ export declare function inferCompletionContractFromTexts(texts: unknown[], fallbackSummary?: string): CompletionContract;
102
+ export declare function buildCompletionScenarioDecomposition(input: CompletionScenarioInput): CompletionScenarioDecomposition;
103
+ export declare function formatCompletionContract(contract: CompletionContract, scenario?: Omit<CompletionScenarioInput, "contract">): string;
@@ -0,0 +1,224 @@
1
+ /**
2
+ * Authoritative terminal commit record.
3
+ *
4
+ * Completion has several useful projections (ledger, workboard, debug index,
5
+ * trajectory, and UI). Filesystem renames cannot atomically span those
6
+ * directories, so this immutable marker is the transaction boundary: it is
7
+ * prepared first, then the terminal projection set is written, and finally a
8
+ * single committed marker is atomically renamed into place. A restart can
9
+ * therefore distinguish an unfinished prepare from a user-visible result.
10
+ */
11
+ import type { CompletionLedger, CompletionLedgerStatus } from "./completionLedger.js";
12
+ import type { CompletionReadinessSnapshot } from "./completionReadiness.js";
13
+ import type { ContextAdmissionReceipt } from "./context-admission.js";
14
+ import type { TerminalTaskReport } from "./terminalTaskReport.js";
15
+ import type { CompletionDeliveryReceipt, ExpectedOutcomeAssessmentV1, ExpectedOutcomeContractV1 } from "./expectedOutcomeContract.js";
16
+ import type { ExternalEffectReceiptV1, NeedsInputContractV1, ObjectiveFrontierSnapshotV1, RunConvergenceStateV1, TaskObjectiveContractV1, VerificationReceiptV1 } from "./taskObjective.js";
17
+ export type TerminalRunStatus = "completed" | "incomplete_verification" | "incomplete" | "awaiting_input";
18
+ /** Host runtime evidence, independent of model text or tool output. */
19
+ interface TerminalRuntimeFailureScope {
20
+ schema: "omnius.terminal-runtime-failure.v1";
21
+ runId: string;
22
+ taskEpoch: number;
23
+ turn: number;
24
+ contextDumpId?: string;
25
+ }
26
+ export interface TerminalContextAdmissionFailure extends TerminalRuntimeFailureScope {
27
+ code: "context_admission_failed";
28
+ phase: "before_transport";
29
+ contextAdmission: ContextAdmissionReceipt;
30
+ }
31
+ export interface TerminalModelEmptyResponseFailure extends TerminalRuntimeFailureScope {
32
+ code: "model_empty_response_stall";
33
+ phase: "after_transport";
34
+ consecutiveEmptyResponses: number;
35
+ model?: string;
36
+ }
37
+ /** Transport-owned terminal boundary; a frontend must not replay this input. */
38
+ export interface TerminalInferenceFailure extends TerminalRuntimeFailureScope {
39
+ code: "remote_inference_unavailable" | "inference_stream_interrupted" | "fallback_approval_required" | "fallback_declined";
40
+ phase: "after_transport";
41
+ retryable: false;
42
+ }
43
+ export interface TerminalRepeatedFailedToolFailure extends TerminalRuntimeFailureScope {
44
+ code: "repeated_failed_tool_stall";
45
+ phase: "after_tool";
46
+ retryable: false;
47
+ toolName: "shell";
48
+ repeatedAttempts: number;
49
+ operationSha256: string;
50
+ resultSha256: string;
51
+ }
52
+ export type TerminalRuntimeFailure = TerminalContextAdmissionFailure | TerminalModelEmptyResponseFailure | TerminalInferenceFailure | TerminalRepeatedFailedToolFailure;
53
+ /**
54
+ * Immutable, local identity of the process that authored a terminal receipt.
55
+ *
56
+ * This deliberately captures only values available in-process. In particular,
57
+ * it does not infer a Git revision by spawning a child process or persist the
58
+ * process environment/arguments, either of which can be absent or sensitive.
59
+ * The loaded module hash and the owning package manifest hash identify the
60
+ * actual on-disk build that wrote the receipt.
61
+ */
62
+ export interface CompletionRuntimeProvenance {
63
+ schema: "omnius.runtime-provenance.v1";
64
+ capturedAtIso: string;
65
+ process: {
66
+ pid: number;
67
+ /** Best available Node runtime estimate, derived from its monotonic uptime. */
68
+ startedAtIso: string;
69
+ startTimestampSource: "node_process_uptime";
70
+ nodeVersion: string;
71
+ nodeRelease: string | null;
72
+ executablePath: string;
73
+ cwd: string;
74
+ };
75
+ module: {
76
+ /** The exact module file that generated this receipt (source in tests, built JS in production). */
77
+ path: string;
78
+ sha256: string | null;
79
+ };
80
+ package: {
81
+ manifestPath: string | null;
82
+ name: string | null;
83
+ version: string | null;
84
+ manifestSha256: string | null;
85
+ };
86
+ }
87
+ export interface CompletionFinalizationRecord {
88
+ schema: "omnius.completion-finalization.v1";
89
+ /** A prepared receipt is recoverable but never user-visible as completion. */
90
+ phase: "prepared" | "committed";
91
+ id: string;
92
+ runId: string;
93
+ taskEpoch?: number;
94
+ status: TerminalRunStatus;
95
+ ledgerStatus?: CompletionLedgerStatus;
96
+ /** Observed coverage is audit data, not an inferred task obligation. */
97
+ verificationAudit: {
98
+ status: "no_observed_gap" | "unverified";
99
+ gaps: Array<{
100
+ id: string;
101
+ source: string;
102
+ detail: string;
103
+ }>;
104
+ };
105
+ summary: string;
106
+ runtimeFailure?: TerminalRuntimeFailure;
107
+ /** User report frozen with the committed evidence snapshot; absent on legacy/prepared records. */
108
+ terminalReport?: TerminalTaskReport;
109
+ /** Exact immutable report-only evidence for a conversation; never a task authority ledger. */
110
+ reportEvidenceReference?: string;
111
+ /** Host-bound terminal expectation and its deterministic runtime assessment. */
112
+ expectedOutcomeContract?: ExpectedOutcomeContractV1;
113
+ expectedOutcomeAssessment?: ExpectedOutcomeAssessmentV1;
114
+ taskObjectiveContract?: TaskObjectiveContractV1;
115
+ objectiveFrontier?: ObjectiveFrontierSnapshotV1;
116
+ objectiveConvergence?: RunConvergenceStateV1;
117
+ externalEffectReceipts?: ExternalEffectReceiptV1[];
118
+ verificationReceipts?: VerificationReceiptV1[];
119
+ needsInput?: NeedsInputContractV1;
120
+ objectiveLedgerPath?: string;
121
+ /** Deterministic host authority used to accept or reject terminal success. */
122
+ completionReadiness?: CompletionReadinessSnapshot;
123
+ readinessHash?: string;
124
+ boardHash?: string;
125
+ workboardRevision?: string;
126
+ todoRevision?: number;
127
+ unresolvedIds?: string[];
128
+ evidenceToRequirement?: Array<{
129
+ obligationId: string;
130
+ evidenceIds: string[];
131
+ }>;
132
+ verifierReceipts?: CompletionReadinessSnapshot["latestVerifierReceipts"];
133
+ completionDisposition?: CompletionReadinessSnapshot["disposition"];
134
+ overrideReason?: string;
135
+ overrideReceiptId?: string;
136
+ committedAtIso: string;
137
+ /** Runtime identity of the process which authored this terminal receipt. */
138
+ runtimeProvenance: CompletionRuntimeProvenance;
139
+ /** Exact current evidence selected for the terminal conclusion. */
140
+ evidenceIds: string[];
141
+ /** Structured command-level receipts that justified terminal selection. */
142
+ commandReceipts: Array<{
143
+ evidenceId: string;
144
+ toolName: string;
145
+ role: string;
146
+ command: string;
147
+ canonicalCommand: string;
148
+ cwd: string;
149
+ exitCode: number | null;
150
+ timedOut: boolean;
151
+ startedAtIso: string;
152
+ finishedAtIso: string;
153
+ observedPaths: string[];
154
+ artifactHashes: Array<{
155
+ path: string;
156
+ sha256: string;
157
+ }>;
158
+ }>;
159
+ /** Provider acknowledgements for externally visible delivery effects. */
160
+ deliveryReceipts: CompletionDeliveryReceipt[];
161
+ artifactHashes: Array<{
162
+ path: string;
163
+ sha256: string;
164
+ }>;
165
+ projections: {
166
+ ledger: "pending" | "committed";
167
+ workboard: "pending" | "committed" | "not_applicable";
168
+ debug: "pending" | "committed" | "not_applicable";
169
+ trajectory: "pending" | "committed";
170
+ tui: "pending" | "committed";
171
+ };
172
+ }
173
+ export interface TerminalTrajectoryProjection {
174
+ schema: "omnius.terminal-trajectory.v1";
175
+ terminalReceiptId: string;
176
+ runId: string;
177
+ status: TerminalRunStatus;
178
+ committedAtIso: string;
179
+ payload: Record<string, unknown>;
180
+ }
181
+ /**
182
+ * Capture bounded authoring-process provenance for a terminal record.
183
+ *
184
+ * `process.uptime()` is monotonic and available on every supported Node
185
+ * platform. Its derived timestamp is deliberately labelled as an estimate;
186
+ * exact OS process birth time is platform-specific and is not required to
187
+ * make the executable/module/package identity auditable.
188
+ */
189
+ export declare function captureCompletionRuntimeProvenance(capturedAtIso?: string): CompletionRuntimeProvenance;
190
+ export declare function buildCompletionFinalizationRecord(input: {
191
+ runId: string;
192
+ taskEpoch?: number;
193
+ status: TerminalRunStatus;
194
+ summary: string;
195
+ runtimeFailure?: TerminalRuntimeFailure;
196
+ expectedOutcomeContract?: ExpectedOutcomeContractV1;
197
+ expectedOutcomeAssessment?: ExpectedOutcomeAssessmentV1;
198
+ taskObjectiveContract?: TaskObjectiveContractV1;
199
+ objectiveFrontier?: ObjectiveFrontierSnapshotV1;
200
+ objectiveConvergence?: RunConvergenceStateV1;
201
+ externalEffectReceipts?: ExternalEffectReceiptV1[];
202
+ verificationReceipts?: VerificationReceiptV1[];
203
+ needsInput?: NeedsInputContractV1;
204
+ objectiveLedgerPath?: string;
205
+ completionReadiness?: CompletionReadinessSnapshot;
206
+ deliveryReceipts?: CompletionDeliveryReceipt[];
207
+ ledger?: CompletionLedger | null;
208
+ workboardPresent?: boolean;
209
+ committedAtIso?: string;
210
+ }): CompletionFinalizationRecord;
211
+ export declare function completionFinalizationPath(stateDir: string, runId: string): string;
212
+ export declare function completionFinalizationPreparePath(stateDir: string, runId: string): string;
213
+ /** Persist an intention before touching any derived terminal projection. */
214
+ export declare function prepareCompletionFinalization(stateDir: string, record: CompletionFinalizationRecord): string;
215
+ /** Commit the immutable authority record before any user-visible terminal event. */
216
+ export declare function commitCompletionFinalization(stateDir: string, record: CompletionFinalizationRecord): string;
217
+ /**
218
+ * Durable trajectory projection included in the terminal transaction. Unlike
219
+ * optional RFT sampling, every terminal outcome gets this small receipt-linked
220
+ * trajectory so recovery never has to reconstruct what completion meant.
221
+ */
222
+ export declare function commitTerminalTrajectoryProjection(stateDir: string, record: CompletionFinalizationRecord, payload: Record<string, unknown>): string;
223
+ export declare function loadCompletionFinalization(stateDir: string, runId: string): CompletionFinalizationRecord | null;
224
+ export {};