subagent-cli 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- subagent_cli-0.1.4/PKG-INFO +186 -0
- subagent_cli-0.1.4/README.md +143 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/config.example.yaml +8 -4
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/docs/ARCHITECTURE.md +2 -0
- subagent_cli-0.1.4/docs/examples/checkpoint.json +14 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/pyproject.toml +1 -1
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/__init__.py +1 -1
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/cli.py +311 -31
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/constants.py +4 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/daemon.py +9 -3
- subagent_cli-0.1.4/src/subagent/launcher_service.py +82 -0
- subagent_cli-0.1.4/src/subagent/paths.py +96 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/prompt_service.py +9 -6
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/runtime_service.py +19 -12
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/turn_service.py +119 -5
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/worker_service.py +18 -11
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/tests/test_acp_backend_integration.py +7 -1
- subagent_cli-0.1.4/tests/test_cli_commands.py +309 -0
- subagent_cli-0.1.2/tests/test_daemon_phase1.py → subagent_cli-0.1.4/tests/test_daemon.py +1 -1
- subagent_cli-0.1.2/tests/test_handoff_phase4.py → subagent_cli-0.1.4/tests/test_handoff_commands.py +1 -1
- subagent_cli-0.1.4/tests/test_paths.py +80 -0
- subagent_cli-0.1.2/tests/test_polish_phase5.py → subagent_cli-0.1.4/tests/test_prompt_and_contracts.py +3 -1
- subagent_cli-0.1.2/tests/test_turn_phase3.py → subagent_cli-0.1.4/tests/test_turn_commands.py +202 -3
- subagent_cli-0.1.2/tests/test_worker_phase2.py → subagent_cli-0.1.4/tests/test_worker_lifecycle.py +1 -1
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/uv.lock +1 -1
- subagent_cli-0.1.2/PKG-INFO +0 -107
- subagent_cli-0.1.2/README.md +0 -64
- subagent_cli-0.1.2/docs/examples/checkpoint.json +0 -14
- subagent_cli-0.1.2/src/subagent/launcher_service.py +0 -30
- subagent_cli-0.1.2/src/subagent/paths.py +0 -63
- subagent_cli-0.1.2/tests/test_cli_phase1.py +0 -120
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/.github/workflows/publish-pypi.yml +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/.gitignore +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/.python-version +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/CONTRIBUTING.md +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/LICENSE +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/docs/examples/handoff.md +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/docs/examples/normalized-event.ndjson +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/docs/examples/worker-continue-flow.md +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/acp_client.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/approval_utils.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/config.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/controller_service.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/errors.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/handoff_service.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/hints.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/input_contract.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/output.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/simple_yaml.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/state.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/src/subagent/worker_runtime.py +0 -0
- {subagent_cli-0.1.2 → subagent_cli-0.1.4}/tests/fixtures/fake_acp_agent.py +0 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: subagent-cli
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: Protocol-agnostic worker orchestration CLI
|
|
5
|
+
Author: niitsuma-t
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 niitsuma-t
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Keywords: acp,agent,automation,cli,orchestration
|
|
29
|
+
Classifier: Development Status :: 3 - Alpha
|
|
30
|
+
Classifier: Environment :: Console
|
|
31
|
+
Classifier: Intended Audience :: Developers
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Operating System :: OS Independent
|
|
34
|
+
Classifier: Programming Language :: Python :: 3
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
38
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
39
|
+
Classifier: Topic :: Utilities
|
|
40
|
+
Requires-Python: >=3.11
|
|
41
|
+
Requires-Dist: typer>=0.24.1
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
# subagent-cli
|
|
45
|
+
|
|
46
|
+
[](https://pypi.org/project/subagent-cli/)
|
|
47
|
+
[](https://pypi.org/project/subagent-cli/)
|
|
48
|
+
[](LICENSE)
|
|
49
|
+
[](https://github.com/otakumesi/subagent-cli/actions/workflows/publish-pypi.yml)
|
|
50
|
+
[](https://pypi.org/project/subagent-cli/)
|
|
51
|
+
|
|
52
|
+
Orchestrate coding agents from another coding agent, cleanly and safely.
|
|
53
|
+
`subagent-cli` turns a manager coding agent (for example Codex or Claude Code) into a practical control plane for starting worker coding agents, sending turns, handling approvals, and continuing handoffs. 🤖
|
|
54
|
+
|
|
55
|
+
The command interface is protocol-agnostic, and the current runtime backend is ACP-based (`acp-stdio`).
|
|
56
|
+
|
|
57
|
+
## Why subagent-cli? 🚀
|
|
58
|
+
- Run multi-agent workflows from one place (`worker start` to `worker continue`).
|
|
59
|
+
- Keep control explicit with strict approval operations and structured event flow.
|
|
60
|
+
- Recover cleanly with runtime restart + session resume (`session/load`).
|
|
61
|
+
- Stay local-first and scriptable with a single CLI surface.
|
|
62
|
+
|
|
63
|
+
## Current Scope 🧭
|
|
64
|
+
- Alpha (`v0.1.x`)
|
|
65
|
+
- Local single-host focused
|
|
66
|
+
- Python 3.11+
|
|
67
|
+
|
|
68
|
+
## Features ✨
|
|
69
|
+
- Worker lifecycle: `start`, `list`, `show`, `inspect`, `stop`
|
|
70
|
+
- Turn operations: `send`, `watch`, `wait`, `approve`, `cancel`
|
|
71
|
+
- Handoff workflow: `worker handoff` and `worker continue`
|
|
72
|
+
- Strict approval flow with structured events
|
|
73
|
+
- ACP runtime integration (`acp-stdio`)
|
|
74
|
+
|
|
75
|
+
## Install 📦
|
|
76
|
+
With `uv` (recommended):
|
|
77
|
+
```bash
|
|
78
|
+
uv tool install subagent-cli
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
From PyPI:
|
|
82
|
+
```bash
|
|
83
|
+
pip install subagent-cli
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
From local artifacts:
|
|
87
|
+
```bash
|
|
88
|
+
pip install dist/subagent_cli-*.whl
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Quick Start ⚡
|
|
92
|
+
1. Bootstrap your local config.
|
|
93
|
+
```bash
|
|
94
|
+
subagent config init --scope user
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
2. Set launcher command/args/env in `~/.config/subagent/config.yaml`.
|
|
98
|
+
|
|
99
|
+
3. Initialize a controller in your workspace (run once per workspace, by you or your manager agent).
|
|
100
|
+
```bash
|
|
101
|
+
subagent controller init --cwd .
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
4. Hand off from here to your manager agent (Codex / Claude Code).
|
|
105
|
+
Ask the manager agent to run `subagent prompt render --target manager` as its first step.
|
|
106
|
+
Use this instruction template:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
Act as the project manager for this repository.
|
|
110
|
+
Use subagent-cli as the control plane and progress this task by delegating to worker agents.
|
|
111
|
+
If worker startup or turn operations fail due to sandbox limits, request approval for out-of-sandbox execution and retry.
|
|
112
|
+
|
|
113
|
+
Required workflow:
|
|
114
|
+
1) First, run `subagent prompt render --target manager` and follow that output.
|
|
115
|
+
2) Check command help before execution (for example `subagent worker --help`, `subagent send --help`, `subagent approve --help`).
|
|
116
|
+
3) Break the task into small executable chunks.
|
|
117
|
+
4) Start/coordinate workers with subagent-cli.
|
|
118
|
+
5) Use `send` as the default turn driver (`send` waits by default).
|
|
119
|
+
6) If `matchedEvent.type` is `approval.requested`, run `approve` and continue with `send`.
|
|
120
|
+
7) Use `watch` only when detailed event streaming/debugging is needed.
|
|
121
|
+
8) Use handoff/continue when context gets large.
|
|
122
|
+
9) Verify results (tests or checks) before reporting completion.
|
|
123
|
+
|
|
124
|
+
Task to execute:
|
|
125
|
+
<your task here>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
After handoff, the manager agent's standard lifecycle is:
|
|
129
|
+
`worker start` -> `send` -> (`approve` -> `send` as needed) -> `handoff` -> `continue`
|
|
130
|
+
|
|
131
|
+
For a single command that sends and waits for terminal-or-approval events:
|
|
132
|
+
```bash
|
|
133
|
+
subagent send --worker <worker-id> --text "<instruction>" --json
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Opt out of waiting when needed:
|
|
137
|
+
```bash
|
|
138
|
+
subagent send --worker <worker-id> --text "<instruction>" --no-wait --json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Manual wait mode (advanced cursor control) still exists:
|
|
142
|
+
```bash
|
|
143
|
+
subagent wait --worker <worker-id> --until turn_end --timeout-seconds 60 --json
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
For local simulation/testing without a real ACP launcher:
|
|
147
|
+
```bash
|
|
148
|
+
subagent worker start --cwd . --debug-mode
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Troubleshooting 🛠️
|
|
152
|
+
- Ensure both the runtime and your manager/worker agent sandbox allow what your launcher needs.
|
|
153
|
+
- Some launchers require outbound network access, but agent sandbox policies can block network even when the host machine itself has connectivity.
|
|
154
|
+
- If state path resolution fails, run commands from inside your workspace root (or set `SUBAGENT_STATE_DIR` explicitly).
|
|
155
|
+
- Preflight launcher availability:
|
|
156
|
+
```bash
|
|
157
|
+
subagent launcher probe <launcher-name> --json
|
|
158
|
+
```
|
|
159
|
+
- If `worker start` fails with `BACKEND_UNAVAILABLE`, inspect runtime logs under `<workspace>/.subagent/state/runtimes/` (default) or `$SUBAGENT_STATE_DIR/runtimes/` (when overridden).
|
|
160
|
+
- For cut-down local testing without backend connectivity:
|
|
161
|
+
```bash
|
|
162
|
+
subagent worker start --cwd . --debug-mode
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Configuration ⚙️
|
|
166
|
+
- Resolution order: `--config` > `SUBAGENT_CONFIG` > nearest `<cwd-or-parent>/.subagent/config.yaml` > `~/.config/subagent/config.yaml`
|
|
167
|
+
- Generate user config: `subagent config init --scope user`
|
|
168
|
+
- Generate project config: `subagent config init --scope project --cwd .`
|
|
169
|
+
- `config init` defaults: `codex` -> `npx -y @zed-industries/codex-acp`, `claude-code` -> `npx -y @zed-industries/claude-agent-acp`
|
|
170
|
+
- Override config path: `SUBAGENT_CONFIG=/path/to/config.yaml`
|
|
171
|
+
- Example config: [config.example.yaml](config.example.yaml)
|
|
172
|
+
- Launchers support either split style (`command: npx`, `args: ["-y", "..."]`) or inline style (`command: "npx -y ..."`) for probe/start/restart.
|
|
173
|
+
|
|
174
|
+
## State 💾
|
|
175
|
+
- Default state DB: `<workspace>/.subagent/state/state.db`
|
|
176
|
+
- Override state dir: `SUBAGENT_STATE_DIR=/path/to/state-dir`
|
|
177
|
+
- If workspace root cannot be detected and no override is set, commands fail with `WORKSPACE_ROOT_NOT_FOUND`
|
|
178
|
+
- Project hint file: `<workspace>/.subagent/controller.json`
|
|
179
|
+
|
|
180
|
+
## Documentation 📚
|
|
181
|
+
- Architecture note: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
|
|
182
|
+
- Examples: [docs/examples](docs/examples)
|
|
183
|
+
- Contributing and release process: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
184
|
+
|
|
185
|
+
## License
|
|
186
|
+
MIT ([LICENSE](LICENSE))
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# subagent-cli
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/subagent-cli/)
|
|
4
|
+
[](https://pypi.org/project/subagent-cli/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/otakumesi/subagent-cli/actions/workflows/publish-pypi.yml)
|
|
7
|
+
[](https://pypi.org/project/subagent-cli/)
|
|
8
|
+
|
|
9
|
+
Orchestrate coding agents from another coding agent, cleanly and safely.
|
|
10
|
+
`subagent-cli` turns a manager coding agent (for example Codex or Claude Code) into a practical control plane for starting worker coding agents, sending turns, handling approvals, and continuing handoffs. 🤖
|
|
11
|
+
|
|
12
|
+
The command interface is protocol-agnostic, and the current runtime backend is ACP-based (`acp-stdio`).
|
|
13
|
+
|
|
14
|
+
## Why subagent-cli? 🚀
|
|
15
|
+
- Run multi-agent workflows from one place (`worker start` to `worker continue`).
|
|
16
|
+
- Keep control explicit with strict approval operations and structured event flow.
|
|
17
|
+
- Recover cleanly with runtime restart + session resume (`session/load`).
|
|
18
|
+
- Stay local-first and scriptable with a single CLI surface.
|
|
19
|
+
|
|
20
|
+
## Current Scope 🧭
|
|
21
|
+
- Alpha (`v0.1.x`)
|
|
22
|
+
- Local single-host focused
|
|
23
|
+
- Python 3.11+
|
|
24
|
+
|
|
25
|
+
## Features ✨
|
|
26
|
+
- Worker lifecycle: `start`, `list`, `show`, `inspect`, `stop`
|
|
27
|
+
- Turn operations: `send`, `watch`, `wait`, `approve`, `cancel`
|
|
28
|
+
- Handoff workflow: `worker handoff` and `worker continue`
|
|
29
|
+
- Strict approval flow with structured events
|
|
30
|
+
- ACP runtime integration (`acp-stdio`)
|
|
31
|
+
|
|
32
|
+
## Install 📦
|
|
33
|
+
With `uv` (recommended):
|
|
34
|
+
```bash
|
|
35
|
+
uv tool install subagent-cli
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
From PyPI:
|
|
39
|
+
```bash
|
|
40
|
+
pip install subagent-cli
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
From local artifacts:
|
|
44
|
+
```bash
|
|
45
|
+
pip install dist/subagent_cli-*.whl
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quick Start ⚡
|
|
49
|
+
1. Bootstrap your local config.
|
|
50
|
+
```bash
|
|
51
|
+
subagent config init --scope user
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
2. Set launcher command/args/env in `~/.config/subagent/config.yaml`.
|
|
55
|
+
|
|
56
|
+
3. Initialize a controller in your workspace (run once per workspace, by you or your manager agent).
|
|
57
|
+
```bash
|
|
58
|
+
subagent controller init --cwd .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
4. Hand off from here to your manager agent (Codex / Claude Code).
|
|
62
|
+
Ask the manager agent to run `subagent prompt render --target manager` as its first step.
|
|
63
|
+
Use this instruction template:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
Act as the project manager for this repository.
|
|
67
|
+
Use subagent-cli as the control plane and progress this task by delegating to worker agents.
|
|
68
|
+
If worker startup or turn operations fail due to sandbox limits, request approval for out-of-sandbox execution and retry.
|
|
69
|
+
|
|
70
|
+
Required workflow:
|
|
71
|
+
1) First, run `subagent prompt render --target manager` and follow that output.
|
|
72
|
+
2) Check command help before execution (for example `subagent worker --help`, `subagent send --help`, `subagent approve --help`).
|
|
73
|
+
3) Break the task into small executable chunks.
|
|
74
|
+
4) Start/coordinate workers with subagent-cli.
|
|
75
|
+
5) Use `send` as the default turn driver (`send` waits by default).
|
|
76
|
+
6) If `matchedEvent.type` is `approval.requested`, run `approve` and continue with `send`.
|
|
77
|
+
7) Use `watch` only when detailed event streaming/debugging is needed.
|
|
78
|
+
8) Use handoff/continue when context gets large.
|
|
79
|
+
9) Verify results (tests or checks) before reporting completion.
|
|
80
|
+
|
|
81
|
+
Task to execute:
|
|
82
|
+
<your task here>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
After handoff, the manager agent's standard lifecycle is:
|
|
86
|
+
`worker start` -> `send` -> (`approve` -> `send` as needed) -> `handoff` -> `continue`
|
|
87
|
+
|
|
88
|
+
For a single command that sends and waits for terminal-or-approval events:
|
|
89
|
+
```bash
|
|
90
|
+
subagent send --worker <worker-id> --text "<instruction>" --json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Opt out of waiting when needed:
|
|
94
|
+
```bash
|
|
95
|
+
subagent send --worker <worker-id> --text "<instruction>" --no-wait --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Manual wait mode (advanced cursor control) still exists:
|
|
99
|
+
```bash
|
|
100
|
+
subagent wait --worker <worker-id> --until turn_end --timeout-seconds 60 --json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
For local simulation/testing without a real ACP launcher:
|
|
104
|
+
```bash
|
|
105
|
+
subagent worker start --cwd . --debug-mode
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Troubleshooting 🛠️
|
|
109
|
+
- Ensure both the runtime and your manager/worker agent sandbox allow what your launcher needs.
|
|
110
|
+
- Some launchers require outbound network access, but agent sandbox policies can block network even when the host machine itself has connectivity.
|
|
111
|
+
- If state path resolution fails, run commands from inside your workspace root (or set `SUBAGENT_STATE_DIR` explicitly).
|
|
112
|
+
- Preflight launcher availability:
|
|
113
|
+
```bash
|
|
114
|
+
subagent launcher probe <launcher-name> --json
|
|
115
|
+
```
|
|
116
|
+
- If `worker start` fails with `BACKEND_UNAVAILABLE`, inspect runtime logs under `<workspace>/.subagent/state/runtimes/` (default) or `$SUBAGENT_STATE_DIR/runtimes/` (when overridden).
|
|
117
|
+
- For cut-down local testing without backend connectivity:
|
|
118
|
+
```bash
|
|
119
|
+
subagent worker start --cwd . --debug-mode
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Configuration ⚙️
|
|
123
|
+
- Resolution order: `--config` > `SUBAGENT_CONFIG` > nearest `<cwd-or-parent>/.subagent/config.yaml` > `~/.config/subagent/config.yaml`
|
|
124
|
+
- Generate user config: `subagent config init --scope user`
|
|
125
|
+
- Generate project config: `subagent config init --scope project --cwd .`
|
|
126
|
+
- `config init` defaults: `codex` -> `npx -y @zed-industries/codex-acp`, `claude-code` -> `npx -y @zed-industries/claude-agent-acp`
|
|
127
|
+
- Override config path: `SUBAGENT_CONFIG=/path/to/config.yaml`
|
|
128
|
+
- Example config: [config.example.yaml](config.example.yaml)
|
|
129
|
+
- Launchers support either split style (`command: npx`, `args: ["-y", "..."]`) or inline style (`command: "npx -y ..."`) for probe/start/restart.
|
|
130
|
+
|
|
131
|
+
## State 💾
|
|
132
|
+
- Default state DB: `<workspace>/.subagent/state/state.db`
|
|
133
|
+
- Override state dir: `SUBAGENT_STATE_DIR=/path/to/state-dir`
|
|
134
|
+
- If workspace root cannot be detected and no override is set, commands fail with `WORKSPACE_ROOT_NOT_FOUND`
|
|
135
|
+
- Project hint file: `<workspace>/.subagent/controller.json`
|
|
136
|
+
|
|
137
|
+
## Documentation 📚
|
|
138
|
+
- Architecture note: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
|
|
139
|
+
- Examples: [docs/examples](docs/examples)
|
|
140
|
+
- Contributing and release process: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
141
|
+
|
|
142
|
+
## License
|
|
143
|
+
MIT ([LICENSE](LICENSE))
|
|
@@ -2,15 +2,19 @@ launchers:
|
|
|
2
2
|
codex:
|
|
3
3
|
backend:
|
|
4
4
|
kind: acp-stdio
|
|
5
|
-
command:
|
|
6
|
-
args:
|
|
5
|
+
command: npx
|
|
6
|
+
args:
|
|
7
|
+
- -y
|
|
8
|
+
- "@zed-industries/codex-acp"
|
|
7
9
|
env: {}
|
|
8
10
|
|
|
9
11
|
claude-code:
|
|
10
12
|
backend:
|
|
11
13
|
kind: acp-stdio
|
|
12
|
-
command:
|
|
13
|
-
args:
|
|
14
|
+
command: npx
|
|
15
|
+
args:
|
|
16
|
+
- -y
|
|
17
|
+
- "@zed-industries/claude-agent-acp"
|
|
14
18
|
env: {}
|
|
15
19
|
|
|
16
20
|
profiles:
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
- handoff store with `handoff.md` + `checkpoint.json`
|
|
26
26
|
- `--input` JSON contract (major commands) with duplicate-field rejection
|
|
27
27
|
- owner handle model: `controllerId + epoch + token`
|
|
28
|
+
- workspace-scoped runtime state by default: `<workspace-root>/.subagent/state` (or `SUBAGENT_STATE_DIR` override)
|
|
28
29
|
- project-local hint: `<workspace>/.subagent/controller.json`
|
|
29
30
|
- versioned envelope for JSON responses
|
|
30
31
|
|
|
@@ -32,3 +33,4 @@
|
|
|
32
33
|
- local single-host control plane only (`subagentd` is minimal bootstrap/status)
|
|
33
34
|
- no queued turn execution; `send` is rejected while worker is busy
|
|
34
35
|
- resume strategy is handoff-first (no bit-perfect backend session resurrection)
|
|
36
|
+
- commands that need implicit state path fail with `WORKSPACE_ROOT_NOT_FOUND` when workspace root cannot be inferred
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "v1",
|
|
3
|
+
"workerId": "w_123",
|
|
4
|
+
"controllerId": "ctl_abc123",
|
|
5
|
+
"launcher": "codex",
|
|
6
|
+
"profile": "worker-default",
|
|
7
|
+
"packs": ["repo-conventions"],
|
|
8
|
+
"cwd": "/path/to/workspace",
|
|
9
|
+
"state": "handoff_ready",
|
|
10
|
+
"sourceTurnId": "turn_07",
|
|
11
|
+
"handoffPath": "/path/to/workspace/.subagent/state/handoffs/w_123/hs_abc123/handoff.md",
|
|
12
|
+
"artifacts": ["/path/to/workspace/.subagent/state/handoffs/w_123/hs_abc123/handoff.md"],
|
|
13
|
+
"filesChanged": []
|
|
14
|
+
}
|