Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ agentcore add gateway \
| `--allowed-scopes <scopes>` | Comma-separated allowed scopes (optional for CUSTOM_JWT) |
| `--agent-client-id <id>` | Agent OAuth client ID for Bearer token auth (CUSTOM_JWT) |
| `--agent-client-secret <secret>` | Agent OAuth client secret (CUSTOM_JWT) |
| `--agents <agents>` | Comma-separated agent names |
| `--no-semantic-search` | Disable semantic search for tool discovery |
| `--exception-level <level>` | Exception verbosity level (default: `NONE`) |
| `--json` | JSON output |
Expand Down
7 changes: 7 additions & 0 deletions src/cli/commands/add/__tests__/add-gateway.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ describe('add gateway command', () => {
});
});

describe('rejected flags', () => {
it('rejects unknown --agents flag', async () => {
const result = await runCLI(['add', 'gateway', '--name', 'agents-test', '--agents', 'foo', '--json'], projectDir);
expect(result.exitCode).toBe(1);
});
});

describe('JWT authorizer', () => {
it('creates gateway with CUSTOM_JWT authorizer', async () => {
const gatewayName = `jwt-gw-${Date.now()}`;
Expand Down
1 change: 0 additions & 1 deletion src/cli/commands/add/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export interface AddGatewayOptions {
customClaims?: string;
clientId?: string;
clientSecret?: string;
agents?: string;
semanticSearch?: boolean;
exceptionLevel?: string;
policyEngine?: string;
Expand Down
3 changes: 0 additions & 3 deletions src/cli/primitives/GatewayPrimitive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export interface AddGatewayOptions {
customClaims?: CustomClaimValidation[];
clientId?: string;
clientSecret?: string;
agents?: string;
enableSemanticSearch?: boolean;
exceptionLevel?: string;
policyEngine?: string;
Expand Down Expand Up @@ -161,7 +160,6 @@ export class GatewayPrimitive extends BasePrimitive<AddGatewayOptions, Removable
.description('Add an API gateway that routes requests to agent targets')
.option('--name <name>', 'Gateway name [non-interactive]')
.option('--description <desc>', 'Gateway description [non-interactive]')
.option('--agents <agents>', 'Comma-separated agent names to expose through this gateway [non-interactive]')
.option('--authorizer-type <type>', 'Authorizer type: NONE or CUSTOM_JWT [non-interactive]')
.option('--discovery-url <url>', 'OIDC discovery URL (for CUSTOM_JWT) [non-interactive]')
.option('--allowed-audience <audience>', 'Comma-separated allowed audiences (for CUSTOM_JWT) [non-interactive]')
Expand Down Expand Up @@ -213,7 +211,6 @@ export class GatewayPrimitive extends BasePrimitive<AddGatewayOptions, Removable
customClaims: parsedCustomClaims,
clientId: cliOptions.clientId,
clientSecret: cliOptions.clientSecret,
agents: cliOptions.agents,
enableSemanticSearch: cliOptions.semanticSearch !== false,
exceptionLevel: cliOptions.exceptionLevel,
policyEngine: cliOptions.policyEngine,
Expand Down
Loading