From f5941e23f35fbc6be201543b22eba7faf0ee3f63 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Mon, 20 Jul 2026 19:49:30 +0000 Subject: [PATCH 1/9] feat(runtime): add read-only control-plane commands Add CLI-only get and list commands for runtimes, runtime versions, and runtime endpoints with Harness-style pagination, output, injected Core clients, fixtures, and command coverage. --- README.md | 20 +- src/components/RouterScreen.test.tsx | 1 + src/components/RouterScreen.tsx | 7 +- src/core/index.tsx | 2 + src/core/runtime.tsx | 91 +++++ src/handlers/index.tsx | 2 + src/handlers/root.test.tsx | 7 +- ...tAgentRuntimeCommand.3c7e4d626f840a06.json | 23 ++ ...tAgentRuntimeCommand.9525de54d13848ce.json | 23 ++ ...ntimeEndpointCommand.44a0ae1a769240bb.json | 17 + ...ntimeEndpointsCommand.ab3205c4a5c0994.json | 21 ++ ...ntimeVersionsCommand.c3860e80ac0e53f9.json | 16 + ...AgentRuntimesCommand.4bdf6139220a5345.json | 16 + .../__fixtures__/endpoint-get.golden.json | 13 + .../__fixtures__/endpoint-list.golden.json | 17 + .../runtime/__fixtures__/get.golden.json | 19 + .../runtime/__fixtures__/list.golden.json | 14 + .../__fixtures__/version-get.golden.json | 19 + .../__fixtures__/version-list.golden.json | 14 + src/handlers/runtime/endpoint/get/index.tsx | 29 ++ src/handlers/runtime/endpoint/index.tsx | 12 + src/handlers/runtime/endpoint/list/index.tsx | 32 ++ src/handlers/runtime/get/index.tsx | 21 ++ src/handlers/runtime/help.tsx | 9 + src/handlers/runtime/index.tsx | 17 + src/handlers/runtime/list/index.tsx | 26 ++ src/handlers/runtime/runtime.test.tsx | 352 ++++++++++++++++++ src/handlers/runtime/types.tsx | 39 ++ src/handlers/runtime/version/get/index.tsx | 29 ++ src/handlers/runtime/version/index.tsx | 12 + src/handlers/runtime/version/list/index.tsx | 32 ++ src/handlers/types.tsx | 2 + src/router/handler.tsx | 1 + src/router/index.tsx | 1 + src/router/router.tsx | 13 + src/testing/TestCoreClient.tsx | 142 +++++++ src/testing/index.tsx | 7 +- 37 files changed, 1112 insertions(+), 6 deletions(-) create mode 100644 src/core/runtime.tsx create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json create mode 100644 src/handlers/runtime/__fixtures__/endpoint-get.golden.json create mode 100644 src/handlers/runtime/__fixtures__/endpoint-list.golden.json create mode 100644 src/handlers/runtime/__fixtures__/get.golden.json create mode 100644 src/handlers/runtime/__fixtures__/list.golden.json create mode 100644 src/handlers/runtime/__fixtures__/version-get.golden.json create mode 100644 src/handlers/runtime/__fixtures__/version-list.golden.json create mode 100644 src/handlers/runtime/endpoint/get/index.tsx create mode 100644 src/handlers/runtime/endpoint/index.tsx create mode 100644 src/handlers/runtime/endpoint/list/index.tsx create mode 100644 src/handlers/runtime/get/index.tsx create mode 100644 src/handlers/runtime/help.tsx create mode 100644 src/handlers/runtime/index.tsx create mode 100644 src/handlers/runtime/list/index.tsx create mode 100644 src/handlers/runtime/runtime.test.tsx create mode 100644 src/handlers/runtime/types.tsx create mode 100644 src/handlers/runtime/version/get/index.tsx create mode 100644 src/handlers/runtime/version/index.tsx create mode 100644 src/handlers/runtime/version/list/index.tsx diff --git a/README.md b/README.md index 12896485a..8a362d435 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,7 @@ responses. `agentcore` wraps all of that behind one ergonomic tool. ## Command surface -Every leaf command runs headless with flags, or opens the matching TUI screen -when invoked bare. +Harness leaves run headless with flags or open the matching TUI screen when invoked bare. Runtime inspection and config commands are headless only; invoking a Runtime command group without a leaf prints help. ``` agentcore # interactive TUI @@ -49,6 +48,15 @@ agentcore # interactive TUI │ ├── list │ ├── update │ └── delete +├── runtime # inspect deployed AgentCore Runtimes +│ ├── get # fetch a Runtime by id +│ ├── list # list Runtimes (server-side paginated) +│ ├── version +│ │ ├── get # get a specific Runtime version +│ │ └── list # list a Runtime's versions +│ └── endpoint +│ ├── get # get a Runtime endpoint by qualifier +│ └── list # list a Runtime's endpoints └── config # read/write global config values ``` @@ -84,6 +92,14 @@ agentcore harness invoke --id --session-id --qualifier PRO # Run a shell command inside the agent runtime agentcore harness exec --id --command "ls -la" --json + +# Inspect deployed Runtimes without project configuration or deployment +agentcore runtime get --id +agentcore runtime list --max-results 20 +agentcore runtime version get --id --version +agentcore runtime version list --id --max-results 20 +agentcore runtime endpoint get --id --qualifier DEFAULT +agentcore runtime endpoint list --id --max-results 20 ``` --- diff --git a/src/components/RouterScreen.test.tsx b/src/components/RouterScreen.test.tsx index 8dbd8ee3b..e7eb380b2 100644 --- a/src/components/RouterScreen.test.tsx +++ b/src/components/RouterScreen.test.tsx @@ -15,6 +15,7 @@ describe("menu rendering", () => { const frame = r.lastFrame()!; expect(frame).toContain("harness"); expect(frame).toContain("manage agentcore harnesses"); + expect(frame).not.toContain("runtime"); expect(frame).toContain("config"); expect(frame).toContain("read/write global config values"); r.unmount(); diff --git a/src/components/RouterScreen.tsx b/src/components/RouterScreen.tsx index 571b325d3..f5e4a9f78 100644 --- a/src/components/RouterScreen.tsx +++ b/src/components/RouterScreen.tsx @@ -2,7 +2,7 @@ import React, { useMemo, useState } from "react"; import { Box, Text, useApp, useInput, useStdin } from "ink"; import type { Command } from "commander"; import { useNavigate } from "react-router"; -import { CommandKey } from "../router"; +import { CommandKey, isCommandVisibleInTui } from "../router"; import { Layout } from "./Layout"; import { Divider } from "./ui/divider"; import { TextInput } from "./ui/text-input"; @@ -57,7 +57,10 @@ export function RouterScreen({ ctx, path }: RouterScreenProps) { const command = resolveCommand(ctx.require(CommandKey), path); const options: Option[] = useMemo( - () => command.commands.map((c) => ({ name: c.name(), description: c.description() })), + () => + command.commands + .filter(isCommandVisibleInTui) + .map((c) => ({ name: c.name(), description: c.description() })), [command], ); diff --git a/src/core/index.tsx b/src/core/index.tsx index fe3957c29..b28fa5323 100644 --- a/src/core/index.tsx +++ b/src/core/index.tsx @@ -2,6 +2,7 @@ import { BedrockAgentCoreControlClient } from "@aws-sdk/client-bedrock-agentcore import { BedrockAgentCoreClient } from "@aws-sdk/client-bedrock-agentcore"; import { IAMClient } from "@aws-sdk/client-iam"; import { HarnessClient } from "./harness"; +import { RuntimeClient } from "./runtime"; import type { AwsClients, ClientConfig, @@ -29,6 +30,7 @@ export class CoreClient implements AwsClients { // Feature-scoped sub-clients. Access as e.g. `coreClient.harness.getHarness(...)`. readonly harness: HarnessClient = new HarnessClient(this); + readonly runtime: RuntimeClient = new RuntimeClient(this); constructor( private readonly createControlClient: CreateControlClient, diff --git a/src/core/runtime.tsx b/src/core/runtime.tsx new file mode 100644 index 000000000..77cc6c3e8 --- /dev/null +++ b/src/core/runtime.tsx @@ -0,0 +1,91 @@ +import { + GetAgentRuntimeCommand, + GetAgentRuntimeEndpointCommand, + ListAgentRuntimeEndpointsCommand, + ListAgentRuntimesCommand, + ListAgentRuntimeVersionsCommand, + type GetAgentRuntimeEndpointResponse, + type GetAgentRuntimeResponse, + type ListAgentRuntimeEndpointsResponse, + type ListAgentRuntimesResponse, + type ListAgentRuntimeVersionsResponse, +} from "@aws-sdk/client-bedrock-agentcore-control"; +import type { CoreRuntimeClient } from "../handlers/runtime/types"; +import type { AwsClients, CoreOptions } from "./types"; +import { toClientConfig } from "./utils"; + +export class RuntimeClient implements CoreRuntimeClient { + constructor(private readonly clients: AwsClients) {} + + async getRuntime(id: string, options: CoreOptions): Promise { + return this.clients + .control(toClientConfig(options)) + .send(new GetAgentRuntimeCommand({ agentRuntimeId: id })); + } + + async getRuntimeVersion( + id: string, + version: string, + options: CoreOptions, + ): Promise { + return this.clients.control(toClientConfig(options)).send( + new GetAgentRuntimeCommand({ + agentRuntimeId: id, + agentRuntimeVersion: version, + }), + ); + } + + async getRuntimeEndpoint( + id: string, + qualifier: string, + options: CoreOptions, + ): Promise { + return this.clients.control(toClientConfig(options)).send( + new GetAgentRuntimeEndpointCommand({ + agentRuntimeId: id, + endpointName: qualifier, + }), + ); + } + + async listRuntimes( + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise { + return this.clients + .control(toClientConfig(options)) + .send(new ListAgentRuntimesCommand({ nextToken, maxResults })); + } + + async listRuntimeVersions( + id: string, + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise { + return this.clients.control(toClientConfig(options)).send( + new ListAgentRuntimeVersionsCommand({ + agentRuntimeId: id, + nextToken, + maxResults, + }), + ); + } + + async listRuntimeEndpoints( + id: string, + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise { + return this.clients.control(toClientConfig(options)).send( + new ListAgentRuntimeEndpointsCommand({ + agentRuntimeId: id, + nextToken, + maxResults, + }), + ); + } +} diff --git a/src/handlers/index.tsx b/src/handlers/index.tsx index 5820179cb..3707fc373 100644 --- a/src/handlers/index.tsx +++ b/src/handlers/index.tsx @@ -1,5 +1,6 @@ import { Router } from "../router"; import { createHarnessHandler } from "./harness/index.tsx"; +import { createRuntimeHandler } from "./runtime/index.tsx"; import { DebugKey, EndpointKey, JsonKey, RegionKey } from "./keys.tsx"; import { createConfigHandler } from "./config/"; import { createProjectHandler } from "./project/index.ts"; @@ -33,6 +34,7 @@ export function createRootHandler(core: Core, config: RootHandlerConfig): Router // Install sub handlers root.handler(createHarnessHandler(core, io)); + root.handler(createRuntimeHandler(core, io)); root.handler(createConfigHandler(io)); root.handler(createProjectHandler()); diff --git a/src/handlers/root.test.tsx b/src/handlers/root.test.tsx index 221c1daad..b79eaec2f 100644 --- a/src/handlers/root.test.tsx +++ b/src/handlers/root.test.tsx @@ -9,6 +9,11 @@ describe("createRootHandler", () => { logger: createSilentLogger(), }); expect(root.name()).toBe("agentcore"); - expect(root.children().map((c) => c.name())).toEqual(["harness", "config", "project"]); + expect(root.children().map((c) => c.name())).toEqual([ + "harness", + "runtime", + "config", + "project", + ]); }); }); diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json new file mode 100644 index 000000000..f45373a0a --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json @@ -0,0 +1,23 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeName": "fixture-runtime", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "3", + "createdAt": { + "$date": "2026-07-20T10:00:00.000Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-20T11:00:00.000Z" + }, + "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "failureReason": "none", + "description": "Runtime fixture with complete read fields" +} diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json new file mode 100644 index 000000000..9ce5f2b6a --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json @@ -0,0 +1,23 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeName": "fixture-runtime", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "2", + "createdAt": { + "$date": "2026-07-19T10:00:00.000Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-19T11:00:00.000Z" + }, + "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "failureReason": "none", + "description": "Runtime version fixture" +} diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json new file mode 100644 index 000000000..6735448b1 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json @@ -0,0 +1,17 @@ +{ + "liveVersion": "2", + "targetVersion": "3", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "description": "Default Runtime endpoint", + "status": "UPDATING", + "createdAt": { + "$date": "2026-07-19T12:00:00.000Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-20T12:00:00.000Z" + }, + "failureReason": "none", + "name": "DEFAULT", + "id": "endpoint-1234567890" +} diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json new file mode 100644 index 000000000..2b0bd6c07 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json @@ -0,0 +1,21 @@ +{ + "runtimeEndpoints": [ + { + "name": "DEFAULT", + "liveVersion": "2", + "targetVersion": "3", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "status": "UPDATING", + "id": "endpoint-1234567890", + "description": "Default Runtime endpoint", + "createdAt": { + "$date": "2026-07-19T12:00:00.000Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-20T12:00:00.000Z" + } + } + ], + "nextToken": "endpoint-response-token" +} diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json new file mode 100644 index 000000000..f3124b2fd --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json @@ -0,0 +1,16 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "2", + "agentRuntimeName": "fixture-runtime", + "description": "Runtime version fixture", + "lastUpdatedAt": { + "$date": "2026-07-19T11:00:00.000Z" + }, + "status": "READY" + } + ], + "nextToken": "version-response-token" +} diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json new file mode 100644 index 000000000..7c9f614e7 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json @@ -0,0 +1,16 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "3", + "agentRuntimeName": "fixture-runtime", + "description": "Runtime fixture", + "lastUpdatedAt": { + "$date": "2026-07-20T11:00:00.000Z" + }, + "status": "READY" + } + ], + "nextToken": "runtime-response-token" +} diff --git a/src/handlers/runtime/__fixtures__/endpoint-get.golden.json b/src/handlers/runtime/__fixtures__/endpoint-get.golden.json new file mode 100644 index 000000000..ffb7833a8 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/endpoint-get.golden.json @@ -0,0 +1,13 @@ +{ + "liveVersion": "2", + "targetVersion": "3", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "description": "Default Runtime endpoint", + "status": "UPDATING", + "createdAt": "2026-07-19T12:00:00.000Z", + "lastUpdatedAt": "2026-07-20T12:00:00.000Z", + "failureReason": "none", + "name": "DEFAULT", + "id": "endpoint-1234567890" +} diff --git a/src/handlers/runtime/__fixtures__/endpoint-list.golden.json b/src/handlers/runtime/__fixtures__/endpoint-list.golden.json new file mode 100644 index 000000000..09f7aa4fe --- /dev/null +++ b/src/handlers/runtime/__fixtures__/endpoint-list.golden.json @@ -0,0 +1,17 @@ +{ + "runtimeEndpoints": [ + { + "name": "DEFAULT", + "liveVersion": "2", + "targetVersion": "3", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "status": "UPDATING", + "id": "endpoint-1234567890", + "description": "Default Runtime endpoint", + "createdAt": "2026-07-19T12:00:00.000Z", + "lastUpdatedAt": "2026-07-20T12:00:00.000Z" + } + ], + "nextToken": "endpoint-response-token" +} diff --git a/src/handlers/runtime/__fixtures__/get.golden.json b/src/handlers/runtime/__fixtures__/get.golden.json new file mode 100644 index 000000000..778ba1970 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/get.golden.json @@ -0,0 +1,19 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeName": "fixture-runtime", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "3", + "createdAt": "2026-07-20T10:00:00.000Z", + "lastUpdatedAt": "2026-07-20T11:00:00.000Z", + "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "failureReason": "none", + "description": "Runtime fixture with complete read fields" +} diff --git a/src/handlers/runtime/__fixtures__/list.golden.json b/src/handlers/runtime/__fixtures__/list.golden.json new file mode 100644 index 000000000..3ca42a674 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/list.golden.json @@ -0,0 +1,14 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "3", + "agentRuntimeName": "fixture-runtime", + "description": "Runtime fixture", + "lastUpdatedAt": "2026-07-20T11:00:00.000Z", + "status": "READY" + } + ], + "nextToken": "runtime-response-token" +} diff --git a/src/handlers/runtime/__fixtures__/version-get.golden.json b/src/handlers/runtime/__fixtures__/version-get.golden.json new file mode 100644 index 000000000..9f11aa771 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/version-get.golden.json @@ -0,0 +1,19 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeName": "fixture-runtime", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "2", + "createdAt": "2026-07-19T10:00:00.000Z", + "lastUpdatedAt": "2026-07-19T11:00:00.000Z", + "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "failureReason": "none", + "description": "Runtime version fixture" +} diff --git a/src/handlers/runtime/__fixtures__/version-list.golden.json b/src/handlers/runtime/__fixtures__/version-list.golden.json new file mode 100644 index 000000000..6232e54b5 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/version-list.golden.json @@ -0,0 +1,14 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", + "agentRuntimeId": "runtime-1234567890", + "agentRuntimeVersion": "2", + "agentRuntimeName": "fixture-runtime", + "description": "Runtime version fixture", + "lastUpdatedAt": "2026-07-19T11:00:00.000Z", + "status": "READY" + } + ], + "nextToken": "version-response-token" +} diff --git a/src/handlers/runtime/endpoint/get/index.tsx b/src/handlers/runtime/endpoint/get/index.tsx new file mode 100644 index 000000000..f4b342920 --- /dev/null +++ b/src/handlers/runtime/endpoint/get/index.tsx @@ -0,0 +1,29 @@ +import z from "zod"; +import { createHandler, flag } from "../../../../router"; +import { JsonRendererKey } from "../../../../tui"; +import type { Core } from "../../../types"; +import { coreOptsFromCtx } from "../../../utils"; + +export const createGetRuntimeEndpointHandler = (core: Core) => + createHandler({ + name: "get", + description: "get a Runtime endpoint", + flags: [ + flag("id", "the ID of the Runtime", z.string().optional()), + flag("qualifier", "the endpoint name (qualifier)", z.string().optional()), + ], + handle: async (ctx, flags) => { + if (!flags.id) { + throw new TypeError("required option '--id ' not specified"); + } + if (!flags.qualifier) { + throw new TypeError("required option '--qualifier ' not specified"); + } + + ctx + .require(JsonRendererKey) + .renderJson( + await core.runtime.getRuntimeEndpoint(flags.id, flags.qualifier, coreOptsFromCtx(ctx)), + ); + }, + }); diff --git a/src/handlers/runtime/endpoint/index.tsx b/src/handlers/runtime/endpoint/index.tsx new file mode 100644 index 000000000..23254220d --- /dev/null +++ b/src/handlers/runtime/endpoint/index.tsx @@ -0,0 +1,12 @@ +import { Router } from "../../../router"; +import type { AppIO, Core } from "../../types"; +import { createHelpDefault } from "../help"; +import { createGetRuntimeEndpointHandler } from "./get"; +import { createListRuntimeEndpointsHandler } from "./list"; + +export function createRuntimeEndpointHandler(core: Core, io: AppIO): Router { + return new Router("endpoint", "inspect AgentCore Runtime endpoints") + .default(createHelpDefault(io)) + .handler(createGetRuntimeEndpointHandler(core)) + .handler(createListRuntimeEndpointsHandler(core)); +} diff --git a/src/handlers/runtime/endpoint/list/index.tsx b/src/handlers/runtime/endpoint/list/index.tsx new file mode 100644 index 000000000..9c5c4531b --- /dev/null +++ b/src/handlers/runtime/endpoint/list/index.tsx @@ -0,0 +1,32 @@ +import z from "zod"; +import { createHandler, flag } from "../../../../router"; +import { JsonRendererKey } from "../../../../tui"; +import type { Core } from "../../../types"; +import { coreOptsFromCtx } from "../../../utils"; + +export const createListRuntimeEndpointsHandler = (core: Core) => + createHandler({ + name: "list", + description: "list a Runtime's endpoints", + flags: [ + flag("id", "the ID of the Runtime", z.string().optional()), + flag("next-token", "next token to use on paginated", z.string().optional()), + flag("max-results", "max number of items to return", z.number().optional()), + ], + handle: async (ctx, flags) => { + if (!flags.id) { + throw new TypeError("required option '--id ' not specified"); + } + + ctx + .require(JsonRendererKey) + .renderJson( + await core.runtime.listRuntimeEndpoints( + flags.id, + flags["next-token"], + flags["max-results"], + coreOptsFromCtx(ctx), + ), + ); + }, + }); diff --git a/src/handlers/runtime/get/index.tsx b/src/handlers/runtime/get/index.tsx new file mode 100644 index 000000000..b62f3e88d --- /dev/null +++ b/src/handlers/runtime/get/index.tsx @@ -0,0 +1,21 @@ +import z from "zod"; +import { createHandler, flag } from "../../../router"; +import { JsonRendererKey } from "../../../tui"; +import type { Core } from "../../types"; +import { coreOptsFromCtx } from "../../utils"; + +export const createGetRuntimeHandler = (core: Core) => + createHandler({ + name: "get", + description: "get an AgentCore Runtime", + flags: [flag("id", "the ID of the Runtime", z.string().optional())], + handle: async (ctx, flags) => { + if (!flags.id) { + throw new TypeError("required option '--id ' not specified"); + } + + ctx + .require(JsonRendererKey) + .renderJson(await core.runtime.getRuntime(flags.id, coreOptsFromCtx(ctx))); + }, + }); diff --git a/src/handlers/runtime/help.tsx b/src/handlers/runtime/help.tsx new file mode 100644 index 000000000..6a9755abc --- /dev/null +++ b/src/handlers/runtime/help.tsx @@ -0,0 +1,9 @@ +import { CommandKey, type DefaultHandle } from "../../router"; +import type { AppIO } from "../types"; + +export function createHelpDefault(io: AppIO): DefaultHandle { + return async (ctx) => { + const help = ctx.require(CommandKey).helpInformation(); + io.stdout.write(help.endsWith("\n") ? help : `${help}\n`); + }; +} diff --git a/src/handlers/runtime/index.tsx b/src/handlers/runtime/index.tsx new file mode 100644 index 000000000..eca109977 --- /dev/null +++ b/src/handlers/runtime/index.tsx @@ -0,0 +1,17 @@ +import { Router } from "../../router"; +import type { AppIO, Core } from "../types"; +import { createRuntimeEndpointHandler } from "./endpoint"; +import { createGetRuntimeHandler } from "./get"; +import { createHelpDefault } from "./help"; +import { createListRuntimesHandler } from "./list"; +import { createRuntimeVersionHandler } from "./version"; + +export function createRuntimeHandler(core: Core, io: AppIO): Router { + return new Router("runtime", "inspect AgentCore Runtimes") + .hideFromTui() + .default(createHelpDefault(io)) + .handler(createGetRuntimeHandler(core)) + .handler(createListRuntimesHandler(core)) + .handler(createRuntimeVersionHandler(core, io)) + .handler(createRuntimeEndpointHandler(core, io)); +} diff --git a/src/handlers/runtime/list/index.tsx b/src/handlers/runtime/list/index.tsx new file mode 100644 index 000000000..42db44ed1 --- /dev/null +++ b/src/handlers/runtime/list/index.tsx @@ -0,0 +1,26 @@ +import z from "zod"; +import { createHandler, flag } from "../../../router"; +import { JsonRendererKey } from "../../../tui"; +import type { Core } from "../../types"; +import { coreOptsFromCtx } from "../../utils"; + +export const createListRuntimesHandler = (core: Core) => + createHandler({ + name: "list", + description: "list AgentCore Runtimes", + flags: [ + flag("next-token", "next token to use on paginated", z.string().optional()), + flag("max-results", "max number of items to return", z.number().optional()), + ], + handle: async (ctx, flags) => { + ctx + .require(JsonRendererKey) + .renderJson( + await core.runtime.listRuntimes( + flags["next-token"], + flags["max-results"], + coreOptsFromCtx(ctx), + ), + ); + }, + }); diff --git a/src/handlers/runtime/runtime.test.tsx b/src/handlers/runtime/runtime.test.tsx new file mode 100644 index 000000000..7a9bfbac7 --- /dev/null +++ b/src/handlers/runtime/runtime.test.tsx @@ -0,0 +1,352 @@ +import { describe, expect, test } from "bun:test"; +import { join } from "node:path"; +import type { + GetAgentRuntimeEndpointResponse, + GetAgentRuntimeResponse, +} from "@aws-sdk/client-bedrock-agentcore-control"; +import { CoreClient } from "../../core"; +import { + createSilentLogger, + fixtureFactories, + matchGolden, + TestCoreClient, + TestRuntimeClient, + testIO, +} from "../../testing"; +import { createRootHandler } from "../index"; + +const REGION = "us-west-2"; +const FIXTURES = join(import.meta.dir, "__fixtures__"); +const RUNTIME_ID = "runtime-1234567890"; +const LONG_RUNTIME_ID = `${"a".repeat(48)}-1234567890`; + +function configureRuntime(runtime: TestRuntimeClient): void { + runtime + .setGetResponse({ + agentRuntimeId: "runtime-1", + agentRuntimeVersion: "1", + status: "READY", + } as GetAgentRuntimeResponse) + .setGetVersionResponse({ + agentRuntimeId: "runtime-1", + agentRuntimeVersion: "3", + status: "READY", + } as GetAgentRuntimeResponse) + .setGetEndpointResponse({ + agentRuntimeArn: "arn:runtime-1", + name: "PROD", + status: "READY", + } as GetAgentRuntimeEndpointResponse) + .setListResponse({ agentRuntimes: [], nextToken: "runtime-token" }) + .setListVersionsResponse({ agentRuntimes: [], nextToken: "version-token" }) + .setListEndpointsResponse({ runtimeEndpoints: [], nextToken: "endpoint-token" }); +} + +async function run( + args: string[], + configure?: (runtime: TestRuntimeClient) => void, +): Promise<{ + stdout: string; + runtime: TestRuntimeClient; +}> { + const core = new TestCoreClient(); + configureRuntime(core.runtime); + configure?.(core.runtime); + const io = testIO(); + const root = createRootHandler(core, { io: io.io, logger: createSilentLogger() }); + + await root.route(["node", "agentcore", ...args, "--region", REGION]); + return { stdout: io.stdout(), runtime: core.runtime }; +} + +async function runFixture(args: string[]): Promise { + const { createControlClient, createDataClient, createIamClient } = fixtureFactories(FIXTURES); + const core = new CoreClient(createControlClient, createDataClient, createIamClient); + const io = testIO(); + const root = createRootHandler(core, { io: io.io, logger: createSilentLogger() }); + + await root.route(["node", "agentcore", ...args, "--region", REGION]); + return io.stdout(); +} + +describe("runtime command hierarchy", () => { + test("registers only the approved control-plane branches", () => { + const core = new TestCoreClient(); + const root = createRootHandler(core, { + io: testIO().io, + logger: createSilentLogger(), + }); + const runtime = root.children().find((child) => child.name() === "runtime"); + + expect(runtime?.children().map((child) => child.name())).toEqual([ + "get", + "list", + "version", + "endpoint", + ]); + expect( + runtime + ?.children() + .find((child) => child.name() === "version") + ?.children() + .map((child) => child.name()), + ).toEqual(["get", "list"]); + expect( + runtime + ?.children() + .find((child) => child.name() === "endpoint") + ?.children() + .map((child) => child.name()), + ).toEqual(["get", "list"]); + }); + + test.each(["runtime", "runtime version", "runtime endpoint"])( + "prints AppIO-backed help for bare `%s` without a Core call", + async (command) => { + const result = await run(command.split(" ")); + + expect(result.stdout).toContain(`Usage: agentcore ${command}`); + expect(result.stdout).toContain("Commands:"); + expect(result.runtime.calls).toEqual([]); + }, + ); +}); + +describe("runtime control reads", () => { + test("gets a Runtime and renders the complete response", async () => { + const result = await run(["runtime", "get", "--id", "runtime-1"]); + + expect(JSON.parse(result.stdout)).toEqual({ + agentRuntimeId: "runtime-1", + agentRuntimeVersion: "1", + status: "READY", + }); + expect(result.runtime.calls).toEqual([ + { + method: "getRuntime", + args: ["runtime-1", { region: REGION }], + }, + ]); + }); + + test("lists one Runtime page with Harness pagination names", async () => { + const result = await run([ + "runtime", + "list", + "--max-results", + "5", + "--next-token", + "input-token", + ]); + + expect(JSON.parse(result.stdout).nextToken).toBe("runtime-token"); + expect(result.runtime.calls).toEqual([ + { + method: "listRuntimes", + args: ["input-token", 5, { region: REGION }], + }, + ]); + }); + + test("gets a Runtime version", async () => { + const result = await run(["runtime", "version", "get", "--id", "runtime-1", "--version", "3"]); + + expect(JSON.parse(result.stdout).agentRuntimeVersion).toBe("3"); + expect(result.runtime.calls).toEqual([ + { + method: "getRuntimeVersion", + args: ["runtime-1", "3", { region: REGION }], + }, + ]); + }); + + test("lists one Runtime version page", async () => { + const result = await run([ + "runtime", + "version", + "list", + "--id", + "runtime-1", + "--max-results", + "7", + "--next-token", + "input-token", + ]); + + expect(JSON.parse(result.stdout).nextToken).toBe("version-token"); + expect(result.runtime.calls).toEqual([ + { + method: "listRuntimeVersions", + args: ["runtime-1", "input-token", 7, { region: REGION }], + }, + ]); + }); + + test("maps the endpoint qualifier", async () => { + const result = await run([ + "runtime", + "endpoint", + "get", + "--id", + "runtime-1", + "--qualifier", + "PROD", + ]); + + expect(JSON.parse(result.stdout).name).toBe("PROD"); + expect(result.runtime.calls).toEqual([ + { + method: "getRuntimeEndpoint", + args: ["runtime-1", "PROD", { region: REGION }], + }, + ]); + }); + + test("lists one Runtime endpoint page", async () => { + const result = await run([ + "runtime", + "endpoint", + "list", + "--id", + "runtime-1", + "--max-results", + "9", + "--next-token", + "input-token", + ]); + + expect(JSON.parse(result.stdout).nextToken).toBe("endpoint-token"); + expect(result.runtime.calls).toEqual([ + { + method: "listRuntimeEndpoints", + args: ["runtime-1", "input-token", 9, { region: REGION }], + }, + ]); + }); + + test.each([ + [["runtime", "get"], /--id/], + [["runtime", "version", "get", "--id", "runtime-1"], /--version/], + [["runtime", "version", "list"], /--id/], + [["runtime", "endpoint", "get", "--id", "runtime-1"], /--qualifier/], + [["runtime", "endpoint", "list"], /--id/], + ] as const)("rejects a missing required selector for `%s`", async (args, message) => { + expect(run([...args])).rejects.toThrow(message); + }); + + test.each([ + [["runtime", "get", "--id", LONG_RUNTIME_ID], "getRuntime"], + [["runtime", "version", "get", "--id", LONG_RUNTIME_ID, "--version", "1"], "getRuntimeVersion"], + [["runtime", "version", "list", "--id", LONG_RUNTIME_ID], "listRuntimeVersions"], + [ + ["runtime", "endpoint", "get", "--id", LONG_RUNTIME_ID, "--qualifier", "DEFAULT"], + "getRuntimeEndpoint", + ], + [["runtime", "endpoint", "list", "--id", LONG_RUNTIME_ID], "listRuntimeEndpoints"], + ] as const)("accepts a service-valid long Runtime ID for `%s`", async (args, method) => { + const result = await run([...args]); + + expect(result.runtime.calls).toHaveLength(1); + expect(result.runtime.calls[0]?.method).toBe(method); + expect(result.runtime.calls[0]?.args[0]).toBe(LONG_RUNTIME_ID); + }); + + test("propagates Runtime Core errors", async () => { + await expect( + run(["runtime", "get", "--id", "runtime-1"], (runtime) => + runtime.setError(new Error("runtime unavailable")), + ), + ).rejects.toThrow("runtime unavailable"); + }); +}); + +describe("runtime fixture command flow", () => { + test("replays Runtime get through the real Core", async () => { + const out = await runFixture(["runtime", "get", "--id", RUNTIME_ID]); + + matchGolden(FIXTURES, "get.golden.json", out); + const parsed = JSON.parse(out); + expect(parsed.agentRuntimeId).toBe(RUNTIME_ID); + expect(parsed.failureReason).toBe("none"); + }); + + test("replays Runtime list through the real Core", async () => { + const out = await runFixture([ + "runtime", + "list", + "--max-results", + "2", + "--next-token", + "runtime-request-token", + ]); + + matchGolden(FIXTURES, "list.golden.json", out); + expect(JSON.parse(out).nextToken).toBe("runtime-response-token"); + }); + + test("replays Runtime version get through the real Core", async () => { + const out = await runFixture([ + "runtime", + "version", + "get", + "--id", + RUNTIME_ID, + "--version", + "2", + ]); + + matchGolden(FIXTURES, "version-get.golden.json", out); + expect(JSON.parse(out).agentRuntimeVersion).toBe("2"); + }); + + test("replays Runtime version list through the real Core", async () => { + const out = await runFixture([ + "runtime", + "version", + "list", + "--id", + RUNTIME_ID, + "--max-results", + "2", + "--next-token", + "version-request-token", + ]); + + matchGolden(FIXTURES, "version-list.golden.json", out); + expect(JSON.parse(out).nextToken).toBe("version-response-token"); + }); + + test("replays Runtime endpoint get through the real Core", async () => { + const out = await runFixture([ + "runtime", + "endpoint", + "get", + "--id", + RUNTIME_ID, + "--qualifier", + "DEFAULT", + ]); + + matchGolden(FIXTURES, "endpoint-get.golden.json", out); + const parsed = JSON.parse(out); + expect(parsed.name).toBe("DEFAULT"); + expect(parsed.liveVersion).toBe("2"); + }); + + test("replays Runtime endpoint list through the real Core", async () => { + const out = await runFixture([ + "runtime", + "endpoint", + "list", + "--id", + RUNTIME_ID, + "--max-results", + "2", + "--next-token", + "endpoint-request-token", + ]); + + matchGolden(FIXTURES, "endpoint-list.golden.json", out); + expect(JSON.parse(out).nextToken).toBe("endpoint-response-token"); + }); +}); diff --git a/src/handlers/runtime/types.tsx b/src/handlers/runtime/types.tsx new file mode 100644 index 000000000..e2f219f1b --- /dev/null +++ b/src/handlers/runtime/types.tsx @@ -0,0 +1,39 @@ +import type { + GetAgentRuntimeEndpointResponse, + GetAgentRuntimeResponse, + ListAgentRuntimeEndpointsResponse, + ListAgentRuntimesResponse, + ListAgentRuntimeVersionsResponse, +} from "@aws-sdk/client-bedrock-agentcore-control"; +import type { CoreOptions } from "../../core/types"; + +export interface CoreRuntimeClient { + getRuntime(id: string, options: CoreOptions): Promise; + getRuntimeVersion( + id: string, + version: string, + options: CoreOptions, + ): Promise; + getRuntimeEndpoint( + id: string, + qualifier: string, + options: CoreOptions, + ): Promise; + listRuntimes( + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise; + listRuntimeVersions( + id: string, + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise; + listRuntimeEndpoints( + id: string, + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise; +} diff --git a/src/handlers/runtime/version/get/index.tsx b/src/handlers/runtime/version/get/index.tsx new file mode 100644 index 000000000..3d82c53b3 --- /dev/null +++ b/src/handlers/runtime/version/get/index.tsx @@ -0,0 +1,29 @@ +import z from "zod"; +import { createHandler, flag } from "../../../../router"; +import { JsonRendererKey } from "../../../../tui"; +import type { Core } from "../../../types"; +import { coreOptsFromCtx } from "../../../utils"; + +export const createGetRuntimeVersionHandler = (core: Core) => + createHandler({ + name: "get", + description: "get a specific Runtime version", + flags: [ + flag("id", "the ID of the Runtime", z.string().optional()), + flag("version", "the Runtime version to get", z.string().optional()), + ], + handle: async (ctx, flags) => { + if (!flags.id) { + throw new TypeError("required option '--id ' not specified"); + } + if (!flags.version) { + throw new TypeError("required option '--version ' not specified"); + } + + ctx + .require(JsonRendererKey) + .renderJson( + await core.runtime.getRuntimeVersion(flags.id, flags.version, coreOptsFromCtx(ctx)), + ); + }, + }); diff --git a/src/handlers/runtime/version/index.tsx b/src/handlers/runtime/version/index.tsx new file mode 100644 index 000000000..57e40d439 --- /dev/null +++ b/src/handlers/runtime/version/index.tsx @@ -0,0 +1,12 @@ +import { Router } from "../../../router"; +import type { AppIO, Core } from "../../types"; +import { createHelpDefault } from "../help"; +import { createGetRuntimeVersionHandler } from "./get"; +import { createListRuntimeVersionsHandler } from "./list"; + +export function createRuntimeVersionHandler(core: Core, io: AppIO): Router { + return new Router("version", "inspect AgentCore Runtime versions") + .default(createHelpDefault(io)) + .handler(createGetRuntimeVersionHandler(core)) + .handler(createListRuntimeVersionsHandler(core)); +} diff --git a/src/handlers/runtime/version/list/index.tsx b/src/handlers/runtime/version/list/index.tsx new file mode 100644 index 000000000..b6e930acb --- /dev/null +++ b/src/handlers/runtime/version/list/index.tsx @@ -0,0 +1,32 @@ +import z from "zod"; +import { createHandler, flag } from "../../../../router"; +import { JsonRendererKey } from "../../../../tui"; +import type { Core } from "../../../types"; +import { coreOptsFromCtx } from "../../../utils"; + +export const createListRuntimeVersionsHandler = (core: Core) => + createHandler({ + name: "list", + description: "list a Runtime's versions", + flags: [ + flag("id", "the ID of the Runtime", z.string().optional()), + flag("next-token", "next token to use on paginated", z.string().optional()), + flag("max-results", "max number of items to return", z.number().optional()), + ], + handle: async (ctx, flags) => { + if (!flags.id) { + throw new TypeError("required option '--id ' not specified"); + } + + ctx + .require(JsonRendererKey) + .renderJson( + await core.runtime.listRuntimeVersions( + flags.id, + flags["next-token"], + flags["max-results"], + coreOptsFromCtx(ctx), + ), + ); + }, + }); diff --git a/src/handlers/types.tsx b/src/handlers/types.tsx index 00aab42a2..3e95a2b14 100644 --- a/src/handlers/types.tsx +++ b/src/handlers/types.tsx @@ -1,8 +1,10 @@ import type { CoreHarnessClient } from "./harness/types.tsx"; +import type { CoreRuntimeClient } from "./runtime/types.tsx"; import type { Context } from "../router"; export interface Core { harness: CoreHarnessClient; + runtime: CoreRuntimeClient; } // AppIO is the set of standard streams the app reads from and writes to. It is diff --git a/src/router/handler.tsx b/src/router/handler.tsx index cc3f2ecd2..e1e0be4b6 100644 --- a/src/router/handler.tsx +++ b/src/router/handler.tsx @@ -77,6 +77,7 @@ type HandleFn< > = (ctx: Context, flags: FlagsOf, args: ArgumentsOf) => Promise; export interface Handler { + hiddenFromTui?: boolean; name(): string; description(): string; flags(): Flag[]; diff --git a/src/router/index.tsx b/src/router/index.tsx index 98f581fa8..e28a2cdbb 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -7,6 +7,7 @@ export { type DefaultHandle, type DefaultHandlerProvider, isDefaultHandlerProvider, + isCommandVisibleInTui, } from "./router"; export { type Handler, diff --git a/src/router/router.tsx b/src/router/router.tsx index 5aec62670..b1831c7e0 100644 --- a/src/router/router.tsx +++ b/src/router/router.tsx @@ -14,6 +14,12 @@ export const PathKey: ContextKey = contextKey("path"); export const LoggerKey = contextKey("logger"); +const commandsHiddenFromTui = new WeakSet(); + +export function isCommandVisibleInTui(command: Command): boolean { + return !commandsHiddenFromTui.has(command); +} + // DefaultHandle runs when a group is selected without a subcommand (e.g. // `agentcore` or `agentcore harness`). It reads group-level/global flags from the // context; own flags/arguments are not supported, so it receives empty objects. @@ -104,6 +110,7 @@ export function compile( ): Command { const c = new Command(node.name()); c.description(node.description()); + if (node.hiddenFromTui) commandsHiddenFromTui.add(c); const ownFlags = node.flags(); declareFlags(c, ownFlags); @@ -153,6 +160,7 @@ export function compile( } export class Router implements Handler, MiddlewareProvider, DefaultHandlerProvider { + hiddenFromTui = false; private mws: Middleware[] = []; private handlers: Handler[] = []; private globalFlags: GlobalFlag[] = []; @@ -175,6 +183,11 @@ export class Router implements Handler, MiddlewareProvider, DefaultHandlerProvid return this; } + hideFromTui(): this { + this.hiddenFromTui = true; + return this; + } + groupFlags(...flags: GlobalFlag[]): this { this.globalFlags.push(...flags); return this; diff --git a/src/testing/TestCoreClient.tsx b/src/testing/TestCoreClient.tsx index 2bc9b000c..5f4c115f3 100644 --- a/src/testing/TestCoreClient.tsx +++ b/src/testing/TestCoreClient.tsx @@ -8,6 +8,11 @@ import type { DeleteHarnessResponse, GetHarnessResponse, GetHarnessEndpointResponse, + GetAgentRuntimeEndpointResponse, + GetAgentRuntimeResponse, + ListAgentRuntimeEndpointsResponse, + ListAgentRuntimesResponse, + ListAgentRuntimeVersionsResponse, ListHarnessesResponse, ListHarnessEndpointsResponse, ListHarnessVersionsResponse, @@ -26,6 +31,7 @@ import type { } from "@aws-sdk/client-bedrock-agentcore"; import type { Core } from "../handlers/types"; import type { CoreHarnessClient, CreateHarnessInput } from "../handlers/harness/types"; +import type { CoreRuntimeClient } from "../handlers/runtime/types"; import type { CoreOptions } from "../core/types"; // TestCoreClient is a hand-controllable `Core` for tests. It implements the same @@ -64,6 +70,15 @@ const DEFAULT_UPDATE_ENDPOINT_RESPONSE: UpdateHarnessEndpointResponse = {} as UpdateHarnessEndpointResponse; const DEFAULT_DELETE_ENDPOINT_RESPONSE: DeleteHarnessEndpointResponse = {} as DeleteHarnessEndpointResponse; +const DEFAULT_GET_RUNTIME_RESPONSE = {} as GetAgentRuntimeResponse; +const DEFAULT_GET_RUNTIME_ENDPOINT_RESPONSE = {} as GetAgentRuntimeEndpointResponse; +const DEFAULT_LIST_RUNTIMES_RESPONSE: ListAgentRuntimesResponse = { agentRuntimes: [] }; +const DEFAULT_LIST_RUNTIME_VERSIONS_RESPONSE: ListAgentRuntimeVersionsResponse = { + agentRuntimes: [], +}; +const DEFAULT_LIST_RUNTIME_ENDPOINTS_RESPONSE: ListAgentRuntimeEndpointsResponse = { + runtimeEndpoints: [], +}; // abortError mirrors the error the SDK's abort handling rejects with. function abortError(): Error { @@ -404,7 +419,134 @@ export class TestHarnessClient implements CoreHarnessClient { } } +export class TestRuntimeClient implements CoreRuntimeClient { + readonly calls: RecordedCall[] = []; + private getResponse: GetAgentRuntimeResponse = DEFAULT_GET_RUNTIME_RESPONSE; + private getVersionResponse: GetAgentRuntimeResponse = DEFAULT_GET_RUNTIME_RESPONSE; + private getEndpointResponse: GetAgentRuntimeEndpointResponse = + DEFAULT_GET_RUNTIME_ENDPOINT_RESPONSE; + private listResponses = new Map(); + private listVersionsResponses = new Map(); + private listEndpointsResponses = new Map(); + private error?: Error; + + setGetResponse(response: GetAgentRuntimeResponse): this { + this.getResponse = response; + return this; + } + + setGetVersionResponse(response: GetAgentRuntimeResponse): this { + this.getVersionResponse = response; + return this; + } + + setGetEndpointResponse(response: GetAgentRuntimeEndpointResponse): this { + this.getEndpointResponse = response; + return this; + } + + setListResponse(response: ListAgentRuntimesResponse, forNextToken?: string): this { + this.listResponses.set(forNextToken, response); + return this; + } + + setListVersionsResponse(response: ListAgentRuntimeVersionsResponse, forNextToken?: string): this { + this.listVersionsResponses.set(forNextToken, response); + return this; + } + + setListEndpointsResponse( + response: ListAgentRuntimeEndpointsResponse, + forNextToken?: string, + ): this { + this.listEndpointsResponses.set(forNextToken, response); + return this; + } + + setError(error: Error | undefined): this { + this.error = error; + return this; + } + + async getRuntime(id: string, options: CoreOptions): Promise { + this.calls.push({ method: "getRuntime", args: [id, options] }); + if (this.error) throw this.error; + return this.getResponse; + } + + async getRuntimeVersion( + id: string, + version: string, + options: CoreOptions, + ): Promise { + this.calls.push({ method: "getRuntimeVersion", args: [id, version, options] }); + if (this.error) throw this.error; + return this.getVersionResponse; + } + + async getRuntimeEndpoint( + id: string, + qualifier: string, + options: CoreOptions, + ): Promise { + this.calls.push({ method: "getRuntimeEndpoint", args: [id, qualifier, options] }); + if (this.error) throw this.error; + return this.getEndpointResponse; + } + + async listRuntimes( + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise { + this.calls.push({ method: "listRuntimes", args: [nextToken, maxResults, options] }); + if (this.error) throw this.error; + return ( + this.listResponses.get(nextToken) ?? + this.listResponses.get(undefined) ?? + DEFAULT_LIST_RUNTIMES_RESPONSE + ); + } + + async listRuntimeVersions( + id: string, + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise { + this.calls.push({ + method: "listRuntimeVersions", + args: [id, nextToken, maxResults, options], + }); + if (this.error) throw this.error; + return ( + this.listVersionsResponses.get(nextToken) ?? + this.listVersionsResponses.get(undefined) ?? + DEFAULT_LIST_RUNTIME_VERSIONS_RESPONSE + ); + } + + async listRuntimeEndpoints( + id: string, + nextToken: string | undefined, + maxResults: number | undefined, + options: CoreOptions, + ): Promise { + this.calls.push({ + method: "listRuntimeEndpoints", + args: [id, nextToken, maxResults, options], + }); + if (this.error) throw this.error; + return ( + this.listEndpointsResponses.get(nextToken) ?? + this.listEndpointsResponses.get(undefined) ?? + DEFAULT_LIST_RUNTIME_ENDPOINTS_RESPONSE + ); + } +} + // TestCoreClient implements the Core contract with fully controllable sub-clients. export class TestCoreClient implements Core { readonly harness = new TestHarnessClient(); + readonly runtime = new TestRuntimeClient(); } diff --git a/src/testing/index.tsx b/src/testing/index.tsx index 30ee08187..e3e711ee6 100644 --- a/src/testing/index.tsx +++ b/src/testing/index.tsx @@ -2,7 +2,12 @@ export { parse, stringify } from "./serialization"; export { fixtureFactories, isRecording, matchGolden } from "./fixtures"; export { testIO, type TestIO } from "./testIO"; export { tick, waitFor } from "./timing"; -export { TestCoreClient, TestHarnessClient, type RecordedCall } from "./TestCoreClient"; +export { + TestCoreClient, + TestHarnessClient, + TestRuntimeClient, + type RecordedCall, +} from "./TestCoreClient"; export { StreamController } from "./StreamController"; export { renderScreen, From 318744e92da43f0fb95fafbf844ae0a3a16b69c0 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Mon, 20 Jul 2026 20:08:14 +0000 Subject: [PATCH 2/9] refactor(tui): inline runtime visibility check --- src/components/RouterScreen.tsx | 4 ++-- src/handlers/runtime/index.tsx | 1 - src/router/handler.tsx | 1 - src/router/index.tsx | 1 - src/router/router.tsx | 13 ------------- 5 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/components/RouterScreen.tsx b/src/components/RouterScreen.tsx index f5e4a9f78..95164adb6 100644 --- a/src/components/RouterScreen.tsx +++ b/src/components/RouterScreen.tsx @@ -2,7 +2,7 @@ import React, { useMemo, useState } from "react"; import { Box, Text, useApp, useInput, useStdin } from "ink"; import type { Command } from "commander"; import { useNavigate } from "react-router"; -import { CommandKey, isCommandVisibleInTui } from "../router"; +import { CommandKey } from "../router"; import { Layout } from "./Layout"; import { Divider } from "./ui/divider"; import { TextInput } from "./ui/text-input"; @@ -59,7 +59,7 @@ export function RouterScreen({ ctx, path }: RouterScreenProps) { const options: Option[] = useMemo( () => command.commands - .filter(isCommandVisibleInTui) + .filter((command) => command.name() !== "runtime") .map((c) => ({ name: c.name(), description: c.description() })), [command], ); diff --git a/src/handlers/runtime/index.tsx b/src/handlers/runtime/index.tsx index eca109977..a33bb00cd 100644 --- a/src/handlers/runtime/index.tsx +++ b/src/handlers/runtime/index.tsx @@ -8,7 +8,6 @@ import { createRuntimeVersionHandler } from "./version"; export function createRuntimeHandler(core: Core, io: AppIO): Router { return new Router("runtime", "inspect AgentCore Runtimes") - .hideFromTui() .default(createHelpDefault(io)) .handler(createGetRuntimeHandler(core)) .handler(createListRuntimesHandler(core)) diff --git a/src/router/handler.tsx b/src/router/handler.tsx index e1e0be4b6..cc3f2ecd2 100644 --- a/src/router/handler.tsx +++ b/src/router/handler.tsx @@ -77,7 +77,6 @@ type HandleFn< > = (ctx: Context, flags: FlagsOf, args: ArgumentsOf) => Promise; export interface Handler { - hiddenFromTui?: boolean; name(): string; description(): string; flags(): Flag[]; diff --git a/src/router/index.tsx b/src/router/index.tsx index e28a2cdbb..98f581fa8 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -7,7 +7,6 @@ export { type DefaultHandle, type DefaultHandlerProvider, isDefaultHandlerProvider, - isCommandVisibleInTui, } from "./router"; export { type Handler, diff --git a/src/router/router.tsx b/src/router/router.tsx index b1831c7e0..5aec62670 100644 --- a/src/router/router.tsx +++ b/src/router/router.tsx @@ -14,12 +14,6 @@ export const PathKey: ContextKey = contextKey("path"); export const LoggerKey = contextKey("logger"); -const commandsHiddenFromTui = new WeakSet(); - -export function isCommandVisibleInTui(command: Command): boolean { - return !commandsHiddenFromTui.has(command); -} - // DefaultHandle runs when a group is selected without a subcommand (e.g. // `agentcore` or `agentcore harness`). It reads group-level/global flags from the // context; own flags/arguments are not supported, so it receives empty objects. @@ -110,7 +104,6 @@ export function compile( ): Command { const c = new Command(node.name()); c.description(node.description()); - if (node.hiddenFromTui) commandsHiddenFromTui.add(c); const ownFlags = node.flags(); declareFlags(c, ownFlags); @@ -160,7 +153,6 @@ export function compile( } export class Router implements Handler, MiddlewareProvider, DefaultHandlerProvider { - hiddenFromTui = false; private mws: Middleware[] = []; private handlers: Handler[] = []; private globalFlags: GlobalFlag[] = []; @@ -183,11 +175,6 @@ export class Router implements Handler, MiddlewareProvider, DefaultHandlerProvid return this; } - hideFromTui(): this { - this.hiddenFromTui = true; - return this; - } - groupFlags(...flags: GlobalFlag[]): this { this.globalFlags.push(...flags); return this; From 22634e54e1a6157032c8172723c659b39b040600 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Mon, 20 Jul 2026 20:53:49 +0000 Subject: [PATCH 3/9] docs: restore command surface wording --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a362d435..01463c596 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ responses. `agentcore` wraps all of that behind one ergonomic tool. ## Command surface -Harness leaves run headless with flags or open the matching TUI screen when invoked bare. Runtime inspection and config commands are headless only; invoking a Runtime command group without a leaf prints help. +Every leaf command runs headless with flags, or opens the matching TUI screen +when invoked bare. ``` agentcore # interactive TUI From e63739e63f30fe886507e2cb6844a71623aa385d Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Mon, 20 Jul 2026 21:09:31 +0000 Subject: [PATCH 4/9] test(runtime): cover missing get selectors --- src/handlers/runtime/runtime.test.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/handlers/runtime/runtime.test.tsx b/src/handlers/runtime/runtime.test.tsx index 7a9bfbac7..6748a6501 100644 --- a/src/handlers/runtime/runtime.test.tsx +++ b/src/handlers/runtime/runtime.test.tsx @@ -226,8 +226,10 @@ describe("runtime control reads", () => { test.each([ [["runtime", "get"], /--id/], + [["runtime", "version", "get"], /--id/], [["runtime", "version", "get", "--id", "runtime-1"], /--version/], [["runtime", "version", "list"], /--id/], + [["runtime", "endpoint", "get"], /--id/], [["runtime", "endpoint", "get", "--id", "runtime-1"], /--qualifier/], [["runtime", "endpoint", "list"], /--id/], ] as const)("rejects a missing required selector for `%s`", async (args, message) => { From 98fefcb347ac0bd88f5130c52c74ca01b478666a Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Tue, 21 Jul 2026 14:58:06 +0000 Subject: [PATCH 5/9] fix(tui): show runtime in root command menu --- src/components/RouterScreen.test.tsx | 5 +++-- src/components/RouterScreen.tsx | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/RouterScreen.test.tsx b/src/components/RouterScreen.test.tsx index e7eb380b2..44e1705bd 100644 --- a/src/components/RouterScreen.test.tsx +++ b/src/components/RouterScreen.test.tsx @@ -15,7 +15,8 @@ describe("menu rendering", () => { const frame = r.lastFrame()!; expect(frame).toContain("harness"); expect(frame).toContain("manage agentcore harnesses"); - expect(frame).not.toContain("runtime"); + expect(frame).toContain("runtime"); + expect(frame).toContain("inspect AgentCore Runtimes"); expect(frame).toContain("config"); expect(frame).toContain("read/write global config values"); r.unmount(); @@ -87,7 +88,7 @@ describe("navigation", () => { await waitForText(r.lastFrame, "❯ harness"); await r.press("down"); - await waitForText(r.lastFrame, "❯ config"); + await waitForText(r.lastFrame, "❯ runtime"); r.unmount(); }); diff --git a/src/components/RouterScreen.tsx b/src/components/RouterScreen.tsx index 95164adb6..571b325d3 100644 --- a/src/components/RouterScreen.tsx +++ b/src/components/RouterScreen.tsx @@ -57,10 +57,7 @@ export function RouterScreen({ ctx, path }: RouterScreenProps) { const command = resolveCommand(ctx.require(CommandKey), path); const options: Option[] = useMemo( - () => - command.commands - .filter((command) => command.name() !== "runtime") - .map((c) => ({ name: c.name(), description: c.description() })), + () => command.commands.map((c) => ({ name: c.name(), description: c.description() })), [command], ); From da58a8cf9f0cbe809c8c71559e00d67ad5c36513 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Tue, 21 Jul 2026 15:02:50 +0000 Subject: [PATCH 6/9] test(runtime): consolidate command flows on golden fixtures --- ...tAgentRuntimeCommand.3c7e4d626f840a06.json | 23 -- ...tAgentRuntimeCommand.78fa373f0841f880.json | 38 ++ ...tAgentRuntimeCommand.9525de54d13848ce.json | 23 -- ...tAgentRuntimeCommand.97cc3fdba97def73.json | 38 ++ ...tAgentRuntimeCommand.9b8f562f35114475.json | 6 + ...ntimeEndpointCommand.44a0ae1a769240bb.json | 17 - ...ntimeEndpointCommand.4a8ae783c791f3b0.json | 14 + ...timeEndpointsCommand.2a655f50d5b3f37e.json | 18 + ...timeEndpointsCommand.8d3452aee6976a38.json | 20 + ...timeEndpointsCommand.97cc3fdba97def73.json | 18 + ...ntimeEndpointsCommand.ab3205c4a5c0994.json | 21 - ...ntimeVersionsCommand.6ded2a867ef574fe.json | 15 + ...ntimeVersionsCommand.758b88386b0e1f08.json | 15 + ...ntimeVersionsCommand.97cc3fdba97def73.json | 14 + ...ntimeVersionsCommand.c3860e80ac0e53f9.json | 16 - ...AgentRuntimesCommand.2b82341102185f93.json | 16 + ...AgentRuntimesCommand.4bdf6139220a5345.json | 16 - ...AgentRuntimesCommand.7d2e22c637f6b633.json | 15 + .../__fixtures__/endpoint-get.golden.json | 19 +- .../endpoint-list-page-1.golden.json | 16 + .../endpoint-list-page-2.golden.json | 14 + .../__fixtures__/endpoint-list.golden.json | 17 - .../runtime/__fixtures__/get.golden.json | 35 +- .../__fixtures__/list-page-1.golden.json | 13 + .../__fixtures__/list-page-2.golden.json | 14 + .../runtime/__fixtures__/list.golden.json | 14 - .../long-endpoint-list.golden.json | 14 + .../long-version-list.golden.json | 12 + .../__fixtures__/version-get.golden.json | 35 +- .../version-list-page-1.golden.json | 13 + .../version-list-page-2.golden.json | 13 + .../__fixtures__/version-list.golden.json | 14 - src/handlers/runtime/runtime.test.tsx | 366 ++++++------------ src/testing/TestCoreClient.tsx | 128 ++---- src/testing/index.tsx | 7 +- 35 files changed, 545 insertions(+), 542 deletions(-) delete mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json delete mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json delete mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json create mode 100644 src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json create mode 100644 src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json delete mode 100644 src/handlers/runtime/__fixtures__/endpoint-list.golden.json create mode 100644 src/handlers/runtime/__fixtures__/list-page-1.golden.json create mode 100644 src/handlers/runtime/__fixtures__/list-page-2.golden.json delete mode 100644 src/handlers/runtime/__fixtures__/list.golden.json create mode 100644 src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json create mode 100644 src/handlers/runtime/__fixtures__/long-version-list.golden.json create mode 100644 src/handlers/runtime/__fixtures__/version-list-page-1.golden.json create mode 100644 src/handlers/runtime/__fixtures__/version-list-page-2.golden.json delete mode 100644 src/handlers/runtime/__fixtures__/version-list.golden.json diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json deleted file mode 100644 index f45373a0a..000000000 --- a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.3c7e4d626f840a06.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeName": "fixture-runtime", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "3", - "createdAt": { - "$date": "2026-07-20T10:00:00.000Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-20T11:00:00.000Z" - }, - "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", - "networkConfiguration": { - "networkMode": "PUBLIC" - }, - "status": "READY", - "lifecycleConfiguration": { - "idleRuntimeSessionTimeout": 900, - "maxLifetime": 28800 - }, - "failureReason": "none", - "description": "Runtime fixture with complete read fields" -} diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json new file mode 100644 index 000000000..6442ff875 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json @@ -0,0 +1,38 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", + "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeVersion": "1", + "createdAt": { + "$date": "2026-07-13T14:25:16.254Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-13T14:25:16.254Z" + }, + "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "workloadIdentityDetails": { + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" + }, + "agentRuntimeArtifact": { + "containerConfiguration": { + "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" + } + }, + "environmentVariables": { + "AWS_REGION": "us-west-2", + "AWS_STAGE": "prod", + "AWS_TRUNCATION_MESSAGES_COUNT": "150", + "AWS_TRUNCATION_STRATEGY": "sliding_window" + }, + "metadataConfiguration": { + "requireMMDSV2": true + } +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json deleted file mode 100644 index 9ce5f2b6a..000000000 --- a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9525de54d13848ce.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeName": "fixture-runtime", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "2", - "createdAt": { - "$date": "2026-07-19T10:00:00.000Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-19T11:00:00.000Z" - }, - "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", - "networkConfiguration": { - "networkMode": "PUBLIC" - }, - "status": "READY", - "lifecycleConfiguration": { - "idleRuntimeSessionTimeout": 900, - "maxLifetime": 28800 - }, - "failureReason": "none", - "description": "Runtime version fixture" -} diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json new file mode 100644 index 000000000..937a78f8e --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json @@ -0,0 +1,38 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", + "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeVersion": "1", + "createdAt": { + "$date": "2026-07-13T14:25:15.368Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-13T14:25:16.254Z" + }, + "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "workloadIdentityDetails": { + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" + }, + "agentRuntimeArtifact": { + "containerConfiguration": { + "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" + } + }, + "environmentVariables": { + "AWS_REGION": "us-west-2", + "AWS_STAGE": "prod", + "AWS_TRUNCATION_MESSAGES_COUNT": "150", + "AWS_TRUNCATION_STRATEGY": "sliding_window" + }, + "metadataConfiguration": { + "requireMMDSV2": true + } +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json new file mode 100644 index 000000000..fa15a4536 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json @@ -0,0 +1,6 @@ +{ + "$error": { + "name": "ResourceNotFoundException", + "message": "Agent with agentId: missing_runtime-0000000000, accountId: 603141041947, and version: null not found!" + } +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json deleted file mode 100644 index 6735448b1..000000000 --- a/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.44a0ae1a769240bb.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "liveVersion": "2", - "targetVersion": "3", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "description": "Default Runtime endpoint", - "status": "UPDATING", - "createdAt": { - "$date": "2026-07-19T12:00:00.000Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-20T12:00:00.000Z" - }, - "failureReason": "none", - "name": "DEFAULT", - "id": "endpoint-1234567890" -} diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json new file mode 100644 index 000000000..2fe70fecf --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json @@ -0,0 +1,14 @@ +{ + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "status": "READY", + "createdAt": { + "$date": "2026-07-13T14:25:15.567Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-13T14:26:17.219Z" + }, + "name": "DEFAULT", + "id": "DEFAULT", + "liveVersion": "1" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json new file mode 100644 index 000000000..b5771b438 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json @@ -0,0 +1,18 @@ +{ + "runtimeEndpoints": [ + { + "name": "DEFAULT", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "status": "READY", + "id": "DEFAULT", + "createdAt": { + "$date": "2025-11-10T19:08:45.667Z" + }, + "lastUpdatedAt": { + "$date": "2025-11-10T19:08:53.465Z" + }, + "liveVersion": "1" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json new file mode 100644 index 000000000..d3453d98f --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json @@ -0,0 +1,20 @@ +{ + "runtimeEndpoints": [ + { + "name": "runtimeReadOnlyFixture", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/runtimeReadOnlyFixture", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "status": "READY", + "id": "runtimeReadOnlyFixture", + "createdAt": { + "$date": "2026-07-21T15:00:01.129Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:00:02.416Z" + }, + "liveVersion": "1", + "description": "Temporary endpoint for AgentCore CLI fixture recording" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHkUvajaEgC29SdLXBr6kObAAAB0jCCAc4GCSqGSIb3DQEHBqCCAb8wggG7AgEAMIIBtAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAxiyF1yu2ACZlKdetQCARCAggGFV_DrOdGINWMFBPWFUM2wqjahKX0OyB1ucuaPvCi6u5EO7argVmTfmeKdXYUW5rVSD4tfS6SUdTQm5sPQ5uezVOCisLqOsc6Q4Pg4G1oXWwHzpxkdPl-Uuqi6wPdtH13e3TH_NOE9xyJznoS0e3MvzYomqBCMo_Oh8xn95QVQPBEYZeq6T95vTvR6YYAUDcrKwjscds7wLMrWIlqVAzHItSp7tpUy736l04hsSEup6neOhcB8a1rSCZjWne5BXsGlfD3fo0QuInzSsE2Atms7s4P0n0PUN91Oryb1immzdgkJZs_BrnvpWIRj4cdd5-PE6OIgLwU6jbtbygAonTSXyXKGlEpyalXuzZquwOsHbj7jr-Tt3h9GOeLXu49DkrEWlxBJkwldIsARoRpG_DoMgMLVnyOpnGAbG-yWHIBiuLD2G3L3FNVuik1tQSPLH9n3NDrC-04tzsT_ZFxokqkHr7k1of07C2eDYyrFLE6Z2Wd0OSRsKQhzzW7ZAWgzMotX32UqdHs=" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json new file mode 100644 index 000000000..88f587bbc --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json @@ -0,0 +1,18 @@ +{ + "runtimeEndpoints": [ + { + "name": "DEFAULT", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "status": "READY", + "id": "DEFAULT", + "createdAt": { + "$date": "2026-07-13T14:25:15.567Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-13T14:26:17.219Z" + }, + "liveVersion": "1" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json deleted file mode 100644 index 2b0bd6c07..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.ab3205c4a5c0994.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "runtimeEndpoints": [ - { - "name": "DEFAULT", - "liveVersion": "2", - "targetVersion": "3", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "status": "UPDATING", - "id": "endpoint-1234567890", - "description": "Default Runtime endpoint", - "createdAt": { - "$date": "2026-07-19T12:00:00.000Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-20T12:00:00.000Z" - } - } - ], - "nextToken": "endpoint-response-token" -} diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json new file mode 100644 index 000000000..807033a86 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json @@ -0,0 +1,15 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeVersion": "23", + "agentRuntimeName": "starter_toolkit_agent", + "lastUpdatedAt": { + "$date": "2025-11-13T21:32:22.811Z" + }, + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHoaJWXnfLZwGVWyCmkDbL_AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwFrlOsuELeUvC8HgMCARCAggF03UK8XVRLtbORtRrObsy0fiWBOck5Vf-vMnEvGjmCz69owlQ_cIrf15p55ZK44o6Ot2CFdPxEpXpe7JbJ9usnlpmod0yTYd3ns2dhQ9G_2HTKLE_DqTml5yVE51AoYU2WTLJS3qv82zDQuvJ7t1kWufz0UgcQOmxYOUNdQW5sJjt_0FZ_SHiW9CzvmRokuzVpIa0mvVdUx5Uikkxr6dHhyZrQAevbTp8OhxzrnZQ0c8WGiGvNVcVb8Xp5f7pwiayttKKPz2X9zuo56Kse1VJxkwSFy8bS_O0kBveHnCrCHk1XdU3t6tCLCeTl-o4BaA8D_ezEvE2NtTb_coeh5SO7z3NAt8HQQ2R_Q41OyFM19vkR6ERMORln_9GPgoXF2cMiLNtPkGvuREN7lCCgo_bE0HW2xOXCIFPvSksC58W5ZuyWKhtpaYsiKOEqV2FP-80BCCwQnnYkroEX0cIpkUYAB7O0uz3fW5f2cVR0S0Sbhq2pEfwQ" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json new file mode 100644 index 000000000..31fc06ab1 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json @@ -0,0 +1,15 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeVersion": "24", + "agentRuntimeName": "starter_toolkit_agent", + "lastUpdatedAt": { + "$date": "2025-11-13T21:35:04.083Z" + }, + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHB2tJ9bf3RLpCplJ4emRI2AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzxa-zllNubbEhLm60CARCAggF0DUbBDwWaVqG7FQJRP6MOH27D7j4MAODDcKD57kn62RCXbgrMeelwE-WDLW1GpG427Ne8pAhoztThtmhe7nOzDEhBayNnwwHABlBP6_p1zlLKYSrk96MpUSWwvhFRdMc_3rl59DXUI6gmU_93OPjd_fvqyKcfflnF3yA9hHDUUsuYIV_QcWBQd8TEHEf-UtEeTNCGvrtuASznTI-k2yHwbVGnqwtrG97m8FSp1_HGDT8QhgX0OIWN4BGEx4vzSL6M0nF-X8F5w0Nvzk5uUuWy3xq-3QJQNTmLzIse9UsKPqGlS8qJTXdEtXAokGvQkAbOUSoCg1DgtqD8SaOI_sjIVYMNAtyf0OhbZ2eI2ObDx6ZmSce2swq5DjdNs11ojJyEfmEDZMw31pdtVeEITAWDZ7jFHjc8rRvj_P-DbyxV5p9EqD7Oipi_Hje2vKuIHBd_dEONL22j3jx2IGUOm9Nk4fuaGEPKrkYjmdAu9ct9GxqGNw_n" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json new file mode 100644 index 000000000..2a93441d6 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json @@ -0,0 +1,14 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeVersion": "1", + "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", + "lastUpdatedAt": { + "$date": "2026-07-13T14:25:16.254Z" + }, + "status": "READY" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json deleted file mode 100644 index f3124b2fd..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.c3860e80ac0e53f9.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "2", - "agentRuntimeName": "fixture-runtime", - "description": "Runtime version fixture", - "lastUpdatedAt": { - "$date": "2026-07-19T11:00:00.000Z" - }, - "status": "READY" - } - ], - "nextToken": "version-response-token" -} diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json new file mode 100644 index 000000000..bea0d060f --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json @@ -0,0 +1,16 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/vpcmode_MyAgent-NcNoov97xz", + "agentRuntimeId": "vpcmode_MyAgent-NcNoov97xz", + "agentRuntimeVersion": "1", + "agentRuntimeName": "vpcmode_MyAgent", + "description": "AgentCore Runtime: vpcmode_MyAgent", + "lastUpdatedAt": { + "$date": "2026-03-17T23:03:06.454Z" + }, + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgF408-wNGE0Plwlr6W1V44dAAABhDCCAYAGCSqGSIb3DQEHBqCCAXEwggFtAgEAMIIBZgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwDPS8d_7JzrPCOhjcCARCAggE3Ap-H9wjwFR3Mc0IcwJbLVo69JXfDuy8B-OwXtCYs_QGOk-qtSr82L9b768DRVJFbB2avcJ1x1hwahC1W6FP3De3fbju9HdQ4kEuzbxWLW3VYrwD8m0yFGvMd51icHqKtbRXZOTiqM7T6xtCoYZ7lLIfoMFZWy9NSQKM2kFWTbe0ggKe0w_7LyA-6YurDdVQArAyOtPdL_5RZFHNmL_cOZsF1Kmv1bIadgBSCVttCOd5idhnTPLRjLFPbQwEuFAV0l0YMO1ViMqxMRixna6KhOoLITcPBaCtmOFLbzfSJiTjZUaVieUfikrPgssojb03uCsnlFVPYi4doJcoybwgPc-0YEomHurWr74T5b3aKanDSsgzEd_P_WHTkAVJ4RacEVPjoAL7kor9aFdTIW1c1PRCRYZyaNcE=" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json deleted file mode 100644 index 7c9f614e7..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.4bdf6139220a5345.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "3", - "agentRuntimeName": "fixture-runtime", - "description": "Runtime fixture", - "lastUpdatedAt": { - "$date": "2026-07-20T11:00:00.000Z" - }, - "status": "READY" - } - ], - "nextToken": "runtime-response-token" -} diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json new file mode 100644 index 000000000..e8ee3912f --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json @@ -0,0 +1,15 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "agentRuntimeId": "weather_agent-Q1UyBZG08k", + "agentRuntimeVersion": "1", + "agentRuntimeName": "weather_agent", + "lastUpdatedAt": { + "$date": "2025-11-10T19:08:53.465Z" + }, + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHNkkLmCwrPyf3ADfXIzqw9AAABgjCCAX4GCSqGSIb3DQEHBqCCAW8wggFrAgEAMIIBZAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyqDpv6qpcK9U_lzHcCARCAggE1w_QKXeQ56wkat07A1JCChWZRdVegw6PSPxdrowRzmfV0JpjW9nzkqyfdMz-2kWB06DwBvZqRo-aU1hR3VHYj1yHWEIG7XdSg105t_FCUNYIUKn_vGcqwKtYCXa2BrNbsKDX4I5C8bcUK1z9a8FvJ13Qp0o8fGxrojYHj5UZQSS364_AUA4_bcCYvi7Zam-6fQM9iJS228JP5Dd8MS5gRyzKNeE3Jd35nhiQ7pOqeDxkutEeniH6Ay_Z3B4JdyBuKR78CsxsdEijTjkaxVYzMoMYUH5XA8RAaa-QGVyWMMoucFaO45Dc1hJMaMfC2FlcRf96jhjm5gG2niMZDZ2TjPv1MEmJ8SfSwgVzrEdlLQtA4P9Id9FmiAMA72eDRAGGR7DZLyzYLOhClIjfQ1_iQ6JrIS2Ik" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/endpoint-get.golden.json b/src/handlers/runtime/__fixtures__/endpoint-get.golden.json index ffb7833a8..e5bdab3b1 100644 --- a/src/handlers/runtime/__fixtures__/endpoint-get.golden.json +++ b/src/handlers/runtime/__fixtures__/endpoint-get.golden.json @@ -1,13 +1,10 @@ { - "liveVersion": "2", - "targetVersion": "3", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "description": "Default Runtime endpoint", - "status": "UPDATING", - "createdAt": "2026-07-19T12:00:00.000Z", - "lastUpdatedAt": "2026-07-20T12:00:00.000Z", - "failureReason": "none", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "status": "READY", + "createdAt": "2026-07-13T14:25:15.567Z", + "lastUpdatedAt": "2026-07-13T14:26:17.219Z", "name": "DEFAULT", - "id": "endpoint-1234567890" -} + "id": "DEFAULT", + "liveVersion": "1" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json b/src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json new file mode 100644 index 000000000..8fd009f72 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json @@ -0,0 +1,16 @@ +{ + "runtimeEndpoints": [ + { + "name": "runtimeReadOnlyFixture", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/runtimeReadOnlyFixture", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "status": "READY", + "id": "runtimeReadOnlyFixture", + "createdAt": "2026-07-21T15:00:01.129Z", + "lastUpdatedAt": "2026-07-21T15:00:02.416Z", + "liveVersion": "1", + "description": "Temporary endpoint for AgentCore CLI fixture recording" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHkUvajaEgC29SdLXBr6kObAAAB0jCCAc4GCSqGSIb3DQEHBqCCAb8wggG7AgEAMIIBtAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAxiyF1yu2ACZlKdetQCARCAggGFV_DrOdGINWMFBPWFUM2wqjahKX0OyB1ucuaPvCi6u5EO7argVmTfmeKdXYUW5rVSD4tfS6SUdTQm5sPQ5uezVOCisLqOsc6Q4Pg4G1oXWwHzpxkdPl-Uuqi6wPdtH13e3TH_NOE9xyJznoS0e3MvzYomqBCMo_Oh8xn95QVQPBEYZeq6T95vTvR6YYAUDcrKwjscds7wLMrWIlqVAzHItSp7tpUy736l04hsSEup6neOhcB8a1rSCZjWne5BXsGlfD3fo0QuInzSsE2Atms7s4P0n0PUN91Oryb1immzdgkJZs_BrnvpWIRj4cdd5-PE6OIgLwU6jbtbygAonTSXyXKGlEpyalXuzZquwOsHbj7jr-Tt3h9GOeLXu49DkrEWlxBJkwldIsARoRpG_DoMgMLVnyOpnGAbG-yWHIBiuLD2G3L3FNVuik1tQSPLH9n3NDrC-04tzsT_ZFxokqkHr7k1of07C2eDYyrFLE6Z2Wd0OSRsKQhzzW7ZAWgzMotX32UqdHs=" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json b/src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json new file mode 100644 index 000000000..8a82f0295 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json @@ -0,0 +1,14 @@ +{ + "runtimeEndpoints": [ + { + "name": "DEFAULT", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "status": "READY", + "id": "DEFAULT", + "createdAt": "2025-11-10T19:08:45.667Z", + "lastUpdatedAt": "2025-11-10T19:08:53.465Z", + "liveVersion": "1" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/endpoint-list.golden.json b/src/handlers/runtime/__fixtures__/endpoint-list.golden.json deleted file mode 100644 index 09f7aa4fe..000000000 --- a/src/handlers/runtime/__fixtures__/endpoint-list.golden.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "runtimeEndpoints": [ - { - "name": "DEFAULT", - "liveVersion": "2", - "targetVersion": "3", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime-endpoint/runtime-1234567890/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "status": "UPDATING", - "id": "endpoint-1234567890", - "description": "Default Runtime endpoint", - "createdAt": "2026-07-19T12:00:00.000Z", - "lastUpdatedAt": "2026-07-20T12:00:00.000Z" - } - ], - "nextToken": "endpoint-response-token" -} diff --git a/src/handlers/runtime/__fixtures__/get.golden.json b/src/handlers/runtime/__fixtures__/get.golden.json index 778ba1970..7a9705be1 100644 --- a/src/handlers/runtime/__fixtures__/get.golden.json +++ b/src/handlers/runtime/__fixtures__/get.golden.json @@ -1,11 +1,11 @@ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeName": "fixture-runtime", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "3", - "createdAt": "2026-07-20T10:00:00.000Z", - "lastUpdatedAt": "2026-07-20T11:00:00.000Z", - "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", + "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeVersion": "1", + "createdAt": "2026-07-13T14:25:15.368Z", + "lastUpdatedAt": "2026-07-13T14:25:16.254Z", + "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", "networkConfiguration": { "networkMode": "PUBLIC" }, @@ -14,6 +14,21 @@ "idleRuntimeSessionTimeout": 900, "maxLifetime": 28800 }, - "failureReason": "none", - "description": "Runtime fixture with complete read fields" -} + "workloadIdentityDetails": { + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" + }, + "agentRuntimeArtifact": { + "containerConfiguration": { + "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" + } + }, + "environmentVariables": { + "AWS_REGION": "us-west-2", + "AWS_STAGE": "prod", + "AWS_TRUNCATION_MESSAGES_COUNT": "150", + "AWS_TRUNCATION_STRATEGY": "sliding_window" + }, + "metadataConfiguration": { + "requireMMDSV2": true + } +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/list-page-1.golden.json b/src/handlers/runtime/__fixtures__/list-page-1.golden.json new file mode 100644 index 000000000..dcb9d2df9 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/list-page-1.golden.json @@ -0,0 +1,13 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "agentRuntimeId": "weather_agent-Q1UyBZG08k", + "agentRuntimeVersion": "1", + "agentRuntimeName": "weather_agent", + "lastUpdatedAt": "2025-11-10T19:08:53.465Z", + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHNkkLmCwrPyf3ADfXIzqw9AAABgjCCAX4GCSqGSIb3DQEHBqCCAW8wggFrAgEAMIIBZAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyqDpv6qpcK9U_lzHcCARCAggE1w_QKXeQ56wkat07A1JCChWZRdVegw6PSPxdrowRzmfV0JpjW9nzkqyfdMz-2kWB06DwBvZqRo-aU1hR3VHYj1yHWEIG7XdSg105t_FCUNYIUKn_vGcqwKtYCXa2BrNbsKDX4I5C8bcUK1z9a8FvJ13Qp0o8fGxrojYHj5UZQSS364_AUA4_bcCYvi7Zam-6fQM9iJS228JP5Dd8MS5gRyzKNeE3Jd35nhiQ7pOqeDxkutEeniH6Ay_Z3B4JdyBuKR78CsxsdEijTjkaxVYzMoMYUH5XA8RAaa-QGVyWMMoucFaO45Dc1hJMaMfC2FlcRf96jhjm5gG2niMZDZ2TjPv1MEmJ8SfSwgVzrEdlLQtA4P9Id9FmiAMA72eDRAGGR7DZLyzYLOhClIjfQ1_iQ6JrIS2Ik" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/list-page-2.golden.json b/src/handlers/runtime/__fixtures__/list-page-2.golden.json new file mode 100644 index 000000000..35f9d02eb --- /dev/null +++ b/src/handlers/runtime/__fixtures__/list-page-2.golden.json @@ -0,0 +1,14 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/vpcmode_MyAgent-NcNoov97xz", + "agentRuntimeId": "vpcmode_MyAgent-NcNoov97xz", + "agentRuntimeVersion": "1", + "agentRuntimeName": "vpcmode_MyAgent", + "description": "AgentCore Runtime: vpcmode_MyAgent", + "lastUpdatedAt": "2026-03-17T23:03:06.454Z", + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgF408-wNGE0Plwlr6W1V44dAAABhDCCAYAGCSqGSIb3DQEHBqCCAXEwggFtAgEAMIIBZgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwDPS8d_7JzrPCOhjcCARCAggE3Ap-H9wjwFR3Mc0IcwJbLVo69JXfDuy8B-OwXtCYs_QGOk-qtSr82L9b768DRVJFbB2avcJ1x1hwahC1W6FP3De3fbju9HdQ4kEuzbxWLW3VYrwD8m0yFGvMd51icHqKtbRXZOTiqM7T6xtCoYZ7lLIfoMFZWy9NSQKM2kFWTbe0ggKe0w_7LyA-6YurDdVQArAyOtPdL_5RZFHNmL_cOZsF1Kmv1bIadgBSCVttCOd5idhnTPLRjLFPbQwEuFAV0l0YMO1ViMqxMRixna6KhOoLITcPBaCtmOFLbzfSJiTjZUaVieUfikrPgssojb03uCsnlFVPYi4doJcoybwgPc-0YEomHurWr74T5b3aKanDSsgzEd_P_WHTkAVJ4RacEVPjoAL7kor9aFdTIW1c1PRCRYZyaNcE=" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/list.golden.json b/src/handlers/runtime/__fixtures__/list.golden.json deleted file mode 100644 index 3ca42a674..000000000 --- a/src/handlers/runtime/__fixtures__/list.golden.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "3", - "agentRuntimeName": "fixture-runtime", - "description": "Runtime fixture", - "lastUpdatedAt": "2026-07-20T11:00:00.000Z", - "status": "READY" - } - ], - "nextToken": "runtime-response-token" -} diff --git a/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json b/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json new file mode 100644 index 000000000..2b19f6b45 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json @@ -0,0 +1,14 @@ +{ + "runtimeEndpoints": [ + { + "name": "DEFAULT", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "status": "READY", + "id": "DEFAULT", + "createdAt": "2026-07-13T14:25:15.567Z", + "lastUpdatedAt": "2026-07-13T14:26:17.219Z", + "liveVersion": "1" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/long-version-list.golden.json b/src/handlers/runtime/__fixtures__/long-version-list.golden.json new file mode 100644 index 000000000..21333d50e --- /dev/null +++ b/src/handlers/runtime/__fixtures__/long-version-list.golden.json @@ -0,0 +1,12 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeVersion": "1", + "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", + "lastUpdatedAt": "2026-07-13T14:25:16.254Z", + "status": "READY" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/version-get.golden.json b/src/handlers/runtime/__fixtures__/version-get.golden.json index 9f11aa771..7f4caf112 100644 --- a/src/handlers/runtime/__fixtures__/version-get.golden.json +++ b/src/handlers/runtime/__fixtures__/version-get.golden.json @@ -1,11 +1,11 @@ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeName": "fixture-runtime", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "2", - "createdAt": "2026-07-19T10:00:00.000Z", - "lastUpdatedAt": "2026-07-19T11:00:00.000Z", - "roleArn": "arn:aws:iam::123456789012:role/fixture-runtime-role", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", + "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeVersion": "1", + "createdAt": "2026-07-13T14:25:16.254Z", + "lastUpdatedAt": "2026-07-13T14:25:16.254Z", + "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", "networkConfiguration": { "networkMode": "PUBLIC" }, @@ -14,6 +14,21 @@ "idleRuntimeSessionTimeout": 900, "maxLifetime": 28800 }, - "failureReason": "none", - "description": "Runtime version fixture" -} + "workloadIdentityDetails": { + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" + }, + "agentRuntimeArtifact": { + "containerConfiguration": { + "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" + } + }, + "environmentVariables": { + "AWS_REGION": "us-west-2", + "AWS_STAGE": "prod", + "AWS_TRUNCATION_MESSAGES_COUNT": "150", + "AWS_TRUNCATION_STRATEGY": "sliding_window" + }, + "metadataConfiguration": { + "requireMMDSV2": true + } +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/version-list-page-1.golden.json b/src/handlers/runtime/__fixtures__/version-list-page-1.golden.json new file mode 100644 index 000000000..2ee9b0b26 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/version-list-page-1.golden.json @@ -0,0 +1,13 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeVersion": "24", + "agentRuntimeName": "starter_toolkit_agent", + "lastUpdatedAt": "2025-11-13T21:35:04.083Z", + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHB2tJ9bf3RLpCplJ4emRI2AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzxa-zllNubbEhLm60CARCAggF0DUbBDwWaVqG7FQJRP6MOH27D7j4MAODDcKD57kn62RCXbgrMeelwE-WDLW1GpG427Ne8pAhoztThtmhe7nOzDEhBayNnwwHABlBP6_p1zlLKYSrk96MpUSWwvhFRdMc_3rl59DXUI6gmU_93OPjd_fvqyKcfflnF3yA9hHDUUsuYIV_QcWBQd8TEHEf-UtEeTNCGvrtuASznTI-k2yHwbVGnqwtrG97m8FSp1_HGDT8QhgX0OIWN4BGEx4vzSL6M0nF-X8F5w0Nvzk5uUuWy3xq-3QJQNTmLzIse9UsKPqGlS8qJTXdEtXAokGvQkAbOUSoCg1DgtqD8SaOI_sjIVYMNAtyf0OhbZ2eI2ObDx6ZmSce2swq5DjdNs11ojJyEfmEDZMw31pdtVeEITAWDZ7jFHjc8rRvj_P-DbyxV5p9EqD7Oipi_Hje2vKuIHBd_dEONL22j3jx2IGUOm9Nk4fuaGEPKrkYjmdAu9ct9GxqGNw_n" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/version-list-page-2.golden.json b/src/handlers/runtime/__fixtures__/version-list-page-2.golden.json new file mode 100644 index 000000000..162db8283 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/version-list-page-2.golden.json @@ -0,0 +1,13 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", + "agentRuntimeVersion": "23", + "agentRuntimeName": "starter_toolkit_agent", + "lastUpdatedAt": "2025-11-13T21:32:22.811Z", + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHoaJWXnfLZwGVWyCmkDbL_AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwFrlOsuELeUvC8HgMCARCAggF03UK8XVRLtbORtRrObsy0fiWBOck5Vf-vMnEvGjmCz69owlQ_cIrf15p55ZK44o6Ot2CFdPxEpXpe7JbJ9usnlpmod0yTYd3ns2dhQ9G_2HTKLE_DqTml5yVE51AoYU2WTLJS3qv82zDQuvJ7t1kWufz0UgcQOmxYOUNdQW5sJjt_0FZ_SHiW9CzvmRokuzVpIa0mvVdUx5Uikkxr6dHhyZrQAevbTp8OhxzrnZQ0c8WGiGvNVcVb8Xp5f7pwiayttKKPz2X9zuo56Kse1VJxkwSFy8bS_O0kBveHnCrCHk1XdU3t6tCLCeTl-o4BaA8D_ezEvE2NtTb_coeh5SO7z3NAt8HQQ2R_Q41OyFM19vkR6ERMORln_9GPgoXF2cMiLNtPkGvuREN7lCCgo_bE0HW2xOXCIFPvSksC58W5ZuyWKhtpaYsiKOEqV2FP-80BCCwQnnYkroEX0cIpkUYAB7O0uz3fW5f2cVR0S0Sbhq2pEfwQ" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/version-list.golden.json b/src/handlers/runtime/__fixtures__/version-list.golden.json deleted file mode 100644 index 6232e54b5..000000000 --- a/src/handlers/runtime/__fixtures__/version-list.golden.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/runtime-1234567890", - "agentRuntimeId": "runtime-1234567890", - "agentRuntimeVersion": "2", - "agentRuntimeName": "fixture-runtime", - "description": "Runtime version fixture", - "lastUpdatedAt": "2026-07-19T11:00:00.000Z", - "status": "READY" - } - ], - "nextToken": "version-response-token" -} diff --git a/src/handlers/runtime/runtime.test.tsx b/src/handlers/runtime/runtime.test.tsx index 6748a6501..b991a033e 100644 --- a/src/handlers/runtime/runtime.test.tsx +++ b/src/handlers/runtime/runtime.test.tsx @@ -1,69 +1,32 @@ import { describe, expect, test } from "bun:test"; import { join } from "node:path"; -import type { - GetAgentRuntimeEndpointResponse, - GetAgentRuntimeResponse, -} from "@aws-sdk/client-bedrock-agentcore-control"; import { CoreClient } from "../../core"; -import { - createSilentLogger, - fixtureFactories, - matchGolden, - TestCoreClient, - TestRuntimeClient, - testIO, -} from "../../testing"; +import { createSilentLogger, fixtureFactories, matchGolden, testIO } from "../../testing"; import { createRootHandler } from "../index"; const REGION = "us-west-2"; const FIXTURES = join(import.meta.dir, "__fixtures__"); -const RUNTIME_ID = "runtime-1234567890"; -const LONG_RUNTIME_ID = `${"a".repeat(48)}-1234567890`; -function configureRuntime(runtime: TestRuntimeClient): void { - runtime - .setGetResponse({ - agentRuntimeId: "runtime-1", - agentRuntimeVersion: "1", - status: "READY", - } as GetAgentRuntimeResponse) - .setGetVersionResponse({ - agentRuntimeId: "runtime-1", - agentRuntimeVersion: "3", - status: "READY", - } as GetAgentRuntimeResponse) - .setGetEndpointResponse({ - agentRuntimeArn: "arn:runtime-1", - name: "PROD", - status: "READY", - } as GetAgentRuntimeEndpointResponse) - .setListResponse({ agentRuntimes: [], nextToken: "runtime-token" }) - .setListVersionsResponse({ agentRuntimes: [], nextToken: "version-token" }) - .setListEndpointsResponse({ runtimeEndpoints: [], nextToken: "endpoint-token" }); -} - -async function run( - args: string[], - configure?: (runtime: TestRuntimeClient) => void, -): Promise<{ - stdout: string; - runtime: TestRuntimeClient; -}> { - const core = new TestCoreClient(); - configureRuntime(core.runtime); - configure?.(core.runtime); - const io = testIO(); - const root = createRootHandler(core, { io: io.io, logger: createSilentLogger() }); +// To re-record, update these IDs to real us-west-2 resources: LONG_RUNTIME_ID +// needs version 1 and DEFAULT, the version target needs at least two versions, +// the endpoint target needs at least two endpoints, and the account needs at +// least two Runtimes. Page-two requests always use the token returned by page one. +const LONG_RUNTIME_ID = "harness_tf_acc_test_3496516139353111995-U17dI2Favb"; +const PAGINATED_VERSION_RUNTIME_ID = "starter_toolkit_agent-58HnLF6qC3"; +const PAGINATED_ENDPOINT_RUNTIME_ID = "weather_agent-Q1UyBZG08k"; +const MISSING_RUNTIME_ID = "missing_runtime-0000000000"; - await root.route(["node", "agentcore", ...args, "--region", REGION]); - return { stdout: io.stdout(), runtime: core.runtime }; +function createFixtureCore(): CoreClient { + const { createControlClient, createDataClient, createIamClient } = fixtureFactories(FIXTURES); + return new CoreClient(createControlClient, createDataClient, createIamClient); } -async function runFixture(args: string[]): Promise { - const { createControlClient, createDataClient, createIamClient } = fixtureFactories(FIXTURES); - const core = new CoreClient(createControlClient, createDataClient, createIamClient); +async function run(args: string[]): Promise { const io = testIO(); - const root = createRootHandler(core, { io: io.io, logger: createSilentLogger() }); + const root = createRootHandler(createFixtureCore(), { + io: io.io, + logger: createSilentLogger(), + }); await root.route(["node", "agentcore", ...args, "--region", REGION]); return io.stdout(); @@ -71,8 +34,7 @@ async function runFixture(args: string[]): Promise { describe("runtime command hierarchy", () => { test("registers only the approved control-plane branches", () => { - const core = new TestCoreClient(); - const root = createRootHandler(core, { + const root = createRootHandler(createFixtureCore(), { io: testIO().io, logger: createSilentLogger(), }); @@ -101,254 +63,176 @@ describe("runtime command hierarchy", () => { }); test.each(["runtime", "runtime version", "runtime endpoint"])( - "prints AppIO-backed help for bare `%s` without a Core call", + "prints AppIO-backed help for bare `%s` without an SDK call", async (command) => { - const result = await run(command.split(" ")); + const stdout = await run(command.split(" ")); - expect(result.stdout).toContain(`Usage: agentcore ${command}`); - expect(result.stdout).toContain("Commands:"); - expect(result.runtime.calls).toEqual([]); + expect(stdout).toContain(`Usage: agentcore ${command}`); + expect(stdout).toContain("Commands:"); }, ); }); describe("runtime control reads", () => { - test("gets a Runtime and renders the complete response", async () => { - const result = await run(["runtime", "get", "--id", "runtime-1"]); + test("gets a service-valid long Runtime ID through the real Core", async () => { + const stdout = await run(["runtime", "get", "--id", LONG_RUNTIME_ID]); - expect(JSON.parse(result.stdout)).toEqual({ - agentRuntimeId: "runtime-1", - agentRuntimeVersion: "1", - status: "READY", - }); - expect(result.runtime.calls).toEqual([ - { - method: "getRuntime", - args: ["runtime-1", { region: REGION }], - }, - ]); + matchGolden(FIXTURES, "get.golden.json", stdout); + expect(JSON.parse(stdout).agentRuntimeId).toBe(LONG_RUNTIME_ID); }); - test("lists one Runtime page with Harness pagination names", async () => { - const result = await run([ + test("lists two Runtime pages with Harness pagination names", async () => { + const firstPage = await run(["runtime", "list", "--max-results", "1"]); + matchGolden(FIXTURES, "list-page-1.golden.json", firstPage); + + const first = JSON.parse(firstPage); + expect(first.agentRuntimes).toHaveLength(1); + expect(first.nextToken).toBeString(); + + const secondPage = await run([ "runtime", "list", "--max-results", - "5", + "1", "--next-token", - "input-token", - ]); - - expect(JSON.parse(result.stdout).nextToken).toBe("runtime-token"); - expect(result.runtime.calls).toEqual([ - { - method: "listRuntimes", - args: ["input-token", 5, { region: REGION }], - }, + first.nextToken, ]); + matchGolden(FIXTURES, "list-page-2.golden.json", secondPage); + expect(JSON.parse(secondPage).agentRuntimes).toHaveLength(1); }); - test("gets a Runtime version", async () => { - const result = await run(["runtime", "version", "get", "--id", "runtime-1", "--version", "3"]); - - expect(JSON.parse(result.stdout).agentRuntimeVersion).toBe("3"); - expect(result.runtime.calls).toEqual([ - { - method: "getRuntimeVersion", - args: ["runtime-1", "3", { region: REGION }], - }, + test("gets a Runtime version for a service-valid long Runtime ID", async () => { + const stdout = await run([ + "runtime", + "version", + "get", + "--id", + LONG_RUNTIME_ID, + "--version", + "1", ]); + + matchGolden(FIXTURES, "version-get.golden.json", stdout); + const parsed = JSON.parse(stdout); + expect(parsed.agentRuntimeId).toBe(LONG_RUNTIME_ID); + expect(parsed.agentRuntimeVersion).toBe("1"); }); - test("lists one Runtime version page", async () => { - const result = await run([ + test("lists two Runtime version pages", async () => { + const firstPage = await run([ "runtime", "version", "list", "--id", - "runtime-1", + PAGINATED_VERSION_RUNTIME_ID, "--max-results", - "7", - "--next-token", - "input-token", + "1", ]); + matchGolden(FIXTURES, "version-list-page-1.golden.json", firstPage); + + const first = JSON.parse(firstPage); + expect(first.agentRuntimes).toHaveLength(1); + expect(first.nextToken).toBeString(); - expect(JSON.parse(result.stdout).nextToken).toBe("version-token"); - expect(result.runtime.calls).toEqual([ - { - method: "listRuntimeVersions", - args: ["runtime-1", "input-token", 7, { region: REGION }], - }, + const secondPage = await run([ + "runtime", + "version", + "list", + "--id", + PAGINATED_VERSION_RUNTIME_ID, + "--max-results", + "1", + "--next-token", + first.nextToken, ]); + matchGolden(FIXTURES, "version-list-page-2.golden.json", secondPage); + expect(JSON.parse(secondPage).agentRuntimes).toHaveLength(1); }); - test("maps the endpoint qualifier", async () => { - const result = await run([ + test("maps the endpoint qualifier for a service-valid long Runtime ID", async () => { + const stdout = await run([ "runtime", "endpoint", "get", "--id", - "runtime-1", + LONG_RUNTIME_ID, "--qualifier", - "PROD", + "DEFAULT", ]); - expect(JSON.parse(result.stdout).name).toBe("PROD"); - expect(result.runtime.calls).toEqual([ - { - method: "getRuntimeEndpoint", - args: ["runtime-1", "PROD", { region: REGION }], - }, - ]); + matchGolden(FIXTURES, "endpoint-get.golden.json", stdout); + const parsed = JSON.parse(stdout); + expect(parsed.agentRuntimeArn).toContain(LONG_RUNTIME_ID); + expect(parsed.name).toBe("DEFAULT"); }); - test("lists one Runtime endpoint page", async () => { - const result = await run([ + test("lists two Runtime endpoint pages", async () => { + const firstPage = await run([ "runtime", "endpoint", "list", "--id", - "runtime-1", + PAGINATED_ENDPOINT_RUNTIME_ID, "--max-results", - "9", - "--next-token", - "input-token", + "1", ]); + matchGolden(FIXTURES, "endpoint-list-page-1.golden.json", firstPage); + + const first = JSON.parse(firstPage); + expect(first.runtimeEndpoints).toHaveLength(1); + expect(first.nextToken).toBeString(); - expect(JSON.parse(result.stdout).nextToken).toBe("endpoint-token"); - expect(result.runtime.calls).toEqual([ - { - method: "listRuntimeEndpoints", - args: ["runtime-1", "input-token", 9, { region: REGION }], - }, + const secondPage = await run([ + "runtime", + "endpoint", + "list", + "--id", + PAGINATED_ENDPOINT_RUNTIME_ID, + "--max-results", + "1", + "--next-token", + first.nextToken, ]); + matchGolden(FIXTURES, "endpoint-list-page-2.golden.json", secondPage); + expect(JSON.parse(secondPage).runtimeEndpoints).toHaveLength(1); }); test.each([ [["runtime", "get"], /--id/], [["runtime", "version", "get"], /--id/], - [["runtime", "version", "get", "--id", "runtime-1"], /--version/], + [["runtime", "version", "get", "--id", LONG_RUNTIME_ID], /--version/], [["runtime", "version", "list"], /--id/], [["runtime", "endpoint", "get"], /--id/], - [["runtime", "endpoint", "get", "--id", "runtime-1"], /--qualifier/], + [["runtime", "endpoint", "get", "--id", LONG_RUNTIME_ID], /--qualifier/], [["runtime", "endpoint", "list"], /--id/], ] as const)("rejects a missing required selector for `%s`", async (args, message) => { expect(run([...args])).rejects.toThrow(message); }); test.each([ - [["runtime", "get", "--id", LONG_RUNTIME_ID], "getRuntime"], - [["runtime", "version", "get", "--id", LONG_RUNTIME_ID, "--version", "1"], "getRuntimeVersion"], - [["runtime", "version", "list", "--id", LONG_RUNTIME_ID], "listRuntimeVersions"], [ - ["runtime", "endpoint", "get", "--id", LONG_RUNTIME_ID, "--qualifier", "DEFAULT"], - "getRuntimeEndpoint", + ["runtime", "version", "list", "--id", LONG_RUNTIME_ID], + "long-version-list.golden.json", + "agentRuntimes", ], - [["runtime", "endpoint", "list", "--id", LONG_RUNTIME_ID], "listRuntimeEndpoints"], - ] as const)("accepts a service-valid long Runtime ID for `%s`", async (args, method) => { - const result = await run([...args]); - - expect(result.runtime.calls).toHaveLength(1); - expect(result.runtime.calls[0]?.method).toBe(method); - expect(result.runtime.calls[0]?.args[0]).toBe(LONG_RUNTIME_ID); - }); - - test("propagates Runtime Core errors", async () => { - await expect( - run(["runtime", "get", "--id", "runtime-1"], (runtime) => - runtime.setError(new Error("runtime unavailable")), - ), - ).rejects.toThrow("runtime unavailable"); - }); -}); - -describe("runtime fixture command flow", () => { - test("replays Runtime get through the real Core", async () => { - const out = await runFixture(["runtime", "get", "--id", RUNTIME_ID]); - - matchGolden(FIXTURES, "get.golden.json", out); - const parsed = JSON.parse(out); - expect(parsed.agentRuntimeId).toBe(RUNTIME_ID); - expect(parsed.failureReason).toBe("none"); - }); - - test("replays Runtime list through the real Core", async () => { - const out = await runFixture([ - "runtime", - "list", - "--max-results", - "2", - "--next-token", - "runtime-request-token", - ]); - - matchGolden(FIXTURES, "list.golden.json", out); - expect(JSON.parse(out).nextToken).toBe("runtime-response-token"); - }); - - test("replays Runtime version get through the real Core", async () => { - const out = await runFixture([ - "runtime", - "version", - "get", - "--id", - RUNTIME_ID, - "--version", - "2", - ]); - - matchGolden(FIXTURES, "version-get.golden.json", out); - expect(JSON.parse(out).agentRuntimeVersion).toBe("2"); - }); - - test("replays Runtime version list through the real Core", async () => { - const out = await runFixture([ - "runtime", - "version", - "list", - "--id", - RUNTIME_ID, - "--max-results", - "2", - "--next-token", - "version-request-token", - ]); - - matchGolden(FIXTURES, "version-list.golden.json", out); - expect(JSON.parse(out).nextToken).toBe("version-response-token"); - }); - - test("replays Runtime endpoint get through the real Core", async () => { - const out = await runFixture([ - "runtime", - "endpoint", - "get", - "--id", - RUNTIME_ID, - "--qualifier", - "DEFAULT", - ]); - - matchGolden(FIXTURES, "endpoint-get.golden.json", out); - const parsed = JSON.parse(out); - expect(parsed.name).toBe("DEFAULT"); - expect(parsed.liveVersion).toBe("2"); - }); + [ + ["runtime", "endpoint", "list", "--id", LONG_RUNTIME_ID], + "long-endpoint-list.golden.json", + "runtimeEndpoints", + ], + ] as const)( + "accepts a service-valid long Runtime ID for `%s`", + async (args, golden, collection) => { + const stdout = await run([...args]); - test("replays Runtime endpoint list through the real Core", async () => { - const out = await runFixture([ - "runtime", - "endpoint", - "list", - "--id", - RUNTIME_ID, - "--max-results", - "2", - "--next-token", - "endpoint-request-token", - ]); + matchGolden(FIXTURES, golden, stdout); + expect(JSON.parse(stdout)[collection].length).toBeGreaterThan(0); + }, + ); - matchGolden(FIXTURES, "endpoint-list.golden.json", out); - expect(JSON.parse(out).nextToken).toBe("endpoint-response-token"); + test("propagates a recorded Runtime service error", async () => { + await expect(run(["runtime", "get", "--id", MISSING_RUNTIME_ID])).rejects.toMatchObject({ + name: "ResourceNotFoundException", + }); }); }); diff --git a/src/testing/TestCoreClient.tsx b/src/testing/TestCoreClient.tsx index 5f4c115f3..c12f17aad 100644 --- a/src/testing/TestCoreClient.tsx +++ b/src/testing/TestCoreClient.tsx @@ -419,129 +419,51 @@ export class TestHarnessClient implements CoreHarnessClient { } } -export class TestRuntimeClient implements CoreRuntimeClient { - readonly calls: RecordedCall[] = []; - private getResponse: GetAgentRuntimeResponse = DEFAULT_GET_RUNTIME_RESPONSE; - private getVersionResponse: GetAgentRuntimeResponse = DEFAULT_GET_RUNTIME_RESPONSE; - private getEndpointResponse: GetAgentRuntimeEndpointResponse = - DEFAULT_GET_RUNTIME_ENDPOINT_RESPONSE; - private listResponses = new Map(); - private listVersionsResponses = new Map(); - private listEndpointsResponses = new Map(); - private error?: Error; - - setGetResponse(response: GetAgentRuntimeResponse): this { - this.getResponse = response; - return this; - } - - setGetVersionResponse(response: GetAgentRuntimeResponse): this { - this.getVersionResponse = response; - return this; - } - - setGetEndpointResponse(response: GetAgentRuntimeEndpointResponse): this { - this.getEndpointResponse = response; - return this; - } - - setListResponse(response: ListAgentRuntimesResponse, forNextToken?: string): this { - this.listResponses.set(forNextToken, response); - return this; - } - - setListVersionsResponse(response: ListAgentRuntimeVersionsResponse, forNextToken?: string): this { - this.listVersionsResponses.set(forNextToken, response); - return this; - } - - setListEndpointsResponse( - response: ListAgentRuntimeEndpointsResponse, - forNextToken?: string, - ): this { - this.listEndpointsResponses.set(forNextToken, response); - return this; - } - - setError(error: Error | undefined): this { - this.error = error; - return this; - } - - async getRuntime(id: string, options: CoreOptions): Promise { - this.calls.push({ method: "getRuntime", args: [id, options] }); - if (this.error) throw this.error; - return this.getResponse; +class TestRuntimeClient implements CoreRuntimeClient { + async getRuntime(_id: string, _options: CoreOptions): Promise { + return DEFAULT_GET_RUNTIME_RESPONSE; } async getRuntimeVersion( - id: string, - version: string, - options: CoreOptions, + _id: string, + _version: string, + _options: CoreOptions, ): Promise { - this.calls.push({ method: "getRuntimeVersion", args: [id, version, options] }); - if (this.error) throw this.error; - return this.getVersionResponse; + return DEFAULT_GET_RUNTIME_RESPONSE; } async getRuntimeEndpoint( - id: string, - qualifier: string, - options: CoreOptions, + _id: string, + _qualifier: string, + _options: CoreOptions, ): Promise { - this.calls.push({ method: "getRuntimeEndpoint", args: [id, qualifier, options] }); - if (this.error) throw this.error; - return this.getEndpointResponse; + return DEFAULT_GET_RUNTIME_ENDPOINT_RESPONSE; } async listRuntimes( - nextToken: string | undefined, - maxResults: number | undefined, - options: CoreOptions, + _nextToken: string | undefined, + _maxResults: number | undefined, + _options: CoreOptions, ): Promise { - this.calls.push({ method: "listRuntimes", args: [nextToken, maxResults, options] }); - if (this.error) throw this.error; - return ( - this.listResponses.get(nextToken) ?? - this.listResponses.get(undefined) ?? - DEFAULT_LIST_RUNTIMES_RESPONSE - ); + return DEFAULT_LIST_RUNTIMES_RESPONSE; } async listRuntimeVersions( - id: string, - nextToken: string | undefined, - maxResults: number | undefined, - options: CoreOptions, + _id: string, + _nextToken: string | undefined, + _maxResults: number | undefined, + _options: CoreOptions, ): Promise { - this.calls.push({ - method: "listRuntimeVersions", - args: [id, nextToken, maxResults, options], - }); - if (this.error) throw this.error; - return ( - this.listVersionsResponses.get(nextToken) ?? - this.listVersionsResponses.get(undefined) ?? - DEFAULT_LIST_RUNTIME_VERSIONS_RESPONSE - ); + return DEFAULT_LIST_RUNTIME_VERSIONS_RESPONSE; } async listRuntimeEndpoints( - id: string, - nextToken: string | undefined, - maxResults: number | undefined, - options: CoreOptions, + _id: string, + _nextToken: string | undefined, + _maxResults: number | undefined, + _options: CoreOptions, ): Promise { - this.calls.push({ - method: "listRuntimeEndpoints", - args: [id, nextToken, maxResults, options], - }); - if (this.error) throw this.error; - return ( - this.listEndpointsResponses.get(nextToken) ?? - this.listEndpointsResponses.get(undefined) ?? - DEFAULT_LIST_RUNTIME_ENDPOINTS_RESPONSE - ); + return DEFAULT_LIST_RUNTIME_ENDPOINTS_RESPONSE; } } diff --git a/src/testing/index.tsx b/src/testing/index.tsx index e3e711ee6..30ee08187 100644 --- a/src/testing/index.tsx +++ b/src/testing/index.tsx @@ -2,12 +2,7 @@ export { parse, stringify } from "./serialization"; export { fixtureFactories, isRecording, matchGolden } from "./fixtures"; export { testIO, type TestIO } from "./testIO"; export { tick, waitFor } from "./timing"; -export { - TestCoreClient, - TestHarnessClient, - TestRuntimeClient, - type RecordedCall, -} from "./TestCoreClient"; +export { TestCoreClient, TestHarnessClient, type RecordedCall } from "./TestCoreClient"; export { StreamController } from "./StreamController"; export { renderScreen, From 7343419394ebcbec3b4adf6c04f15d52b953038b Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Tue, 21 Jul 2026 15:28:23 +0000 Subject: [PATCH 7/9] test(runtime): record fixtures from shared e2e account --- ...tAgentRuntimeCommand.140854af01fd7827.json | 33 +++++++++++++++ ...tAgentRuntimeCommand.78fa373f0841f880.json | 38 ------------------ ...tAgentRuntimeCommand.97cc3fdba97def73.json | 38 ------------------ ...tAgentRuntimeCommand.97ebe200714d941e.json | 33 +++++++++++++++ ...tAgentRuntimeCommand.9b8f562f35114475.json | 2 +- ...ntimeEndpointCommand.1aa8574ea8360d43.json | 14 +++++++ ...ntimeEndpointCommand.4a8ae783c791f3b0.json | 14 ------- ...timeEndpointsCommand.140854af01fd7827.json | 33 +++++++++++++++ ...timeEndpointsCommand.1d171c98cd60b7c4.json | 18 +++++++++ ...timeEndpointsCommand.2a655f50d5b3f37e.json | 18 --------- ...timeEndpointsCommand.52cf5ddfc336d4d2.json | 20 ++++++++++ ...timeEndpointsCommand.8d3452aee6976a38.json | 20 ---------- ...timeEndpointsCommand.97cc3fdba97def73.json | 18 --------- ...ntimeVersionsCommand.140854af01fd7827.json | 26 ++++++++++++ ...ntimeVersionsCommand.52cf5ddfc336d4d2.json | 16 ++++++++ ...ntimeVersionsCommand.6ded2a867ef574fe.json | 15 ------- ...ntimeVersionsCommand.758b88386b0e1f08.json | 15 ------- ...ntimeVersionsCommand.97cc3fdba97def73.json | 14 ------- ...ntimeVersionsCommand.d9f8a63aba5fece2.json | 15 +++++++ ...AgentRuntimesCommand.21b26ceeb17ddd46.json | 15 +++++++ ...AgentRuntimesCommand.2b82341102185f93.json | 16 -------- ...AgentRuntimesCommand.7d2e22c637f6b633.json | 11 ++--- .../__fixtures__/endpoint-get.golden.json | 10 ++--- .../endpoint-list-page-1.golden.json | 14 +++---- .../endpoint-list-page-2.golden.json | 10 ++--- .../runtime/__fixtures__/get.golden.json | 23 +++++------ .../__fixtures__/list-page-1.golden.json | 11 ++--- .../__fixtures__/list-page-2.golden.json | 11 +++-- .../long-endpoint-list.golden.json | 21 +++++++--- .../long-version-list.golden.json | 18 +++++++-- .../__fixtures__/version-get.golden.json | 21 ++++------ .../version-list-page-1.golden.json | 13 +++--- .../version-list-page-2.golden.json | 14 +++---- src/handlers/runtime/runtime.test.tsx | 40 +++++++++---------- 34 files changed, 338 insertions(+), 310 deletions(-) create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.140854af01fd7827.json delete mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json delete mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97ebe200714d941e.json create mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.1aa8574ea8360d43.json delete mode 100644 src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.140854af01fd7827.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.1d171c98cd60b7c4.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.52cf5ddfc336d4d2.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.140854af01fd7827.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.52cf5ddfc336d4d2.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.d9f8a63aba5fece2.json create mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.21b26ceeb17ddd46.json delete mode 100644 src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.140854af01fd7827.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.140854af01fd7827.json new file mode 100644 index 000000000..136610f6c --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.140854af01fd7827.json @@ -0,0 +1,33 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "2", + "createdAt": { + "$date": "2026-07-21T15:24:52.318Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:21.499Z" + }, + "roleArn": "arn:aws:iam::685197708687:role/tf_acc_test_1997929140646926281", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "workloadIdentityDetails": { + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:workload-identity-directory/default/workload-identity/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx" + }, + "agentRuntimeArtifact": { + "containerConfiguration": { + "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" + } + }, + "metadataConfiguration": { + "requireMMDSV2": true + } +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json deleted file mode 100644 index 6442ff875..000000000 --- a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.78fa373f0841f880.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", - "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeVersion": "1", - "createdAt": { - "$date": "2026-07-13T14:25:16.254Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-13T14:25:16.254Z" - }, - "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", - "networkConfiguration": { - "networkMode": "PUBLIC" - }, - "status": "READY", - "lifecycleConfiguration": { - "idleRuntimeSessionTimeout": 900, - "maxLifetime": 28800 - }, - "workloadIdentityDetails": { - "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" - }, - "agentRuntimeArtifact": { - "containerConfiguration": { - "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" - } - }, - "environmentVariables": { - "AWS_REGION": "us-west-2", - "AWS_STAGE": "prod", - "AWS_TRUNCATION_MESSAGES_COUNT": "150", - "AWS_TRUNCATION_STRATEGY": "sliding_window" - }, - "metadataConfiguration": { - "requireMMDSV2": true - } -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json deleted file mode 100644 index 937a78f8e..000000000 --- a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97cc3fdba97def73.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", - "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeVersion": "1", - "createdAt": { - "$date": "2026-07-13T14:25:15.368Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-13T14:25:16.254Z" - }, - "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", - "networkConfiguration": { - "networkMode": "PUBLIC" - }, - "status": "READY", - "lifecycleConfiguration": { - "idleRuntimeSessionTimeout": 900, - "maxLifetime": 28800 - }, - "workloadIdentityDetails": { - "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" - }, - "agentRuntimeArtifact": { - "containerConfiguration": { - "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" - } - }, - "environmentVariables": { - "AWS_REGION": "us-west-2", - "AWS_STAGE": "prod", - "AWS_TRUNCATION_MESSAGES_COUNT": "150", - "AWS_TRUNCATION_STRATEGY": "sliding_window" - }, - "metadataConfiguration": { - "requireMMDSV2": true - } -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97ebe200714d941e.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97ebe200714d941e.json new file mode 100644 index 000000000..758a51ee2 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.97ebe200714d941e.json @@ -0,0 +1,33 @@ +{ + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "1", + "createdAt": { + "$date": "2026-07-21T15:24:53.572Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:24:53.572Z" + }, + "roleArn": "arn:aws:iam::685197708687:role/tf_acc_test_1997929140646926281", + "networkConfiguration": { + "networkMode": "PUBLIC" + }, + "status": "READY", + "lifecycleConfiguration": { + "idleRuntimeSessionTimeout": 900, + "maxLifetime": 28800 + }, + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "workloadIdentityDetails": { + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:workload-identity-directory/default/workload-identity/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx" + }, + "agentRuntimeArtifact": { + "containerConfiguration": { + "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" + } + }, + "metadataConfiguration": { + "requireMMDSV2": true + } +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json index fa15a4536..3e9097e0d 100644 --- a/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeCommand.9b8f562f35114475.json @@ -1,6 +1,6 @@ { "$error": { "name": "ResourceNotFoundException", - "message": "Agent with agentId: missing_runtime-0000000000, accountId: 603141041947, and version: null not found!" + "message": "Agent with agentId: missing_runtime-0000000000, accountId: 685197708687, and version: null not found!" } } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.1aa8574ea8360d43.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.1aa8574ea8360d43.json new file mode 100644 index 000000000..aebcbf8dc --- /dev/null +++ b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.1aa8574ea8360d43.json @@ -0,0 +1,14 @@ +{ + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "status": "READY", + "createdAt": { + "$date": "2026-07-21T15:24:52.560Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:21.499Z" + }, + "name": "DEFAULT", + "id": "DEFAULT", + "liveVersion": "2" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json b/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json deleted file mode 100644 index 2fe70fecf..000000000 --- a/src/handlers/runtime/__fixtures__/GetAgentRuntimeEndpointCommand.4a8ae783c791f3b0.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "status": "READY", - "createdAt": { - "$date": "2026-07-13T14:25:15.567Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-13T14:26:17.219Z" - }, - "name": "DEFAULT", - "id": "DEFAULT", - "liveVersion": "1" -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.140854af01fd7827.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.140854af01fd7827.json new file mode 100644 index 000000000..9a3012f28 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.140854af01fd7827.json @@ -0,0 +1,33 @@ +{ + "runtimeEndpoints": [ + { + "name": "runtimeReadOnlyFixture", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/runtimeReadOnlyFixture", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "status": "READY", + "id": "runtimeReadOnlyFixture", + "createdAt": { + "$date": "2026-07-21T15:25:40.102Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:40.952Z" + }, + "liveVersion": "2", + "description": "Stable shared endpoint for AgentCore CLI Runtime read-only fixture recording" + }, + { + "name": "DEFAULT", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "status": "READY", + "id": "DEFAULT", + "createdAt": { + "$date": "2026-07-21T15:24:52.560Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:21.499Z" + }, + "liveVersion": "2" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.1d171c98cd60b7c4.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.1d171c98cd60b7c4.json new file mode 100644 index 000000000..eb0718f4b --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.1d171c98cd60b7c4.json @@ -0,0 +1,18 @@ +{ + "runtimeEndpoints": [ + { + "name": "DEFAULT", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "status": "READY", + "id": "DEFAULT", + "createdAt": { + "$date": "2026-07-21T15:24:52.560Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:21.499Z" + }, + "liveVersion": "2" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json deleted file mode 100644 index b5771b438..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.2a655f50d5b3f37e.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "runtimeEndpoints": [ - { - "name": "DEFAULT", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", - "status": "READY", - "id": "DEFAULT", - "createdAt": { - "$date": "2025-11-10T19:08:45.667Z" - }, - "lastUpdatedAt": { - "$date": "2025-11-10T19:08:53.465Z" - }, - "liveVersion": "1" - } - ] -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.52cf5ddfc336d4d2.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.52cf5ddfc336d4d2.json new file mode 100644 index 000000000..40c06bccd --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.52cf5ddfc336d4d2.json @@ -0,0 +1,20 @@ +{ + "runtimeEndpoints": [ + { + "name": "runtimeReadOnlyFixture", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/runtimeReadOnlyFixture", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "status": "READY", + "id": "runtimeReadOnlyFixture", + "createdAt": { + "$date": "2026-07-21T15:25:40.102Z" + }, + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:40.952Z" + }, + "liveVersion": "2", + "description": "Stable shared endpoint for AgentCore CLI Runtime read-only fixture recording" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHTCX90veyHQpW0JbzdFgJCAAAB7DCCAegGCSqGSIb3DQEHBqCCAdkwggHVAgEAMIIBzgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzXdq_zR1bimIWtQ_0CARCAggGfKjn69njYg3vBDeIAyLfH8q9m_O480LF2QMDi6BTVyJ70W0yKBU6bFBR3UvX61r_dQRqviT_A7gP1nndeLPIVoeaoH5E66U9njh8TO9uBRArYUqmdMtoN2zL4z4pPXncZzBtBDrSetRhOk_Az6YyGFPuZRqbn9o054gP5b4AMLENbckixIotwZPbYl7_WHNev0IZYhNaqXIgDjgyI517p0mRrWfRe4Ddv1G-bpox-6zIg5IVw1K38EQjvdk55Ct0ivrWvPpN_xTqETf6E1nkjtgMu3OGm-sKqZtdpVfAI_1cElM6pDi6HJ2bRx5rNFav1gybOp9mFRGRpNGMpUppDQ-SmCalZ7t8wqWCt0nKzn8kAtBqVOIIMSXwUfgvjiE9IsM2g3nPGSXwmOkKwAl3hck9Y5UQsN8tSyyxSEhqXbEJBra0LRKEtj2f4tVnQ6NHrXxgrfU3TfRopLs1PjRXSY-e_XUScXbQ7taQJDuC1r11isln9EZRje0iQ8unWWSnZvFdVcvAqzfWlz9fG3Kz1bj9fCQ0-l4aeY64N6nJijw==" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json deleted file mode 100644 index d3453d98f..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.8d3452aee6976a38.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "runtimeEndpoints": [ - { - "name": "runtimeReadOnlyFixture", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/runtimeReadOnlyFixture", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", - "status": "READY", - "id": "runtimeReadOnlyFixture", - "createdAt": { - "$date": "2026-07-21T15:00:01.129Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-21T15:00:02.416Z" - }, - "liveVersion": "1", - "description": "Temporary endpoint for AgentCore CLI fixture recording" - } - ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHkUvajaEgC29SdLXBr6kObAAAB0jCCAc4GCSqGSIb3DQEHBqCCAb8wggG7AgEAMIIBtAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAxiyF1yu2ACZlKdetQCARCAggGFV_DrOdGINWMFBPWFUM2wqjahKX0OyB1ucuaPvCi6u5EO7argVmTfmeKdXYUW5rVSD4tfS6SUdTQm5sPQ5uezVOCisLqOsc6Q4Pg4G1oXWwHzpxkdPl-Uuqi6wPdtH13e3TH_NOE9xyJznoS0e3MvzYomqBCMo_Oh8xn95QVQPBEYZeq6T95vTvR6YYAUDcrKwjscds7wLMrWIlqVAzHItSp7tpUy736l04hsSEup6neOhcB8a1rSCZjWne5BXsGlfD3fo0QuInzSsE2Atms7s4P0n0PUN91Oryb1immzdgkJZs_BrnvpWIRj4cdd5-PE6OIgLwU6jbtbygAonTSXyXKGlEpyalXuzZquwOsHbj7jr-Tt3h9GOeLXu49DkrEWlxBJkwldIsARoRpG_DoMgMLVnyOpnGAbG-yWHIBiuLD2G3L3FNVuik1tQSPLH9n3NDrC-04tzsT_ZFxokqkHr7k1of07C2eDYyrFLE6Z2Wd0OSRsKQhzzW7ZAWgzMotX32UqdHs=" -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json deleted file mode 100644 index 88f587bbc..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeEndpointsCommand.97cc3fdba97def73.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "runtimeEndpoints": [ - { - "name": "DEFAULT", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "status": "READY", - "id": "DEFAULT", - "createdAt": { - "$date": "2026-07-13T14:25:15.567Z" - }, - "lastUpdatedAt": { - "$date": "2026-07-13T14:26:17.219Z" - }, - "liveVersion": "1" - } - ] -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.140854af01fd7827.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.140854af01fd7827.json new file mode 100644 index 000000000..c51ceb30b --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.140854af01fd7827.json @@ -0,0 +1,26 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "2", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:21.499Z" + }, + "status": "READY" + }, + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "1", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": { + "$date": "2026-07-21T15:24:53.572Z" + }, + "status": "READY" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.52cf5ddfc336d4d2.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.52cf5ddfc336d4d2.json new file mode 100644 index 000000000..15f0e1a34 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.52cf5ddfc336d4d2.json @@ -0,0 +1,16 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "2", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": { + "$date": "2026-07-21T15:25:21.499Z" + }, + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgEwXMAtTGTZFyWB6KZJtPn-AAAB0jCCAc4GCSqGSIb3DQEHBqCCAb8wggG7AgEAMIIBtAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAylUsElcghzf4NUBekCARCAggGFF5whr4_8k1-yrxtlajLC17iTtz9pMjqudZrl7Y8ThJ9zRhnUFv8pbwu7RhGP7PaJKPIQD4StFOj3OSUXBL5dXN81JpbJSIrHm5Hxq0VS_q9hszeRO97gG6ltMo4Qmu17dFndYD0amjEpHDcp4b1d-bHrKu1exmbqwo0cak87FinliDqGAd7tClaOOry60psmqDxpxpgmSvPnw7LfT3t4R-pM4oo1gxGELSmXWV_7qaWRpSKSrLr7ZD67nssylo5F4hB9ut1KQMvLBYALvzHeI5Na873JU8oYtU1unOAoCrl1AqTCS3sS0RgqbYrOLmw0bKgxk4-OjbYyH2n72BiD1lcMdk95ZYG7ZXkhn6NZQsdVDVT1Ez-RKU6ry5CBMlQdo8GXQ1quzdGqnPwXAWKs80jGPf9C10vhVmL1fQ9DFlfZIo4b0h3ztZEon8IX84cXnEJX41up7qJWqefRHrirOjsvUwBpRK8brnreCQ1JeJeBY065x69iBAQWH3e9AI2lcPBvVR0=" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json deleted file mode 100644 index 807033a86..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.6ded2a867ef574fe.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeVersion": "23", - "agentRuntimeName": "starter_toolkit_agent", - "lastUpdatedAt": { - "$date": "2025-11-13T21:32:22.811Z" - }, - "status": "READY" - } - ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHoaJWXnfLZwGVWyCmkDbL_AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwFrlOsuELeUvC8HgMCARCAggF03UK8XVRLtbORtRrObsy0fiWBOck5Vf-vMnEvGjmCz69owlQ_cIrf15p55ZK44o6Ot2CFdPxEpXpe7JbJ9usnlpmod0yTYd3ns2dhQ9G_2HTKLE_DqTml5yVE51AoYU2WTLJS3qv82zDQuvJ7t1kWufz0UgcQOmxYOUNdQW5sJjt_0FZ_SHiW9CzvmRokuzVpIa0mvVdUx5Uikkxr6dHhyZrQAevbTp8OhxzrnZQ0c8WGiGvNVcVb8Xp5f7pwiayttKKPz2X9zuo56Kse1VJxkwSFy8bS_O0kBveHnCrCHk1XdU3t6tCLCeTl-o4BaA8D_ezEvE2NtTb_coeh5SO7z3NAt8HQQ2R_Q41OyFM19vkR6ERMORln_9GPgoXF2cMiLNtPkGvuREN7lCCgo_bE0HW2xOXCIFPvSksC58W5ZuyWKhtpaYsiKOEqV2FP-80BCCwQnnYkroEX0cIpkUYAB7O0uz3fW5f2cVR0S0Sbhq2pEfwQ" -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json deleted file mode 100644 index 31fc06ab1..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.758b88386b0e1f08.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeVersion": "24", - "agentRuntimeName": "starter_toolkit_agent", - "lastUpdatedAt": { - "$date": "2025-11-13T21:35:04.083Z" - }, - "status": "READY" - } - ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHB2tJ9bf3RLpCplJ4emRI2AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzxa-zllNubbEhLm60CARCAggF0DUbBDwWaVqG7FQJRP6MOH27D7j4MAODDcKD57kn62RCXbgrMeelwE-WDLW1GpG427Ne8pAhoztThtmhe7nOzDEhBayNnwwHABlBP6_p1zlLKYSrk96MpUSWwvhFRdMc_3rl59DXUI6gmU_93OPjd_fvqyKcfflnF3yA9hHDUUsuYIV_QcWBQd8TEHEf-UtEeTNCGvrtuASznTI-k2yHwbVGnqwtrG97m8FSp1_HGDT8QhgX0OIWN4BGEx4vzSL6M0nF-X8F5w0Nvzk5uUuWy3xq-3QJQNTmLzIse9UsKPqGlS8qJTXdEtXAokGvQkAbOUSoCg1DgtqD8SaOI_sjIVYMNAtyf0OhbZ2eI2ObDx6ZmSce2swq5DjdNs11ojJyEfmEDZMw31pdtVeEITAWDZ7jFHjc8rRvj_P-DbyxV5p9EqD7Oipi_Hje2vKuIHBd_dEONL22j3jx2IGUOm9Nk4fuaGEPKrkYjmdAu9ct9GxqGNw_n" -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json deleted file mode 100644 index 2a93441d6..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.97cc3fdba97def73.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeVersion": "1", - "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", - "lastUpdatedAt": { - "$date": "2026-07-13T14:25:16.254Z" - }, - "status": "READY" - } - ] -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.d9f8a63aba5fece2.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.d9f8a63aba5fece2.json new file mode 100644 index 000000000..72f75b943 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimeVersionsCommand.d9f8a63aba5fece2.json @@ -0,0 +1,15 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "1", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": { + "$date": "2026-07-21T15:24:53.572Z" + }, + "status": "READY" + } + ] +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.21b26ceeb17ddd46.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.21b26ceeb17ddd46.json new file mode 100644 index 000000000..ff1965d51 --- /dev/null +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.21b26ceeb17ddd46.json @@ -0,0 +1,15 @@ +{ + "agentRuntimes": [ + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/harness_tf_acc_test_1997929140646926281-Z7D2FxDMk2", + "agentRuntimeId": "harness_tf_acc_test_1997929140646926281-Z7D2FxDMk2", + "agentRuntimeVersion": "1", + "agentRuntimeName": "harness_tf_acc_test_1997929140646926281", + "lastUpdatedAt": { + "$date": "2026-05-01T18:19:03.512Z" + }, + "status": "READY" + } + ], + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgERE3Zyf3dYmd2LiyBNyCGEAAABnDCCAZgGCSqGSIb3DQEHBqCCAYkwggGFAgEAMIIBfgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyfUbmfL0KkkYuZZjACARCAggFPo8_Z_n6DRJs7flKkMS76z_JFSAm1blzGlN7POeFElkiXsL7aZjMsXg4ZA_23v5B-MkGPNDk-JX3nvwhPY-m4ykso-CkulJ6-Ek1jq2OqRTUw0B3c0LEGJKBGa38UzkKv1Vz2gEDELmDHJV8pMfa6oR4aUMi_ak20jSTTCvinG7vEuToL5raasFar5772NrT1Rs0h_VQ_P3EIiw-XWUONLv3pkVP7PAfGSB7wI3pWYHMXZGPzxlUrkpUMM_arxdNkweYTbuzjx2hZyws0W-eLlqhy-veF82FpJj4Yshb6TsIQnBlUCl-Sf9PDbBBbBrmg08-h6BumkebR1OIRVISn5FRodYKirS4UdZdCiAiRVT5jKy6EWdCVc2rUiD2R7CA_jR2U_nPVPuJU0YA4y2ZMeAg4l-q-2h001YWYfGtIN967xQbRCKc6nU95IhKLZSM=" +} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json deleted file mode 100644 index bea0d060f..000000000 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.2b82341102185f93.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "agentRuntimes": [ - { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/vpcmode_MyAgent-NcNoov97xz", - "agentRuntimeId": "vpcmode_MyAgent-NcNoov97xz", - "agentRuntimeVersion": "1", - "agentRuntimeName": "vpcmode_MyAgent", - "description": "AgentCore Runtime: vpcmode_MyAgent", - "lastUpdatedAt": { - "$date": "2026-03-17T23:03:06.454Z" - }, - "status": "READY" - } - ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgF408-wNGE0Plwlr6W1V44dAAABhDCCAYAGCSqGSIb3DQEHBqCCAXEwggFtAgEAMIIBZgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwDPS8d_7JzrPCOhjcCARCAggE3Ap-H9wjwFR3Mc0IcwJbLVo69JXfDuy8B-OwXtCYs_QGOk-qtSr82L9b768DRVJFbB2avcJ1x1hwahC1W6FP3De3fbju9HdQ4kEuzbxWLW3VYrwD8m0yFGvMd51icHqKtbRXZOTiqM7T6xtCoYZ7lLIfoMFZWy9NSQKM2kFWTbe0ggKe0w_7LyA-6YurDdVQArAyOtPdL_5RZFHNmL_cOZsF1Kmv1bIadgBSCVttCOd5idhnTPLRjLFPbQwEuFAV0l0YMO1ViMqxMRixna6KhOoLITcPBaCtmOFLbzfSJiTjZUaVieUfikrPgssojb03uCsnlFVPYi4doJcoybwgPc-0YEomHurWr74T5b3aKanDSsgzEd_P_WHTkAVJ4RacEVPjoAL7kor9aFdTIW1c1PRCRYZyaNcE=" -} \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json index e8ee3912f..fd8948080 100644 --- a/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json +++ b/src/handlers/runtime/__fixtures__/ListAgentRuntimesCommand.7d2e22c637f6b633.json @@ -1,15 +1,16 @@ { "agentRuntimes": [ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", - "agentRuntimeId": "weather_agent-Q1UyBZG08k", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/testdeploymentnow_MyAgent-NbnwifHv2x", + "agentRuntimeId": "testdeploymentnow_MyAgent-NbnwifHv2x", "agentRuntimeVersion": "1", - "agentRuntimeName": "weather_agent", + "agentRuntimeName": "testdeploymentnow_MyAgent", + "description": "AgentCore Runtime: testdeploymentnow_MyAgent", "lastUpdatedAt": { - "$date": "2025-11-10T19:08:53.465Z" + "$date": "2026-02-10T21:07:43.525Z" }, "status": "READY" } ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHNkkLmCwrPyf3ADfXIzqw9AAABgjCCAX4GCSqGSIb3DQEHBqCCAW8wggFrAgEAMIIBZAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyqDpv6qpcK9U_lzHcCARCAggE1w_QKXeQ56wkat07A1JCChWZRdVegw6PSPxdrowRzmfV0JpjW9nzkqyfdMz-2kWB06DwBvZqRo-aU1hR3VHYj1yHWEIG7XdSg105t_FCUNYIUKn_vGcqwKtYCXa2BrNbsKDX4I5C8bcUK1z9a8FvJ13Qp0o8fGxrojYHj5UZQSS364_AUA4_bcCYvi7Zam-6fQM9iJS228JP5Dd8MS5gRyzKNeE3Jd35nhiQ7pOqeDxkutEeniH6Ay_Z3B4JdyBuKR78CsxsdEijTjkaxVYzMoMYUH5XA8RAaa-QGVyWMMoucFaO45Dc1hJMaMfC2FlcRf96jhjm5gG2niMZDZ2TjPv1MEmJ8SfSwgVzrEdlLQtA4P9Id9FmiAMA72eDRAGGR7DZLyzYLOhClIjfQ1_iQ6JrIS2Ik" + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgG6cGcJPqi0LZHbjKr5ChQAAAABjjCCAYoGCSqGSIb3DQEHBqCCAXswggF3AgEAMIIBcAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzvpT6lITCSPK2ByJMCARCAggFB8UZbtS6rwjN4RLfbZ2CtSBZLpk6aGGY0Yq_ssMBfZkm9Z48YyBRdnJGu97eA7UcLpUY486A2fjR9OO7zlXqmXjHhQyHuWIMPFfzQklRG8aRwg36oSiwEKTqaviU1_fyI4SNlm-Jh1vobCDp8hZUOgM91j0FwpxtgkN3QP083tsRGXopXyk4L40VQL5w1x4SYOGozT1GcWgQJxXYnxV6756-Ph7kPoTQap-qISzcPugud5rXsXlleFa0YBt40tk39WZP6221FehU526dWU38q9g_-_AE2QpugnUQMRyJjAMtyEbo2wRLjiSLe_nyf8qgmZtygvl5Dgs-csa4dMek7mwQLwIzfoPhqIIMSyuQmn_o07XIygHneYtHzzAWKpXQ0RPiTy_pZiiNv0iZkWov8xKvoehHnWJJTDPRmsTiwJF4k" } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/endpoint-get.golden.json b/src/handlers/runtime/__fixtures__/endpoint-get.golden.json index e5bdab3b1..edffedd55 100644 --- a/src/handlers/runtime/__fixtures__/endpoint-get.golden.json +++ b/src/handlers/runtime/__fixtures__/endpoint-get.golden.json @@ -1,10 +1,10 @@ { - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", "status": "READY", - "createdAt": "2026-07-13T14:25:15.567Z", - "lastUpdatedAt": "2026-07-13T14:26:17.219Z", + "createdAt": "2026-07-21T15:24:52.560Z", + "lastUpdatedAt": "2026-07-21T15:25:21.499Z", "name": "DEFAULT", "id": "DEFAULT", - "liveVersion": "1" + "liveVersion": "2" } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json b/src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json index 8fd009f72..e086e5748 100644 --- a/src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json +++ b/src/handlers/runtime/__fixtures__/endpoint-list-page-1.golden.json @@ -2,15 +2,15 @@ "runtimeEndpoints": [ { "name": "runtimeReadOnlyFixture", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/runtimeReadOnlyFixture", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/runtimeReadOnlyFixture", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", "status": "READY", "id": "runtimeReadOnlyFixture", - "createdAt": "2026-07-21T15:00:01.129Z", - "lastUpdatedAt": "2026-07-21T15:00:02.416Z", - "liveVersion": "1", - "description": "Temporary endpoint for AgentCore CLI fixture recording" + "createdAt": "2026-07-21T15:25:40.102Z", + "lastUpdatedAt": "2026-07-21T15:25:40.952Z", + "liveVersion": "2", + "description": "Stable shared endpoint for AgentCore CLI Runtime read-only fixture recording" } ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHkUvajaEgC29SdLXBr6kObAAAB0jCCAc4GCSqGSIb3DQEHBqCCAb8wggG7AgEAMIIBtAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAxiyF1yu2ACZlKdetQCARCAggGFV_DrOdGINWMFBPWFUM2wqjahKX0OyB1ucuaPvCi6u5EO7argVmTfmeKdXYUW5rVSD4tfS6SUdTQm5sPQ5uezVOCisLqOsc6Q4Pg4G1oXWwHzpxkdPl-Uuqi6wPdtH13e3TH_NOE9xyJznoS0e3MvzYomqBCMo_Oh8xn95QVQPBEYZeq6T95vTvR6YYAUDcrKwjscds7wLMrWIlqVAzHItSp7tpUy736l04hsSEup6neOhcB8a1rSCZjWne5BXsGlfD3fo0QuInzSsE2Atms7s4P0n0PUN91Oryb1immzdgkJZs_BrnvpWIRj4cdd5-PE6OIgLwU6jbtbygAonTSXyXKGlEpyalXuzZquwOsHbj7jr-Tt3h9GOeLXu49DkrEWlxBJkwldIsARoRpG_DoMgMLVnyOpnGAbG-yWHIBiuLD2G3L3FNVuik1tQSPLH9n3NDrC-04tzsT_ZFxokqkHr7k1of07C2eDYyrFLE6Z2Wd0OSRsKQhzzW7ZAWgzMotX32UqdHs=" + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHTCX90veyHQpW0JbzdFgJCAAAB7DCCAegGCSqGSIb3DQEHBqCCAdkwggHVAgEAMIIBzgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzXdq_zR1bimIWtQ_0CARCAggGfKjn69njYg3vBDeIAyLfH8q9m_O480LF2QMDi6BTVyJ70W0yKBU6bFBR3UvX61r_dQRqviT_A7gP1nndeLPIVoeaoH5E66U9njh8TO9uBRArYUqmdMtoN2zL4z4pPXncZzBtBDrSetRhOk_Az6YyGFPuZRqbn9o054gP5b4AMLENbckixIotwZPbYl7_WHNev0IZYhNaqXIgDjgyI517p0mRrWfRe4Ddv1G-bpox-6zIg5IVw1K38EQjvdk55Ct0ivrWvPpN_xTqETf6E1nkjtgMu3OGm-sKqZtdpVfAI_1cElM6pDi6HJ2bRx5rNFav1gybOp9mFRGRpNGMpUppDQ-SmCalZ7t8wqWCt0nKzn8kAtBqVOIIMSXwUfgvjiE9IsM2g3nPGSXwmOkKwAl3hck9Y5UQsN8tSyyxSEhqXbEJBra0LRKEtj2f4tVnQ6NHrXxgrfU3TfRopLs1PjRXSY-e_XUScXbQ7taQJDuC1r11isln9EZRje0iQ8unWWSnZvFdVcvAqzfWlz9fG3Kz1bj9fCQ0-l4aeY64N6nJijw==" } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json b/src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json index 8a82f0295..4a083a46f 100644 --- a/src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json +++ b/src/handlers/runtime/__fixtures__/endpoint-list-page-2.golden.json @@ -2,13 +2,13 @@ "runtimeEndpoints": [ { "name": "DEFAULT", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k/runtime-endpoint/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", "status": "READY", "id": "DEFAULT", - "createdAt": "2025-11-10T19:08:45.667Z", - "lastUpdatedAt": "2025-11-10T19:08:53.465Z", - "liveVersion": "1" + "createdAt": "2026-07-21T15:24:52.560Z", + "lastUpdatedAt": "2026-07-21T15:25:21.499Z", + "liveVersion": "2" } ] } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/get.golden.json b/src/handlers/runtime/__fixtures__/get.golden.json index 7a9705be1..e98511f8d 100644 --- a/src/handlers/runtime/__fixtures__/get.golden.json +++ b/src/handlers/runtime/__fixtures__/get.golden.json @@ -1,11 +1,11 @@ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", - "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeVersion": "1", - "createdAt": "2026-07-13T14:25:15.368Z", - "lastUpdatedAt": "2026-07-13T14:25:16.254Z", - "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "2", + "createdAt": "2026-07-21T15:24:52.318Z", + "lastUpdatedAt": "2026-07-21T15:25:21.499Z", + "roleArn": "arn:aws:iam::685197708687:role/tf_acc_test_1997929140646926281", "networkConfiguration": { "networkMode": "PUBLIC" }, @@ -14,20 +14,15 @@ "idleRuntimeSessionTimeout": 900, "maxLifetime": 28800 }, + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", "workloadIdentityDetails": { - "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:workload-identity-directory/default/workload-identity/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx" }, "agentRuntimeArtifact": { "containerConfiguration": { "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" } }, - "environmentVariables": { - "AWS_REGION": "us-west-2", - "AWS_STAGE": "prod", - "AWS_TRUNCATION_MESSAGES_COUNT": "150", - "AWS_TRUNCATION_STRATEGY": "sliding_window" - }, "metadataConfiguration": { "requireMMDSV2": true } diff --git a/src/handlers/runtime/__fixtures__/list-page-1.golden.json b/src/handlers/runtime/__fixtures__/list-page-1.golden.json index dcb9d2df9..6750263fb 100644 --- a/src/handlers/runtime/__fixtures__/list-page-1.golden.json +++ b/src/handlers/runtime/__fixtures__/list-page-1.golden.json @@ -1,13 +1,14 @@ { "agentRuntimes": [ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/weather_agent-Q1UyBZG08k", - "agentRuntimeId": "weather_agent-Q1UyBZG08k", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/testdeploymentnow_MyAgent-NbnwifHv2x", + "agentRuntimeId": "testdeploymentnow_MyAgent-NbnwifHv2x", "agentRuntimeVersion": "1", - "agentRuntimeName": "weather_agent", - "lastUpdatedAt": "2025-11-10T19:08:53.465Z", + "agentRuntimeName": "testdeploymentnow_MyAgent", + "description": "AgentCore Runtime: testdeploymentnow_MyAgent", + "lastUpdatedAt": "2026-02-10T21:07:43.525Z", "status": "READY" } ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHNkkLmCwrPyf3ADfXIzqw9AAABgjCCAX4GCSqGSIb3DQEHBqCCAW8wggFrAgEAMIIBZAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyqDpv6qpcK9U_lzHcCARCAggE1w_QKXeQ56wkat07A1JCChWZRdVegw6PSPxdrowRzmfV0JpjW9nzkqyfdMz-2kWB06DwBvZqRo-aU1hR3VHYj1yHWEIG7XdSg105t_FCUNYIUKn_vGcqwKtYCXa2BrNbsKDX4I5C8bcUK1z9a8FvJ13Qp0o8fGxrojYHj5UZQSS364_AUA4_bcCYvi7Zam-6fQM9iJS228JP5Dd8MS5gRyzKNeE3Jd35nhiQ7pOqeDxkutEeniH6Ay_Z3B4JdyBuKR78CsxsdEijTjkaxVYzMoMYUH5XA8RAaa-QGVyWMMoucFaO45Dc1hJMaMfC2FlcRf96jhjm5gG2niMZDZ2TjPv1MEmJ8SfSwgVzrEdlLQtA4P9Id9FmiAMA72eDRAGGR7DZLyzYLOhClIjfQ1_iQ6JrIS2Ik" + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgG6cGcJPqi0LZHbjKr5ChQAAAABjjCCAYoGCSqGSIb3DQEHBqCCAXswggF3AgEAMIIBcAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzvpT6lITCSPK2ByJMCARCAggFB8UZbtS6rwjN4RLfbZ2CtSBZLpk6aGGY0Yq_ssMBfZkm9Z48YyBRdnJGu97eA7UcLpUY486A2fjR9OO7zlXqmXjHhQyHuWIMPFfzQklRG8aRwg36oSiwEKTqaviU1_fyI4SNlm-Jh1vobCDp8hZUOgM91j0FwpxtgkN3QP083tsRGXopXyk4L40VQL5w1x4SYOGozT1GcWgQJxXYnxV6756-Ph7kPoTQap-qISzcPugud5rXsXlleFa0YBt40tk39WZP6221FehU526dWU38q9g_-_AE2QpugnUQMRyJjAMtyEbo2wRLjiSLe_nyf8qgmZtygvl5Dgs-csa4dMek7mwQLwIzfoPhqIIMSyuQmn_o07XIygHneYtHzzAWKpXQ0RPiTy_pZiiNv0iZkWov8xKvoehHnWJJTDPRmsTiwJF4k" } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/list-page-2.golden.json b/src/handlers/runtime/__fixtures__/list-page-2.golden.json index 35f9d02eb..4dbd30372 100644 --- a/src/handlers/runtime/__fixtures__/list-page-2.golden.json +++ b/src/handlers/runtime/__fixtures__/list-page-2.golden.json @@ -1,14 +1,13 @@ { "agentRuntimes": [ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/vpcmode_MyAgent-NcNoov97xz", - "agentRuntimeId": "vpcmode_MyAgent-NcNoov97xz", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/harness_tf_acc_test_1997929140646926281-Z7D2FxDMk2", + "agentRuntimeId": "harness_tf_acc_test_1997929140646926281-Z7D2FxDMk2", "agentRuntimeVersion": "1", - "agentRuntimeName": "vpcmode_MyAgent", - "description": "AgentCore Runtime: vpcmode_MyAgent", - "lastUpdatedAt": "2026-03-17T23:03:06.454Z", + "agentRuntimeName": "harness_tf_acc_test_1997929140646926281", + "lastUpdatedAt": "2026-05-01T18:19:03.512Z", "status": "READY" } ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgF408-wNGE0Plwlr6W1V44dAAABhDCCAYAGCSqGSIb3DQEHBqCCAXEwggFtAgEAMIIBZgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwDPS8d_7JzrPCOhjcCARCAggE3Ap-H9wjwFR3Mc0IcwJbLVo69JXfDuy8B-OwXtCYs_QGOk-qtSr82L9b768DRVJFbB2avcJ1x1hwahC1W6FP3De3fbju9HdQ4kEuzbxWLW3VYrwD8m0yFGvMd51icHqKtbRXZOTiqM7T6xtCoYZ7lLIfoMFZWy9NSQKM2kFWTbe0ggKe0w_7LyA-6YurDdVQArAyOtPdL_5RZFHNmL_cOZsF1Kmv1bIadgBSCVttCOd5idhnTPLRjLFPbQwEuFAV0l0YMO1ViMqxMRixna6KhOoLITcPBaCtmOFLbzfSJiTjZUaVieUfikrPgssojb03uCsnlFVPYi4doJcoybwgPc-0YEomHurWr74T5b3aKanDSsgzEd_P_WHTkAVJ4RacEVPjoAL7kor9aFdTIW1c1PRCRYZyaNcE=" + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgERE3Zyf3dYmd2LiyBNyCGEAAABnDCCAZgGCSqGSIb3DQEHBqCCAYkwggGFAgEAMIIBfgYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAyfUbmfL0KkkYuZZjACARCAggFPo8_Z_n6DRJs7flKkMS76z_JFSAm1blzGlN7POeFElkiXsL7aZjMsXg4ZA_23v5B-MkGPNDk-JX3nvwhPY-m4ykso-CkulJ6-Ek1jq2OqRTUw0B3c0LEGJKBGa38UzkKv1Vz2gEDELmDHJV8pMfa6oR4aUMi_ak20jSTTCvinG7vEuToL5raasFar5772NrT1Rs0h_VQ_P3EIiw-XWUONLv3pkVP7PAfGSB7wI3pWYHMXZGPzxlUrkpUMM_arxdNkweYTbuzjx2hZyws0W-eLlqhy-veF82FpJj4Yshb6TsIQnBlUCl-Sf9PDbBBbBrmg08-h6BumkebR1OIRVISn5FRodYKirS4UdZdCiAiRVT5jKy6EWdCVc2rUiD2R7CA_jR2U_nPVPuJU0YA4y2ZMeAg4l-q-2h001YWYfGtIN967xQbRCKc6nU95IhKLZSM=" } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json b/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json index 2b19f6b45..8d42016d4 100644 --- a/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json +++ b/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json @@ -1,14 +1,25 @@ { "runtimeEndpoints": [ + { + "name": "runtimeReadOnlyFixture", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/runtimeReadOnlyFixture", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "status": "READY", + "id": "runtimeReadOnlyFixture", + "createdAt": "2026-07-21T15:25:40.102Z", + "lastUpdatedAt": "2026-07-21T15:25:40.952Z", + "liveVersion": "2", + "description": "Stable shared endpoint for AgentCore CLI Runtime read-only fixture recording" + }, { "name": "DEFAULT", - "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb/runtime-endpoint/DEFAULT", - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeEndpointArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx/runtime-endpoint/DEFAULT", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", "status": "READY", "id": "DEFAULT", - "createdAt": "2026-07-13T14:25:15.567Z", - "lastUpdatedAt": "2026-07-13T14:26:17.219Z", - "liveVersion": "1" + "createdAt": "2026-07-21T15:24:52.560Z", + "lastUpdatedAt": "2026-07-21T15:25:21.499Z", + "liveVersion": "2" } ] } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/long-version-list.golden.json b/src/handlers/runtime/__fixtures__/long-version-list.golden.json index 21333d50e..2d13dd8f7 100644 --- a/src/handlers/runtime/__fixtures__/long-version-list.golden.json +++ b/src/handlers/runtime/__fixtures__/long-version-list.golden.json @@ -1,11 +1,21 @@ { "agentRuntimes": [ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "2", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": "2026-07-21T15:25:21.499Z", + "status": "READY" + }, + { + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", "agentRuntimeVersion": "1", - "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", - "lastUpdatedAt": "2026-07-13T14:25:16.254Z", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": "2026-07-21T15:24:53.572Z", "status": "READY" } ] diff --git a/src/handlers/runtime/__fixtures__/version-get.golden.json b/src/handlers/runtime/__fixtures__/version-get.golden.json index 7f4caf112..a3c34e7e8 100644 --- a/src/handlers/runtime/__fixtures__/version-get.golden.json +++ b/src/handlers/runtime/__fixtures__/version-get.golden.json @@ -1,11 +1,11 @@ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/harness_tf_acc_test_3496516139353111995-U17dI2Favb", - "agentRuntimeName": "harness_tf_acc_test_3496516139353111995", - "agentRuntimeId": "harness_tf_acc_test_3496516139353111995-U17dI2Favb", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", "agentRuntimeVersion": "1", - "createdAt": "2026-07-13T14:25:16.254Z", - "lastUpdatedAt": "2026-07-13T14:25:16.254Z", - "roleArn": "arn:aws:iam::603141041947:role/tf_acc_test_3496516139353111995", + "createdAt": "2026-07-21T15:24:53.572Z", + "lastUpdatedAt": "2026-07-21T15:24:53.572Z", + "roleArn": "arn:aws:iam::685197708687:role/tf_acc_test_1997929140646926281", "networkConfiguration": { "networkMode": "PUBLIC" }, @@ -14,20 +14,15 @@ "idleRuntimeSessionTimeout": 900, "maxLifetime": 28800 }, + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", "workloadIdentityDetails": { - "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:workload-identity-directory/default/workload-identity/harness_tf_acc_test_3496516139353111995-U17dI2Favb" + "workloadIdentityArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:workload-identity-directory/default/workload-identity/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx" }, "agentRuntimeArtifact": { "containerConfiguration": { "containerUri": "public.ecr.aws/y5s8y8h8/harness-us-west-2:latest" } }, - "environmentVariables": { - "AWS_REGION": "us-west-2", - "AWS_STAGE": "prod", - "AWS_TRUNCATION_MESSAGES_COUNT": "150", - "AWS_TRUNCATION_STRATEGY": "sliding_window" - }, "metadataConfiguration": { "requireMMDSV2": true } diff --git a/src/handlers/runtime/__fixtures__/version-list-page-1.golden.json b/src/handlers/runtime/__fixtures__/version-list-page-1.golden.json index 2ee9b0b26..69321a84e 100644 --- a/src/handlers/runtime/__fixtures__/version-list-page-1.golden.json +++ b/src/handlers/runtime/__fixtures__/version-list-page-1.golden.json @@ -1,13 +1,14 @@ { "agentRuntimes": [ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeVersion": "24", - "agentRuntimeName": "starter_toolkit_agent", - "lastUpdatedAt": "2025-11-13T21:35:04.083Z", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "2", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": "2026-07-21T15:25:21.499Z", "status": "READY" } ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHB2tJ9bf3RLpCplJ4emRI2AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAzxa-zllNubbEhLm60CARCAggF0DUbBDwWaVqG7FQJRP6MOH27D7j4MAODDcKD57kn62RCXbgrMeelwE-WDLW1GpG427Ne8pAhoztThtmhe7nOzDEhBayNnwwHABlBP6_p1zlLKYSrk96MpUSWwvhFRdMc_3rl59DXUI6gmU_93OPjd_fvqyKcfflnF3yA9hHDUUsuYIV_QcWBQd8TEHEf-UtEeTNCGvrtuASznTI-k2yHwbVGnqwtrG97m8FSp1_HGDT8QhgX0OIWN4BGEx4vzSL6M0nF-X8F5w0Nvzk5uUuWy3xq-3QJQNTmLzIse9UsKPqGlS8qJTXdEtXAokGvQkAbOUSoCg1DgtqD8SaOI_sjIVYMNAtyf0OhbZ2eI2ObDx6ZmSce2swq5DjdNs11ojJyEfmEDZMw31pdtVeEITAWDZ7jFHjc8rRvj_P-DbyxV5p9EqD7Oipi_Hje2vKuIHBd_dEONL22j3jx2IGUOm9Nk4fuaGEPKrkYjmdAu9ct9GxqGNw_n" + "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgEwXMAtTGTZFyWB6KZJtPn-AAAB0jCCAc4GCSqGSIb3DQEHBqCCAb8wggG7AgEAMIIBtAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAylUsElcghzf4NUBekCARCAggGFF5whr4_8k1-yrxtlajLC17iTtz9pMjqudZrl7Y8ThJ9zRhnUFv8pbwu7RhGP7PaJKPIQD4StFOj3OSUXBL5dXN81JpbJSIrHm5Hxq0VS_q9hszeRO97gG6ltMo4Qmu17dFndYD0amjEpHDcp4b1d-bHrKu1exmbqwo0cak87FinliDqGAd7tClaOOry60psmqDxpxpgmSvPnw7LfT3t4R-pM4oo1gxGELSmXWV_7qaWRpSKSrLr7ZD67nssylo5F4hB9ut1KQMvLBYALvzHeI5Na873JU8oYtU1unOAoCrl1AqTCS3sS0RgqbYrOLmw0bKgxk4-OjbYyH2n72BiD1lcMdk95ZYG7ZXkhn6NZQsdVDVT1Ez-RKU6ry5CBMlQdo8GXQ1quzdGqnPwXAWKs80jGPf9C10vhVmL1fQ9DFlfZIo4b0h3ztZEon8IX84cXnEJX41up7qJWqefRHrirOjsvUwBpRK8brnreCQ1JeJeBY065x69iBAQWH3e9AI2lcPBvVR0=" } \ No newline at end of file diff --git a/src/handlers/runtime/__fixtures__/version-list-page-2.golden.json b/src/handlers/runtime/__fixtures__/version-list-page-2.golden.json index 162db8283..0e4e287c3 100644 --- a/src/handlers/runtime/__fixtures__/version-list-page-2.golden.json +++ b/src/handlers/runtime/__fixtures__/version-list-page-2.golden.json @@ -1,13 +1,13 @@ { "agentRuntimes": [ { - "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:603141041947:runtime/starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeId": "starter_toolkit_agent-58HnLF6qC3", - "agentRuntimeVersion": "23", - "agentRuntimeName": "starter_toolkit_agent", - "lastUpdatedAt": "2025-11-13T21:32:22.811Z", + "agentRuntimeArn": "arn:aws:bedrock-agentcore:us-west-2:685197708687:runtime/agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeId": "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx", + "agentRuntimeVersion": "1", + "agentRuntimeName": "agentcore_cli_runtime_read_only_fixture", + "description": "Stable shared resource for AgentCore CLI Runtime read-only fixture recording", + "lastUpdatedAt": "2026-07-21T15:24:53.572Z", "status": "READY" } - ], - "nextToken": "AQICAHiNyEvxZzpFuVHtBl-B3jfZBBM36tDjm8_cCisOa4ihlgHoaJWXnfLZwGVWyCmkDbL_AAABwTCCAb0GCSqGSIb3DQEHBqCCAa4wggGqAgEAMIIBowYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwFrlOsuELeUvC8HgMCARCAggF03UK8XVRLtbORtRrObsy0fiWBOck5Vf-vMnEvGjmCz69owlQ_cIrf15p55ZK44o6Ot2CFdPxEpXpe7JbJ9usnlpmod0yTYd3ns2dhQ9G_2HTKLE_DqTml5yVE51AoYU2WTLJS3qv82zDQuvJ7t1kWufz0UgcQOmxYOUNdQW5sJjt_0FZ_SHiW9CzvmRokuzVpIa0mvVdUx5Uikkxr6dHhyZrQAevbTp8OhxzrnZQ0c8WGiGvNVcVb8Xp5f7pwiayttKKPz2X9zuo56Kse1VJxkwSFy8bS_O0kBveHnCrCHk1XdU3t6tCLCeTl-o4BaA8D_ezEvE2NtTb_coeh5SO7z3NAt8HQQ2R_Q41OyFM19vkR6ERMORln_9GPgoXF2cMiLNtPkGvuREN7lCCgo_bE0HW2xOXCIFPvSksC58W5ZuyWKhtpaYsiKOEqV2FP-80BCCwQnnYkroEX0cIpkUYAB7O0uz3fW5f2cVR0S0Sbhq2pEfwQ" + ] } \ No newline at end of file diff --git a/src/handlers/runtime/runtime.test.tsx b/src/handlers/runtime/runtime.test.tsx index b991a033e..a778ac54e 100644 --- a/src/handlers/runtime/runtime.test.tsx +++ b/src/handlers/runtime/runtime.test.tsx @@ -7,13 +7,11 @@ import { createRootHandler } from "../index"; const REGION = "us-west-2"; const FIXTURES = join(import.meta.dir, "__fixtures__"); -// To re-record, update these IDs to real us-west-2 resources: LONG_RUNTIME_ID -// needs version 1 and DEFAULT, the version target needs at least two versions, -// the endpoint target needs at least two endpoints, and the account needs at -// least two Runtimes. Page-two requests always use the token returned by page one. -const LONG_RUNTIME_ID = "harness_tf_acc_test_3496516139353111995-U17dI2Favb"; -const PAGINATED_VERSION_RUNTIME_ID = "starter_toolkit_agent-58HnLF6qC3"; -const PAGINATED_ENDPOINT_RUNTIME_ID = "weather_agent-Q1UyBZG08k"; +// The shared E2E fixture Runtime has versions 1 and 2 plus DEFAULT and +// runtimeReadOnlyFixture endpoints. The account has multiple Runtimes for +// Runtime pagination. Page-two requests use the token returned by page one. +// Record with AWS_PROFILE=e2e-test RECORD=1 bun test src/handlers/runtime/runtime.test.tsx. +const FIXTURE_RUNTIME_ID = "agentcore_cli_runtime_read_only_fixture-wZ7V4Q6vhx"; const MISSING_RUNTIME_ID = "missing_runtime-0000000000"; function createFixtureCore(): CoreClient { @@ -75,10 +73,10 @@ describe("runtime command hierarchy", () => { describe("runtime control reads", () => { test("gets a service-valid long Runtime ID through the real Core", async () => { - const stdout = await run(["runtime", "get", "--id", LONG_RUNTIME_ID]); + const stdout = await run(["runtime", "get", "--id", FIXTURE_RUNTIME_ID]); matchGolden(FIXTURES, "get.golden.json", stdout); - expect(JSON.parse(stdout).agentRuntimeId).toBe(LONG_RUNTIME_ID); + expect(JSON.parse(stdout).agentRuntimeId).toBe(FIXTURE_RUNTIME_ID); }); test("lists two Runtime pages with Harness pagination names", async () => { @@ -107,14 +105,14 @@ describe("runtime control reads", () => { "version", "get", "--id", - LONG_RUNTIME_ID, + FIXTURE_RUNTIME_ID, "--version", "1", ]); matchGolden(FIXTURES, "version-get.golden.json", stdout); const parsed = JSON.parse(stdout); - expect(parsed.agentRuntimeId).toBe(LONG_RUNTIME_ID); + expect(parsed.agentRuntimeId).toBe(FIXTURE_RUNTIME_ID); expect(parsed.agentRuntimeVersion).toBe("1"); }); @@ -124,7 +122,7 @@ describe("runtime control reads", () => { "version", "list", "--id", - PAGINATED_VERSION_RUNTIME_ID, + FIXTURE_RUNTIME_ID, "--max-results", "1", ]); @@ -139,7 +137,7 @@ describe("runtime control reads", () => { "version", "list", "--id", - PAGINATED_VERSION_RUNTIME_ID, + FIXTURE_RUNTIME_ID, "--max-results", "1", "--next-token", @@ -155,14 +153,14 @@ describe("runtime control reads", () => { "endpoint", "get", "--id", - LONG_RUNTIME_ID, + FIXTURE_RUNTIME_ID, "--qualifier", "DEFAULT", ]); matchGolden(FIXTURES, "endpoint-get.golden.json", stdout); const parsed = JSON.parse(stdout); - expect(parsed.agentRuntimeArn).toContain(LONG_RUNTIME_ID); + expect(parsed.agentRuntimeArn).toContain(FIXTURE_RUNTIME_ID); expect(parsed.name).toBe("DEFAULT"); }); @@ -172,7 +170,7 @@ describe("runtime control reads", () => { "endpoint", "list", "--id", - PAGINATED_ENDPOINT_RUNTIME_ID, + FIXTURE_RUNTIME_ID, "--max-results", "1", ]); @@ -187,7 +185,7 @@ describe("runtime control reads", () => { "endpoint", "list", "--id", - PAGINATED_ENDPOINT_RUNTIME_ID, + FIXTURE_RUNTIME_ID, "--max-results", "1", "--next-token", @@ -200,10 +198,10 @@ describe("runtime control reads", () => { test.each([ [["runtime", "get"], /--id/], [["runtime", "version", "get"], /--id/], - [["runtime", "version", "get", "--id", LONG_RUNTIME_ID], /--version/], + [["runtime", "version", "get", "--id", FIXTURE_RUNTIME_ID], /--version/], [["runtime", "version", "list"], /--id/], [["runtime", "endpoint", "get"], /--id/], - [["runtime", "endpoint", "get", "--id", LONG_RUNTIME_ID], /--qualifier/], + [["runtime", "endpoint", "get", "--id", FIXTURE_RUNTIME_ID], /--qualifier/], [["runtime", "endpoint", "list"], /--id/], ] as const)("rejects a missing required selector for `%s`", async (args, message) => { expect(run([...args])).rejects.toThrow(message); @@ -211,12 +209,12 @@ describe("runtime control reads", () => { test.each([ [ - ["runtime", "version", "list", "--id", LONG_RUNTIME_ID], + ["runtime", "version", "list", "--id", FIXTURE_RUNTIME_ID], "long-version-list.golden.json", "agentRuntimes", ], [ - ["runtime", "endpoint", "list", "--id", LONG_RUNTIME_ID], + ["runtime", "endpoint", "list", "--id", FIXTURE_RUNTIME_ID], "long-endpoint-list.golden.json", "runtimeEndpoints", ], From e65a1ecdbe757d606fb89824eff31c60a6685cc5 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Tue, 21 Jul 2026 16:47:06 +0000 Subject: [PATCH 8/9] test(runtime): clarify pagination and ID coverage --- src/handlers/runtime/runtime.test.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/handlers/runtime/runtime.test.tsx b/src/handlers/runtime/runtime.test.tsx index a778ac54e..2ea4251b1 100644 --- a/src/handlers/runtime/runtime.test.tsx +++ b/src/handlers/runtime/runtime.test.tsx @@ -72,14 +72,16 @@ describe("runtime command hierarchy", () => { }); describe("runtime control reads", () => { - test("gets a service-valid long Runtime ID through the real Core", async () => { + test("gets a Runtime ID exceeding the 48-character Runtime name limit", async () => { + expect(FIXTURE_RUNTIME_ID.length).toBeGreaterThan(48); + const stdout = await run(["runtime", "get", "--id", FIXTURE_RUNTIME_ID]); matchGolden(FIXTURES, "get.golden.json", stdout); expect(JSON.parse(stdout).agentRuntimeId).toBe(FIXTURE_RUNTIME_ID); }); - test("lists two Runtime pages with Harness pagination names", async () => { + test("paginates Runtime list with --max-results and --next-token", async () => { const firstPage = await run(["runtime", "list", "--max-results", "1"]); matchGolden(FIXTURES, "list-page-1.golden.json", firstPage); @@ -99,7 +101,7 @@ describe("runtime control reads", () => { expect(JSON.parse(secondPage).agentRuntimes).toHaveLength(1); }); - test("gets a Runtime version for a service-valid long Runtime ID", async () => { + test("gets a Runtime version using an ID exceeding the 48-character Runtime name limit", async () => { const stdout = await run([ "runtime", "version", @@ -147,7 +149,7 @@ describe("runtime control reads", () => { expect(JSON.parse(secondPage).agentRuntimes).toHaveLength(1); }); - test("maps the endpoint qualifier for a service-valid long Runtime ID", async () => { + test("maps the endpoint qualifier using an ID exceeding the 48-character Runtime name limit", async () => { const stdout = await run([ "runtime", "endpoint", @@ -219,7 +221,7 @@ describe("runtime control reads", () => { "runtimeEndpoints", ], ] as const)( - "accepts a service-valid long Runtime ID for `%s`", + "accepts a Runtime ID exceeding the 48-character name limit for `%s`", async (args, golden, collection) => { const stdout = await run([...args]); From 68afc22d18b15a536519f5dddcfd267571b8ae68 Mon Sep 17 00:00:00 2001 From: Aidan Daly Date: Tue, 21 Jul 2026 16:56:36 +0000 Subject: [PATCH 9/9] chore(runtime): clarify pagination terminology --- ...n => endpoint-list-id-over-48.golden.json} | 0 ...on => version-list-id-over-48.golden.json} | 0 src/handlers/runtime/endpoint/list/index.tsx | 4 +- src/handlers/runtime/list/index.tsx | 4 +- src/handlers/runtime/runtime.test.tsx | 48 +++++++++++-------- src/handlers/runtime/version/list/index.tsx | 4 +- 6 files changed, 35 insertions(+), 25 deletions(-) rename src/handlers/runtime/__fixtures__/{long-endpoint-list.golden.json => endpoint-list-id-over-48.golden.json} (100%) rename src/handlers/runtime/__fixtures__/{long-version-list.golden.json => version-list-id-over-48.golden.json} (100%) diff --git a/src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json b/src/handlers/runtime/__fixtures__/endpoint-list-id-over-48.golden.json similarity index 100% rename from src/handlers/runtime/__fixtures__/long-endpoint-list.golden.json rename to src/handlers/runtime/__fixtures__/endpoint-list-id-over-48.golden.json diff --git a/src/handlers/runtime/__fixtures__/long-version-list.golden.json b/src/handlers/runtime/__fixtures__/version-list-id-over-48.golden.json similarity index 100% rename from src/handlers/runtime/__fixtures__/long-version-list.golden.json rename to src/handlers/runtime/__fixtures__/version-list-id-over-48.golden.json diff --git a/src/handlers/runtime/endpoint/list/index.tsx b/src/handlers/runtime/endpoint/list/index.tsx index 9c5c4531b..b6f492dc6 100644 --- a/src/handlers/runtime/endpoint/list/index.tsx +++ b/src/handlers/runtime/endpoint/list/index.tsx @@ -10,8 +10,8 @@ export const createListRuntimeEndpointsHandler = (core: Core) => description: "list a Runtime's endpoints", flags: [ flag("id", "the ID of the Runtime", z.string().optional()), - flag("next-token", "next token to use on paginated", z.string().optional()), - flag("max-results", "max number of items to return", z.number().optional()), + flag("next-token", "pagination token returned by a previous request", z.string().optional()), + flag("max-results", "maximum number of items to return", z.number().optional()), ], handle: async (ctx, flags) => { if (!flags.id) { diff --git a/src/handlers/runtime/list/index.tsx b/src/handlers/runtime/list/index.tsx index 42db44ed1..08728b2e3 100644 --- a/src/handlers/runtime/list/index.tsx +++ b/src/handlers/runtime/list/index.tsx @@ -9,8 +9,8 @@ export const createListRuntimesHandler = (core: Core) => name: "list", description: "list AgentCore Runtimes", flags: [ - flag("next-token", "next token to use on paginated", z.string().optional()), - flag("max-results", "max number of items to return", z.number().optional()), + flag("next-token", "pagination token returned by a previous request", z.string().optional()), + flag("max-results", "maximum number of items to return", z.number().optional()), ], handle: async (ctx, flags) => { ctx diff --git a/src/handlers/runtime/runtime.test.tsx b/src/handlers/runtime/runtime.test.tsx index 2ea4251b1..5685d8619 100644 --- a/src/handlers/runtime/runtime.test.tsx +++ b/src/handlers/runtime/runtime.test.tsx @@ -31,7 +31,7 @@ async function run(args: string[]): Promise { } describe("runtime command hierarchy", () => { - test("registers only the approved control-plane branches", () => { + test("registers the Runtime read-only command hierarchy", () => { const root = createRootHandler(createFixtureCore(), { io: testIO().io, logger: createSilentLogger(), @@ -61,7 +61,7 @@ describe("runtime command hierarchy", () => { }); test.each(["runtime", "runtime version", "runtime endpoint"])( - "prints AppIO-backed help for bare `%s` without an SDK call", + "prints help for bare `%s` without an SDK call", async (command) => { const stdout = await run(command.split(" ")); @@ -71,8 +71,8 @@ describe("runtime command hierarchy", () => { ); }); -describe("runtime control reads", () => { - test("gets a Runtime ID exceeding the 48-character Runtime name limit", async () => { +describe("runtime read-only commands", () => { + test("gets a Runtime whose ID exceeds the 48-character Runtime name limit", async () => { expect(FIXTURE_RUNTIME_ID.length).toBeGreaterThan(48); const stdout = await run(["runtime", "get", "--id", FIXTURE_RUNTIME_ID]); @@ -118,7 +118,7 @@ describe("runtime control reads", () => { expect(parsed.agentRuntimeVersion).toBe("1"); }); - test("lists two Runtime version pages", async () => { + test("paginates Runtime version list with --max-results and --next-token", async () => { const firstPage = await run([ "runtime", "version", @@ -166,7 +166,7 @@ describe("runtime control reads", () => { expect(parsed.name).toBe("DEFAULT"); }); - test("lists two Runtime endpoint pages", async () => { + test("paginates Runtime endpoint list with --max-results and --next-token", async () => { const firstPage = await run([ "runtime", "endpoint", @@ -198,31 +198,41 @@ describe("runtime control reads", () => { }); test.each([ - [["runtime", "get"], /--id/], - [["runtime", "version", "get"], /--id/], - [["runtime", "version", "get", "--id", FIXTURE_RUNTIME_ID], /--version/], - [["runtime", "version", "list"], /--id/], - [["runtime", "endpoint", "get"], /--id/], - [["runtime", "endpoint", "get", "--id", FIXTURE_RUNTIME_ID], /--qualifier/], - [["runtime", "endpoint", "list"], /--id/], - ] as const)("rejects a missing required selector for `%s`", async (args, message) => { + ["runtime get", ["runtime", "get"], /--id/], + ["runtime version get", ["runtime", "version", "get"], /--id/], + [ + "runtime version get --id ", + ["runtime", "version", "get", "--id", FIXTURE_RUNTIME_ID], + /--version/, + ], + ["runtime version list", ["runtime", "version", "list"], /--id/], + ["runtime endpoint get", ["runtime", "endpoint", "get"], /--id/], + [ + "runtime endpoint get --id ", + ["runtime", "endpoint", "get", "--id", FIXTURE_RUNTIME_ID], + /--qualifier/, + ], + ["runtime endpoint list", ["runtime", "endpoint", "list"], /--id/], + ] as const)("rejects a missing required selector for `%s`", async (_label, args, message) => { expect(run([...args])).rejects.toThrow(message); }); test.each([ [ + "runtime version list", ["runtime", "version", "list", "--id", FIXTURE_RUNTIME_ID], - "long-version-list.golden.json", + "version-list-id-over-48.golden.json", "agentRuntimes", ], [ + "runtime endpoint list", ["runtime", "endpoint", "list", "--id", FIXTURE_RUNTIME_ID], - "long-endpoint-list.golden.json", + "endpoint-list-id-over-48.golden.json", "runtimeEndpoints", ], ] as const)( - "accepts a Runtime ID exceeding the 48-character name limit for `%s`", - async (args, golden, collection) => { + "accepts a Runtime ID exceeding the 48-character Runtime name limit for `%s`", + async (_label, args, golden, collection) => { const stdout = await run([...args]); matchGolden(FIXTURES, golden, stdout); @@ -230,7 +240,7 @@ describe("runtime control reads", () => { }, ); - test("propagates a recorded Runtime service error", async () => { + test("propagates ResourceNotFoundException from Runtime get", async () => { await expect(run(["runtime", "get", "--id", MISSING_RUNTIME_ID])).rejects.toMatchObject({ name: "ResourceNotFoundException", }); diff --git a/src/handlers/runtime/version/list/index.tsx b/src/handlers/runtime/version/list/index.tsx index b6e930acb..b2c20b599 100644 --- a/src/handlers/runtime/version/list/index.tsx +++ b/src/handlers/runtime/version/list/index.tsx @@ -10,8 +10,8 @@ export const createListRuntimeVersionsHandler = (core: Core) => description: "list a Runtime's versions", flags: [ flag("id", "the ID of the Runtime", z.string().optional()), - flag("next-token", "next token to use on paginated", z.string().optional()), - flag("max-results", "max number of items to return", z.number().optional()), + flag("next-token", "pagination token returned by a previous request", z.string().optional()), + flag("max-results", "maximum number of items to return", z.number().optional()), ], handle: async (ctx, flags) => { if (!flags.id) {