1.8 KiB
1.8 KiB
| @aoagents/ao-core | @aoagents/ao-cli | @aoagents/ao-plugin-agent-opencode |
|---|---|---|
| patch | patch | patch |
opencode: bound /tmp blast radius and consolidate session-list cache
Addresses review feedback on PR #1478:
- TMPDIR isolation. Every
opencodechild we spawn now points at
~/.agent-orchestrator/.bun-tmp/viaTMPDIR/TMP/TEMP. Bun's
embedded shared-library extraction lands there instead of the system
/tmp, so the cli janitor only ever sweeps AO-owned files. Other
users' or other applications' Bun artifacts on a shared host can no
longer be touched by the regex. - Single shared session-list cache. Core and the agent-opencode
plugin previously kept independent caches; per poll cycle the system
spawned at least twoopencode session listprocesses instead of
one. Both consumers now use the shared cache exported from
@aoagents/ao-core(getCachedOpenCodeSessionList). - TTL no longer covers the send-confirmation loop. The cache TTL
dropped from 3s to 500ms so the
updatedAt > baselineUpdatedAtdelivery signal in
sendWithConfirmationactually fires. Concurrent callers still
share the in-flight promise. - Delete invalidates the cache.
deleteOpenCodeSessionnow calls
invalidateOpenCodeSessionListCache()on success so reuse, remap,
and restore code paths cannot observe a deleted session id within
the TTL window. - Janitor reliability.
sweepOncenow filters synchronously
before allocating per-file promises (matters on hosts with thousands
of/tmpentries), andstopBunTmpJanitor()is now async and awaits
any in-flight sweep so SIGTERM cannot exit whileunlinkis mid-flight. - Janitor observability. The sweep callback in
ao startnow logs
successful reclaims, not just errors, so operators can confirm the
janitor is doing useful work.