From ce3f16f7f0c541436e562b51844b52c1954ceedc Mon Sep 17 00:00:00 2001 From: Jesse Turner Date: Tue, 14 Apr 2026 17:53:35 +0000 Subject: [PATCH 1/5] feat: upgrade default Python runtime to PYTHON_3_14 Add PYTHON_3_14 as a supported runtime version and make it the default for new agents and MCP tools. Updates schema enums, defaults, UI options, packaging fallbacks, import mappings, and tests. Verified end-to-end: deployed a runtime with PYTHON_3_14 to AgentCore and confirmed successful invocation. --- schemas/agentcore.schema.v1.json | 12 ++++++------ .../__snapshots__/assets.snapshot.test.ts.snap | 2 +- src/assets/agents/AGENTS.md | 2 +- src/cli/commands/import/constants.ts | 1 + .../agent/generate/__tests__/schema-mapper.test.ts | 2 +- src/cli/tui/screens/agent/types.ts | 2 +- src/cli/tui/screens/generate/defaults.ts | 2 +- src/cli/tui/screens/mcp/types.ts | 5 +++-- src/lib/packaging/__tests__/python.test.ts | 4 ++++ src/lib/packaging/python.ts | 2 +- src/schema/__tests__/constants.test.ts | 4 ++-- src/schema/constants.ts | 2 +- src/schema/llm-compacted/agentcore.ts | 2 +- 13 files changed, 24 insertions(+), 18 deletions(-) diff --git a/schemas/agentcore.schema.v1.json b/schemas/agentcore.schema.v1.json index 3ccb8002e..ce6fb8239 100644 --- a/schemas/agentcore.schema.v1.json +++ b/schemas/agentcore.schema.v1.json @@ -74,7 +74,7 @@ "anyOf": [ { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] }, { "type": "string", @@ -774,7 +774,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] }, "timeout": { "type": "integer", @@ -839,7 +839,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] }, "name": { "type": "string", @@ -1269,7 +1269,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] }, "name": { "type": "string", @@ -1427,7 +1427,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] }, "timeout": { "type": "integer", @@ -1492,7 +1492,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] }, "name": { "type": "string", diff --git a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap index d06f89b05..cd95b122d 100644 --- a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +++ b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap @@ -4002,7 +4002,7 @@ file maps to a JSON config file and includes validation constraints as comments. - **BuildType**: \`'CodeZip'\` | \`'Container'\` - **NetworkMode**: \`'PUBLIC'\` -- **RuntimeVersion**: \`'PYTHON_3_10'\` | \`'PYTHON_3_11'\` | \`'PYTHON_3_12'\` | \`'PYTHON_3_13'\` +- **RuntimeVersion**: \`'PYTHON_3_10'\` | \`'PYTHON_3_11'\` | \`'PYTHON_3_12'\` | \`'PYTHON_3_13'\` | \`'PYTHON_3_14'\` - **MemoryStrategyType**: \`'SEMANTIC'\` | \`'SUMMARIZATION'\` | \`'USER_PREFERENCE'\` | \`'EPISODIC'\` ### Build Types diff --git a/src/assets/agents/AGENTS.md b/src/assets/agents/AGENTS.md index 7861af7ae..dc50d5349 100644 --- a/src/assets/agents/AGENTS.md +++ b/src/assets/agents/AGENTS.md @@ -62,7 +62,7 @@ file maps to a JSON config file and includes validation constraints as comments. - **BuildType**: `'CodeZip'` | `'Container'` - **NetworkMode**: `'PUBLIC'` -- **RuntimeVersion**: `'PYTHON_3_10'` | `'PYTHON_3_11'` | `'PYTHON_3_12'` | `'PYTHON_3_13'` +- **RuntimeVersion**: `'PYTHON_3_10'` | `'PYTHON_3_11'` | `'PYTHON_3_12'` | `'PYTHON_3_13'` | `'PYTHON_3_14'` - **MemoryStrategyType**: `'SEMANTIC'` | `'SUMMARIZATION'` | `'USER_PREFERENCE'` | `'EPISODIC'` ### Build Types diff --git a/src/cli/commands/import/constants.ts b/src/cli/commands/import/constants.ts index 93c25f902..9de391f55 100644 --- a/src/cli/commands/import/constants.ts +++ b/src/cli/commands/import/constants.ts @@ -51,4 +51,5 @@ export const RUNTIME_TYPE_MAP: Record = { PYTHON_3_11: 'PYTHON_3_11', PYTHON_3_12: 'PYTHON_3_12', PYTHON_3_13: 'PYTHON_3_13', + PYTHON_3_14: 'PYTHON_3_14', }; diff --git a/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts b/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts index 76b2de9f2..d30ae23fc 100644 --- a/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts +++ b/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts @@ -87,7 +87,7 @@ describe('mapGenerateConfigToAgent', () => { expect(result.name).toBe('TestProject'); expect(result.build).toBe('CodeZip'); expect(result.entrypoint).toBe('main.py'); - expect(result.runtimeVersion).toBe('PYTHON_3_13'); + expect(result.runtimeVersion).toBe('PYTHON_3_14'); expect(result.networkMode).toBe('PUBLIC'); expect(result.protocol).toBe('HTTP'); }); diff --git a/src/cli/tui/screens/agent/types.ts b/src/cli/tui/screens/agent/types.ts index d8dc6c899..53ba28748 100644 --- a/src/cli/tui/screens/agent/types.ts +++ b/src/cli/tui/screens/agent/types.ts @@ -189,5 +189,5 @@ export const NETWORK_MODE_OPTIONS = [ { id: 'VPC', title: 'VPC', description: 'Attach to your VPC' }, ] as const; -export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13'; +export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_14'; export const DEFAULT_ENTRYPOINT = 'main.py'; diff --git a/src/cli/tui/screens/generate/defaults.ts b/src/cli/tui/screens/generate/defaults.ts index ad50c5913..6df99418b 100644 --- a/src/cli/tui/screens/generate/defaults.ts +++ b/src/cli/tui/screens/generate/defaults.ts @@ -5,7 +5,7 @@ import type { NetworkMode, PythonRuntime } from '../../../../schema'; */ /** Default Python runtime version for new agents */ -export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13'; +export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_14'; /** Default network mode for agent runtimes */ export const DEFAULT_NETWORK_MODE: NetworkMode = 'PUBLIC'; diff --git a/src/cli/tui/screens/mcp/types.ts b/src/cli/tui/screens/mcp/types.ts index 14195d6f5..8efee9276 100644 --- a/src/cli/tui/screens/mcp/types.ts +++ b/src/cli/tui/screens/mcp/types.ts @@ -278,7 +278,8 @@ export const POLICY_ENGINE_MODE_OPTIONS = [ ] as const; export const PYTHON_VERSION_OPTIONS = [ - { id: 'PYTHON_3_13', title: 'Python 3.13', description: 'Latest' }, + { id: 'PYTHON_3_14', title: 'Python 3.14', description: 'Latest' }, + { id: 'PYTHON_3_13', title: 'Python 3.13', description: '' }, { id: 'PYTHON_3_12', title: 'Python 3.12', description: '' }, { id: 'PYTHON_3_11', title: 'Python 3.11', description: '' }, { id: 'PYTHON_3_10', title: 'Python 3.10', description: '' }, @@ -294,6 +295,6 @@ export const NODE_VERSION_OPTIONS = [ // Defaults // ───────────────────────────────────────────────────────────────────────────── -export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13'; +export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_14'; export const DEFAULT_NODE_VERSION: NodeRuntime = 'NODE_20'; export const DEFAULT_HANDLER = 'handler.lambda_handler'; diff --git a/src/lib/packaging/__tests__/python.test.ts b/src/lib/packaging/__tests__/python.test.ts index 2a912be28..1640e9581 100644 --- a/src/lib/packaging/__tests__/python.test.ts +++ b/src/lib/packaging/__tests__/python.test.ts @@ -19,6 +19,10 @@ describe('extractPythonVersion', () => { expect(extractPythonVersion('PYTHON_3_13' as PythonRuntime)).toBe('3.13'); }); + it('extracts 3.14 from PYTHON_3_14', () => { + expect(extractPythonVersion('PYTHON_3_14' as PythonRuntime)).toBe('3.14'); + }); + it('throws for unsupported runtime string', () => { expect(() => extractPythonVersion('RUBY_3_0' as PythonRuntime)).toThrow('Unsupported Python runtime'); }); diff --git a/src/lib/packaging/python.ts b/src/lib/packaging/python.ts index 5bb470eae..5b87c11cf 100644 --- a/src/lib/packaging/python.ts +++ b/src/lib/packaging/python.ts @@ -155,7 +155,7 @@ export class PythonCodeZipPackager implements RuntimePackager { */ export class PythonCodeZipPackagerSync implements CodeZipPackager { packCodeZip(config: AgentEnvSpec, options: PackageOptions = {}): ArtifactResult { - const runtimeVersion = config.runtimeVersion ?? 'PYTHON_3_13'; + const runtimeVersion = config.runtimeVersion ?? 'PYTHON_3_14'; if (!isPythonRuntimeVersion(runtimeVersion)) { throw new PackagingError(`Python packager only supports Python runtimes. Received: ${runtimeVersion}`); diff --git a/src/schema/__tests__/constants.test.ts b/src/schema/__tests__/constants.test.ts index affa85b58..dc6a491dd 100644 --- a/src/schema/__tests__/constants.test.ts +++ b/src/schema/__tests__/constants.test.ts @@ -60,13 +60,13 @@ describe('ModelProviderSchema', () => { }); describe('PythonRuntimeSchema', () => { - it.each(['PYTHON_3_10', 'PYTHON_3_11', 'PYTHON_3_12', 'PYTHON_3_13'])('accepts "%s"', version => { + it.each(['PYTHON_3_10', 'PYTHON_3_11', 'PYTHON_3_12', 'PYTHON_3_13', 'PYTHON_3_14'])('accepts "%s"', version => { expect(PythonRuntimeSchema.safeParse(version).success).toBe(true); }); it('rejects unsupported versions', () => { expect(PythonRuntimeSchema.safeParse('PYTHON_3_9').success).toBe(false); - expect(PythonRuntimeSchema.safeParse('PYTHON_3_14').success).toBe(false); + expect(PythonRuntimeSchema.safeParse('PYTHON_3_15').success).toBe(false); }); }); diff --git a/src/schema/constants.ts b/src/schema/constants.ts index ea159ec21..c69930f8b 100644 --- a/src/schema/constants.ts +++ b/src/schema/constants.ts @@ -137,7 +137,7 @@ export function isReservedProjectName(name: string): boolean { // Infrastructure Constants (shared between agent-env and mcp schemas) // ============================================================================ -export const PythonRuntimeSchema = z.enum(['PYTHON_3_10', 'PYTHON_3_11', 'PYTHON_3_12', 'PYTHON_3_13']); +export const PythonRuntimeSchema = z.enum(['PYTHON_3_10', 'PYTHON_3_11', 'PYTHON_3_12', 'PYTHON_3_13', 'PYTHON_3_14']); export type PythonRuntime = z.infer; export const NodeRuntimeSchema = z.enum(['NODE_18', 'NODE_20', 'NODE_22']); diff --git a/src/schema/llm-compacted/agentcore.ts b/src/schema/llm-compacted/agentcore.ts index 7fcda0245..8989d8842 100644 --- a/src/schema/llm-compacted/agentcore.ts +++ b/src/schema/llm-compacted/agentcore.ts @@ -25,7 +25,7 @@ interface AgentCoreProjectSpec { // ───────────────────────────────────────────────────────────────────────────── type BuildType = 'CodeZip' | 'Container'; -type PythonRuntime = 'PYTHON_3_10' | 'PYTHON_3_11' | 'PYTHON_3_12' | 'PYTHON_3_13'; +type PythonRuntime = 'PYTHON_3_10' | 'PYTHON_3_11' | 'PYTHON_3_12' | 'PYTHON_3_13' | 'PYTHON_3_14'; type NodeRuntime = 'NODE_18' | 'NODE_20' | 'NODE_22'; type RuntimeVersion = PythonRuntime | NodeRuntime; type NetworkMode = 'PUBLIC' | 'VPC'; From 505d31692cc149d4903e2e7efd424a46ff894887 Mon Sep 17 00:00:00 2001 From: Jesse Turner Date: Tue, 14 Apr 2026 18:47:56 +0000 Subject: [PATCH 2/5] chore: revert JSON schema change (auto-generated at release) The JSON schema file is auto-regenerated during the release workflow. Direct changes are rejected by the schema-check CI job. --- schemas/agentcore.schema.v1.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/schemas/agentcore.schema.v1.json b/schemas/agentcore.schema.v1.json index ce6fb8239..3ccb8002e 100644 --- a/schemas/agentcore.schema.v1.json +++ b/schemas/agentcore.schema.v1.json @@ -74,7 +74,7 @@ "anyOf": [ { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] }, { "type": "string", @@ -774,7 +774,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] }, "timeout": { "type": "integer", @@ -839,7 +839,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] }, "name": { "type": "string", @@ -1269,7 +1269,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] }, "name": { "type": "string", @@ -1427,7 +1427,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] }, "timeout": { "type": "integer", @@ -1492,7 +1492,7 @@ }, "pythonVersion": { "type": "string", - "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13", "PYTHON_3_14"] + "enum": ["PYTHON_3_10", "PYTHON_3_11", "PYTHON_3_12", "PYTHON_3_13"] }, "name": { "type": "string", From 604f0254d364b07d08fd3f22123dfabfefbf3861 Mon Sep 17 00:00:00 2001 From: Jesse Turner Date: Wed, 15 Apr 2026 14:15:38 +0000 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20address=20review=20=E2=80=94=20misse?= =?UTF-8?q?d=20defaults,=20types,=20tests,=20and=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update packCodeZipSync fallback in packaging/index.ts - Add PYTHON_3_14 to llm-compacted/mcp.ts PythonRuntime type - Update hardcoded runtimeVersion in AgentPrimitive.tsx - Add PYTHON_3_14 to agent-env schema test - Update TUI harness fixture default - Update docs examples and runtime version list --- docs/configuration.md | 5 +++-- docs/container-builds.md | 2 +- src/cli/primitives/AgentPrimitive.tsx | 2 +- src/lib/packaging/index.ts | 2 +- src/schema/llm-compacted/mcp.ts | 2 +- src/schema/schemas/__tests__/agent-env.test.ts | 2 +- src/tui-harness/helpers.ts | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 827d884d2..985893652 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -31,7 +31,7 @@ Main project configuration using a **flat resource model**. Agents, memories, an "build": "CodeZip", "entrypoint": "main.py", "codeLocation": "app/MyAgent/", - "runtimeVersion": "PYTHON_3_13", + "runtimeVersion": "PYTHON_3_14", "networkMode": "PUBLIC", "protocol": "HTTP" } @@ -166,7 +166,7 @@ on the next deployment. "build": "CodeZip", "entrypoint": "main.py", "codeLocation": "app/MyAgent/", - "runtimeVersion": "PYTHON_3_13", + "runtimeVersion": "PYTHON_3_14", "networkMode": "PUBLIC", "envVars": [{ "name": "MY_VAR", "value": "my-value" }], "instrumentation": { @@ -201,6 +201,7 @@ on the next deployment. - `PYTHON_3_11` - `PYTHON_3_12` - `PYTHON_3_13` +- `PYTHON_3_14` **Node.js:** diff --git a/docs/container-builds.md b/docs/container-builds.md index a75f5e7a9..61d65bcde 100644 --- a/docs/container-builds.md +++ b/docs/container-builds.md @@ -58,7 +58,7 @@ In `agentcore.json`, set `"build": "Container"`: "build": "Container", "entrypoint": "main.py", "codeLocation": "app/MyAgent/", - "runtimeVersion": "PYTHON_3_13" + "runtimeVersion": "PYTHON_3_14" } ``` diff --git a/src/cli/primitives/AgentPrimitive.tsx b/src/cli/primitives/AgentPrimitive.tsx index 9d36efaeb..74bba146b 100644 --- a/src/cli/primitives/AgentPrimitive.tsx +++ b/src/cli/primitives/AgentPrimitive.tsx @@ -526,7 +526,7 @@ export class AgentPrimitive extends BasePrimitive { }); it('accepts agent with all Python runtime versions', () => { - for (const version of ['PYTHON_3_10', 'PYTHON_3_11', 'PYTHON_3_12', 'PYTHON_3_13']) { + for (const version of ['PYTHON_3_10', 'PYTHON_3_11', 'PYTHON_3_12', 'PYTHON_3_13', 'PYTHON_3_14']) { const result = AgentEnvSpecSchema.safeParse({ ...validPythonAgent, runtimeVersion: version }); expect(result.success, `Should accept ${version}`).toBe(true); } diff --git a/src/tui-harness/helpers.ts b/src/tui-harness/helpers.ts index eaaa06b10..d28cb103f 100644 --- a/src/tui-harness/helpers.ts +++ b/src/tui-harness/helpers.ts @@ -103,7 +103,7 @@ export async function createMinimalProjectDir( build: 'CodeZip', entrypoint: 'main.py:handler', codeLocation: 'app/TestAgent', - runtimeVersion: 'PYTHON_3_13', + runtimeVersion: 'PYTHON_3_14', }); // Create the agent code directory so the CLI does not complain. From af69463faaf5031abb8a0ddf389e79c7ea56535c Mon Sep 17 00:00:00 2001 From: Jesse Turner Date: Wed, 15 Apr 2026 14:23:16 +0000 Subject: [PATCH 4/5] refactor: consolidate DEFAULT_PYTHON_VERSION into schema/constants Define DEFAULT_PYTHON_VERSION once in schema/constants.ts and re-export from the three TUI screen files that previously defined their own copy. Replace hardcoded 'PYTHON_3_14' fallbacks in packaging and AgentPrimitive with the shared constant. Future runtime version bumps now require a single-line change. --- src/cli/primitives/AgentPrimitive.tsx | 10 ++++++++-- src/cli/tui/screens/agent/types.ts | 2 +- src/cli/tui/screens/generate/defaults.ts | 7 +++---- src/cli/tui/screens/mcp/types.ts | 3 +-- src/lib/packaging/index.ts | 3 ++- src/lib/packaging/python.ts | 3 ++- src/schema/constants.ts | 3 +++ src/tui-harness/helpers.ts | 3 ++- 8 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/cli/primitives/AgentPrimitive.tsx b/src/cli/primitives/AgentPrimitive.tsx index 74bba146b..a2218aa2d 100644 --- a/src/cli/primitives/AgentPrimitive.tsx +++ b/src/cli/primitives/AgentPrimitive.tsx @@ -12,7 +12,13 @@ import type { SDKFramework, TargetLanguage, } from '../../schema'; -import { AgentEnvSpecSchema, CREDENTIAL_PROVIDERS, LIFECYCLE_TIMEOUT_MAX, LIFECYCLE_TIMEOUT_MIN } from '../../schema'; +import { + AgentEnvSpecSchema, + CREDENTIAL_PROVIDERS, + DEFAULT_PYTHON_VERSION, + LIFECYCLE_TIMEOUT_MAX, + LIFECYCLE_TIMEOUT_MIN, +} from '../../schema'; import type { AddAgentOptions as CLIAddAgentOptions } from '../commands/add/types'; import { validateAddAgentOptions } from '../commands/add/validate'; import { parseAndNormalizeHeaders } from '../commands/shared/header-utils'; @@ -526,7 +532,7 @@ export class AgentPrimitive extends BasePrimitive; +/** Default Python runtime version for new agents and MCP tools */ +export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_14'; + export const NodeRuntimeSchema = z.enum(['NODE_18', 'NODE_20', 'NODE_22']); export type NodeRuntime = z.infer; diff --git a/src/tui-harness/helpers.ts b/src/tui-harness/helpers.ts index d28cb103f..5b7a79895 100644 --- a/src/tui-harness/helpers.ts +++ b/src/tui-harness/helpers.ts @@ -5,6 +5,7 @@ * AgentCore CLI recognizes as valid projects, without the overhead of * running the full create wizard or npm/uv installs. */ +import { DEFAULT_PYTHON_VERSION } from '../schema'; import { mkdir, mkdtemp, rm, writeFile } from 'fs/promises'; import { tmpdir } from 'os'; import { join } from 'path'; @@ -103,7 +104,7 @@ export async function createMinimalProjectDir( build: 'CodeZip', entrypoint: 'main.py:handler', codeLocation: 'app/TestAgent', - runtimeVersion: 'PYTHON_3_14', + runtimeVersion: DEFAULT_PYTHON_VERSION, }); // Create the agent code directory so the CLI does not complain. From 3acc99de26ef37c3528e4d2cbea9c94e9bf43f05 Mon Sep 17 00:00:00 2001 From: Jesse Turner Date: Wed, 15 Apr 2026 14:59:31 +0000 Subject: [PATCH 5/5] fix: detect Python ABI tag and usable wheels errors in platform retry logic When numpy lacks pre-built wheels for a specific manylinux platform on CPython 3.14, uv reports "no wheels with a matching Python ABI tag" or "has no usable wheels" instead of the platform-specific errors the retry logic was matching. This caused the packager to hard-fail on the first platform candidate instead of retrying with a newer manylinux version that does have compatible wheels. --- src/lib/packaging/__tests__/uv.test.ts | 14 ++++++++++++++ src/lib/packaging/uv.ts | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/lib/packaging/__tests__/uv.test.ts b/src/lib/packaging/__tests__/uv.test.ts index a64cabb6a..143a428f5 100644 --- a/src/lib/packaging/__tests__/uv.test.ts +++ b/src/lib/packaging/__tests__/uv.test.ts @@ -57,6 +57,20 @@ describe('detectUnavailablePlatform', () => { expect(issue!.message).toContain('has no wheels'); }); + it('detects "no wheels with a matching Python ABI tag" message (e.g. cp314)', () => { + const out = 'numpy==2.4.4 has no wheels with a matching Python ABI tag (e.g., `cp314`)'; + const issue = detectUnavailablePlatform(result(out)); + expect(issue).not.toBeNull(); + expect(issue!.message).toContain('cp314'); + }); + + it('detects "has no usable wheels" message', () => { + const out = 'numpy>=1.10.4 has no usable wheels, we can conclude that numpy>=1.10.4 cannot be used.'; + const issue = detectUnavailablePlatform(result(out)); + expect(issue).not.toBeNull(); + expect(issue!.message).toContain('usable wheels'); + }); + it('returns null for successful output', () => { const out = 'Successfully installed package-1.0.0\nAll done!'; expect(detectUnavailablePlatform({ code: 0, stdout: out, stderr: '', signal: null })).toBeNull(); diff --git a/src/lib/packaging/uv.ts b/src/lib/packaging/uv.ts index 19e7fa0d8..1b6c0c2f6 100644 --- a/src/lib/packaging/uv.ts +++ b/src/lib/packaging/uv.ts @@ -7,7 +7,8 @@ export interface PlatformIssue { const PLATFORM_HINT_REGEX = /platforms:\s*([^\n]+)/i; const MANYLINUX_TOKEN = /(manylinux[^\s,]+)/gi; -const NO_WHEELS_REGEX = /(has no wheels with a matching platform tag|no compatible (?:wheels|tags) found)/i; +const NO_WHEELS_REGEX = + /(has no wheels with a matching (?:platform|Python ABI) tag|no compatible (?:wheels|tags) found|has no usable wheels)/i; export function detectUnavailablePlatform(result: SubprocessResult): PlatformIssue | null { const combined = `${result.stdout}\n${result.stderr}`;