Skip to content

feat(project): add gateway resources - #2028

Open
aidandaly24 wants to merge 7 commits into
aws:refactorfrom
aidandaly24:feat/project-gateway-add
Open

feat(project): add gateway resources#2028
aidandaly24 wants to merge 7 commits into
aws:refactorfrom
aidandaly24:feat/project-gateway-add

Conversation

@aidandaly24

@aidandaly24 aidandaly24 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds project-based Gateway mutation commands:

agentcore project add gateway
agentcore project add gateway-target
agentcore project add gateway-connector

Project-command JSON maps directly to the existing version 1 agentcore.json schemas:

  • --authorizer-configuration accepts GatewayAuthorizerConfigSchema;
  • --target-configuration accepts one complete AgentCoreGatewayTargetSchema object;
  • --connector-configuration accepts the same complete Target object and requires targetType: "connector";
  • JSON sources work inline, through file://, and through stdin;
  • SDK request shapes are not accepted or translated.

Scalar endpoint, Runtime, and curated connector shortcuts remain. They construct the same
project-schema objects accepted through JSON.

The change also:

  • replaces SDK protocol JSON with the direct --enable-semantic-search project field;
  • makes project-owned compute Target branches reachable through direct Target JSON;
  • validates OAuth/API-key credential-name references in complete Target JSON and OAuth shortcuts;
  • validates Runtime and Runtime endpoint references;
  • validates the complete candidate project before one agentcore.json write;
  • uses the existing generic project-resource mutation flow, with only nested Target placement
    handled specially;
  • rejects duplicate Target names across all Gateways and unassignedTargets[], matching the old
    CLI and existing L3 output contract.

No project schema files change. The CLI does not create or copy files referenced by Target JSON;
paths such as schemaSource.inline.path and lambdaFunctionArn.toolSchemaFile remain explicit in
agentcore.json.

Testing

Rebased onto upstream/refactor at 38c30ae4; verification ran on PR head 854514eb.

  • bun run format:check
  • bun run lint:check
  • bun run typecheck
  • focused Gateway command tests: 50 passed
  • Gateway add handler line coverage: 100%
  • bun test src outside the restricted sandbox: 1,789 passed
  • bun run build
  • built CLI help verified for all three command leaves
  • tests are colocated with each Gateway command and share only project-routing setup
  • verified complete Target JSON round-trips without translation
  • verified direct Target JSON works inline, through file://, and through stdin
  • verified project-owned Lambda compute Target JSON is accepted
  • verified duplicate Target names are rejected across Gateways and unassignedTargets[]
  • verified synthesis uses the existing Target-name-only L3 output contract without CDK changes

Live deployment

Earlier end-to-end verification of the same persisted Gateway shapes used a clean generated project
in account 603141041947, region us-west-2, with
@aws/agentcore-cdk@0.1.0-alpha.45.

  • Added an unrestricted Gateway and project Runtime Target through scalar command flags.
  • Added an MCP Gateway and external MCP Target through complete direct project JSON.
  • Added a Web Search Target through gateway-connector; synthesis produced the expected connector
    configuration and IAM dependency. The service rejected live Target creation because
    Connector integration web-search is not available for this account.
  • Alpha.45 emits SearchType: NONE when MCP semantic search is disabled, which current
    CloudFormation rejects. The deployment fixture used project add gateway --protocol mcp --enable-semantic-search, allowing deployment without changing the CLI or L3 dependency.
  • Deployed the Runtime, both Gateways, and the Runtime/direct-MCP Targets; all reported READY.
  • Invoked runtime-target/invocations through the Gateway and received HTTP 200 with
    runtime gateway works.
  • Sent MCP initialize and tools/list through the MCP Gateway; both returned HTTP 200 and the
    direct DeepWiki Target tools were listed.
  • Destroyed the stack and independently verified the stack, Runtime, both Gateways, and both
    Targets return not-found.

Credential-provider authoring is owned by the separate project credentials commands. This PR
validates Gateway Target references to those project credentials but does not create them.

@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 18, 2026
@codecov-commenter

codecov-commenter commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.30%. Comparing base (38c30ae) to head (854514e).

Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2028      +/-   ##
============================================
+ Coverage     97.24%   97.30%   +0.05%     
============================================
  Files           396      400       +4     
  Lines         24019    24531     +512     
============================================
+ Hits          23357    23869     +512     
  Misses          662      662              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 18, 2026
@aidandaly24
aidandaly24 force-pushed the feat/project-gateway-add branch 4 times, most recently from dbcb3b6 to fd627a1 Compare August 21, 2026 19:05
@aidandaly24
aidandaly24 marked this pull request as ready for review August 21, 2026 19:26
@aidandaly24
aidandaly24 marked this pull request as draft August 21, 2026 20:17
@aidandaly24
aidandaly24 force-pushed the feat/project-gateway-add branch from fd627a1 to 41a946d Compare August 21, 2026 20:28
@aidandaly24
aidandaly24 force-pushed the feat/project-gateway-add branch from 41a946d to 7753af0 Compare August 21, 2026 22:47
@aidandaly24
aidandaly24 marked this pull request as ready for review August 21, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants