Skip to content

feat(cli): agent-native provisioning with init --agent and agents claim - #721

Closed
wondercreatemaster wants to merge 1 commit into
vouchdev:testfrom
wondercreatemaster:feat/606-agent-native-init
Closed

feat(cli): agent-native provisioning with init --agent and agents claim#721
wondercreatemaster wants to merge 1 commit into
vouchdev:testfrom
wondercreatemaster:feat/606-agent-native-init

Conversation

@wondercreatemaster

@wondercreatemaster wondercreatemaster commented Jul 31, 2026

Copy link
Copy Markdown

Summary

  • closes feat(cli): agent-native provisioning — vouch init --agent plus a claim handshake #606: vouch init --agent --agent-caller <name> provisions an agent-scoped KB, stamps agent.caller as the persistent proposer identity, and writes a local credential (chmod 0600) that is never echoed to stdout
  • emits a claim token / vouch agents claim <token> command (plus --json for skills); claiming from a project KB transfers ownership and adopts knowledge through the same review gate as vouch adopt via additive adopt_kb (personal-fallback adopt stays 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 possible
  • mcp/jsonl/cli fall back to the stamped agent.caller when VOUCH_AGENT is unset
  • also fixes capture.load_config to use coerce_numeric so malformed numeric capture settings degrade to defaults (unblocks ruff + the existing regression test on test)

Test plan

  • python -m pytest tests/test_agent_provision.py tests/test_adopt.py -q
  • python -m ruff check src tests
  • python -m mypy src
  • diff-cover coverage.xml --compare-branch origin/test --include 'src/vouch/*' --fail-under 100 (100%)
  • full pytest tests/ -q --ignore=tests/embeddings green locally
  • CI green on this PR
  • manual: vouch 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

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).
@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance cli command line interface mcp mcp, jsonl, and http surfaces tests tests and fixtures size: XL 1000 or more changed non-doc lines labels Jul 31, 2026
@plind-junior

Copy link
Copy Markdown
Member

closing on CI, not on approach.

test (py3.12) and test (py3.13) are both failing on the current head. this repo's test branch requires all three matrix jobs plus build sdist + wheel green before anything merges, so this cannot land in its present state, and a red test matrix is not something a reviewer should be reading around.

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 adopt.py, a load-bearing module, with no matching change to tests/test_adopt.py. ownership transfer is the highest-risk path here and it currently rides entirely on test_agent_provision.py.

split it and the cheap half lands immediately: --agent-caller stamping a persistent proposer identity is a small, well-contained change to attribution. the credential + claim-token + ownership-transfer half is a security surface and deserves its own diff, its own tests, and its own review.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli command line interface docs documentation, specs, examples, and repo guidance mcp mcp, jsonl, and http surfaces size: XL 1000 or more changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): agent-native provisioning — vouch init --agent plus a claim handshake

2 participants