feat: wire multi-agent config and routing

Co-authored-by: Mark Pors <1078320+pors@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-09 12:44:23 +00:00
parent 81beda0772
commit 7b81d97ec2
189 changed files with 4340 additions and 2903 deletions

View File

@@ -267,10 +267,14 @@ export function registerModelsCli(program: Command) {
.option("--no-probe", "Skip live probes; list free candidates only")
.option("--yes", "Accept defaults without prompting", false)
.option("--no-input", "Disable prompts (use defaults)")
.option("--set-default", "Set agent.model to the first selection", false)
.option(
"--set-default",
"Set agents.defaults.model to the first selection",
false,
)
.option(
"--set-image",
"Set agent.imageModel to the first image selection",
"Set agents.defaults.imageModel to the first image selection",
false,
)
.option("--json", "Output JSON", false)

View File

@@ -191,7 +191,7 @@ export function buildProgram() {
.description("Initialize ~/.clawdbot/clawdbot.json and the agent workspace")
.option(
"--workspace <dir>",
"Agent workspace directory (default: ~/clawd; stored as agent.workspace)",
"Agent workspace directory (default: ~/clawd; stored as agents.defaults.workspace)",
)
.option("--wizard", "Run the interactive onboarding wizard", false)
.option("--non-interactive", "Run the wizard without prompts", false)
@@ -1163,7 +1163,7 @@ Examples:
clawdbot sessions --json # machine-readable output
clawdbot sessions --store ./tmp/sessions.json
Shows token usage per session when the agent reports it; set agent.contextTokens to see % of your model window.`,
Shows token usage per session when the agent reports it; set agents.defaults.contextTokens to see % of your model window.`,
)
.action(async (opts) => {
setVerbose(Boolean(opts.verbose));

View File

@@ -1,5 +1,9 @@
import chalk from "chalk";
import type { Command } from "commander";
import {
resolveAgentWorkspaceDir,
resolveDefaultAgentId,
} from "../agents/agent-scope.js";
import {
buildWorkspaceSkillStatus,
type SkillStatusEntry,
@@ -363,7 +367,10 @@ export function registerSkillsCli(program: Command) {
.action(async (opts) => {
try {
const config = loadConfig();
const workspaceDir = config.agent?.workspace ?? process.cwd();
const workspaceDir = resolveAgentWorkspaceDir(
config,
resolveDefaultAgentId(config),
);
const report = buildWorkspaceSkillStatus(workspaceDir, { config });
console.log(formatSkillsList(report, opts));
} catch (err) {
@@ -380,7 +387,10 @@ export function registerSkillsCli(program: Command) {
.action(async (name, opts) => {
try {
const config = loadConfig();
const workspaceDir = config.agent?.workspace ?? process.cwd();
const workspaceDir = resolveAgentWorkspaceDir(
config,
resolveDefaultAgentId(config),
);
const report = buildWorkspaceSkillStatus(workspaceDir, { config });
console.log(formatSkillInfo(report, name, opts));
} catch (err) {
@@ -396,7 +406,10 @@ export function registerSkillsCli(program: Command) {
.action(async (opts) => {
try {
const config = loadConfig();
const workspaceDir = config.agent?.workspace ?? process.cwd();
const workspaceDir = resolveAgentWorkspaceDir(
config,
resolveDefaultAgentId(config),
);
const report = buildWorkspaceSkillStatus(workspaceDir, { config });
console.log(formatSkillsCheck(report, opts));
} catch (err) {
@@ -409,7 +422,10 @@ export function registerSkillsCli(program: Command) {
skills.action(async () => {
try {
const config = loadConfig();
const workspaceDir = config.agent?.workspace ?? process.cwd();
const workspaceDir = resolveAgentWorkspaceDir(
config,
resolveDefaultAgentId(config),
);
const report = buildWorkspaceSkillStatus(workspaceDir, { config });
console.log(formatSkillsList(report, {}));
} catch (err) {