claw-code/rust/crates/api
TheArchitectit 3438fe8f2d feat(team): port subagent_model, parallel tool exec, team coordination layer
Port the team-enhancement feature layer from feat/multi-tool-exec onto
feat/team-test so the agent-teams stack is buildable and testable on top
of the current CLI/runtime.

Subagent model (config wiring):
- Add subagent_model field to RuntimeFeatureConfig + RuntimeConfig::subagent_model()
  accessor + parse_optional_subagent_model() so the subagentModel setting
  (already validated by config_validate.rs) is now actually read and stored.
- Agent tool's resolve_agent_model falls back to subagentModel from config
  when no explicit model is passed.

Parallel tool execution:
- Re-export ToolCall/ToolResult/TurnProgressReporter from runtime so the
  CliToolExecutor::execute_batch override type-checks.
- Override execute_batch to classify read-only tools (read_file, glob/grep
  search, WebFetch/WebSearch, LSP, Git*, ToolSearch, Skill, Agent*,
  TeamStatus, Task*) as parallel-safe and run them concurrently via
  std:🧵:scope; everything else stays sequential. Results return in
  original model order.

Team coordination layer (cherry-picked from feat/multi-tool-exec):
- AgentMessage, TaskClaim, TeamStatus tools + shared mailbox directory +
  mode presets (tiny/1x ... mega/6x) + enriched TeamCreate/Agent tool
  descriptions + background team watcher.
- /team slash command: on/off/status/toggle of CLAWD_AGENT_TEAMS (the flag
  TeamCreate requires), replacing the info-only stub. Spec updated to
  [on|off|status].
- resolve_conflicts resolved: de-duplicated SlashCommand::Team/Setup arms
  and ReadOutcome::TeamToggle arms that the cherry-picks overlapped with
  the existing /team parse fix.

Verification:
- cargo build --workspace OK
- cargo test -p tools --lib: 111 passed (1 env failure: repl_executes_python_code)
- cargo test -p runtime --lib team_cron: 17 passed
- cargo test -p commands --lib: 42 passed (incl /team parse regression)
- cargo test -p rusty-claude-cli --bin claw: 345 passed
- scripts/fmt.sh --check OK

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-17 11:48:17 -05:00
..
benches omx(team): auto-checkpoint worker-1 [1] 2026-05-15 10:30:06 +09:00
src feat(team): port subagent_model, parallel tool exec, team coordination layer 2026-06-17 11:48:17 -05:00
tests fix(providers): parse Ollama reasoning fields 2026-06-08 10:08:32 +09:00
Cargo.toml US-011: Performance optimization for API request serialization 2026-04-16 11:11:45 +00:00