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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/handlers/gateway/invoke/invoke.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ describe("gateway invoke", () => {
"mcp-session",
"--mcp-protocol-version",
"2025-06-18",
"--endpoint-url",
"https://control.example.test",
]);

const request = core.gateway.calls.find((call) => call.method === "invokeGateway")!
Expand All @@ -158,10 +156,7 @@ describe("gateway invoke", () => {
mcpSessionId: "mcp-session",
mcpProtocolVersion: "2025-06-18",
});
expect(core.gateway.calls[0]!.args[1]).toEqual({
region: REGION,
endpointUrl: "https://control.example.test",
});
expect(core.gateway.calls[0]!.args[1]).toEqual({ region: REGION });
});

test("supports GET without a payload", async () => {
Expand Down
7 changes: 5 additions & 2 deletions src/handlers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { createIdentityHandler } from "./identity/index.tsx";
import { createMemoryHandler } from "./memory/index.tsx";
import { createPaymentHandler } from "./payment/index.tsx";
import { createRuntimeHandler } from "./runtime/index.tsx";
import { DebugKey, EndpointKey, JsonKey, RegionKey } from "./keys.tsx";
import { DebugKey, JsonKey, RegionKey } from "./keys.tsx";
import { createConfigHandler } from "./config/";
import { createProjectHandler } from "./project/index.ts";
import { createUpdateHandler } from "./update/index.tsx";
Expand Down Expand Up @@ -46,7 +46,10 @@ export function createRootHandler(core: Core, config: RootHandlerConfig): Router
root.version(PACKAGE_VERSION);

// Add global flags
root.groupFlags(RegionKey, DebugKey, JsonKey, EndpointKey);
// --endpoint-url intentionally omitted: temporarily disabled (inconsistent
// override behavior). EndpointKey + its plumbing stay defined so re-enabling
// is adding it back here.
root.groupFlags(RegionKey, DebugKey, JsonKey);

// Resolve the effective AWS region (flag -> env -> config file) and pin it on
// the context for every command beneath the root.
Expand Down
5 changes: 1 addition & 4 deletions src/handlers/memory/memory.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { createGetMemoryHandler } from "./get";
import { InputValidationError } from "../../errors";

const REGION = "us-west-2";
const ENDPOINT = "https://agentcore.example.test";
const FIXTURES = join(import.meta.dir, "__fixtures__");

// The e2e-test account holds two persistent fixture Memories:
Expand Down Expand Up @@ -263,8 +262,6 @@ describe("memory event commands", () => {
SESSION_ID,
"--event-id",
EVENT_ID,
"--endpoint-url",
ENDPOINT,
]);

expect(core.memory.calls).toEqual([
Expand All @@ -277,7 +274,7 @@ describe("memory event commands", () => {
sessionId: SESSION_ID,
eventId: EVENT_ID,
},
{ region: REGION, endpointUrl: ENDPOINT },
{ region: REGION },
],
},
]);
Expand Down
7 changes: 5 additions & 2 deletions src/handlers/runtime/shell/shell.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,12 @@ describe("runtime shell command", () => {
);
});

test("rejects an endpoint URL override the shell SDK cannot honor", async () => {
test("rejects --endpoint-url, which is globally disabled", async () => {
const subject = harness();

// --endpoint-url is temporarily disabled (unregistered as a global flag), so
// it is rejected as an unknown option before the shell handler runs — the
// shell SDK could not honor it anyway.
await expect(
subject.run(
"--id",
Expand All @@ -161,7 +164,7 @@ describe("runtime shell command", () => {
"--endpoint-url",
"https://runtime.test",
),
).rejects.toThrow("runtime shell does not support --endpoint-url");
).rejects.toThrow("unknown option '--endpoint-url'");
expect(subject.core.runtime.calls.some((call) => call.method === "getRuntime")).toBe(false);
});
});
Loading