Metadata-Version: 2.4
Name: resume-guard
Version: 1.0.0
Summary: Resume-effect reconciliation for checkpointed agent runs: checkpoint-keyed effect ledger, read-only probe, Ed25519-signed resume verdicts.
Author: TextForAgents LLC
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41
Dynamic: license-file

# resume_guard

Resume-effect reconciliation for checkpointed agent runs — by TextForAgents LLC.

Before a checkpointed agent run resumes, ask what already landed. An effect
ledger keyed to checkpoint identity, a read-only probe of the target system
when the ledger is silent, and an Ed25519-signed verdict — SAFE /
RESUME-WITH-SKIPS / DO-NOT-RESUME — so a resumed node never re-sends the paid
call, re-books the booking, or records an approval against work the human
never saw.

## Quickstart

```python
from resume_guard import EffectLedger, TargetSystem, Reconciler, GuardedEffects

ledger = EffectLedger("effects.db")
target = TargetSystem("target.json")
rec = Reconciler(ledger, {"paid_job": target})
guard = GuardedEffects(ledger, rec)

receipt, how = guard.run_effect("run-1", "ns-1", "book_and_pay",
                                "submit-job", "paid_job",
                                lambda eid: target.submit(eid, {"job": "gpu-job-1"}))
# kill the process here; on resume the same call returns ("...", "injected")
# and the effect function is never called again.
verdict = rec.verdict("run-1", "ns-1", "book_and_pay",
                      [{"effect_key": "submit-job", "kind": "paid_job"}])
assert verdict["verdict"]["state"] == "RESUME-WITH-SKIPS"
assert Reconciler.verify(verdict)
print("exactly one execution:", target.submit_calls == 1)
```

Hosted service: Solo $9/mo per operator (first month free, one-time trial) ·
Team $29/mo · per-verdict API $0.005 (x402). Support: support@textforagents.com
