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,78 @@
1
+ /** Host-provided correlation only. Command arguments cannot create this identity. */
2
+ export interface ShellRunInvocation {
3
+ callId?: string;
4
+ runId?: string;
5
+ sessionId?: string;
6
+ taskEpoch?: number;
7
+ ownerId?: string;
8
+ }
9
+ export type ShellRunState = "running" | "completed" | "failed" | "stopped" | "timed_out";
10
+ export interface ShellRunSnapshot {
11
+ id: string;
12
+ source: "shell" | "background_run";
13
+ taskId?: string;
14
+ /** Host-owned custody proof. Present only after a background lease registers. */
15
+ leaseId?: string;
16
+ command: string;
17
+ cwd: string;
18
+ timeoutMs: number | null;
19
+ startedAt: number;
20
+ finishedAt?: number;
21
+ pid: number;
22
+ state: ShellRunState;
23
+ exitCode: number | null;
24
+ signal: string | null;
25
+ sequence: number;
26
+ outputTail: string;
27
+ omittedBytes: number;
28
+ invocation?: ShellRunInvocation;
29
+ }
30
+ export type ShellRunEvent = {
31
+ type: "start" | "end";
32
+ runId: string;
33
+ sequence: number;
34
+ run: ShellRunSnapshot;
35
+ } | {
36
+ type: "output";
37
+ runId: string;
38
+ sequence: number;
39
+ channel: "stdout" | "stderr";
40
+ text: string;
41
+ };
42
+ export interface ShellRunSource {
43
+ /** Future events only. Subscribe then snapshot; sequence numbers fence overlap. */
44
+ subscribeRuns(listener: (event: ShellRunEvent) => void): () => void;
45
+ snapshotRuns(): readonly ShellRunSnapshot[];
46
+ /** Resolves only after this owned process has settled; never accepts a PID. */
47
+ stopRun(runId: string): Promise<boolean>;
48
+ }
49
+ export declare const SHELL_RUN_TAIL_BYTES = 65536;
50
+ export declare const SHELL_RUN_TERMINAL_RETENTION = 32;
51
+ export declare const SHELL_MODEL_GUIDANCE = "Run command:string with required timeout: positive integer milliseconds or null for no deadline. Example: {\"command\":\"pwd\",\"timeout\":null}. Optional stdin:string. No cwd/workdir/yield fields; use cd inside command. Persistent jobs: background_run.";
52
+ /** Preserve exact intent for a small set of historical spellings. Never
53
+ * supply a deadline, coerce values, or choose between conflicting arguments. */
54
+ export declare function normalizeShellInput(args: Record<string, unknown>): Record<string, unknown>;
55
+ /** Shared strict policy: omission and zero never mean "use a default". */
56
+ export declare function explicitShellTimeout(args: Record<string, unknown>, key: "timeout" | "timeout_ms"): number | null;
57
+ /** Node clamps oversized timers to 1ms. Schedule long explicit deadlines in pieces. */
58
+ export declare function scheduleShellDeadline(timeoutMs: number | null, callback: () => void): () => void;
59
+ /** Process-local observation/control, never persisted process or effect authority. */
60
+ export declare class ShellRunRegistry implements ShellRunSource {
61
+ private runs;
62
+ private listeners;
63
+ subscribeRuns(listener: (event: ShellRunEvent) => void): () => void;
64
+ snapshotRuns(): readonly ShellRunSnapshot[];
65
+ stopRun(id: string): Promise<boolean>;
66
+ start(input: Omit<ShellRunSnapshot, "id" | "state" | "sequence" | "outputTail" | "omittedBytes" | "exitCode" | "signal">, stop: () => boolean | void, initialOutput?: {
67
+ outputTail: string;
68
+ omittedBytes: number;
69
+ }): string;
70
+ output(id: string | undefined, channel: "stdout" | "stderr", text: string): void;
71
+ finish(id: string | undefined, outcome: {
72
+ state: Exclude<ShellRunState, "running">;
73
+ exitCode: number | null;
74
+ signal?: string | null;
75
+ }): void;
76
+ private copy;
77
+ private emit;
78
+ }
@@ -0,0 +1,64 @@
1
+ import type { WebFetchReceipt } from "./tools/web-fetch.js";
2
+ export interface StreamedUtf8Segment {
3
+ index: number;
4
+ byteStart: number;
5
+ byteEndExclusive: number;
6
+ charStart: number;
7
+ charEndExclusive: number;
8
+ lineStart: number;
9
+ lineEnd: number;
10
+ sha256: string;
11
+ }
12
+ export interface StreamedUtf8File {
13
+ readonly path: string;
14
+ readonly indexPath: string;
15
+ readonly sha256: string;
16
+ readonly bytes: number;
17
+ readonly utf16Chars: number;
18
+ readonly lineCount: number;
19
+ readonly segmentCount: number;
20
+ readonly indexSha256: string;
21
+ }
22
+ /** Full durable source bytes; no eager body, DOM, lazy getter or prefix text. */
23
+ export interface NativeStreamedWebSource {
24
+ readonly schema: "omnius.native-streamed-web-source.v1";
25
+ readonly receipt: Readonly<WebFetchReceipt>;
26
+ readonly native: StreamedUtf8File;
27
+ readonly semantic: StreamedUtf8File;
28
+ readonly semanticScope: "all_static_body_text" | "complete_text";
29
+ readonly captureId: string;
30
+ readonly html?: Readonly<{
31
+ rendered: false;
32
+ semanticMode: "static_body_text" | "raw_html";
33
+ fallbackReason?: "tokenizer_requires_raw_view";
34
+ excludedElements: readonly string[];
35
+ includedAttributes: readonly string[];
36
+ }>;
37
+ }
38
+ export declare class StreamedWebBinaryRefusalError extends Error {
39
+ readonly binaryKind: string;
40
+ readonly observedBytes: number;
41
+ constructor(binaryKind: string, observedBytes: number);
42
+ }
43
+ /** Internal producer operation; all input reaches private disk before routing. */
44
+ export declare function captureStreamedWebResponse(response: Response, receiptBase: Omit<WebFetchReceipt, "responseBytes" | "responseSha256">, options?: {
45
+ signal?: AbortSignal;
46
+ spoolRoot?: string;
47
+ inspectPrefix?: (bytes: Uint8Array) => string | null;
48
+ }): Promise<NativeStreamedWebSource>;
49
+ export declare function verifiedNativeStreamedWebSource(value: unknown): NativeStreamedWebSource | null;
50
+ /** A bounded window. Exact segments and the whole immutable index are checked
51
+ * without loading the full source or trusting caller-supplied filesystem data. */
52
+ export declare function readNativeStreamedWebSourceRange(source: NativeStreamedWebSource, range: {
53
+ view: "native" | "semantic";
54
+ charStart: number;
55
+ charEndExclusive: number;
56
+ }, signal?: AbortSignal): Promise<{
57
+ content: string;
58
+ charStart: number;
59
+ charEndExclusive: number;
60
+ sha256: string;
61
+ }>;
62
+ export declare function verifyNativeStreamedWebSource(source: NativeStreamedWebSource, signal?: AbortSignal): Promise<void>;
63
+ /** Internal disposal for failed/small captures; published large sources remain durable. */
64
+ export declare function disposeNativeStreamedWebSource(source: NativeStreamedWebSource): Promise<void>;
@@ -0,0 +1,25 @@
1
+ import type { Tool } from "../types.js";
2
+ export interface BrowserPageSnapshot {
3
+ requestedUrl: string;
4
+ finalUrl: string;
5
+ status?: number;
6
+ html: string;
7
+ mode: "headed" | "headless";
8
+ }
9
+ export interface BrowserPageReader {
10
+ read(url: string, signal?: AbortSignal): Promise<BrowserPageSnapshot>;
11
+ }
12
+ /** Statuses that usually mean "this client was refused", not "this page does
13
+ * not exist". 401/404/410 are real answers and are not retried in a browser. */
14
+ export declare const BROWSER_FALLBACK_STATUSES: ReadonlySet<number>;
15
+ export declare function shouldUseBrowserFallback(status: number): boolean;
16
+ /** Drives the playwright_browser tool through its public actions, so session
17
+ * ownership, cancellation and launch recovery stay in one place. Uses a
18
+ * visible browser when a display exists, otherwise a headless one. */
19
+ export declare function browserPageReaderFromTool(browser: Tool, options?: {
20
+ headed?: boolean;
21
+ }): BrowserPageReader;
22
+ /** A reader with its own lazily launched browser session, so a fallback never
23
+ * replaces the agent's interactive playwright_browser page. Reads are
24
+ * serialized because the session drives a single page. */
25
+ export declare function createDedicatedBrowserPageReader(workingDir?: string): BrowserPageReader;
@@ -0,0 +1,30 @@
1
+ export declare class NetworkEgressPolicyError extends Error {
2
+ code: string;
3
+ constructor(code: string, message: string);
4
+ }
5
+ export interface NetworkEgressValidationOptions {
6
+ dnsLookup?: (hostname: string) => Promise<Array<{
7
+ address: string;
8
+ family?: number;
9
+ }>>;
10
+ resolveDns?: boolean;
11
+ allowPrivateNetwork?: boolean;
12
+ /**
13
+ * Allow loopback-only destinations (localhost, 127/8, ::1) while still
14
+ * blocking private LANs, link-local metadata services, and other reserved
15
+ * address ranges. Intended for local development servers used by browser
16
+ * automation tools.
17
+ */
18
+ allowLoopback?: boolean;
19
+ }
20
+ export interface NetworkEgressFetchOptions extends NetworkEgressValidationOptions {
21
+ maxRedirects?: number;
22
+ }
23
+ export declare function validateNetworkEgressUrl(rawUrl: unknown, options?: NetworkEgressValidationOptions): Promise<URL>;
24
+ export declare function fetchWithNetworkEgressPolicy(rawUrl: unknown, init?: RequestInit, options?: NetworkEgressFetchOptions): Promise<Response>;
25
+ export declare function readResponseArrayBufferWithLimit(response: Response, maxBytes: number): Promise<ArrayBuffer>;
26
+ export declare function readResponseTextWithLimit(response: Response, maxBytes: number): Promise<string>;
27
+ export declare function normalizeNetworkHostname(hostname: string): string;
28
+ export declare function isBlockedNetworkHostname(hostname: string): boolean;
29
+ export declare function isLoopbackNetworkHostname(hostname: string): boolean;
30
+ export declare function networkEgressErrorMessage(error: unknown): string;
@@ -0,0 +1,46 @@
1
+ export interface PdfNativeWordAnchor {
2
+ id: string;
3
+ text: string;
4
+ /** Poppler coordinates, in PDF points: left, top, right, bottom. */
5
+ bounds: [
6
+ number,
7
+ number,
8
+ number,
9
+ number
10
+ ];
11
+ }
12
+ export interface PdfNativeTable {
13
+ id: string;
14
+ columns: Array<{
15
+ id: string;
16
+ label: string;
17
+ anchors: PdfNativeWordAnchor[];
18
+ }>;
19
+ rows: Array<{
20
+ id: string;
21
+ cells: Array<{
22
+ columnId: string;
23
+ text: string;
24
+ anchors: PdfNativeWordAnchor[];
25
+ }>;
26
+ unassigned: PdfNativeWordAnchor[];
27
+ }>;
28
+ }
29
+ export interface PdfNativeTables {
30
+ schema: "omnius.pdf-native-tables.v1";
31
+ association: "advisory_geometry";
32
+ documentHash: string;
33
+ sourcePath: string;
34
+ page: number;
35
+ bboxSha256: string;
36
+ tables: PdfNativeTable[];
37
+ }
38
+ /** Parse only native Poppler bbox output. External entities are never resolved. */
39
+ export declare function extractPdfNativeTables(input: {
40
+ xml: string;
41
+ documentHash: string;
42
+ sourcePath: string;
43
+ page: number;
44
+ }): PdfNativeTables | undefined;
45
+ /** A compact independent-column view. Raw word geometry remains in the receipt. */
46
+ export declare function formatPdfNativeTables(tables: PdfNativeTables): string;
@@ -0,0 +1,133 @@
1
+ /**
2
+ * todo-store.ts — Persistent agent-facing checklist store (WO-TASK-02)
3
+ *
4
+ * Stores per-session todo lists at ~/.omnius/todos/{session_id}.json
5
+ * Atomic writes via .tmp → rename. Optional event publisher hook lets the
6
+ * cli package surface todo.* events on the /v1/events SSE stream without
7
+ * the execution package depending on cli (would be a circular import).
8
+ *
9
+ * Reference: Hannover src/tools/TodoWriteTool/TodoWriteTool.ts:31-115
10
+ */
11
+ export type TodoStatus = "pending" | "in_progress" | "completed" | "blocked";
12
+ export type TodoWorkKind = "objective" | "requirement" | "feature" | "component" | "module" | "task" | "acceptance";
13
+ export interface TodoTargetRef {
14
+ kind: "path" | "symbol" | "document" | "external";
15
+ ref: string;
16
+ }
17
+ export interface TodoActionContract {
18
+ preconditions: string[];
19
+ mutations: string[];
20
+ sideEffects: string[];
21
+ authority?: string;
22
+ approval?: string;
23
+ risk?: string;
24
+ }
25
+ export interface TodoEntry {
26
+ id: string;
27
+ content: string;
28
+ /** Present-continuous form shown while this leaf is active. */
29
+ activeForm?: string;
30
+ status: TodoStatus;
31
+ parentId?: string;
32
+ blocker?: string;
33
+ /** Agent/sub-agent currently responsible for this todo. */
34
+ owner?: string;
35
+ /** IDs this todo blocks. Cross-cutting dependency graph, separate from parentId. */
36
+ blocks?: string[];
37
+ /** IDs that must complete before this todo can start/complete. */
38
+ blockedBy?: string[];
39
+ /** Canonical ontology role for this work item. */
40
+ workKind?: TodoWorkKind;
41
+ /** Explicit requirement nodes that this work item must satisfy. */
42
+ requirementIds?: string[];
43
+ /** Explicit acceptance nodes that verify this work item. */
44
+ acceptanceIds?: string[];
45
+ /** Stable source records that authorized or informed this work item. */
46
+ sourceRefs?: string[];
47
+ /** Paths, symbols, documents, or external systems affected by this work. */
48
+ targetRefs?: TodoTargetRef[];
49
+ /** Preconditions, effects, authority, approval, and risk for this action. */
50
+ actionContract?: TodoActionContract;
51
+ createdAt: number;
52
+ updatedAt: number;
53
+ completedAt?: number;
54
+ /**
55
+ * Optional advisory verification command. Checklist updates do not execute
56
+ * it and absence of a passing receipt does not hold completion. A stored
57
+ * command is never proof that a test ran; an agent may instead record its
58
+ * completionJustification as an explicitly self-assessed basis.
59
+ *
60
+ * Generic across stacks — verifyCommand is just a shell invocation
61
+ * (e.g. "tsc --noEmit", "pytest tests/foo.py", "cargo check",
62
+ * "test -f dist/main.js"). No ecosystem-specific behavior.
63
+ *
64
+ * Lit anchor: Cemri et al., NeurIPS 2025 (arxiv 2503.13657) MAST
65
+ * taxonomy — task verification & termination = 21.3% of MAS
66
+ * failures. Plus "Agents At Work: 2026 Playbook for Building
67
+ * Reliable Agentic Workflows" — verification-aware planning.
68
+ */
69
+ verifyCommand?: string;
70
+ /** Agent's stated basis for completion; an assessment, not an executed test receipt. */
71
+ completionJustification?: string;
72
+ /**
73
+ * REG-38: optional list of file paths the agent EXPECTS to exist on
74
+ * disk when this todo is complete. When the agent flips status to
75
+ * "completed", the supervisor (artifact-inspector.ts) verifies each
76
+ * declared path exists, is non-empty, and is recent. Mismatch = the
77
+ * completion is rejected with a critique pointing at the gap.
78
+ *
79
+ * Generic across stacks — paths are just strings; supports any
80
+ * project layout. Use when the todo has concrete deliverables on
81
+ * disk (e.g. ["src/lib/cache.ts", "tests/unit/cache.test.ts"]).
82
+ *
83
+ * Lit anchor: HiRAS supervisor pattern (Guo et al. survey IJCAI 2024
84
+ * arxiv 2402.01680) — "manager agents actively inspect intermediate
85
+ * artifacts in a shared workspace." Anthropic's "subagent output to
86
+ * filesystem" pattern.
87
+ */
88
+ declaredArtifacts?: string[];
89
+ }
90
+ export interface TodoEntryInput {
91
+ id?: string;
92
+ content: string;
93
+ activeForm?: string;
94
+ status: TodoStatus;
95
+ parentId?: string;
96
+ blocker?: string;
97
+ owner?: string;
98
+ blocks?: string[];
99
+ blockedBy?: string[];
100
+ workKind?: TodoWorkKind;
101
+ requirementIds?: string[];
102
+ acceptanceIds?: string[];
103
+ sourceRefs?: string[];
104
+ targetRefs?: TodoTargetRef[];
105
+ actionContract?: TodoActionContract;
106
+ /** REG-37 — see TodoEntry.verifyCommand */
107
+ verifyCommand?: string;
108
+ /** Stated completion assessment; never inferred to be a passing command. */
109
+ completionJustification?: string;
110
+ /** REG-38 — see TodoEntry.declaredArtifacts */
111
+ declaredArtifacts?: string[];
112
+ }
113
+ export type TodoEventPublisher = (type: string, data: Record<string, unknown>) => void;
114
+ /** Wire an event publisher (called once at daemon startup from cli). */
115
+ export declare function setTodoEventPublisher(pub: TodoEventPublisher | null): void;
116
+ /** Returns the absolute path to the todo directory. Exported for the
117
+ * daemon's fs.watch bridge so it can detect subprocess-driven writes
118
+ * and surface them on the SSE event bus. */
119
+ export declare function todoDir(): string;
120
+ /** Read all todos for a session. Returns [] if none. */
121
+ export declare function readTodos(sessionId: string): TodoEntry[];
122
+ /**
123
+ * Write todos for a session, diffing against previous state to emit
124
+ * todo.created / todo.{status} / todo.deleted events. Atomic write.
125
+ */
126
+ export declare function writeTodos(sessionId: string, incoming: TodoEntryInput[]): {
127
+ newTodos: TodoEntry[];
128
+ oldTodos: TodoEntry[];
129
+ };
130
+ /** Delete the todo file for a session. Returns true if a file was removed. */
131
+ export declare function deleteTodos(sessionId: string): boolean;
132
+ /** List all session IDs that have todo files. */
133
+ export declare function listTodoSessions(): string[];
@@ -0,0 +1,57 @@
1
+ import type { Tool, ToolResult, ToolInvocationContext } from "../types.js";
2
+ import { type BrowserPageReader } from "./browser-page-fallback.js";
3
+ export interface WebFetchReceipt {
4
+ schema: "omnius.web-fetch-receipt.v1";
5
+ requestedUrl: string;
6
+ finalUrl: string;
7
+ status: number;
8
+ contentType: string;
9
+ responseBytes: number;
10
+ responseSha256: string;
11
+ fetchedAt: string;
12
+ linkStatus: "retrieved";
13
+ }
14
+ export declare class WebFetchTool implements Tool {
15
+ #private;
16
+ name: string;
17
+ private readonly eagerSourceMaxBytes;
18
+ private readonly browserFallback;
19
+ /** Companion tools registered beside this one; unfed hosts keep the full guidance. */
20
+ private browserAvailable;
21
+ private crawlAvailable;
22
+ /** Host storage policy, independent of model tool arguments. Low-memory
23
+ * deployments can keep all nonempty responses disk-backed. A browser reader
24
+ * lets a rejected headless request recover through a real browser. */
25
+ constructor(options?: {
26
+ eagerSourceMaxBytes?: number;
27
+ browserFallback?: BrowserPageReader;
28
+ });
29
+ isReadOnly(): boolean;
30
+ acceptsInvocationContext: boolean;
31
+ private _active;
32
+ private _fetchCache;
33
+ private _streamedCache;
34
+ cancel(): void;
35
+ description: string;
36
+ setAvailableTools(names: ReadonlySet<string>): string;
37
+ parameters: {
38
+ type: string;
39
+ properties: {
40
+ url: {
41
+ type: string;
42
+ description: string;
43
+ };
44
+ max_length: {
45
+ type: string;
46
+ description: string;
47
+ };
48
+ format: {
49
+ type: string;
50
+ enum: string[];
51
+ description: string;
52
+ };
53
+ };
54
+ required: string[];
55
+ };
56
+ execute(args: Record<string, unknown>, context?: ToolInvocationContext): Promise<ToolResult>;
57
+ }