feat: add VPC CLI flags to create and add commands [2/3]#425
Merged
Conversation
Fix NetworkModeSchema enum from PUBLIC|PRIVATE to PUBLIC|VPC to match the AWS API. Add NetworkConfigSchema for subnet and security group validation, and networkConfig field to AgentEnvSpec with cross-field validation requiring networkConfig when networkMode is VPC. Changes: - Fix NetworkModeSchema enum: PRIVATE → VPC - Add NetworkConfigSchema (subnet/SG ID regex, min/max array bounds) - Add networkConfig optional field to AgentEnvSpec - Add superRefine cross-field validation - Update LLM-compacted schema documentation - Add 13 new unit tests for VPC schema validation
Add --network-mode, --subnets, and --security-groups flags to both the create and add agent CLI commands. Extract shared VPC parsing and validation utilities. Propagate VPC configuration through GenerateConfig and schema mapper to AgentEnvSpec. Changes: - Add shared/vpc-utils.ts with parseCommaSeparatedList and validateVpcOptions helpers - Add VPC fields to GenerateConfig and CreateOptions/AddAgentOptions - Update schema-mapper to propagate VPC fields to AgentEnvSpec - Add VPC flags to create command with validation - Add VPC flags to add agent command with validation - Update BYO agent path to support VPC configuration - Add 13 new unit tests for CLI validation and schema mapping
4 tasks
Contributor
Coverage Report
|
aidandaly24
reviewed
Feb 24, 2026
aidandaly24
approved these changes
Feb 24, 2026
Contributor
aidandaly24
left a comment
There was a problem hiding this comment.
very clean PR approved
tejaskash
added a commit
that referenced
this pull request
Feb 27, 2026
This reverts commit c75f4cd.
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
Add
--network-mode,--subnets, and--security-groupsCLI flags to bothcreateandadd agentcommands. Extract shared VPC utilities and propagate VPC configuration through the generation pipeline.Depends on #424 (schema foundation). This PR includes those schema commits as a base.
Changes
shared/vpc-utils.ts):parseCommaSeparatedList()andvalidateVpcOptions()helpers, extracted to avoid duplication across commandsGenerateConfigtype; updatemapGenerateConfigToAgent()to producenetworkConfigwhen VPC modecreateProjectWithAgent()Files changed (14)
src/cli/commands/shared/vpc-utils.ts(new)schema-mapper.ts,generate/types.tstypes.ts,command.tsx,action.ts,validate.tstypes.ts,command.tsx,actions.ts,validate.tsschema-mapper.test.ts,create/validate.test.ts,add/validate.test.tsStack
mainmainThis PR and PR 3/3 are independent — reviewable and mergeable in any order after PR 1/3.
Test plan
npm test)agentcore create --name test --defaults --network-mode VPC --subnets subnet-xxx --security-groups sg-xxx --dry-runagentcore add agent --name vpc-agent --type byo --network-mode VPC --subnets subnet-xxx --security-groups sg-xxx