@aiaiai-pt/martha-cli 0.34.0 → 0.44.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiaiai-pt/martha-cli",
3
- "version": "0.34.0",
3
+ "version": "0.44.0",
4
4
  "description": "Terminal-first client for the Martha AI platform",
5
5
  "homepage": "https://docs.martha.nomadriver.co",
6
6
  "repository": {
@@ -289,6 +289,33 @@ martha agents agents <coordinator> # List the
289
289
 
290
290
  A grant means the coordinator agent *may* delegate to the sub-agent at invoke time (the sub-agent loads as an `_is_agent` delegate tool); the sub-agent's own tool calls still pass the policy gate under its own grants. `--set key=value` records `config_overrides` for the delegation. Self-delegation is rejected with a clear 400 (`an agent cannot delegate to itself`), and granting an unknown sub-agent returns 404. All three commands support `--json`.
291
291
 
292
+ **Host runner (autonomous host tools) — give an agent a machine to act on:**
293
+
294
+ An unattended `martha runner` executes an agent's host tools (`host_exec`, `host_read`/`host_write`/`host_edit`, …) over a per-agent channel — the autonomous counterpart to `martha chat --local-exec` (where the human's CLI is the runner). Requires the server `CHANNEL_ENABLED=1`.
295
+
296
+ ```bash
297
+ # 1. Create a Martha-hosted agent (reasoning runs in Martha), then wire it up:
298
+ martha agents create --name ops_runner --reasoning martha --model anthropic/claude-sonnet-4-6 --prompt "…"
299
+ martha agents setup-host-runner ops_runner # ONE-SHOT — do this, not the manual steps below
300
+ # [--client <nameOrId>] chat client that may drive it (default: tenant default)
301
+ # [--tools host_exec,host_read,…] override the default host-tool set
302
+ # [--rotate-key] mint a fresh runner key (e.g. lost the old one)
303
+
304
+ # 2. On the target machine, run what setup-host-runner printed:
305
+ export MARTHA_TOKEN=martha_ak_… # the runner key it minted
306
+ martha runner --tools --allow-host-exec --cwd ~/agent-workspace
307
+
308
+ # 3. Drive it (chat / trigger / schedule):
309
+ martha chat --agent ops_runner --message "run 'uname -sm' on my machine and report it"
310
+
311
+ # Diagnose / observe / control:
312
+ martha agents doctor <agent> # green/red checklist + the exact fix per failing step
313
+ martha agents runner-presence [<agent>] # ● connected (host) / ○ disconnected
314
+ martha agents revoke-runner <agent> [--connection <id>] # drop live connection(s); a running runner reconnects
315
+ ```
316
+
317
+ `setup-host-runner` is the correct path: it mints the runner key, grants the host tools, grants a chat client access, and sets `runs_as_chat` (chat takeover) — all four are required for the agent to actually run host tools from chat, and skipping any one leaves it silently undrivable (the agent falls back to text or exposes itself as a sub-agent tool). Only reach for the manual `generate-key` + `add-function` + `clients grant` + `runs_as_chat` sequence if you're scripting it yourself. The runner key is `runner`-scoped (channel `tool.*` only — denied at tasks/events/asks/collections). Full guide: `docs/guides/host-runner.md`.
318
+
292
319
  ---
293
320
 
294
321
  ## Tasks: queue + executor lifecycle