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,549 @@
1
+ import type { EvidenceEvent } from "./evidence.js";
2
+ import type { DesktopVerificationScope, DesktopVerificationReceipt } from "./rapid-computer-use/desktop-verification.js";
3
+ import type { PdfNativeTables } from "./tools/pdf-native-tables.js";
4
+ import type { FeatureWorkflowOperationBinding, FeatureWorkflowInputArtifact, FeatureWorkflowChildReceipt, FeatureWorkflowCard } from "../schemas/feature-workflow.js";
5
+ /**
6
+ * What was actually materialized by a successful tool call. `success` says
7
+ * the tool completed; this record says whether the returned bytes are a
8
+ * canonical artifact or only a recoverable prefix/head-tail capture.
9
+ */
10
+ export interface ArtifactMaterialization {
11
+ schema: "omnius.artifact-materialization.v1";
12
+ status: "canonical" | "partial";
13
+ kind: "file_read" | "tool_output" | "branch_extract";
14
+ /** Path of the source artifact when the producing tool knows it. */
15
+ sourcePath?: string;
16
+ /** Full-source hash for canonical file reads. */
17
+ sourceHash?: string;
18
+ /** Selected source range, inclusive and 1-based. */
19
+ sourceRange?: {
20
+ startLine: number;
21
+ endLine: number | null;
22
+ };
23
+ /** Bytes and lines actually observed before any output cap. */
24
+ observedBytes: number;
25
+ observedLines: number;
26
+ /** Present only when output was capped or capture stopped early. */
27
+ truncation?: {
28
+ reason: "output_cap" | "capture_cap" | "line_cap";
29
+ capBytes?: number;
30
+ savedPaths?: string[];
31
+ narrowingHint: string;
32
+ };
33
+ }
34
+ /**
35
+ * Trusted execution facts emitted by a local command runner. This is
36
+ * deliberately separate from `output`: display text can be truncated,
37
+ * decorated, or quoted by another tool, while completion decisions need the
38
+ * command identity and process outcome that the runner actually observed.
39
+ */
40
+ export interface CommandEvidenceReceipt {
41
+ schema: "omnius.command-evidence-receipt.v1";
42
+ command: string;
43
+ /** Stable command form for evidence grouping; never inferred from output. */
44
+ canonicalCommand: string;
45
+ cwd: string;
46
+ /**
47
+ * Effective outcome used by Omnius after its narrowly-scoped executor
48
+ * policies (for example an exact trailing `EXIT=$?` reporter). The raw
49
+ * runner outcome and the primary-command outcome remain separately
50
+ * inspectable below; consumers must not infer either from display output.
51
+ */
52
+ exitCode?: number | null;
53
+ /** The command segment whose status this receipt is asserting. */
54
+ primaryCommand?: string;
55
+ /** Status of `primaryCommand`, distinct from wrapper/process status. */
56
+ primaryExitCode?: number | null;
57
+ /** How `primaryExitCode` was obtained. */
58
+ primaryExitProvenance?: "runner_process" | "trailing_exit_reporter";
59
+ /** Actual status returned by the local command runner before policy logic. */
60
+ runnerExitCode?: number | null;
61
+ pipefail: boolean;
62
+ timedOut: boolean;
63
+ /** Actual process-local shell run, never reconstructed from command/output. */
64
+ shellRunId?: string;
65
+ timeoutMs?: number | null;
66
+ cancelled?: boolean;
67
+ signal?: string | null;
68
+ startedAtIso: string;
69
+ finishedAtIso: string;
70
+ /** Executor-classified negative search result, never parsed from stdout. */
71
+ observation?: {
72
+ kind: "search_no_match";
73
+ };
74
+ /** Optional immutable pointer to a spilled full command transcript. */
75
+ outputRef?: string;
76
+ /** Exact explicit task artifacts observed by this local command, when the
77
+ * controller can attest the relationship. This is never inferred from
78
+ * display output and never grants verification authority by itself. */
79
+ observedPaths?: string[];
80
+ artifactHashes?: Array<{
81
+ path: string;
82
+ sha256: string;
83
+ }>;
84
+ /**
85
+ * Explicit Omnius verifier protocol observed in the command output. This is
86
+ * a process result signal, not a replacement for the process exit code.
87
+ */
88
+ declaredVerification?: {
89
+ protocol: "OMNIUS_VERIFICATION_RESULT";
90
+ outcome: "pass" | "fail";
91
+ };
92
+ }
93
+ /**
94
+ * Evidence emitted by the native PDF reader. It is deliberately structured
95
+ * so the agent loop can distinguish an observed negative query result from a
96
+ * parser, capability, or OCR failure without reverse-engineering prose.
97
+ */
98
+ export interface DocumentExtractionReceipt {
99
+ schema: "omnius.document-extraction.v1";
100
+ kind: "pdf";
101
+ /** Stable SHA-256 of the source bytes; never infer identity from a path. */
102
+ documentHash: string;
103
+ sourcePath: string;
104
+ pageCount?: number;
105
+ requestedPages: number[];
106
+ extractedPages: number[];
107
+ /** A page may combine native text with OCR for an image/table-only page. */
108
+ backend: "native_text" | "selective_ocr" | "mixed" | "none";
109
+ outcome: "text_extracted" | "query_not_found"
110
+ /** A query miss where one or more selected pages/layers were not searched. */
111
+ | "query_inconclusive" | "visual_markdown_unavailable" | "visual_markdown_failed" | "ocr_required" | "dependency_unavailable" | "encrypted" | "malformed" | "not_found" | "invalid_request" | "timeout" | "ocr_failed";
112
+ retry: "never" | "after_capability_change" | "with_different_pages" | "with_query_or_visual_review";
113
+ nextAction: string;
114
+ nativeCharacters: number;
115
+ ocrCharacters: number;
116
+ query?: string;
117
+ queryMatchedPages?: number[];
118
+ /** Query coverage is explicit so a bounded OCR fallback cannot imply absence. */
119
+ queryCoverage?: {
120
+ nativeSearchedPages: number[];
121
+ ocrCandidatePages: number[];
122
+ ocrSearchedPages: number[];
123
+ unsearchedPages: number[];
124
+ complete: boolean;
125
+ };
126
+ truncated?: boolean;
127
+ /** Pages whose text was extracted but omitted from model output by the character cap. */
128
+ outputOmittedPages?: number[];
129
+ cacheHit?: boolean;
130
+ generatedArtifacts?: string[];
131
+ /** Literal native word geometry; column associations are explicitly advisory. */
132
+ nativeTables?: PdfNativeTables[];
133
+ /** Optional page-attributed visual Markdown stage; it never overwrites native/OCR evidence. */
134
+ visualMarkdown?: {
135
+ backend: string;
136
+ model?: string;
137
+ promptRevision: string;
138
+ pages: Array<{
139
+ page: number;
140
+ renderedArtifact: string;
141
+ renderHash: string;
142
+ outcome: "transcribed" | "failed" | "truncated";
143
+ markdownHash?: string;
144
+ error?: string;
145
+ }>;
146
+ };
147
+ pageStats: Array<{
148
+ page: number;
149
+ source: "native_text" | "ocr" | "mixed" | "none";
150
+ characters: number;
151
+ queryMatched?: boolean;
152
+ nativeAttempted?: boolean;
153
+ ocrAttempted?: boolean;
154
+ ocrSucceeded?: boolean;
155
+ ocrError?: string;
156
+ }>;
157
+ }
158
+ /**
159
+ * Explicit identity and isolation contract for a stateful tool runtime.
160
+ *
161
+ * Browser automation is particularly easy to misuse: Playwright and the
162
+ * legacy Selenium helper can both be alive while holding different cookies,
163
+ * pages, focus, and permissions. This receipt makes that boundary data, not
164
+ * an easily-truncated sentence in a tool description.
165
+ */
166
+ export interface ToolRuntimeSession {
167
+ schema: "omnius.tool-runtime-session.v1";
168
+ runtime: string;
169
+ state: "active" | "closed" | "unavailable";
170
+ /** Opaque runtime-owned identifier; omitted when the runtime is closed. */
171
+ sessionId?: string;
172
+ persistentAcrossCalls: boolean;
173
+ /** Runtimes whose page state, cookies, and permissions are NOT shared. */
174
+ isolatedFrom: string[];
175
+ /** True when this call intentionally started/restarted a runtime session. */
176
+ boundaryChanged?: boolean;
177
+ nextAction?: string;
178
+ }
179
+ /**
180
+ * Host-owned identity for tools whose durable state is scoped to one runner.
181
+ * The host binds this once before execution. Model arguments cannot replace
182
+ * it. `taskEpoch` is diagnostic identity; stores that are session-wide may
183
+ * use only `sessionId`.
184
+ */
185
+ export interface ToolExecutionScope {
186
+ sessionId: string;
187
+ taskEpoch?: number;
188
+ ownerId?: string;
189
+ }
190
+ export interface CorpusInputExposureConfirmation {
191
+ schema: "omnius.corpus-input-exposure.v1";
192
+ executionScope: ToolExecutionScope;
193
+ claimId: string;
194
+ inputId: string;
195
+ /** Local offsets into the exact input, not an inferred document range. */
196
+ inputCharStart: number;
197
+ inputCharEnd: number;
198
+ textSha256: string;
199
+ /** Exact successful host request messages, not an echoed model token. */
200
+ requestSha256: string;
201
+ }
202
+ export interface CorpusPreparedInputRead {
203
+ schema: "omnius.corpus-input-read.v1";
204
+ executionScope: ToolExecutionScope;
205
+ corpusId: string;
206
+ operationId?: string;
207
+ claimId?: string;
208
+ inputId: string;
209
+ inputCharStart: number;
210
+ inputCharEnd: number;
211
+ textSha256: string;
212
+ text: string;
213
+ kind: "source_segment" | "derived_children";
214
+ /** Exact immutable page channel; OCR output is never labelled native text. */
215
+ sourceChannel?: string;
216
+ /** Current host lease duration, used only for transport-time renewal. */
217
+ leaseMs?: number;
218
+ }
219
+ /** Per-invocation authority supplied by the host, never parsed from tool args. */
220
+ export interface ToolInvocationContext {
221
+ signal?: AbortSignal;
222
+ /** Host-owned operation fence. Late work must check before publishing artifacts. */
223
+ assertCurrent?: () => void;
224
+ /** Host-authored correlation for one actual process; never model arguments. */
225
+ shellRun?: import("./shell-runs.js").ShellRunInvocation;
226
+ /** Current runner-owned task context for bounded UI policy requests. Never tool/page input. */
227
+ uiTaskContext?: {
228
+ goal: string;
229
+ runId: string;
230
+ taskEpoch: number;
231
+ assertCurrent: () => void;
232
+ };
233
+ /** Host physical-window allocation for this exact returned read slice.
234
+ * Applied before durable read progress; never supplied by model args. */
235
+ corpusReadAllocation?: {
236
+ maxChars: number;
237
+ contextWindowTokens: number;
238
+ };
239
+ /**
240
+ * Host-authored semantic identity for the exact external effect admitted by
241
+ * the orchestrator. Tools may bind a provider receipt to this identity, but
242
+ * command output and model arguments cannot create or replace it.
243
+ */
244
+ objectiveEffectIntent?: ToolExternalEffectIntent;
245
+ /**
246
+ * Host-owned authority for classifying a structured local EACCES/EPERM as
247
+ * an elevation candidate. Tool arguments and command output cannot create
248
+ * this authority. The command must exactly match the admitted invocation.
249
+ */
250
+ elevationAuthority?: {
251
+ allowed: true;
252
+ source: "local_admin" | "trusted_tool";
253
+ command: string;
254
+ };
255
+ /** Trusted surface decision; remote/public surfaces always use `deny`. */
256
+ elevationPolicy?: {
257
+ mode: "native" | "deny";
258
+ surface: "local_admin" | "telegram" | "background" | "api";
259
+ toolName: string;
260
+ };
261
+ featureWorkflow?: {
262
+ binding: FeatureWorkflowOperationBinding;
263
+ inputArtifacts: FeatureWorkflowInputArtifact[];
264
+ card: FeatureWorkflowCard;
265
+ outputSlotIds: string[];
266
+ allowedToolNames: string[];
267
+ parentToolProfile?: {
268
+ name?: string;
269
+ allow?: string[];
270
+ deny?: string[];
271
+ };
272
+ };
273
+ }
274
+ export type ToolObjectiveEvidenceKind = "visible_response" | "observation" | "mutation" | "verification" | "delivery" | "external_effect" | "provider_registration" | "transport" | "authenticated_session" | "human_input";
275
+ export interface ToolExternalEffectIntent {
276
+ effectKind: string;
277
+ semanticTarget: string;
278
+ idempotencyKey: string;
279
+ criterionIds: string[];
280
+ }
281
+ export interface ToolExternalEffectReceipt {
282
+ schema: "omnius.external-effect-receipt.v1";
283
+ effectKind: string;
284
+ semanticTarget: string;
285
+ idempotencyKey: string;
286
+ effectState: "pending" | "applied" | "absent" | "unknown";
287
+ artifactRevision?: string;
288
+ evidenceId: string;
289
+ criterionIds: string[];
290
+ evidenceKinds?: ToolObjectiveEvidenceKind[];
291
+ destination?: {
292
+ url: string;
293
+ provider: string;
294
+ };
295
+ }
296
+ export interface ToolVerificationReceipt {
297
+ schema: "omnius.verification-receipt.v1";
298
+ evidenceId: string;
299
+ criterionId: string;
300
+ artifactEvidenceId: string;
301
+ artifactRevision?: string;
302
+ verifierMethod: string;
303
+ outcome: "passed" | "artifact_failed" | "verifier_invalid" | "downstream_auth_required" | "inconclusive";
304
+ evidenceIds: string[];
305
+ evidenceKinds?: ToolObjectiveEvidenceKind[];
306
+ }
307
+ /** Exact accepted child response and the host receipt that owns its bytes. */
308
+ export interface FeatureWorkflowChildOutput {
309
+ receipt: FeatureWorkflowChildReceipt;
310
+ reportText: string;
311
+ }
312
+ /** Host-issued monotonic private work cursor; preparation, never source/delivery evidence. */
313
+ export interface DurableToolWorkProgress {
314
+ /** Fixed host producer for the separate Telegram acquisition database. Never a job/model ID. */
315
+ producerId?: "telegram_native_manifest" | "telegram_export_review" | "telegram_source_review";
316
+ /** Cold SQL revalidation admits one retry; never a progress/result credit. */
317
+ intentOnly?: true;
318
+ schema: "omnius.durable-tool-work-progress.v1";
319
+ executionScope: ToolExecutionScope;
320
+ workId: string;
321
+ /** Zero is admission-only for a genuine pending job before its first progress event. */
322
+ sequence: number;
323
+ stateSha256: string;
324
+ pending: boolean;
325
+ }
326
+ export interface Tool {
327
+ name: string;
328
+ aliases?: string[];
329
+ description: string;
330
+ /**
331
+ * Bounded, model-facing operating contract for tools whose correct use
332
+ * cannot be preserved by truncating the first sentence of `description`.
333
+ */
334
+ modelFacingSummary?: string;
335
+ /**
336
+ * Optional compact schema exposed to the model. Runtime validation and
337
+ * execution continue to use `parameters`; this only prevents a large,
338
+ * well-known tool from being evicted by the model-facing schema budget.
339
+ */
340
+ modelFacingParameters?: Record<string, unknown>;
341
+ parameters: Record<string, unknown>;
342
+ /** Host capability: request invocation-scoped cancellation even outside a workflow. */
343
+ acceptsInvocationContext?: boolean;
344
+ /** This tool validates and settles its own explicit deadline, including null. */
345
+ ownsInvocationDeadline?: boolean;
346
+ execute(args: Record<string, unknown>, context?: ToolInvocationContext): Promise<ToolResult>;
347
+ /**
348
+ * Receive the names of every tool actually registered beside this one and
349
+ * return the matching description, so guidance never names an absent tool.
350
+ */
351
+ setAvailableTools?: (names: ReadonlySet<string>) => string;
352
+ /** Bind durable tool state to one host-owned runner identity. */
353
+ bindExecutionScope?: (scope: ToolExecutionScope) => void;
354
+ /** Verify an actual returned read against private scoped immutable inputs. */
355
+ prepareCorpusInputExposure?: (data: unknown) => CorpusPreparedInputRead | Promise<CorpusPreparedInputRead>;
356
+ /** Host-only successful model-transport exposure; never a callable tool. */
357
+ confirmCorpusInputExposure?: (input: CorpusInputExposureConfirmation) => void | Promise<void>;
358
+ /** Hold an already issued read claim while its current model request runs. */
359
+ renewCorpusInputExposure?: (input: {
360
+ executionScope: ToolExecutionScope;
361
+ claimId: string;
362
+ }) => void | Promise<void>;
363
+ /** Host-only bounded exact numeric inputs for independent field review. */
364
+ reopenCorpusAggregateInputs?: (input: {
365
+ executionScope: ToolExecutionScope;
366
+ corpusId: string;
367
+ operationId: string;
368
+ field: string;
369
+ pageSize?: number;
370
+ cursor?: string;
371
+ }) => unknown | Promise<unknown>;
372
+ /** Host-only reopen of an immutable actor-attested field ordering handle. */
373
+ reopenCorpusOrderedSources?: (input: {
374
+ executionScope: ToolExecutionScope;
375
+ corpusId: string;
376
+ operationId: string;
377
+ orderId: string;
378
+ pageSize?: number;
379
+ cursor?: string;
380
+ }) => unknown | Promise<unknown>;
381
+ /** Host-only cold restart proof; never a model-callable action or progress event. */
382
+ prepareDurableWorkIntent?: (args: Record<string, unknown>, context?: ToolInvocationContext) => Promise<void>;
383
+ /** Private SQL/cursor proof; callable only by the owning runtime, never the model. */
384
+ getDurableWorkProgress?: (args: Record<string, unknown>, result?: {
385
+ success: boolean;
386
+ data?: unknown;
387
+ }) => DurableToolWorkProgress | null;
388
+ /** Host-only provenance seam; never reconstructed from model arguments or output. */
389
+ getSourceCorpusDatabaseIdentity?: () => {
390
+ path: string;
391
+ workingRoot: string;
392
+ scopeId: string;
393
+ } | null;
394
+ /**
395
+ * Best-effort cancellation hook for work that outlives a JavaScript promise.
396
+ * ToolExecutor calls this when its deadline expires so persistent workers and
397
+ * child processes are not left running after the client has received a
398
+ * timeout response.
399
+ */
400
+ cancel?: () => void | Promise<void>;
401
+ /** Explicit owner class for pause/stop accounting; never inferred from text. */
402
+ interruptionKind?: "model" | "read_tool" | "mutating_tool" | "delivery" | "browser" | "media" | "scheduled_action" | "background_cognition" | "sub_agent" | "process";
403
+ inputSchema?: unknown;
404
+ /** Pure host-owned canonicalization before schema, permission and execution.
405
+ * Return an argument object; reject conflicting or unsupported inputs. */
406
+ normalizeInput?: (args: Record<string, unknown>) => Record<string, unknown>;
407
+ prompt?: (context: {
408
+ modelTier: string;
409
+ taskGoal: string;
410
+ }) => Promise<string>;
411
+ executeStream?: (args: Record<string, unknown>, context?: ToolInvocationContext) => AsyncGenerator<string, ToolResult, undefined>;
412
+ /** Optional value-level validation after schema parsing and before execute(). */
413
+ validateInput?: (args: Record<string, unknown>, context?: {
414
+ toolName: string;
415
+ workingDir: string;
416
+ }) => {
417
+ result: true;
418
+ } | {
419
+ result: false;
420
+ message: string;
421
+ errorCode?: number;
422
+ } | Promise<{
423
+ result: true;
424
+ } | {
425
+ result: false;
426
+ message: string;
427
+ errorCode?: number;
428
+ }>;
429
+ /** Parsed-input concurrency metadata, used by the orchestrator scheduler. */
430
+ isConcurrencySafe?: (args: Record<string, unknown>) => boolean;
431
+ isReadOnly?: (args: Record<string, unknown>) => boolean;
432
+ /**
433
+ * The call can only observe: even if it fails it changed nothing. Completion evidence only; never
434
+ * permission, concurrency, lease or history authority, which `isReadOnly` keeps.
435
+ */
436
+ isObservationOnly?: (args: Record<string, unknown>) => boolean;
437
+ /** Private execution-time identity for encoding historical observations only. */
438
+ getHistoryObservationIdentity?: (args: Record<string, unknown>, result: ToolResult) => string | null;
439
+ /** Current provider desktop/session identity. Host-only; unavailable is fail-closed. */
440
+ getDesktopVerificationScope?: () => DesktopVerificationScope | undefined;
441
+ /** Host-owned semantic identity evaluated before external-effect dispatch. */
442
+ objectiveEffectIntent?: (args: Record<string, unknown>, context: {
443
+ runId: string;
444
+ taskEpoch: number;
445
+ }) => ToolExternalEffectIntent | null;
446
+ /** Optional per-tool cap before oversized result triage offloads output. */
447
+ maxResultSizeChars?: number;
448
+ }
449
+ /** Executor facts for recovery routing; display prose is not the contract. */
450
+ export interface ToolFailureFact {
451
+ kind: "hash_conflict" | "text_mismatch" | "schema_validation" | "filesystem_not_found" | "compiler" | "module_resolution" | "syntax" | "type";
452
+ path?: string;
453
+ expectedHash?: string;
454
+ actualHash?: string;
455
+ field?: string;
456
+ expectedField?: string;
457
+ }
458
+ export interface ToolResult {
459
+ success: boolean;
460
+ failure?: ToolFailureFact;
461
+ /** Host-issued observation origin, independent of runtime-authored presentation. */
462
+ evidenceOrigin?: "executed" | "reused" | "control";
463
+ /** Actual process-local shell identity, including a still-running background start. */
464
+ shellRunId?: string;
465
+ /** Observation/dispatch custody only, never external-effect or task-success proof. */
466
+ desktopVerificationReceipt?: DesktopVerificationReceipt;
467
+ /**
468
+ * User-facing display content. Always populated.
469
+ * This is what gets shown to the user (TUI, logs, memex archive).
470
+ */
471
+ output: string;
472
+ /**
473
+ * Optional model-facing content. When set, this is what the LLM sees
474
+ * in the tool result message (instead of `output`). Tools opt in to
475
+ * provide a token-optimized representation for the model while keeping
476
+ * rich display content in `output`.
477
+ *
478
+ * Inspired by Qwen Code's ToolResult.llmContent vs returnDisplay split.
479
+ * Keeps backward compat: tools that don't set this fall back to `output`.
480
+ */
481
+ llmContent?: string;
482
+ /** Complete captured operator transcript when inline/model output was spilled.
483
+ * Observation only; consumers must opt in and redact before displaying. */
484
+ operatorDetail?: {
485
+ output: string;
486
+ };
487
+ error?: string;
488
+ durationMs: number;
489
+ /**
490
+ * Machine-readable tool payload. `output` remains the backwards-compatible
491
+ * display string; integrations should consume this field when a tool exposes
492
+ * a stable schema.
493
+ */
494
+ data?: unknown;
495
+ /** Host-issued complete web response; never reconstructed from preview text. */
496
+ nativeWebSource?: import("./web-source.js").NativeWebSource;
497
+ /** Issued complete HTTP response with immutable file-backed views and bounded range reads. */
498
+ nativeStreamedWebSource?: import("./streamed-web-source.js").NativeStreamedWebSource;
499
+ /** Host-issued complete page/element/evaluation observation, without HTTP or effect authority. */
500
+ nativePageContentSource?: import("./page-content-source.js").NativePageContentSource;
501
+ /** True only when this tool call actually changed project files on disk. */
502
+ mutated?: boolean;
503
+ /** Project file paths changed by this tool call. Empty for dry-runs/no-ops. */
504
+ mutatedFiles?: string[];
505
+ /** Compact patch/diff preview for provenance and context repair. */
506
+ diff?: string;
507
+ /** True when the tool intentionally previewed without writing. */
508
+ dryRun?: boolean;
509
+ /** True when the requested write matched current disk state and was skipped. */
510
+ noop?: boolean;
511
+ /**
512
+ * True when the requested replacement was already present on disk while the
513
+ * requested old text was absent. This is stronger than a generic no-op: the
514
+ * edit's desired postcondition is already satisfied, so stale-edit recovery
515
+ * state may be retired without treating the call as a failure.
516
+ */
517
+ alreadyApplied?: boolean;
518
+ /** True when only part of a requested multi-edit batch landed. */
519
+ partial?: boolean;
520
+ /** Exact vs partial provenance for the bytes this call made available. */
521
+ artifactMaterialization?: ArtifactMaterialization;
522
+ /** SHA-256 of the file content before the action, when applicable. */
523
+ beforeHash?: string;
524
+ /** SHA-256 of the file content after the action, when applicable. */
525
+ afterHash?: string;
526
+ /** Runtime evidence events produced by visual/browser/desktop tools. */
527
+ evidenceEvents?: EvidenceEvent[];
528
+ /** Trusted process-level facts for a local shell execution, when available. */
529
+ executionReceipt?: CommandEvidenceReceipt;
530
+ /** Actual per-command receipts from a multi-step invocation, in execution order. */
531
+ executionReceipts?: CommandEvidenceReceipt[];
532
+ /** Typed document extraction provenance for page-aware document tools. */
533
+ documentExtraction?: DocumentExtractionReceipt;
534
+ /** Typed stateful-runtime identity and isolation information. */
535
+ runtimeSession?: ToolRuntimeSession;
536
+ /** Runtime-owned child completion provenance; ordinary output is not proof. */
537
+ featureWorkflowChildOutput?: FeatureWorkflowChildOutput;
538
+ /** Provider acknowledgement bound to the host-admitted effect identity. */
539
+ externalEffectReceipt?: ToolExternalEffectReceipt;
540
+ /** Protocol verification bound to the exact provider artifact/revision. */
541
+ verificationReceipt?: ToolVerificationReceipt;
542
+ }
543
+ export interface ExecutionConfig {
544
+ workingDir: string;
545
+ timeout: number;
546
+ allowedCommands?: string[];
547
+ blockedPaths?: string[];
548
+ maxOutputSize: number;
549
+ }
@@ -0,0 +1,14 @@
1
+ import type { WebFetchReceipt } from "./tools/web-fetch.js";
2
+ import { type HtmlSourceEvidence } from "./html-source-evidence.js";
3
+ /** Complete native UTF-8 HTTP response, separate from a bounded display view. */
4
+ export interface NativeWebSource {
5
+ readonly schema: "omnius.native-web-source.v1";
6
+ readonly body: string;
7
+ readonly receipt: Readonly<WebFetchReceipt>;
8
+ /** Deeply frozen static source claims, not semantic approval or execution authority. */
9
+ readonly htmlEvidence?: HtmlSourceEvidence;
10
+ }
11
+ /** Internal producer seam; not exported from the execution package API. */
12
+ export declare function issueNativeWebSource(body: string, receipt: WebFetchReceipt): NativeWebSource;
13
+ /** Model arguments, JSON copies and external receipt metadata cannot issue this identity. */
14
+ export declare function verifiedNativeWebSource(value: unknown): NativeWebSource | null;