From 6aed9c9e0252b0c8f681a358e5a8707271454137 Mon Sep 17 00:00:00 2001 From: Agando Date: Mon, 1 Jun 2026 06:00:39 +0200 Subject: auto: 2026-06-01_06:00 changes --- cheatsheet.html | 166 ++++++++++++++++++++++++++ help.html | 254 ++++++++++++++++++++++++++++++++++++---- main.html | 73 +++++++++++- modules/core/module-aiassist.js | 10 +- modules/core/module-loader.js | 2 +- modules/core/ollama-manager.js | 72 +++++++++++- modules/core/terminal.js | 58 ++++++--- modules/ext/busybox.js | 8 +- 8 files changed, 589 insertions(+), 54 deletions(-) create mode 100644 cheatsheet.html diff --git a/cheatsheet.html b/cheatsheet.html new file mode 100644 index 0000000..4cb4a1f --- /dev/null +++ b/cheatsheet.html @@ -0,0 +1,166 @@ + + + + + +newOS4 — Quick Reference + + + + +

⚡ newOS4 Quick Reference

+
WebX11 v4.2 · Full docs → · Ctrl+P to print
+ +
+ +
+

🟢 Basics

+
+
helpShow all commands
+
help <cmd>Details for a command
+
lsList files
+
cd <dir>Change directory
+
pwdPrint working dir
+
clear / clsClear terminal
+
cat <file>View file
+
touch <file>Create empty file
+
mkdir <dir>Create directory
+
rm <file>Remove file
+
cp <src> <dst>Copy file
+
mv <old> <new>Move/rename
+
edit <file>Open code editor
+
find <name>Search files
+
grep <str>Search inside files
+
treeDir tree view
+
+ +

🤖 AI

+
+
ai "..."Ask AI assistant
+
ask "..."Alias for ai
+
ai-modelList/switch model
+
ai-clearReset conversation
+
ai-systemShow/edit system prompt
+
ai-contextView AI context
+
ai-stopCancel AI
+
+ +

🧩 Modules

+
+
modules / listmodsList loaded modules
+
loadmod <url>Load module from URL
+
startup-modulesConfigure boot modules
+
tutorialInteractive tour
+
+ +

🦙 Ollama

+
+
ollamaOpen Ollama panel
+
modelsList available models
+
model-pull <name>Download a model
+
+ +

📡 Network

+
+
search <q>Web search
+
fetch <url>Fetch web page
+
ddg <q>DuckDuckGo search
+
serverStart/status server
+
+ +
+ +
+ +

🔧 Tools

+
+
calc <expr>Calculator
+
cron-every <s> <cmd>Schedule repeating
+
cron-list / cron-stopManage jobs
+
wpmPackage manager
+
mindmapBrainstorming tool
+
webdav-statusCloud sync status
+
webdav-push / pullSync files
+
theme <name>Change theme
+
voiceSpeech-to-text
+
chatChat overlay
+
gzip / gunzipCompress files
+
encrypt / decryptAES-256 encrypt
+
+ +

🐚 Shell

+
+
export <K>=<V>Set variable
+
script <file.sh>Run shell script
+
setList variables
+
cmd1 ; cmd2Sequence
+
cmd1 && cmd2Chain (AND)
+
cmd1 || cmd2Chain (OR)
+
cmd1 | cmd2Pipe
+
cmd > fileRedirect output
+
+ +

🖥️ System

+
+
statusSystem health
+
memMemory usage
+
echo <text>Print text
+
date / calDate & calendar
+
whoami / hostnameUser & machine
+
logs <n>View recent logs
+
logrotateRotate log files
+
configConfig manager UI
+
+ +

🔒 Security

+
+
securityShow current level
+
security-level 0-3Set level
+
+
+

Level 0 = permissive · 1 = standard (default) · 2 = paranoid · 3 = audit

+
+ +

⌨️ Shortcuts

