feat: add Agent Vault v1 policy and lifecycle tools - #308
Draft
trevormil wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent Vault v1 gives a designated agent a coin-backed operating budget with frozen withdrawal rules. A funder deposits directly to the agent; ordinary redemption obeys an optional fixed-interval cap, inclusive time window and weighted activation. Optional recovery explicitly bypasses those gates.
The SDK is the shared semantic owner: strict versioned construction, structural verification, extraction, conservative status estimates, and unsigned deposit/withdraw/pay/vote/recover transactions. Adds
bb build agent-vault, theagent-vaultslifecycle commands, and builder MCP tooling/runtime instructions. Payment and recovery stay atomic; sequential keyring submission is rejected before broadcasting.Activation authorizes ongoing operation, not individual payments. Limits govern redemption, not coins already in the agent wallet. Policy changes require a new collection. This candidate is developed from current main; experimental PR #254 remains separate and should be reconciled before release.
Validation
bb check: zero critical/warning findings; optional display metadata reported as info.bun scripts/test-agent-vault-chain.ts /path/to/chainpasses the keeper lifecycle using real SDK messages: third-party funding, pre-activation rejection, voting, redemption, cap rejection, payment, failed bank-leg rollback, expiry and recovery. The script uses a temporary Go overlay and does not modify chain source or broadcast.Review and release gates
Draft pending semantic/security review and full isolated indexer-to-wallet integration. Unit/keeper evidence is not a claim of full browser-wallet end-to-end verification. No package publication, deployment or funded network transaction was performed.
bun audit --jsonreports five pre-existing moderate advisory entries, zero high/critical: bn.js GHSA-378v-28hj-76wf; qs GHSA-x5fp-wj9c-mxmx and GHSA-4mjr-xmp4-gh2g; ts-deepmerge GHSA-87mf-gv2c-c62c; yaml GHSA-48c2-rrv3-qjmp. No dependency or lockfile changes. Secret scanning skipped by the skill's default (opt-in); Semgrep unavailable. This is not a completed security review.