From 2d89f808b8cfce19d6112a0e0483a76431cb7614 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Mon, 29 Jun 2026 01:16:49 +0200 Subject: [PATCH] feat(config): named agent roster (config.agents) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- package.json | 2 +- src/cli/index.ts | 2 +- src/core/schema.ts | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9a011b9..34bf32f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/cli/index.ts b/src/cli/index.ts index d1cba4a..bb165c2 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -115,7 +115,7 @@ async function runRemote(serverUrl: string, fn: () => Promise): Promise', 'AgentHub server URL (env: AGENTHUB_SERVER)'); program diff --git a/src/core/schema.ts b/src/core/schema.ts index 38a87ee..1442a21 100644 --- a/src/core/schema.ts +++ b/src/core/schema.ts @@ -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(), });