<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/modules/core/module-orchestrator.js, branch main</title>
<subtitle>newOS4 - the browser terminal that runs WebX11 user spaces</subtitle>
<id>https://newos.webx11.duckdns.org/newos4/atom?h=main</id>
<link rel='self' href='https://newos.webx11.duckdns.org/newos4/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/'/>
<updated>2026-11-06T10:45:21+00:00</updated>
<entry>
<title>release(v4.6.150): commit the module work that has been live but uncommitted</title>
<updated>2026-11-06T10:45:21+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-11-06T10:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=03143a6e88832d06c7b08cdbf8de96ba79bda7d6'/>
<id>urn:sha1:03143a6e88832d06c7b08cdbf8de96ba79bda7d6</id>
<content type='text'>
Operator commit-approve, 2026-11-06. These changes have been served since
2026-11-02/03 while git HEAD still stamped v4.6.146, so the mirror published a
tree four builds behind the running instance and the release tag named the
wrong build.

module-orchestrator.js — orchestrate-parallel reported success it could not
prove. Results are now recorded by sub-task id through a resultSink handed to
delegateTask (harvest matched by currentTask/lastTask strings, which a later
delegation on the same agent overwrote, losing finished work as "agent not
found"); the tally counts summaries with status ok instead of
Promise.allSettled resolutions (a spawn refusal fulfils with undefined and used
to print green); and a busy agent is no longer reused at pool cap, where two
siblings erased each other's lease. Guard:
modules/test/test-orchestrator-parallel-harvest.js (16 cases, reproduces the
one-agent three-sub-task cap case that printed 3/3 succeeded).

module-billing.js — the balance said "not signed in — newOS4 sends no session
token", which was already false: the browser sends the HttpOnly cookie and
parse_bearer_token() falls back to it. `cost` is on by default (the flag was
opt-in and nobody knew the command existed; `cost off` opts out) and the
command now prints today's platform spend from GET /api/billing/usage?days=1
alongside the session estimate.

modules/ext/webdav.js — the inline WebView detector missed "Version/4.0"
Android WebViews, including the operator's own phone, so the login offered a
Telegram widget that cannot complete there. It now delegates to
modules/wx11-tg-webview.js when the page loaded it and keeps a matching
fallback (wv token, Version/4.0-Android, Telegram, FBAN/Instagram/Line).

modules/ext/media.js — text analysis model renamed deepseek-v4-flash -&gt;
deepseek-v4.1-flash in both the field and the printed label.

main.html + module-loader.js — v4.6.146 -&gt; v4.6.150 in LATEST_VER and the three
asset queries; core-bundle.js rebuilt (rebuild-bundles.py reports it already
in sync, 1,250,569 bytes).

Verified: node --check on all six scripts and the new test; the 16-case
orchestrator guard passes against the deployed bundle (ORCH_SRC=...); bundle
rebuild is a no-op; core-bundle.js?v=v4.6.150 answers 200.
</content>
</entry>
<entry>
<title>fix(newos4): read_file pages were silently truncated; delegation no longer invents "completed"</title>
<updated>2026-11-02T20:21:24+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-11-02T20:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=e2f36467748943639c960453549b6b91c8cc7ab2'/>
<id>urn:sha1:e2f36467748943639c960453549b6b91c8cc7ab2</id>
<content type='text'>
Two defects found by re-deriving a report that claimed both were still open.

read_file paging (module-aiassist.js)
- A page larger than the result clip was clipped AFTER read_file had computed
  next_offset. On the last page next_offset is null, so the model was told
  truncated:false while its tail had been removed: measured 11 890 of 19 999
  chars delivered, returned:19999, no pointer to the rest - 8 109 chars lost
  with no way to ask for them.
  * the clip now sets truncated=true and next_offset=offset+keep when it removes
    the tail of a page that had no continuation (and never splits a surrogate pair)
  * read_file caps a page at the result budget (min(pageCap, toolResultChars-200)),
    so a page is always delivered whole and next_offset is exactly contiguous
  Live v4.6.143: 19 999-char file -&gt; page 11 800 (next_offset 11 800), page 2
  8 199 (next_offset null): 11 800 + 8 199 = 19 999, nothing withheld. A model
  asking for limit:32000 is clamped to 11 800 and told truncated:true.
  The ~500-char symptom was the 500-char floor: a caller passing limit:200 gets
  500, which is why targeted sed -n reads looked better than the tool.

Delegation reporting (module-orchestrator.js, module-aiassist.js)
- chat() returning {content} was already fixed in 8a9333b, but three other places
  still substituted the word "completed" for an absent answer, so the symptom
  survived: delegateTask's outbox wrote status:'completed' even when the worker
  returned nothing; the delegate_task tool returned {success:true, result:"completed"};
  orchestrate-parallel summarised an unmatched agent as {status:'ok',
  result:'completed (agent recycled)'} and a missing outbox as "completed (no outbox)".
- Now: an empty/undefined answer is status 'failed' with error 'agent produced no
  answer' / 'no result in outbox' / 'agent not found — result unverifiable', and
  the tool returns success:false with result:null.

Tests: test-delegation-reporting.js 6 (RED 3/6 against HEAD: D3/D4 success:true,
D5 the literal "completed"), test-tool-context-bound 26 with E6-E8 (RED 24/2:
truncated:false, next_offset null). maintain 27/27.
</content>
</entry>
<entry>
<title>fix(newos4): agent registration is absolute-path and honest about what it stored</title>
<updated>2026-10-27T14:33:33+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-27T14:33:33+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=c1792f0b09990af95eed2ccfbe3d365902147547'/>
<id>urn:sha1:c1792f0b09990af95eed2ccfbe3d365902147547</id>
<content type='text'>
Three of the four agent-cluster items, each with a test that is red on HEAD.

- MAINT-008 (module-agent-registry.js + module-orchestrator.js): registerAgent took args[0] as the
  agent id and only args[1] as the capability list, while both orchestrator callers passed the
  command word first — so the boot log read "Agent 'register' registered with 1 capabilities" and
  four capabilities were stored as one. The command word is now stripped, args[1..] are joined and
  split on commas (both "a,b" and "a b c" work), and the callers pass [id, ...caps].
- MAINT-007 (registry + aiassist): mkdir/rm used relative paths, so a registration made from /docs
  created /docs/agents/&lt;id&gt; and an unregister from any other cwd removed nothing — the leaked
  directories the report suspected. Every path in the registry (and the four /_sessions writes in
  module-aiassist.js) is absolute now.
- MAINT-009 (listAgents): a directory alone counted as a registered agent, so a hand-made
  /agents/foo appeared as "foo — unknown (0 capabilities)". Only a readable status.json with an id
  counts now; the rest are reported as unregistered directories.

Verification: test-agent-registry.js (11 asserts). RED on HEAD: 9 of 11 fail, including the exact
`✅ Agent 'register' registered with 1 capabilities` line and `hand-made — unknown (0
capabilities)`. Suite 15/15 files green; maintain --fix "node tests 15/15 pass".
Live on v4.6.109: boot prints "✅ Agent 'orchestrator-0' registered with 4 capabilities";
`agent-list` warns "1 directory(ies) in /agents have no status.json (not registered): hand-made";
register from / with a comma list stores 3; unregister from /docs removes the directory and leaves
no /docs/agents.

MAINT-006 stays open with a narrower note: the hard stop was only reachable when every call in a
batch was blocked, so a mixed batch (one repeated + one novel call) never ended. The same ceiling
now applies on the mixed path, but that branch lives inside agenticLoop and is not covered by a unit
test — it needs a live agent run that repeats a call.
</content>
</entry>
<entry>
<title>fix(newos4): outboxResult scoped, markdown mime, old reply path retired (v4.6.81)</title>
<updated>2026-10-23T18:59:29+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T18:59:29+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=bc99dfba1898123ea824de98a2d5a06e996ed667'/>
<id>urn:sha1:bc99dfba1898123ea824de98a2d5a06e996ed667</id>
<content type='text'>
delegateTask declared `const outboxResult` inside the AI branch and returned it outside, so a
delegation with the AI module missing threw 'outboxResult is not defined'. The catch turned that
into _handleAgentFailure: the worker stayed idle with no result while spawn_agent reported ok —
the reported symptom exactly. Now function-scoped, and the no-module path returns
'queued — AI module not loaded, nothing executed' rather than claiming 'completed'.

Also: nginx served _docs/*.md as application/octet-stream (no .md type) — now text/markdown +
nosniff; agent-replies.php returns 410 for GET as well as POST, so there is one reply path.

Verified: with the AI module deleted at runtime, delegateTask returns the queued string and
throws nothing.
</content>
</entry>
<entry>
<title>feat(newos4): on-demand worker labels and a server-canonical predictor store (v4.6.70)</title>
<updated>2026-10-23T17:01:46+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T17:01:46+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=b0f90494fa00e787f8e9d34368febf2e7e26e8a6'/>
<id>urn:sha1:b0f90494fa00e787f8e9d34368febf2e7e26e8a6</id>
<content type='text'>
Two decisions recorded by the operator on 2026-10-23, implemented.

6 — spawn-on-demand is the design, so stop reporting it as a defect:
- OrchestratorModule counts delegations inside delegateTask()
- status prints "Mode: on-demand — N/M worker(s) available, X delegation(s) this
  session" and drops the "spawning is not dispatching" warning
- per-agent lines read "available, no delegations yet (spawned ...)" / "N
  delegation(s), last ..."

10 — per-user, server file canonical, browser VFS a TTL'd read-through cache:
- store = the user's own WebDAV space (&lt;space&gt;/_data/predictor.json), so identity
  comes from credentials the app already has; no new endpoint, no unauthenticated
  write surface
- 5 min TTL: cache wins while fresh, server wins when it differs; a banner naming
  both counts prints only on divergence
- write-through on save (debounced 5 s) with a MKCOL retry when the collection does
  not exist yet; store mode is printed by predictor-status
- the cache write is guarded and verified — a missing /system/metrics made writeFile
  fail silently, which is how the first version lost a pull

Verified live on v4.6.70 with a stubbed transport: pull applies 5 pts/5 paired and
writes a stamped cache, the divergence banner fires once and not on the second
(equal) pull, write-through PUT is issued, status reads "Store: server". A real
WebDAV round-trip still needs the user's WebDAV config in-app; the agando space has
no _data collection yet, so GET returns 404 -&gt; "server (empty)".
</content>
</entry>
<entry>
<title>feat(newos4): agent status says never-scheduled vs waiting; `guides` command (v4.6.63)</title>
<updated>2026-10-23T16:22:30+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T16:22:30+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=5d9fb104317f800dff9f01920c3a34fdd4fd9911'/>
<id>urn:sha1:5d9fb104317f800dff9f01920c3a34fdd4fd9911</id>
<content type='text'>
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".
</content>
</entry>
<entry>
<title>fix(newos4): stop agent accumulation on reload — stable role ids + boot reconciliation</title>
<updated>2026-10-18T16:42:00+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-18T16:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=623717700ee9677e82ba29eab7170b1b25a16068'/>
<id>urn:sha1:623717700ee9677e82ba29eab7170b1b25a16068</id>
<content type='text'>
- spawnAgent() accepts an idHint and is idempotent; boot team uses agent-&lt;role&gt;
- _reanimateFromVFS() adopts newest dir per default role, fs.rm()s duplicates/orphans
- _bootAgents() awaits async VFS hydration before reconciling, then spawns only gaps
- scripts/test-agents-reload.js: 5-boot regression + hydration-race test
- v4.6.44 bundle rebuild + cache-bust
</content>
</entry>
<entry>
<title>newOS4 v4.6.30: per-agent session isolation (D1)</title>
<updated>2026-10-18T14:30:46+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-18T14:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=4de231bc9a869ef5049224ad43e2200a882b424c'/>
<id>urn:sha1:4de231bc9a869ef5049224ad43e2200a882b424c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>newOS4 v4.6.29: progress-aware loop guard + agent attribution</title>
<updated>2026-10-18T14:25:57+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-18T14:25:57+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=c2863016f1708e4638640aac38d4cbadd495dbde'/>
<id>urn:sha1:c2863016f1708e4638640aac38d4cbadd495dbde</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto: 2026-07-09_06:00 changes</title>
<updated>2026-07-09T04:00:32+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-07-09T04:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=cf7461ffeb4f53f3f50c9c692a2e4fdcecf17e82'/>
<id>urn:sha1:cf7461ffeb4f53f3f50c9c692a2e4fdcecf17e82</id>
<content type='text'>
</content>
</entry>
</feed>
