agentpool-cli 0.1.11__tar.gz → 0.1.12__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.
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/CHANGELOG.md +12 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/PKG-INFO +22 -8
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/README.md +21 -7
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/architecture.md +2 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/install.md +6 -5
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/mcp-tools.md +5 -4
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/model-catalog.md +1 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/provider-adapters.md +8 -2
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/quickstart.md +2 -2
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/usage-detection.md +3 -2
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/pyproject.toml +1 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/server.json +2 -2
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/__init__.py +1 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/artifacts.py +1 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/cli.py +20 -4
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/config.py +22 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/mcp/tools.py +14 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/mcp_server.py +139 -15
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/models.py +22 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/onboarding.py +53 -2
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/provider_model_catalog.json +4 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/providers/base.py +22 -3
- agentpool_cli-0.1.12/src/agentpool/runtimes/__init__.py +4 -0
- agentpool_cli-0.1.12/src/agentpool/runtimes/base.py +45 -0
- agentpool_cli-0.1.12/src/agentpool/runtimes/terminal_control.py +252 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/runtimes/tmux.py +13 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/session_manager.py +295 -66
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/stats/compute.py +2 -2
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/copilot.py +0 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/fixtures/stats_seed.py +1 -1
- agentpool_cli-0.1.12/tests/integration/test_fake_terminal_control_flow.py +59 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_mcp_surface.py +9 -1
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_mcp_tools.py +6 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_models_config_store.py +181 -2
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_onboarding.py +1 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_stats_mcp.py +0 -1
- agentpool_cli-0.1.12/tests/unit/test_terminal_control_runtime.py +72 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/uv.lock +1 -1
- agentpool_cli-0.1.11/src/agentpool/runtimes/__init__.py +0 -3
- agentpool_cli-0.1.11/src/agentpool/runtimes/base.py +0 -36
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.cursor/mcp.json.example +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.github/CODEOWNERS +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.github/ISSUE_TEMPLATE/provider_probe.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.github/dependabot.yml +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.github/workflows/ci.yml +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.github/workflows/release.yml +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.gitignore +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/.mcp.json.example +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/AGENTS.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/CONTRIBUTING.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/LICENSE +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/SECURITY.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/agent-cli-and-mcp.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/agentpool-skill.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/examples/README.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/examples.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/mcp-clients.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/onboarding.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/provider-lifecycle-matrix.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/release.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/security.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/setup-claude-code.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/setup-codex.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/setup-copilot.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/setup-cursor-cli.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/setup-cursor.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/setup-devin.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/setup-droid.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/stats.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/docs/usage-probe-matrix.md +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/scripts/install.sh +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/__main__.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/agent_io.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/event_detection.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/__init__.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/__init__.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/fake_approval_agent.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/fake_common.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/fake_completed_agent.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/fake_idle_agent.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/fake_limit_agent.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/fake_patch_agent.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/fixtures/fake_agents/fake_question_agent.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/git_worktree.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/mcp/__init__.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/mcp/resources.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/policy.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/preferences.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/providers/__init__.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/providers/registry.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/redaction.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/stats/__init__.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/stats/card.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/stats/queries.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/stats/render.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/stats/window.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/store.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/__init__.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/_common.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/ccusage.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/claude.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/codex.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/codexbar.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/combine.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/devin.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/parsers.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/probes.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/provider_parsers.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/usage/summary.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/src/agentpool/utils.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/fixtures/provider_model_catalog_golden.json +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/fixtures/usage/claude_usage.txt +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/fixtures/usage/codex_rate_limits.json +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/fixtures/usage/copilot_user.json +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/fixtures/usage/devin_plan_status.json +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/integration/test_fake_tmux_flow.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_agent_io.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_cli.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_event_policy.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_redaction.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_stats_cli.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_stats_window.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_subprocess_safety.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_usage_probes.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_usage_provider_parsers.py +0 -0
- {agentpool_cli-0.1.11 → agentpool_cli-0.1.12}/tests/unit/test_usage_summary_enrichment.py +0 -0
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.1.12 - 2026-06-06
|
|
6
|
+
|
|
7
|
+
- Add optional Terminal Control runtime support while keeping tmux as the
|
|
8
|
+
default worker runtime.
|
|
9
|
+
- Fix Claude Code steering submission by using provider-specific submit keys
|
|
10
|
+
for both initial prompts and live `send_worker_message` calls.
|
|
11
|
+
- Restore MCP capacity/cache compatibility aliases, add searchable MCP tool
|
|
12
|
+
descriptions and annotations, and make Cursor Agent CLI detection robust when
|
|
13
|
+
MCP hosts launch AgentPool with a minimal `PATH`.
|
|
14
|
+
- Add real-provider and fake-provider coverage for tmux and Terminal Control,
|
|
15
|
+
plus focused regression coverage for MCP aliases and provider binary lookup.
|
|
16
|
+
|
|
5
17
|
## 0.1.11 - 2026-06-05
|
|
6
18
|
|
|
7
19
|
- Refresh provider model catalogs from current Claude Code, Codex, Cursor,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentpool-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.12
|
|
4
4
|
Summary: Make full use of every coding-agent subscription you pay for: a local CLI + MCP server that surfaces live usage limits and offloads work to providers with headroom.
|
|
5
5
|
Author: AgentPool contributors
|
|
6
6
|
License-Expression: MIT
|
|
@@ -40,7 +40,7 @@ informed, never automatic.
|
|
|
40
40
|
|
|
41
41
|
The v0.1 alpha posture is conservative:
|
|
42
42
|
|
|
43
|
-
- tmux is the
|
|
43
|
+
- tmux is the default runtime; Terminal Control is optional when configured.
|
|
44
44
|
- Provider selection is explicit; `provider=auto` is rejected.
|
|
45
45
|
- Usage/capacity summaries are confidence-tagged and keyed by provider id.
|
|
46
46
|
- CodexBar and ccusage are optional usage helpers when installed or configured.
|
|
@@ -51,8 +51,10 @@ The v0.1 alpha posture is conservative:
|
|
|
51
51
|
|
|
52
52
|
- Python 3.11 or newer.
|
|
53
53
|
- tmux on `PATH`.
|
|
54
|
+
- Optional: `termctrl` on `PATH` for the Terminal Control runtime.
|
|
54
55
|
- Git for worktree isolation and diff collection.
|
|
55
|
-
- macOS or Linux. Windows is not a v0.1 target except through
|
|
56
|
+
- macOS or Linux for live runtimes. Windows is not a v0.1 target except through
|
|
57
|
+
WSL-like shells.
|
|
56
58
|
|
|
57
59
|
## Install
|
|
58
60
|
|
|
@@ -72,9 +74,21 @@ agentpool setup codex
|
|
|
72
74
|
agentpool doctor --deep --privacy
|
|
73
75
|
```
|
|
74
76
|
|
|
75
|
-
The `agentpool-cli` package installs on macOS, Linux, and Windows, but
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
The `agentpool-cli` package installs on macOS, Linux, and Windows, but live
|
|
78
|
+
terminal runtimes are supported on macOS or Linux (Windows via WSL).
|
|
79
|
+
|
|
80
|
+
Optional Terminal Control config:
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
runtime:
|
|
84
|
+
default: tmux
|
|
85
|
+
terminal_control:
|
|
86
|
+
enabled: true
|
|
87
|
+
binary: termctrl
|
|
88
|
+
session_prefix: agentpool
|
|
89
|
+
cols: 120
|
|
90
|
+
rows: 36
|
|
91
|
+
```
|
|
78
92
|
|
|
79
93
|
Install from source:
|
|
80
94
|
|
|
@@ -185,8 +199,8 @@ agentpool usage-summary --refresh --backend ccusage --provider claude-code --jso
|
|
|
185
199
|
ordered and it is not a recommendation list. Each row includes `usable`,
|
|
186
200
|
`unusable_reason`, quota windows, confidence, age/staleness, and reset timing when
|
|
187
201
|
the provider exposes it. The older CLI `capacity-summary` command is retained
|
|
188
|
-
as a human convenience alias;
|
|
189
|
-
|
|
202
|
+
as a human convenience alias; MCP also exposes `get_capacity_summary` as a
|
|
203
|
+
compatibility alias for `get_usage_summary`.
|
|
190
204
|
|
|
191
205
|
The default buffer is `policy.min_remaining_percent = 10`. If any reported
|
|
192
206
|
quota window is below that buffer, the provider row is marked unusable for the
|
|
@@ -19,7 +19,7 @@ informed, never automatic.
|
|
|
19
19
|
|
|
20
20
|
The v0.1 alpha posture is conservative:
|
|
21
21
|
|
|
22
|
-
- tmux is the
|
|
22
|
+
- tmux is the default runtime; Terminal Control is optional when configured.
|
|
23
23
|
- Provider selection is explicit; `provider=auto` is rejected.
|
|
24
24
|
- Usage/capacity summaries are confidence-tagged and keyed by provider id.
|
|
25
25
|
- CodexBar and ccusage are optional usage helpers when installed or configured.
|
|
@@ -30,8 +30,10 @@ The v0.1 alpha posture is conservative:
|
|
|
30
30
|
|
|
31
31
|
- Python 3.11 or newer.
|
|
32
32
|
- tmux on `PATH`.
|
|
33
|
+
- Optional: `termctrl` on `PATH` for the Terminal Control runtime.
|
|
33
34
|
- Git for worktree isolation and diff collection.
|
|
34
|
-
- macOS or Linux. Windows is not a v0.1 target except through
|
|
35
|
+
- macOS or Linux for live runtimes. Windows is not a v0.1 target except through
|
|
36
|
+
WSL-like shells.
|
|
35
37
|
|
|
36
38
|
## Install
|
|
37
39
|
|
|
@@ -51,9 +53,21 @@ agentpool setup codex
|
|
|
51
53
|
agentpool doctor --deep --privacy
|
|
52
54
|
```
|
|
53
55
|
|
|
54
|
-
The `agentpool-cli` package installs on macOS, Linux, and Windows, but
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
The `agentpool-cli` package installs on macOS, Linux, and Windows, but live
|
|
57
|
+
terminal runtimes are supported on macOS or Linux (Windows via WSL).
|
|
58
|
+
|
|
59
|
+
Optional Terminal Control config:
|
|
60
|
+
|
|
61
|
+
```yaml
|
|
62
|
+
runtime:
|
|
63
|
+
default: tmux
|
|
64
|
+
terminal_control:
|
|
65
|
+
enabled: true
|
|
66
|
+
binary: termctrl
|
|
67
|
+
session_prefix: agentpool
|
|
68
|
+
cols: 120
|
|
69
|
+
rows: 36
|
|
70
|
+
```
|
|
57
71
|
|
|
58
72
|
Install from source:
|
|
59
73
|
|
|
@@ -164,8 +178,8 @@ agentpool usage-summary --refresh --backend ccusage --provider claude-code --jso
|
|
|
164
178
|
ordered and it is not a recommendation list. Each row includes `usable`,
|
|
165
179
|
`unusable_reason`, quota windows, confidence, age/staleness, and reset timing when
|
|
166
180
|
the provider exposes it. The older CLI `capacity-summary` command is retained
|
|
167
|
-
as a human convenience alias;
|
|
168
|
-
|
|
181
|
+
as a human convenience alias; MCP also exposes `get_capacity_summary` as a
|
|
182
|
+
compatibility alias for `get_usage_summary`.
|
|
169
183
|
|
|
170
184
|
The default buffer is `policy.min_remaining_percent = 10`. If any reported
|
|
171
185
|
quota window is below that buffer, the provider row is marked unusable for the
|
|
@@ -15,7 +15,8 @@ Core modules:
|
|
|
15
15
|
- `models.py`: Pydantic response and persistence models.
|
|
16
16
|
- `config.py`: `~/.agentpool/config.yaml` loader and defaults.
|
|
17
17
|
- `providers/`: conservative CLI detection and launch templates.
|
|
18
|
-
- `runtimes/tmux.py`:
|
|
18
|
+
- `runtimes/tmux.py`: default worker runtime.
|
|
19
|
+
- `runtimes/terminal_control.py`: optional named-session Terminal Control runtime.
|
|
19
20
|
- `store.py`: SQLite sessions, events, usage snapshots, artifacts, and leases.
|
|
20
21
|
- `session_manager.py`: policy enforcement and worker lifecycle orchestration.
|
|
21
22
|
- `mcp_server.py`: MCP tools and resources.
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# Install AgentPool
|
|
2
2
|
|
|
3
3
|
AgentPool is a local CLI and MCP server. Install it on the same machine where
|
|
4
|
-
your coding-agent CLIs are logged in and where
|
|
4
|
+
your coding-agent CLIs are logged in and where your selected runtime is
|
|
5
|
+
available.
|
|
5
6
|
|
|
6
7
|
## Requirements
|
|
7
8
|
|
|
8
9
|
- Python 3.11 or newer.
|
|
9
|
-
- `tmux` on `PATH
|
|
10
|
+
- `tmux` on `PATH` for the default runtime.
|
|
11
|
+
- Optional: `termctrl` on `PATH` for the Terminal Control runtime.
|
|
10
12
|
- Git on `PATH`.
|
|
11
|
-
- macOS or Linux for
|
|
12
|
-
Windows too, but
|
|
13
|
-
through WSL.
|
|
13
|
+
- macOS or Linux for live runtimes. The `agentpool-cli` package installs on
|
|
14
|
+
Windows too, but terminal runtimes are supported only through WSL.
|
|
14
15
|
|
|
15
16
|
## Install From PyPI
|
|
16
17
|
|
|
@@ -32,7 +32,9 @@ The default toolset is the smallest worker lifecycle surface:
|
|
|
32
32
|
|
|
33
33
|
- `get_inventory`
|
|
34
34
|
- `get_usage_summary`
|
|
35
|
+
- `get_capacity_summary`
|
|
35
36
|
- `get_usage_snapshot`
|
|
37
|
+
- `get_cached_usage_snapshot`
|
|
36
38
|
- `get_provider_models`
|
|
37
39
|
- `get_delegation_preferences`
|
|
38
40
|
- `spawn_worker`
|
|
@@ -44,11 +46,10 @@ The default toolset is the smallest worker lifecycle surface:
|
|
|
44
46
|
- `read_worker_transcript`
|
|
45
47
|
- `terminate_worker`
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
Compatibility aliases:
|
|
48
50
|
|
|
49
|
-
- `
|
|
50
|
-
- `
|
|
51
|
-
- `get_cached_usage_snapshot`
|
|
51
|
+
- `get_capacity_summary`: alias for `get_usage_summary`
|
|
52
|
+
- `get_cached_usage_snapshot`: alias for `get_usage_snapshot(refresh=false)`
|
|
52
53
|
|
|
53
54
|
Use `get_usage_summary(refresh=false)` for the compact provider-capacity view.
|
|
54
55
|
Use `get_usage_snapshot(refresh=false)` only when you need raw snapshots; cached
|
|
@@ -23,7 +23,7 @@ Each provider entry can describe:
|
|
|
23
23
|
- `model_selection`: non-flag pinning mode, such as Droid runtime settings.
|
|
24
24
|
- `reasoning_effort_arg`: the CLI flag used by providers with native effort
|
|
25
25
|
selection, such as Claude Code `--effort` or Droid `--reasoning-effort`.
|
|
26
|
-
- `submit_keys`:
|
|
26
|
+
- `submit_keys`: runtime keys needed for interactive submit quirks.
|
|
27
27
|
- `quirks`: operator-facing notes for harness behavior.
|
|
28
28
|
|
|
29
29
|
## Override
|
|
@@ -8,7 +8,8 @@ Default real-provider behavior is intentionally limited:
|
|
|
8
8
|
- Probe version with a short timeout.
|
|
9
9
|
- Report auth as `unknown` unless a safe probe exists.
|
|
10
10
|
- Report usage as `unknown` unless a safe explicit probe exists.
|
|
11
|
-
- Launch through
|
|
11
|
+
- Launch through the selected runtime using the provider's normal CLI command;
|
|
12
|
+
tmux is the default runtime and Terminal Control is optional.
|
|
12
13
|
- Pin a requested model only when the provider exposes a safe process-local
|
|
13
14
|
mechanism for it.
|
|
14
15
|
|
|
@@ -50,12 +51,17 @@ Model pinning behavior:
|
|
|
50
51
|
`--reasoning-effort`, which AgentPool forwards when requested.
|
|
51
52
|
- AgentPool does not edit or persist provider credentials or user defaults.
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
Runtime submit behavior:
|
|
54
55
|
|
|
55
56
|
- Most providers submit pasted text with terminal Enter.
|
|
56
57
|
- `codex-cli` submits with `C-m` in tmux.
|
|
58
|
+
- `claude-code` receives an explicit `Enter` after pasted steering so
|
|
59
|
+
multi-line messages ending in a newline are submitted instead of left in the
|
|
60
|
+
composer.
|
|
57
61
|
- Short menu selections such as startup trust or update prompts still use normal
|
|
58
62
|
Enter so they do not go through provider composer shortcuts.
|
|
63
|
+
- Terminal Control maps the same submit keys onto its named key vocabulary, for
|
|
64
|
+
example `C-m` to `enter` and `C-c` to `ctrl-c`.
|
|
59
65
|
|
|
60
66
|
Fake providers under `src/agentpool/fixtures/fake_agents/` are the executable contract for v0.1.
|
|
61
67
|
They are packaged with AgentPool so `agentpool smoke --provider fake-question`
|
|
@@ -20,8 +20,8 @@ agentpool init
|
|
|
20
20
|
agentpool doctor --deep --privacy
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
`doctor` confirms
|
|
24
|
-
provider's install/auth state.
|
|
23
|
+
`doctor` confirms runtime availability, SQLite, and the artifact root, and lists
|
|
24
|
+
each provider's install/auth state.
|
|
25
25
|
|
|
26
26
|
## 2. Smoke test without a real provider
|
|
27
27
|
|
|
@@ -7,8 +7,9 @@ Allowed confidence values include `official`, `local_cli`, `local_config`, `prov
|
|
|
7
7
|
Live probes are only run by explicit usage requests. Inventory remains non-invasive and reports whether a provider supports an explicit usage probe. Successful explicit probes are persisted to SQLite; `agentpool usage --cached`, `get_usage_summary(refresh=false)`, and `get_usage_snapshot(refresh=false)` read the latest persisted snapshots without refreshing providers. MCP refreshes do not run interactive provider TUI probes, because those can interfere with the host agent that is calling AgentPool. CLI callers can use `--no-interactive` on `usage` / `usage-summary`, or set `AGENTPOOL_NO_INTERACTIVE_USAGE=1`, to take the same headless posture. MCP refreshes are also bounded by a short server-side budget; if a provider is slow, AgentPool returns a partial response with an unknown row instead of holding the MCP connection open.
|
|
8
8
|
|
|
9
9
|
`agentpool usage-summary` returns a `providers` map keyed by provider id. The
|
|
10
|
-
CLI `capacity-summary` command
|
|
11
|
-
|
|
10
|
+
CLI `capacity-summary` command and MCP `get_capacity_summary` tool are
|
|
11
|
+
compatibility aliases for `usage-summary` / `get_usage_summary`. Each row
|
|
12
|
+
includes `usable`, `unusable_reason`, `stale`, and
|
|
12
13
|
`age_seconds`. `stale` is informational age metadata only; it does not by
|
|
13
14
|
itself make a provider unusable. `usable` is derived from install/auth status,
|
|
14
15
|
provider usage status, confidence, and reported quota windows. The default
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agentpool-cli"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.12"
|
|
8
8
|
description = "Make full use of every coding-agent subscription you pay for: a local CLI + MCP server that surfaces live usage limits and offloads work to providers with headroom."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.sidduHERE/agentpool",
|
|
4
4
|
"title": "AgentPool",
|
|
5
5
|
"description": "See each coding-agent subscription's live limits and offload work to one with headroom.",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.12",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/sidduHERE/agentpool",
|
|
9
9
|
"source": "github"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "pypi",
|
|
15
15
|
"identifier": "agentpool-cli",
|
|
16
|
-
"version": "0.1.
|
|
16
|
+
"version": "0.1.12",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
19
19
|
},
|
|
@@ -13,6 +13,7 @@ from agentpool.utils import repo_hash, sha256_file, write_json
|
|
|
13
13
|
def create_artifact_dir(root: Path, repo_path: Path, session_id: str) -> Path:
|
|
14
14
|
artifact_dir = root / repo_hash(repo_path) / session_id
|
|
15
15
|
(artifact_dir / "raw" / "tmux-captures").mkdir(parents=True, exist_ok=True)
|
|
16
|
+
(artifact_dir / "raw" / "terminal-control").mkdir(parents=True, exist_ok=True)
|
|
16
17
|
return artifact_dir
|
|
17
18
|
|
|
18
19
|
|
|
@@ -566,6 +566,8 @@ def _next_command_for_error(exc: ToolError) -> str | None:
|
|
|
566
566
|
return "agentpool spawn --provider <provider-id> --repo <git-repo-path> --task-stdin --isolation read_only"
|
|
567
567
|
if code == "TMUX_NOT_FOUND":
|
|
568
568
|
return "brew install tmux"
|
|
569
|
+
if code == "TERMINAL_CONTROL_NOT_FOUND":
|
|
570
|
+
return "install termctrl, then run agentpool doctor --deep --json"
|
|
569
571
|
if code == "INVALID_WINDOW":
|
|
570
572
|
return "agentpool stats --since 7d --json"
|
|
571
573
|
if code == "INVALID_TRANSCRIPT_RANGE":
|
|
@@ -580,7 +582,7 @@ def _next_command_for_error(exc: ToolError) -> str | None:
|
|
|
580
582
|
@app.command()
|
|
581
583
|
def doctor(
|
|
582
584
|
json_output: Annotated[bool, typer.Option("--json", help="Emit JSON.")] = False,
|
|
583
|
-
deep: Annotated[bool, typer.Option("--deep", help="Run
|
|
585
|
+
deep: Annotated[bool, typer.Option("--deep", help="Run runtime/sqlite/artifact/cache checks.")] = False,
|
|
584
586
|
privacy: Annotated[
|
|
585
587
|
bool,
|
|
586
588
|
typer.Option("--privacy", help="Show local storage and usage-probe privacy posture."),
|
|
@@ -594,9 +596,15 @@ def doctor(
|
|
|
594
596
|
"""
|
|
595
597
|
mgr = manager()
|
|
596
598
|
tmux_path = shutil.which("tmux")
|
|
599
|
+
termctrl_path = shutil.which(mgr.config.runtime.terminal_control.binary)
|
|
597
600
|
inventory = mgr.inventory(include_usage=True)
|
|
598
601
|
data = {
|
|
599
602
|
"tmux": {"installed": bool(tmux_path), "path": tmux_path},
|
|
603
|
+
"terminal_control": {
|
|
604
|
+
"enabled": mgr.config.runtime.terminal_control.enabled,
|
|
605
|
+
"installed": bool(termctrl_path),
|
|
606
|
+
"path": termctrl_path,
|
|
607
|
+
},
|
|
600
608
|
"config_path": str(DEFAULT_CONFIG_PATH),
|
|
601
609
|
"db_path": str(mgr.config.storage.db),
|
|
602
610
|
"artifact_root": str(mgr.config.storage.artifacts),
|
|
@@ -618,6 +626,7 @@ def doctor(
|
|
|
618
626
|
provider["usage"]["status"] if provider.get("usage") else "unknown",
|
|
619
627
|
)
|
|
620
628
|
console.print(f"tmux: {tmux_path or 'missing'}")
|
|
629
|
+
console.print(f"terminal-control: {termctrl_path or 'missing'}")
|
|
621
630
|
if deep:
|
|
622
631
|
deep_data = data["deep"]
|
|
623
632
|
console.print(f"deep checks: {'ok' if deep_data['ok'] else 'failed'}")
|
|
@@ -1513,6 +1522,7 @@ def _print_status_payload(data: dict[str, Any]) -> None:
|
|
|
1513
1522
|
"current_state",
|
|
1514
1523
|
"dry_run",
|
|
1515
1524
|
"would_interrupt",
|
|
1525
|
+
"would_terminate_runtime",
|
|
1516
1526
|
"would_terminate_tmux",
|
|
1517
1527
|
"already_terminated",
|
|
1518
1528
|
"released",
|
|
@@ -1610,7 +1620,10 @@ def spawn(
|
|
|
1610
1620
|
str,
|
|
1611
1621
|
typer.Option("--role", help="Worker role: explorer, reviewer, implementer, tester, or custom."),
|
|
1612
1622
|
] = "explorer",
|
|
1613
|
-
runtime: Annotated[
|
|
1623
|
+
runtime: Annotated[
|
|
1624
|
+
str | None,
|
|
1625
|
+
typer.Option("--runtime", help="Runtime override: tmux or terminal-control. Defaults to config."),
|
|
1626
|
+
] = None,
|
|
1614
1627
|
isolation: Annotated[
|
|
1615
1628
|
str,
|
|
1616
1629
|
typer.Option(
|
|
@@ -1741,7 +1754,7 @@ def observe(
|
|
|
1741
1754
|
wait_for: Annotated[str | None, typer.Option("--wait-for", help="Comma-separated events.")] = None,
|
|
1742
1755
|
timeout: Annotated[int, typer.Option("--timeout")] = 0,
|
|
1743
1756
|
detail: Annotated[str, typer.Option("--detail", help="Output detail: summary, excerpt, or full.")] = "summary",
|
|
1744
|
-
max_lines: Annotated[int | None, typer.Option("--max-lines", help="
|
|
1757
|
+
max_lines: Annotated[int | None, typer.Option("--max-lines", help="Runtime capture line limit.")] = None,
|
|
1745
1758
|
output: Annotated[
|
|
1746
1759
|
Path | None,
|
|
1747
1760
|
typer.Option("--output", "--output-file", help="Write JSON observe payload to this file path."),
|
|
@@ -1952,7 +1965,10 @@ def transcript(
|
|
|
1952
1965
|
@app.command()
|
|
1953
1966
|
def terminate(
|
|
1954
1967
|
session_id: str,
|
|
1955
|
-
dry_run: Annotated[
|
|
1968
|
+
dry_run: Annotated[
|
|
1969
|
+
bool,
|
|
1970
|
+
typer.Option("--dry-run", help="Preview termination without killing the runtime session or updating state."),
|
|
1971
|
+
] = False,
|
|
1956
1972
|
json_output: Annotated[bool, typer.Option("--json", help="Emit JSON.")] = False,
|
|
1957
1973
|
) -> None:
|
|
1958
1974
|
"""Terminate a worker.
|
|
@@ -64,9 +64,31 @@ class TmuxConfig(BaseModel):
|
|
|
64
64
|
idle_seconds: int = 30
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
class TerminalControlArtifactsConfig(BaseModel):
|
|
68
|
+
save_text: bool = False
|
|
69
|
+
save_json: bool = True
|
|
70
|
+
save_svg_on_failure: bool = True
|
|
71
|
+
save_png_on_failure: bool = False
|
|
72
|
+
record: bool = False
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class TerminalControlConfig(BaseModel):
|
|
76
|
+
enabled: bool = False
|
|
77
|
+
binary: str = "termctrl"
|
|
78
|
+
session_prefix: str = "agentpool"
|
|
79
|
+
capture_lines: int = 300
|
|
80
|
+
cols: int = 120
|
|
81
|
+
rows: int = 36
|
|
82
|
+
settle_ms: int = 100
|
|
83
|
+
deadline_ms: int = 5000
|
|
84
|
+
host: str | None = None
|
|
85
|
+
artifacts: TerminalControlArtifactsConfig = Field(default_factory=TerminalControlArtifactsConfig)
|
|
86
|
+
|
|
87
|
+
|
|
67
88
|
class RuntimeConfig(BaseModel):
|
|
68
89
|
default: str = "tmux"
|
|
69
90
|
tmux: TmuxConfig = Field(default_factory=TmuxConfig)
|
|
91
|
+
terminal_control: TerminalControlConfig = Field(default_factory=TerminalControlConfig)
|
|
70
92
|
|
|
71
93
|
|
|
72
94
|
class PolicyConfig(BaseModel):
|
|
@@ -72,6 +72,20 @@ def get_usage_summary(
|
|
|
72
72
|
)
|
|
73
73
|
|
|
74
74
|
|
|
75
|
+
def get_capacity_summary(
|
|
76
|
+
manager: SessionManager,
|
|
77
|
+
provider_id: str | None = None,
|
|
78
|
+
refresh: bool = False,
|
|
79
|
+
backend: str = "combined",
|
|
80
|
+
timeout_seconds: float = MCP_USAGE_REFRESH_TIMEOUT_SECONDS,
|
|
81
|
+
) -> dict[str, Any]:
|
|
82
|
+
return get_usage_summary(manager, provider_id, refresh, backend, timeout_seconds)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def get_cached_usage_snapshot(manager: SessionManager, provider_id: str | None = None) -> dict[str, Any]:
|
|
86
|
+
return manager.cached_usage_snapshot(provider_id)
|
|
87
|
+
|
|
88
|
+
|
|
75
89
|
def get_provider_models(manager: SessionManager, provider_id: str | None = None) -> dict[str, Any]:
|
|
76
90
|
return manager.provider_models(provider_id)
|
|
77
91
|
|