Closes the gap to Claude Code across four upgrade rounds (all verified green: typecheck, 388 tests, build 313 KB). Sub-agent orchestration: - Resumable sub-agents (send_message) + MaxIterations "continue" path - Configurable multi-depth sub-agent nesting - Parallel fan-out for pure agent/agent__* batches, each writable delegation in its own throwaway git worktree (no file collisions) - Named specialist fleet: explore, code-reviewer, planner, debugger, test-writer (read-only types skip worktree isolation) - Named teammates: agent tool `name` arg + list_teammates + send_message by name (synchronous, addressable handle — not true async background) Plan mode: - True in-turn pause/resume on approval (no synthetic proceed turn) - exit_plan_mode tool + side-by-side diff rendering (/diff) Persistent memory: - Typed file-per-fact memory under config dir, index folded into the system prompt (bounded), memory + memory_write tools, /memory command Toolset + UI: - multi_edit, notebook_edit, web_search/web_fetch, workflow orchestration primitive (agent/parallel/pipeline/phase/log + worktree isolation + best-effort structured output with recursive schema validation) - Structured task system (task_create/list/get/update with dependency graph + ownership) replacing flat todo_write - Cron/scheduled tasks (cron_create/list/delete, schedule_wakeup) with durable persistence and idle-gated ticking - Interactive worktree session (enter_worktree/exit_worktree) with a live-cwd UI switch that survives /model changes - AskUserQuestion tool + QuestionPrompt UI - Permission rule granularity + user/project settings merge - Color diffs, sub-agent activity panel, /undo, dashboard refinements Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
1.0 KiB
TypeScript
19 lines
1.0 KiB
TypeScript
import { z } from "zod";
|
|
import type { ToolDef } from "./types.js";
|
|
|
|
const schema = z.object({}).describe("Takes no arguments.");
|
|
|
|
/** Lists the session's named teammates — sub-agents you spawned via the `agent` tool with a `name`
|
|
* that are still resumable. Each entry is `{ name, agentId }`; address one with `send_message` by
|
|
* its `name` (or its `agentId`). Returns an empty list when there are none, or in a non-session
|
|
* context where no roster is maintained. Non-mutating: it only reads the name → agentId index. */
|
|
export const listTeammatesTool: ToolDef<z.infer<typeof schema>> = {
|
|
name: "list_teammates",
|
|
description:
|
|
"List your named teammates — sub-agents you spawned with a `name` via the `agent` tool that are still " +
|
|
"resumable. Each has a name and agentId; continue one with send_message by its name. Returns an empty list " +
|
|
"when none exist or in a non-session context.",
|
|
schema,
|
|
mutating: false,
|
|
handler: async (_args, ctx) => ({ teammates: ctx.listTeammates?.() ?? [] }),
|
|
}; |