Add persistent AFK reserves and recovery (Refs #151)
CI / checks (push) Successful in 7m7s

This commit is contained in:
2026-10-17 16:57:26 -04:00
parent 7f2205e9c4
commit d723f23d67
22 changed files with 2646 additions and 16 deletions
+19
View File
@@ -1101,3 +1101,22 @@ host credential; journal URLs never determine request destinations. Upgrade
agents first, then [rebuild servers changing bank endpoints](bank.md#upgrading-from-a-controller-derived-game-endpoint)
to drain pending decisions before the new scripts start. See the
[agent changelog](../../agent/CHANGELOG.md) for release and validation details.
### AFK journals during server teardown
Install agent **1.12.0+** before enabling [persistent AFK reserves](afk.md).
The `afk.settlement` capability adds stopped-process recovery for
`tws-afk/t5/` and `tws-afk/t6/` journals. The agent uses its enrolled controller
and assigned unfinished teardown operation at `/api/agent/afk/settle`.
Journal endpoints must match the fixed public AFK endpoint; they never control
the destination of an agent request.
Removal, rebuild and creation cancellation preserve runtime files until every
decision is acknowledged. Prepared sessions that never activated return their
reservation; confirmed stops retain their original elapsed seconds and IDs.
Active sessions interrupted by a crash become unresolved, retaining their
checkpoint and balance hold for administrator reconciliation. The agent does
not invent a duration from the time of its next heartbeat. Pending purchase or
reward requests only retrieve existing receipts during teardown; they cannot
create new spending after the game stopped. Corrupt, oversized, symlinked or
unacknowledged journals block runtime deletion.