Repository navigation
v0.4.3 — AutoBG fires at 1 minute + cross-process fire lock
AutoBG retimed and made multi-process safe (real-machine findings from live debug logs):
- 1-minute threshold (was 2 min):
THRESHOLD_MS = 60_000. Real long runs (downloads/builds/curl) today live 3-6 min; firing at 1 min keeps the foreground yours much sooner. - Warn checkpoint moved to T-15s (45s elapsed):
AutoBG: 15s — "bash" moves to background automatically— one toast, still one-shot. - Cross-process fire lock: machines running several OpenCode processes simultaneously were firing one POST per process (log showed
firex3). An NTFS-atomicwxlock file (.autobg-fire-<sid>.lock, 10s TTL) makes exactly one process move the session; the rest stand down and logautobg lock held … another process fired first. Stale locks (>10s) are taken over. - Client-shape probe: one-time
autobg client keys:dump into debug.log — documents where YOUR build hides (or dropped) the toast API; the duck now also triesclient.tui.toast,client.tui.toastShow,client.toast. - Evidence trail: unmapped sessions (subagent children / pre-map) now log
autobg skip unmappedinstead of failing silently — "why didn't it fire" is always answerable from debug.log now.
Update: copy index.ts, lib.ts, autobg.ts, package.json into ~/.config/opencode/plugins/model-badges/ and restart OpenCode.
35-test suite green on node 22 + node 24 (includes 2 new lockfile behavior tests).