From 8ce9081aebe2ee97916e5d18161fb120dc8c1d42 Mon Sep 17 00:00:00 2001 From: Tj Ariyanayagam Date: Thu, 27 Aug 2026 20:09:34 +0000 Subject: [PATCH] feat(schema): add ap-south-2 (HYD) and us-west-1 (SFO) to region allowlist Enable AgentCore CLI in the new launch regions. Extends AgentCoreRegionSchema and the llm-compacted type union; updates the negative-region assertion since us-west-1 is now valid. --- src/schema/llm-compacted/aws-targets.ts | 2 ++ src/schema/schemas/__tests__/aws-targets.test.ts | 4 +++- src/schema/schemas/aws-targets.ts | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/schema/llm-compacted/aws-targets.ts b/src/schema/llm-compacted/aws-targets.ts index ce9f4e800..87e311c7e 100644 --- a/src/schema/llm-compacted/aws-targets.ts +++ b/src/schema/llm-compacted/aws-targets.ts @@ -30,6 +30,7 @@ type AgentCoreRegion = | 'ap-northeast-1' | 'ap-northeast-2' | 'ap-south-1' + | 'ap-south-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-southeast-5' @@ -45,5 +46,6 @@ type AgentCoreRegion = | 'sa-east-1' | 'us-east-1' | 'us-east-2' + | 'us-west-1' | 'us-west-2' | 'us-gov-west-1'; diff --git a/src/schema/schemas/__tests__/aws-targets.test.ts b/src/schema/schemas/__tests__/aws-targets.test.ts index 309839004..1c4597f67 100644 --- a/src/schema/schemas/__tests__/aws-targets.test.ts +++ b/src/schema/schemas/__tests__/aws-targets.test.ts @@ -13,6 +13,7 @@ describe('AgentCoreRegionSchema', () => { 'ap-northeast-1', 'ap-northeast-2', 'ap-south-1', + 'ap-south-2', 'ap-southeast-1', 'ap-southeast-2', 'ap-southeast-5', @@ -28,13 +29,14 @@ describe('AgentCoreRegionSchema', () => { 'sa-east-1', 'us-east-1', 'us-east-2', + 'us-west-1', 'us-west-2', 'us-gov-west-1', ]); }); it('rejects unsupported regions and invalid values', () => { - expect(AgentCoreRegionSchema.safeParse('us-west-1').success).toBe(false); + expect(AgentCoreRegionSchema.safeParse('me-central-1').success).toBe(false); expect(AgentCoreRegionSchema.safeParse('af-south-1').success).toBe(false); expect(AgentCoreRegionSchema.safeParse('').success).toBe(false); expect(AgentCoreRegionSchema.safeParse(123).success).toBe(false); diff --git a/src/schema/schemas/aws-targets.ts b/src/schema/schemas/aws-targets.ts index 9bc7f38a1..b82e88b76 100644 --- a/src/schema/schemas/aws-targets.ts +++ b/src/schema/schemas/aws-targets.ts @@ -10,6 +10,7 @@ export const AgentCoreRegionSchema = z.enum([ 'ap-northeast-1', 'ap-northeast-2', 'ap-south-1', + 'ap-south-2', 'ap-southeast-1', 'ap-southeast-2', 'ap-southeast-5', @@ -25,6 +26,7 @@ export const AgentCoreRegionSchema = z.enum([ 'sa-east-1', 'us-east-1', 'us-east-2', + 'us-west-1', 'us-west-2', 'us-gov-west-1', ]);