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>
25 lines
1.2 KiB
TypeScript
25 lines
1.2 KiB
TypeScript
export const FALLBACK_TOOL_INSTRUCTIONS = `This model does not support native function calling. To call a tool, write exactly one fenced code block of the form:
|
|
|
|
\`\`\`tool_call
|
|
{"name": "TOOL_NAME", "arguments": {"arg1": "value1", "arg2": "value2"}}
|
|
\`\`\`
|
|
|
|
Rules:
|
|
- One tool call per response. Wait for the \`\`\`tool_result\`\`\` before calling another.
|
|
- The fenced block must contain a single JSON object with exactly two keys: "name" and "arguments".
|
|
- "arguments" must be an object matching the tool's schema. Do not put the arguments at the top level.
|
|
- If no tool is needed, answer normally without any \`\`\`tool_call\`\`\` block.
|
|
|
|
Example:
|
|
\`\`\`tool_call
|
|
{"name": "read_file", "arguments": {"path": "src/index.ts", "limit": 50}}
|
|
\`\`\`
|
|
|
|
When a tool result shows an error or empty output, do not repeat the exact same call. Adjust your arguments or ask the user.`;
|
|
|
|
export const FALLBACK_RETRY_NUDGE = `Your last \`tool_call\` block was invalid. Check:
|
|
- It must be a single JSON object inside the fence, not plain text or multiple objects.
|
|
- It must have "name" (string) and "arguments" (object) keys.
|
|
- Argument values must match the tool's expected types.
|
|
Try again with the correct format, or answer without a tool call.`;
|