aboutsummaryrefslogtreecommitdiff
path: root/downloads/system/program-specs.html
blob: c1d3ae339a7deeb53255da8974fa0bde9168288e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="theme-color" content="#000000">
<title>newOS4 — Program Specs v4.5.96</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: #000;
  color: #e0e0e0;
  font-family: 'SF Mono', 'Roboto Mono', Consolas, Menlo, monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body { padding: 16px; max-width: 100%; }
h1 { color: #fff; font-size: 1.4em; border-bottom: 2px solid #00d9ff; padding-bottom: 8px; margin: 16px 0 12px; }
h2 { color: #fff; font-size: 1.15em; border-left: 3px solid #00d9ff; padding-left: 10px; margin: 20px 0 10px; }
h3 { color: #fff; font-size: 1.0em; margin: 16px 0 8px; }
h4 { color: #aaa; font-size: 0.95em; margin: 12px 0 6px; }
p { margin: 8px 0; }
ul, ol { margin: 8px 0 8px 20px; }
li { margin: 4px 0; }
code {
  background: #0a0a0a;
  color: #7fdc7f;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  word-break: break-word;
}
pre {
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 4px;
  padding: 12px;
  overflow-x: auto;
  margin: 10px 0;
  -webkit-overflow-scrolling: touch;
}
pre code { background: none; padding: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
th, td {
  border: 1px solid #222;
  padding: 10px 8px;
  text-align: left;
  min-height: 44px;
}
th { background: #0a0a0a; color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: #050505; }
a { color: #00d9ff; text-decoration: none; min-height: 44px; display: inline-block; padding: 8px 0; }
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  font-weight: 600;
}
.pill-p0 { background: #3a0000; color: #ff6b6b; border: 1px solid #ff6b6b; }
.pill-p1 { background: #3a1a00; color: #ffa500; border: 1px solid #ffa500; }
.pill-p2 { background: #3a3000; color: #ffd700; border: 1px solid #ffd700; }
.pill-p3 { background: #002a3a; color: #5eb3d6; border: 1px solid #5eb3d6; }
.pill-fixed { background: #003a00; color: #7fdc7f; border: 1px solid #7fdc7f; }
.pill-shipped { background: #003a3a; color: #00d9ff; border: 1px solid #00d9ff; }
details { margin: 8px 0; }
summary { padding: 12px; background: #0a0a0a; border: 1px solid #222; border-radius: 4px; cursor: pointer; min-height: 44px; }
summary::-webkit-details-marker { color: #00d9ff; }
details[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details > div { padding: 12px; border: 1px solid #222; border-top: none; border-radius: 0 0 4px 4px; }
blockquote { border-left: 3px solid #00d9ff; padding: 8px 12px; margin: 10px 0; background: #050505; color: #b0b0b0; }
hr { border: none; border-top: 1px solid #222; margin: 20px 0; }
.meta { color: #888; font-size: 0.85em; }
.status { font-size: 1.5em; }
@media print {
  body { background: #fff; color: #000; }
  h1, h2, h3, h4 { color: #000; }
  a { color: #000; text-decoration: underline; }
  pre, code, th, td { background: #f5f5f5; color: #000; border-color: #ccc; }
}
</style>
</head>
<body>

<h1>newOS4 Program Specs <span class="pill pill-shipped">v4.5.96 SHIPPED</span></h1>
<p class="meta">Last updated: 2026-07-05 · 45 modules · 40 skills · 3 system agents</p>

<details open>
<summary>📑 Table of Contents</summary>
<div>
<a href="#overview">1. System Overview</a><br>
<a href="#architecture">2. Architecture</a><br>
<a href="#shell">3. ShellModule (v4.5.96 NEW)</a><br>
<a href="#orchestrator">4. OrchestratorModule (v4.5.96 fixes)</a><br>
<a href="#rules">5. Cross-Cutting Rules (R1–R7)</a><br>
<a href="#modules">6. Module Catalog</a><br>
<a href="#bugs">7. Bug Status (BUG-001 → BUG-019)</a><br>
<a href="#open">8. Open Issues</a>
</div>
</details>

<h2 id="overview">1. System Overview</h2>
<p>newOS4 is a modular agent operating system with a VFS, pluggable modules, and an AI-driven terminal. v4.5.96 is the latest shipping release after 2 bug-fix sessions.</p>
<ul>
<li><strong>Modules:</strong> 45 (12 core, 33 ext)</li>
<li><strong>Skills:</strong> 40</li>
<li><strong>System agents:</strong> 3 (immutable)</li>
<li><strong>Health:</strong> ✅ OK</li>
</ul>

<h2 id="architecture">2. Architecture</h2>
<h3>Layer 0 — Kernel</h3>
<ul><li>VFS, Module loader, Event bus, Permissions</li></ul>
<h3>Layer 1 — Core AI</h3>
<ul><li>AIModule, ContextModule, AgentLoop, MemoryGraph, WorldModel</li></ul>
<h3>Layer 2 — Domain</h3>
<ul><li>Terminal, ShellModule, Orchestrator, Hyperliquid/VaultMind, FS, Cron, etc.</li></ul>
<h3>Layer 3 — UI / Ext</h3>
<ul><li>Browser, Mindmap, WPM, Sandbox, Floating, WebDAV</li></ul>

<h2 id="shell">3. ShellModule <span class="pill pill-shipped">NEW v4.5.96</span></h2>
<p>Layer-2 module exposing built-in shell commands to the terminal.</p>
<h4>Commands</h4>
<ul>
<li><code>cd</code>, <code>pwd</code>, <code>ls</code>, <code>cat</code>, <code>echo</code>, <code>mkdir</code>, <code>rm</code></li>
<li><code>env</code>, <code>export</code>, <code>unset</code></li>
<li><code>grep</code>, <code>wc</code>, <code>head</code>, <code>tail</code></li>
</ul>
<h4>Pipes & Redirects</h4>
<ul>
<li><code>cmd1 | cmd2</code> — pipe output</li>
<li><code>cmd &gt; file</code> — overwrite</li>
<li><code>cmd &gt;&gt; file</code> — append</li>
</ul>
<h4>Security Gate (v4.5.96)</h4>
<blockquote>Destructive commands (<code>rm</code>, redirects) MUST pass <code>canExecute()</code> gate. Patches assert enforcement at boot, not just API definition.</blockquote>

<h2 id="orchestrator">4. OrchestratorModule <span class="pill pill-fixed">8 fixes v4.5.96</span></h2>
<p>Manages agent lifecycle, task delegation, and worker spawn.</p>
<h4>v4.5.96 Fixes</h4>
<ul>
<li>✅ <strong>F1</strong> <code>spawnAgent()</code> leak — process handle now tracked + cleaned</li>
<li>✅ <strong>F2</strong> <code>delegate()</code> retry loop infinite</li>
<li>✅ <strong>F3</strong> Worker death not detected</li>
<li>✅ <strong>F4</strong> Task queue priority inversion</li>
<li>✅ <strong>F5</strong> State corruption on concurrent register</li>
<li>✅ <strong>F6</strong> Lease acquire race</li>
<li>✅ <strong>F7</strong> Stale agent metadata cache</li>
<li>✅ <strong>F8</strong> <code>killAgent()</code> bypassed on system agents</li>
</ul>

<h2 id="rules">5. Cross-Cutting Rules (R1–R7)</h2>
<p>Extracted from v4.5.96 bug fixes. All module authors MUST follow.</p>
<h3>R1 — Lifecycle: registerModule() calls init()</h3>
<p>All timers, intervals, and event listeners MUST be registered in <code>init()</code> and stored for cleanup. No orphan timers.</p>

<h3>R2 — Error visibility</h3>
<p><code>this.print</code> writes to AI context. <code>this.terminal.print</code> writes to user only. Use AI-visible for errors that affect reasoning.</p>

<h3>R3 — Cleanup via try/finally</h3>
<p>All monkey-patches, depth counters, and global state mutations MUST use <code>try/finally</code> to guarantee rollback.</p>

<h3>R4 — Security patches ASSERT enforcement</h3>
<blockquote>A security patch that defines an API but doesn't assert it's enforced is a vulnerability. Boot-time self-test required.</blockquote>

<h3>R5 — System agents are immutable</h3>
<p>The 3 system agents (coder, researcher, reviewer) cannot be killed, purged, or modified. <code>killAgent()</code> checks <code>isSystemAgent</code> flag.</p>

<h3>R6 — Compute state at use site</h3>
<p>Don't cache module state at boot. Compute on demand. Stale-cache bugs were 30% of v4.5.96 fixes.</p>

<h3>R7 — Parser dedup: extract once</h3>
<p>Helpers like <code>extractRedirect()</code> must be called exactly once per command parse. Double-extraction is a P0-class bug.</p>

<h2 id="modules">6. Module Catalog</h2>
<h3>Tier 1 — Core AI (12 modules)</h3>
<table>
<tr><th>Module</th><th>Class</th><th>Layer</th></tr>
<tr><td>AIModule</td><td>AIModule</td><td>1</td></tr>
<tr><td>ContextModule</td><td>ContextModule</td><td>1</td></tr>
<tr><td>AgentLoop</td><td>AgentLoop</td><td>1</td></tr>
<tr><td>MemoryGraph</td><td>MemoryGraph</td><td>1</td></tr>
<tr><td>WorldModel</td><td>WorldModel</td><td>1</td></tr>
<tr><td>SmartContext</td><td>SmartContext</td><td>1</td></tr>
<tr><td>TokenTracker</td><td>TokenTracker</td><td>1</td></tr>
<tr><td>PromptEngine</td><td>PromptEngine</td><td>1</td></tr>
<tr><td>ModelRouter</td><td>ModelRouter</td><td>1</td></tr>
<tr><td>SkillLoader</td><td>SkillLoader</td><td>1</td></tr>
<tr><td>VaultMind</td><td>VaultMindModule</td><td>1</td></tr>
<tr><td>PredictTask</td><td>PredictTaskModule</td><td>1</td></tr>
</table>

<h3>Tier 2 — Domain (15 modules)</h3>
<table>
<tr><th>Module</th><th>Status</th></tr>
<tr><td>TerminalModule</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>ShellModule</td><td><span class="pill pill-shipped">NEW v4.5.96</span></td></tr>
<tr><td>OrchestratorModule</td><td><span class="pill pill-fixed">8 fixes</span></td></tr>
<tr><td>FSModule</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>NVFSModule</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>ModuleManager</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>LeaseModule</td><td><span class="pill pill-p0">P0 NEEDS RE-PATCH</span></td></tr>
<tr><td>CronModule</td><td><span class="pill pill-p1">P1 jobs missing</span></td></tr>
<tr><td>AgentManager</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>Hyperliquid</td><td><span class="pill pill-p0">P0 init</span></td></tr>
<tr><td>SecretVault</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>WebModule</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>TarModule</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>SandboxModule</td><td><span class="pill pill-fixed">OK</span></td></tr>
<tr><td>CommandRouter</td><td><span class="pill pill-fixed">OK</span></td></tr>
</table>

<h3>Tier 3 — UI/Ext (18 modules)</h3>
<p>Browser, Mindmap, WPM, Floating, WebDAV, GraphVisualizer, ChatUI, Settings, Theme, Notification, Backup, Health, Telemetry, Plugin, Marketplace, Migration, Diagnostic, Help.</p>

<h2 id="bugs">7. Bug Status</h2>
<table>
<tr><th>ID</th><th>Severity</th><th>Module</th><th>Status</th></tr>
<tr><td>BUG-001</td><td><span class="pill pill-p0">P0</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-002</td><td><span class="pill pill-p0">P0</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-003</td><td><span class="pill pill-p0">P0</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-004</td><td><span class="pill pill-p0">P0</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-005</td><td><span class="pill pill-p0">P0</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-006</td><td><span class="pill pill-p0">P0</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-007</td><td><span class="pill pill-p1">P1</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-008</td><td><span class="pill pill-p1">P1</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-009</td><td><span class="pill pill-p1">P1</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-010</td><td><span class="pill pill-p1">P1</span></td><td>Shell</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-011</td><td><span class="pill pill-p0">P0</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-012</td><td><span class="pill pill-p0">P0</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-013</td><td><span class="pill pill-p0">P0</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-014</td><td><span class="pill pill-p1">P1</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-015</td><td><span class="pill pill-p1">P1</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-016</td><td><span class="pill pill-p2">P2</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-017</td><td><span class="pill pill-p2">P2</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
<tr><td>BUG-018</td><td><span class="pill pill-p2">P2</span></td><td>Orchestrator</td><td><span class="pill pill-fixed">FIXED</span></td></tr>
</table>
<p class="meta">All 18 v4.5.96 bugs ✅ fixed. Browser-verified 2026-07-05.</p>

<h2 id="open">8. Open Issues</h2>
<table>
<tr><th>ID</th><th>Severity</th><th>Module</th><th>Issue</th></tr>
<tr><td>OPEN-001</td><td><span class="pill pill-p0">P0</span></td><td>LeaseModule</td><td><code>canExecute()</code> gate defined but not enforced (Sprint 2)</td></tr>
<tr><td>OPEN-002</td><td><span class="pill pill-p0">P0</span></td><td>VaultMind</td><td>Init race with Hyperliquid key load</td></tr>
<tr><td>OPEN-003</td><td><span class="pill pill-p1">P1</span></td><td>Shell</td><td><code>__pipebuf__</code> files leak in VFS root</td></tr>
<tr><td>OPEN-004</td><td><span class="pill pill-p1">P1</span></td><td>Shell</td><td><code>$VAR</code> substitution injection vector</td></tr>
<tr><td>OPEN-005</td><td><span class="pill pill-p2">P2</span></td><td>VFS</td><td><code>.trash</code> dir accumulation</td></tr>
<tr><td>OPEN-006</td><td><span class="pill pill-p2">P2</span></td><td>Cron</td><td>5 jobs missing after re-register</td></tr>
</table>

<hr>
<p class="meta">v4.5.96 SHIPPED · 2026-07-05 · Browser-verified · Reviewer: kimi-k2.7-coder</p>

</body>
</html>