fix(dev): support multiple A2A runtime ports#1818
Open
notgitika wants to merge 1 commit into
Open
Conversation
Contributor
Package TarballHow to installgh release download pr-1818-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.24.1.tgz |
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
Coverage Report
|
agentcore-cli-automation
approved these changes
Jul 23, 2026
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
LGTM. The port allocation change is well-structured and consistent across the four entry points (CLI --logs, TUI hook, web-UI handleStart, and invoke). A few observations from the review, none blocking:
- Container A2A works standalone (the
9001:9000port mapping is done at the Docker layer), but CodeZip A2A depends on aws/bedrock-agentcore-sdk-python#593 to actually honorPORT. Worth double-checking that PR merges before/with this one is released widely, otherwise users on the current SDK will see the CLI report port 9001 while the server still binds to 9000. - The invoke flow now recomputes
getDevPorton the client side and uses that to reach the server. If a server auto-shifted off the index-derived port (e.g., 9001 was taken → bound to 9002), invoke against the second A2A runtime will fail the same way it does for HTTP today. Pre-existing behavior for HTTP, but new for A2A. Not blocking. getDevPorttests only cover A2A and MCP; a couple of HTTP / null-project cases would round it out, butgetAgentPortalready has that coverage so it's fine.
No new telemetry needed — agent_protocol is already recorded on the existing cli.command_run emissions. Tests reuse the established spawn/fs mocks at true I/O boundaries. Approving.
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
9000 + runtime index, while honoring an explicit--portfor the selected runtime.PORTandAGENTCORE_RUNTIME_URLto CodeZip A2A processes.Closes #1657.
SDK dependency
Container A2A runtimes work independently because each container still binds internally to
9000. CodeZip A2A runtimes require aws/bedrock-agentcore-sdk-python#593 soserve_a2ahonors the CLI-providedPORT; that PR is stacked on the A2A v1 migration in aws/bedrock-agentcore-sdk-python#591.Agent Inspector requires no change: it routes start, invocation, and agent-card requests through the CLI backend by agent name, and the backend stores each runtime's resolved port.
Testing
npm run buildnpm test(415 files, 5,980 tests passed)npm run typechecknpm run lint -- --no-cache(no errors; existing warnings only)