Skip to content

feat: agents push + pull + push-time verify - #107

Merged
PaulAsjes merged 1 commit into
nextfrom
feat/agents-push-pull
Jul 23, 2026
Merged

feat: agents push + pull + push-time verify#107
PaulAsjes merged 1 commit into
nextfrom
feat/agents-push-pull

Conversation

@PaulAsjes

Copy link
Copy Markdown
Collaborator

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. Updates id/version_id/branch_id in agents.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 (default agent_configs). Handles --branch and --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's verify.ts; no snake/camel conversion needed since v1 pushes raw wire JSON.

Implementation note

push/pull use the framework's non-typed command API so they can read the global --dry-run flag (global(true)), which would otherwise collide with a typed dry_run field.

Verified

cargo build green; 14 unit tests pass. Offline smoke tests: push --dry-run prints the dry-run plan without hitting the API; --help shows a single --dry-run; pull --branch without --agent errors 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 the tools/tests command groups, residency, and components add.

🤖 Generated with Claude Code

- 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>
@PaulAsjes
PaulAsjes merged commit 4de2cf8 into next Jul 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant