SSE pause fix — deploy runbook
Gap: a legacy SSE session bound its engine at connect time, so pausing/disconnecting an AI did not stop an already-open session.
Fix: server/kit/pause.mjs liveAgentEngine re-reads pause/revoke on every spend call. Tests: server/test/t934-sse-pause.test.mjs (3 cases), t934-security.test.mjs.
Steps once approved:
- On production host: snapshot current kit (
tar czf kit-backup-$(date +%s).tgz kit), no deletion. - Copy
kit/pause.mjsand theliveAgentEnginewiring inkit/server.mjsfrom tagv0.1.0-build5+. npm teston host; restart service; verify: open SSE session → pause agent in app →kipurse_payreturnsagent_paused.- Rollback: restore the tarball and restart.
No caps, keys, or config change.
Source: docs/ops/SSE_PAUSE_DEPLOY.md