Extract clanker-cleanroom monorepo with unified Agent API - #17
Merged
Conversation
Split Docker image build/run and agent bindings out of agent-gwt so stock images ship from node_modules, build once via a folder DAG + root JSON registry, and keep root/package versions in sync for CI publish.
Stock and toolchain tags share one run path; buildImages records which stock agent each image derives from so callers no longer pass variant or base agent.
devzeebo
commented
Sep 1, 2026
devzeebo
left a comment
Collaborator
Author
There was a problem hiding this comment.
Summary
Strong refactor — the monorepo split is clean, the Agent(name) + registry model is a clear improvement over the old variant / per-agent build helpers, and test coverage on the Dockerfile DAG + registry path is solid. I ran pnpm run test and pnpm run lint locally; both pass.
Highlights
- Separation of concerns —
clanker-cleanroomowns Docker/build/run;agent-gwtstays a thin GWT layer. Good boundary. buildImagesDAG — topo-sort + registry JSON is simpler and more extensible than the oldbuildAgentImage/buildToolchainImagesplit.- Backward-compat re-exports —
agent-gwtre-exporting the cleanroom surface should ease migration for existing consumers. - CI — dual-package version sync and publish ordering (
clanker-cleanroomfirst) look right for prereleases.
Blockers / should-fix before merge
- Release staging leaves
agent-gwtdepending on a prereleaseclanker-cleanroom— see inline comment onpublish.yml. - Stale
variantreference incontext7.json— removed from the API but still in rules.
Suggestions (non-blocking)
- Add a short migration note to the PR description or README covering: image tag renames (
agent-gwt/*:local→clanker-cleanroom/*),variant→ registry tag names,buildAgentImage/buildToolchainImage→buildImages, andClaudeAgentResultremoval in favor ofAgentRunResult. Agent.buildImage()doesn't forwardpackageRoot— minor edge case if callers use a non-cwd registry.- Consider dedicated unit tests for
inferAgenterror paths (cycle / unresolvable FROM chain); currently only covered indirectly viabuild.spec.ts.
Pre-merge checklist
- Bootstrap
clanker-cleanroomon npm + trusted publisher (per PUBLISHING.md) - Fix release workflow dependency rewrite
- Update
context7.jsonrule
…kageRoot Rewrite clanker-cleanroom dependency when staging agent-gwt for release, update the stale variant reference in context7.json, and forward RegistryOptions from Agent.buildImage() so custom package roots work.
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.
Summary
clanker-cleanroom(Docker image build/run and agent bindings) andagent-gwt(GWT step functions for repeatable agent tests).new Agent(name)API backed by a registry that records stock and toolchain image tags, so callers no longer pass variant or base-agent options.buildImages) that topo-sorts localFROMtags, builds once, and writesclanker-cleanroom.images.jsonat the project root; update CI publish workflow and docs accordingly.Test plan
pnpm installpnpm run buildpnpm run testpnpm run lintpnpm run test:e2e(requires Docker and agent credentials)