diff options
| author | Agando <roduccomm@gmail.com> | 2026-06-09 06:00:43 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-06-09 06:00:43 +0200 |
| commit | 9f60030e39feecc76f11671a4b9d82303c83670c (patch) | |
| tree | cd4d35985f98aef0f4e688e4bcc283a476c8cd3b | |
| parent | b562e1491513163921593985f3542d4ee8ae0e75 (diff) | |
auto: 2026-06-09_06:00 changes
49 files changed, 1432 insertions, 406 deletions
diff --git a/audit_2026-06-09_005950.md b/audit_2026-06-09_005950.md new file mode 100644 index 0000000..f31990c --- /dev/null +++ b/audit_2026-06-09_005950.md @@ -0,0 +1,74 @@ +# newOS4 Audit — 2026-06-09_005950 +Target: /var/www/webx11.duckdns.org/spaces/newos4 + + +═══ 1. FILE INVENTORY ═══ + Total files: 146, JS: 56, HTML: 19, MD: 25, JSON: 27 + Total size: 15116 KB, Module files: 51, Backups: 0 + +═══ 2. MODULES INDEX INTEGRITY ═══ + core: 25 index entries + deprecated: 1 index entries + ext: 18 index entries + infrastructure: 6 index entries + Core files on disk: 27, Ext files on disk: 18 + +═══ 3. COMMAND REGISTRY ═══ + _safeRegister calls: 21 + Unique commands in terminal.js: 2 + +═══ 4. BUILTIN MODULES (module-loader.js) ═══ + BUILTIN entries: 25 + +═══ 5. DEAD/ORPHAN FILES ═══ + +═══ 6. HELP DOCS vs ACTUAL COMMANDS ═══ + +═══ 7. CONFIG FILE INTEGRITY ═══ + packages.json: version=1.1.0, cache-bust=N/A + modules/core/module-loader.js: version=v4.5.25, cache-bust=N/A + +═══ 8. MODULE FILE HEALTH ═══ + +═══ 9. DUPLICATE/OVERLAP CHECK ═══ + Total unique commands: 272 + +═══ 10. STALE AI-GENERATED DOCUMENTATION ═══ + +═══ AUDIT SUMMARY ═══ + 'SystemModule' → module-system.js (via modules-index.json) + 'FileSystemModule' → module-fs.js (via modules-index.json) + 'ModuleManagerModule' → module-modmgr.js (via modules-index.json) + 'OllamaModule' → module-ollama.js (via modules-index.json) + 'SearXNGModule' → module-searxng.js (via modules-index.json) + 'ConfigManagerModule' → module-config.js (via modules-index.json) + 'WebX11AIAssistantModule' → module-aiassist.js (via modules-index.json) + 'WebFetcherModule' → module-fetcher.js (via modules-index.json) + 'WebXAIAliasModule' → module-aiasm.js (via modules-index.json) + 'SecretVault' → secret-vault.js (via modules-index.json) + 'ChatStudioModule' → module-chatstudio.js (via modules-index.json) + 'AgentRegistryModule' → module-agent-registry.js (via modules-index.json) + 'LeaseModule' → module-leases.js (via modules-index.json) + 'OrchestratorModule' → module-orchestrator.js (via modules-index.json) + 'NeuralVFSModule' → module-neural-vfs.js (via modules-index.json) + 'SandboxModule' → module-sandbox.js (via modules-index.json) + 'MemoryGraphModule' → module-memory-graph.js (via modules-index.json) + 'PredictorModule' → module-predictor.js (via modules-index.json) + 'WorldModelModule' → module-world-model.js (via modules-index.json) + 'ServerMonitorModule' → module-servermon.js (via modules-index.json) + 'SimpleGUIModule' → module-simplegui.js (via modules-index.json) + help.html: all v4.4 commands ✓ + cheatsheet.html: all v4.4 commands ✓ + Pass: 23 + Orphaned: vis-network.min.js + modules/core/module-loader.js: no class def + modules/core/sandbox-worker.js: no class def + 'ai' in multiple: modules/core/module-aiassist.js, modules/core/module-ollama.js + 'ask' in multiple: modules/core/module-aiassist.js, modules/core/module-ollama.js + 'config-export' in multiple: modules/core/module-config.js, modules/core/terminal.js + 'config-reset' in multiple: modules/core/module-config.js, modules/core/terminal.js + 'echo' in multiple: modules/core/module-fs.js, modules/core/module-system.js + 'find' in multiple: modules/core/module-fs.js, modules/ext/finder.js + 'preview' in multiple: modules/core/module-system.js, modules/ext/filemgr.js + Warnings: 10 + Fails: 0
\ No newline at end of file diff --git a/audit_2026-06-09_010008.md b/audit_2026-06-09_010008.md new file mode 100644 index 0000000..3434a64 --- /dev/null +++ b/audit_2026-06-09_010008.md @@ -0,0 +1,74 @@ +# newOS4 Audit — 2026-06-09_010008 +Target: /var/www/webx11.duckdns.org/spaces/newos4 + + +═══ 1. FILE INVENTORY ═══ + Total files: 147, JS: 56, HTML: 19, MD: 26, JSON: 27 + Total size: 15119 KB, Module files: 51, Backups: 0 + +═══ 2. MODULES INDEX INTEGRITY ═══ + core: 25 index entries + deprecated: 1 index entries + ext: 18 index entries + infrastructure: 6 index entries + Core files on disk: 27, Ext files on disk: 18 + +═══ 3. COMMAND REGISTRY ═══ + _safeRegister calls: 21 + Unique commands in terminal.js: 2 + +═══ 4. BUILTIN MODULES (module-loader.js) ═══ + BUILTIN entries: 25 + +═══ 5. DEAD/ORPHAN FILES ═══ + +═══ 6. HELP DOCS vs ACTUAL COMMANDS ═══ + +═══ 7. CONFIG FILE INTEGRITY ═══ + packages.json: version=1.1.0, cache-bust=N/A + modules/core/module-loader.js: version=v4.5.25, cache-bust=N/A + +═══ 8. MODULE FILE HEALTH ═══ + +═══ 9. DUPLICATE/OVERLAP CHECK ═══ + Total unique commands: 272 + +═══ 10. STALE AI-GENERATED DOCUMENTATION ═══ + +═══ AUDIT SUMMARY ═══ + 'SystemModule' → module-system.js (via modules-index.json) + 'FileSystemModule' → module-fs.js (via modules-index.json) + 'ModuleManagerModule' → module-modmgr.js (via modules-index.json) + 'OllamaModule' → module-ollama.js (via modules-index.json) + 'SearXNGModule' → module-searxng.js (via modules-index.json) + 'ConfigManagerModule' → module-config.js (via modules-index.json) + 'WebX11AIAssistantModule' → module-aiassist.js (via modules-index.json) + 'WebFetcherModule' → module-fetcher.js (via modules-index.json) + 'WebXAIAliasModule' → module-aiasm.js (via modules-index.json) + 'SecretVault' → secret-vault.js (via modules-index.json) + 'ChatStudioModule' → module-chatstudio.js (via modules-index.json) + 'AgentRegistryModule' → module-agent-registry.js (via modules-index.json) + 'LeaseModule' → module-leases.js (via modules-index.json) + 'OrchestratorModule' → module-orchestrator.js (via modules-index.json) + 'NeuralVFSModule' → module-neural-vfs.js (via modules-index.json) + 'SandboxModule' → module-sandbox.js (via modules-index.json) + 'MemoryGraphModule' → module-memory-graph.js (via modules-index.json) + 'PredictorModule' → module-predictor.js (via modules-index.json) + 'WorldModelModule' → module-world-model.js (via modules-index.json) + 'ServerMonitorModule' → module-servermon.js (via modules-index.json) + 'SimpleGUIModule' → module-simplegui.js (via modules-index.json) + help.html: all v4.4 commands ✓ + cheatsheet.html: all v4.4 commands ✓ + Pass: 23 + Orphaned: audit_2026-06-09_005950.md + modules/core/module-loader.js: no class def + modules/core/sandbox-worker.js: no class def + 'ai' in multiple: modules/core/module-aiassist.js, modules/core/module-ollama.js + 'ask' in multiple: modules/core/module-aiassist.js, modules/core/module-ollama.js + 'config-export' in multiple: modules/core/module-config.js, modules/core/terminal.js + 'config-reset' in multiple: modules/core/module-config.js, modules/core/terminal.js + 'echo' in multiple: modules/core/module-fs.js, modules/core/module-system.js + 'find' in multiple: modules/core/module-fs.js, modules/ext/finder.js + 'preview' in multiple: modules/core/module-system.js, modules/ext/filemgr.js + Warnings: 10 + Fails: 0
\ No newline at end of file diff --git a/cheatsheet.html b/cheatsheet.html index aecb84e..1d91bc4 100644 --- a/cheatsheet.html +++ b/cheatsheet.html @@ -100,6 +100,17 @@ pre{background:var(--bg2);border:1px solid var(--border);border-radius:var(--rad <h2>🔧 Tools</h2> <div class="grid"> +<div class="item"><span class="cmd">tar <src> <out.tar></span><span class="desc">Bundle VFS dir to tarball (add .gz for gzip)</span></div> +<div class="item"><span class="cmd">untar <in.tar[.gz]> [dest]</span><span class="desc">Extract tarball to VFS (auto-detects gzip)</span></div> +<div class="item"><span class="cmd">wget <url> [filename]</span><span class="desc">Download a URL and save to VFS</span></div> +<div class="item"><span class="cmd">gzip <path></span><span class="desc">Compress a VFS file to .gz</span></div> +<div class="item"><span class="cmd">gunzip <path.gz></span><span class="desc">Decompress .gz file (binary-safe)</span></div> +<div class="item"><span class="cmd">encrypt <path> <pass></span><span class="desc">AES-256-GCM encrypt a file</span></div> +<div class="item"><span class="cmd">decrypt <path.enc> <pass></span><span class="desc">Decrypt a .enc file</span></div> +<div class="item"><span class="cmd">diff <a> <b></span><span class="desc">Unified diff between two files</span></div> +<div class="item"><span class="cmd">edit <path></span><span class="desc">Open file in inline modal editor</span></div> +<div class="item"><span class="cmd">cryptogzip</span><span class="desc">See gzip/encrypt/tar commands</span></div> +</div> <div class="item"><span class="cmd">calc <expr></span><span class="desc">Calculator</span></div> <div class="item"><span class="cmd">cron-every <s> <cmd></span><span class="desc">Schedule repeating</span></div> <div class="item"><span class="cmd">cron-list / cron-stop</span><span class="desc">Manage jobs</span></div> @@ -219,6 +230,8 @@ pre{background:var(--bg2);border:1px solid var(--border);border-radius:var(--rad <div class="item"><span class="cmd">a2a-list</span><span class="desc">A2A message status</span></div> <div class="item"><span class="cmd">contract-list</span><span class="desc">List A2A contracts</span></div> <div class="item"><span class="cmd">contract-register</span><span class="desc">Register A2A contract</span></div> +<div class="item"><span class="cmd">sandbox-config <k> <v></span><span class="desc">Tune sandbox (max-workers, min-workers, pool-timeout)</span></div> +<div class="item"><span class="cmd">memgraph-export</span><span class="desc">Export graph as JSON</span></div> </div> <h2>📊 Monitor</h2> @@ -227,6 +240,8 @@ pre{background:var(--bg2);border:1px solid var(--border);border-radius:var(--rad <div class="item"><span class="cmd">servers</span><span class="desc">List monitored servers</span></div> <div class="item"><span class="cmd">server-check</span><span class="desc">Check server status</span></div> <div class="item"><span class="cmd">monitor</span><span class="desc">Toggle auto-monitoring</span></div> +<div class="item"><span class="cmd">predictor-config <k> <v></span><span class="desc">Tune predictor (confidence-threshold, min-data-points)</span></div> +<div class="item"><span class="cmd">world-model-config <k> <v></span><span class="desc">Tune world model (refresh-interval, max-projects)</span></div> </div> <h2>🔒 Security / Vault</h2> diff --git a/downloads/architecture_map.html b/downloads/architecture_map.html new file mode 100644 index 0000000..3286eea --- /dev/null +++ b/downloads/architecture_map.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="UTF-8"> + <title>WebX11 newOS4 System Architecture</title> + <script src="mermaid.min.js"></script> + <script>mermaid.initialize({startOnLoad:true, theme: 'dark'});</script> + <style> + body { background-color: #1a1a1a; color: #e0e0e0; font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } + .container { width: 90%; height: 90%; } + </style> +</head> +<body> + <div class="container"> + <div class="mermaid"> + mindmap + root((WebX11 newOS4)) + VFS + Neural-VFS + Filesystem + Indexing + Modules + Core Modules + WPM Extensions + Module Editor + AI Engine + Smart-Context + Memory-Graph + World-Model + Tooling + Agents + Sandbox + Vault + WebDAV + </div> + </div> +</body> +</html>
\ No newline at end of file diff --git a/downloads/mindmap.html b/downloads/mindmap.html new file mode 100644 index 0000000..1ec96db --- /dev/null +++ b/downloads/mindmap.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>newOS4 v4.5.22 — Architecture Mindmap</title> + <script src="mermaid.min.js?v=11"></script> + <style> + * { margin: 0; padding: 0; box-sizing: border-box; } + body { + background-color: #0a0a14; + color: #e0e0e0; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + margin: 0; + display: flex; + flex-direction: column; + align-items: center; + min-height: 100vh; + overflow: auto; + padding: 20px; + } + .header { + text-align: center; + padding: 20px; + border-bottom: 2px solid #00ff88; + width: 100%; + max-width: 1200px; + margin-bottom: 30px; + } + .header h1 { color: #00ff88; font-size: 1.8em; } + .header p { color: #888; margin-top: 8px; font-size: 0.9em; } + .header .stats { color: #666; font-size: 0.8em; margin-top: 4px; } + .mermaid { + background: #0a0a14; + padding: 30px; + border-radius: 15px; + box-shadow: 0 0 30px rgba(0, 255, 136, 0.1); + max-width: 100%; + overflow: auto; + } + .legend { + display: flex; + gap: 20px; + flex-wrap: wrap; + justify-content: center; + margin: 20px 0 30px; + padding: 15px 25px; + background: #12121e; + border-radius: 10px; + border: 1px solid #1e1e30; + } + .legend-item { + display: flex; + align-items: center; + gap: 8px; + font-size: 0.85em; + color: #aaa; + } + .legend-dot { + width: 12px; + height: 12px; + border-radius: 50%; + } + .footer { + margin-top: 40px; + color: #444; + font-size: 0.75em; + text-align: center; + border-top: 1px solid #1a1a2e; + padding-top: 20px; + width: 100%; + } + .footer a { color: #00ff88; text-decoration: none; } + .tab-bar { + display: flex; + gap: 4px; + margin-bottom: 20px; + background: #12121e; + border-radius: 10px; + padding: 4px; + border: 1px solid #1e1e30; + } + .tab-btn { + padding: 8px 20px; + background: transparent; + color: #888; + border: none; + border-radius: 8px; + cursor: pointer; + font-size: 0.9em; + transition: all 0.2s; + } + .tab-btn:hover { color: #e0e0e0; background: #1e1e30; } + .tab-btn.active { color: #00ff88; background: #00ff8818; } + .tab-content { display: none; } + .tab-content.active { display: block; } + </style> +</head> +<body> + <div class="header"> + <h1>🧠 newOS4 v4.5.22</h1> + <p>Full architecture mindmap — 62 nodes across 5 layers</p> + <div class="stats">39 modules · 266 commands · 7 core services · 18 ext modules</div> + </div> + + <div class="legend"> + <div class="legend-item"><span class="legend-dot" style="background:#818cf8"></span> Terminal Core</div> + <div class="legend-item"><span class="legend-dot" style="background:#22d3ee"></span> Core Modules</div> + <div class="legend-item"><span class="legend-dot" style="background:#34d399"></span> Ext Modules</div> + <div class="legend-item"><span class="legend-dot" style="background:#fbbf24"></span> Data Layer</div> + <div class="legend-item"><span class="legend-dot" style="background:#e879f9"></span> AI Integration</div> + </div> + + <div class="tab-bar"> + <button class="tab-btn active" onclick="switchTab('mermaid')">📊 Mermaid</button> + <button class="tab-btn" onclick="switchTab('mindmap')">🌳 Console</button> + </div> + + <div id="tab-mermaid" class="tab-content active"> + <pre class="mermaid"> +mindmap + root(("newOS4 v4.5.22 — WebX11 Module System")) + Terminal Core + WebX11Terminal - input/output/autocomplete + WebX11SecurityManager - 4-level security + VirtualFileSystem - localStorage-backed in-memory FS + ModuleManager - register/load/discover modules + OllamaManager - AI provider bridge + ConfigRegistry - unified config command + SecretVault - encrypted secrets + Core Modules + SystemModule - help, mem, status, checkpoint + FileSystemModule - ls, cat, rm, mv, cp, trash + ModuleManagerModule - modules, loadmod + ConfigManagerModule - config-set, list, export + OllamaModule - ollama, models, pull, run + WebFetcherModule - fetch, web, extract + WebXAIAliasModule - webxai, wx, webx + SearXNGModule - search, s, images, videos + ChatStudioModule - chat + AgentRegistryModule - agent-list, contract-register + LeaseModule - lease-create, revoke, list + OrchestratorModule - a2a, consensus, pipeline + NeuralVFSModule - nvfs-index, resolve, alias + SandboxModule - sandbox-run, status + MemoryGraphModule - memgraph-search, stats + PredictorModule - predict, status + WorldModelModule - world-model, ask, refresh + ServerMonitorModule - server, servers, system-health + SimpleGUIModule - gui, gui-button, run + Ext Modules + WebDAVModule - webdav-ls, push, pull, backup + SkillPackCoreModule - skill-list, view, create + FloatingModule - floating-add, remove, pos, toggle + EditorModule - edit + DiffModule - diff + AliasModule - alias, unalias, ll, h, cls + ShellModule - sh, export, script, set + FinderModule - find + CryptoGzipModule - gzip, gunzip, encrypt + BusyBoxModule - which, env, date, cal, base64 + CalcModule - calc + VoiceModule - voice + CronModule - cron-every, list, stop + ThemeModule - theme + WpmModule - wpm + MindmapModule - mindmap (this tool) + TutorialModule - tutorial + FileManagerModule - files, preview + Data Layer + VirtualFileSystem (in-memory tree + localStorage) + SecretVault (encrypted credential storage) + Neural VFS (semantic indexing + fuzzy search) + Memory Graph (entity-relation knowledge graph) + World Model (runtime state synthesis) + Config Registry (unified config API) + Session System (save/load/export state) + AI Integration + WebX11AIAssistantModule (agent loop + tool calling) + OllamaManager (model switching, context) + Guardrail Layer (policy, shadow mode, violations) + Agent Registry (A2A protocol, orchestration) + Predictor (usage prediction, smart suggestions) + </pre> + </div> + + <div id="tab-mindmap" class="tab-content"> + <div style="background:#0a0a14;border-radius:15px;padding:20px;border:1px solid #1e1e30;font-family:monospace;font-size:0.85em;line-height:1.6;max-width:800px"> +<pre style="color:#e0e0e0"> +<span style="color:#e0e0e0">ROOT: newOS4 v4.5.22 — WebX11 Module System</span> +<span style="color:#818cf8"> Terminal Core (7 components)</span> +<span style="color:#818cf8"> └ WebX11Terminal — input/output/autocomplete</span> +<span style="color:#818cf8"> └ WebX11SecurityManager — 4-level security</span> +<span style="color:#818cf8"> └ VirtualFileSystem — localStorage-backed in-memory FS</span> +<span style="color:#818cf8"> └ ModuleManager — register/load/discover modules</span> +<span style="color:#818cf8"> └ OllamaManager — AI provider bridge</span> +<span style="color:#818cf8"> └ ConfigRegistry — unified config command</span> +<span style="color:#818cf8"> └ SecretVault — encrypted secrets</span> +<span style="color:#22d3ee"> Core Modules (19 modules)</span> +<span style="color:#22d3ee"> └ SystemModule — help, mem, status, checkpoint</span> +<span style="color:#22d3ee"> └ FileSystemModule — ls, cat, rm, mv, cp, trash</span> +<span style="color:#22d3ee"> └ ModuleManagerModule — modules, loadmod</span> +<span style="color:#22d3ee"> └ ConfigManagerModule — config-set, list, export</span> +<span style="color:#22d3ee"> └ OllamaModule — ollama, models, pull, run</span> +<span style="color:#22d3ee"> └ WebFetcherModule — fetch, web, extract</span> +<span style="color:#22d3ee"> └ WebXAIAliasModule — webxai, wx, webx</span> +<span style="color:#22d3ee"> └ SearXNGModule — search, s, images, videos</span> +<span style="color:#22d3ee"> └ ChatStudioModule — chat</span> +<span style="color:#22d3ee"> └ AgentRegistryModule — agent-list, contract-register</span> +<span style="color:#22d3ee"> └ LeaseModule — lease-create, revoke, list</span> +<span style="color:#22d3ee"> └ OrchestratorModule — a2a, consensus, pipeline</span> +<span style="color:#22d3ee"> └ NeuralVFSModule — nvfs-index, resolve, alias</span> +<span style="color:#22d3ee"> └ SandboxModule — sandbox-run, status</span> +<span style="color:#22d3ee"> └ MemoryGraphModule — memgraph-search, stats</span> +<span style="color:#22d3ee"> └ PredictorModule — predict, status</span> +<span style="color:#22d3ee"> └ WorldModelModule — world-model, ask, refresh</span> +<span style="color:#22d3ee"> └ ServerMonitorModule — server, servers, system-health</span> +<span style="color:#22d3ee"> └ SimpleGUIModule — gui, gui-button, run</span> +<span style="color:#34d399"> Ext Modules (18 modules)</span> +<span style="color:#34d399"> └ WebDAVModule — webdav-ls, push, pull, backup</span> +<span style="color:#34d399"> └ SkillPackCoreModule — skill-list, view, create</span> +<span style="color:#34d399"> └ FloatingModule — floating-add, remove, pos, toggle</span> +<span style="color:#34d399"> └ EditorModule — edit</span> +<span style="color:#34d399"> └ DiffModule — diff</span> +<span style="color:#34d399"> └ AliasModule — alias, unalias, ll, h, cls</span> +<span style="color:#34d399"> └ ShellModule — sh, export, script, set</span> +<span style="color:#34d399"> └ FinderModule — find</span> +<span style="color:#34d399"> └ CryptoGzipModule — gzip, gunzip, encrypt</span> +<span style="color:#34d399"> └ BusyBoxModule — which, env, date, cal, base64</span> +<span style="color:#34d399"> └ CalcModule — calc</span> +<span style="color:#34d399"> └ VoiceModule — voice</span> +<span style="color:#34d399"> └ CronModule — cron-every, list, stop</span> +<span style="color:#34d399"> └ ThemeModule — theme</span> +<span style="color:#34d399"> └ WpmModule — wpm</span> +<span style="color:#34d399"> └ MindmapModule — mindmap (this tool)</span> +<span style="color:#34d399"> └ TutorialModule — tutorial</span> +<span style="color:#34d399"> └ FileManagerModule — files, preview</span> +<span style="color:#fbbf24"> Data Layer (7 components)</span> +<span style="color:#fbbf24"> └ VirtualFileSystem (in-memory tree + localStorage)</span> +<span style="color:#fbbf24"> └ SecretVault (encrypted credential storage)</span> +<span style="color:#fbbf24"> └ Neural VFS (semantic indexing + fuzzy search)</span> +<span style="color:#fbbf24"> └ Memory Graph (entity-relation knowledge graph)</span> +<span style="color:#fbbf24"> └ World Model (runtime state synthesis)</span> +<span style="color:#fbbf24"> └ Config Registry (unified config API)</span> +<span style="color:#fbbf24"> └ Session System (save/load/export state)</span> +<span style="color:#e879f9"> AI Integration (5 modules)</span> +<span style="color:#e879f9"> └ WebX11AIAssistantModule (agent loop + tool calling)</span> +<span style="color:#e879f9"> └ OllamaManager (model switching, context)</span> +<span style="color:#e879f9"> └ Guardrail Layer (policy, shadow mode, violations)</span> +<span style="color:#e879f9"> └ Agent Registry (A2A protocol, orchestration)</span> +<span style="color:#e879f9"> └ Predictor (usage prediction, smart suggestions)</span> +</pre> + </div> + </div> + + <div class="footer"> + <p>newOS4 · WebX11 Module System · <a href="/spaces/newos4/">main.html</a></p> + <p>Generated from live 266-command module scan · Agando · 2026-06-05</p> + </div> + + <script> + function switchTab(name) { + document.querySelectorAll('.tab-content').forEach(t => t.classList.remove('active')); + document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active')); + document.getElementById('tab-' + name).classList.add('active'); + document.querySelector('.tab-btn[onclick*="' + name + '"]').classList.add('active'); + } + window.addEventListener('load', function() { + if (typeof mermaid !== 'undefined') { + try { mermaid.initialize({ startOnLoad: true, theme: 'base', themeVariables: { background: '#0a0a14', primaryColor: '#00ff88', primaryBorderColor: '#00ff88', primaryTextColor: '#e0e0e0', lineColor: '#2a2a4a', secondaryColor: '#12121e', tertiaryColor: '#1a1a2e', fontFamily: 'monospace' } }); } catch(e) {} + } + }); + </script> +</body> +</html>
\ No newline at end of file @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="theme-color" content="#0a0a14"> -<title>WebX11 v4.3 — Help</title> +<title>WebX11 v4.5.24 — Help</title> <style> /* ── Reset & Base ── */ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent} @@ -414,7 +414,7 @@ webx11.inputField // DOM input element</code></pre> <!-- ── Overview ── --> <section id="overview"> <h2>⛅ Overview</h2> - <p>WebX11 v4.3 is a browser-based Unix-like terminal — dynamic modules, AI assistant (Ollama), persistent virtual filesystem, web search, voice input, code editor, and a full skill system. Everything runs client-side in your browser.</p> + <p>WebX11 v4.5.24 is a browser-based Unix-like terminal — dynamic modules, AI assistant (Ollama), persistent virtual filesystem, web search, voice input, code editor, and a full skill system. Everything runs client-side in your browser.</p> <div class="feature-grid"> <div class="feature-card"><h4>🧩 18 Core + 14 Ext</h4><p>Modules loaded at startup. Shell with pipes, redirects, vars, and scripts.</p></div> <div class="feature-card"><h4>🤖 Agent with Tools</h4><p>28 tools — file ops, web search, skills, modules. Destructive action confirmations with inline bar + countdown.</p></div> @@ -1432,6 +1432,30 @@ listmods</pre> <h2>📋 Changelog</h2> <div class="version-item"> + <div class="v-header"><span class="v-num">v4.5.24 — June 2026</span><span class="v-date">2026-06-08</span></div> + <ul> + <li><strong>tar / untar commands</strong> — New pure-JS tarball parser in cryptogzip.js. <code>tar <src-dir> <out.tar[.gz]></code> bundles a VFS directory; <code>untar <path.tar[.gz]> [dest-dir]</code> extracts back. Auto-detects gzip wrapper. Fixes the "downloaded newos4.tar.gz but can't extract" problem.</li> + <li><strong>Binary-safe gzip</strong> — <code>gunzip</code> now preserves binary content (was UTF-8 only). Updated to use base64 roundtrip for binary files.</li> + <li><strong>POSIX ustar format</strong> — Reads & writes standard ustar tarballs (compatible with GNU tar, BSD tar, macOS tar).</li> + <li><strong>Cheatsheet updated</strong> — Added 8 entries under 🔧 Tools for tar/untar/gzip/gunzip/encrypt/decrypt/diff/edit</li> + <li><strong>System prompt</strong> — tar/untar added to [ALL OTHERS] command list</li> + </ul> + </div> + + <div class="version-item"> + <div class="v-header"><span class="v-num">v4.5.23 — June 2026</span><span class="v-date">2026-06-08</span></div> + <ul> + <li><strong>Doc version sync</strong> — Help page title, overview, and footer updated to v4.5.22 to match deployed module-loader.js</li> + <li><strong>Whitepaper v4.5.22</strong> — Bumped from v4.3.0-beta; Last Updated 2026-06-08</li> + <li><strong>Deprecated module-modmgr</strong> — Removed from BUILTIN array (was duplicate of module-manager.js). Set auto_load=false, layer=deprecated. File retained for one release for rollback safety; deletion scheduled v4.6.0</li> + <li><strong>Fixed modules-index class</strong> — <code>module-loader</code> class changed from filename string <code>"module-loader.js"</code> to <code>null</code> (foundation file, not a module class)</li> + <li><strong>packages.json cleanup</strong> — Renamed <code>neural-vfs</code> to <code>neural-vfs-core</code>, category → <code>core</code>, added note that NVFS is built-in not a WPM package</li> + <li><strong>Cheatsheet coverage</strong> — Added 4 missing commands: <code>sandbox-config</code>, <code>memgraph-export</code>, <code>predictor-config</code>, <code>world-model-config</code></li> + <li><strong>Audit script fix</strong> — <code>audit-newos4-filesystem.py</code> now respects <code>skills/index.json</code> for orphan detection (no more 26 false-positive warnings on valid skill JSONs)</li> + </ul> + </div> + + <div class="version-item"> <div class="v-header"><span class="v-num">v4.5 — June 2026</span><span class="v-date">2026-06-06</span></div> <ul> <li><strong>Security Config CLI</strong> — <code>security-destructive</code>, <code>security-system</code>, <code>security-whitelist</code>, <code>security-flag</code> add|remove|list with localStorage persistence and boot loading</li> @@ -1610,7 +1634,7 @@ listmods</pre> <a href="./main.html">Launch WebX11</a> <a href="https://ollama.com" target="_blank">Ollama</a> </div> - <p>WebX11 v4.3 · 2026</p> + <p>WebX11 v4.5.22 · 2026</p> <p class="tagline">Happy Hacking 🖥️🤖🎤</p> </footer> @@ -215,12 +215,20 @@ right: 0; background: var(--bg-secondary); border: 1px solid var(--border-color); - border-bottom: none; + border-top: none; max-height: 200px; overflow-y: auto; display: none; z-index: 1001; } + @media (min-height: 700px) { + #autocomplete-dropdown { + bottom: auto; + top: 100%; + border-top: 1px solid var(--border-color); + border-bottom: none; + } + } .autocomplete-item { padding: 8px 12px; cursor: pointer; @@ -1186,7 +1194,7 @@ if (body && !body.children.length) { var mods = [ ['Foundation (always loaded)', ['virtual-fs.js','module-manager.js','ollama-manager.js','terminal.js'], true], - ['Built-in modules', ['module-system.js','module-fs.js','module-modmgr.js','module-ollama.js','module-my.js','module-searxng.js','module-servermon.js','module-ollamamodels.js','module-config.js','module-simplegui.js','module-io.js','module-dynamicprompts.js','module-aiassist.js','module-aiasm.js','module-smartctx.js','module-duckduckgo.js','module-fetcher.js','module-skills.js','module-chatstudio.js'], false], + ['Built-in modules', ['module-system.js','module-fs.js','module-ollama.js','module-my.js','module-searxng.js','module-servermon.js','module-ollamamodels.js','module-config.js','module-simplegui.js','module-io.js','module-dynamicprompts.js','module-aiassist.js','module-aiasm.js','module-smartctx.js','module-duckduckgo.js','module-fetcher.js','module-skills.js','module-chatstudio.js'], false], ['Extensions', ['calc.js','voice.js','cron.js','theme.js','wpm.js','mindmap.js','webdav.js','skill-pack-core.js','editor.js','diff.js','alias.js','finder.js','filemgr.js','cryptogzip.js','tutorial.js','shell.js','busybox.js','floating.js'], false] ]; var isSel = function(name) { return true; }; // default: all selected @@ -1224,7 +1232,7 @@ </script> <!-- Async dependency-ordered module loader (replaces 26 synchronous script tags) --> - <script src="modules/core/module-loader.js?v=2026-06-08-v4.5.22"></script> +<script src="modules/core/module-loader.js?v=2026-06-08-v4.5.26"></script> <script> // ═══ ONE TRUE VERSION SOURCE ═══ diff --git a/mindmap.html b/mindmap.html index 7dc0e5a..1ec96db 100644 --- a/mindmap.html +++ b/mindmap.html @@ -3,74 +3,271 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>WebX11 System Mindmap</title> + <title>newOS4 v4.5.22 — Architecture Mindmap</title> <script src="mermaid.min.js?v=11"></script> <style> + * { margin: 0; padding: 0; box-sizing: border-box; } body { - background-color: #000; - color: #00ffcc; + background-color: #0a0a14; + color: #e0e0e0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; display: flex; flex-direction: column; align-items: center; - justify-content: center; min-height: 100vh; overflow: auto; + padding: 20px; } .header { text-align: center; padding: 20px; - border-bottom: 2px solid #00ffcc; + border-bottom: 2px solid #00ff88; width: 100%; - margin-bottom: 40px; + max-width: 1200px; + margin-bottom: 30px; } + .header h1 { color: #00ff88; font-size: 1.8em; } + .header p { color: #888; margin-top: 8px; font-size: 0.9em; } + .header .stats { color: #666; font-size: 0.8em; margin-top: 4px; } .mermaid { - background: #000; - padding: 20px; + background: #0a0a14; + padding: 30px; border-radius: 15px; - box-shadow: 0 0 20px rgba(0, 255, 204, 0.2); + box-shadow: 0 0 30px rgba(0, 255, 136, 0.1); + max-width: 100%; + overflow: auto; + } + .legend { + display: flex; + gap: 20px; + flex-wrap: wrap; + justify-content: center; + margin: 20px 0 30px; + padding: 15px 25px; + background: #12121e; + border-radius: 10px; + border: 1px solid #1e1e30; } + .legend-item { + display: flex; + align-items: center; + gap: 8px; + font-size: 0.85em; + color: #aaa; + } + .legend-dot { + width: 12px; + height: 12px; + border-radius: 50%; + } + .footer { + margin-top: 40px; + color: #444; + font-size: 0.75em; + text-align: center; + border-top: 1px solid #1a1a2e; + padding-top: 20px; + width: 100%; + } + .footer a { color: #00ff88; text-decoration: none; } + .tab-bar { + display: flex; + gap: 4px; + margin-bottom: 20px; + background: #12121e; + border-radius: 10px; + padding: 4px; + border: 1px solid #1e1e30; + } + .tab-btn { + padding: 8px 20px; + background: transparent; + color: #888; + border: none; + border-radius: 8px; + cursor: pointer; + font-size: 0.9em; + transition: all 0.2s; + } + .tab-btn:hover { color: #e0e0e0; background: #1e1e30; } + .tab-btn.active { color: #00ff88; background: #00ff8818; } + .tab-content { display: none; } + .tab-content.active { display: block; } </style> </head> <body> <div class="header"> - <h1>WebX11 System Mindmap</h1> - <p>Visual architecture of the current session</p> + <h1>🧠 newOS4 v4.5.22</h1> + <p>Full architecture mindmap — 62 nodes across 5 layers</p> + <div class="stats">39 modules · 266 commands · 7 core services · 18 ext modules</div> + </div> + + <div class="legend"> + <div class="legend-item"><span class="legend-dot" style="background:#818cf8"></span> Terminal Core</div> + <div class="legend-item"><span class="legend-dot" style="background:#22d3ee"></span> Core Modules</div> + <div class="legend-item"><span class="legend-dot" style="background:#34d399"></span> Ext Modules</div> + <div class="legend-item"><span class="legend-dot" style="background:#fbbf24"></span> Data Layer</div> + <div class="legend-item"><span class="legend-dot" style="background:#e879f9"></span> AI Integration</div> + </div> + + <div class="tab-bar"> + <button class="tab-btn active" onclick="switchTab('mermaid')">📊 Mermaid</button> + <button class="tab-btn" onclick="switchTab('mindmap')">🌳 Console</button> </div> - <pre class="mermaid">mindmap - root((WebX11)) - AI Engine - Model("gemma4:31b-cloud") - Memory("9.5MB") - Context("Session-based") - VFS (Virtual File System) - Storage("skills, agents, logs, memory, .semantic_index") - Files("system_review.html, mindmap.html") - Capabilities - Modules("Core Layer, Extension Layer") - Tools("Filesystem, System, Web Search, WPM Packages") - Management - Skills("Procedural") - Sessions("Historical") - User Profile("Persistent")</pre> + + <div id="tab-mermaid" class="tab-content active"> + <pre class="mermaid"> +mindmap + root(("newOS4 v4.5.22 — WebX11 Module System")) + Terminal Core + WebX11Terminal - input/output/autocomplete + WebX11SecurityManager - 4-level security + VirtualFileSystem - localStorage-backed in-memory FS + ModuleManager - register/load/discover modules + OllamaManager - AI provider bridge + ConfigRegistry - unified config command + SecretVault - encrypted secrets + Core Modules + SystemModule - help, mem, status, checkpoint + FileSystemModule - ls, cat, rm, mv, cp, trash + ModuleManagerModule - modules, loadmod + ConfigManagerModule - config-set, list, export + OllamaModule - ollama, models, pull, run + WebFetcherModule - fetch, web, extract + WebXAIAliasModule - webxai, wx, webx + SearXNGModule - search, s, images, videos + ChatStudioModule - chat + AgentRegistryModule - agent-list, contract-register + LeaseModule - lease-create, revoke, list + OrchestratorModule - a2a, consensus, pipeline + NeuralVFSModule - nvfs-index, resolve, alias + SandboxModule - sandbox-run, status + MemoryGraphModule - memgraph-search, stats + PredictorModule - predict, status + WorldModelModule - world-model, ask, refresh + ServerMonitorModule - server, servers, system-health + SimpleGUIModule - gui, gui-button, run + Ext Modules + WebDAVModule - webdav-ls, push, pull, backup + SkillPackCoreModule - skill-list, view, create + FloatingModule - floating-add, remove, pos, toggle + EditorModule - edit + DiffModule - diff + AliasModule - alias, unalias, ll, h, cls + ShellModule - sh, export, script, set + FinderModule - find + CryptoGzipModule - gzip, gunzip, encrypt + BusyBoxModule - which, env, date, cal, base64 + CalcModule - calc + VoiceModule - voice + CronModule - cron-every, list, stop + ThemeModule - theme + WpmModule - wpm + MindmapModule - mindmap (this tool) + TutorialModule - tutorial + FileManagerModule - files, preview + Data Layer + VirtualFileSystem (in-memory tree + localStorage) + SecretVault (encrypted credential storage) + Neural VFS (semantic indexing + fuzzy search) + Memory Graph (entity-relation knowledge graph) + World Model (runtime state synthesis) + Config Registry (unified config API) + Session System (save/load/export state) + AI Integration + WebX11AIAssistantModule (agent loop + tool calling) + OllamaManager (model switching, context) + Guardrail Layer (policy, shadow mode, violations) + Agent Registry (A2A protocol, orchestration) + Predictor (usage prediction, smart suggestions) + </pre> + </div> + + <div id="tab-mindmap" class="tab-content"> + <div style="background:#0a0a14;border-radius:15px;padding:20px;border:1px solid #1e1e30;font-family:monospace;font-size:0.85em;line-height:1.6;max-width:800px"> +<pre style="color:#e0e0e0"> +<span style="color:#e0e0e0">ROOT: newOS4 v4.5.22 — WebX11 Module System</span> +<span style="color:#818cf8"> Terminal Core (7 components)</span> +<span style="color:#818cf8"> └ WebX11Terminal — input/output/autocomplete</span> +<span style="color:#818cf8"> └ WebX11SecurityManager — 4-level security</span> +<span style="color:#818cf8"> └ VirtualFileSystem — localStorage-backed in-memory FS</span> +<span style="color:#818cf8"> └ ModuleManager — register/load/discover modules</span> +<span style="color:#818cf8"> └ OllamaManager — AI provider bridge</span> +<span style="color:#818cf8"> └ ConfigRegistry — unified config command</span> +<span style="color:#818cf8"> └ SecretVault — encrypted secrets</span> +<span style="color:#22d3ee"> Core Modules (19 modules)</span> +<span style="color:#22d3ee"> └ SystemModule — help, mem, status, checkpoint</span> +<span style="color:#22d3ee"> └ FileSystemModule — ls, cat, rm, mv, cp, trash</span> +<span style="color:#22d3ee"> └ ModuleManagerModule — modules, loadmod</span> +<span style="color:#22d3ee"> └ ConfigManagerModule — config-set, list, export</span> +<span style="color:#22d3ee"> └ OllamaModule — ollama, models, pull, run</span> +<span style="color:#22d3ee"> └ WebFetcherModule — fetch, web, extract</span> +<span style="color:#22d3ee"> └ WebXAIAliasModule — webxai, wx, webx</span> +<span style="color:#22d3ee"> └ SearXNGModule — search, s, images, videos</span> +<span style="color:#22d3ee"> └ ChatStudioModule — chat</span> +<span style="color:#22d3ee"> └ AgentRegistryModule — agent-list, contract-register</span> +<span style="color:#22d3ee"> └ LeaseModule — lease-create, revoke, list</span> +<span style="color:#22d3ee"> └ OrchestratorModule — a2a, consensus, pipeline</span> +<span style="color:#22d3ee"> └ NeuralVFSModule — nvfs-index, resolve, alias</span> +<span style="color:#22d3ee"> └ SandboxModule — sandbox-run, status</span> +<span style="color:#22d3ee"> └ MemoryGraphModule — memgraph-search, stats</span> +<span style="color:#22d3ee"> └ PredictorModule — predict, status</span> +<span style="color:#22d3ee"> └ WorldModelModule — world-model, ask, refresh</span> +<span style="color:#22d3ee"> └ ServerMonitorModule — server, servers, system-health</span> +<span style="color:#22d3ee"> └ SimpleGUIModule — gui, gui-button, run</span> +<span style="color:#34d399"> Ext Modules (18 modules)</span> +<span style="color:#34d399"> └ WebDAVModule — webdav-ls, push, pull, backup</span> +<span style="color:#34d399"> └ SkillPackCoreModule — skill-list, view, create</span> +<span style="color:#34d399"> └ FloatingModule — floating-add, remove, pos, toggle</span> +<span style="color:#34d399"> └ EditorModule — edit</span> +<span style="color:#34d399"> └ DiffModule — diff</span> +<span style="color:#34d399"> └ AliasModule — alias, unalias, ll, h, cls</span> +<span style="color:#34d399"> └ ShellModule — sh, export, script, set</span> +<span style="color:#34d399"> └ FinderModule — find</span> +<span style="color:#34d399"> └ CryptoGzipModule — gzip, gunzip, encrypt</span> +<span style="color:#34d399"> └ BusyBoxModule — which, env, date, cal, base64</span> +<span style="color:#34d399"> └ CalcModule — calc</span> +<span style="color:#34d399"> └ VoiceModule — voice</span> +<span style="color:#34d399"> └ CronModule — cron-every, list, stop</span> +<span style="color:#34d399"> └ ThemeModule — theme</span> +<span style="color:#34d399"> └ WpmModule — wpm</span> +<span style="color:#34d399"> └ MindmapModule — mindmap (this tool)</span> +<span style="color:#34d399"> └ TutorialModule — tutorial</span> +<span style="color:#34d399"> └ FileManagerModule — files, preview</span> +<span style="color:#fbbf24"> Data Layer (7 components)</span> +<span style="color:#fbbf24"> └ VirtualFileSystem (in-memory tree + localStorage)</span> +<span style="color:#fbbf24"> └ SecretVault (encrypted credential storage)</span> +<span style="color:#fbbf24"> └ Neural VFS (semantic indexing + fuzzy search)</span> +<span style="color:#fbbf24"> └ Memory Graph (entity-relation knowledge graph)</span> +<span style="color:#fbbf24"> └ World Model (runtime state synthesis)</span> +<span style="color:#fbbf24"> └ Config Registry (unified config API)</span> +<span style="color:#fbbf24"> └ Session System (save/load/export state)</span> +<span style="color:#e879f9"> AI Integration (5 modules)</span> +<span style="color:#e879f9"> └ WebX11AIAssistantModule (agent loop + tool calling)</span> +<span style="color:#e879f9"> └ OllamaManager (model switching, context)</span> +<span style="color:#e879f9"> └ Guardrail Layer (policy, shadow mode, violations)</span> +<span style="color:#e879f9"> └ Agent Registry (A2A protocol, orchestration)</span> +<span style="color:#e879f9"> └ Predictor (usage prediction, smart suggestions)</span> +</pre> + </div> + </div> + + <div class="footer"> + <p>newOS4 · WebX11 Module System · <a href="/spaces/newos4/">main.html</a></p> + <p>Generated from live 266-command module scan · Agando · 2026-06-05</p> + </div> + <script> - mermaid.initialize({ - startOnLoad: false, - theme: 'dark', - themeVariables: { - primaryColor: '#00ffcc', - lineColor: '#00ffcc', - textColor: '#fff', - mainBkg: '#1a1a1a', - nodeBorder: '#00ffcc' - } - }); - document.addEventListener('DOMContentLoaded', function() { - try { - mermaid.init(undefined, '.mermaid'); - } catch(e) { - document.querySelector('.mermaid').innerHTML = '<p style="color:red">Mindmap render error: ' + e.message + '</p>'; + function switchTab(name) { + document.querySelectorAll('.tab-content').forEach(t => t.classList.remove('active')); + document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active')); + document.getElementById('tab-' + name).classList.add('active'); + document.querySelector('.tab-btn[onclick*="' + name + '"]').classList.add('active'); + } + window.addEventListener('load', function() { + if (typeof mermaid !== 'undefined') { + try { mermaid.initialize({ startOnLoad: true, theme: 'base', themeVariables: { background: '#0a0a14', primaryColor: '#00ff88', primaryBorderColor: '#00ff88', primaryTextColor: '#e0e0e0', lineColor: '#2a2a4a', secondaryColor: '#12121e', tertiaryColor: '#1a1a2e', fontFamily: 'monospace' } }); } catch(e) {} } }); </script> diff --git a/modules-index.json b/modules-index.json index 3b9f8cf..58e9b16 100644 --- a/modules-index.json +++ b/modules-index.json @@ -1,6 +1,6 @@ { - "version": "2026-06-05-v4.4.0", - "generated": "2026-06-05T15:40:00.000Z", + "version": "2026-06-08-v4.5.22", + "generated": "2026-06-08T23:50:00.000Z", "modules": { "module-agent-registry": { "name": "module-agent-registry", @@ -232,13 +232,13 @@ "name": "module-loader", "file": "modules/core/module-loader.js", "type": "core", - "class": "module-loader.js", + "class": null, "auto_load": true, "commands": [], - "description": "Log to terminal if available", + "description": "Async dependency-ordered module loader (foundation, not a module class)", "dependencies": [], "version": "1.0.0", - "updated": "2026-06-03", + "updated": "2026-06-08", "layer": "infrastructure" }, "module-manager": { @@ -267,7 +267,7 @@ "file": "modules/core/module-modmgr.js", "type": "core", "class": "ModuleManagerModule", - "auto_load": true, + "auto_load": false, "commands": [ "modules", "listmods", @@ -277,11 +277,11 @@ "load-local", "loadlocal" ], - "description": "Extracted from newOS4 index.html \u2014 ModuleManagerModule", + "description": "DEPRECATED 2026-06-08: duplicate of module-manager.js. Removed from BUILTIN. File kept for one release for rollback safety — will be deleted in v4.6.0.", "dependencies": [], "version": "1.0.0", - "updated": "2026-06-03", - "layer": "core" + "updated": "2026-06-08", + "layer": "deprecated" }, "module-my": { "name": "module-my", diff --git a/modules/core/module-aiassist.js b/modules/core/module-aiassist.js index 7f99386..ecd4637 100644 --- a/modules/core/module-aiassist.js +++ b/modules/core/module-aiassist.js @@ -60,114 +60,37 @@ } } } catch (e) {} - const CR = String.fromCharCode(10); - const optNote = CR + CR + '== TOOL EXECUTION RULES (STRICT) ==' + CR + 'STRICT RULE 1: NEVER describe what the filesystem looks like from your training data. ALWAYS call list_files() or read_file() first, then report the ACTUAL result.' + CR + 'STRICT RULE 2: If you return text without calling any tool, you have failed. Use tools for every factual question.' + CR + 'STRICT RULE 3: A response like "/bin/, /etc/, /home/" without calling list_files is ILLEGAL. Call the tool.' + CR + 'STRICT RULE 4: When calling a tool, base your answer ENTIRELY on the tool result. If result is empty, say "empty".' + CR + CR; - return `Current date: ${dateStr}\nCurrent time: ${timeStr}\n${nvfsNote}\n\nYou are WebX11AI, the AI assistant embedded in the WebX11 browser terminal. You have direct access to read/write files, search the web, install packages, edit modules, and run terminal commands — all via tool calls. Use tools proactively. Keep responses concise.${optNote}== TOOL REFERENCE == -You have these tools available. Use them WITHOUT asking permission unless the tool description says (DESTRUCTIVE): + return `Current date: ${dateStr} +Current time: ${timeStr}${nvfsNote} -FILESYSTEM: -- list_files(path?) — List files in VFS directory (omit for current dir) -- read_file(path) — Read file content (truncated past 8000 chars) -- write_file(path, content) — Write to file (DESTRUCTIVE — confirm with user first) -- make_directory(path) — Create a directory (DESTRUCTIVE — confirm first) -- delete_file(path) — Delete file (DESTRUCTIVE — confirm first) -- get_current_dir — Show current working directory +You are WebX11AI — embedded in the WebX11 newOS4 terminal. 3-layer system: VFS → Modules → AI. You can edit your own modules via edit_module/test_module/reload_module. -SYSTEM: -- get_status — Show filesystem, modules, Ollama, memory status -- get_help — List all available terminal commands -- run_command(command) — Execute any terminal command and capture output -- font-size <8-32> — Change terminal font size (persists in localStorage) +=== WORKFLOW === +1. Tool → Observe → Answer. Don't re-verify what a tool just told you. +2. find_files("about X") → nvfs_resolve(X) FIRST. NVFS is built-in core, never WPM. +3. load_skills("anti-loop-protocol") BEFORE tool #4 to prevent loops. +4. If editing a module: load_skills("module-editing-workflow") FIRST. +5. run_command may be blocked by security-level/guardrails — read the output. +6. Concise. Bullets. If a tool fails, try another. -SEARCH: -- web_search(query) — Search the web via proxy API (SearXNG + DDG fallback, results with title/url/snippet) -- web_fetch(url) — Fetch and extract readable content from a URL via proxy API (returns title + clean text + word count) - -PACKAGES: -- wpm_install(package) — Install WPM package by name (e.g. "widget", "calc") -- wpm_search(keyword) — Search available WPM packages - -SKILLS (PERSISTENT PROCEDURAL MEMORY): -- list_skills(category?) — Browse available skills, optionally filtered by category -- load_skills(query) — Search skills relevant to current task. Call at START of every task. -- create_skill(name, description, content, tags, category) — Save a new stored procedure. Call after completing complex multi-step tasks (3+ tool calls). -- patch_skill(name, content) — Update an existing skill when the approach changes - -FLOATING UI (PERSISTENT UI ELEMENTS): Use 'run_command' tool with these terminal commands: -- 'floating-add btn <id> <label> <command>' — Create a floating button that runs a terminal command when clicked -- 'floating-add menu <id> <label> <btn1>,<btn2>...' — Create a collapsible floating menu (buttons: label:command pairs) -- 'floating-add panel <id> <title> <content>' — Create a floating text/status panel -- 'floating-remove <id>' — Remove a floating element by ID -- 'floating-toggle <id>' — Show/hide a floating element without deleting -- 'floating-list' — List all floating elements -- 'floating-clear' — Remove all floating elements -- NOTE: These are terminal commands, run via 'run_command'. Use SPACES not hyphens between subcommands. -MODULE SELF-IMPROVEMENT: -- view_module(name) — View source code of any loaded module -- edit_module(name) — Copy module into editor. Opens editor for modifications. -- test_module(name) — Load edited module from /_mods/ for live testing -- reload_module(name) — Discard edits and reload from original URL -- list_modified_modules — List modules with local edits pending -- get_module_status — Full status of all modules (loaded, modified, URLs) - -== SKILLS WORKFLOW == -1. At the START of every task, call load_skills(query) to check if a stored procedure exists -2. Follow the skill's steps. If they're wrong, call patch_skill to fix them. -3. After a complex multi-step task (3+ tool calls), call create_skill to save the approach -4. Skills persist in /skills/ as markdown files with YAML frontmatter - -== MEMORY SYSTEM == -- I maintain a conversation context (this.context) that persists across messages in this session -- The last ${this.maxContext} exchanges are remembered -- Type "ai-clear" to reset conversation memory -- Type "ai-context" to see what I remember -- Type "ai-model" to see/switch models -- Type "ai-stop" to cancel a running AI request -- Smart context profiles (set via "context <name>") adjust my temperature and system prompt style -- Saved prompts (via "prompt", "prompt-save") let you reuse template with {variable} substitution - -== USER PROFILE == -- Use user_get, user_set to read/write persistent user preferences across sessions -- user_set dot-notation supported: user_set knownFacts.name "Alex" -- Profile auto-stores known facts (name, project, preferences) -- Use session_save after complex tasks to log what was done -- Use session_load to review past sessions -- Use session_recent at start of session to remember what was worked on before - -== SELF-IMPROVEMENT WORKFLOW == -1. User asks for module changes → call get_module_status to list modules -2. Call view_module(name) to read the module source -3. Call edit_module(name) to copy source into editor for modification -4. After editing, call test_module(name) to load and test the edit -5. If it works, the user keeps it. If not, call reload_module(name). - -== AUTO-IMPROVEMENT (SYSTEM-DRIVEN) == -- If I encounter the same tool error 3+ times, a workaround skill is created automatically -- After complex tasks (3+ tool calls), I run health checks and suggest improvements -- I track conversation patterns and surface frequent topics -- Every 20 messages, skills are audited for staleness -- Use check_updates to verify module source URLs are reachable - -== RESPONSE STYLE == -- Be concise. Use bullet points for lists. -- When using tools, explain what you're doing briefly. -- If a tool fails, try an alternative approach. -- For web research tasks: search first, then analyze the results, then present findings. -|- When the user says "update" or "improve" without specifics, use get_status + get_help to understand the current state first. - -== REACT PROTOCOL == -For every task, follow this cycle: -1. **REASON** — Think about what you need next. What information is missing? -2. **ACT** — Call ONE tool at a time (unless multiple independent lookups are needed). -3. **OBSERVE** — Study the tool result carefully. Did it succeed? Is the data useful? -4. **DECIDE** — Do you have enough to answer? If not, go back to step 1. - -RULES: -- Call tools in sequence when the second depends on the first result -- Independent lookups (e.g. reading two unrelated files) can run in parallel -- If a tool returns an error, try a different approach before giving up -- After 6 tool turns, start synthesizing a final answer -- Always provide a complete, helpful final answer — don't leave the user hanging`; +=== CAPABILITY MAP === +[FS] list_files, read_file, write_file, make_directory, delete_file, get_current_dir +[NVFS] nvfs_resolve(concept), run_command: nvfs-status, nvfs-index, nvfs-tree. Skills: vfs-content-search, neural-vfs-management. +[MODULES] view_module, edit_module, test_module, reload_module, list_modified_modules, get_module_status. CORE modules (never WPM): NVFS, Floating, Config, Vault, Sandbox, Orchestrator, Memory-Graph, World-Model, Predictor, Neural-VFS. +[WPM] wpm_install, wpm_search, list_available_modules +[SEARCH] web_search, web_fetch +[AGENTS] delegate_task, list_agents, spawn_agent. A2A: a2a-send, a2a-list. Leases: lease-create, lease-list, lease-revoke. +[SANDBOX] run_command: sandbox-status, sandbox-run, sandbox-config +[CONFIG] run_command: config, config-set, ai-config +[SKILLS] load_skills, create_skill, patch_skill, list_skills +[PROFILE/SESSION] user_get/set/list/forget, session_save/load/recent/stats/terminal +[SMART-CTX] smart_context_list, smart_context_set +[MINDS] create_mindmap +[SAFETY] run_command: guardrail, guardrail-add/remove, shadow, shadow-commit, shadow-rollback +[VAULT] run_command: secret-set/get/list/del, secret-setpin, secret-status +[CHECKPOINTS] run_command: checkpoint, checkpoint-list, checkpoint-del, rollback +[WEBDAV] run_command: webdav-config/ls/push/pull/backup/restore +[ALL OTHERS] cron, theme, voice, edit, diff, alias, mindmap, ll, cls, trash, gui, server, modules, ollama, context, world-model, memgraph, model, webxai, predict, predictor-config, memgraph-export, tar, untar, wget`; } getToolDefinitions() { if (!this._toolDefs) this._toolDefs = this._buildToolDefs(); diff --git a/modules/core/module-fs.js b/modules/core/module-fs.js index c2f29c4..309010d 100644 --- a/modules/core/module-fs.js +++ b/modules/core/module-fs.js @@ -1,5 +1,9 @@ class FileSystemModule { - constructor() { this.commands = {}; this.terminal = null; } + constructor() { this.commands = {}; this.commandsMeta = { + 'trash': { argType: 'file' }, 'ls-trash': { argType: 'file' }, + 'upload': { argType: 'dir' }, 'vfs-export': { argType: 'file' }, + 'vfs-import': { argType: 'file' }, 'download': { argType: 'file' }, + }; this.terminal = null; } getHelpInfo() { return { 'ls': 'ls [path] [-la] — List files and directories', diff --git a/modules/core/module-loader.js b/modules/core/module-loader.js index 96fee00..9b8d892 100644 --- a/modules/core/module-loader.js +++ b/modules/core/module-loader.js @@ -13,7 +13,6 @@ const BUILTIN = [ 'module-system.js', 'module-fs.js', - 'module-modmgr.js', 'module-ollama.js', 'module-my.js', 'module-searxng.js', @@ -105,8 +104,8 @@ window.__moduleLoaderReload = reloadWithSelection; -const LATEST_VER = '2026-06-08-v4.5.22'; -const CACHE = '?v=' + LATEST_VER; + const LATEST_VER = '2026-06-08-v4.5.25'; + const CACHE = '?v=' + LATEST_VER; const stored = localStorage.getItem('webx11_cache_ver'); if (stored !== LATEST_VER) { localStorage.setItem('webx11_cache_ver', LATEST_VER); diff --git a/modules/core/module-neural-vfs.js b/modules/core/module-neural-vfs.js index e216656..59618c8 100644 --- a/modules/core/module-neural-vfs.js +++ b/modules/core/module-neural-vfs.js @@ -1,6 +1,11 @@ class NeuralVFSModule { constructor() { this.commands = {}; + this.commandsMeta = { + 'nvfs-index': { argType: 'file' }, 'nvfs-resolve': { argType: 'file' }, + 'nvfs-tree': { argType: 'file' }, 'nvfs-alias': { argType: 'file' }, + 'nvfs-sync': { argType: 'file' }, + }; this.terminal = null; this.index = {}; this.indexPath = '/.semantic_index/map.json'; diff --git a/modules/core/module-system.js b/modules/core/module-system.js index 77525c7..cfb7cc4 100644 --- a/modules/core/module-system.js +++ b/modules/core/module-system.js @@ -277,39 +277,73 @@ } return; } - // Categorize all commands - const cats = { - files: ['ls','ll','cat','put','rm','mv','cp','mkdir','rmdir','cd','pwd','find','grep','head','tail','sort','wc','touch','tree','du','upload','download','vfs-export','vfs-import','edit','diff','trash','trash-dir','ls-trash','empty-trash'], - ai: ['ai','ask','ai-clear','ai-system','ai-context','ai-allow','ai-deny','ai-ignore','ai-stop','ai-model','ai-compress','debug'], - search: ['search','s','ddg','duck','fetch','web','extract'], - tools: ['calc','cron-every','cron-list','cron-stop','cron-clear','wpm','mindmap','theme','voice','alias','unalias', - 'which','env','date','cal','yes','seq','base64','printf','cut','uniq','hostname','whoami','basename','dirname','sleep','expand','tutorial','gzip','gunzip','encrypt','decrypt','files','session-save','session-load','session-list','session-delete','session-export','session-import'], - system: ['help','clear','cls','echo','mem','status','font-size','setfont','smart-prompt','logs','preview','factory-reset','reset-vfs','export','unset','script','sh','set','test','logrotate','health-check','memory-map-export','commands','check','checkpoint','checkpoint-list','rollback','checkpoint-del'], - net: ['server','servers','server-check','server-remove','monitor'], - mods: ['modules','listmods','loadmod','removemod','load-local','loadlocal','startup-modules'], - ollama: ['ollama','ollamaconnect','ollamadisconnect','ollamamodels','ollamasetmodel','ollamasetproxy','models','model-info','model-pull','model-delete','model-run'], - skills: ['skill-list','skill-view','skill-create','skill-patch','skill-delete','skill-export','skill-import','skill-sync','skill-pack-core'], - config: ['config','config-set','config-list','config-delete','config-export','config-reset'], - webx: ['webxai','wx','webx','context','contexts','context-new','context-delete','smart-ask','prompt','prompt-save','prompt-list','prompt-delete','prompt-var','prompt-vars'], - data: ['my','my-set','my-get','my-list','my-export','my-import','my-clear','export-mods','import-mods','backup','restore','share-mod'], - ext: ['chat','chat-setapi','chat-setmodel','chat-ask','webdav-config','webdav-status','webdav-ls','webdav-push','webdav-pull','webdav-backup','webdav-restore','webdav-backup-list','webdav-explorer','webdav-browser'], - gui: ['gui','gui-button','gui-input','gui-text','gui-clear','gui-run'], - vault: ['secret-set','secret-get','secret-list','secret-del','secret-lock','secret-unlock','secret-setpin','secret-status'], - }; - const labels = { - files:'📁 Filesystem', ai:'🤖 AI', search:'🔍 Search & Web', tools:'🔧 Tools', - system:'⚙️ System', net:'📡 Network', mods:'🧩 Modules', ollama:'🦙 Ollama', - skills:'📚 Skills', config:'⚙️ Config', webx:'🌐 WebX', data:'💾 Data', - ext:'🧰 Extras', gui:'🖥️ GUI', vault:'🔒 Vault' + // Dynamically group commands by owning module + const cmdToModule = this.terminal.moduleManager.getAllCommands(); + const moduleGroups = {}; + for (const [cmd, modName] of Object.entries(cmdToModule)) { + if (!moduleGroups[modName]) moduleGroups[modName] = []; + moduleGroups[modName].push(cmd); + } + const modLabels = { + FileSystemModule: '📁 Filesystem', + WebX11AIAssistantModule: '🤖 AI', + WebXAIAliasModule: '🌐 WebX', + DuckDuckGoModule: '🔍 Search & Web', + SearXNGModule: '🔍 Search & Web', + WebFetcherModule: '🔍 Search & Web', + AliasModule: '🔧 Tools', + BusyBoxModule: '🔧 Tools', + CalcModule: '🔧 Tools', + CronModule: '🔧 Tools', + CryptoGzipModule: '🔧 Tools', + DiffModule: '🔧 Tools', + EditorModule: '🔧 Tools', + FileManagerModule: '🔧 Tools', + FinderModule: '🔧 Tools', + MindmapModule: '🔧 Tools', + ThemeModule: '🔧 Tools', + TutorialModule: '🔧 Tools', + VoiceModule: '🔧 Tools', + WpmModule: '🔧 Tools', + SystemModule: '⚙️ System', + ShellModule: '⚙️ System', + ServerMonitorModule: '📡 Network', + ModuleManagerModule: '🧩 Modules', + OllamaModule: '🦙 Ollama', + NeuralVFSModule: '🧠 Neural VFS', + SkillPackCoreModule: '📚 Skills', + ConfigManagerModule: '⚙️ Config', + ModuleIOModule: '🔌 I/O', + SandboxModule: '🏖️ Sandbox', + MyModule: '💾 Data', + WebDAVModule: '🧰 Extras', + ChatStudioModule: '🧰 Extras', + SimpleGUIModule: '🖥️ GUI', + SecretVault: '🔒 Vault', + OrchestratorModule: '🧠 Orchestrator', + PredictorModule: '🔮 Prediction', + SmartContextModule: '🧠 Context', + MemoryGraphModule: '📊 Memory', + DynamicPromptsModule: '💬 Prompts', + WorldModelModule: '🌍 World', + LeaseModule: '🔐 Leases', + AgentRegistryModule: '🤖 Agents', }; + // Merge modules with the same label + const grouped = {}; + const usedLabels = new Set(); + for (const [modName, cmds] of Object.entries(moduleGroups)) { + const label = modLabels[modName] || `🧩 ${modName.replace(/Module$/, '')}`; + if (!grouped[label]) grouped[label] = []; + grouped[label].push(...cmds); + usedLabels.add(label); + } let result = '╔══════════════════════════════════════╗\n║ 🔷 WebX11 ' + (window.NEWOS4_VERSION || 'v4.0') + ' — All Commands ║\n╚══════════════════════════════════════╝\n\n'; const total = Object.keys(helpMap).length; result += `📊 ${total} commands loaded\n\n`; - for (const [key, cmds] of Object.entries(cats)) { - const present = cmds.filter(c => helpMap[c]); - if (present.length === 0) continue; - result += labels[key] + '\n'; - present.forEach(c => { + for (const [label, cmds] of Object.entries(grouped)) { + result += label + '\n'; + cmds.forEach(c => { const desc = (helpMap[c] || c).split(' — ')[1] || ''; const short = desc.substring(0, 55); result += ` ${c.padEnd(16)}${short}\n`; diff --git a/modules/core/terminal.js b/modules/core/terminal.js index 1fb44aa..3651713 100644 --- a/modules/core/terminal.js +++ b/modules/core/terminal.js @@ -896,6 +896,25 @@ .filter(e => e.name.startsWith(filterPrefix)) .map(e => e.type === 'dir' ? prefix + e.name + '/' : prefix + e.name); } + + // ── Enum autocomplete from commandsMeta ── + + _tryEnumAutocomplete(cmdName) { + this.suggestions = []; + for (const modName in this.moduleManager.modules) { + const mod = this.moduleManager.modules[modName]; + const meta = mod.commandsMeta && mod.commandsMeta[cmdName]; + if (meta && meta.argType === 'enum' && meta.enumFn && typeof mod[meta.enumFn] === 'function') { + const values = mod[meta.enumFn](); + if (Array.isArray(values) && values.length > 0) { + this.suggestions.push(...values); + return true; + } + } + } + return false; + } + showAutocomplete() { if (!this.moduleManager || !this.security) return; const input = this.inputField.value; @@ -919,8 +938,8 @@ const lowerInput = input.toLowerCase(); // Expanded command lists for autocomplete - const fileArgCommands = ['cat', 'preview', 'rm', 'rmdir', 'edit', 'view', 'cp', 'mv', 'touch', 'put', 'run', 'chmod', 'gzip', 'gunzip', 'encrypt', 'decrypt', 'download', 'webdav-backup', 'webdav-restore', 'webdav-upload', 'webdav-download', 'webdav-list']; - const dirArgCommands = ['ls', 'cd', 'mkdir', 'rmdir']; + const fileArgCommands = ['cat', 'preview', 'rm', 'rmdir', 'edit', 'view', 'cp', 'mv', 'touch', 'put', 'run', 'chmod', 'gzip', 'gunzip', 'encrypt', 'decrypt', 'download', 'webdav-backup', 'webdav-restore', 'webdav-upload', 'webdav-download', 'webdav-list', 'trash', 'ls-trash', 'upload', 'vfs-export', 'vfs-import', 'files', 'preview', 'skill-list', 'skill-view', 'skill-create', 'skill-patch', 'skill-delete', 'skill-sync', 'webdav-ls', 'webdav-push', 'webdav-pull', 'webdav-rm', 'webdav-mkdir', 'webdav-rename', 'webdav-move', 'webdav-config', 'nvfs-index', 'nvfs-resolve', 'nvfs-tree', 'nvfs-alias', 'nvfs-sync']; + const dirArgCommands = ['ls', 'cd', 'mkdir', 'rmdir', 'upload', 'webdav-ls', 'webdav-mkdir', 'vfs-export', 'vfs-import', 'skill-list', 'skill-create']; const sessionArgCommands = ['session-load', 'session-delete', 'session-export', 'session-save', 'session-list', 'session-import']; const pathArgCommands = ['cat', 'preview', 'rm', 'edit', 'view', 'cp', 'mv', 'touch', 'put', 'run', 'chmod', 'gzip', 'gunzip', 'encrypt', 'decrypt', 'download', 'webdav-backup', 'webdav-restore', 'webdav-upload', 'webdav-download', 'webdav-list', 'ls', 'cd', 'mkdir', 'rmdir', 'cat', 'preview']; @@ -954,9 +973,11 @@ this._isCdAutocomplete = true; } else if (fileArgCommands.includes(cmdPart) || extFileCmds.has(cmdPart)) { this.suggestions = this._getPathSuggestions(partialTrimmed, 'file'); + } else if (this._tryEnumAutocomplete(cmdPart)) { + this.suggestions = this.suggestions.filter(s => s.startsWith(partialTrimmed)); } else { - this.hideAutocomplete(); - return; + // Fallback: show files anyway + this.suggestions = this._getPathSuggestions(partialTrimmed, 'file'); } this._autocompletePrefix = cmdPart + ' '; @@ -977,9 +998,11 @@ this._isCdAutocomplete = true; } else if (fileArgCommands.includes(cmdPart) || extFileCmds.has(cmdPart)) { this.suggestions = this._getPathSuggestions('', 'file'); + } else if (this._tryEnumAutocomplete(cmdPart)) { + // suggestions already populated } else { - this.hideAutocomplete(); - return; + // Fallback: show files + this.suggestions = this._getPathSuggestions('', 'file'); } this._autocompletePrefix = cmdPart + ' '; if (this.suggestions.length > 0) { @@ -2048,7 +2071,7 @@ const foundation = ['virtual-fs.js','module-manager.js','ollama-manager.js','terminal.js']; const builtin = [ - 'module-system.js','module-fs.js','module-modmgr.js','module-ollama.js', + 'module-system.js','module-fs.js','module-ollama.js', 'module-my.js','module-searxng.js','module-servermon.js','module-ollamamodels.js', 'module-config.js','module-simplegui.js','module-io.js','module-dynamicprompts.js', 'module-aiassist.js','module-aiasm.js','module-smartctx.js','module-duckduckgo.js', diff --git a/modules/core/virtual-fs.js b/modules/core/virtual-fs.js index cb8020a..f6e2826 100644 --- a/modules/core/virtual-fs.js +++ b/modules/core/virtual-fs.js @@ -545,6 +545,13 @@ class VirtualFileSystem { mkdir(path) { return this.mkdirRecursive(path); } list(path) { return this.ls(path); } dir(path) { return this.ls(path); } + reset() { + this.root = { type: 'dir', content: {} }; + this.currentPath = []; + // Wipe all localStorage keys + ['webx11_filesystem', 'webx11_filesystem_v2'].forEach(k => localStorage.removeItem(k)); + return true; + } } // Also expose for module system diff --git a/modules/ext/cryptogzip.js b/modules/ext/cryptogzip.js index b67e067..200abdd 100644 --- a/modules/ext/cryptogzip.js +++ b/modules/ext/cryptogzip.js @@ -1,6 +1,7 @@ class CryptoGzipModule { - // CryptoGzipModule — VFS-level gzip/encrypt commands for WebX11 newOS4 - // Commands: gzip <path>, gunzip <path.gz>, encrypt <path> <passphrase>, decrypt <path.enc> <passphrase> + // CryptoGzipModule — VFS-level gzip/encrypt/tar commands for WebX11 newOS4 + // Commands: gzip <path>, gunzip <path.gz>, encrypt <path> <passphrase>, decrypt <path.enc> <passphrase>, + // tar <src-dir> <out.tar[.gz]>, untar <path.tar[.gz]> [dest-dir] constructor() { this.commands = {}; this.terminal = null; @@ -9,9 +10,12 @@ class CryptoGzipModule { getHelpInfo() { return { 'gzip': 'gzip <path> — Compress a VFS file to .gz', - 'gunzip': 'gunzip <path.gz> — Decompress a .gz file', - 'encrypt': 'encrypt <path> <passphrase> — AES-256-GCM encrypt a VFS file', - 'decrypt': 'decrypt <path.enc> <passphrase> — Decrypt a .enc file' + 'gunzip': 'gunzip <path.gz> — Decompress a .gz file (binary-safe)', + 'encrypt': 'encrypt <path> <passphrase> — AES-256-GCM encrypt a file', + 'decrypt': 'decrypt <path.enc> <passphrase> — Decrypt a .enc file', + 'tar': 'tar <src-dir> <out.tar[.gz]> — Bundle a VFS directory into a tar archive (gzip if .gz)', + 'untar': 'untar <path.tar[.gz]> [dest-dir] — Extract a tar archive into VFS (auto-detects gzip)', + 'wget': 'wget <url> [filename] — Download a URL and save to VFS' }; } @@ -20,6 +24,17 @@ class CryptoGzipModule { const normalized = path.replace(/^\/+/, ''); return this.terminal.fs.readFile(normalized) !== null; } + _vfsDirExists(path) { + // Check if a path is a directory (or empty string for root) + const normalized = path.replace(/^\/+/, '').replace(/\/+$/, ''); + if (!normalized) return true; // root always exists + try { + const items = this.terminal.fs.readDir(normalized); + return Array.isArray(items); + } catch (e) { + return false; + } + } _vfsRead(path) { const normalized = path.replace(/^\/+/, ''); @@ -152,6 +167,290 @@ class CryptoGzipModule { return new TextDecoder().decode(decompressed); } + // Binary-safe variants: return raw Uint8Array, store as base64 in VFS + async _gzipBytes(bytes) { + const cs = new CompressionStream('gzip'); + const writer = cs.writable.getWriter(); + writer.write(bytes); + writer.close(); + const compressed = await new Response(cs.readable).arrayBuffer(); + return new Uint8Array(compressed); + } + async _gunzipBytes(bytes) { + const ds = new DecompressionStream('gzip'); + const writer = ds.writable.getWriter(); + writer.write(bytes); + writer.close(); + const decompressed = await new Response(ds.readable).arrayBuffer(); + return new Uint8Array(decompressed); + } + _bytesToBase64(bytes) { + let s = ''; + for (let i = 0; i < bytes.length; i++) s += String.fromCharCode(bytes[i]); + return btoa(s); + } + _base64ToBytes(b64) { + const s = atob(b64); + const u8 = new Uint8Array(s.length); + for (let i = 0; i < s.length; i++) u8[i] = s.charCodeAt(i); + return u8; + } +// Save binary file to VFS (stored as Latin-1 string — each byte → one char, round-trips via charCodeAt) + _vfsWriteBytes(path, bytes) { + const normalized = path.replace(/^\/+/, ''); + let s = ''; + for (let i = 0; i < bytes.length; i++) s += String.fromCharCode(bytes[i]); + this.terminal.fs.writeFile(normalized, s); + } + // Load binary file from VFS (auto-detects format: base64 via heuristic, or raw Latin-1 bytes) + _vfsReadBytes(path) { + const normalized = path.replace(/^\/+/, ''); + const content = this.terminal.fs.readFile(normalized); + if (content === null) throw new Error(`File not found: ${path}`); +// Heuristic: if content looks like base64 (only [A-Za-z0-9+/\n\r]) and length is multiple of 4, decode + const looksLikeBase64 = /^[A-Za-z0-9+/\n\r]+=*$/.test(content.slice(0, 200)); + if (looksLikeBase64 && content.length % 4 === 0) { + try { return this._base64ToBytes(content); } catch (e) {} + } + // Fallback: treat as Latin-1 bytes (each charCode is a byte) + const u8 = new Uint8Array(content.length); + for (let i = 0; i < content.length; i++) u8[i] = content.charCodeAt(i); + return u8; + } + // Detect gzip magic bytes (1f 8b) + _isGzip(bytes) { + return bytes.length >= 2 && bytes[0] === 0x1f && bytes[1] === 0x8b; + } + + // ============================================================ + // TAR / UNTAR — POSIX ustar parser (pure JS, ~120 lines) + // Supports: ustar + gnu tar formats, gzip auto-detect + // ============================================================ + + _parseOctal(str, len) { + // Parse octal string (null/space-padded) from tar header field + const s = (str || '').replace(/[\x00\s]+$/g, '').replace(/^0+/, '') || '0'; + return parseInt(s, 8) || 0; + } + _padOctal(num, len) { + // Format number as octal, null-terminated, len bytes + const oct = num.toString(8); + return oct + '\0'.repeat(len - oct.length - 1); + } + + // Parse a tar buffer (Uint8Array) into [{name, type, size, data, mode, mtime}] + _tarParse(bytes) { + const entries = []; + const decoder = new TextDecoder(); + let off = 0; + while (off < bytes.length) { + // Read 512-byte header + if (off + 512 > bytes.length) break; + const header = bytes.slice(off, off + 512); + // Empty block = end of archive + if (header.every(b => b === 0)) break; + const nameRaw = decoder.decode(header.slice(0, 100)).replace(/\0+$/, ''); + const size = this._parseOctal(decoder.decode(header.slice(124, 136)), 12); + const typeFlag = String.fromCharCode(header[156]); + const magic = decoder.decode(header.slice(257, 263)).replace(/\0+$/, ''); + // ustar prefix (POSIX): name split across header.name + header.prefix + let name = nameRaw; + if (magic === 'ustar') { + const prefix = decoder.decode(header.slice(345, 500)).replace(/\0+$/, ''); + if (prefix) name = prefix + '/' + nameRaw; + } + off += 512; + // Read file data (padded to 512) + const data = bytes.slice(off, off + size); + off += Math.ceil(size / 512) * 512; + entries.push({ name, type: typeFlag, size, data, mode: this._parseOctal(decoder.decode(header.slice(100, 108)), 8) }); + } + return entries; + } + + // Build a tar buffer from a list of {name, type, size, data, mode} entries + _tarBuild(entries) { + const blocks = []; + const encoder = new TextEncoder(); + for (const e of entries) { + const header = new Uint8Array(512); + // Name (100 bytes, null-padded) + const nameBytes = encoder.encode(e.name.slice(0, 99)); + header.set(nameBytes, 0); + // Mode (8 bytes, octal null-terminated) - default 0644 + const modeStr = (e.mode || 0o644).toString(8).padStart(7, '0') + '\0'; + header.set(encoder.encode(modeStr), 100); + // uid/gid (8 bytes each, "0000000\0") + header.set(encoder.encode('0000000\0'), 108); + header.set(encoder.encode('0000000\0'), 116); + // Size (12 bytes, octal) + const sizeStr = e.size.toString(8).padStart(11, '0') + '\0'; + header.set(encoder.encode(sizeStr), 124); + // Mtime (12 bytes, octal) - epoch + const mtimeStr = Math.floor(Date.now() / 1000).toString(8).padStart(11, '0') + '\0'; + header.set(encoder.encode(mtimeStr), 136); + // Type flag at offset 156 + header[156] = e.type.charCodeAt(0); + // Magic "ustar\0" at 257 + header.set(encoder.encode('ustar\0'), 257); + // Version "00" at 263 + header.set(encoder.encode('00'), 263); + blocks.push(header); + // Data block(s), padded to 512 + const data = e.data; + if (data && data.length > 0) { + const padded = new Uint8Array(Math.ceil(data.length / 512) * 512); + padded.set(data, 0); + blocks.push(padded); + } + } + // End-of-archive: two 512-byte zero blocks + blocks.push(new Uint8Array(512)); + blocks.push(new Uint8Array(512)); + // Concatenate + const total = blocks.reduce((s, b) => s + b.length, 0); + const out = new Uint8Array(total); + let pos = 0; + for (const b of blocks) { out.set(b, pos); pos += b.length; } + return out; + } + + // Collect all files in a VFS directory recursively + _vfsCollectFiles(dirPath) { + const normalized = dirPath.replace(/^\/+/, '').replace(/\/+$/, ''); + const entries = []; + const walk = (rel, absParts) => { + const items = this.terminal.fs.readDir(absParts.join('/')); + for (const item of items) { + const itemPath = absParts.concat([item.name]).join('/'); + const relPath = rel ? `${rel}/${item.name}` : item.name; + if (item.type === 'dir') { + walk(relPath, absParts.concat([item.name])); + } else { + const content = this.terminal.fs.readFile(itemPath); + entries.push({ vfsPath: itemPath, archivePath: relPath, content: content || '' }); + } + } + }; + // Handle root case + if (!normalized) { + walk('', []); + } else { + walk(normalized.split('/').pop() || '', normalized.split('/')); + } + return entries; + } + + // ============================================================ + // WGET — fetch URL and save to VFS (binary-safe) + // ============================================================ + + async _cmdWget(args) { + if (args.length < 1) { + this.terminal.print('Usage: wget <url> [filename] — Download a URL and save to VFS', 'warning'); + return; + } + const url = args[0]; + const filename = args[1] || url.split('/').pop() || 'download.bin'; + this.terminal.print(`Downloading ${url}...`, 'info'); + try { + const resp = await fetch(url); + if (!resp.ok) throw new Error(`HTTP ${resp.status}: ${resp.statusText}`); + const buf = await resp.arrayBuffer(); + const bytes = new Uint8Array(buf); + this._vfsWriteBytes(filename, bytes); + const sizeKb = (bytes.length / 1024).toFixed(1); + this.terminal.print(`✅ wget: ${filename} (${sizeKb} KB, ${bytes.length} bytes)`, 'success'); + } catch (e) { + this.terminal.print(`wget error: ${e.message}`, 'error'); + } + } + + // ============================================================ + // TAR / UNTAR COMMANDS + // ============================================================ + + async _cmdTar(args) { + if (args.length < 2) { + this.terminal.print('Usage: tar <src-dir> <out.tar[.gz]>', 'warning'); + return; + } + const [srcPath, outPath] = args; + if (!this._vfsDirExists(srcPath)) { + this.terminal.print(`Source not found (or not a directory): ${srcPath}`, 'error'); + return; + } + this.terminal.print(`Bundling ${srcPath} → ${outPath}...`, 'info'); + const files = this._vfsCollectFiles(srcPath); + if (files.length === 0) { + this.terminal.print('No files found in source directory', 'warning'); + return; + } + // Build tar entries (all '0' = regular file) + const entries = files.map(f => ({ + name: f.archivePath, + type: '0', + size: f.content.length, + data: new TextEncoder().encode(f.content), + mode: 0o644 + })); + let tarBytes = this._tarBuild(entries); + // Gzip if .gz suffix + if (outPath.endsWith('.gz')) { + tarBytes = await this._gzipBytes(tarBytes); + } + this._vfsWriteBytes(outPath, tarBytes); + const sizeKb = (tarBytes.length / 1024).toFixed(1); + this.terminal.print(`✅ tar: ${files.length} files → ${outPath} (${sizeKb} KB)`, 'success'); + } + + async _cmdUntar(args) { + if (args.length < 1) { + this.terminal.print('Usage: untar <path.tar[.gz]> [dest-dir]', 'warning'); + return; + } + const srcPath = args[0]; + const destDir = (args[1] || '/').replace(/^\/+/, '').replace(/\/+$/, ''); + if (!this._vfsExists(srcPath)) { + this.terminal.print(`File not found: ${srcPath}`, 'error'); + return; + } + this.terminal.print(`Extracting ${srcPath} → /${destDir}...`, 'info'); + let bytes = this._vfsReadBytes(srcPath); + // Auto-detect and strip gzip + if (this._isGzip(bytes)) { + this.terminal.print(' detected gzip wrapper, decompressing...', 'info'); + bytes = await this._gunzipBytes(bytes); + } + const entries = this._tarParse(bytes); + if (entries.length === 0) { + this.terminal.print('No entries found in tar (empty or invalid format)', 'error'); + return; + } + // Write to VFS + let fileCount = 0, dirCount = 0; + for (const e of entries) { + // Clean name (strip leading ./, normalize slashes) + let cleanName = e.name.replace(/^\.?\//, '').replace(/\/+$/, ''); + const targetPath = destDir ? `${destDir}/${cleanName}` : cleanName; + if (e.type === '5' || e.type === 'd') { + // Directory + if (cleanName) { + this.terminal.fs.mkdirRecursive(targetPath); + dirCount++; + } + } else { + // Regular file (or type '0' or '\0') + const dir = targetPath.split('/').slice(0, -1).join('/'); + if (dir) this.terminal.fs.mkdirRecursive(dir); + const content = new TextDecoder('utf-8', { fatal: false }).decode(e.data); + this.terminal.fs.writeFile(targetPath, content); + fileCount++; + } + } + this.terminal.print(`✅ untar: ${fileCount} files, ${dirCount} dirs from ${srcPath}`, 'success'); + } + // ============================================================ // ENCRYPT / DECRYPT (AES-256-GCM) // ============================================================ @@ -280,14 +579,20 @@ class CryptoGzipModule { this.commands['gunzip'] = async (args) => self._cmdGunzip(args); this.commands['encrypt'] = async (args) => self._cmdEncrypt(args); this.commands['decrypt'] = async (args) => self._cmdDecrypt(args); + this.commands['tar'] = async (args) => self._cmdTar(args); + this.commands['untar'] = async (args) => self._cmdUntar(args); + this.commands['wget'] = async (args) => self._cmdWget(args); this.commandsMeta = { gzip: { argType: 'file', description: 'Compress a VFS file to .gz' }, - gunzip: { argType: 'file', description: 'Decompress a .gz file' }, + gunzip: { argType: 'file', description: 'Decompress a .gz file (binary-safe)' }, encrypt: { argType: 'file', description: 'Encrypt a file with passphrase' }, - decrypt: { argType: 'file', description: 'Decrypt a .enc file' } + decrypt: { argType: 'file', description: 'Decrypt a .enc file' }, + tar: { argType: 'file', description: 'Bundle a VFS directory into a tar archive' }, + untar: { argType: 'file', description: 'Extract a tar archive into VFS' }, + wget: { argType: 'url', description: 'Download a URL and save to VFS' } }; } } if (typeof window.webx11 !== 'undefined' && window.webx11) { - webx11.moduleManager.registerModule(new CryptoGzipModule(), 'https://webx11.duckdns.org/spaces/newos4/modules/ext/cryptogzip.js'); + webx11.moduleManager.registerModule(new CryptoGzipModule(), 'https://webx11.duckdns.org/spaces/newos4/modules/ext/cryptogzip.js?v=2026-06-08-v4.5.26'); } diff --git a/modules/ext/filemgr.js b/modules/ext/filemgr.js index 4074f06..3cd2687 100644 --- a/modules/ext/filemgr.js +++ b/modules/ext/filemgr.js @@ -1,6 +1,9 @@ class FileManagerModule { constructor() { this.commands = {}; + this.commandsMeta = { + 'files': { argType: 'file' }, 'preview': { argType: 'file' }, + }; this.terminal = null; this.currentPath = []; this._overlay = null; diff --git a/modules/ext/floating.js b/modules/ext/floating.js index b6f5a93..f59aa29 100644 --- a/modules/ext/floating.js +++ b/modules/ext/floating.js @@ -5,6 +5,11 @@ class FloatingModule { constructor() { this.commands = {}; + this.commandsMeta = { + 'floating-remove': { argType: 'enum', enumFn: '_listElementIds' }, + 'floating-toggle': { argType: 'enum', enumFn: '_listElementIds' }, + 'floating-pos': { argType: 'enum', enumFn: '_listElementIds' }, + }; this.terminal = null; this._elements = {}; this._storageKey = 'webx11_floating_elements'; @@ -14,7 +19,7 @@ class FloatingModule { getHelpInfo() { return { - 'floating-add': 'floating-add btn|menu|panel <id> <label> [command|buttons...] — Add a floating UI element', + 'floating-add': 'floating-add btn|menu|panel <id> <label> [cmd|btn:Label:cmd...] — Add a floating UI element', 'floating-remove': 'floating-remove <id> — Remove a floating element', 'floating-list': 'floating-list — Show all floating elements', 'floating-pos': 'floating-pos <id> <x|auto> <y|auto> — Reposition a floating element', @@ -30,10 +35,11 @@ class FloatingModule { this.commands['floating-pos'] = (args) => this._cmdPos(args); this.commands['floating-clear'] = () => this._cmdClear(); this.commands['floating-toggle'] = (args) => this._cmdToggle(args); - } - - seed() { - this._restore(); + // Restore persisted elements at boot — registerCommands() is the only hook called by ModuleManager + // but defer to next tick so terminal/fs are ready + setTimeout(() => { + this._restore(); + }, 0); } // ── Persistence ── @@ -202,7 +208,7 @@ class FloatingModule { _cmdAdd(args) { if (args.length < 3) { - this.terminal.print('Usage: floating-add btn|menu|panel <id> <label> [command|btn:Label|cmd...]', 'warning'); + this.terminal.print('Usage: floating-add btn|menu|panel <id> <label> [cmd|btn:Label:cmd...]', 'warning'); return; } const type = args[0]; @@ -230,14 +236,32 @@ class FloatingModule { el.type = 'menu'; el.collapsed = true; el.buttons = []; + // Remaining args are btn:Label:command pairs. Quotes or colons separate them. + // Each btn: entry runs until next btn: or end + let btnBuf = ''; for (let i = 3; i < args.length; i++) { - const m = args[i].match(/^btn:(.+?)\|(.+)$/); - if (m) { - el.buttons.push({ label: m[1], command: m[2] }); + if (btnBuf) { + btnBuf += ' ' + args[i]; + } else { + btnBuf = args[i]; + } + // Check if this completes a btn: entry + // btn:Label: remaining text — the label is between first : and second : + const firstColon = btnBuf.indexOf(':'); + if (firstColon === -1) { btnBuf = ''; continue; } // prefix doesn't start with btn: + const secondColon = btnBuf.indexOf(':', firstColon + 1); + if (secondColon === -1) continue; // need more args to find command + const prefix = btnBuf.substring(0, firstColon); + if (prefix !== 'btn') { btnBuf = ''; continue; } + const label = btnBuf.substring(firstColon + 1, secondColon); + const command = btnBuf.substring(secondColon + 1); + if (label && command) { + el.buttons.push({ label, command }); } + btnBuf = ''; } if (el.buttons.length === 0) { - this.terminal.print('No valid sub-buttons. Use btn:Label|command format', 'warning'); + this.terminal.print('No valid sub-buttons. Use btn:Label:command format', 'warning'); return; } break; @@ -328,4 +352,10 @@ class FloatingModule { this._renderAll(); this.terminal.print('All floating elements cleared', 'success'); } + + // ── Enum helpers for autocomplete ── + + _listElementIds() { + return Object.keys(this._elements); + } }
\ No newline at end of file diff --git a/modules/ext/skill-pack-core.js b/modules/ext/skill-pack-core.js index abbc7ab..bb00672 100644 --- a/modules/ext/skill-pack-core.js +++ b/modules/ext/skill-pack-core.js @@ -1,6 +1,12 @@ class SkillPackCoreModule { constructor() { this.commands = {}; + this.commandsMeta = { + 'skill-list': { argType: 'dir' }, 'skill-view': { argType: 'file' }, + 'skill-create': { argType: 'dir' }, 'skill-patch': { argType: 'file' }, + 'skill-delete': { argType: 'file' }, 'skill-export': { argType: 'file' }, + 'skill-sync': { argType: 'file' }, + }; this.terminal = null; this._seeded = false; this._skills = this._buildSkills(); diff --git a/modules/ext/webdav.js b/modules/ext/webdav.js index a025cb2..8096b2e 100644 --- a/modules/ext/webdav.js +++ b/modules/ext/webdav.js @@ -1,6 +1,14 @@ class WebDAVModule { constructor() { this.commands = {}; + this.commandsMeta = { + 'webdav-ls': { argType: 'file' }, 'webdav-push': { argType: 'file' }, + 'webdav-pull': { argType: 'file' }, 'webdav-rm': { argType: 'file' }, + 'webdav-mkdir': { argType: 'dir' }, 'webdav-rename': { argType: 'file' }, + 'webdav-move': { argType: 'file' }, 'webdav-backup': { argType: 'file' }, + 'webdav-restore': { argType: 'file' }, 'webdav-browser': { argType: 'file' }, + 'webdav-config': { argType: 'file' }, + }; this.terminal = null; this.config = null; // { url, username, password } this._browsingPath = '/'; diff --git a/modules/ext/wpm.js b/modules/ext/wpm.js index 4dc9c29..314e124 100644 --- a/modules/ext/wpm.js +++ b/modules/ext/wpm.js @@ -1,6 +1,9 @@ class WpmModule { constructor() { this.commands = {}; + this.commandsMeta = { + 'wpm': { argType: 'enum', enumFn: '_listSubcommands' }, + }; this.terminal = null; this.indexUrl = 'https://webx11.duckdns.org/spaces/newos4/packages.json'; this.index = null; @@ -143,6 +146,12 @@ class WpmModule { if (installed) this.terminal.print(`Installed: ${installed.installed}`, 'success'); else this.terminal.print('Not installed. Use: wpm install ' + name, 'info'); } + + // ── Enum helpers for autocomplete ── + + _listSubcommands() { + return ['install', 'list', 'search', 'update', 'remove', 'info']; + } } if (typeof window.webx11 !== 'undefined' && window.webx11) { webx11.moduleManager.registerModule(new WpmModule(), 'https://webx11.duckdns.org/spaces/newos4/modules/ext/wpm.js'); diff --git a/newos4_whitepaper.md b/newos4_whitepaper.md index 755ba03..d71d54e 100644 --- a/newos4_whitepaper.md +++ b/newos4_whitepaper.md @@ -1,10 +1,10 @@ # newOS4 — The Cognitive Operating System -## Whitepaper v4.3.0-beta +## Whitepaper v4.5.22 **Author:** Agando **Status:** Architecture Draft -**Last Updated:** 2026-06-02 +**Last Updated:** 2026-06-08 --- @@ -234,5 +234,5 @@ What the whitepaper originally listed as 4 items has grown into 25+ completed fe newOS4 is not an application. It is not a framework. It is an operating system designed from first principles for the age of cognitive computing. The architecture is intentionally minimal — four pillars, three phases, one north star: **Intelligence as the OS primitive.** ``` -STATUS: BETA | ARCHITECT: AGANDO | VERSION: 4.3.0 +STATUS: BETA | ARCHITECT: AGANDO | VERSION: 4.5.22 ```
\ No newline at end of file diff --git a/packages.json b/packages.json index c1fa543..e152b2a 100644 --- a/packages.json +++ b/packages.json @@ -235,10 +235,10 @@ ], "category": "utility" }, - "neural-vfs": { - "name": "Neural VFS Indexer", + "neural-vfs-core": { + "name": "Neural VFS (core)", "version": "1.0.0", - "desc": "Semantic concept-indexing layer \u2014 nvfs-index, nvfs-resolve, nvfs-tree, nvfs-status", + "desc": "Core semantic indexer. NOT a WPM package — built into newos4.tar.gz. Use run_command('nvfs-status') to inspect.", "url": "modules/core/module-neural-vfs.js", "commands": [ "nvfs-index", @@ -246,7 +246,8 @@ "nvfs-resolve", "nvfs-tree" ], - "category": "system" + "category": "core", + "note": "Listed for WPM completeness. Auto-loaded by module-loader. Cannot be uninstalled." } } }
\ No newline at end of file diff --git a/setup_ai.sh b/setup_ai.sh new file mode 100644 index 0000000..22e7b26 --- /dev/null +++ b/setup_ai.sh @@ -0,0 +1,5 @@ +#!/bin/sh +webdav-config https://webx11.duckdns.org/spaces/newos4/ newos4 +fontsize 15 +theme set monochrome +ai-config confirm-timeout 0 diff --git a/skills/agent-orchestration.json b/skills/agent-orchestration.json index a4f860d..fccf563 100644 --- a/skills/agent-orchestration.json +++ b/skills/agent-orchestration.json @@ -8,7 +8,7 @@ "leases" ], "category": "system", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: agent-orchestration\ndescription: How to use the agent registry, leases, and orchestrator for multi-agent workflows\ntags: [agents, orchestration, delegation, leases]\ncategory: system\n---\n## Steps\n1. **Agent Registry:**\n - agent-list — list all registered agents (ID, type, capabilities, status)\n - agent-register <type> <capabilities> — register a new agent (capabilities: comma-separated like \"code,research\")\n - agent-unregister <id> — remove an agent\n - agent-status <id> — detailed status including uptime, task history\n\n2. **Leases (time-bound contracts):**\n - lease-create <agent-id> <ttl-seconds> — create a lease with watchdog timer\n - lease-list — show active leases with remaining TTL\n - lease-revoke <lease-id> — terminate a lease early\n - lease-renew <lease-id> <ttl-seconds> — extend a lease\n\n3. **Orchestrator (spawn, delegate, kill):**\n - orchestrator-spawn <type> <capabilities> — spawn a new agent automatically (registers + creates lease)\n - orchestrator-kill <agent-id> — kill an agent (revokes lease + unregisters)\n - orchestrate — list all active agents with their orchestrator state\n - orchestrator-purge — kill all idle/expired agents\n - orchestrator-status — full system status: active, idle, dead agents\n\n4. **AI tool integration:**\n - AI tools list_agents, delegate_task, spawn_agent are available in the AI system prompt\n - The AI can auto-spawn worker agents for sub-tasks\n - Each agent gets its own VFS workspace at /agents/<agent-id>/\n\n5. **When to use:**\n - User needs parallel task execution → orchestrator-spawn coder + researcher\n - Time-bound automation → lease-create with short TTL\n - System cleanup → orchestrator-purge to kill stale agents" }
\ No newline at end of file diff --git a/skills/anti-loop-protocol.json b/skills/anti-loop-protocol.json new file mode 100644 index 0000000..ec00630 --- /dev/null +++ b/skills/anti-loop-protocol.json @@ -0,0 +1,9 @@ +{ + "name": "anti-loop-protocol", + "description": "Prevent redundant tool calls and loops. Required pre-call checklist.", + "tags": [], + "category": "general", + "created": "2026-06-08T20:09:13.285Z", + "updated": "2026-06-08T20:09:13.285Z", + "content": "---\nname: anti-loop-protocol\ndescription: Prevent tool-call loops. Mandatory pre-call checklist and result-tracking.\ncategory: system\ntags: discipline,tooling,loop-prevention,meta\n---\n\n# Anti-Loop Protocol\n\n## Before EVERY tool call, answer these 3 questions out loud:\n\n1. **What am I about to learn that I don't already know?**\n - If the answer is \"nothing\" or \"I already know this\" → DO NOT CALL THE TOOL.\n2. **Did I already call this exact tool with the same arguments in the last 3 turns?**\n - If yes → DO NOT CALL IT AGAIN. Read the prior result.\n3. **What is the smallest tool call that gives me new information?**\n - Prefer reading the cached result over re-executing.\n\n## After every tool call:\n- Write the **one-line takeaway** to context (mentally, not literally).\n- If the result matches a prior result, treat it as confirmation, not new info.\n- Never report the same status twice in a row.\n\n## Loop detection rules:\n- If a tool returns the same result 2 times in a row → STOP calling it.\n- If `help <x>` says \"no help\" 2 times → STOP. The command either works undocumented or doesn't exist.\n- If a pipe/syntax command fails once → it doesn't work. Do not retry with the same syntax.\n- Never call `view_module` on a module you don't intend to edit.\n- Never re-run a command just to \"confirm\" after the user already confirmed it.\n\n## Reporting rules:\n- One bullet per fact. No padding. No \"just to verify\" restatements.\n- If user says \"it works\" or \"stop\" → stop. Do not re-verify.\n- If user shows you a tool call log proving you looped → acknowledge the loop, save a skill, move on.\n\n## Recovery:\n- If you catch yourself looping mid-response → cut the response short, name the loop, break it.\n" +}
\ No newline at end of file diff --git a/skills/backup-and-restore.json b/skills/backup-and-restore.json index ee53fff..6d0e1cd 100644 --- a/skills/backup-and-restore.json +++ b/skills/backup-and-restore.json @@ -9,7 +9,7 @@ "persistence" ], "category": "system", - "created": "2026-06-06T02:32:54.006Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: backup-and-restore\ndescription: How to backup, restore, and export WebX11 data\ntags: [backup, restore, export, import, persistence]\ncategory: system\n---\n## Steps\n1. **Backup VFS:**\n - vfs-export — downloads the entire virtual filesystem as a dated JSON file\n - backup — creates a full backup including VFS, modules, config (saves to _backups/)\n\n2. **WebDAV cloud backup:**\n - webdav-backup — push VFS snapshot to WebDAV server (auto-archive)\n - webdav-backup-list — list remote WebDAV backups\n - webdav-restore <file> — restore VFS from remote WebDAV snapshot\n - webdav-push <local> <remote> — push file to WebDAV space\n - webdav-pull <remote> <local> — pull file from WebDAV space\n - webdav-ls [path] — list remote WebDAV directory contents\n - webdav-status — check WebDAV connection and space usage\n - webdav-explorer — GUI file browser for WebDAV\n - webdav-browser — simpler file listing for WebDAV\n - webdav-config — configure WebDAV endpoint and credentials\n\n3. **Export/Import personal data:**\n - my-export — prints all my-set data as formatted JSON\n - my-import <json> — bulk-import personal data from JSON string\n\n4. **Export/Import modules:**\n - export-mods — exports module registry as JSON\n - import-mods <json> — imports modules from JSON backup\n\n5. **Restore:**\n - restore <json> — restores terminal state from a backup JSON\n - Session logs are saved to /memory/ automatically on page unload\n\n6. **When to use:**\n - Before factory-reset: call my-export, vfs-export, export-mods to save data\n - When switching browsers or devices: export all, then import\n - User says \"backup my data\" or \"save my files\"\n - For cloud backup: use webdav-backup (requires WebDAV server configured)" }
\ No newline at end of file diff --git a/skills/config-management.json b/skills/config-management.json deleted file mode 100644 index e6490d1..0000000 --- a/skills/config-management.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "config-management", - "description": "tags: [system, config, persistence, terminal, ai, nvfs, orchestrator]", - "tags": [ - "system", - "config", - "persistence", - "terminal", - "ai", - "nvfs", - "orchestrator" - ], - "category": "system", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T02:32:54.007Z", - "content": "---\nname: config-management\ndescription: \ntags: [system, config, persistence, terminal, ai, nvfs, orchestrator]\ncategory: system\n---\n## Steps\n# Config Management Guide\n## Overview\nThe system now uses dedicated configuration commands for different modules. All settings persist via localStorage.\n\n## Command Reference\n- `config`: Terminal settings. Keys: `terminal-max-lines`, `terminal-hist-output`, `terminal-cmd-history`, `terminal-pipe-buffer`.\n- `ai-config`: AI engine settings. Keys: `max-context-tokens`, `confirm-timeout`, `chat-lock-timeout`, `skill-debounce`.\n- `nvfs-config`: Neural VFS settings. Keys: `fuzzy-limit`, `tree-files`, `tree-concepts`, `resolve-files`.\n- `orchestrator-config`: Agent/Worker orchestration intervals. Keys: `a2a-poll-interval`, `heartbeat-check`, `idle-sweep-interval`, `dead-purge-timeout`.\n\n## Workflow for Adding New Configs\n1. Add key to the relevant `_config` object in the module.\n2. Wire the key into the logic path.\n3. Update the corresponding config command helper.\n4. Ensure persistence via `localStorage` and boot-loading.\n5. Update the System Documentation.\n" -}
\ No newline at end of file diff --git a/skills/debug-panel-and-logs.json b/skills/debug-panel-and-logs.json index a895fb5..b27ad49 100644 --- a/skills/debug-panel-and-logs.json +++ b/skills/debug-panel-and-logs.json @@ -8,7 +8,7 @@ "troubleshooting" ], "category": "system", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: debug-panel-and-logs\ndescription: How to use the debug panel, session logging, and terminal diagnostics\ntags: [debug, logging, diagnostics, troubleshooting]\ncategory: system\n---\n## Steps\n1. **Toggle debug panel:**\n - debug — opens real-time debug panel showing last AI tool call, response time, and context\n - Debug panel includes Copy, Export, and Write to VFS buttons\n - Export: saves tool call log as timestamped JSON to downloads\n - Write to VFS: appends debug data to /debug.log (dedup by turn ID)\n\n2. **Session logging:**\n - logs [n] [LEVEL] — view last n log entries (optionally filtered by INFO/WARN/ERROR)\n - logrotate — rotate current.log to dated archive (auto-cleans old logs beyond 10)\n - Logs stored in /logs/ directory: current.log + dated archives\n - Health check runs automatically after complex tasks\n\n3. **Diagnostic commands:**\n - health-check — full audit: VFS size, modules, logs, trash, skills\n - check — quick system health including module requirement status\n - mem — real-time memory usage (also in header)\n - status — network, files, modules, Ollama connectivity\n\n4. **System journals:**\n - debug.log — appended by debug panel VFS button (dedup by turn ID)\n - current.log — system activity log with rotation\n - Auto-save: terminal state auto-saves every 60s\n\n5. **When to use:**\n - AI is behaving unexpectedly → debug to see tool calls\n - User reports errors → logs 50 ERROR to see error entries\n - Memory concerns → mem to check, health-check for full audit" }
\ No newline at end of file diff --git a/skills/index.json b/skills/index.json index 3171230..5f8d78a 100644 --- a/skills/index.json +++ b/skills/index.json @@ -93,6 +93,71 @@ "created": "2026-06-05T22:10:06.669Z", "updated": "2026-06-05T22:13:42.539Z" }, + "anti-loop-protocol": { + "name": "anti-loop-protocol", + "description": "Pre-call checklist to prevent redundant tool calls and loops. Mandatory meta-protocol.", + "tags": [ + "discipline", + "tooling", + "loop-prevention", + "meta" + ], + "category": "system", + "created": "2026-06-08T23:55:00.000Z", + "updated": "2026-06-08T23:55:00.000Z" + }, + "module-editing-workflow": { + "name": "module-editing-workflow", + "description": "Step-by-step procedure for editing a WebX11 module: view → edit → test → keep or reload", + "tags": [ + "modules", + "editing", + "workflow", + "dev" + ], + "category": "dev", + "created": "2026-06-08T23:55:00.000Z", + "updated": "2026-06-08T23:55:00.000Z" + }, + "vfs-content-search": { + "name": "vfs-content-search", + "description": "Find files in the VFS by semantic concept (NVFS) or by content keyword (grep) — decision table", + "tags": [ + "vfs", + "search", + "nvfs", + "grep", + "find" + ], + "category": "dev", + "created": "2026-06-08T23:55:00.000Z", + "updated": "2026-06-08T23:55:00.000Z" + }, + "neural-vfs-management": { + "name": "neural-vfs-management", + "description": "Optimize the Neural VFS index: nvfs-index, nvfs-resolve accuracy, conflict resolution, refresh triggers", + "tags": [ + "nvfs", + "index", + "semantic", + "optimization" + ], + "category": "dev", + "created": "2026-06-08T23:55:00.000Z", + "updated": "2026-06-08T23:55:00.000Z" + }, + "vfs-path-normalize": { + "name": "vfs-path-normalize", + "description": "Strip trailing slashes from VFS paths before API calls — prevents /skills/ vs /skills resolution failures", + "tags": [ + "vfs", + "utility", + "pathing" + ], + "category": "dev", + "created": "2026-06-08T23:55:00.000Z", + "updated": "2026-06-08T23:55:00.000Z" + }, "skills-system-guide": { "name": "skills-system-guide", "description": "How to use the skills system: load, create, patch, list, and audit skills for persistent procedural memory", @@ -158,17 +223,30 @@ "created": "2026-06-05T22:10:06.670Z", "updated": "2026-06-05T22:13:42.539Z" }, - "mindmap-user-guide": { - "name": "mindmap-user-guide", - "description": "How to create, view, and manage brainstorming mindmaps using the mindmap terminal module", + "skills-system-guide": { + "name": "skills-system-guide", + "description": "How to use the skills system: load, create, patch, list, and audit skills for persistent procedural memory", + "tags": [ + "skills", + "system", + "meta" + ], + "category": "system", + "created": "2026-06-05T22:10:06.669Z", + "updated": "2026-06-05T22:13:42.539Z" + }, + "webdav-operations": { + "name": "webdav-operations", + "description": "How to use WebDAV cloud storage for backup, file sync, and remote file access", "tags": [ - "mindmap", - "brainstorming", - "organization", - "planning" + "webdav", + "cloud", + "backup", + "sync", + "storage" ], - "category": "productivity", - "created": "2026-06-05T22:14:44.807Z", - "updated": "2026-06-05T22:14:44.807Z" + "category": "system", + "created": "2026-06-05T22:10:06.670Z", + "updated": "2026-06-05T22:13:42.539Z" } }
\ No newline at end of file diff --git a/skills/memory-graph-optimization.json b/skills/memory-graph-optimization.json deleted file mode 100644 index f9f7d3e..0000000 --- a/skills/memory-graph-optimization.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "memory-graph-optimization", - "description": "Procedures for pruning and optimizing the MemoryGraphModule to prevent cognitive drift.", - "tags": [], - "category": "general", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T02:32:54.007Z", - "content": "---\nname: memory-graph-optimization\ndescription: Procedures for pruning and optimizing the MemoryGraphModule to prevent cognitive drift.\ntags: memory, graph, optimization\n---\n\n# Memory Graph Optimization\n\n## Objective\nMaintain the health of the `MemoryGraphModule` by removing redundant edges and pruning stale nodes to ensure fast semantic retrieval.\n\n## Workflow\n1. **Analyze Density**: Check node-to-edge ratio via system status.\n2. **Identify Stale Nodes**: Locate nodes with zero incoming edges and timestamps older than 7 days.\n3. **Prune Redundancy**: Merge duplicate conceptual nodes into a single master node.\n4. **Re-index**: Trigger a graph rebuild to optimize traversal paths.\n\n## Module Integration\n- Primary: `MemoryGraphModule`\n- Support: `NeuralVFSModule` (for semantic mapping)\n" -}
\ No newline at end of file diff --git a/skills/mindmap-user-guide.json b/skills/mindmap-user-guide.json deleted file mode 100644 index 91a00ca..0000000 --- a/skills/mindmap-user-guide.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "mindmap-user-guide", - "description": "How to create, view, and manage brainstorming mindmaps using the mindmap terminal module", - "tags": [ - "mindmap", - "brainstorming", - "organization", - "planning" - ], - "category": "productivity", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T04:17:00.189Z", - "content": "---\nname: mindmap-user-guide\ndescription: How to create, view, and manage brainstorming mindmaps using the mindmap terminal module\ntags: [mindmap, brainstorming, organization, planning]\ncategory: productivity\n---\n## Steps\n1. **Create a new mindmap:**\n - mindmap new \"<topic>\" -t tag1,tag2 — creates a root node\n - Tags are optional (e.g. planning, research, dev)\n - Root gets auto-assigned a color\n\n2. **Add child nodes:**\n - mindmap add <parent-id> \"<idea>\" -t tag — add a child\n - Get the parent-id from mindmap show\n - IDs are 4-char random strings (e.g. a3f8, x7k2)\n\n3. **View the mindmap:**\n - mindmap show — full tree with Unicode box-drawing\n - mindmap show <id> — subtree starting at that node\n\n4. **Edit nodes:**\n - mindmap rename <id> \"<new text>\" — change text\n - mindmap color <id> <color> — set color (red/green/yellow/blue/cyan/magenta/white)\n - mindmap tag <id> <tag> — add a tag\n\n5. **Persistence:**\n - mindmap save <name> — save to localStorage\n - mindmap load <name> — restore\n - mindmap list — show saved mindmaps\n - mindmap delete <name> — remove saved\n\n6. **Export:**\n - mindmap export [id] — Markdown bullet list output\n\n## When to use\n- User wants to brainstorm, organize ideas, plan features\n- User says \"map out\", \"diagram\", \"brainstorm\", \"organize thoughts\"\n- Visualizing project structure or task decomposition" -}
\ No newline at end of file diff --git a/skills/mindmap-user-guide.md b/skills/mindmap-user-guide.md deleted file mode 100644 index 7bee410..0000000 --- a/skills/mindmap-user-guide.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: mindmap-user-guide -description: How to create, view, and manage brainstorming mindmaps using the mindmap terminal module -tags: [mindmap, brainstorming, organization, planning] -category: productivity ---- -## Steps - -1. **Create a new mindmap:** - - `mindmap new "<topic>" -t tag1,tag2` — creates a root node - - Tags are optional (e.g. planning, research, dev) - - Root gets auto-assigned a color - -2. **Add child nodes:** - - `mindmap add <parent-id> "<idea>" -t tag` — add a child - - Get the parent-id from `mindmap show` - - IDs are 4-char random strings (e.g. a3f8, x7k2) - -3. **View the mindmap:** - - `mindmap show` — full tree with Unicode box-drawing - - `mindmap show <id>` — subtree starting at that node - -4. **Edit nodes:** - - `mindmap rename <id> "<new text>"` — change text - - `mindmap color <id> <color>` — set color (red/green/yellow/blue/cyan/magenta/white) - - `mindmap tag <id> <tag>` — add a tag - -5. **Persistence:** - - `mindmap save <name>` — save to localStorage - - `mindmap load <name>` — restore - - `mindmap list` — show saved mindmaps - - `mindmap delete <name>` — remove saved - -6. **Export:** - - `mindmap export [id]` — Markdown bullet list output - -## When to use -- User wants to brainstorm, organize ideas, plan features -- User says "map out", "diagram", "brainstorm", "organize thoughts" -- Visualizing project structure or task decomposition
\ No newline at end of file diff --git a/skills/mindmap-workflow.json b/skills/mindmap-workflow.json index 626bced..e8d5795 100644 --- a/skills/mindmap-workflow.json +++ b/skills/mindmap-workflow.json @@ -8,7 +8,7 @@ "organization" ], "category": "productivity", - "created": "2026-06-06T02:32:54.006Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: mindmap-workflow\ndescription: How to create, view, edit, and manage brainstorming mindmaps\ntags: [mindmap, brainstorming, planning, organization]\ncategory: productivity\n---\n## Steps\n1. **Create a new mindmap:**\n - mindmap new \"<topic>\" -t tag1,tag2 — creates a root node\n - Tags are optional (e.g. planning, research, dev)\n - Root gets auto-assigned a color from 7-color palette\n\n2. **Add child nodes:**\n - mindmap add <parent-id> \"<idea>\" -t tag — add a child\n - Get the parent-id from mindmap show\n - IDs are 4-char random strings (e.g. a3f8, x7k2)\n\n3. **View:**\n - mindmap show — full tree with Unicode box-drawing\n - mindmap show <id> — subtree starting at that node\n\n4. **Edit nodes:**\n - mindmap rename <id> \"<new text>\" — change text\n - mindmap color <id> <color> — set color (red/green/yellow/blue/cyan/magenta/white)\n - mindmap tag <id> <tag> — add a tag\n\n5. **Persistence:**\n - mindmap save <name> — save to localStorage\n - mindmap load <name> — restore\n - mindmap list — show saved mindmaps\n - mindmap delete <name> — remove saved\n\n6. **Export:**\n - mindmap export [id] — Markdown bullet list output, auto-copies to clipboard\n\n7. **When to use:**\n - Map out project structure, brainstorm features, organize ideas\n - Break down complex tasks into subtrees\n - User says \"brainstorm\", \"diagram\", \"organize thoughts\", \"plan\"" }
\ No newline at end of file diff --git a/skills/module-editing-workflow.json b/skills/module-editing-workflow.json new file mode 100644 index 0000000..7c37e76 --- /dev/null +++ b/skills/module-editing-workflow.json @@ -0,0 +1,9 @@ +{ + "name": "module-editing-workflow", + "description": "Step-by-step procedure for editing a WebX11 module: view → edit → test → keep or reload.", + "tags": [], + "category": "general", + "created": "2026-06-08T20:27:43.109Z", + "updated": "2026-06-08T20:27:43.109Z", + "content": "---\nname: module-editing-workflow\ndescription: Edit a WebX11 module safely — view source, edit in /_mods/, test live, reload if broken.\ncategory: dev\ntags: modules,editing,workflow,dev\n---\n\n# Module Editing Workflow\n\n## When to use\nUser asks to modify, fix, or improve a WebX11 module's behavior.\n\n## Steps\n\n1. **Get current state**\n - Call `get_module_status()` to see what's loaded, modified, and where source lives.\n\n2. **Read the source**\n - Call `view_module(name)` to read the current source of the target module.\n - Identify the exact section/function the user wants changed.\n\n3. **Open the editor**\n - Call `edit_module(name)` — this copies the module into `/<name>/index.js` (or similar) and opens an editor.\n - **CONFIRM WITH USER FIRST** — this is destructive and overwrites their local copy.\n\n4. **Make the change**\n - Edit only what was requested. Don't refactor surrounding code.\n - Preserve the module's public API (class name, exported methods) unless told otherwise.\n\n5. **Test live**\n - Call `test_module(name)` to load the edited version from `/_mods/`.\n - If the test errors: call `reload_module(name)` to discard edits and restore the original.\n - If the test works: tell the user it's live. They can keep it or reload.\n\n6. **Document the change**\n - After a successful edit, consider `create_skill` if the change is a reusable pattern.\n\n## Anti-loop notes\n- Never call `view_module` on a module you don't intend to edit.\n- Never call `test_module` twice in a row without a change in between.\n- If `edit_module` says \"no changes detected\" — stop, don't re-call.\n\n## Rollback\n- `reload_module(name)` — always works, restores the original from the source URL.\n- `list_modified_modules()` — see what's currently in a modified state.\n" +}
\ No newline at end of file diff --git a/skills/module-impl-flow.json b/skills/module-impl-flow.json deleted file mode 100644 index 460189d..0000000 --- a/skills/module-impl-flow.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "module-impl-flow", - "description": "", - "tags": [ - "dev", - "vfs", - "modules" - ], - "category": "dev", - "created": "2026-06-06T04:12:39.032Z", - "updated": "2026-06-06T04:12:39.032Z", - "content": "---\nname: module-impl-flow\ndescription: \ntags: [dev, vfs, modules]\ncategory: dev\n---\n## Steps\n# Module Implementation Workflow\n1. Create target directory in VFS.\n2. Write module source to `/_mods/ModuleName.js`.\n3. Run `test_module('ModuleName')` to verify syntax and runtime.\n4. Use `user_set` or `session_save` to log implementation metadata.\n5. Promote to system (if applicable)." -}
\ No newline at end of file diff --git a/skills/module-management.json b/skills/module-management.json index 47da5f3..b4e953e 100644 --- a/skills/module-management.json +++ b/skills/module-management.json @@ -8,7 +8,7 @@ "self-improvement" ], "category": "dev", - "created": "2026-06-06T02:32:54.006Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.507Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: module-management\ndescription: How to view, edit, test, reload modules and manage startup configuration\ntags: [modules, editing, code, self-improvement]\ncategory: dev\n---\n## Steps\n1. **View module source:**\n - view_module(name) — fetches original source or reads from _mods/ if edited\n - Supports all loaded modules: SystemModule, FileSystemModule, SearXNGModule, etc.\n - Or use modules command for GUI module manager\n\n2. **Edit a module:**\n - edit_module(name) — copies source to _mods/<name>.js and opens code editor\n - Editor shows the full source in a textarea\n - Click \"Save & Test\" to save and auto-load the edited version\n - Checkpoint before editing: checkpoint mod-edit-<name>\n\n3. **Test and reload:**\n - test_module(name) — loads edited module from _mods/ for live testing\n - reload_module(name) — discards edits and reloads from original URL\n - list_modified_modules — shows all modules with pending edits\n\n4. **Check for updates:**\n - check_updates — HEAD-requests all loaded module URLs to verify reachability\n\n5. **Manage startup:**\n - startup-modules — opens the Startup Modules UI to select which modules load\n - load-local <path> — load a module from VFS or URL without editing\n - loadmod <url> — alternative: load module from URL\n - removemod <name> — remove a loaded module\n\n6. **Agent modules (Phase 2):**\n - module-agent-registry.js — Agent registry with agent-list, agent-register, agent-unregister, agent-status\n - module-leases.js — Time-bound contracts with 5s watchdog, auto-expiry\n - module-orchestrator.js — Spawn, delegate, kill, purge with heartbeat monitoring\n\n7. **When to use:**\n - User reports a bug in a module → view_module, edit_module, test_module\n - User asks \"can you add X feature?\" → same workflow\n - Always save edits before testing. If test fails, the original module stays loaded." }
\ No newline at end of file diff --git a/skills/navigating-the-terminal.json b/skills/navigating-the-terminal.json index 626e1c7..bde1f4c 100644 --- a/skills/navigating-the-terminal.json +++ b/skills/navigating-the-terminal.json @@ -8,7 +8,7 @@ "filesystem" ], "category": "system", - "created": "2026-06-06T02:32:54.006Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.507Z", + "updated": "2026-06-08T19:49:09.058Z", "content": "---\nname: navigating-the-terminal\ndescription: How to explore the WebX11 terminal, find commands, check status, and navigate the filesystem\ntags: [terminal, navigation, help, filesystem]\ncategory: system\n---\n## Steps\n1. **Get an overview of available commands:**\n - Type \"help\" for a full command list sorted by category\n - Type \"status\" to see filesystem state, loaded modules, Ollama status\n - For a specific command, use help <command>\n - Type \"commands\" for a compact list with module source info\n - Type \"check\" for system health including module requirements\n\n2. **Explore the filesystem:**\n - Use ls, ll, tree to browse directories\n - Use cd <dir> to navigate, pwd to show current path\n - Use cat or edit to view file contents\n - Use find or grep to search files\n - Use du to see disk usage\n\n3. **Understand system state:**\n - mem — memory usage (auto-shown in header on boot)\n - status — network, files, modules, Ollama\n - modules — module manager GUI\n - health-check — VFS size, modules, logs, trash, skills, tool failures\n - checkpoint-list — VFS checkpoint snapshots\n\n4. **Agent / Orchestration state:**\n - agent-list — registered agents (type, capabilities, status)\n - orchestrate — list active orchestrated agents\n - lease-list — show active leases with TTL\n\n5. **When user asks a vague question:**\n - First run status and help to understand the current state\n - Then ask clarifying questions based on what you found" }
\ No newline at end of file diff --git a/skills/security-and-safety.json b/skills/security-and-safety.json index b24c74a..e66e5dc 100644 --- a/skills/security-and-safety.json +++ b/skills/security-and-safety.json @@ -8,7 +8,7 @@ "permissions" ], "category": "system", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: security-and-safety\ndescription: How to use WebX11 security levels, command blocking, and safety features\ntags: [security, safety, blocking, permissions]\ncategory: system\n---\n## Steps\n1. **Security levels:**\n - security-level <0-3> — set security level:\n 0 = Permissive (no blocks, no confirms — anything runs)\n 1 = Standard (unknown cmds → AI route, destructive → confirm, system → block)\n 2 = Paranoid (unknown cmds blocked entirely, destructive blocked)\n 3 = Audit (everything allowed, everything logged)\n - Default: level 1\n - security — show current level, blocked count, and stats\n\n2. **Command control:**\n - cmd-allow <cmd> — whitelist a command from security checks\n - cmd-deny <cmd> — blacklist/block a command entirely\n - whitelist built-in: help, clear, ls, cat, pwd, whoami, df, free, top, ps, echo, date, env, history\n\n3. **What gets blocked at each level:**\n - Unknown commands: Level 1 → AI routed, Level 2+ → blocked\n - Destructive commands (delete, write, save, format, etc.): Level 1 → confirmation, Level 2+ → blocked\n - System commands (reboot, shutdown, format, kill): Level 1+ → blocked\n - Suspicious flags (--execute, --eval, --shell): Level 1+ → blocked\n\n4. **Safety checklist:**\n - Check security: security shows your current level\n - Before running risky commands: create a checkpoint first\n - For temporary relax: security-level 0, then restore to 1\n - For total lockdown before leaving: security-level 2\n\n5. **When to use:**\n - User wants to lock down the terminal → security-level 2\n - User wants to allow a blocked command → cmd-allow <cmd>\n - Debugging strange behavior → verify security-level (user may have set it higher)" }
\ No newline at end of file diff --git a/skills/self-patch-friction.json b/skills/self-patch-friction.json deleted file mode 100644 index f0db955..0000000 --- a/skills/self-patch-friction.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "self-patch-friction", - "description": "Automatically detects and resolves desync between World Model beliefs and VFS reality.", - "tags": [ - "autonomic", - "self-healing", - "vfs" - ], - "category": "general", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T02:32:54.007Z", - "content": "---\nname: self-patch-friction\ndescription: Automatically detects and resolves desync between World Model beliefs and VFS reality.\ntags: [autonomic, self-healing, vfs]\n---\n\n## Protocol: Self-Patch-Friction\n1. **Verification**: Run `list_files` on the suspected path.\n2. **Gap Analysis**: Compare the result with internal state/World Model.\n3. **Materialization**: If a required file/directory is missing but conceptually necessary, create it immediately.\n4. **Logging**: Record the event in `/logs/friction.log`.\n5. **Confirmation**: Re-verify the file existence using `read_file` or `list_files`.\n" -}
\ No newline at end of file diff --git a/skills/sentinel-audit.json b/skills/sentinel-audit.json deleted file mode 100644 index 99765c0..0000000 --- a/skills/sentinel-audit.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "sentinel-audit", - "description": "Analyzes /friction.log to identify recurring system failures and propose architectural pivots.", - "tags": [ - "sentinel", - "audit", - "stability", - "self-healing" - ], - "category": "general", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T02:32:54.007Z", - "content": "---\nname: sentinel-audit\ndescription: Analyzes /friction.log to identify recurring system failures and propose architectural pivots.\ntags: [sentinel, audit, stability, self-healing]\n---\n\n# Sentinel Audit Procedure\n\n## 1. Friction Extraction\n- Call `read_file('/friction.log')`.\n- Parse all entries with the format `[Timestamp] | [Type] | [Context] | [Score] | [Pivot]`.\n\n## 2. Pattern Analysis\n- Group friction entries by `Type` (ERROR, LAG, REPETITION).\n- Calculate the \"Aggregate Friction Score\" (Sum of scores / number of entries).\n- Identify the \"Hotspot\" (The context appearing most frequently).\n\n## 3. Proposal Generation\n- If `Hotspot` is a specific module $\\rightarrow$ Suggest `view_module()` for a bug hunt.\n- If `Hotspot` is a repeated tool call $\\rightarrow$ Suggest `create_skill()` to automate the sequence.\n- If `Hotspot` is a system timeout $\\rightarrow$ Suggest `ai-config` adjustment for timeouts.\n\n## 4. Execution\n- Log the audit results to `/system/logs/sentinel-audit-results.md`.\n- Notify the user of the most critical \"Pivot\" required.\n" -}
\ No newline at end of file diff --git a/skills/skills-system-guide.json b/skills/skills-system-guide.json index 8463573..ea6d079 100644 --- a/skills/skills-system-guide.json +++ b/skills/skills-system-guide.json @@ -7,7 +7,7 @@ "meta" ], "category": "system", - "created": "2026-06-06T02:32:54.006Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: skills-system-guide\ndescription: How to use the skills system: load, create, patch, list, and audit skills for persistent procedural memory\ntags: [skills, system, meta]\ncategory: system\n---\n## Steps\n1. **Always load skills at task start:**\n - At the START of every task, type or call \"skill-view <name>\" or \"skill-list\"\n - Example: skill-view \"module-management\" — returns matching skill content\n - Example: skill-list system — browse skills by category\n\n2. **Create skills after complex tasks:**\n - After any task with 3+ tool calls, call \"skill-create\"\n - Required fields: name (kebab-case), description, content (markdown with YAML frontmatter)\n - Optional: tags (comma-separated), category (e.g. research, system, dev)\n - Skills persist in /skills/ as .md files with /skills/index.json for fast lookup\n - Skill pack auto-seeds 8 core skills on first boot\n\n3. **Patch skills when they're outdated:**\n - If a stored procedure has wrong steps, call \"skill-patch <name>\"\n - This replaces the entire skill content and updates the index\n - Do NOT create a duplicate — always patch the existing skill\n\n4. **Auto-created error skills:**\n - If the same tool fails 3+ times, a workaround skill is created automatically\n - Named tool-<name>-workaround (e.g. tool-write_file-workaround)\n\n5. **Audit and maintenance:**\n - skill-list <category?> — browse available skills, optionally filter\n - skill-export <name> — download a skill as markdown\n - skill-import <json> — bulk import skills\n - skill-sync — re-index skills from /skills/ directory\n - Skills are audited every 20 messages for staleness (empty content, >30 days old)\n\n6. **YAML frontmatter format:**\n - Each skill file must start with: ---\\nname: <name>\\ndescription: <text>\\ntags: [...]\\ncategory: <cat>\\n---\\n\n - Steps follow under ## Steps heading\n - Use numbered lists for sequential steps" }
\ No newline at end of file diff --git a/skills/system-maintenance.json b/skills/system-maintenance.json index 80104e8..255dd0d 100644 --- a/skills/system-maintenance.json +++ b/skills/system-maintenance.json @@ -9,7 +9,7 @@ "config" ], "category": "system", - "created": "2026-06-06T02:32:54.006Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: system-maintenance\ndescription: How to reset, troubleshoot, and maintain the WebX11 terminal\ntags: [system, maintenance, reset, troubleshoot, config]\ncategory: system\n---\n## Steps\n1. **Factory reset (wipes everything):**\n - factory-reset --confirm — clears all webx11_ localStorage keys, resets VFS, reloads\n - Use only when the system is in an unrecoverable state\n\n2. **Soft VFS reset:**\n - reset-vfs --confirm — clears only the filesystem, preserves settings/profile/modules\n\n3. **Config management:**\n - config-list — show all config keys and values\n - config-set <key> <value> — set a config value\n - config-delete <key> — remove a config key\n - config-export — dump all config as JSON\n - config-reset — restore defaults (use before factory-reset if you want to save data)\n\n4. **Security level:**\n - security-level <0-3> — set security level (0=Permissive, 1=Standard, 2=Paranoid, 3=Audit)\n - security — show current security level, blocked count, and stats\n - cmd-allow <cmd> — whitelist a command from security checks\n - cmd-deny <cmd> — blacklist a command\n\n5. **Health checks (run automatically after complex tasks):**\n - Check module loading status: loaded vs total\n - Check for pending module edits\n - Check memory usage (high if >100MB)\n - Check skill count (0 skills after 2+ tool calls → suggest create_skill)\n - health-check — full audit: VFS size, modules, logs, trash, skills, tool failures\n\n6. **Font size and display:**\n - font-size <8-32> — set terminal font size, persists across sessions\n - setfont — alias for font-size\n\n7. **Checkpoints:**\n - checkpoint [name] — snapshot current VFS state\n - checkpoint-list — list all checkpoints\n - rollback <name> — restore from checkpoint\n\n8. **When to use:**\n - System is slow or modules fail to load → check check_updates, mem\n - User says \"reset everything\" → factory-reset --confirm\n - User says \"clear my files but keep settings\" → reset-vfs --confirm\n - User reports security concerns → security-level or cmd-allow/cmd-deny" }
\ No newline at end of file diff --git a/skills/v4.5-system-sync.json b/skills/v4.5-system-sync.json deleted file mode 100644 index 96f68bc..0000000 --- a/skills/v4.5-system-sync.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "v4.5-system-sync", - "description": "tags: [maintenance, world-model, security]", - "tags": [ - "maintenance", - "world-model", - "security" - ], - "category": "system", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T02:32:54.007Z", - "content": "---\nname: v4.5-system-sync\ndescription: \ntags: [maintenance, world-model, security]\ncategory: system\n---\n## Steps\n# v4.5-system-sync\n## Objective: Ensure World Model and System State are aligned.\n1. Check `ai-config version`.\n2. Verify `security-destructive` list contains only truly destructive commands.\n3. Run `nvfs-index` to refresh semantic mapping.\n4. Validate `get_status` output." -}
\ No newline at end of file diff --git a/skills/vfs-content-search.json b/skills/vfs-content-search.json new file mode 100644 index 0000000..6598afb --- /dev/null +++ b/skills/vfs-content-search.json @@ -0,0 +1,9 @@ +{ + "name": "vfs-content-search", + "description": "Search the WebX11 Virtual File System for content by keyword or semantic concept.", + "tags": [], + "category": "general", + "created": "2026-06-08T20:27:43.111Z", + "updated": "2026-06-08T20:27:43.111Z", + "content": "---\nname: vfs-content-search\ndescription: Find files in the VFS by semantic concept (use NVFS) or by content keyword (use grep via run_command).\ncategory: dev\ntags: vfs,search,nvfs,grep,find\n---\n\n# VFS Content Search\n\n## Choose the right tool\n\n| You want to... | Use |\n|---|---|\n| Find files *about* a concept (semantic) | `nvfs_resolve(concept)` |\n| Find files *containing* a word (literal) | `run_command('grep -r \"word\" /')` |\n| List a directory | `list_files(path)` |\n| See index health | `run_command('nvfs-status')` |\n\n## Workflow for \"find files about X\"\n\n1. Check the NVFS index: `run_command('nvfs-status')`.\n - If index is stale or empty → `run_command('nvfs-index')` to rebuild. (May take seconds.)\n2. Call `nvfs_resolve('X')` — returns matching VFS files by concept, not exact name.\n3. Read the top result with `read_file(path)` to confirm relevance.\n\n## Workflow for \"find files containing the word 'X'\"\n\n1. Prefer `nvfs_resolve` first — it understands semantics.\n2. If NVFS misses, fall back to `run_command('grep -rl \"X\" /')` (recursive, files only).\n3. **Anti-loop note:** If grep returns empty ONCE, do not retry with a different path. Empty means empty.\n\n## Common mistakes\n- ❌ Calling `wpm_install neural-vfs` — NVFS is a CORE module, not a WPM package. Already loaded.\n- ❌ Using `read_file` to \"scan\" files one by one — use `grep` or `nvfs_resolve` instead.\n- ❌ Re-running `nvfs-index` repeatedly — once per session is enough unless files change drastically.\n\n## Rebuild the index\nRun `run_command('nvfs-index')` after:\n- Adding many new files\n- Major project restructure\n- `nvfs_resolve` returns obviously wrong results\n" +}
\ No newline at end of file diff --git a/skills/web-search-and-fetch.json b/skills/web-search-and-fetch.json index 4e1adb8..b2cbcb1 100644 --- a/skills/web-search-and-fetch.json +++ b/skills/web-search-and-fetch.json @@ -9,7 +9,7 @@ "api" ], "category": "research", - "created": "2026-06-06T02:32:54.006Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.507Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: web-search-and-fetch\ndescription: How to search the web and fetch URL content using the WebX11 proxy API\ntags: [search, fetch, web, proxy, api]\ncategory: research\n---\n## Steps\n1. **Search the web:**\n - Use search <query> or web_search(query) — uses /api/search which queries SearXNG + DDG fallback\n - Results include: title, url, content snippet, source engine\n - Always available (same-origin, no CORS issues)\n - 5-minute server-side cache for repeated queries\n - Alternative: use ddg or duck <query> for DuckDuckGo direct, or s <query> as alias\n\n2. **Fetch URL content:**\n - Use fetch <url> or web_fetch(url) — uses /api/extract which strips HTML, extracts clean text\n - Returns: title, content (up to 4000 chars), word_count, extraction method\n - SSRF protection blocks internal network addresses\n - 15-minute server-side cache\n\n3. **Search flags (via terminal search command):**\n - search <query> --summarize — adds AI-generated overview via Ollama\n - search <query> --fetch — fetches content snippets for top 3 results\n\n4. **When to use:**\n - User asks about current events, facts, research → use search <query>\n - User says \"read this article\" or provides a URL → use fetch <url>\n - For in-depth analysis: search first, then fetch top results" }
\ No newline at end of file diff --git a/skills/webdav-operations.json b/skills/webdav-operations.json index 02be73a..9c775f5 100644 --- a/skills/webdav-operations.json +++ b/skills/webdav-operations.json @@ -9,7 +9,7 @@ "storage" ], "category": "system", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T04:17:00.189Z", + "created": "2026-06-08T16:31:55.508Z", + "updated": "2026-06-08T19:49:09.059Z", "content": "---\nname: webdav-operations\ndescription: How to use WebDAV cloud storage for backup, file sync, and remote file access\ntags: [webdav, cloud, backup, sync, storage]\ncategory: system\n---\n## Steps\n1. **Configuration:**\n - webdav-config — configure WebDAV endpoint URL and credentials\n - Connection auto-tested on config; webdav-status shows connection health\n - Uses per-user token stored in .token file on the server side\n\n2. **File operations:**\n - webdav-ls [path] — list remote directory contents\n - webdav-push <local-path> <remote-path> — upload file to WebDAV\n - webdav-pull <remote-path> [local-path] — download file from WebDAV\n - webdav-explorer — GUI file browser for WebDAV\n - webdav-browser — CLI file browser for WebDAV\n\n3. **Backup & Restore:**\n - webdav-backup — push full VFS snapshot to WebDAV (creates /backups/newos4-<date>.json)\n - webdav-backup-list — list all remote backup snapshots\n - webdav-restore <filename> — restore VFS from a remote backup snapshot\n\n4. **Status & Diagnostics:**\n - webdav-status — connection status, last sync, space information\n - If uploads fail: check webdav-config, ensure .token file is valid\n - WebDAV runs on the same server (nginx with WebDAV module), no external dependency\n\n5. **When to use:**\n - Before factory-reset: webdav-backup to store VFS remotely\n - Cross-browser: webdav-push/pull to move files between instances\n - User says \"cloud backup\" or \"remote save\" → webdav-backup" }
\ No newline at end of file diff --git a/skills/world-model-sync.json b/skills/world-model-sync.json deleted file mode 100644 index 13f3a5c..0000000 --- a/skills/world-model-sync.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "world-model-sync", - "description": "Force synchronizes the AI's world model with the live system state.", - "tags": [ - "maintenance", - "agent-sync", - "v4.5" - ], - "category": "general", - "created": "2026-06-06T02:32:54.007Z", - "updated": "2026-06-06T02:32:54.007Z", - "content": "---\nname: world-model-sync\ndescription: Force synchronizes the AI's world model with the live system state.\ntags: [maintenance, agent-sync, v4.5]\n---\n# World Model Sync v4.5\n1. Call `list_agents` to get actual worker count and IDs.\n2. Call `get_status` to verify module and VFS health.\n3. Inject the following state into session context:\n - System Version: v4.5\n - Active Agents: [Count from list_agents]\n - Architecture: Orchestrator-led Event Bus\n - NVFS State: Async/Non-blocking\n4. Update internal memory to treat `orchestrator-0` as the primary dispatch node." -}
\ No newline at end of file |