hypercli-sdk 2026.7.31__tar.gz → 2026.8.11__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.

Potentially problematic release.


This version of hypercli-sdk might be problematic. Click here for more details.

Files changed (71) hide show
  1. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/.gitignore +2 -0
  2. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/PKG-INFO +111 -16
  3. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/README.md +109 -14
  4. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/__init__.py +92 -1
  5. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/agent.py +320 -26
  6. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/agents.py +1402 -348
  7. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/billing.py +4 -0
  8. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/client.py +6 -3
  9. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/config.py +3 -4
  10. hypercli_sdk-2026.8.11/hypercli/hermes/__init__.py +37 -0
  11. hypercli_sdk-2026.8.11/hypercli/hermes/gateway.py +402 -0
  12. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/job/base.py +8 -1
  13. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/keys.py +40 -1
  14. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/user.py +8 -0
  15. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/pyproject.toml +1 -1
  16. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/conftest.py +1 -1
  17. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_agents.py +4 -1
  18. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_auth.py +1 -1
  19. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_agent_files_source.py +0 -2
  20. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_agent_lifecycle.py +0 -6
  21. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_agents.py +1035 -203
  22. hypercli_sdk-2026.8.11/tests/test_bootstrap_agents_e2e_user.py +133 -0
  23. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_bootstrap_dev_test_keys.py +79 -0
  24. hypercli_sdk-2026.8.11/tests/test_ci_dev_control_plane_lock.py +62 -0
  25. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_claw.py +388 -35
  26. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_coding_agents.py +292 -24
  27. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_config.py +21 -5
  28. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_exec_shell_dryrun.py +1 -1
  29. hypercli_sdk-2026.8.11/tests/test_hermes.py +241 -0
  30. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_jobs.py +23 -0
  31. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_keys.py +72 -1
  32. hypercli_sdk-2026.8.11/tests/test_repository_integrity.py +27 -0
  33. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_workspaces.py +3 -3
  34. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/_compat.py +0 -0
  35. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/files.py +0 -0
  36. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/gateway.py +0 -0
  37. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/http.py +0 -0
  38. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/instances.py +0 -0
  39. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/job/__init__.py +0 -0
  40. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/job/comfyui.py +0 -0
  41. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/job/gradio.py +0 -0
  42. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/jobs.py +0 -0
  43. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/logs.py +0 -0
  44. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/models.py +0 -0
  45. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/openclaw/__init__.py +0 -0
  46. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/openclaw/gateway.py +0 -0
  47. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/openclaw/node_proxy.py +0 -0
  48. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/renders.py +0 -0
  49. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/shell.py +0 -0
  50. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/voice.py +0 -0
  51. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/voice_stream.py +0 -0
  52. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/workspaces.py +0 -0
  53. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/hypercli/x402.py +0 -0
  54. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_billing.py +0 -0
  55. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_instances.py +0 -0
  56. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_jobs_dryrun.py +0 -0
  57. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_keys.py +0 -0
  58. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_node_egress_e2e.py +0 -0
  59. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/integration/test_renders.py +0 -0
  60. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_apply_params.py +0 -0
  61. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_bootstrap_console_test_key.py +0 -0
  62. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_gateway.py +0 -0
  63. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_gateway_retry.py +0 -0
  64. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_graph_to_api.py +0 -0
  65. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_http.py +0 -0
  66. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_models.py +0 -0
  67. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_node_proxy.py +0 -0
  68. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_renders_subscription.py +0 -0
  69. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_status.py +0 -0
  70. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_voice.py +0 -0
  71. {hypercli_sdk-2026.7.31 → hypercli_sdk-2026.8.11}/tests/test_voice_stream.py +0 -0
@@ -30,6 +30,8 @@ coverage
30
30
  .agents/
31
31
  .opencode/
32
32
  .github/
33
+ /skills/
34
+ /skills-lock.json
33
35
  docs/agent-display-names.md
34
36
  *.pem
35
37
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: hypercli-sdk
3
- Version: 2026.7.31
3
+ Version: 2026.8.11
4
4
  Summary: Python SDK for HyperCLI - GPU orchestration and HyperAgent API
5
5
  Project-URL: Homepage, https://hypercli.com
6
6
  Project-URL: Documentation, https://docs.hypercli.com
@@ -122,7 +122,7 @@ the HyperClaw inference base URL for chat completions:
122
122
  from hypercli import HyperCLI
123
123
  from openai import OpenAI
124
124
 
125
- sdk = HyperCLI(api_key="hyper_api_key", agent_api_key="sk-agent")
125
+ sdk = HyperCLI(api_key="hyper_api_key", agent_api_key="hyper_api_agent_key")
126
126
  plans = sdk.agent.plans()
127
127
  activation = sdk.agent.redeem_grant_code("PROMO123")
128
128
  renewal = sdk.agent.redeem_grant_code("PROMO123", extend_existing=True)
