agentpool-cli 0.1.7__tar.gz → 0.1.9__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.
Files changed (124) hide show
  1. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/CHANGELOG.md +18 -0
  2. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/PKG-INFO +13 -4
  3. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/README.md +12 -3
  4. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/agentpool-skill.md +3 -0
  5. agentpool_cli-0.1.9/docs/examples.md +42 -0
  6. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/quickstart.md +6 -0
  7. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/security.md +4 -2
  8. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/usage-detection.md +10 -3
  9. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/pyproject.toml +1 -1
  10. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/server.json +2 -2
  11. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/__init__.py +1 -1
  12. agentpool_cli-0.1.9/src/agentpool/__main__.py +11 -0
  13. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/cli.py +761 -45
  14. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/config.py +8 -0
  15. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/git_worktree.py +25 -2
  16. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/mcp/tools.py +1 -1
  17. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/onboarding.py +11 -3
  18. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/session_manager.py +88 -9
  19. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/stats/compute.py +2 -3
  20. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/summary.py +1 -4
  21. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/integration/test_fake_tmux_flow.py +18 -1
  22. agentpool_cli-0.1.9/tests/unit/test_cli.py +594 -0
  23. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_models_config_store.py +172 -1
  24. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_onboarding.py +9 -1
  25. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_redaction.py +12 -1
  26. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_usage_summary_enrichment.py +5 -4
  27. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/uv.lock +1 -1
  28. agentpool_cli-0.1.7/docs/examples.md +0 -20
  29. agentpool_cli-0.1.7/tests/unit/test_cli.py +0 -260
  30. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.cursor/mcp.json.example +0 -0
  31. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.github/CODEOWNERS +0 -0
  32. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  33. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.github/ISSUE_TEMPLATE/provider_probe.md +0 -0
  34. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.github/dependabot.yml +0 -0
  35. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.github/workflows/ci.yml +0 -0
  36. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.github/workflows/release.yml +0 -0
  37. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.gitignore +0 -0
  38. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/.mcp.json.example +0 -0
  39. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/AGENTS.md +0 -0
  40. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/CONTRIBUTING.md +0 -0
  41. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/LICENSE +0 -0
  42. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/SECURITY.md +0 -0
  43. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/agent-cli-and-mcp.md +0 -0
  44. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/architecture.md +0 -0
  45. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/examples/README.md +0 -0
  46. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/install.md +0 -0
  47. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/mcp-clients.md +0 -0
  48. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/mcp-tools.md +0 -0
  49. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/model-catalog.md +0 -0
  50. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/onboarding.md +0 -0
  51. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/provider-adapters.md +0 -0
  52. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/provider-lifecycle-matrix.md +0 -0
  53. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/release.md +0 -0
  54. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/setup-claude-code.md +0 -0
  55. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/setup-codex.md +0 -0
  56. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/setup-copilot.md +0 -0
  57. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/setup-cursor-cli.md +0 -0
  58. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/setup-cursor.md +0 -0
  59. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/setup-devin.md +0 -0
  60. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/setup-droid.md +0 -0
  61. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/stats.md +0 -0
  62. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/docs/usage-probe-matrix.md +0 -0
  63. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/scripts/install.sh +0 -0
  64. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/agent_io.py +0 -0
  65. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/artifacts.py +0 -0
  66. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/event_detection.py +0 -0
  67. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/__init__.py +0 -0
  68. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/__init__.py +0 -0
  69. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/fake_approval_agent.py +0 -0
  70. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/fake_common.py +0 -0
  71. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/fake_completed_agent.py +0 -0
  72. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/fake_idle_agent.py +0 -0
  73. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/fake_limit_agent.py +0 -0
  74. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/fake_patch_agent.py +0 -0
  75. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/fixtures/fake_agents/fake_question_agent.py +0 -0
  76. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/mcp/__init__.py +0 -0
  77. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/mcp/resources.py +0 -0
  78. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/mcp_server.py +0 -0
  79. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/models.py +0 -0
  80. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/policy.py +0 -0
  81. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/preferences.py +0 -0
  82. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/provider_model_catalog.json +0 -0
  83. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/providers/__init__.py +0 -0
  84. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/providers/base.py +0 -0
  85. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/providers/registry.py +0 -0
  86. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/redaction.py +0 -0
  87. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/runtimes/__init__.py +0 -0
  88. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/runtimes/base.py +0 -0
  89. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/runtimes/tmux.py +0 -0
  90. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/stats/__init__.py +0 -0
  91. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/stats/card.py +0 -0
  92. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/stats/queries.py +0 -0
  93. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/stats/render.py +0 -0
  94. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/stats/window.py +0 -0
  95. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/store.py +0 -0
  96. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/__init__.py +0 -0
  97. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/_common.py +0 -0
  98. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/ccusage.py +0 -0
  99. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/claude.py +0 -0
  100. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/codex.py +0 -0
  101. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/codexbar.py +0 -0
  102. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/combine.py +0 -0
  103. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/copilot.py +0 -0
  104. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/devin.py +0 -0
  105. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/parsers.py +0 -0
  106. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/probes.py +0 -0
  107. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/usage/provider_parsers.py +0 -0
  108. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/src/agentpool/utils.py +0 -0
  109. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/fixtures/provider_model_catalog_golden.json +0 -0
  110. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/fixtures/stats_seed.py +0 -0
  111. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/fixtures/usage/claude_usage.txt +0 -0
  112. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/fixtures/usage/codex_rate_limits.json +0 -0
  113. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/fixtures/usage/copilot_user.json +0 -0
  114. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/fixtures/usage/devin_plan_status.json +0 -0
  115. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_agent_io.py +0 -0
  116. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_event_policy.py +0 -0
  117. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_mcp_surface.py +0 -0
  118. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_mcp_tools.py +0 -0
  119. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_stats_cli.py +0 -0
  120. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_stats_mcp.py +0 -0
  121. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_stats_window.py +0 -0
  122. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_subprocess_safety.py +0 -0
  123. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_usage_probes.py +0 -0
  124. {agentpool_cli-0.1.7 → agentpool_cli-0.1.9}/tests/unit/test_usage_provider_parsers.py +0 -0
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.1.9 - 2026-06-02
6
+
7
+ - Harden agent-facing CLI recovery with examples on root/group help, structured
8
+ `models` action errors, and next-command hints for invalid output choices.
9
+ - Add side-effect-free previews for `preferences init`, `interrupt`, and
10
+ `leases release`; add `session show --plain`.
11
+ - Format `terminate`, `collect`, and `artifacts` human output without raw Python
12
+ dicts while preserving JSON payloads.
13
+ - Ship `python -m agentpool` support and expand CLI regression coverage.
14
+
15
+ ## 0.1.8 - 2026-06-01
16
+
17
+ - Treat stale usage snapshots as age metadata, not as an unusable-provider
18
+ reason. `usage-summary` still reports `stale` and `age_seconds`, but a stale
19
+ cache entry no longer overrides usable quota/status data.
20
+ - Add optional `policy.usage_auto_refresh_after_seconds` for users who want
21
+ cached usage summaries to refresh automatically after a configured age.
22
+
5
23
  ## 0.1.7 - 2026-06-01
