Skip to content

Commit 4738a08

Browse files
committed
fix(cli): require auto-detected runtime for identity create
1 parent d3f533e commit 4738a08

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

packages/cli/src/commands/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getAvailableProviders } from "../providers/registry.js";
88
function detectRuntime(): string {
99
const available = getAvailableProviders();
1010
if (available.length === 0) {
11-
console.error("No agent runtime found. Install claude, codex, or gemini CLI, or pass --runtime explicitly.");
11+
console.error("No supported agent runtime found. Install a supported agent runtime, or pass --runtime explicitly.");
1212
process.exit(1);
1313
}
1414
return available[0].name;

packages/cli/src/index.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AGENT_RUNTIMES, type AgentRuntime } from "@agent-kanban/shared";
1+
import type { AgentRuntime } from "@agent-kanban/shared";
22
import { Command } from "commander";
33
import { loadIdentity } from "./agent/identity.js";
44
import { createClient, createIdentity } from "./agent/leader.js";
@@ -210,15 +210,10 @@ identityCmd
210210
.description("Create and save a leader identity for the current runtime")
211211
.requiredOption("--username <username>", "User-like handle chosen by the agent")
212212
.option("--name <name>", "Optional full name shown in the UI")
213-
.option("--runtime <runtime>", `Agent runtime: ${AGENT_RUNTIMES.join(", ")}`)
214213
.action(async (opts) => {
215-
const runtime = (opts.runtime || detectRuntime()) as string | null;
214+
const runtime = detectRuntime();
216215
if (!runtime) {
217-
console.error("No agent runtime found. Install claude, codex, or gemini CLI, or pass --runtime explicitly.");
218-
process.exit(1);
219-
}
220-
if (!AGENT_RUNTIMES.includes(runtime as AgentRuntime)) {
221-
console.error(`Unknown runtime "${runtime}" — must be one of: ${AGENT_RUNTIMES.join(", ")}`);
216+
console.error("No supported agent runtime found. Run this command from inside an agent runtime.");
222217
process.exit(1);
223218
}
224219

0 commit comments

Comments
 (0)