aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-fs.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-23 18:22:30 +0200
committerAgando <roduccomm@gmail.com>2026-10-23 18:22:30 +0200
commit5d9fb104317f800dff9f01920c3a34fdd4fd9911 (patch)
treef8997c774d0464b1dede65e148868811abc584b8 /modules/core/module-fs.js
parent9f88966abe5d0665c9fd42dbb91c0c83fcf806bf (diff)
feat(newos4): agent status says never-scheduled vs waiting; `guides` command (v4.6.63)
Packet 6 and 7. 6 — four agents showed `sleeping` and nothing distinguished "waiting for work" from "never handed a task". Added tasksAssigned/lastTaskAt to the agent record (counted where a task is actually assigned), and the status line now reads idle — NEVER SCHEDULED (0 tasks since 2026-10-23 16:22) idle — waiting for work (3 task(s), last 2026-10-23 16:22) parked — NEVER SCHEDULED ... plus "Dispatch: 0/3 agent(s) have ever been given a task" and a warning that spawning is not dispatching. 7 — /guides/ was reachable by nobody. New `guides` command lists it newest-first with sizes and the preview/cat hints; help.html gained a Guides nav entry and section with links to the published guides. Verified live on v4.6.63: `guides` → 2 entries after seeding two files; orchestrator-status shows 3x NEVER SCHEDULED on a fresh session (the packet's own observation), and "waiting for work (3 task(s) ...)" once a counter is set, with "Dispatch: 1/3".
Diffstat (limited to 'modules/core/module-fs.js')
-rw-r--r--modules/core/module-fs.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/core/module-fs.js b/modules/core/module-fs.js
index f93553a..fd1dfc1 100644
--- a/modules/core/module-fs.js
+++ b/modules/core/module-fs.js
@@ -72,6 +72,22 @@ class FileSystemModule {
if (!capturing && typeof this.terminal.printClickable === 'function') this.terminal.printClickable(filtered);
}
};
+ this.commands['guides'] = (args) => {
+ // v4.6.63: /guides/ was reachable by nobody — the AI writes guides there, and the
+ // only way to find one was to guess its filename (packet §7). One command, newest first.
+ let items = [];
+ try { items = this.terminal.fs.readDir('/guides') || []; } catch (e) { items = []; }
+ const docs = items
+ .filter(f => f && f.type !== 'dir' && /\.(html?|md|txt)$/i.test(f.name))
+ .sort((a, b) => (b.mtime || 0) - (a.mtime || 0));
+ if (!docs.length) {
+ this.terminal.print('No guides in /guides/ yet.', 'info');
+ this.terminal.print(' Guides written by the AI land here — `guides` lists them, `preview <name>` renders HTML, `cat <name>` shows markdown.', 'text-muted');
+ return;
+ }
+ this.terminal.print(`📚 Guides (${docs.length}) — preview <name> for HTML, cat <name> for markdown`, 'header');
+ docs.forEach(f => this.terminal.print(` ${f.name} ${f.size || 0} B`, 'info'));
+ };
this.commands['cat'] = (args) => {
if(!args[0]) return this.terminal.print('Usage: cat <filename>', 'warning');
const content = this.terminal.fs.readFile(args[0]);