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,177 @@
1
+ import type { TaskObjectiveContractV1 } from "./taskObjective.js";
2
+ import type { ObjectiveFrontierSnapshotV1 } from "./taskObjective.js";
3
+ import type { CompletionEvidence } from "./completionLedger.js";
4
+ import type { TaskEffectStateEvidenceV1 } from "./taskEffectEvidence.js";
5
+ export declare const TASK_WORK_PLAN_SCHEMA: "omnius.task-work-plan.v1";
6
+ export interface TaskWorkProgressProposalV1 {
7
+ snapshotSha256: string;
8
+ planRevision: number;
9
+ selectedUnitId: string;
10
+ outcomeEvidenceIds: string[];
11
+ nextUnitId: string;
12
+ reason: string;
13
+ }
14
+ /** Host-captured dispatch ownership. This describes an operation, never goal acceptance. */
15
+ export interface TaskWorkOperationBindingV1 {
16
+ schema: "omnius.task-work-operation.v1";
17
+ runId: string;
18
+ taskEpoch: number;
19
+ contractRevision: number;
20
+ requirementSetSha256: string;
21
+ policySha256: string;
22
+ planRevision: number;
23
+ unitId: string;
24
+ unitDefinitionSha256: string;
25
+ operationRef: string;
26
+ operationGeneration: number;
27
+ effect: "read_only" | "external_effect";
28
+ resultSha256: string;
29
+ }
30
+ export interface TaskWorkProgressProofV1 {
31
+ schema: "omnius.task-work-progress-proof.v1";
32
+ runId: string;
33
+ taskEpoch: number;
34
+ contractRevision: number;
35
+ requirementSetSha256: string;
36
+ policySha256: string;
37
+ unitDefinitionSha256: string;
38
+ proposal: TaskWorkProgressProposalV1;
39
+ outcomes: Array<{
40
+ evidenceId: string;
41
+ evidenceSha256: string;
42
+ operationRef: string;
43
+ }>;
44
+ workCriteria: Array<{
45
+ criterionId: string;
46
+ evidenceIds: string[];
47
+ }>;
48
+ /** Method-local execution witnesses; these are never objective criteria. */
49
+ localOutcomes?: Array<{
50
+ kind: "observation" | "mutation";
51
+ evidenceIds: string[];
52
+ }>;
53
+ /** Exact source versions used by a local checkpoint, never substitute observations. */
54
+ readinessObservations?: TaskWorkReadinessProofV1["observations"];
55
+ artifacts: Array<{
56
+ path: string;
57
+ sha256: string;
58
+ evidenceId: string;
59
+ }>;
60
+ externalEffects: Array<{
61
+ evidenceId: string;
62
+ receiptSha256: string;
63
+ }>;
64
+ }
65
+ export interface TaskWorkReadinessV1 {
66
+ kind: "observed_criteria";
67
+ criterionIds: string[];
68
+ }
69
+ /** Authored before execution; admission requires actual unit-owned outcomes. */
70
+ export interface TaskWorkCheckpointV1 {
71
+ kind: "owned_outcomes";
72
+ requiredKinds: Array<"observation" | "mutation">;
73
+ }
74
+ /** Procedural source availability, never semantic requirement acceptance. */
75
+ export interface TaskWorkReadinessProofV1 {
76
+ schema: "omnius.task-work-readiness-proof.v1";
77
+ contractRevision: number;
78
+ requirementSetSha256: string;
79
+ observations: Array<{
80
+ criterionId: string;
81
+ evidenceId: string;
82
+ evidenceSha256: string;
83
+ }>;
84
+ }
85
+ export interface TaskWorkUnitV1 {
86
+ id: string;
87
+ /** Exact native obligations this method serves. Absent only on legacy plans. */
88
+ requirementIds?: string[];
89
+ criterionIds: string[];
90
+ dependsOn: string[];
91
+ purpose: string;
92
+ sourceRefs: string[];
93
+ attemptState: "proposed" | "selected" | "running" | "checkpointed" | "settled";
94
+ outcomeEvidenceIds: string[];
95
+ /** Model-proposed procedural handoff; served acceptance criteria stay unchanged. */
96
+ readiness?: TaskWorkReadinessV1;
97
+ checkpoint?: TaskWorkCheckpointV1;
98
+ /** Host-derived references to exact immutable observation entries. */
99
+ readinessProof?: TaskWorkReadinessProofV1;
100
+ /** Model-proposed or host-derived source handoff with owned, actual work outcomes. */
101
+ progressProof?: TaskWorkProgressProofV1;
102
+ /** Reference into the existing effect/interruption records, never another effect state. */
103
+ pendingOperationRef?: string;
104
+ }
105
+ export interface TaskWorkPlanV1 {
106
+ schema: typeof TASK_WORK_PLAN_SCHEMA;
107
+ objectiveRef: string;
108
+ objectiveHash: string;
109
+ taskEpoch: number;
110
+ contractRevision: number;
111
+ requirementSetSha256: string;
112
+ revision: number;
113
+ units: TaskWorkUnitV1[];
114
+ selectedUnitId?: string;
115
+ }
116
+ export declare function normalizeTaskWorkProgressProposalV1(value: unknown): TaskWorkProgressProposalV1 | null;
117
+ export declare function normalizeTaskWorkOperationBindingV1(value: unknown): TaskWorkOperationBindingV1 | null;
118
+ export declare function normalizeTaskWorkReadinessV1(value: unknown): TaskWorkReadinessV1 | null;
119
+ export declare function normalizeTaskWorkCheckpointV1(value: unknown): TaskWorkCheckpointV1 | null;
120
+ /** Aggregate effects and result verification are not source-readiness predicates. */
121
+ export declare function taskWorkReadinessCriterionIdsV1(contract: TaskObjectiveContractV1): string[];
122
+ export declare function normalizeTaskWorkPlanV1(value: unknown): TaskWorkPlanV1 | null;
123
+ export declare function digestTaskWorkPlanV1(value: TaskWorkPlanV1): string;
124
+ export interface TaskWorkPlanBindingInputV1 {
125
+ plan: TaskWorkPlanV1;
126
+ contract: TaskObjectiveContractV1;
127
+ evidenceIds?: readonly string[];
128
+ /** Required when validating a durable procedural checkpoint. IDs alone are not proof. */
129
+ evidence?: readonly CompletionEvidence[];
130
+ sourceRefs?: readonly string[];
131
+ pendingOperationRefs?: readonly string[];
132
+ /** Current reopened state, required before a physical procedural proof can schedule work. */
133
+ effectState?: TaskEffectStateEvidenceV1;
134
+ /** Host-reopened exact predecessor row; never an alternate run-ID allowlist. */
135
+ isCurrentInheritedOutcome?: (entry: CompletionEvidence) => boolean;
136
+ }
137
+ export declare function taskWorkPolicySha256V1(contract: TaskObjectiveContractV1): string;
138
+ export declare function taskWorkUnitDefinitionSha256V1(unit: TaskWorkUnitV1): string;
139
+ type TaskWorkProgressHandoffInputV1 = TaskWorkPlanBindingInputV1 & {
140
+ frontier: ObjectiveFrontierSnapshotV1;
141
+ runId: string;
142
+ };
143
+ /** Whether an explicit handoff could be proposed now; grants no progress or acceptance. */
144
+ export declare function taskWorkProgressHandoffEligibleV1(input: TaskWorkProgressHandoffInputV1): boolean;
145
+ export declare function applyTaskWorkProgressProposalV1(input: TaskWorkPlanBindingInputV1 & {
146
+ proposal: TaskWorkProgressProposalV1;
147
+ snapshotSha256: string;
148
+ frontier: ObjectiveFrontierSnapshotV1;
149
+ runId: string;
150
+ }): TaskWorkPlanV1 | null;
151
+ /** Complete an explicitly authored source checkpoint from its exact required
152
+ * unit-owned receipts. This schedules existing work; it grants no goal effect,
153
+ * semantic review, new source assignment or delivery acceptance. */
154
+ export declare function applyTaskWorkOwnedSourceCheckpointV1(input: TaskWorkProgressHandoffInputV1 & {
155
+ snapshotSha256: string;
156
+ }): TaskWorkPlanV1 | null;
157
+ /** Schedule a unique authored successor from current explicit owned outcomes.
158
+ * The shared proposal validator still checks every witness and dependency;
159
+ * this transition grants no semantic acceptance or goal completion. */
160
+ export declare function applyTaskWorkOwnedCheckpointV1(input: TaskWorkProgressHandoffInputV1 & {
161
+ snapshotSha256: string;
162
+ }): TaskWorkPlanV1 | null;
163
+ export declare function validateTaskWorkPlanV1(input: TaskWorkPlanBindingInputV1): boolean;
164
+ /** Rebinding changes method ownership, never the native task or receipt truth. */
165
+ export declare function rebindTaskWorkPlanV1(input: TaskWorkPlanBindingInputV1): TaskWorkPlanV1 | null;
166
+ /** Reconciles procedural handoff separately from final goal/requirement acceptance.
167
+ * The caller supplies its current scoped frontier after source-version validation. */
168
+ export declare function reconcileTaskWorkPlanProgressV1(input: {
169
+ plan: TaskWorkPlanV1;
170
+ contract: TaskObjectiveContractV1;
171
+ frontier: ObjectiveFrontierSnapshotV1;
172
+ evidence: readonly CompletionEvidence[];
173
+ runId?: string;
174
+ effectState?: TaskEffectStateEvidenceV1;
175
+ isCurrentInheritedOutcome?: (entry: CompletionEvidence) => boolean;
176
+ }): TaskWorkPlanV1;
177
+ export {};
@@ -0,0 +1,42 @@
1
+ /** Host-authored byte ownership, never inferred from a quoted chat heading. */
2
+ export interface TelegramPassiveHistoryManifest {
3
+ schema: "omnius.telegram-passive-history.v1";
4
+ dynamicContextHash: string;
5
+ scope: {
6
+ sessionId: string;
7
+ inputId: string;
8
+ chatId: string;
9
+ messageThreadId: number;
10
+ actorId?: string;
11
+ };
12
+ /** Producer chronology is separate from display offsets (JS characters, end exclusive). */
13
+ spans: Array<{
14
+ id: string;
15
+ start: number;
16
+ end: number;
17
+ sha256: string;
18
+ evictionOrder: number;
19
+ }>;
20
+ }
21
+ export type TelegramPassiveHistoryScope = TelegramPassiveHistoryManifest["scope"];
22
+ export interface TelegramPassiveHistoryPartition {
23
+ context: string;
24
+ dynamicContextHash: string;
25
+ scope: TelegramPassiveHistoryManifest["scope"];
26
+ spans: Array<{
27
+ id: string;
28
+ start: number;
29
+ end: number;
30
+ content: string;
31
+ sha256: string;
32
+ evictionOrder: number;
33
+ }>;
34
+ }
35
+ /** Invalid/stale ownership grants no partition authority; callers keep the ordinary context path. */
36
+ export declare function partitionTelegramPassiveHistory(input: {
37
+ dynamicContext: string;
38
+ manifest: TelegramPassiveHistoryManifest | undefined;
39
+ sessionId: string;
40
+ /** Independently supplied current native owner; never copied from a stale manifest. */
41
+ expectedScope: TelegramPassiveHistoryScope | undefined;
42
+ }): TelegramPassiveHistoryPartition | null;
@@ -0,0 +1,91 @@
1
+ import { type CompletionLedger } from "./completionLedger.js";
2
+ import type { CompletionFinalizationRecord, TerminalRunStatus } from "./completionFinalization.js";
3
+ import { type VerificationReceiptV1 } from "./taskObjective.js";
4
+ export interface TerminalTaskReport {
5
+ schema: "omnius.terminal-task-report.v1";
6
+ source: "host_terminal_receipt";
7
+ runId: string;
8
+ taskEpoch?: number;
9
+ terminalReceiptId: string;
10
+ status: TerminalRunStatus;
11
+ readinessHash?: string;
12
+ ledgerSnapshotHash: string;
13
+ reportHash: string;
14
+ generatedAtIso: string;
15
+ changes: Array<{
16
+ evidenceId: string;
17
+ path: string;
18
+ toolName: string;
19
+ }>;
20
+ checks: Array<{
21
+ evidenceId: string;
22
+ toolName: string;
23
+ role: string;
24
+ command: string;
25
+ cwd: string;
26
+ outcome: "passed" | "observed" | "exit_zero" | "failed" | "timed_out" | "unverified";
27
+ exitCode: number | null;
28
+ primaryExitCode?: number | null;
29
+ freshness: "current" | "stale" | "unknown" | "superseded";
30
+ kind?: "host_verification";
31
+ verification?: Pick<VerificationReceiptV1, "evidenceId" | "criterionId" | "artifactEvidenceId" | "artifactRevision" | "verifierMethod">;
32
+ }>;
33
+ observations: Array<{
34
+ evidenceId: string;
35
+ toolName: string;
36
+ paths: string[];
37
+ }>;
38
+ limits: Array<{
39
+ id: string;
40
+ source: string;
41
+ detail: string;
42
+ }>;
43
+ nextSteps: string[];
44
+ omitted: {
45
+ changes: number;
46
+ checks: number;
47
+ observations: number;
48
+ limits: number;
49
+ nextSteps?: number;
50
+ };
51
+ }
52
+ export interface TerminalTaskReportBinding {
53
+ runId: string;
54
+ taskEpoch?: number;
55
+ terminalReceiptId: string;
56
+ status: TerminalRunStatus;
57
+ readinessHash?: string;
58
+ }
59
+ /** Derived by the host from the exact active workflow at terminal commit. */
60
+ export interface TerminalWorkflowSummary {
61
+ runId: string;
62
+ taskEpoch: number;
63
+ planReference: string;
64
+ complete: boolean;
65
+ summary: string;
66
+ nextAction: string;
67
+ }
68
+ /** Snapshot only host evidence at the terminal commit; never parse summary/stdout. */
69
+ export declare function buildTerminalTaskReport(input: {
70
+ record: CompletionFinalizationRecord;
71
+ ledger?: CompletionLedger | null;
72
+ /** Host diagnosis of missing or rejected evidence from an interrupted conversation. */
73
+ evidenceGap?: string;
74
+ workflow?: TerminalWorkflowSummary;
75
+ }): TerminalTaskReport;
76
+ /** Identity and integrity check at the host-to-frontend boundary, not model authorization. */
77
+ export declare function terminalTaskReportMatches(report: TerminalTaskReport | null | undefined, binding: TerminalTaskReportBinding): boolean;
78
+ /**
79
+ * Deterministic, bounded user result. Execution outcomes retain their exact scope.
80
+ *
81
+ * `includeToolTelemetry` separates the two audiences this report serves. The
82
+ * evidence surface wants every recorded observation; a chat reply must not
83
+ * carry bookkeeping the reader cannot act on. An observation with no target
84
+ * paths renders as bare tool telemetry ("tool_search completed."), which says
85
+ * nothing about the work and reads as an internal dump when delivered as a
86
+ * message, so it is withheld from the chat audience and kept in the evidence.
87
+ */
88
+ export declare function renderTerminalTaskReport(report: TerminalTaskReport, options?: {
89
+ maxChars?: number;
90
+ includeToolTelemetry?: boolean;
91
+ }): string;
@@ -0,0 +1,147 @@
1
+ import type { TodoStatus } from "../execution/tools/todo-store.js";
2
+ /**
3
+ * Structured todo state for UI and transport consumers.
4
+ *
5
+ * This module deliberately consumes todo fields rather than tool output text.
6
+ * The todo id and parentId are the identity and hierarchy authorities.
7
+ */
8
+ export interface ObservableTodoInput {
9
+ id: string;
10
+ content: string;
11
+ activeForm?: string;
12
+ status: TodoStatus;
13
+ parentId?: string;
14
+ blocker?: string;
15
+ owner?: string;
16
+ blocks?: readonly string[];
17
+ blockedBy?: readonly string[];
18
+ createdAt?: number;
19
+ updatedAt?: number;
20
+ completedAt?: number;
21
+ }
22
+ export interface TodoSnapshotItem extends ObservableTodoInput {
23
+ /** Stable position in the authoritative todo store snapshot. */
24
+ sourceOrdinal: number;
25
+ }
26
+ export interface TodoStatusCounts {
27
+ pending: number;
28
+ inProgress: number;
29
+ completed: number;
30
+ blocked: number;
31
+ }
32
+ export interface TodoSnapshotCounts {
33
+ total: number;
34
+ roots: number;
35
+ leaves: number;
36
+ open: number;
37
+ openLeaves: number;
38
+ status: TodoStatusCounts;
39
+ leafStatus: TodoStatusCounts;
40
+ }
41
+ export interface TodoSnapshot {
42
+ schemaVersion: 1;
43
+ sessionId: string;
44
+ taskEpoch?: number;
45
+ /** Caller-owned monotonic revision for this session/task epoch. */
46
+ revision: number;
47
+ observedAt: string;
48
+ items: TodoSnapshotItem[];
49
+ counts: TodoSnapshotCounts;
50
+ }
51
+ export interface CreateTodoSnapshotInput {
52
+ sessionId: string;
53
+ taskEpoch?: number;
54
+ revision: number;
55
+ observedAt: string;
56
+ todos: readonly ObservableTodoInput[];
57
+ }
58
+ export type TodoHierarchyIssueCode = "missing_parent" | "self_parent" | "cyclic_parent";
59
+ export interface TodoHierarchyIssue {
60
+ code: TodoHierarchyIssueCode;
61
+ todoId: string;
62
+ parentId: string;
63
+ }
64
+ export interface TodoRenderRow extends TodoSnapshotItem {
65
+ /** Stable depth-first position for presentation. */
66
+ ordinal: number;
67
+ depth: number;
68
+ /** Parent used by the rendered hierarchy; omitted for repaired roots. */
69
+ resolvedParentId?: string;
70
+ displayStatus: TodoStatus;
71
+ directChildCount: number;
72
+ descendantCount: number;
73
+ leafCounts: TodoStatusCounts;
74
+ }
75
+ export type TodoRenderState = "empty" | "active" | "blocked" | "completed";
76
+ export interface TodoRenderModel {
77
+ schemaVersion: 1;
78
+ sessionId: string;
79
+ taskEpoch?: number;
80
+ revision: number;
81
+ observedAt: string;
82
+ state: TodoRenderState;
83
+ counts: TodoSnapshotCounts;
84
+ activeTodoIds: string[];
85
+ blockedTodoIds: string[];
86
+ rows: TodoRenderRow[];
87
+ hierarchyIssues: TodoHierarchyIssue[];
88
+ }
89
+ interface TodoTransitionBase {
90
+ sessionId: string;
91
+ taskEpoch?: number;
92
+ fromRevision: number;
93
+ toRevision: number;
94
+ observedAt: string;
95
+ todoId: string;
96
+ }
97
+ export type TodoTransition = (TodoTransitionBase & {
98
+ kind: "created";
99
+ item: TodoSnapshotItem;
100
+ }) | (TodoTransitionBase & {
101
+ kind: "deleted";
102
+ previous: TodoSnapshotItem;
103
+ }) | (TodoTransitionBase & {
104
+ kind: "status_changed";
105
+ from: TodoStatus;
106
+ to: TodoStatus;
107
+ item: TodoSnapshotItem;
108
+ }) | (TodoTransitionBase & {
109
+ kind: "reparented";
110
+ fromParentId: string | null;
111
+ toParentId: string | null;
112
+ item: TodoSnapshotItem;
113
+ }) | (TodoTransitionBase & {
114
+ kind: "content_changed";
115
+ from: string;
116
+ to: string;
117
+ item: TodoSnapshotItem;
118
+ }) | (TodoTransitionBase & {
119
+ kind: "details_changed";
120
+ fields: TodoDetailField[];
121
+ item: TodoSnapshotItem;
122
+ });
123
+ export type TodoDetailField = "activeForm" | "blocker" | "owner" | "blocks" | "blockedBy";
124
+ export interface TodoSnapshotEvent {
125
+ type: "todo_snapshot";
126
+ runId: string;
127
+ snapshot: TodoSnapshot;
128
+ timestamp?: string;
129
+ }
130
+ export interface TodoTransitionEvent {
131
+ type: "todo_transition";
132
+ runId: string;
133
+ transition: TodoTransition;
134
+ snapshotRevision: number;
135
+ timestamp?: string;
136
+ }
137
+ export declare function createTodoSnapshot(input: CreateTodoSnapshotInput): TodoSnapshot;
138
+ export declare function buildTodoRenderModel(snapshot: TodoSnapshot): TodoRenderModel;
139
+ /**
140
+ * Produces deterministic structured changes. Current items are emitted in
141
+ * current source order; deletions follow in previous source order. For a
142
+ * retained item, status, hierarchy, content, then detail changes are emitted.
143
+ */
144
+ export declare function diffTodoSnapshots(previous: TodoSnapshot, current: TodoSnapshot): TodoTransition[];
145
+ export declare function createTodoSnapshotEvent(runId: string, snapshot: TodoSnapshot): TodoSnapshotEvent;
146
+ export declare function createTodoTransitionEvents(runId: string, previous: TodoSnapshot, current: TodoSnapshot): TodoTransitionEvent[];
147
+ export {};
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Tool-schema exposure is a model-context concern, not an authority grant.
3
+ * Execution-time policy, approval state, and provider permissions must still
4
+ * be checked by the tool executor after a model selects an exposed tool.
5
+ */
6
+ export type ProgressiveToolRole = "core" | "completion" | "dispatcher" | "approval-boundary" | "specialized";
7
+ export interface ProgressiveToolDescriptor {
8
+ name: string;
9
+ role: ProgressiveToolRole;
10
+ /** Every named capability must be present in the trusted profile. */
11
+ requiresCapabilities?: readonly string[];
12
+ }
13
+ /**
14
+ * Construct this profile from authenticated runtime state. Never derive it
15
+ * from user/model text. Capability names are opaque policy identifiers.
16
+ */
17
+ export interface TrustedToolExecutionProfile {
18
+ id: string;
19
+ capabilities: readonly string[];
20
+ /** Fail closed when configuration makes the always-visible core too large. */
21
+ maximumAlwaysVisibleTools?: number;
22
+ /** Bound schemas activated by tool_search at one time. */
23
+ maximumPromotedTools?: number;
24
+ /**
25
+ * Deferral trades one discovery round-trip for schema budget. When the
26
+ * allowed catalog (excluding the dispatcher) has at most this many tools,
27
+ * that trade buys nothing, so every allowed tool is inline and no
28
+ * dispatcher is required. Unset means specialized tools always defer.
29
+ */
30
+ inlineWholeCatalogUpTo?: number;
31
+ }
32
+ export interface ToolSearchPromotion {
33
+ source: "tool_search";
34
+ toolName: string;
35
+ }
36
+ export type RejectedToolPromotionReason = "not-registered" | "not-specialized" | "profile-capability-denied" | "promotion-budget-exceeded";
37
+ export interface RejectedToolPromotion {
38
+ toolName: string;
39
+ reason: RejectedToolPromotionReason;
40
+ }
41
+ export interface ProgressiveToolPolicyPlan {
42
+ schema: "omnius.progressive-tool-policy.v1";
43
+ revision: string;
44
+ profileId: string;
45
+ /** Inline regardless of promotion state. */
46
+ alwaysVisible: string[];
47
+ /** Specialized tools activated through tool_search. */
48
+ promoted: string[];
49
+ /** Full schemas included in the current model request. */
50
+ inline: string[];
51
+ /** Discoverable through tool_search, but not directly callable this turn. */
52
+ deferred: string[];
53
+ /** Registered tools withheld by the trusted execution profile. */
54
+ unavailable: string[];
55
+ rejectedPromotions: RejectedToolPromotion[];
56
+ dispatcherRequired: boolean;
57
+ dispatcher: string | null;
58
+ authority: "execution-enforced-separately";
59
+ }
60
+ /**
61
+ * Compile deterministic schema exposure from trusted state.
62
+ *
63
+ * There is intentionally no task, message, query, or natural-language input.
64
+ * Specialized tools become inline only through explicit tool_search receipts.
65
+ */
66
+ export declare function compileProgressiveToolPolicy(input: {
67
+ profile: TrustedToolExecutionProfile;
68
+ tools: Iterable<ProgressiveToolDescriptor>;
69
+ promotions?: Iterable<ToolSearchPromotion>;
70
+ /** Trusted action/capability contracts, separately enforced at execution. */
71
+ requiredToolNames?: Iterable<string>;
72
+ /** Best-first ordering of optional discovery leases; omitted stays stable. */
73
+ promotionOrder?: readonly string[];
74
+ }): ProgressiveToolPolicyPlan;
75
+ /** Adapter for buildRuntimeCapabilityContract's exposure map. */
76
+ export declare function progressiveToolExposureMap(plan: ProgressiveToolPolicyPlan): ReadonlyMap<string, "inline" | "deferred" | "dispatcher">;
77
+ export interface ProgressiveToolSchemaMetrics {
78
+ baselineBytes: number;
79
+ progressiveBytes: number;
80
+ inlineSchemaBytes: number;
81
+ deferredIndexBytes: number;
82
+ savedBytes: number;
83
+ savedRatio: number;
84
+ /** Same conservative two-bytes-per-token charge used for tool schemas. */
85
+ estimatedBaselineTokens: number;
86
+ estimatedProgressiveTokens: number;
87
+ estimatedSavedTokens: number;
88
+ }
89
+ /**
90
+ * Measure serialized schema cost without importing provider-specific types.
91
+ * Unavailable tools are excluded from both sides of the comparison.
92
+ */
93
+ export declare function measureProgressiveToolSchemas(input: {
94
+ plan: ProgressiveToolPolicyPlan;
95
+ definitions: Iterable<{
96
+ name: string;
97
+ definition: unknown;
98
+ }>;
99
+ deferredCatalog?: unknown;
100
+ }): ProgressiveToolSchemaMetrics;