6
24
 
7
25
  - Centralize non-interactive subprocess execution behind terminal-safe helpers.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentpool-cli
3
- Version: 0.1.7
3
+ Version: 0.1.9
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
@@ -131,8 +131,10 @@ agentpool observe <session-id> --wait-for completed,error,question,approval_prom
131
131
  agentpool send <session-id> "Continue with the smallest useful check."
132
132
  agentpool artifacts <session-id> --json
133
133
  agentpool transcript <session-id> --tail-lines 80 --json
134
+ agentpool session show <session-id> --json
134
135
  agentpool sessions --recent 10 --json
135
136
  agentpool collect <session-id> --json
137
+ agentpool terminate <session-id> --dry-run --json
136
138
  agentpool terminate <session-id> --json
137
139
  ```
138
140
 
@@ -153,6 +155,7 @@ agentpool spawn \
153
155
  --isolation worktree
154
156
 
155
157
  agentpool worktrees list --repo .
158
+ agentpool worktrees cleanup --session-id <session-id> --dry-run --json
156
159
  agentpool worktrees cleanup --session-id <session-id>
157
160
  ```
158
161
 
@@ -164,6 +167,7 @@ requested through `--isolation worktree` or policy configuration.
164
167
 
165
168
  ```bash
166
169
  agentpool usage-summary --refresh --json
170
+ agentpool usage-summary --refresh --no-interactive --json
167
171
  agentpool stats --since 7d --json
168
172
  agentpool usage-summary --refresh --backend codexbar --json
169
173
  agentpool usage-summary --refresh --backend ccusage --provider claude-code --json
@@ -171,17 +175,22 @@ agentpool usage-summary --refresh --backend ccusage --provider claude-code --jso
171
175
 
172
176
  `usage-summary` returns a `providers` object keyed by provider id. It is not
173
177
  ordered and it is not a recommendation list. Each row includes `usable`,
174
- `unusable_reason`, quota windows, confidence, staleness, and reset timing when
178
+ `unusable_reason`, quota windows, confidence, age/staleness, and reset timing when
175
179
  the provider exposes it. The older CLI `capacity-summary` command is retained
176
180
  as a human convenience alias; the MCP surface only exposes `get_usage_snapshot`
177
181
  and the opt-in `get_usage_summary` tool.
178
182
 
179
183
  The default buffer is `policy.min_remaining_percent = 10`. If any reported
180
184
  quota window is below that buffer, the provider row is marked unusable for the
181
- summary. AgentPool still does not pick an alternative provider for you.
185
+ summary. Staleness is reported as age information only; it does not by itself
186
+ make a provider unusable. If you want cached summary reads to refresh
187
+ automatically after a threshold, set `policy.usage_auto_refresh_after_seconds`
188
+ in `~/.agentpool/config.yaml`.
189
+ AgentPool still does not pick an alternative provider for you.
182
190
  MCP usage refreshes are intentionally bounded and may return `partial=true`;
183
191
  use the CLI commands above when a shell-capable agent needs a complete live
184
- refresh.
192
+ refresh. Use `--no-interactive` or `AGENTPOOL_NO_INTERACTIVE_USAGE=1` when a
193
+ shell script must avoid provider TUI fallback probes.
185
194
 
186
195
  ## Provider Matrix
187
196
 
@@ -110,8 +110,10 @@ agentpool observe <session-id> --wait-for completed,error,question,approval_prom
110
110
  agentpool send <session-id> "Continue with the smallest useful check."
111
111
  agentpool artifacts <session-id> --json
112
112
  agentpool transcript <session-id> --tail-lines 80 --json
113
+ agentpool session show <session-id> --json
113
114
  agentpool sessions --recent 10 --json
114
115
  agentpool collect <session-id> --json
116
+ agentpool terminate <session-id> --dry-run --json
115
117
  agentpool terminate <session-id> --json
116
118
  ```