@@ -140,9 +140,23 @@ response = client.chat.completions.create(
140
140
 
141
141
  `redeem_grant_code()` applies a promo/activation code to the current HyperClaw account and returns the created entitlement. Codes create new entitlements by default; pass `extend_existing=True` only for renewal/extension behavior.
142
142
 
143
+ Plan IDs are open strings on the wire so future and historical plans continue
144
+ to parse. `plan.canonical_id` recognizes the current `solo`, `team`, and `pro`
145
+ IDs. Plan access comes from the HyperClaw summary, including direct grants:
146
+
147
+ ```python
148
+ summary = sdk.agent.subscription_summary()
149
+ if summary.has_active_plan: # active subscription OR direct entitlement
150
+ print(summary.agent_slots)
151
+ ```
152
+
153
+ Do not substitute the Orchestra `/api/auth/me` subscription flag. If the
154
+ summary request returns `401` or `403`, the selected key cannot establish plan
155
+ state; treat it as unknown rather than as no plan.
156
+
143
157
  ## OpenClaw Agents
144
158
 
145
- OpenClaw uses the generic deployment launch surface. `registry_url`, `registry_auth`, `sync_root`, and `sync_enabled` are generic deployment options; the OpenClaw helpers only add defaults such as routes, image, and `sync_root=/home/node`.
159
+ OpenClaw uses the generic deployment launch surface. `registry_url`, `registry_auth`, and `sync_root` are generic deployment options. A nonblank `sync_root` enables Reef persistence; no separate `sync_enabled` field is serialized. The OpenClaw helpers add defaults such as routes, image, and `sync_root=/home/node`.
146
160
 
147
161
  ```python
148
162
  agent = client.deployments.create_openclaw(
@@ -151,8 +165,58 @@ agent = client.deployments.create_openclaw(
151
165
  registry_url="git.nedos.co",
152
166
  registry_auth={"username": "ci", "password": "token"},
153
167
  )
168
+ agent = client.deployments.wait_running(agent.id, timeout=300)
169
+
170
+ capacity = client.deployments.list_with_capacity()
171
+ print(capacity.max_agents_per_account, capacity.running_agents)
172
+ for slot in capacity.agent_slots:
173
+ print(slot.size, slot.plan_id, slot.agent_id)
154
174
  ```
155
175
 
176
+ `list()` remains the compatibility list of agents. `list_with_capacity()`
177
+ preserves the full deployment envelope: saved/running account limits, pooled
178
+ TPD, aggregate slot inventory, and individual entitlement-backed agent slots.
179
+
180
+ For a long-lived UI, subscribe to thin invalidations and refresh REST in the
181
+ handler:
182
+
183
+ ```python
184
+ import asyncio
185
+
186
+ async def changed(_event):
187
+ agents = await asyncio.to_thread(client.deployments.list)
188
+ render(agents)
189
+
190
+ async def snapshot():
191
+ agents = await asyncio.to_thread(client.deployments.list)
192
+ render(agents)
193
+
194
+ stop = asyncio.Event()
195
+ await client.deployments.subscribe(changed, stop_event=stop, on_ready=snapshot)
196
+ ```
197
+
198
+ The `on_ready` callback runs after user-stream authentication and before event
199
+ frames are read; it repeats after reconnect so no transition can slip
200
+ between snapshot and subscription. Transition events carry `agent_id` for
201
+ local filtering plus `state`, `reason`, `error`, and `message`, but are not
202
+ resource snapshots and may be duplicated or coalesced; refresh REST for
203
+ authority.
204
+
205
+ Managed-agent lifecycle snapshots currently use `CREATING`, `STARTING`,
206
+ `RESTORING`, `RUNNING`, `STOPPING`, `STOPPED`, `ARCHIVING`, `ARCHIVED`,
207
+ `FAILED`, and `DELETED`. `CREATING` is fresh admission, `STARTING` resumes a
208
+ warm retained agent, and `RESTORING` hydrates a cold agent from its exact
209
+ archive checkpoint. `STOPPED` retains warm local storage. `ARCHIVING` is the
210
+ public transition to verified cold storage.
211
+ `ARCHIVED` is the Backend-persisted cold-restorable terminal projection after
212
+ Lagoon drops its agent task, namespace, PVC, and local S3 copy. `DELETED` is a
213
+ Backend-only terminal state and normally hidden from user lists. State values
214
+ remain open strings; use REST as authority instead of
215
+ recreating the server lifecycle machine in the client. Each snapshot may also
216
+ carry open-string diagnostics: `reason` is the stable cause such as `start`,
217
+ `api_stop`, `runtime_exit`, `timeout`, or `delete`, `error` is a failure code
218
+ when the transition failed, and `message` is human-readable context.
219
+
156
220
  Use `create_openclaw_pro(...)` for the desktop/browser image. It enables noVNC through the protected `desktop-<agent>.hypercli.app` route and sets `OPENCLAW_DESKTOP_ENABLED=1`.
157
221
 
158
222
  `heartbeat` maps directly to upstream OpenClaw config at `config.agents.defaults.heartbeat`. Omit it to keep upstream defaults, or pass values such as `heartbeat={"every": "1h", "target": "last"}`.
@@ -161,13 +225,22 @@ Automatic memory indexing is off by default. Opt in with `memory_index={"on_sess
161
225
 
162
226
  ## Hosted Coding Agents
163
227
 
164
- OpenCode, Codex, Claude Code, Goose, and Kimi Code use canonical Reef images.
228
+ Native Buzz Agent, OpenCode, Codex, Claude Code, Goose, and Kimi Code use
229
+ canonical managed-runtime images.
165
230
  They have no public runtime port: lifecycle, exec, shell, workspace sync, and
166
231
  authentication all use the existing authenticated deployment APIs. OpenCode
167
232
  and Goose default to HyperCLI's Anthropic-native `kimi-k2.6-anthropic` route.
168
233
  Kimi Code keeps Moonshot's upstream device login and service.
234
+ Claude Code, Codex, and Kimi Code are native-login-first. For Buzz-managed
235
+ launches, `HYPERCLI_RUNTIME_INFERENCE=hypercli` is an explicit compatibility
236
+ switch for Claude and Kimi. The gateway now exposes `/v1/responses`, and Buzz
237
+ compatibility mode renders Codex with `wire_api="responses"`; a successful
238
+ HyperCLI-model Codex Responses E2E remains unvalidated, so that path is not yet
239
+ advertised as supported. See the
240
+ [runtime and persistence matrix](../docs/agents/coding-runtimes.mdx).
169
241
 
170
242
  ```python
243
+ buzz_agent = client.deployments.create_buzz_agent(name="buzz-agent")
171
244
  agent = client.deployments.create_opencode(name="opencode")
172
245
  codex = client.deployments.create_codex(name="codex")
173
246
  claude = client.deployments.create_claude_code(name="claude")
@@ -183,10 +256,19 @@ async with await codex.auth.login("device") as login:
183
256
  ```
184
257
 
185
258
  The login helper opens a short-lived, agent-bound shell WebSocket and runs the
186
- runtime's native login command inside the Reef pod. It never puts an API key on
259
+ runtime's native login command inside the managed runtime. It never puts an API key on
187
260
  the command line. Runtime credentials and state live under the persistent
188
261
  `/home/node` sync root.
189
262
 
263
+ Authentication is runtime-specific rather than one universal login protocol.
264
+ Native Buzz Agent has no separate login step and uses its injected model and
265
+ provider configuration. OpenCode combines adapter discovery with its
266
+ interactive provider login; Codex
267
+ adds native device login; Claude Code exposes Claude.ai, Console, and SSO;
268
+ Goose uses its injected deployment credential; and Kimi Code uses the
269
+ upstream adapter's methods. Goose and Kimi Code do not expose a noninteractive
270
+ logout command through this SDK surface.
271
+
190
272
  The images default to a long-lived direct shell/exec container. A Buzz provider
191
273
  launches one for a Buzz-managed identity with the typed launch contract:
192
274
 
@@ -195,7 +277,6 @@ from hypercli import BuzzLaunchConfig
195
277
 
196
278
  agent = client.deployments.create_opencode(
197
279
  name="buzz-opencode",
198
- env={"HYPER_API_KEY": inference_key},
199
280
  buzz=BuzzLaunchConfig(
200
281
  private_key_nsec=agent_nsec,
201
282
  relay_url=relay_url,
@@ -205,15 +286,25 @@ agent = client.deployments.create_opencode(
205
286
  )
206
287
  ```
207
288
 
289
+ The managed platform injects an agent-scoped `HYPER_AGENTS_API_KEY` into the
290
+ runtime. Do not copy an account API key into the launch environment.
291
+
208
292
  The SDK selects `/usr/local/bin/buzz-acp`, the runtime-specific child ACP
209
293
  command and arguments, the hosted Buzz MCP command, lazy pool creation, relay
210
- observation, and persistent `/home/node` settings. Buzz-reserved environment
211
- keys are rendered from the typed object after caller environment values.
294
+ observation, and persistent `/home/node` settings. `/home/node/shared`
295
+ remains reserved for Workspace projections; the specialized image reconciles
296
+ the Buzz nest after the home mount and runs the harness from
297
+ `/home/node/.buzz`. OpenCode and Codex read its canonical `AGENTS.md`, while
298
+ Claude Code receives `CLAUDE.md -> AGENTS.md`. `base_prompt.md` stays compiled
299
+ into `buzz-acp`. Buzz-reserved environment keys are rendered from the typed
300
+ object after caller environment values.
212
301
  `buzz_enabled=True` remains as a deprecated raw-environment compatibility path.
213
302
  Typed and compatibility Buzz launches select the matching `hypercli-buzz`
214
- image family (`opencode`, `codex`, `claude`, `goose`, or `kimi-code`) by
303
+ image family (`buzz-agent`, `opencode`, `codex`, `claude`, `goose`, or
304
+ `kimi-code`) by
215
305
  default. Ordinary coding-agent helpers without Buzz keep the generic
216
- `ghcr.io/hypercli/hypercli-<runtime>:latest` default. An explicit `image=`
306
+ `ghcr.io/hypercli/hypercli-<runtime>:latest` default, except native Buzz Agent,
307
+ whose runtime image is already `hypercli-buzz-agent`. An explicit `image=`
217
308
  continues to override either default.
218
309
 
219
310
  Direct `BuzzLaunchConfig` renders timeout and response-policy values but does
@@ -222,18 +313,22 @@ are rejected later by `buzz-acp`. The Desktop provider also maps structured
222
313
  Goose model/provider fields to `GOOSE_MODEL`/`GOOSE_PROVIDER`; direct Python
223
314
  SDK callers must set any Goose-specific environment themselves.
224
315
 
225
- Buzz launches require `size="large"`; ordinary coding-agent helpers preserve a
226
- caller-provided size or the backend default. Stock Buzz provider agents do not
316
+ Buzz launches leave size unset for live backend/provider slot selection;
317
+ ordinary coding-agent helpers preserve a caller-provided size or the backend
318
+ default. Stock Buzz provider agents do not
227
319
  start on app launch and the current provider protocol has no stop callback.
228
320
  Editing a running agent does not replace its HyperCLI launch environment: stop
229
321
  the deployment through the authenticated HyperCLI API and deploy it again from
230
- Buzz to apply changes. Desktop's best-effort `!shutdown` chat control may exit
231
- the harness, but it does not stop or release the HyperCLI deployment.
322
+ Buzz to apply changes. A successfully delivered and accepted `!shutdown` can
323
+ exit a new `restart=False` launch; the hosted terminal-state observer then
324
+ reports `stopping`, completes runtime cleanup, marks the deployment `stopped`,
325
+ and releases its slot. Desktop receives no provider acknowledgement and keeps
326
+ its local deployed record.
232
327
 
233
328
  Stock Buzz expects ACP NDJSON. It skips non-JSON child stdout, and
234
329
  `agent_message_chunk` is activity telemetry rather than a channel reply. There
235
330
  is no plaintext fallback; a visible reply requires the agent to invoke the Buzz
236
- send command/tool. The five-runtime SDK coverage validates request rendering,
331
+ send command/tool. The six-runtime SDK coverage validates request rendering,
237
332
  not live launches.
238
333
 
239
334
  The agent nsec and caller environment become raw deployment environment values.
@@ -87,7 +87,7 @@ the HyperClaw inference base URL for chat completions:
87
87
  from hypercli import HyperCLI
88
88
  from openai import OpenAI
89
89
 
90
- sdk = HyperCLI(api_key="hyper_api_key", agent_api_key="sk-agent")
90
+ sdk = HyperCLI(api_key="hyper_api_key", agent_api_key="hyper_api_agent_key")
91
91
  plans = sdk.agent.plans()
92
92
  activation = sdk.agent.redeem_grant_code("PROMO123")
93
93
  renewal = sdk.agent.redeem_grant_code("PROMO123", extend_existing=True)
@@ -105,9 +105,23 @@ response = client.chat.completions.create(
105
105
 
106
106
  `redeem_grant_code()` applies a promo/activation code to the current HyperClaw account and returns the created entitlement. Codes create new entitlements by default; pass `extend_existing=True` only for renewal/extension behavior.
107
107
 
108
+ Plan IDs are open strings on the wire so future and historical plans continue
109
+ to parse. `plan.canonical_id` recognizes the current `solo`, `team`, and `pro`
110
+ IDs. Plan access comes from the HyperClaw summary, including direct grants:
111
+
112
+ ```python
113
+ summary = sdk.agent.subscription_summary()
114
+ if summary.has_active_plan: # active subscription OR direct entitlement
115
+ print(summary.agent_slots)
116
+ ```
117
+
118
+ Do not substitute the Orchestra `/api/auth/me` subscription flag. If the
119
+ summary request returns `401` or `403`, the selected key cannot establish plan
120
+ state; treat it as unknown rather than as no plan.
121
+
108
122
  ## OpenClaw Agents
109
123
 
110
- OpenClaw uses the generic deployment launch surface. `registry_url`, `registry_auth`, `sync_root`, and `sync_enabled` are generic deployment options; the OpenClaw helpers only add defaults such as routes, image, and `sync_root=/home/node`.
124
+ OpenClaw uses the generic deployment launch surface. `registry_url`, `registry_auth`, and `sync_root` are generic deployment options. A nonblank `sync_root` enables Reef persistence; no separate `sync_enabled` field is serialized. The OpenClaw helpers add defaults such as routes, image, and `sync_root=/home/node`.
111
125
 
112
126
  ```python
113
127
  agent = client.deployments.create_openclaw(
@@ -116,8 +130,58 @@ agent = client.deployments.create_openclaw(
116
130
  registry_url="git.nedos.co",
117
131
  registry_auth={"username": "ci", "password": "token"},
118
132
  )
133
+ agent = client.deployments.wait_running(agent.id, timeout=300)
134
+
135
+ capacity = client.deployments.list_with_capacity()
136
+ print(capacity.max_agents_per_account, capacity.running_agents)
137
+ for slot in capacity.agent_slots:
138
+ print(slot.size, slot.plan_id, slot.agent_id)
119
139
  ```
120
140
 
141
+ `list()` remains the compatibility list of agents. `list_with_capacity()`
142
+ preserves the full deployment envelope: saved/running account limits, pooled
143
+ TPD, aggregate slot inventory, and individual entitlement-backed agent slots.
144
+
145
+ For a long-lived UI, subscribe to thin invalidations and refresh REST in the
146
+ handler:
147
+
148
+ ```python
149
+ import asyncio
150
+
151
+ async def changed(_event):
152
+ agents = await asyncio.to_thread(client.deployments.list)
153
+ render(agents)
154
+
155
+ async def snapshot():
156
+ agents = await asyncio.to_thread(client.deployments.list)
157
+ render(agents)
158
+
159
+ stop = asyncio.Event()
160
+ await client.deployments.subscribe(changed, stop_event=stop, on_ready=snapshot)
161
+ ```
162
+
163
+ The `on_ready` callback runs after user-stream authentication and before event
164
+ frames are read; it repeats after reconnect so no transition can slip
165
+ between snapshot and subscription. Transition events carry `agent_id` for
166
+ local filtering plus `state`, `reason`, `error`, and `message`, but are not
167
+ resource snapshots and may be duplicated or coalesced; refresh REST for
168
+ authority.
169
+
170
+ Managed-agent lifecycle snapshots currently use `CREATING`, `STARTING`,
171
+ `RESTORING`, `RUNNING`, `STOPPING`, `STOPPED`, `ARCHIVING`, `ARCHIVED`,
172
+ `FAILED`, and `DELETED`. `CREATING` is fresh admission, `STARTING` resumes a
173
+ warm retained agent, and `RESTORING` hydrates a cold agent from its exact
174
+ archive checkpoint. `STOPPED` retains warm local storage. `ARCHIVING` is the
175
+ public transition to verified cold storage.
176
+ `ARCHIVED` is the Backend-persisted cold-restorable terminal projection after
177
+ Lagoon drops its agent task, namespace, PVC, and local S3 copy. `DELETED` is a
178
+ Backend-only terminal state and normally hidden from user lists. State values
179
+ remain open strings; use REST as authority instead of
180
+ recreating the server lifecycle machine in the client. Each snapshot may also
181
+ carry open-string diagnostics: `reason` is the stable cause such as `start`,
182
+ `api_stop`, `runtime_exit`, `timeout`, or `delete`, `error` is a failure code
183
+ when the transition failed, and `message` is human-readable context.
184
+
121
185
  Use `create_openclaw_pro(...)` for the desktop/browser image. It enables noVNC through the protected `desktop-<agent>.hypercli.app` route and sets `OPENCLAW_DESKTOP_ENABLED=1`.
122
186
 
123
187
  `heartbeat` maps directly to upstream OpenClaw config at `config.agents.defaults.heartbeat`. Omit it to keep upstream defaults, or pass values such as `heartbeat={"every": "1h", "target": "last"}`.
@@ -126,13 +190,22 @@ Automatic memory indexing is off by default. Opt in with `memory_index={"on_sess
126
190
 
127
191
  ## Hosted Coding Agents
128
192
 
129
- OpenCode, Codex, Claude Code, Goose, and Kimi Code use canonical Reef images.
193
+ Native Buzz Agent, OpenCode, Codex, Claude Code, Goose, and Kimi Code use
194
+ canonical managed-runtime images.
130
195
  They have no public runtime port: lifecycle, exec, shell, workspace sync, and
131
196
  authentication all use the existing authenticated deployment APIs. OpenCode
132
197
  and Goose default to HyperCLI's Anthropic-native `kimi-k2.6-anthropic` route.
133
198
  Kimi Code keeps Moonshot's upstream device login and service.
199
+ Claude Code, Codex, and Kimi Code are native-login-first. For Buzz-managed
200
+ launches, `HYPERCLI_RUNTIME_INFERENCE=hypercli` is an explicit compatibility
201
+ switch for Claude and Kimi. The gateway now exposes `/v1/responses`, and Buzz
202
+ compatibility mode renders Codex with `wire_api="responses"`; a successful
203
+ HyperCLI-model Codex Responses E2E remains unvalidated, so that path is not yet
204
+ advertised as supported. See the
205
+ [runtime and persistence matrix](../docs/agents/coding-runtimes.mdx).
134
206
 
135
207
  ```python
208
+ buzz_agent = client.deployments.create_buzz_agent(name="buzz-agent")
136
209
  agent = client.deployments.create_opencode(name="opencode")
137
210
  codex = client.deployments.create_codex(name="codex")
138
211
  claude = client.deployments.create_claude_code(name="claude")
@@ -148,10 +221,19 @@ async with await codex.auth.login("device") as login:
148
221
  ```
149
222
 
150
223
  The login helper opens a short-lived, agent-bound shell WebSocket and runs the
151
- runtime's native login command inside the Reef pod. It never puts an API key on
224
+ runtime's native login command inside the managed runtime. It never puts an API key on
152
225
  the command line. Runtime credentials and state live under the persistent
153
226
  `/home/node` sync root.
154
227
 
228
+ Authentication is runtime-specific rather than one universal login protocol.
229
+ Native Buzz Agent has no separate login step and uses its injected model and
230
+ provider configuration. OpenCode combines adapter discovery with its
231
+ interactive provider login; Codex
232
+ adds native device login; Claude Code exposes Claude.ai, Console, and SSO;
233
+ Goose uses its injected deployment credential; and Kimi Code uses the
234
+ upstream adapter's methods. Goose and Kimi Code do not expose a noninteractive
235
+ logout command through this SDK surface.
236
+
155
237
  The images default to a long-lived direct shell/exec container. A Buzz provider
156
238
  launches one for a Buzz-managed identity with the typed launch contract:
157
239
 
@@ -160,7 +242,6 @@ from hypercli import BuzzLaunchConfig
160
242
 
161
243
  agent = client.deployments.create_opencode(
162
244
  name="buzz-opencode",
163
- env={"HYPER_API_KEY": inference_key},
164
245
  buzz=BuzzLaunchConfig(
165
246
  private_key_nsec=agent_nsec,
166
247
  relay_url=relay_url,
@@ -170,15 +251,25 @@ agent = client.deployments.create_opencode(
170
251
  )
171
252
  ```
172
253
 
254
+ The managed platform injects an agent-scoped `HYPER_AGENTS_API_KEY` into the
255
+ runtime. Do not copy an account API key into the launch environment.
256
+
173
257
  The SDK selects `/usr/local/bin/buzz-acp`, the runtime-specific child ACP
174
258
  command and arguments, the hosted Buzz MCP command, lazy pool creation, relay
175
- observation, and persistent `/home/node` settings. Buzz-reserved environment
176
- keys are rendered from the typed object after caller environment values.
259
+ observation, and persistent `/home/node` settings. `/home/node/shared`
260
+ remains reserved for Workspace projections; the specialized image reconciles
261
+ the Buzz nest after the home mount and runs the harness from
262
+ `/home/node/.buzz`. OpenCode and Codex read its canonical `AGENTS.md`, while
263
+ Claude Code receives `CLAUDE.md -> AGENTS.md`. `base_prompt.md` stays compiled
264
+ into `buzz-acp`. Buzz-reserved environment keys are rendered from the typed
265
+ object after caller environment values.
177
266
  `buzz_enabled=True` remains as a deprecated raw-environment compatibility path.
178
267
  Typed and compatibility Buzz launches select the matching `hypercli-buzz`
179
- image family (`opencode`, `codex`, `claude`, `goose`, or `kimi-code`) by
268
+ image family (`buzz-agent`, `opencode`, `codex`, `claude`, `goose`, or
269
+ `kimi-code`) by
180
270
  default. Ordinary coding-agent helpers without Buzz keep the generic
181
- `ghcr.io/hypercli/hypercli-<runtime>:latest` default. An explicit `image=`
271
+ `ghcr.io/hypercli/hypercli-<runtime>:latest` default, except native Buzz Agent,
272
+ whose runtime image is already `hypercli-buzz-agent`. An explicit `image=`
182
273
  continues to override either default.
183
274
 
184
275
  Direct `BuzzLaunchConfig` renders timeout and response-policy values but does
@@ -187,18 +278,22 @@ are rejected later by `buzz-acp`. The Desktop provider also maps structured
187
278
  Goose model/provider fields to `GOOSE_MODEL`/`GOOSE_PROVIDER`; direct Python
188
279
  SDK callers must set any Goose-specific environment themselves.
189
280
 
190
- Buzz launches require `size="large"`; ordinary coding-agent helpers preserve a
191
- caller-provided size or the backend default. Stock Buzz provider agents do not
281
+ Buzz launches leave size unset for live backend/provider slot selection;
282
+ ordinary coding-agent helpers preserve a caller-provided size or the backend
283
+ default. Stock Buzz provider agents do not
192
284
  start on app launch and the current provider protocol has no stop callback.
193
285
  Editing a running agent does not replace its HyperCLI launch environment: stop
194
286
  the deployment through the authenticated HyperCLI API and deploy it again from
195
- Buzz to apply changes. Desktop's best-effort `!shutdown` chat control may exit
196
- the harness, but it does not stop or release the HyperCLI deployment.
287
+ Buzz to apply changes. A successfully delivered and accepted `!shutdown` can
288
+ exit a new `restart=False` launch; the hosted terminal-state observer then
289
+ reports `stopping`, completes runtime cleanup, marks the deployment `stopped`,
290
+ and releases its slot. Desktop receives no provider acknowledgement and keeps
291
+ its local deployed record.
197
292
 
198
293
  Stock Buzz expects ACP NDJSON. It skips non-JSON child stdout, and
199
294
  `agent_message_chunk` is activity telemetry rather than a channel reply. There
200
295
  is no plaintext fallback; a visible reply requires the agent to invoke the Buzz
201
- send command/tool. The five-runtime SDK coverage validates request rendering,
296
+ send command/tool. The six-runtime SDK coverage validates request rendering,
202
297
  not live launches.
203
298
 
204
299
  The agent nsec and caller environment become raw deployment environment values.
@@ -14,6 +14,8 @@ from .config import (
14
14
  DEFAULT_AGENTS_WS_URL,
15
15
  DEV_AGENTS_API_BASE_URL,
16
16
  DEV_AGENTS_WS_URL,
17
+ get_api_key,
18
+ get_agent_api_key,
17
19
  get_api_url,
18
20
  get_ws_url,
19
21
  get_agents_api_base_url,
@@ -38,6 +40,7 @@ from .renders import Render, RenderStatus
38
40
  from .voice import VoiceAPI
39
41
  from .voice_stream import VoiceChunk, VoiceSession, VoiceStreamError
40
42
  from .models import Model, ModelsAPI
43
+ from .keys import ApiKey, KeysAPI, issue_api_key_from_jwt
41
44
  from .workspaces import (
42
45
  DownloadUrl,
43
46
  Workspace,
@@ -56,17 +59,34 @@ from .user import AuthMe, RuntimeIdentity, User, UserAPI
56
59
  from .job import BaseJob, ComfyUIJob, GradioJob, apply_params, apply_graph_modes, find_node, find_nodes, load_template, graph_to_api, expand_subgraphs, DEFAULT_OBJECT_INFO
57
60
  from .logs import LogStream, stream_logs, fetch_logs
58
61
  from .agents import (
62
+ AGENT_RUNTIME_INACTIVE_STATES,
63
+ AGENT_TRANSITIONAL_STATES,
64
+ AGENT_WAIT_RUNNING_FAILURE_STATES,
59
65
  Agent,
66
+ AgentCapacity,
60
67
  AgentFileSource,
68
+ AgentRouteConfig,
69
+ AgentRoutes,
70
+ AgentSlot,
71
+ AgentSlotInventory,
72
+ BuzzAgent,
61
73
  BuzzLaunchConfig,
74
+ CANONICAL_AGENT_STATES,
62
75
  ClaudeCodeAgent,
63
76
  CodingAgent,
64
77
  CodexAgent,
78
+ DEFAULT_AGENT_RUNTIME_SCOPES,
79
+ DEFAULT_BUZZ_AGENT_IMAGE,
65
80
  DEFAULT_BUZZ_CODING_AGENT_IMAGES,
81
+ DEFAULT_HERMES_AGENT_IMAGE,
82
+ DEFAULT_HERMES_AGENT_SYNC_ROOT,
66
83
  DEFAULT_CODING_AGENT_IMAGES,
84
+ DEFAULT_CODING_AGENT_SYNC_INCLUDES,
85
+ DeploymentEvent,
67
86
  Deployments,
68
87
  ExecResult,
69
88
  GooseAgent,
89
+ HermesAgent,
70
90
  KimiCodeAgent,
71
91
  OpenClawAgent,
72
92
  OpenClawFileSource,
@@ -76,20 +96,44 @@ from .agents import (
76
96
  RuntimeAuthMethod,
77
97
  RuntimeAuthStatus,
78
98
  RuntimeLoginSession,
99
+ build_agent_config,
79
100
  build_browser_desktop_url,
101
+ build_hermes_agent_routes,
80
102
  build_openclaw_memory_index_env,
81
103
  build_openclaw_routes,
82
104
  build_openclaw_workspaces_sync_env,
105
+ is_agent_runtime_inactive_state,
106
+ is_agent_transitional_state,
107
+ )
108
+ from .hermes import (
109
+ HermesAPIError,
110
+ HermesApiClient,
111
+ HermesCapabilities,
112
+ HermesDetailedHealth,
113
+ HermesHealth,
114
+ HermesMessage,
115
+ HermesMessageList,
116
+ HermesModel,
117
+ HermesModels,
118
+ HermesRun,
119
+ HermesSSEEvent,
120
+ HermesSession,
121
+ HermesSessionEnvelope,
122
+ HermesSessionList,
123
+ HermesSessionModelLock,
83
124
  )
84
125
  from .shell import ShellSession, shell_connect
85
126
  from .agent import (
86
127
  HyperAgent,
128
+ HyperAgentCanonicalPlanId,
87
129
  HyperAgentPlan,
88
130
  HyperAgentCurrentPlan,
89
131
  HyperAgentEntitlements,
90
132
  HyperAgentEntitlementsSummary,
91
133
  HyperAgentSubscription,
134
+ HyperAgentSubscriptionMutationResult,
92
135
  HyperAgentSubscriptionSummary,
136
+ HyperAgentSubscriptionTrial,
93
137
  HyperAgentModel,
94
138
  HyperAgentUsageSummary,
95
139
  HyperAgentUsageHistoryEntry,
@@ -109,6 +153,7 @@ from .agent import (
109
153
  HyperAgentPaymentsResponse,
110
154
  HyperAgentStripeCheckoutResponse,
111
155
  HyperAgentX402CheckoutResponse,
156
+ parse_hyper_agent_plan_id,
112
157
  )
113
158
  from .gateway import (
114
159
  GatewayClient,
@@ -121,15 +166,20 @@ from .gateway import (
121
166
  extract_gateway_chat_tool_calls,
122
167
  normalize_gateway_chat_message,
123
168
  )
124
- __version__ = "2026.7.31"
169
+ __version__ = "2026.8.11"
125
170
  __all__ = [
126
171
  "HyperCLI",
127
172
  "configure",
173
+ "get_api_key",
174
+ "get_agent_api_key",
128
175
  "get_api_url",
129
176
  "get_ws_url",
130
177
  "get_agents_api_base_url",
131
178
  "get_agents_ws_url",
132
179
  "APIError",
180
+ "ApiKey",
181
+ "KeysAPI",
182
+ "issue_api_key_from_jwt",
133
183
  # Images
134
184
  "GHCR_IMAGES",
135
185
  "COMFYUI_IMAGE",
@@ -209,17 +259,36 @@ __all__ = [
209
259
  "stream_logs",
210
260
  "fetch_logs",
211
261
  # Agents (Reef Pods)
262
+ "CANONICAL_AGENT_STATES",
263
+ "AGENT_TRANSITIONAL_STATES",
264
+ "AGENT_RUNTIME_INACTIVE_STATES",
265
+ "AGENT_WAIT_RUNNING_FAILURE_STATES",
266
+ "is_agent_transitional_state",
267
+ "is_agent_runtime_inactive_state",
212
268
  "Deployments",
269
+ "DeploymentEvent",
213
270
  "Agent",
271
+ "AgentCapacity",
214
272
  "AgentFileSource",
273
+ "AgentRouteConfig",
274
+ "AgentRoutes",
275
+ "AgentSlot",
276
+ "AgentSlotInventory",
277
+ "BuzzAgent",
215
278
  "BuzzLaunchConfig",
216
279
  "CodingAgent",
280
+ "DEFAULT_AGENT_RUNTIME_SCOPES",
281
+ "DEFAULT_BUZZ_AGENT_IMAGE",
217
282
  "DEFAULT_CODING_AGENT_IMAGES",
283
+ "DEFAULT_CODING_AGENT_SYNC_INCLUDES",
218
284
  "DEFAULT_BUZZ_CODING_AGENT_IMAGES",
285
+ "DEFAULT_HERMES_AGENT_IMAGE",
286
+ "DEFAULT_HERMES_AGENT_SYNC_ROOT",
219
287
  "OpenCodeAgent",
220
288
  "CodexAgent",
221
289
  "ClaudeCodeAgent",
222
290
  "GooseAgent",
291
+ "HermesAgent",
223
292
  "KimiCodeAgent",
224
293
  "OpenClawAgent",
225
294
  "OpenClawFileSource",
@@ -229,21 +298,42 @@ __all__ = [
229
298
  "RuntimeAuthStatus",
230
299
  "RuntimeLoginSession",
231
300
  "ExecResult",
301
+ "build_agent_config",
232
302
  "build_browser_desktop_url",
303
+ "build_hermes_agent_routes",
233
304
  "build_openclaw_routes",
234
305
  "build_openclaw_memory_index_env",
235
306
  "build_openclaw_workspaces_sync_env",
307
+ # Hermes API Server
308
+ "HermesAPIError",
309
+ "HermesApiClient",
310
+ "HermesCapabilities",
311
+ "HermesDetailedHealth",
312
+ "HermesHealth",
313
+ "HermesMessage",
314
+ "HermesMessageList",
315
+ "HermesModel",
316
+ "HermesModels",
317
+ "HermesRun",
318
+ "HermesSSEEvent",
319
+ "HermesSession",
320
+ "HermesSessionEnvelope",
321
+ "HermesSessionList",
322
+ "HermesSessionModelLock",
236
323
  # Shell
237
324
  "ShellSession",
238
325
  "shell_connect",
239
326
  # HyperAgent
240
327
  "HyperAgent",
328
+ "HyperAgentCanonicalPlanId",
241
329
  "HyperAgentPlan",
242
330
  "HyperAgentCurrentPlan",
243
331
  "HyperAgentEntitlements",
244
332
  "HyperAgentEntitlementsSummary",
245
333
  "HyperAgentSubscription",
334
+ "HyperAgentSubscriptionMutationResult",
246
335
  "HyperAgentSubscriptionSummary",
336
+ "HyperAgentSubscriptionTrial",
247
337
  "HyperAgentModel",
248
338
  "HyperAgentUsageSummary",
249
339
  "HyperAgentUsageHistoryEntry",
@@ -263,6 +353,7 @@ __all__ = [
263
353
  "HyperAgentPaymentsResponse",
264
354
  "HyperAgentStripeCheckoutResponse",
265
355
  "HyperAgentX402CheckoutResponse",
356
+ "parse_hyper_agent_plan_id",
266
357
  # OpenClaw Gateway
267
358
  "GatewayClient",
268
359
  "GatewayError",