refactor(agents): remove stale wrapper exports

This commit is contained in:
Vincent Koc
2026-06-19 05:18:24 +08:00
parent 34d402f53c
commit a98bfdb2b7
6 changed files with 27 additions and 63 deletions

View File

@@ -1,7 +1,8 @@
// Register agent tests cover agent command registration and option wiring.
import { Command } from "commander";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { registerAgentCommands } from "./register.agent.js";
import { registerAgentsCommands } from "./register.agent.js";
import { registerAgentTurnCommand } from "./register.agent-turn.js";
const mocks = vi.hoisted(() => ({
agentCliCommandMock: vi.fn(),
@@ -65,10 +66,11 @@ vi.mock("../../runtime.js", () => ({
defaultRuntime: mocks.runtime,
}));
describe("registerAgentCommands", () => {
describe("agent command registration", () => {
async function runCli(args: string[]) {
const program = new Command();
registerAgentCommands(program, { agentChannelOptions: "last|telegram|discord" });
registerAgentTurnCommand(program, { agentChannelOptions: "last|telegram|discord" });
registerAgentsCommands(program);
await program.parseAsync(args, { from: "user" });
}
@@ -220,7 +222,7 @@ describe("registerAgentCommands", () => {
it("documents bind accountId resolution behavior in help text", () => {
const program = new Command();
registerAgentCommands(program, { agentChannelOptions: "last|telegram|discord" });
registerAgentsCommands(program);
const agents = program.commands.find((command) => command.name() === "agents");
const bind = agents?.commands.find((command) => command.name() === "bind");
const help = bind?.helpInformation() ?? "";