Files
OmniRoute/tests/unit/cli-catalog-acpspawnable.test.ts
diegosouzapw 193bf1a766 feat(cli-tools): extend catalog with category/vendor/acpSpawnable/baseUrlSupport + new entries (plan 14 F1)
- Add CliCatalogEntrySchema (Zod) + CliCatalogEntry type + CliCatalogSchema in src/shared/schemas/cliCatalog.ts
- Add ToolBatchStatus + ToolBatchStatusMap interfaces in src/shared/types/cliBatchStatus.ts
- Re-export cliBatchStatus from src/shared/types/index.ts
- Extend all CLI_TOOLS entries with 4 new fields: category, vendor, acpSpawnable, baseUrlSupport
- Add 13 new entries: roo, jcode, deepseek-tui, smelt, pi (code), aider, forge,
  gemini-cli, cursor-cli (code), goose, interpreter, warp, agent-deck (agent)
- Remove windsurf and amp (MITM backlog plan 11, D17)
- Result: 19 visible code entries + 6 agent entries (D15 cardinality)
- Add 5 new unit tests: cli-catalog-schema, cli-catalog-counts, cli-catalog-newentries,
  cli-catalog-removed, cli-catalog-acpspawnable
- Update existing tests to align with removed entries
2026-05-27 19:50:38 -03:00

75 lines
1.7 KiB
TypeScript

/**
* F1: cli-catalog-acpspawnable.test.ts
* Assert acpSpawnable values per plan 14 D16.
*/
import test from "node:test";
import assert from "node:assert/strict";
const { CLI_TOOLS } = await import("../../src/shared/constants/cliTools.ts");
// Per D16: acpSpawnable: true for tools that also appear in ACP Agents
const ACP_SPAWNABLE_IDS = [
"codex",
"claude",
"goose",
"gemini-cli",
"openclaw",
"aider",
"opencode",
"cline",
"qwen",
"forge",
"interpreter",
"cursor-cli",
"warp",
];
for (const id of ACP_SPAWNABLE_IDS) {
test(`'${id}' has acpSpawnable === true (in ACP Agents badge)`, () => {
const entry = CLI_TOOLS[id];
assert.ok(entry, `Entry '${id}' must exist in CLI_TOOLS`);
assert.equal(
entry.acpSpawnable,
true,
`Expected CLI_TOOLS['${id}'].acpSpawnable to be true, got ${entry.acpSpawnable}`
);
});
}
// Tools that should NOT be acpSpawnable
const NOT_ACP_SPAWNABLE_IDS = [
"copilot",
"droid",
"kilo",
"continue",
"roo",
"jcode",
"deepseek-tui",
"smelt",
"pi",
"hermes-agent",
"agent-deck",
"custom",
];
for (const id of NOT_ACP_SPAWNABLE_IDS) {
test(`'${id}' has acpSpawnable === false`, () => {
const entry = CLI_TOOLS[id];
assert.ok(entry, `Entry '${id}' must exist in CLI_TOOLS`);
assert.equal(
entry.acpSpawnable,
false,
`Expected CLI_TOOLS['${id}'].acpSpawnable to be false, got ${entry.acpSpawnable}`
);
});
}
// windsurf was removed — should not exist
test("windsurf is not in CLI_TOOLS (removed per D17)", () => {
assert.equal(
(CLI_TOOLS as Record<string, unknown>)["windsurf"],
undefined,
"windsurf must not be in CLI_TOOLS (removed per plan 14 D17)"
);
});