feat(cli): agent-native provisioning with init --agent and agents claim - #721
feat(cli): agent-native provisioning with init --agent and agents claim#721wondercreatemaster wants to merge 1 commit into
Conversation
Closes vouchdev#606. Lets an agent provision its own KB and identity, keep a local credential off stdout, and hand a human a claim token that binds the agent to a project through the adopt review gate. adopt_kb is additive so the personal-fallback adopt path stays byte-stable; claim also registers into the vouchdev#607 agent registry. Includes a one-line capture config coercion fix so malformed numerics degrade instead of raising (unblocks ruff + the existing regression test on test).
|
closing on CI, not on approach.
the scope concern from my earlier pass still stands and is worth acting on when you re-file. this is +1572 across 9 files and bundles four separable things: a credential file written to disk, a claim-token flow, a KB ownership transfer, and a new persistent proposer identity — plus an +83/-34 rewrite of split it and the cheap half lands immediately: also, house convention: please drop the "Made with Cursor" trailer from the description. this repo does not carry AI-tool attribution on contributions. reopen once the matrix is green and the adopt changes have tests — the underlying idea in #606 is fine and i am not rejecting it. |
Summary
vouch init --agent --agent-caller <name>provisions an agent-scoped KB, stampsagent.calleras the persistent proposer identity, and writes a local credential (chmod 0600) that is never echoed to stdoutvouch agents claim <token>command (plus--jsonfor skills); claiming from a project KB transfers ownership and adopts knowledge through the same review gate asvouch adoptvia additiveadopt_kb(personal-fallbackadoptstays byte-stable), leaving the agent credential and agent-KB artifacts untouched; also registers into the feat(cli): agent registry — list, pause, resume, revoke, and per-agent audit replay #607 project agent registry when possibleagent.callerwhenVOUCH_AGENTis unsetcapture.load_configto usecoerce_numericso malformed numeric capture settings degrade to defaults (unblocks ruff + the existing regression test ontest)Test plan
python -m pytest tests/test_agent_provision.py tests/test_adopt.py -qpython -m ruff check src testspython -m mypy srcdiff-cover coverage.xml --compare-branch origin/test --include 'src/vouch/*' --fail-under 100(100%)pytest tests/ -q --ignore=tests/embeddingsgreen locallyvouch init --agent --agent-caller demo --json→ credential path exists, stdout has no credential value →cd project && vouch init && vouch agents claim <token>binds and adopts