feat(config): named agent roster (config.agents)

Adds an optional `agents` roster to the project config: agent name -> role +
model + provider (kind). The team view can now show named agents (claude,
codex, kimi, windows-claude, backyard, mo, zied, …) with a FIXED role and the
model behind them, instead of inferring role/identity from whichever tasks an
agent happened to touch (which made one agent appear under several roles).

Bump 0.7.0 -> 0.7.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
chahinebrini 2026-06-29 01:16:49 +02:00
parent 15f139429e
commit 2d89f808b8
3 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "agenthub",
"version": "0.7.0",
"version": "0.7.1",
"description": "Local coordination layer for AI coding agents",
"type": "module",
"main": "./dist/index.js",

View File

@ -115,7 +115,7 @@ async function runRemote(serverUrl: string, fn: () => Promise<void>): Promise<vo
export function createProgram(cwd: string): Command {
const program = new Command('agenthub')
.description('Local coordination layer for AI coding agents')
.version('0.7.0')
.version('0.7.1')
.option('--server <url>', 'AgentHub server URL (env: AGENTHUB_SERVER)');
program

View File

@ -96,11 +96,27 @@ export const RoleConfigSchema = z.object({
description: z.string().optional(),
});
/**
* A named agent in the team roster. Lets the team view show agents (by name,
* like backyard / mo / zied) with a fixed role + the model behind them instead
* of guessing role/identity from whatever tasks the agent happened to touch.
*/
export const AgentConfigSchema = z.object({
role: Role,
/** Display model, e.g. "Opus 4.8", "Sonnet 4.6", "Kimi K2", "GPT-5 Codex". */
model: z.string().optional(),
/** Provider/company for the logo: "anthropic" | "openai" | "moonshot" | … */
kind: z.string().optional(),
description: z.string().optional(),
});
export const ConfigSchema = z.object({
version: z.literal('1'),
projectName: z.string().min(1),
delegationMode: DelegationMode.default('suggest'),
roles: z.record(z.string(), RoleConfigSchema),
/** Named team roster: agent name → role + model + provider. */
agents: z.record(z.string(), AgentConfigSchema).optional(),
serverUrl: z.string().url().optional(),
});