Crash-Safe Action Journal
Writes down every outside action before running it so crashes never cause double charges or duplicate writes.
A 30-second API timeout causes the agent to retry — accidentally issuing the same $5,000 refund twice.
The timeout locks in UNKNOWN, blocks duplicate retries, and puts one clear item in the operator inbox to verify.
What It Does (In Plain English)
Before any write tool touches an external system (like sending a refund or updating a CRM), Operation Journal saves a PREPARED receipt with a unique operation key. If the network times out mid-call, it marks the action UNKNOWN and locks retries until a human checks what happened and reconciles it.
Real-World Example
- 1Agent calls
billing.refundwith keyrefund:inv-901. - 2Operation Journal writes
PREPAREDto durable disk BEFORE calling the payment API. - 3The payment API hangs and times out → journal marks it
UNKNOWNand pauses the task. - 4An operator checks Stripe, sees it did not go through, marks it
rejected, and the task safely retries.
When Should You Turn It On?
Required automatically at Level 3 (execute) and Level 4 (commit).
Safety level note: Level 3 · Execute — Can run routine live actions with grants, receipts, and audit logs.
How to Add It (workspace.yaml)
level: execute
kits:
- "@neusym/kit-operation-journal@0.1.0"Kits It Works With
Technical Details & Configuration Options (4 settings)
| Package | @neusym/kit-operation-journal |
|---|---|
| Provides Ports | operations@1 |
| Requires Ports | None |
| Optional Ports | secrets@1tools@1notifier@1scheduler@1 |
| Publishes Events | operation.changedsignal.resolved |
| Owned DB Collections | operations |
Configuration Options (kitConfigs.operation-journal)
| Setting | Type | Default | Description |
|---|---|---|---|
probeBaseDelayMs | integer | 1000 | — |
probeMaxDelayMs | integer | 60000 | — |
maxProbeAttempts | integer | 5 | — |
preparedStaleMs | integer | 900000 | How long a write may stay PREPARED before sweepUnknown takes it for lost (its process stopped, or its outcome could not be saved) and marks it UNKNOWN, to be probed or reconciled. |