Skip to content
Open
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
11 changes: 11 additions & 0 deletions cli/src/lib/providers/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const PROVIDER_IDS = [
"ollama",
"copilot",
"claude_pty",
"hermes_moa",
] as const;
export type ProviderId = (typeof PROVIDER_IDS)[number];

Expand Down Expand Up @@ -142,6 +143,16 @@ export const PROVIDERS: Record<ProviderId, ProviderDescriptor> = {
// 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 {
Expand Down
2 changes: 1 addition & 1 deletion cli/test/providers.registry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
17 changes: 17 additions & 0 deletions cli/test/run.command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down