Commit 875cd09
committed
feat(daemon-subject): in-tree task + requirements adapters under animus subject
Adds in-process SubjectBackend adapters that mount the existing in-tree
task and requirements services under the unified `animus subject --kind
<kind>` surface alongside externally-installed subject_backend plugins.
In-tree adapters:
- InTreeTaskSubjectBackend registers under kind=task
- InTreeRequirementsSubjectBackend registers under kind=requirement
- Both wrap the existing TaskProvider / RequirementsProvider unchanged;
only the wire-protocol surface moves. Both adapter loops speak the
same JSON-RPC frame protocol the PluginHost already understands, run
as tokio tasks over duplex pipes, and register with the SubjectRouter
the same way external plugin processes do
- Wire id convention: task:TASK-NNNN / requirement:REQ-NNNN; the
adapter strips/re-adds the kind prefix at the boundary so the in-tree
services keep using bare IDs
- External plugins claiming the same kind displace the in-tree adapter
(SubjectRouter rejects duplicates; we filter the in-tree side before
router build so external wins cleanly with an operator-facing warning)
- ANIMUS_DAEMON_DISABLE_BUILTIN_TASK_ADAPTER=1 and
ANIMUS_DAEMON_DISABLE_BUILTIN_REQUIREMENTS_ADAPTER=1 opt-out per adapter
New CLI verbs on the subject surface:
- animus subject next --kind <kind> (highest-priority Ready)
- animus subject status --kind <kind> --id <id> --status <s>
Docs:
- docs/reference/cli/index.md adds the `subject` command tree
- docs/reference/mcp-tools.md notes the unified subject surface
- CLAUDE.md describes the in-tree adapter and the env opt-outs
Deferred to a follow-up commit (NOT in this commit, per scope-safety
call): wholesale deletion of the legacy `animus task`, `animus
requirements`, and `ao_task_*` / `ao_requirements_*` MCP tool surfaces.
The legacy CLI and MCP surfaces remain available alongside the subject
surface; both read and write the same `~/.animus/<repo-scope>/` state,
which was verified end-to-end against a temp project root (create via
subject CLI → list via legacy task CLI shows the same task; status set
via subject CLI → next via subject CLI returns the just-readied task).
The deferral keeps this commit minimal-risk: ~3000 LOC of CLI/MCP
deletions plus their cross-crate references warrant their own commit
with isolated verification.
Tests added (9 in this commit):
- subject_dispatch::in_tree_task_adapter_mounts_by_default
- subject_dispatch::disable_builtin_task_env_unmounts_only_task
- subject_dispatch::discovers_zero_subject_plugins_router_is_empty
(updated to disable in-tree adapters so it observes the truly-empty
case; in-tree adapters are now on-by-default)
- inproc_subject_backend::strip_and_add_kind_prefix_round_trip
- inproc_subject_backend::parse_priority_canonicalizes_aliases
- inproc_subject_backend::adapter_opts_default_enables_both
- inproc_subject_backend::disable_env_overrides_default
- inproc_subject_backend::force_disable_overrides_env
Test results: orchestrator-daemon-runtime 99/99 pass;
orchestrator-core 222/222 pass; orchestrator-cli 390/391 pass (1
pre-existing failure in ops_plugin TOFU test, unrelated). Smoke tests
verified against a temp project root for both kinds across all six
subject verbs (list/get/create/update/next/status).1 parent 9dadb97 commit 875cd09
10 files changed
Lines changed: 1089 additions & 12 deletions
File tree
- crates
- orchestrator-cli/src
- cli_types
- services/operations
- orchestrator-daemon-runtime
- src
- docs/reference
- cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
159 | 177 | | |
160 | 178 | | |
161 | 179 | | |
| |||
214 | 232 | | |
215 | 233 | | |
216 | 234 | | |
217 | | - | |
| 235 | + | |
| 236 | + | |
218 | 237 | | |
219 | 238 | | |
220 | 239 | | |
| |||
224 | 243 | | |
225 | 244 | | |
226 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
227 | 254 | | |
228 | 255 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
99 | 123 | | |
100 | 124 | | |
101 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
0 commit comments