harness-tools + app: task tool, subagent spawner, board wiring (M4)

The `task` tool delegates to a SubagentSpawner (owned by the composition root):
resolves the agent, enforces the depth limit, applies permission intersection,
filters tools per-agent, and runs the child session foreground or background.
Foreground returns the child's final text; background registers on the job board
and detaches under the parent run token. The run loop injects the board into
primary-agent requests and reconciles terminal jobs each step.

Integration tests cover foreground run + alias reuse continuing the same child
session, depth-limit and unknown-agent rejection, and board prompt injection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-09 06:29:12 +02:00
co-authored by Claude Opus 4.8
parent 8c859d91c9
commit ecb3267a50
18 changed files with 1137 additions and 67 deletions
Generated
+2
View File
@@ -669,7 +669,9 @@ dependencies = [
name = "harness-app"
version = "0.1.0"
dependencies = [
"async-trait",
"dirs",
"futures",
"harness-core",
"harness-lsp",
"harness-mcp",