feat: agents push + pull + push-time verify - #107
Merged
Conversation
- verify.rs: port v0's verify.ts. find_missing_paths() presence-only subset check over serde_json::Value; verify_agent_push() reads the agent back after a push and warns (never errors) about locally-specified fields the API did not persist. No case conversion needed — v1 pushes raw wire JSON. - agents push: force-override push of the main config + all registered branch configs via the raw-JSON API, updating ids/version_id/branch_id in agents.json and verifying each push. Supports --agent/--branch/ --version-description and the framework's global --dry-run. - agents pull: fetch one agent or the whole workspace, plan create/update/ skip (honoring --update/--all), y/N confirm, write configs to --output-dir, and handle --branch and --all-branches. Configs are stored as raw wire JSON for lossless round-trip. - push/pull use the non-typed command API so they can read the global --dry-run flag (a typed field would collide with it). - README: document agents push/pull. - Unit tests for find_missing_paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Continues the v0 → v1 agents-as-code port (follows #106). Adds the core sync commands.
agents push— force-override push of an agent's main config plus every registered branch config, via the lossless raw-JSON API. Updatesid/version_id/branch_idinagents.json. Supports--agent,--branch,--version-description, and--dry-run.agents pull— fetch a single agent (--agent) or the whole workspace, plan create/update/skip (honoring--update/--all), confirm, and write configs to--output-dir(defaultagent_configs). Handles--branchand--all-branches. Configs are stored as raw wire JSON so they round-trip losslessly.verify.rs— after each push, reads the agent back and warns about any locally-specified field the API didn't persist (never fails the push). Ports v0'sverify.ts; no snake/camel conversion needed since v1 pushes raw wire JSON.Implementation note
push/pulluse the framework's non-typed command API so they can read the global--dry-runflag (global(true)), which would otherwise collide with a typeddry_runfield.Verified
cargo buildgreen; 14 unit tests pass. Offline smoke tests:push --dry-runprints the dry-run plan without hitting the API;--helpshows a single--dry-run;pull --branchwithout--agenterrors correctly. (Live create/update/pull needs an API key/account to exercise end-to-end.)Not yet included (follow-ups)
agents test(run + poll) — the last agents subcommand — then thetools/testscommand groups,residency, andcomponents add.🤖 Generated with Claude Code