omnius 1.0.922 → 1.0.924

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 (241) 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 +5216 -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 +26 -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 +137700 -81150
  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 +462 -0
  237. package/docs/DISCOVERY.md +6 -0
  238. package/docs/work-orders/evidence/telegram-catch-up-attention-live-20261104.json +743 -0
  239. package/docs/work-orders/telegram-catch-up-attention-repair-20261104.md +133 -0
  240. package/npm-shrinkwrap.json +28 -12
  241. package/package.json +3 -2
@@ -0,0 +1,320 @@
1
+ import type { GeometryRect } from "./geometry.js";
2
+ import type { ToolExternalEffectIntent } from "../types.js";
3
+ export type UiVerb = "invoke" | "focus" | "set_value" | "set_checked" | "select" | "scroll" | "key_chord";
4
+ export interface UiNode {
5
+ id: string;
6
+ generation: number;
7
+ role: string;
8
+ name: string;
9
+ enabled: boolean;
10
+ visible: boolean;
11
+ operations: UiVerb[];
12
+ value?: string;
13
+ checked?: boolean;
14
+ selected?: string[];
15
+ sensitive?: boolean;
16
+ focused?: boolean;
17
+ bounds?: GeometryRect;
18
+ scopeId?: string;
19
+ scroll?: {
20
+ x: number;
21
+ y: number;
22
+ maxX: number;
23
+ maxY: number;
24
+ };
25
+ }
26
+ export interface UiSnapshot {
27
+ schema: "omnius.ui-state.v1";
28
+ sessionId: string;
29
+ revision: string;
30
+ capturedAt: number;
31
+ scope: {
32
+ kind: "browser" | "native";
33
+ id: string;
34
+ url?: string;
35
+ app?: string;
36
+ windowId?: string;
37
+ };
38
+ nodes: UiNode[];
39
+ text?: string;
40
+ /** Per-document browser text; iframe content must not inherit the top-level URL. */
41
+ documents?: Array<{
42
+ scopeId: string;
43
+ url: string;
44
+ mainFrame: boolean;
45
+ text: string;
46
+ truncated: boolean;
47
+ }>;
48
+ /** Bounded UI navigation context, never a complete page/source read. */
49
+ observationCoverage?: {
50
+ scope: "bounded_ui_observation";
51
+ completePageRead: false;
52
+ availableFrames: number;
53
+ returnedFrames: number;
54
+ frameLimit: number;
55
+ framesTruncated: boolean;
56
+ /** Normalized original text from returned frames only, including separators. */
57
+ aggregateTextScope: "normalized_returned_frames";
58
+ aggregateTextOriginalChars: number;
59
+ aggregateTextReturnedChars: number;
60
+ aggregateTextLimitChars: number;
61
+ aggregateTextTruncated: boolean;
62
+ };
63
+ browser?: {
64
+ engine: string;
65
+ version: string;
66
+ protocol: string;
67
+ capabilities: string[];
68
+ };
69
+ native?: {
70
+ platform: "linux" | "win32";
71
+ provider: "atspi2" | "uia";
72
+ capabilities: string[];
73
+ activeWindowId?: string;
74
+ /** Host accessibility metadata for exact native/OS visual binding; windowId stays opaque. */
75
+ activeProcessId?: number;
76
+ activeWindowBounds?: GeometryRect;
77
+ };
78
+ }
79
+ export type UiPredicate = {
80
+ kind: "value";
81
+ nodeId: string;
82
+ value: string;
83
+ } | {
84
+ kind: "checked";
85
+ nodeId: string;
86
+ checked: boolean;
87
+ } | {
88
+ kind: "focused";
89
+ nodeId: string;
90
+ } | {
91
+ kind: "selected";
92
+ nodeId: string;
93
+ values: string[];
94
+ } | {
95
+ kind: "visible";
96
+ role?: string;
97
+ name?: string;
98
+ visible: boolean;
99
+ } | {
100
+ kind: "text";
101
+ text: string;
102
+ } | {
103
+ kind: "url";
104
+ url: string;
105
+ } | {
106
+ kind: "download_saved";
107
+ filename?: string;
108
+ };
109
+ export interface UiArgs {
110
+ value?: string;
111
+ checked?: boolean;
112
+ option?: string;
113
+ direction?: "up" | "down" | "left" | "right";
114
+ keys?: string[];
115
+ }
116
+ export interface UiStep {
117
+ id: string;
118
+ verb: UiVerb;
119
+ target: {
120
+ nodeId?: string;
121
+ role?: string;
122
+ name?: string;
123
+ scopeId?: string;
124
+ };
125
+ args?: UiArgs;
126
+ expect: UiPredicate[];
127
+ }
128
+ export interface UiAction {
129
+ id: string;
130
+ kind: "action" | "observe" | "abstain";
131
+ scopeId: string;
132
+ revision: string;
133
+ nodeId?: string;
134
+ generation?: number;
135
+ verb?: UiVerb;
136
+ args?: UiArgs;
137
+ expect: UiPredicate[];
138
+ idempotencyKey: string;
139
+ description: string;
140
+ }
141
+ export interface UiDispatchReceipt {
142
+ status: "dispatched" | "rejected";
143
+ reason?: string;
144
+ download?: {
145
+ path: string;
146
+ sizeBytes: number;
147
+ sha256: string;
148
+ verified: boolean;
149
+ };
150
+ details?: unknown;
151
+ }
152
+ /** A provider could not complete this read. Never evidence of a missing target. */
153
+ export declare class UiObservationUnavailableError extends Error {
154
+ }
155
+ export interface UiAdapter {
156
+ /** Native provider identity; wrappers preserve it without inventing a binding. */
157
+ getDesktopVerificationScope?(): import("./desktop-verification.js").DesktopVerificationScope | undefined;
158
+ prepareStep?(step: UiStep, signal?: AbortSignal): void | Promise<void>;
159
+ observe(signal?: AbortSignal): Promise<UiSnapshot>;
160
+ perform(action: UiAction, signal?: AbortSignal): Promise<UiDispatchReceipt>;
161
+ }
162
+ export interface UiDecision {
163
+ choice: string;
164
+ probabilities?: Record<string, number>;
165
+ probabilityKind: "native" | "surrogate" | "none";
166
+ provider: string;
167
+ latencyMs: number;
168
+ reason?: string;
169
+ }
170
+ /** Trusted task intent accompanies the current finite candidate set; it grants no authority. */
171
+ export interface UiDecisionContext {
172
+ goal: string;
173
+ step: UiStep;
174
+ }
175
+ export interface DecisionProvider {
176
+ decide(state: UiSnapshot, actions: readonly UiAction[], signal?: AbortSignal, context?: UiDecisionContext): Promise<UiDecision>;
177
+ }
178
+ export interface UiOutcome {
179
+ status: "verified" | "unresolved" | "rejected" | "abstained" | "cancelled";
180
+ action?: UiAction;
181
+ before?: UiSnapshot;
182
+ after?: UiSnapshot;
183
+ receipt?: UiDispatchReceipt;
184
+ reason?: string;
185
+ verification?: {
186
+ timeoutMs: number;
187
+ intervalMs: number;
188
+ maxObservations: number;
189
+ observations: number;
190
+ elapsedMs: number;
191
+ };
192
+ }
193
+ /** Host execution boundary shared by a local controller and an admitted runner bridge. */
194
+ export interface UiExecutionPort {
195
+ observe(signal?: AbortSignal): Promise<UiSnapshot>;
196
+ observeForStep(step: UiStep, signal?: AbortSignal): Promise<UiSnapshot>;
197
+ enumerate(step: UiStep, state?: UiSnapshot): UiAction[];
198
+ execute(id: string, signal?: AbortSignal): Promise<UiOutcome>;
199
+ runStep(step: UiStep, provider?: DecisionProvider, signal?: AbortSignal): Promise<UiOutcome>;
200
+ }
201
+ /** Canonical serialization binds every argument/effect, irrespective of object insertion order. */
202
+ export declare function uiDigest(value: unknown): string;
203
+ export declare function uiEffectIntent(action: UiAction): ToolExternalEffectIntent | null;
204
+ export declare function parseUiStep(input: unknown): UiStep;
205
+ export declare const UI_STEP_SCHEMA: {
206
+ readonly type: "object";
207
+ readonly additionalProperties: false;
208
+ readonly required: readonly [
209
+ "id",
210
+ "verb",
211
+ "target",
212
+ "expect"
213
+ ];
214
+ readonly properties: {
215
+ readonly id: {
216
+ readonly type: "string";
217
+ };
218
+ readonly verb: {
219
+ readonly type: "string";
220
+ readonly enum: UiVerb[];
221
+ };
222
+ readonly target: {
223
+ readonly type: "object";
224
+ readonly additionalProperties: false;
225
+ readonly properties: {
226
+ [k: string]: {
227
+ minLength?: number | undefined;
228
+ type: string;
229
+ };
230
+ };
231
+ };
232
+ readonly args: {
233
+ readonly type: "object";
234
+ readonly additionalProperties: false;
235
+ readonly properties: {
236
+ readonly value: {
237
+ readonly type: "string";
238
+ };
239
+ readonly checked: {
240
+ readonly type: "boolean";
241
+ };
242
+ readonly option: {
243
+ readonly type: "string";
244
+ };
245
+ readonly direction: {
246
+ readonly type: "string";
247
+ readonly enum: readonly [
248
+ "up",
249
+ "down",
250
+ "left",
251
+ "right"
252
+ ];
253
+ };
254
+ readonly keys: {
255
+ readonly type: "array";
256
+ readonly items: {
257
+ readonly type: "string";
258
+ };
259
+ readonly maxItems: 4;
260
+ };
261
+ };
262
+ };
263
+ readonly expect: {
264
+ readonly type: "array";
265
+ readonly minItems: 1;
266
+ readonly maxItems: 20;
267
+ readonly items: {
268
+ readonly type: "object";
269
+ readonly properties: {
270
+ readonly kind: {
271
+ readonly type: "string";
272
+ readonly enum: readonly [
273
+ "value",
274
+ "checked",
275
+ "selected",
276
+ "focused",
277
+ "visible",
278
+ "text",
279
+ "url",
280
+ "download_saved"
281
+ ];
282
+ };
283
+ readonly nodeId: {
284
+ readonly type: "string";
285
+ };
286
+ readonly value: {
287
+ readonly type: "string";
288
+ };
289
+ readonly checked: {
290
+ readonly type: "boolean";
291
+ };
292
+ readonly values: {
293
+ readonly type: "array";
294
+ readonly items: {
295
+ readonly type: "string";
296
+ };
297
+ };
298
+ readonly role: {
299
+ readonly type: "string";
300
+ };
301
+ readonly name: {
302
+ readonly type: "string";
303
+ };
304
+ readonly visible: {
305
+ readonly type: "boolean";
306
+ };
307
+ readonly text: {
308
+ readonly type: "string";
309
+ };
310
+ readonly url: {
311
+ readonly type: "string";
312
+ };
313
+ readonly filename: {
314
+ readonly type: "string";
315
+ };
316
+ };
317
+ };
318
+ };
319
+ };
320
+ };
@@ -0,0 +1,70 @@
1
+ import { type DecisionProvider, type UiAction, type UiDecision, type UiDecisionContext, type UiSnapshot } from "./contracts.js";
2
+ /** Shared finite System One wire protocol. Compatibility is not a quality/calibration claim. */
3
+ export type DecisionFamily = "laya" | "kev" | "decider" | "clm" | "jevk5" | "onejev";
4
+ export interface UiDecisionReceipt {
5
+ schema: "omnius.ui-decision-receipt.v1";
6
+ requestId: string;
7
+ profile: {
8
+ family: DecisionFamily;
9
+ endpoint: string;
10
+ model: string;
11
+ revision: string;
12
+ };
13
+ stateRevision: string;
14
+ scopeId: string;
15
+ contextSha256?: string;
16
+ candidateIds: string[];
17
+ requestSha256: string;
18
+ replySha256: string;
19
+ requestBytes: number;
20
+ replyBytes: number;
21
+ replyComplete: boolean;
22
+ requestDispatched: true;
23
+ responseReceived: boolean;
24
+ httpStatus?: number;
25
+ latencyMs: number;
26
+ status: "valid_decision" | "rejected";
27
+ rejectionCode?: "transport" | "http" | "invalid_response" | "cancelled" | "timeout";
28
+ decision?: UiDecision;
29
+ }
30
+ export declare function compactUiState(state: UiSnapshot): unknown;
31
+ export declare function parseUiDecision(raw: unknown, actions: readonly UiAction[], provider: string, latencyMs: number): UiDecision;
32
+ export declare class RulesDecisionProvider implements DecisionProvider {
33
+ decide(_state: UiSnapshot, actions: readonly UiAction[], signal?: AbortSignal): Promise<UiDecision>;
34
+ }
35
+ /** Bound even host providers that ignore their cancellation signal. No executor or authority is passed. */
36
+ export declare function decideUiAction(provider: DecisionProvider, state: UiSnapshot, actions: readonly UiAction[], signal?: AbortSignal, timeoutMs?: number, context?: UiDecisionContext): Promise<UiDecision>;
37
+ /** Match the staged finite-choice service's exact request contract without clipping intent. */
38
+ export declare function createUiDecisionRequest(model: string, state: UiSnapshot, actions: readonly UiAction[], context?: UiDecisionContext): {
39
+ model: string;
40
+ state: string;
41
+ questions: {
42
+ action: {
43
+ type: "choice";
44
+ instructions: string;
45
+ criteria: Record<string, string>;
46
+ };
47
+ };
48
+ };
49
+ export declare class SystemOneDecisionProvider implements DecisionProvider {
50
+ private readonly config;
51
+ private busy;
52
+ private endpoint;
53
+ private timeoutMs;
54
+ constructor(config: {
55
+ family: DecisionFamily;
56
+ endpoint: string;
57
+ model: string;
58
+ revision: string;
59
+ timeoutMs?: number;
60
+ fetch?: typeof fetch;
61
+ requireContext?: boolean;
62
+ requireModelIdentity?: boolean;
63
+ onDecisionReceipt?: (receipt: UiDecisionReceipt) => void | Promise<void>;
64
+ });
65
+ decide(state: UiSnapshot, actions: readonly UiAction[], signal?: AbortSignal, context?: UiDecisionContext): Promise<UiDecision>;
66
+ }
67
+ /** Shadow mode has no executor reference and cannot grant authority. */
68
+ export declare function comparePolicyShadow(state: UiSnapshot, actions: readonly UiAction[], providers: readonly DecisionProvider[], signal?: AbortSignal): Promise<Array<UiDecision | {
69
+ error: string;
70
+ }>>;
@@ -0,0 +1,23 @@
1
+ /** Private host metadata, never a model argument or a claim that input worked. */
2
+ export interface DesktopVerificationScope {
3
+ desktopSessionId: string;
4
+ nativeSessionId?: string;
5
+ }
6
+ export type DesktopVerificationReceipt = {
7
+ schema: "omnius.desktop-verification.v1";
8
+ kind: "native_observation";
9
+ desktopSessionId: string;
10
+ nativeSessionId: string;
11
+ revision: string;
12
+ } | {
13
+ schema: "omnius.desktop-verification.v1";
14
+ kind: "input_dispatch";
15
+ desktopSessionId: string;
16
+ dispatchId: string;
17
+ inputKind: "keyboard";
18
+ windowId: string;
19
+ };
20
+ /** Bind the actual provider environment, including a private accessibility bus.
21
+ * Hash it so environment addresses/authentication paths never enter receipts.
22
+ * A lock label or the model's vision session_id cannot identify a desktop. */
23
+ export declare function desktopVerificationSession(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): string | undefined;
@@ -0,0 +1,57 @@
1
+ /** Exact image-to-input mapping. This module never infers a crop or display scale. */
2
+ export interface GeometryRect {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ export interface CaptureTransform {
9
+ /** Dimensions of the original capture, before cropping/resizing. */
10
+ capture: {
11
+ width: number;
12
+ height: number;
13
+ };
14
+ /** Crop within the original capture. Omit only for a full capture. */
15
+ crop?: GeometryRect;
16
+ /** Exact image supplied to vision; content excludes letterbox padding. */
17
+ image: {
18
+ width: number;
19
+ height: number;
20
+ content?: GeometryRect;
21
+ };
22
+ /** Original capture's rectangle in the input API's coordinate space. */
23
+ input: GeometryRect & {
24
+ space: "device-pixel" | "screen-logical" | "css-viewport";
25
+ };
26
+ revision: string;
27
+ windowId?: string;
28
+ }
29
+ export declare function pointInRect(point: {
30
+ x: number;
31
+ y: number;
32
+ }, rect: GeometryRect): boolean;
33
+ /** A point is usable only for the same capture revision and live target bounds. */
34
+ export declare function mapGroundedPoint(options: {
35
+ point: {
36
+ x: number;
37
+ y: number;
38
+ space: "normalized" | "image-pixel";
39
+ };
40
+ transform: CaptureTransform;
41
+ currentRevision: string;
42
+ currentWindowId?: string;
43
+ liveBounds?: GeometryRect;
44
+ }): {
45
+ x: number;
46
+ y: number;
47
+ };
48
+ /**
49
+ * Window capture backends currently expose no independent DPI/crop metadata.
50
+ * Accept a 1:1 capture only; guessing a scale can click another application.
51
+ */
52
+ export declare function windowCaptureTransform(capture: {
53
+ width: number;
54
+ height: number;
55
+ }, window: GeometryRect & {
56
+ windowId: string;
57
+ }, revision: string): CaptureTransform;
@@ -0,0 +1,78 @@
1
+ import { type DecisionProvider, type UiOutcome, type UiSnapshot, type UiStep } from "./contracts.js";
2
+ import type { UiExecutionPort } from "./contracts.js";
3
+ export interface UiPlan {
4
+ schema: "omnius.ui-plan.v1";
5
+ steps: UiStep[];
6
+ }
7
+ /** Model response contract. Runtime identities and authority are deliberately absent. */
8
+ export declare const UI_PLAN_RESPONSE_SCHEMA: {
9
+ $defs: {
10
+ target: {
11
+ anyOf: {
12
+ required: string[];
13
+ }[];
14
+ type: string;
15
+ additionalProperties: boolean;
16
+ properties: Record<string, unknown>;
17
+ required: string[];
18
+ };
19
+ expect: {
20
+ type: string;
21
+ minItems: number;
22
+ maxItems: number;
23
+ items: {
24
+ anyOf: ({
25
+ type: string;
26
+ additionalProperties: boolean;
27
+ properties: Record<string, unknown>;
28
+ required: string[];
29
+ } | {
30
+ anyOf: {
31
+ required: string[];
32
+ }[];
33
+ type: string;
34
+ additionalProperties: boolean;
35
+ properties: Record<string, unknown>;
36
+ required: string[];
37
+ })[];
38
+ };
39
+ };
40
+ };
41
+ type: string;
42
+ additionalProperties: boolean;
43
+ properties: Record<string, unknown>;
44
+ required: string[];
45
+ };
46
+ export type UiPlanRejectionCode = "response_too_large" | "invalid_json" | "envelope_type" | "schema_mismatch" | "unexpected_envelope_field" | "steps_type" | "steps_count" | "step_type" | "runtime_identity" | "invalid_step";
47
+ export declare class UiPlanValidationError extends Error {
48
+ readonly code: UiPlanRejectionCode;
49
+ readonly stepIndex?: number | undefined;
50
+ constructor(code: UiPlanRejectionCode, message: string, stepIndex?: number | undefined);
51
+ }
52
+ /** Runtime identities and authority are never accepted from the planner. */
53
+ export declare function parseUiPlan(input: unknown, id?: string): UiPlan;
54
+ export declare class StructuredUiPlanner {
55
+ private readonly options;
56
+ constructor(options: {
57
+ /** Existing host-owned, preflighted model client; no implicit endpoint/model loading. */
58
+ infer: (prompt: string, signal: AbortSignal) => Promise<string>;
59
+ allowedOrigins?: readonly string[];
60
+ allowedApplications?: readonly string[];
61
+ timeoutMs?: number;
62
+ });
63
+ plan(goal: string, state: UiSnapshot, recovery?: string, signal?: AbortSignal): Promise<UiPlan>;
64
+ assertScope(state: UiSnapshot): void;
65
+ }
66
+ export declare function runPlannedUiTask(goal: string, controller: UiExecutionPort, planner: StructuredUiPlanner, options: {
67
+ provider?: DecisionProvider;
68
+ signal?: AbortSignal;
69
+ maxReplans?: number;
70
+ maxActions?: number;
71
+ decisionTimeoutMs?: number;
72
+ verifyGoal: (state: UiSnapshot, outcomes: readonly UiOutcome[]) => boolean | Promise<boolean>;
73
+ }): Promise<{
74
+ status: "complete" | "needs_replan" | "cancelled";
75
+ plans: number;
76
+ outcomes: UiOutcome[];
77
+ reason?: string;
78
+ }>;
@@ -0,0 +1,80 @@
1
+ import { type UiPersistenceOptions } from "./artifact-store.js";
2
+ import { type DecisionProvider, type UiAction, type UiDecision, type UiOutcome, type UiSnapshot } from "./contracts.js";
3
+ export declare const MAX_UI_TRACE_EVENTS = 500;
4
+ export declare const MAX_UI_TRACE_EVENT_BYTES = 65536;
5
+ export interface UiTraceProvenance {
6
+ applicationFamily?: string;
7
+ modelRevision?: string;
8
+ }
9
+ export interface UiTraceCost {
10
+ latencyMs?: number;
11
+ visionCalls?: number;
12
+ plannerCalls?: number;
13
+ }
14
+ export interface UiRecordedChoice {
15
+ id: string;
16
+ kind: UiAction["kind"];
17
+ description: string;
18
+ }
19
+ export interface UiRecordedEvent {
20
+ sequence: number;
21
+ previousDigest: string | null;
22
+ digest: string;
23
+ state: UiSnapshot;
24
+ featuresTruncated: boolean;
25
+ actions: UiRecordedChoice[];
26
+ chosenActionId?: string;
27
+ result: {
28
+ status: UiOutcome["status"];
29
+ dispatchStatus: "dispatched" | "rejected" | "unknown";
30
+ verified: boolean;
31
+ actionDigest?: string;
32
+ receiptDigest?: string;
33
+ afterRevision?: string;
34
+ };
35
+ provenance: UiTraceProvenance & {
36
+ source: "host_ui_outcome";
37
+ };
38
+ cost: UiTraceCost;
39
+ }
40
+ export interface UiTraceArchive {
41
+ schema: "omnius.ui-trace.v1";
42
+ id: string;
43
+ events: UiRecordedEvent[];
44
+ headDigest: string | null;
45
+ revision: string;
46
+ }
47
+ export declare function parseUiTraceArchive(value: unknown, expectedRevision: string): UiTraceArchive;
48
+ /** Only the host connects these tickets to controller outcomes. No model-success input exists. */
49
+ export declare class UiTraceRecorder {
50
+ readonly id: string;
51
+ private readonly events;
52
+ private readonly positives;
53
+ private pending?;
54
+ constructor(id?: string);
55
+ begin(state: UiSnapshot, actions: readonly UiAction[], metadata?: UiTraceProvenance): string;
56
+ complete(ticket: string, outcome: UiOutcome, measurements?: UiTraceCost): UiRecordedEvent;
57
+ snapshot(): UiTraceArchive;
58
+ }
59
+ export declare class UiTraceStore {
60
+ private readonly files;
61
+ constructor(options: UiPersistenceOptions);
62
+ save(recorder: UiTraceRecorder, signal?: AbortSignal): Promise<UiTraceArchive>;
63
+ load(id: string, expectedRevision: string, signal?: AbortSignal): Promise<UiTraceArchive>;
64
+ }
65
+ export interface UiTracePlaybackRow {
66
+ sequence: number;
67
+ recordedHostChoice?: string;
68
+ recordedHostVerified: boolean;
69
+ policies: Array<UiDecision | {
70
+ error: string;
71
+ }>;
72
+ }
73
+ /** Shadow-only: no executor/adapter/controller is accepted. Providers must already be host-preflighted. */
74
+ export declare function playbackUiTrace(archive: UiTraceArchive, providers: readonly DecisionProvider[], options?: {
75
+ signal?: AbortSignal;
76
+ timeoutMs?: number;
77
+ }): Promise<{
78
+ status: "completed" | "cancelled";
79
+ rows: UiTracePlaybackRow[];
80
+ }>;
@@ -0,0 +1,48 @@
1
+ import { type UiAction, type UiAdapter, type UiDispatchReceipt, type UiSnapshot, type UiStep } from "./contracts.js";
2
+ import { type CaptureTransform, type GeometryRect } from "./geometry.js";
3
+ export interface UiVisualCapture {
4
+ image: Uint8Array;
5
+ mimeType: "image/png" | "image/jpeg";
6
+ transform: CaptureTransform;
7
+ liveBounds: GeometryRect;
8
+ }
9
+ export interface UiPointResult {
10
+ points: Array<{
11
+ x: number;
12
+ y: number;
13
+ }>;
14
+ space: "normalized" | "image-pixel";
15
+ model: string;
16
+ revision: string;
17
+ }
18
+ /** Host callbacks own capture, the preflighted local Moondream client and input API. */
19
+ export interface VisualUiOptions {
20
+ capture: (state: UiSnapshot, signal?: AbortSignal) => Promise<UiVisualCapture>;
21
+ point: (image: UiVisualCapture, description: string, signal: AbortSignal) => Promise<UiPointResult>;
22
+ click: (point: {
23
+ x: number;
24
+ y: number;
25
+ }, state: UiSnapshot, signal?: AbortSignal) => Promise<UiDispatchReceipt>;
26
+ model: string;
27
+ revision: string;
28
+ timeoutMs?: number;
29
+ /** Host acknowledges capture-only availability failure; never catches semantic observation failure. Throw for lost owner/Stop. */
30
+ onCaptureUnavailable?: (error: unknown, state: UiSnapshot, signal?: AbortSignal) => void;
31
+ desktopSession?: string;
32
+ }
33
+ /** Vision only supplies a candidate. The same controller still authorizes and verifies it. */
34
+ export declare class SemanticThenVisualAdapter implements UiAdapter {
35
+ private readonly semantic;
36
+ private readonly options;
37
+ getDesktopVerificationScope(): import("./desktop-verification.js").DesktopVerificationScope | undefined;
38
+ private step?;
39
+ private grounding?;
40
+ constructor(semantic: UiAdapter, options: VisualUiOptions);
41
+ prepareStep(step: UiStep, signal?: AbortSignal): Promise<void>;
42
+ private matches;
43
+ private read;
44
+ private capture;
45
+ private captureKey;
46
+ observe(signal?: AbortSignal): Promise<UiSnapshot>;
47
+ perform(action: UiAction, signal?: AbortSignal): Promise<UiDispatchReceipt>;
48
+ }