117
119
 
@@ -132,6 +134,7 @@ agentpool spawn \
132
134
  --isolation worktree
133
135
 
134
136
  agentpool worktrees list --repo .
137
+ agentpool worktrees cleanup --session-id <session-id> --dry-run --json
135
138
  agentpool worktrees cleanup --session-id <session-id>
136
139
  ```
137
140
 
@@ -143,6 +146,7 @@ requested through `--isolation worktree` or policy configuration.
143
146
 
144
147
  ```bash
145
148
  agentpool usage-summary --refresh --json
149
+ agentpool usage-summary --refresh --no-interactive --json
146
150
  agentpool stats --since 7d --json
147
151
  agentpool usage-summary --refresh --backend codexbar --json
148
152
  agentpool usage-summary --refresh --backend ccusage --provider claude-code --json
@@ -150,17 +154,22 @@ agentpool usage-summary --refresh --backend ccusage --provider claude-code --jso
150
154
 
151
155
  `usage-summary` returns a `providers` object keyed by provider id. It is not
152
156
  ordered and it is not a recommendation list. Each row includes `usable`,
153
- `unusable_reason`, quota windows, confidence, staleness, and reset timing when
157
+ `unusable_reason`, quota windows, confidence, age/staleness, and reset timing when
154
158
  the provider exposes it. The older CLI `capacity-summary` command is retained
