omnius 1.0.860 → 1.0.861
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.
- package/dist/index.js +2 -2
- package/dist/tui/native/worker.js +166 -0
- package/docs/DISCOVERY.json +213 -0
- package/docs/DISCOVERY.md +6 -0
- package/docs/guides/tui-workflows.md +38 -0
- package/docs/work-orders/evidence/native-tui-gpu-preflight-20261015.json +42 -0
- package/docs/work-orders/evidence/native-tui-history-benchmark-20261015.json +108 -0
- package/docs/work-orders/evidence/native-tui-model-live-20261015.json +141 -0
- package/docs/work-orders/evidence/native-tui-package-smoke-20261015.json +12 -0
- package/docs/work-orders/evidence/native-tui-pty-live-20261015.json +121 -0
- package/docs/work-orders/native-tui-renderer.md +93 -0
- package/npm-shrinkwrap.json +625 -45
- package/package.json +5 -2
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "omnius.native-tui-live.v1",
|
|
3
|
+
"testedAt": "2026-10-15T20:41:47.384Z",
|
|
4
|
+
"passed": true,
|
|
5
|
+
"elapsedMs": 25537,
|
|
6
|
+
"inferenceRequests": 1,
|
|
7
|
+
"checks": [
|
|
8
|
+
{
|
|
9
|
+
"name": "native header, history and input render in the real terminal",
|
|
10
|
+
"passed": true,
|
|
11
|
+
"elapsedMs": 928,
|
|
12
|
+
"native": {
|
|
13
|
+
"writes": 13,
|
|
14
|
+
"framesSent": 2,
|
|
15
|
+
"framesAcknowledged": 1,
|
|
16
|
+
"coalescedWrites": 13,
|
|
17
|
+
"inFlight": true,
|
|
18
|
+
"pending": false,
|
|
19
|
+
"suspended": 0,
|
|
20
|
+
"closed": false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "mouse clicks resize a live tool block without damaging surrounding history",
|
|
25
|
+
"passed": true,
|
|
26
|
+
"elapsedMs": 83
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "200 mouse-wheel reports stay responsive over 20,000 history lines",
|
|
30
|
+
"passed": true,
|
|
31
|
+
"elapsedMs": 81,
|
|
32
|
+
"wheelCount": 200,
|
|
33
|
+
"frames": 1,
|
|
34
|
+
"inputResponseMs": 81,
|
|
35
|
+
"eventLoopMaxMs": 61.46446400000002
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "editing and Shift+Enter preserve multiline input",
|
|
39
|
+
"passed": true,
|
|
40
|
+
"elapsedMs": 60
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "End returns to live history and a native menu restores the main screen",
|
|
44
|
+
"passed": true,
|
|
45
|
+
"elapsedMs": 201
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "synthetic streaming, tool growth, scrolling and input remain responsive",
|
|
49
|
+
"passed": true,
|
|
50
|
+
"elapsedMs": 1292,
|
|
51
|
+
"eventLoopMaxMs": 61.46446400000002,
|
|
52
|
+
"native": {
|
|
53
|
+
"writes": 65,
|
|
54
|
+
"framesSent": 14,
|
|
55
|
+
"framesAcknowledged": 13,
|
|
56
|
+
"coalescedWrites": 53,
|
|
57
|
+
"inFlight": true,
|
|
58
|
+
"pending": false,
|
|
59
|
+
"suspended": 0,
|
|
60
|
+
"closed": false
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "Escape cancels synthetic streaming and keeps the prompt editable",
|
|
65
|
+
"passed": true,
|
|
66
|
+
"elapsedMs": 224
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "narrow and wide terminal resizes preserve fixed chrome",
|
|
70
|
+
"passed": true,
|
|
71
|
+
"elapsedMs": 304,
|
|
72
|
+
"dimensions": {
|
|
73
|
+
"columns": 120,
|
|
74
|
+
"rows": 36
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "inherited subprocess owns the terminal exclusively and native rendering resumes",
|
|
79
|
+
"passed": true,
|
|
80
|
+
"elapsedMs": 484
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "preflighted real model streams while scrolling and editing",
|
|
84
|
+
"passed": true,
|
|
85
|
+
"elapsedMs": 21665,
|
|
86
|
+
"endpoint": "http://127.0.0.1:11572",
|
|
87
|
+
"model": "robit/qwen3.8-27b-obliterated-e03:27b",
|
|
88
|
+
"gpu": "GPU-3538758b-6ba7-fa1b-a80c-e315a606c3f0",
|
|
89
|
+
"modelChunks": 868,
|
|
90
|
+
"eventLoopMaxMs": 213.635577,
|
|
91
|
+
"native": {
|
|
92
|
+
"writes": 129,
|
|
93
|
+
"framesSent": 30,
|
|
94
|
+
"framesAcknowledged": 30,
|
|
95
|
+
"coalescedWrites": 104,
|
|
96
|
+
"inFlight": false,
|
|
97
|
+
"pending": true,
|
|
98
|
+
"suspended": 0,
|
|
99
|
+
"closed": false
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "clean exit restores the terminal and leaves no native worker",
|
|
104
|
+
"passed": true,
|
|
105
|
+
"elapsedMs": 210,
|
|
106
|
+
"workers": [
|
|
107
|
+
2527025
|
|
108
|
+
],
|
|
109
|
+
"exitCode": 0
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"finalTelemetry": {
|
|
113
|
+
"phase": "exited",
|
|
114
|
+
"input": "",
|
|
115
|
+
"submitted": "/quit",
|
|
116
|
+
"wheelCount": 600,
|
|
117
|
+
"scrollOffset": 0,
|
|
118
|
+
"eventLoopMaxMs": 213.635577,
|
|
119
|
+
"streamLines": 19,
|
|
120
|
+
"cancelled": true,
|
|
121
|
+
"toolExpanded": true,
|
|
122
|
+
"modelResponse": "1. Native TUI live check 1: Initializing terminal interface\n2. Native TUI live check 2: Loading core rendering engine\n3. Native TUI live check 3: Detecting terminal capabilities\n4. Native TUI live check 4: Setting up event loop\n5. Native TUI live check 5: Registering input handlers\n6. Native TUI live check 6: Configuring color palette\n7. Native TUI live check 7: Measuring screen dimensions\n8. Native TUI live check 8: Creating widget tree\n9. Native TUI live check 9: Binding state management\n10. Native TUI live check 10: Starting first paint cycle\n11. Native TUI live check 11: Drawing header bar\n12. Native TUI live check 12: Rendering sidebar panel\n13. Native TUI live check 13: Updating main content area\n14. Native TUI live check 14: Refreshing status footer\n15. Native TUI live check 15: Processing keyboard events\n16. Native TUI live check 16: Handling mouse clicks\n17. Native TUI live check 17: Tracking cursor position\n18. Native TUI live check 18: Managing focus states\n19. Native TUI live check 19: Validating layout constraints\n20. Native TUI live check 20: Optimizing redraw regions\n21. Native TUI live check 21: Caching static elements\n22. Native TUI live check 22: Throttling high-frequency updates\n23. Native TUI live check 23: Debouncing input streams\n24. Native TUI live check 24: Synchronizing UI state\n25. Native TUI live check 25: Resolving z-order conflicts\n26. Native TUI live check 26: Applying theme variables\n27. Native TUI live check 27: Loading font metrics\n28. Native TUI live check 28: Measuring text widths\n29. Native TUI live check 29: Wrapping long lines\n30. Native TUI live check 30: Aligning grid cells\n31. Native TUI live check 31: Padding container margins\n32. Native TUI live check 32: Spacing flex items\n33. Native TUI live check 33: Distributing available space\n34. Native TUI live check 34: Clipping overflow content\n35. Native TUI live check 35: Scrolling viewport regions\n36. Native TUI live check 36: Updating scrollbars\n37. Native TUI live check 37: Highlighting active rows\n38. Native TUI live check 38: Selecting table cells\n39. Native TUI live check 39: Editing text buffers\n40. Native TUI live check 40: Inserting new characters\n41. Native TUI live check 41: Deleting selected ranges\n42. Native TUI live check 42: Copying to clipboard\n43. Native TUI live check 43: Pasting from clipboard\n44. Native TUI live check 44: Undoing last action\n45. Native TUI live check 45: Redoing previous step\n46. Native TUI live check 46: Saving current view\n47. Native TUI live check 47: Loading external data\n48. Native TUI live check 48: Parsing JSON payloads\n49. Native TUI live check 49: Mapping data to models\n50. Native TUI live check 50: Binding model to view\n51. Native TUI live check 51: Emitting change events\n52. Native TUI live check 52: Listening for updates\n53. Native TUI live check 53: Propagating state changes\n54. Native TUI live check 54: Reconciling diffs\n55. Native TUI live check 55: Patching DOM nodes\n56. Native TUI live check 56: Committing buffer writes\n57. Native TUI live check 57: Flushing output queue\n58. Native TUI live check 58: Syncing with backend\n59. Native TUI live check 59: Verifying integrity\n60. Native TUI live check 60: Completing live check",
|
|
123
|
+
"modelChunks": 868,
|
|
124
|
+
"modelDone": true,
|
|
125
|
+
"modelError": "",
|
|
126
|
+
"dimensions": {
|
|
127
|
+
"columns": 120,
|
|
128
|
+
"rows": 36
|
|
129
|
+
},
|
|
130
|
+
"native": {
|
|
131
|
+
"writes": 132,
|
|
132
|
+
"framesSent": 32,
|
|
133
|
+
"framesAcknowledged": 32,
|
|
134
|
+
"coalescedWrites": 106,
|
|
135
|
+
"inFlight": false,
|
|
136
|
+
"pending": false,
|
|
137
|
+
"suspended": 0,
|
|
138
|
+
"closed": true
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"passed": true,
|
|
3
|
+
"exitCode": 0,
|
|
4
|
+
"nativeWorkerFromCleanTarball": true,
|
|
5
|
+
"nodeCliHelp": true,
|
|
6
|
+
"nodeSqlite": true,
|
|
7
|
+
"bunVersion": "1.3.14",
|
|
8
|
+
"packageVersion": "1.0.860",
|
|
9
|
+
"paintBytes": 3177,
|
|
10
|
+
"terminalRestored": true,
|
|
11
|
+
"installScripts": "disabled; rebuilt only bun and better-sqlite3"
|
|
12
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "omnius.native-tui-live.v1",
|
|
3
|
+
"testedAt": "2026-10-15T20:49:38.290Z",
|
|
4
|
+
"passed": true,
|
|
5
|
+
"elapsedMs": 3853,
|
|
6
|
+
"inferenceRequests": 0,
|
|
7
|
+
"checks": [
|
|
8
|
+
{
|
|
9
|
+
"name": "native header, history and input render in the real terminal",
|
|
10
|
+
"passed": true,
|
|
11
|
+
"elapsedMs": 929,
|
|
12
|
+
"native": {
|
|
13
|
+
"writes": 13,
|
|
14
|
+
"framesSent": 2,
|
|
15
|
+
"framesAcknowledged": 1,
|
|
16
|
+
"coalescedWrites": 13,
|
|
17
|
+
"inFlight": true,
|
|
18
|
+
"pending": false,
|
|
19
|
+
"suspended": 0,
|
|
20
|
+
"closed": false
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "mouse clicks resize a live tool block without damaging surrounding history",
|
|
25
|
+
"passed": true,
|
|
26
|
+
"elapsedMs": 80
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "200 mouse-wheel reports stay responsive over 20,000 history lines",
|
|
30
|
+
"passed": true,
|
|
31
|
+
"elapsedMs": 81,
|
|
32
|
+
"wheelCount": 200,
|
|
33
|
+
"frames": 1,
|
|
34
|
+
"inputResponseMs": 81,
|
|
35
|
+
"eventLoopMaxMs": 65.755221
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "editing and Shift+Enter preserve multiline input",
|
|
39
|
+
"passed": true,
|
|
40
|
+
"elapsedMs": 61
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "End returns to live history and a native menu restores the main screen",
|
|
44
|
+
"passed": true,
|
|
45
|
+
"elapsedMs": 162
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "synthetic streaming, tool growth, scrolling and input remain responsive",
|
|
49
|
+
"passed": true,
|
|
50
|
+
"elapsedMs": 1310,
|
|
51
|
+
"eventLoopMaxMs": 65.755221,
|
|
52
|
+
"native": {
|
|
53
|
+
"writes": 65,
|
|
54
|
+
"framesSent": 14,
|
|
55
|
+
"framesAcknowledged": 13,
|
|
56
|
+
"coalescedWrites": 52,
|
|
57
|
+
"inFlight": true,
|
|
58
|
+
"pending": false,
|
|
59
|
+
"suspended": 0,
|
|
60
|
+
"closed": false
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "Escape cancels synthetic streaming and keeps the prompt editable",
|
|
65
|
+
"passed": true,
|
|
66
|
+
"elapsedMs": 221
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "narrow and wide terminal resizes preserve fixed chrome",
|
|
70
|
+
"passed": true,
|
|
71
|
+
"elapsedMs": 305,
|
|
72
|
+
"dimensions": {
|
|
73
|
+
"columns": 120,
|
|
74
|
+
"rows": 36
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "inherited subprocess owns the terminal exclusively and native rendering resumes",
|
|
79
|
+
"passed": true,
|
|
80
|
+
"elapsedMs": 486
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "clean exit restores the terminal and leaves no native worker",
|
|
84
|
+
"passed": true,
|
|
85
|
+
"elapsedMs": 215,
|
|
86
|
+
"workers": [
|
|
87
|
+
2601762
|
|
88
|
+
],
|
|
89
|
+
"exitCode": 0
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"finalTelemetry": {
|
|
93
|
+
"phase": "exited",
|
|
94
|
+
"input": "",
|
|
95
|
+
"submitted": "/quit",
|
|
96
|
+
"wheelCount": 400,
|
|
97
|
+
"scrollOffset": 0,
|
|
98
|
+
"eventLoopMaxMs": 206.69383900000003,
|
|
99
|
+
"streamLines": 19,
|
|
100
|
+
"cancelled": true,
|
|
101
|
+
"toolExpanded": true,
|
|
102
|
+
"modelResponse": "",
|
|
103
|
+
"modelChunks": 0,
|
|
104
|
+
"modelDone": false,
|
|
105
|
+
"modelError": "",
|
|
106
|
+
"dimensions": {
|
|
107
|
+
"columns": 120,
|
|
108
|
+
"rows": 36
|
|
109
|
+
},
|
|
110
|
+
"native": {
|
|
111
|
+
"writes": 116,
|
|
112
|
+
"framesSent": 29,
|
|
113
|
+
"framesAcknowledged": 29,
|
|
114
|
+
"coalescedWrites": 91,
|
|
115
|
+
"inFlight": false,
|
|
116
|
+
"pending": false,
|
|
117
|
+
"suspended": 0,
|
|
118
|
+
"closed": true
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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.
|
|
81
|
+
|
|
82
|
+
## Packaging
|
|
83
|
+
|
|
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.
|