<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/api/debug/agent-replies.php, 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-10-23T18:59:29+00:00</updated>
<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(chat): token-scoped chat endpoints, contract, host CLI, old POST retired (v4.6.71 phase B)</title>
<updated>2026-10-23T17:29:31+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T17:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=0d2365ab202ba5c9b1d0604467af0594dc7360de'/>
<id>urn:sha1:0d2365ab202ba5c9b1d0604467af0594dc7360de</id>
<content type='text'>
- api/chat/{lib,post,poll}.php: thread = sha256(token)[0:16]; flock read-modify-write;
  tmp+rename; ms epoch cursor; per-thread + per-IP windows with retry_after_ms;
  401/413/507/405 carry a machine code, only rate_limited is retryable
- _docs/chat-contract.md: frozen shapes, incl. why the cursor is ms and not ts
- scripts/chat.py: list/show/reply, UTC, locked, atomic replace
- api/debug/agent-replies.php POST -&gt; 410 Gone with pointers (one write path)

Measured: 401 no-token, 201+id, poll 1 msg, poll&gt;since 1 new, data/chat 403,
4001 chars 413 (codepoints), 429 with Retry-After 576, round trip via chat.py.
</content>
</entry>
<entry>
<title>feat(newos4): maintenance agent channel — triage engine, two-way replies, cron</title>
<updated>2026-10-23T12:39:38+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-23T12:39:38+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=25833fb43a0ed3e9c7522dfb6a78f29dfd947720'/>
<id>urn:sha1:25833fb43a0ed3e9c7522dfb6a78f29dfd947720</id>
<content type='text'>
- scripts/newos4-triage.py: deterministic collector (records vs occurrences, real vs
  noise vs self-referential, new reports since last run, checker WARN/FAIL). Untrusted
  strings are sanitised and prefixed DATA| before they can reach an agent prompt;
  state + output written under flock with mode 644.
- scripts/newos4-reply.py: appends one reply to data/maintenance/replies.json under
  flock. Hermes writes here instead of POSTing with an admin cookie, so an expired
  session can never look like a delivered reply.
- api/debug/agent-replies.php: GET/POST (admin-gated by nginx) half of the thread.
- api/debug/report.php: accepts thread + kind=maintenance so in-app feedback is
  distinguishable from operator bug reports.
- terminal: `feedback &lt;message&gt;` and `feedback-inbox` commands; help.html rows added
  (help coverage 357/357, modules-index regenerated).

Live proof: `feedback "…"` filed RPT-20261023-123825-781fba86 with thread
thr-glmfwae2 and kind=maintenance; agent-replies GET returned the posted reply, POST
returned 201; triage first run reported 9 new reports, second run 0.
Cron: newos4-maintenance (7e3b326daa4c) daily 07:15, newos4-skills-weekly
(cb6bc2a16216) Mondays 06:30.
</content>
</entry>
</feed>