155
159
  as a human convenience alias; the MCP surface only exposes `get_usage_snapshot`
156
160
  and the opt-in `get_usage_summary` tool.
157
161
 
158
162
  The default buffer is `policy.min_remaining_percent = 10`. If any reported
159
163
  quota window is below that buffer, the provider row is marked unusable for the
160
- summary. AgentPool still does not pick an alternative provider for you.
164
+ summary. Staleness is reported as age information only; it does not by itself
165
+ make a provider unusable. If you want cached summary reads to refresh
166
+ automatically after a threshold, set `policy.usage_auto_refresh_after_seconds`
167
+ in `~/.agentpool/config.yaml`.
168
+ AgentPool still does not pick an alternative provider for you.
161
169
  MCP usage refreshes are intentionally bounded and may return `partial=true`;
162
170
  use the CLI commands above when a shell-capable agent needs a complete live
163
- refresh.
171
+ refresh. Use `--no-interactive` or `AGENTPOOL_NO_INTERACTIVE_USAGE=1` when a
172
+ shell script must avoid provider TUI fallback probes.
164
173
 
165
174
  ## Provider Matrix
166
175
 
@@ -27,6 +27,9 @@ need to delegate coding-agent work.
27
27
  live refresh. MCP `refresh=true` is bounded and can return `partial=true`
28
28
  with unknown rows for slow providers.
29
29
  - Treat usage rows as a provider-id map. They are not ordered and not ranked.
30
+ - Treat `stale` and `age_seconds` as age metadata, not as an instruction to
31
+ avoid a provider. If the user configured usage auto-refresh, cached summary
32
+ reads may refresh themselves before returning.
30
33
  - Inspect provider models before spawning when the model is not already chosen:
31
34
  - CLI: `agentpool models --provider <provider-id>`
32
35
  - MCP: `get_provider_models(provider_id=...)`
@@ -0,0 +1,42 @@
1
+ # Examples
2
+
3
+ Spawn a fake question worker:
4
+
5
+ ```bash
6
+ agentpool spawn \
7
+ --provider fake-question \
8
+ --repo . \
9
+ --task "Inspect the project and ask one clarifying question." \
10
+ --isolation read_only
11
+ ```
12
+
13
+ Observe and steer:
14
+
15
+ ```bash
16
+ agentpool observe <session-id> --wait-for question,completed,error --timeout 120 --json
17
+ agentpool send <session-id> "Inspect migrations first. Stay read-only."
18
+ agentpool session show <session-id> --json
19
+ agentpool collect <session-id> --json
20
+ agentpool terminate <session-id> --dry-run --json
21
+ agentpool terminate <session-id>
22
+ ```
23
+
24
+ Read task text from stdin:
25
+
26
+ ```bash
27
+ cat task.md | agentpool spawn --provider <provider-id> --repo . --stdin --json
28
+ ```
29
+
30
+ Run usage probes without provider TUI fallbacks:
31
+
32
+ ```bash
33
+ AGENTPOOL_NO_INTERACTIVE_USAGE=1 agentpool usage-summary --refresh --json
34
+ agentpool usage --provider claude-code --no-interactive --json
35
+ ```
36
+
37
+ Preview worktree cleanup before removing anything:
38
+
39
+ ```bash
40
+ agentpool worktrees cleanup --session-id <session-id> --dry-run --json
41
+ agentpool worktrees cleanup --session-id <session-id> --force --json
42
+ ```
@@ -29,8 +29,12 @@ cycle. `"ok": true` means the control plane works end to end.
29
29
  ```bash
30
30
  agentpool inventory --json
31
31
  agentpool usage-summary --json # add --refresh for live probes
32
+ agentpool usage-summary --refresh --no-interactive --json
32
33
  ```
