diff --git a/cli/src/lib/providers/registry.ts b/cli/src/lib/providers/registry.ts index 50d9916a..49ba3de1 100644 --- a/cli/src/lib/providers/registry.ts +++ b/cli/src/lib/providers/registry.ts @@ -25,6 +25,7 @@ export const PROVIDER_IDS = [ "ollama", "copilot", "claude_pty", + "hermes_moa", ] as const; export type ProviderId = (typeof PROVIDER_IDS)[number]; @@ -142,6 +143,16 @@ export const PROVIDERS: Record = { // Python side at runner construction, where the actionable error lives. validate: () => ok(), }, + hermes_moa: { + id: "hermes_moa", + summary: + "Mixture-of-Agents: 3 ollama-cloud models via the Hermes proxy, " + + "recall-first union+cross-verify (speca#88).", + // Hermes owns the provider credential pool and the proxy, so there is no + // speca-side key to check. Whether `hermes` is on PATH is probed by + // runtime_registry.py::_probe_hermes_moa, where the actionable error lives. + validate: () => ok(), + }, }; export function isProviderId(value: string): value is ProviderId { diff --git a/cli/test/providers.registry.test.ts b/cli/test/providers.registry.test.ts index 56450455..bd1895ce 100644 --- a/cli/test/providers.registry.test.ts +++ b/cli/test/providers.registry.test.ts @@ -144,7 +144,7 @@ describe("validateRuntime — API-key providers", () => { }); describe("validateRuntime — CLI-managed providers", () => { - it.each([["claude"], ["copilot"], ["claude_pty"]] as const)( + it.each([["claude"], ["copilot"], ["claude_pty"], ["hermes_moa"]] as const)( "%s needs no env credentials", (id) => { expect(validateRuntime(id, {}).ok).toBe(true); diff --git a/cli/test/run.command.test.ts b/cli/test/run.command.test.ts index b72bb1ab..9eed37ad 100644 --- a/cli/test/run.command.test.ts +++ b/cli/test/run.command.test.ts @@ -343,6 +343,23 @@ describe("runRunCommand — --runtime selection (#113)", () => { expect(seenRuntime).toBe("ollama"); }); + it("forwards hermes_moa (registered in runtime_registry.py) into the spawn options", async () => { + let seenRuntime: string | undefined; + const code = await runRunCommand({ + flags: { phase: ["02c"], noTui: true, runtime: "hermes_moa" }, + cwd, + spawn: ((opts) => { + seenRuntime = opts.runtime; + return fakeSpawnDependencyFailure()(opts); + }) as typeof spawnPipeline, + startLogs: async () => async () => {}, + skipPreflight: true, + }); + expect(code).toBe(1); // fake pipeline's dependency-failure exit + expect(seenRuntime).toBe("hermes_moa"); + expect(stderrCapture.chunks.join("")).not.toContain("unknown runtime"); + }); + it("leaves runtime undefined when the flag is absent (default unchanged)", async () => { let seenRuntime: string | undefined = "sentinel"; await runRunCommand({