Skip to content

feat: add VPC network mode to schema [1/3]#424

Merged
tejaskash merged 1 commit intomainfrom
feat/vpc-1-schema
Feb 24, 2026
Merged

feat: add VPC network mode to schema [1/3]#424
tejaskash merged 1 commit intomainfrom
feat/vpc-1-schema

Conversation

@tejaskash
Copy link
Contributor

Summary

Fix NetworkModeSchema enum and add VPC configuration schema support. This is the foundation PR that PR #2 and #3 build on.

  • Fix NetworkModeSchema enum from PUBLIC | PRIVATE to PUBLIC | VPC to match the AWS API
  • Add NetworkConfigSchema with subnet ID (subnet-*) and security group ID (sg-*) regex validation, array bounds (1-16)
  • Add networkConfig optional field to AgentEnvSpec
  • Add .superRefine() cross-field validation: VPC mode requires networkConfig, PUBLIC mode rejects it
  • Update LLM-compacted schema documentation

Files changed (7)

File Change
src/schema/constants.ts Fix enum: PRIVATEVPC
src/schema/schemas/agent-env.ts Add NetworkConfigSchema, networkConfig field, .superRefine()
src/schema/llm-compacted/agentcore.ts Add NetworkConfig type, update NetworkMode
src/schema/llm-compacted/mcp.ts Update NetworkMode type
src/schema/__tests__/constants.test.ts VPC enum tests
src/schema/schemas/__tests__/agent-env.test.ts 10 new VPC cross-field validation tests
src/schema/schemas/__tests__/mcp.test.ts Update PRIVATE → VPC in existing test

Stack

PRs 2 and 3 can be reviewed in parallel. Merge this first, then 2 and 3 in any order.

Test plan

  • All unit tests pass (npm test)
  • TypeScript compiles clean
  • Lint and prettier pass

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
@github-actions
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 43.92% 2967 / 6754
🔵 Statements 43.52% 3123 / 7176
🔵 Functions 45.76% 616 / 1346
🔵 Branches 48.61% 1932 / 3974
Generated in workflow #630 for commit 170bf40 by the Vitest Coverage Report Action

Copy link
Contributor

@aidandaly24 aidandaly24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm approved

@tejaskash tejaskash merged commit 4180646 into main Feb 24, 2026
14 of 19 checks passed
@tejaskash tejaskash deleted the feat/vpc-1-schema branch February 24, 2026 23:15
tejaskash added a commit that referenced this pull request Feb 27, 2026
tejaskash added a commit that referenced this pull request Feb 27, 2026
* Revert "feat: add VPC CLI flags to create and add commands [2/3] (#425)"

This reverts commit c75f4cd.

* Revert "feat: add VPC info messages to dev and invoke commands [3/3] (#426)"

This reverts commit 7a81b02.

* Revert "feat: add VPC network mode to schema (#424)"

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

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants