Skip to content

feat(cli): register a shipped agent's published image with a2a-agent put --published - #306

Closed
earakely-scale wants to merge 2 commits into
mainfrom
feat/a2a-agent-put-published
Closed

earakely-scale wants to merge 2 commits into
mainfrom
feat/a2a-agent-put-published

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Each release publishes the shipped Claude Code agent's image to ghcr.io/scaleapi/agentenv-claude-code:src-<hex> and records its digest in the wheel. A run that deploys the bundled agent already uses that image. A hosted control plane, though, serves agents registered by id in its own store, and the only ways to register one were:

  • --dockerfile, which builds and pushes a copy;
  • --image-ref, which stores no build context, so install/v1 and the build fallback have nothing to build from.

agent-env a2a-agent put --id <id> --published claude-code registers the released image with DockerImageArtifact.put_ref:

  • the tag and digest come from the installed release, through published_digest;
  • the agent's folder becomes the build context, so a sandbox that can't pull the image builds it from that folder.

Nothing is built or pushed.

It refuses when no image is published for the installed sources, as with a git checkout, and nothing is written. --published is one of the three image sources: exactly one of --dockerfile, --image-ref and --published is allowed. It takes any shipped agent with a published image: claude-code, and since #308 and #315 codex, openhands and pi too. Any other name is refused, with the names it can register.

How it was tested

  • tst/unit/cli/a2a_agent_put_published_test.py covers:
    • the registered artifact: tag, digest, build context, source digest, not context-only;
    • the refusal when nothing is published, which writes no artifact or agent;
    • an unknown agent name;
    • exclusivity with the other two sources.
  • image_ref_put_test.py takes the new exclusivity message.
  • ruff check is clean, and the unit tier passes: 9592 passed, 49 skipped.

Labelled bump-version, so merging it cuts a release that a PyPI install can run --published from.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no blocking issues were found.

Summary

Adds a2a-agent put --published to register a shipped agent’s published image without building or pushing it during registration.

  • The CLI can register a shipped agent’s release image by id.

No actionable issues found. The previous and current commits have different merge bases with the target, so this review covered the full PR diff. No previous review threads were supplied.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["put --published AGENT"] --> B["Find shipped agent"]
  B --> C{"Published digest exists?"}
  C -- No --> D["Exit before saving"]
  C -- Yes --> E["Save tag, digest, and build context"]
  E --> F["Register agent"]
  F --> G{"Skip validation?"}
  G -- No --> H["Run existing validation"]
  G -- Yes --> I["Done"]
Loading

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

…put --published

`agent-env a2a-agent put --id <id> --published claude-code` registers the image the
installed release published for a shipped agent, by its tag and digest, with the
agent's folder as its build context, so a hosted control plane can serve the
released image without building or pushing one. It refuses when no image is
published for the installed sources.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@earakely-scale

Copy link
Copy Markdown
Collaborator Author

Closing: the hosted control plane that needed this registers a release's published image from its own tooling, with the same put_ref call, so core doesn't need the option.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant