omnius 1.0.861 → 1.0.862

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.
@@ -0,0 +1,72 @@
1
+ {
2
+ "schema": "omnius.native-components-performance.v1",
3
+ "testedAt": "2026-10-15T23:40:04.259Z",
4
+ "renderer": "@opentui/core",
5
+ "runtime": "packaged Bun",
6
+ "inferenceRequests": 0,
7
+ "passed": true,
8
+ "count": 15,
9
+ "checks": [
10
+ {
11
+ "name": "semantic tree renders native chrome, pinned tasks, steering and markdown cards",
12
+ "elapsedMs": 91
13
+ },
14
+ {
15
+ "name": "native editor owns unicode, multiline paste, selection and history",
16
+ "elapsedMs": 225
17
+ },
18
+ {
19
+ "name": "retained long history scrolls while local input and streaming remain responsive",
20
+ "elapsedMs": 415
21
+ },
22
+ {
23
+ "name": "combined terminal packets preserve new drafts and reject delayed completion edits",
24
+ "elapsedMs": 150
25
+ },
26
+ {
27
+ "name": "native suggestions, header controls and agent tabs dispatch semantic actions",
28
+ "elapsedMs": 111
29
+ },
30
+ {
31
+ "name": "header keyboard focus skips disabled buttons and scrolls native controls into view",
32
+ "elapsedMs": 143
33
+ },
34
+ {
35
+ "name": "native card collapse and resize preserve component state",
36
+ "elapsedMs": 130
37
+ },
38
+ {
39
+ "name": "native selector filters locally, skips headings and restores parent focus",
40
+ "elapsedMs": 120
41
+ },
42
+ {
43
+ "name": "deferred menu keys, document actions and nested modals preserve callback semantics",
44
+ "elapsedMs": 153
45
+ },
46
+ {
47
+ "name": "native input dialogs enforce paste budgets and never paint secrets",
48
+ "elapsedMs": 77
49
+ },
50
+ {
51
+ "name": "native embedded terminal handles PTY output, input, focus and geometry",
52
+ "elapsedMs": 129
53
+ },
54
+ {
55
+ "name": "native metrics, enhancement and media controls retain their interaction and color roles",
56
+ "elapsedMs": 197
57
+ },
58
+ {
59
+ "name": "native image errors show fallback text and frame revisions reload the same path",
60
+ "elapsedMs": 62
61
+ },
62
+ {
63
+ "name": "native memory pixels retain one-cell geometry and separate hover from pin actions",
64
+ "elapsedMs": 94
65
+ },
66
+ {
67
+ "name": "stack and action tree keep independent native scroll positions",
68
+ "elapsedMs": 293
69
+ }
70
+ ],
71
+ "note": "Scenario elapsed times include native layout, rendering and simulated input; they are not per-keystroke latency percentiles or comparisons with the deleted renderer."
72
+ }
@@ -0,0 +1,95 @@
1
+ {
2
+ "schema": "omnius.native-tui-targeted-verification.v1",
3
+ "passed": true,
4
+ "cli": {
5
+ "files": 63,
6
+ "tests": 484,
7
+ "passed": 484,
8
+ "failed": 0,
9
+ "fileNames": [
10
+ "action-tree-presentation.test.ts",
11
+ "api-config-endpoint.test.ts",
12
+ "api-gpu-selection.test.ts",
13
+ "api-model-namespace.test.ts",
14
+ "api-model-selection.test.ts",
15
+ "builtin-free-config-defaults.test.ts",
16
+ "chat-session-config-isolation.test.ts",
17
+ "chat-session-tool-events.test.ts",
18
+ "config-home-isolation.test.ts",
19
+ "config.test.ts",
20
+ "content-scroll-dynamic-block.test.ts",
21
+ "content-scroll-performance.test.ts",
22
+ "content-trailing-blank.test.ts",
23
+ "content-viewport-virtualization.test.ts",
24
+ "context-gauge-effective.test.ts",
25
+ "direct-input-change.test.ts",
26
+ "dynamic-block-growth-reflow.test.ts",
27
+ "first-run-setup-ux.test.ts",
28
+ "footer-direct-input-refresh.test.ts",
29
+ "footer-enter-transition.test.ts",
30
+ "footer-suggestion-creep.test.ts",
31
+ "footer-suggestion-shrink-render.test.ts",
32
+ "header-box-segmentation.test.ts",
33
+ "header-cursor-preservation.test.ts",
34
+ "header-inference-route.test.ts",
35
+ "header-menu-buttons.test.ts",
36
+ "header-navigation-chrome.test.ts",
37
+ "header-row-protection.test.ts",
38
+ "header-system-separator.test.ts",
39
+ "header-version-chip.test.ts",
40
+ "host-gpu-selection.test.ts",
41
+ "inference-live-block.test.ts",
42
+ "inference-model-selection.test.ts",
43
+ "input-enhance-segment.test.ts",
44
+ "live-media-status.test.ts",
45
+ "memory-map.test.ts",
46
+ "mouse-filter.test.ts",
47
+ "native-components.test.ts",
48
+ "native-document-retention.test.ts",
49
+ "native-host.test.ts",
50
+ "native-live-documents.test.ts",
51
+ "native-stream-session.test.ts",
52
+ "native-terminal-features.test.ts",
53
+ "native-text.test.ts",
54
+ "onboarding-interactive.test.ts",
55
+ "pty-footer-integrity.test.ts",
56
+ "self-improvement-controller.test.ts",
57
+ "status-bar-terminal-passthrough.test.ts",
58
+ "status-bar-token-rate.test.ts",
59
+ "sub-agent-live-block.test.ts",
60
+ "suggestion-hittest.test.ts",
61
+ "telegram-coalesce.test.ts",
62
+ "text-selection.test.ts",
63
+ "tool-collapse-hittest.test.ts",
64
+ "tool-collapse-reflow.test.ts",
65
+ "tui-input-wait.test.ts",
66
+ "tui-remote-pacing.test.ts",
67
+ "tui-resize-stability.test.ts",
68
+ "tui-select-mouse.test.ts",
69
+ "tui-tasks-scope.test.ts",
70
+ "web-chat-transport-lifecycle.test.ts",
71
+ "web-ui-client-runtime.test.ts",
72
+ "web-ui-script.test.ts"
73
+ ]
74
+ },
75
+ "orchestrator": {
76
+ "files": 5,
77
+ "tests": 189,
78
+ "passed": 189,
79
+ "failed": 0,
80
+ "fileNames": [
81
+ "thinkLoopGuard.test.ts",
82
+ "local-inference-diagnostics.test.ts",
83
+ "remote-inference-fallback.test.ts",
84
+ "managed-local-inference-admission.test.ts",
85
+ "managed-local-admission.test.ts"
86
+ ]
87
+ },
88
+ "broaderCliSuite": {
89
+ "status": "interrupted",
90
+ "passed": false,
91
+ "completedFiles": 82,
92
+ "observedTestFailures": 257,
93
+ "note": "The broader run was interrupted during Telegram review loops and timeouts. These failures were not all investigated or proven to predate this change. No full-suite pass is claimed."
94
+ }
95
+ }
@@ -1,93 +1,113 @@
1
- # Native terminal rendering migration
2
-
3
- Omnius now uses `@opentui/core@0.6.6`, the native terminal engine used by
4
- OpenCode. The agent/CLI remains on Node >=22; a packaged Bun 1.3.14 process
5
- owns OpenTUI and the physical terminal. This avoids loading Bun/Node-26 FFI in
6
- the existing Node backend or changing its native SQLite and supervisor runtime.
7
-
8
- The original Earth palette, default terminal transparency, header, tool cards,
9
- tasks area, expandable input, metrics, agent views, and session representations
10
- remain the component contract. This migration uses OpenTUI's imperative
11
- renderables, rather than copying OpenCode's application or Solid component tree.
12
-
13
- ## Rendering and ownership
14
-
15
- - `native/screen.ts` composes existing formatted components into a bounded
16
- retained cell surface. ANSI styling and geometry become native styled rows;
17
- physical cursor/scroll-region/screen paint controls are consumed locally.
18
- - `native/host.ts` coalesces changes at 16 ms, sends changed rows, and permits
19
- one unacknowledged frame. Updates during terminal backpressure replace state
20
- instead of growing an output queue.
21
- - `native/worker.ts` renders native `TextRenderable` rows and acknowledges after
22
- native output settles. Only allowlisted title, clipboard, and input-mode
23
- effects pass to the terminal. Default/indexed color intents are preserved.
24
- - The parent acquires raw input before native capability queries. Protocol
25
- replies reach OpenTUI, while keyboard/mouse/paste reach the editor and menus.
26
- Modal listeners use the same filtered stream and restore prior listeners.
27
- - Inherited commands await native suspension. Resume forces a complete retained
28
- frame. Stop/update/exit close the worker; failure restores terminal modes and
29
- triggers the client's existing session-preserving shutdown.
30
-
31
- ## History cost
32
-
33
- The old renderer rebuilt its prefix row index during streamed updates and
34
- cleared the entire wrap cache above 8,000 entries. The replacement uses an
35
- incremental Fenwick index, bounded LRU wrapping, shared dynamic-block snapshots,
36
- linear ANSI-aware wrapping, and viewport-only result allocation. Wheel bursts
37
- coalesce on local terminals as well as remote ones. End with an empty prompt
38
- returns to live. Queue hints occupy their own row above the input box.
39
-
40
- The recorded CPU benchmark compares commit
41
- `e54e7942700cf575f00b2142626168ed8c929f69` with this implementation, using 9,900
42
- unique styled lines and 120 append/reflow frames crossing the 10,000-line limit:
43
-
44
- | Measurement | Before | After |
45
- | --- | ---: | ---: |
46
- | Streamed append/reflow median | 43.93 ms | 0.023 ms |
47
- | Streamed append/reflow p95 | 48.19 ms | 0.112 ms |
48
- | Static history count/wrap calls during those frames | 1,196,840 | 120 |
49
- | Initial row-index construction | 72.44 ms | 83.77 ms |
50
-
51
- These are shared-host CPU history/layout measurements, excluding native paint,
52
- IPC, input latency, and inference. Initial index construction is not faster.
53
-
54
- ## Validation evidence
55
-
56
- - [CPU benchmark](evidence/native-tui-history-benchmark-20261015.json)
57
- - [Real PTY and independent xterm screen checks](evidence/native-tui-pty-live-20261015.json)
58
- - [GPU placement preflight](evidence/native-tui-gpu-preflight-20261015.json)
59
- - [Live model streaming in the PTY](evidence/native-tui-model-live-20261015.json)
60
- - [Clean tarball runtime smoke](evidence/native-tui-package-smoke-20261015.json)
61
-
62
- All 264 targeted regression tests across 28 files passed, as did a clean
63
- workspace rebuild, publish bundling/artifact audit, and tarball content checks.
64
- An isolated tarball installation launched the Node CLI, opened SQLite, and
65
- painted/restored a real PTY using the packaged Bun/OpenTUI worker. Package install
66
- scripts were disabled; only Bun and SQLite were rebuilt for the smoke test.
67
-
68
- The terminal suite exercises 20,000 history lines, tool clicks, 200-event wheel
69
- bursts, multiline editing, menus, streaming, Escape, narrow/wide resizing,
70
- exclusive subprocess handoff, terminal restoration, and native-worker cleanup.
71
- The synthetic test sent zero inference requests. The optional live run streamed
72
- 868 response chunks from `robit/qwen3.8-27b-obliterated-e03:27b` while scrolling
73
- and typing, through the same `StreamRenderer`, `StatusBar`, and native renderer.
74
-
75
- For that live run, a broker lease reserved GPU 0
76
- (`GPU-3538758b-6ba7-fa1b-a80c-e315a606c3f0`, A100 80 GB). A dedicated pinned
77
- Ollama 0.34.4 server at `127.0.0.1:11572` exposed only that UUID. A zero-token
78
- load preceded actual `nvidia-smi` runner placement verification and the
79
- generation request. The test server/model was stopped, the lease released, and
80
- the operator inference hold restored. The recorded endpoint is no longer live.
1
+ # Native OpenTUI terminal frontend
2
+
3
+ Every interactive terminal surface uses `@opentui/core@0.6.6`. Node owns the
4
+ agent and services; a packaged Bun 1.3.14 process owns OpenTUI, raw terminal
5
+ input, focus, layout, scrolling, selection and painting. The Earth palette,
6
+ transparent default background, header, agent tabs, history, pinned tasks,
7
+ expandable input, enhancement controls and metrics remain the interface structure.
8
+ The implementation uses OpenTUI's [imperative native renderables](https://github.com/anomalyco/opentui/tree/main/packages/core).
9
+
10
+ ## Component contract
11
+
12
+ `native/protocol.ts` carries semantic documents and actions. The host sends
13
+ stable-ID content patches, coalesces updates and permits one unacknowledged
14
+ frame. Missing acknowledgements fail visibly and restore terminal ownership.
15
+ Keyboard, paste, pointer and capability bytes go directly to OpenTUI. The Node
16
+ input facade receives editor changes, submissions and backend shortcuts.
17
+
18
+ The worker builds native Box, Text, Markdown, Code, ScrollBox, Textarea,
19
+ Select, TabSelect, Image and EmbeddedTerminal renderables. Menus, nested
20
+ prompts, secret input, onboarding, memory maps, camera controls, progress,
21
+ agent command center and Neovim share this component tree and focus model.
22
+ External interactive programs use an explicit suspended terminal handoff.
23
+ Machine-readable and piped output remain plain streams.
24
+
25
+ There is no terminal-cell screen compositor, physical cursor painter, manual
26
+ wrapped-row index, mouse escape parser or second raw keyboard parser in the
27
+ application. Styled text from external tools can retain SGR color information;
28
+ cursor/screen controls are discarded. Persisted tool data and live inference,
29
+ shell, trajectory, action-tree, media and sub-agent data become native cards.
30
+ Session restoration preserves semantic documents and old stored transcripts.
31
+
32
+ ## Verification
33
+
34
+ - `pnpm --filter omnius exec vitest run tests/native-components.test.ts` runs
35
+ actual OpenTUI under packaged Bun, including long-history scrolling and
36
+ concurrent editing, Unicode paste, independent stack/tree scroll positions,
37
+ native menus, secret masking, cards, themes, media controls, image fallback,
38
+ footer actions, and an embedded terminal.
39
+ - `node scripts/benchmark-tui-history.mjs --output FILE` records those native
40
+ scenario timings. They include native layout/render/input work; they are
41
+ not a claim about per-keystroke latency or a speedup over the old renderer.
42
+ - `node scripts/test-tui-production-terminal.mjs --report FILE --transcript FILE`
43
+ launches the actual CLI in a real PTY, observes the screen independently,
44
+ uses isolated settings/data, permits local metadata and blocks all inference.
45
+ Add `--entry /path/to/installed/omnius/dist/index.js` to test a clean tarball
46
+ installation using observation of the actual worker IPC.
47
+ - `node scripts/test-tui-production-local.mjs --preflight FILE` validates an
48
+ already-resident, verified GPU/model scope, then exercises the actual CLI's
49
+ local answer, tool execution, streaming and Stop paths. Its transport observer
50
+ records request scope and test markers without replacing the backend.
51
+
52
+ Earlier `native-tui-*-20261015.json` evidence describes the previous row adapter
53
+ and a synthetic fixture. Those measurements are historical and do not validate
54
+ this complete semantic frontend. Current results are recorded separately.
55
+
56
+ The final targeted run passed 484 CLI tests across 63 files and 189 orchestrator
57
+ tests across five files, including the mandatory daemon web transport tests.
58
+ All 15 actual native component scenarios and six metadata-only production PTY
59
+ checks passed. A separate production CLI run passed eight checks with the real
60
+ local model: an answer, a file-read tool round trip, streaming with 200 wheel
61
+ events, continued editing, resize, Stop, editable recovery and clean shutdown.
62
+ Input painted in 26 ms during that streaming wheel burst. This is one observed
63
+ live measurement, not a general latency percentile.
64
+
65
+ Current receipts:
66
+
67
+ - [Targeted tests and broader-suite limits](evidence/native-tui-targeted-verification-20261015.json)
68
+ - [Actual native component scenarios](evidence/native-tui-semantic-components-20261015.json)
69
+ - [Production terminal checks](evidence/native-tui-production-terminal-20261015.json)
70
+ - [Verified GPU 0 and actual local-model CLI checks](evidence/native-tui-local-inference-repair-20261015.json)
71
+ - [Clean package artifact checks](evidence/native-tui-package-artifact-20261015.json)
72
+ - [Installed package terminal and runtime checks](evidence/native-tui-package-install-20261015.json)
73
+ - [Independent committed-source build and 484 tests](evidence/native-tui-committed-scope-20261015.json)
74
+
75
+ The broader CLI suite did not finish: its interrupted run observed 257 failures
76
+ in Telegram tests. Those failures were not all investigated or established as
77
+ pre-existing. A full-suite pass is not claimed.
78
+
79
+ ## Local inference repair
80
+
81
+ The broker's explicit operator hold caused local requests to fail and automatic
82
+ fallback to select a remote route. Omnius now retains a sanitized local failure
83
+ reason beside the effective route and clears it after local recovery. GPU
84
+ selection initializes consistently for interactive, single-task and daemon
85
+ entry points, and native Ollama requests retain the exact GPU allowlist.
86
+
87
+ API model routing preserves organization namespaces such as `robit/`; it strips
88
+ only known routing prefixes or resolves an advertised route. Global config,
89
+ settings, default database and terminal history honor `OMNIUS_CONFIG_HOME`.
90
+ CLI test setup assigns an isolated configuration home so tests cannot change
91
+ the operator's live routing settings.
92
+
93
+ The operator explicitly approved normal local inference on GPU 0. The supported
94
+ health-checked resume released the hold; actual server and runner placement were
95
+ verified on GPU 0 before generation. The hold remains released after successful
96
+ testing. Other GPU workloads and host device selections are preserved.
97
+ The live run made 12 local physical requests: 11 returned HTTP 200 and a repeated
98
+ helper rerank operation returned a nonfatal HTTP 409. All user-facing checks
99
+ passed. Tool-bearing requests were observed with `think: false` without a forced
100
+ environment override.
81
101
 
82
102
  ## Packaging
83
103
 
84
- The publish builder emits `dist/tui/native/worker.js` separately, keeps OpenTUI
85
- external, and carries exact OpenTUI/Bun/tree-sitter dependencies into the publish
86
- manifest. The artifact audit requires the native worker. The Bun executable and
87
- native platform library add installation size; a normal npm install provisions
88
- them automatically. No separate Bun installation is required.
89
-
90
- Reproduce terminal validation after building with
91
- `node scripts/test-tui-native-live.mjs --report /tmp/omnius-tui-live.json`.
92
- Use `node scripts/benchmark-tui-history.mjs --help` for CPU benchmark options.
93
- Real inference remains subject to the repository's exact GPU preflight gate.
104
+ The builder emits `dist/tui/native/worker.js` separately and keeps exact
105
+ OpenTUI/Bun runtime dependencies. It rebuilds every workspace package before
106
+ bundling. Clean builds remove deleted legacy renderer modules from distributable
107
+ outputs. Tests and tarball installation must disable unrelated postinstall
108
+ daemon/service startup while validating the native runtime assets.
109
+ The final tarball passed all six production terminal checks in a fresh isolated
110
+ installation. Node CLI help, a real SQLite round trip, packaged Bun/OpenTUI and
111
+ the separately bundled native worker were also verified. The tarball contains
112
+ the README and injected README metadata, with no tests, coverage, caches,
113
+ sourcemaps, build caches or deleted legacy renderer modules.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.861",
3
+ "version": "1.0.862",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.861",
9
+ "version": "1.0.862",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.861",
3
+ "version": "1.0.862",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/library.js",