33
34
 
35
+ Use `--no-interactive` or `AGENTPOOL_NO_INTERACTIVE_USAGE=1` for scripts that
36
+ must avoid provider TUI fallback probes.
37
+
34
38
  ## 4. Run a real worker (explicit provider + isolation)
35
39
 
36
40
  ```bash
@@ -44,7 +48,9 @@ The result includes a top-level `session_id`. Drive it with:
44
48
  ```bash
45
49
  agentpool observe <session-id> --wait-for question,completed,error --timeout 120 --json
46
50
  agentpool send <session-id> "Continue with the smallest useful check." --json
51
+ agentpool session show <session-id> --json
47
52
  agentpool collect <session-id> --json
53
+ agentpool terminate <session-id> --dry-run --json
48
54
  agentpool terminate <session-id> --json
49
55
  ```
50
56
 
@@ -16,8 +16,10 @@ Guardrails:
16
16
  key, URI-password, JWT, and private-key patterns.
17
17
 
18
18
  Live usage probes are explicit. `inventory` does not run provider TUIs or
19
- network quota probes. `usage --refresh` and `usage-summary --refresh` may read
20
- existing CLI auth state and contact provider APIs, depending on the provider.
19
+ network quota probes. `usage` and `usage-summary --refresh` may read existing
20
+ CLI auth state and contact provider APIs, depending on the provider. Use
21
+ `--no-interactive` or `AGENTPOOL_NO_INTERACTIVE_USAGE=1` when automation must
22
+ avoid provider TUI fallback probes.
21
23
 
22
24
  Worker output is an untrusted channel. CLI and MCP observe/collect paths return
23
25
  summary metadata by default; inline excerpts and transcript/event resources are
@@ -4,16 +4,23 @@ Usage is best effort and confidence-tagged. Unknown is valid.
4
4
 
5
5
  Allowed confidence values include `official`, `local_cli`, `local_config`, `provider_warning`, `observed`, `user_configured`, and `unknown`. AgentPool does not fabricate exact quotas and does not scrape browser sessions in v0.1.
6
6
 
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. 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.
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
10
  CLI `capacity-summary` command is a human convenience alias; MCP does not expose
11
11
  a capacity alias. Each row includes `usable`, `unusable_reason`, `stale`, and
12
- `age_seconds`. `usable` is conservative: unknown, unauthenticated, unavailable,
13
- stale, untrusted-confidence, or below-buffer windows are unusable. The default
12
+ `age_seconds`. `stale` is informational age metadata only; it does not by
13
+ itself make a provider unusable. `usable` is derived from install/auth status,
14
+ provider usage status, confidence, and reported quota windows. The default
14
15
  buffer is `policy.min_remaining_percent = 10`, and it applies to every reported
15
16
  quota window.
16
17
 
18
+ Cached summary reads can optionally refresh themselves when old enough. Set
19
+ `policy.usage_auto_refresh_after_seconds` to a non-negative number in
20
+ `~/.agentpool/config.yaml` to refresh `usage-summary` / `get_usage_summary`
21
+ when the cached summary data is missing or older than that threshold. Leave it
22
+ as `null` to keep refreshes explicit.
23
+
17
24
  Usage windows carry a stable `kind` in addition to provider-specific names:
18
25
 
19
26
  - `daily`
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "agentpool-cli"
7
- version = "0.1.7"
7
+ version = "0.1.9"
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.7",
6
+ "version": "0.1.9",
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.7",
16
+ "version": "0.1.9",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
@@ -1,3 +1,3 @@
1
1
  """AgentPool local agent control plane."""
2
2
 
3
- __version__ = "0.1.7"
3
+ __version__ = "0.1.9"
@@ -0,0 +1,11 @@
1
+ from __future__ import annotations
2
+
3
+ from agentpool.cli import app
4
+
5
+
6
+ def main() -> None:
7
+ app()
8
+
9
+
10
+ if __name__ == "__main__":
11
+ main()