diff --git a/src/components/CliOnlyScreen.test.tsx b/src/components/CliOnlyScreen.test.tsx index b6b7c91eb..88cd75634 100644 --- a/src/components/CliOnlyScreen.test.tsx +++ b/src/components/CliOnlyScreen.test.tsx @@ -61,10 +61,31 @@ describe("menus list command-line-only subcommands below a divider", () => { r.unmount(); }); - test("the divider is omitted when nothing is command line only", async () => { + test("the harness menu", async () => { const r = renderScreen("/agentcore/harness"); - await waitForText(r.lastFrame, "manage AgentCore harnesses"); + await waitForText(r.lastFrame, "command line only"); + expect(menuEntries(r.lastFrame()!)).toEqual({ + screens: [ + "create", + "get", + "list", + "update", + "delete", + "invoke", + "exec", + "endpoint", + "version", + ], + cliOnly: ["logs", "traces"], + }); + r.unmount(); + }); + + test("the divider is omitted when nothing is command line only", async () => { + const r = renderScreen("/agentcore/harness/endpoint"); + + await waitForText(r.lastFrame, "manage harness endpoints"); expect(r.lastFrame()).not.toContain("command line only"); r.unmount(); }); diff --git a/src/handlers/harness/index.tsx b/src/handlers/harness/index.tsx index 72a4a129c..9c29e9896 100644 --- a/src/handlers/harness/index.tsx +++ b/src/handlers/harness/index.tsx @@ -22,6 +22,17 @@ export function createHarnessHandler(core: Core, io: AppIO): Router { harness.use(withTuiOnEmptyFlagsAndArgs(core, io)); // Open the TUI at this root, i.e., `agentcore harness` harness.default(renderTui(core, io)); + harness.supportedTuiCommands( + "create", + "get", + "list", + "update", + "delete", + "invoke", + "exec", + "endpoint", + "version", + ); // Register handlers harness.handler(createCreateHarnessHandler(core));