From 9f60030e39feecc76f11671a4b9d82303c83670c Mon Sep 17 00:00:00 2001 From: Agando Date: Tue, 9 Jun 2026 06:00:43 +0200 Subject: auto: 2026-06-09_06:00 changes --- modules/core/module-aiassist.js | 133 ++++++++------------------------------ modules/core/module-fs.js | 6 +- modules/core/module-loader.js | 5 +- modules/core/module-neural-vfs.js | 5 ++ modules/core/module-system.js | 92 +++++++++++++++++--------- modules/core/terminal.js | 37 +++++++++-- modules/core/virtual-fs.js | 7 ++ 7 files changed, 140 insertions(+), 145 deletions(-) (limited to 'modules/core') 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