+
+
↑ / ↓Command history
+
TabAutocomplete
+
Ctrl+KQuick Commands panel
+
EscCancel AI / close
+
Ctrl+LClear terminal
+
+ +
+
+ + + + + diff --git a/help.html b/help.html index 78cf3f0..484c20d 100644 --- a/help.html +++ b/help.html @@ -10,26 +10,26 @@ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent} :root{ --bg:#0a0a14; - --bg2:#111122; - --bg3:#16162a; - --bg4:#1c1c36; - --text:#d0d0e8; - --text2:#8888aa; - --accent:#7c5cfc; + --bg2:#141428; + --bg3:#1c1c36; + --bg4:#24244a; + --text:#e8e8ff; + --text2:#b0b0cc; + --accent:#818cf8; --accent2:#a78bfa; --green:#34d399; --cyan:#22d3ee; --amber:#fbbf24; --rose:#fb7185; --pink:#e879f9; - --border:#2a2a4a; + --border:#3a3a5a; --radius:12px; --font-mono:'JetBrains Mono','Fira Code','Cascadia Code','Courier New',monospace; --font-sans:-apple-system,BlinkMacSystemFont,'Segoe UI','Inter','SF Pro',Roboto,sans-serif } html{scroll-behavior:smooth} -body{background:var(--bg);color:var(--text);font-family:var(--font-sans);line-height:1.7;font-size:15px;-webkit-font-smoothing:antialiased} -@media(max-width:600px){body{font-size:13.5px}} +body{background:var(--bg);color:var(--text);font-family:var(--font-sans);line-height:1.8;font-size:17px;-webkit-font-smoothing:antialiased} +@media(max-width:600px){body{font-size:15px}} /* ── Header ── */ header{ @@ -206,6 +206,20 @@ footer .tagline{color:var(--accent2);margin-top:10px;font-weight:500} .quick-ref-grid{grid-template-columns:1fr} .badge-new{display:none} } + +/* ── Doc Tabs ── */ +.doc-tabs{display:flex;gap:0;margin-bottom:32px;border-bottom:1px solid var(--border);flex-wrap:wrap} +.doc-tabs input{display:none} +.doc-tabs label{ + flex-shrink:0;padding:12px 20px;cursor:pointer;font-size:.82em;font-weight:600; + color:var(--text2);border-bottom:2px solid transparent;transition:all .15s; + font-family:var(--font-sans);user-select:none;-webkit-user-select:none +} +.doc-tabs label:hover{color:var(--text)} +.doc-tabs input:checked+label{color:var(--accent2);border-color:var(--accent2)} +.doc-tab{display:none} +.doc-tab.active{display:block} + @@ -250,19 +264,160 @@ footer .tagline{color:var(--accent2);margin-top:10px;font-weight:500}
+
+ + + + + + +
+
+
+

🚀 Welcome to newOS4

+
+ 🎮 New here? + Type tutorial in the terminal to start a 2-minute interactive tour! +
+
+

🖥️ Terminal OS

Full virtual filesystem with ls, cd, cat, touch, edit, find, grep and 50+ Unix-like commands.

+

🤖 AI Assistant

Built-in AI agent with tool calling, skills, memory, and 28 tools. Just type ai "your question".

+

🧩 Module System

40+ modules including cron, mindmap, calculator, voice, WebDAV, themes, and shell scripting.

+

📚 Skills

Self-improving AI remembers workflows and teaches you new capabilities — type skill-list to see what's installed.

+
+
+ +
+

🔤 First 6 Commands

+
+
+
helpShow all commands
+
lsList files
+
catView file content
+
clearClear terminal
+
touchCreate a file
+
aiAsk the AI assistant
+
+
+

📋 Workflow

+
    +
  1. Type help — see every available command
  2. +
  3. Type ls — browse files in your virtual drive
  4. +
  5. Type touch hello.txt — create a file
  6. +
  7. Type edit hello.txt — write something and save
  8. +
  9. Type ai "summarize this" — let AI analyze your files
  10. +
  11. Type status — check system health
  12. +
+
+ +
+

🔧 Quick Start

+

Type help to see all 130+ commands grouped by category. Use help <command> for details on a specific one.

+

The 📋 Quick Commands panel (Ctrl+K) has clickable cards for common tasks.

+

For the full reference, switch to the 📘 User Guide tab — it covers every module, filesystem, AI, skills, configuration, and all extended modules in detail.

+
+
+
+
+

🔧 Module Development API

+

Ext Module Structure

+

Modules are ES6 classes with 3 required and 1 optional method:

+
class MyModule {
+  constructor() { this.commands = {}; this.terminal = null; }
+  requirements() { return { met: true, missing: [] }; }
+  getHelpInfo() { return { 'mycmd': 'mycmd — What it does' }; }
+  registerCommands() { this.commands['mycmd'] = (args) => { /* ... */ }; }
+}
+// Auto-register:
+if (typeof window.webx11 !== 'undefined' && window.webx11) {
+  webx11.moduleManager.registerModule(new MyModule(), 'url');
+}
+ +

VFS (Virtual FileSystem) API

+

Access via this.terminal.fs:

+
+ + + + + + + + + + + + +
MethodReturnsDescription
readFile(path)string or nullRead file content
writeFile(path, content)booleanWrite string to file
ls(path)arrayList directory entries
mkdir(path)booleanCreate directory
rm(path)booleanRemove file
rmdir(path)booleanRemove empty directory
touch(path)booleanCreate empty file
cd(path)booleanChange current directory
pwd()stringCurrent directory path
mv(old, new)booleanMove/rename file
cp(src, dst)booleanCopy file
+ +

AI Tool Definition Format

+

Add tools to module-aiassist.js in getToolDefinitions() (around line 300):

+
{
+  type: 'function',
+  function: {
+    name: 'my_tool',
+    description: 'What it does — AI reads this to decide when to call it.',
+    parameters: { type: 'object', properties: {
+      paramName: { type: 'string', description: 'What this param does' }
+    }, required: ['paramName'] }
+  }
+}
+

Then add a case 'my_tool': handler in runTool() (around line 1000). Return JSON.stringify(...).

+
+ +
+

Skill Format

+

Skills are markdown files with YAML frontmatter, stored in /skills/ in VFS:

+
---
+name: my-skill
+description: Brief description
+tags: [tag1, tag2]
+---
+# Skill Body
+
+Instructions, examples, and workflows here.
+
+ +
+

OllamaManager API

+
+ + + + + + + +
Property/MethodDescription
.endpointCurrent Ollama API URL
.currentModelActive model name
.modelsArray of available models
.connectedBoolean connection state
.connect()Connect to Ollama, load models
.chatWithTools()AI chat with tool calling support
+
+ +
+

window.webx11 Global

+

The terminal instance is exposed globally as window.webx11 (aliased as webx11). This gives access to everything:

+
webx11.fs                    // VFS instance
+webx11.moduleManager        // Module registry
+webx11.ollamaManager        // Ollama connection
+webx11.security             // Security manager
+webx11.executeCommand(cmd)  // Run a terminal command programmatically
+webx11.print(text, type)    // Print to terminal output
+webx11.tutorialModule       // Tutorial progress (if active)
+webx11.inputField           // DOM input element
+
+
+

⛅ Overview

WebX11 v4.2 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.

🧩 26 Core + 14 Ext

Modules loaded at startup. Shell with pipes, redirects, vars, and scripts.

-

🤖 Agent with Tools

15+ tools — file ops, web search, skills, modules. Destructive action confirmations with inline bar + countdown.

+

🤖 Agent with Tools

28 tools — file ops, web search, skills, modules. Destructive action confirmations with inline bar + countdown.

📚 Skills System

Persistent procedural memory. Create, patch, search, export skills for repeatable workflows.

💾 VFS + Sessions

Virtual filesystem persists in localStorage. Save/load/export sessions.

🎤 Voice Input

Speech recognition in the terminal. Works in Chrome, Edge, Safari.

@@ -441,14 +596,14 @@ diff a.txt b.txt

🤖 AI Assistant

Tool-Calling Agent - The AI runs a full agent loop with 15+ tools: filesystem, web search, URL fetch, skills, WPM, session memory, user profile, module introspection. + The AI runs a full agent loop with 28 tools: filesystem, web search, URL fetch, skills, WPM, session memory, user profile, module introspection.

How It Works

  1. Type ai <request>
  2. AI loads relevant skills + recent session memory
  3. -
  4. Decides which tools to call (up to 5 turns)
  5. +
  6. Decides which tools to call (up to 8 turns)
  7. Destructive tools trigger an inline confirm bar — no dark overlay
  8. 120s countdown: yellow → bold red at 30s → pulsing at 10s
  9. Type ai-allow / ai-deny or tap the buttons
  10. @@ -578,6 +733,7 @@ ollamaconnect ddg / duckDDGDuckDuckGo fallbackddg news today fetch / webFetcherFetch URL contentfetch https://example.com extractFetcherClean readable textextract https://news.article + imagesSearXNGImage searchimages cats

The AI agent also has web_search and web_fetch tools using the same APIs.

@@ -931,6 +1087,10 @@ listmods
+
+

📄 One-page Quick Reference cheat sheet — printable, dark mode, all commands.

+
+

📋 Changelog

@@ -955,7 +1115,7 @@ listmods
  • Diff — diff a b LCS-based comparison + diff --module
  • Aliases — ll, h, cls defaults + custom alias definition
  • File Finder — find <query> recursive VFS search
  • -
  • Agent loop: capped at 5 turns (was 1), edit_module destructive confirmation, model auto-validation
  • +
  • Agent loop: capped at 8 turns (was 1), edit_module destructive confirmation, model auto-validation
  • ai-stop now cancels chat + stream, not just tool calls
  • Unknown commands awaited, "Command not found" suppressed on AI route
  • loopResult scope fix — no more undefined error on AI fail
  • @@ -967,7 +1127,7 @@ listmods
    v4.12026-05-23
      -
    • AI Agent with full tool-calling loop (15+ tools)
    • +
    • AI Agent with full tool-calling loop (28 tools)
    • Inline destructive confirmation bar with 120s countdown timer
    • Skills system (8 CLI commands + UI modal)
    • Voice input (🎤 button, SpeechRecognition, show/hide toggle)
    • @@ -997,6 +1157,7 @@ listmods
    +