agent_ref), the spend authority it was checked against (mandate_ref), and the policy in force (policy_bound_ref) — each imported by hash — into a deterministic, recomputable guardrail_ref. The whole pre-payment decision becomes one content address. It moves no funds.
Because the decision is bound to all three inputs by hash, an ALLOW made under one policy snapshot does not recompute under a rotated policy — and swapping the agent, the mandate, or the verdict diverges the guardrail_ref. It is strictly additive over the frozen Layer 1: no new cryptographic primitive, the same RFC 8785 JCS + SHA-256 already in use.
Apache-2.0 open source. Install via
pip install algovoi-spend-guardrail-lite or npm install @algovoi/spend-guardrail-lite. Python and TypeScript are byte-for-byte identical on the same input. This is the lite tier — content-addressed, no signature; the commercial Spend Guardrail adds Falcon-1024 post-quantum signing on the decision receipt and the full Agent Passport + Payment Mandate enforcement stack.How it works
One reference, computed with RFC 8785 JCS canonicalisation and SHA-256:agent_refis the agent the decision was made for — a passport reference, imported by hash.mandate_refis the spend authority it was checked against — a mandate reference, imported by hash.policy_bound_refis the policy snapshot in force, from Policy Binding — imported by hash.verdictis a closed enumeration:ALLOW,DENY. A value outside the set is rejected, not hashed.
What a verifier can check
| Verifier holds | What they can check |
|---|---|
A guardrail_ref + verdict + the three refs | That the decision was made for exactly this agent, authority and policy (guardrail_ref recomputes) |
| The same, with the policy under a rotation | Rotation is detected — the guardrail_ref fails to recompute under P' |
| The same, with a different agent or mandate | Agent / authority swap is detected — each input is byte-load-bearing |
A guardrail_ref + a different verdict | Verdict tamper is detected — ALLOW and DENY are byte-distinct |
Use
Conformance
Thespend_guardrail_lite_v1 vector set (10 vectors) is published in the public corpus —
chopmob-cloud/algovoi-jcs-conformance-vectors —
with Python and Node runners. It covers the two verdicts, verdict / policy-rotation / agent / mandate tamper, and the closed-enumeration and malformed-reference rejections. Python and TypeScript reproduce every value byte-for-byte.
The decision chain
Spend Guardrail (lite) is the keystone of an open, pinned pre-payment decision chain: it composes the agent (an Agent Passport reference), the spend authority (a mandate reference), and the policy in force (a Policy Binding reference) into one recomputable decision. Each input is imported by hash, so an L2 integrator can plug in their own agent, mandate, or policy source and still get a single, offline-verifiable decision address.Lite vs commercial
| Lite (this package) | Spend Guardrail (commercial) | |
|---|---|---|
| Licence | Apache-2.0, open | Commercial OEM |
| Decision binding | content-addressed guardrail_ref | the same, Falcon-1024 signed receipt |
| Enforcement | bring your own verdict | full Agent Passport + Payment Mandate stack |
| Verifier | recompute offline | maintained verifier |
| Best for | open integrations, evaluation | regulated production, enterprise terms |
Adopters
If you build onalgovoi-spend-guardrail-lite, pin ==0.1.0, anchor a canonical vector hash from spend_guardrail_lite_v1, and keep the NOTICE, you qualify for a free v0 licence key for algovoi-mandate-auditor. The gate is scripts/check_v0_adoption.py (dependency + canonical hash anchor + NOTICE + version pin → ISSUE_V0_KEY). Apply: email chopmob@gmail.com.
Relationship to the open substrate
Spend Guardrail (lite) sits directly on top of the open JCS Canonicalisation Substrate and composes with Policy Binding, Compliance Gate (lite), and the Retention Chain. It uses the same RFC 8785 JCS and SHA-256 primitives — no additional cryptographic dependencies.Specification
guardrail_ref is an instance of the binding-ref framework specified in IETF Internet-Draft draft-hopley-x402-retention-chain — the same content-addressed construction as Settlement-Action Binding (§7.6), Policy Binding (§7.7), and Compliance Gate Binding (§7.8): a closed-enum decision bound to a set of pinned references under RFC 8785 JCS + SHA-256. The normative byte-level artifact for this construction is the published spend_guardrail_lite_v1 conformance set. Additive over the frozen canonicalisation substrate, sole AlgoVoi authorship.