@aiaiai-pt/martha-cli 0.57.0 → 0.58.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  All notable changes to `@aiaiai-pt/martha-cli`. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This project adheres to semver — `0.x` releases may include breaking changes between minor versions.
4
4
 
5
+ ## [0.58.1] — 2026-08-04
6
+
7
+ ### Fixed — provisioning called an existing agent blind when it wasn't
8
+
9
+ 0.57.0 taught `bootstrap --mode agent` to say `granted NO collections — its
10
+ retrieval tools will return nothing`. True for an agent created by that call;
11
+ false for one that already existed, whose grants predate it. The honest
12
+ statement for an adopted agent is that this call granted nothing *new* and left
13
+ its access alone, so that is what it says now — and the "will get an empty
14
+ list" warning is limited to agents we just created and therefore know are
15
+ empty. Reporting a false alarm is the same failure as reporting nothing, in the
16
+ other direction.
17
+
18
+ ## [0.58.0] — 2026-08-04
19
+
20
+ ### Fixed — the harness pointed strangers at a 404
21
+
22
+ Buzz shows a runtime's `installInstructionsUrl` exactly when its binary is not
23
+ on PATH — to someone who has just picked Martha and has nothing installed. Ours
24
+ pointed at `docs.martha.nomadriver.co/cli/buzz`, which has never existed. It now
25
+ points at **`/buzz`**, a page written for that arrival, and `installHint` is the
26
+ `npx` one-liner rather than `npm i -g`: a hint that requires a prior install is
27
+ no hint for someone who has installed nothing.
28
+
29
+ `--print` now writes a short header to **stderr** saying what the JSON is and
30
+ where it goes, so `--print > martha.json` still produces a clean file while a
31
+ paste into a Settings form or a gist carries its own context.
32
+
5
33
  ## [0.57.0] — 2026-08-03
6
34
 
7
35
  ### Fixed — `bootstrap --mode agent` produced an agent that could not do anything
package/README.md CHANGED
@@ -90,6 +90,27 @@ martha agents list --json | jq '.[] | {name, status}'
90
90
 
91
91
  Exit codes: `0` success · `1` generic error · `2` auth failure · `3` not found · `4` validation · `5` conflict (409).
92
92
 
93
+ ## Put an agent in a Buzz channel
94
+
95
+ One command, no install of its own:
96
+
97
+ ```bash
98
+ npx -y @aiaiai-pt/martha-cli channels install-harness buzz
99
+ ```
100
+
101
+ Then in [Buzz](https://github.com/block/buzz) Desktop: **New agent → runtime "Martha"**. The command registers Martha as an ACP runtime by writing a definition into Buzz's own app-data directory — the supported route for any ACP agent, no PR and no plugin.
102
+
103
+ To have an agent for it to be, and leave Buzz's **Edit Agent** empty:
104
+
105
+ ```bash
106
+ martha principals bootstrap --mode agent --agent support \
107
+ --prompt "You answer support questions from our handbook." \
108
+ --intents rag --collections "Handbook" --save-profile support
109
+ martha channels install-harness buzz --use-profile support
110
+ ```
111
+
112
+ The profile *name* goes in the definition; the credential stays in `~/.martha/credentials.json` (0600). Check everything before trusting it with `martha channels preflight buzz --agent support --relay wss://…`, which names each missing precondition and exits non-zero. Full guide: <https://docs.martha.nomadriver.co/buzz>.
113
+
93
114
  ## Agent integration
94
115
 
95
116
  This package ships an agent-facing skill reference at `skills/martha-cli/SKILL.md` describing every command, JSON contract, and conceptual primitive (tenant, agent, function, task, etc.). Agent harnesses can pull it directly:
package/dist/index.js CHANGED
@@ -11149,7 +11149,7 @@ init_config();
11149
11149
  init_errors();
11150
11150
 
11151
11151
  // src/version.ts
11152
- var CLI_VERSION = "0.57.0";
11152
+ var CLI_VERSION = "0.58.1";
11153
11153
 
11154
11154
  // src/commands/sessions.ts
11155
11155
  function relativeTime(iso) {
@@ -14621,16 +14621,17 @@ async function bootstrapAgentPrincipal(ctx, agent, opts = {}) {
14621
14621
  throw new CLIError("Bootstrap did not return service-account credentials.", 1 /* Error */, "Check that your user has the admin realm role (integration mode requires it).");
14622
14622
  }
14623
14623
  const agentName = boot.agent?.name ?? agent;
14624
+ const agentAdopted = boot.agent?.adopted === true;
14624
14625
  steps.push(boot.adopted ? `reusing principal '${boot.service_account.client_id}' (same secret — recovery, not rotation)` : `provisioned principal '${boot.service_account.client_id}'`);
14625
14626
  steps.push(boot.agent?.adopted ? `bound existing agent '${agentName}' to client ${boot.client_id}` : `created agent '${agentName}' (runs_as_chat) and bound it to client ${boot.client_id}`);
14626
14627
  const fns = boot.agent?.granted_functions ?? [];
14627
14628
  steps.push(fns.length ? `granted its tools: ${fns.join(", ")}` : "granted NO tools — pass --intents rag (or documents/tasks) or it can do nothing");
14628
14629
  const cols = boot.agent?.granted_collections ?? [];
14629
- steps.push(cols.length ? `granted it read on: ${cols.join(", ")}` : "granted NO collections — its retrieval tools will return nothing until you pass --collections");
14630
+ steps.push(cols.length ? `granted it read on: ${cols.join(", ")}` : agentAdopted ? "granted no new collections (existing access unchanged)" : "granted NO collections — its retrieval tools will return nothing until you pass --collections");
14630
14631
  if (!fns.length) {
14631
14632
  warnings.push("no tools: this agent will answer from the model alone.");
14632
14633
  }
14633
- if (fns.length && !cols.length) {
14634
+ if (fns.length && !cols.length && !agentAdopted) {
14634
14635
  warnings.push(`it can call list_collections and will get an empty list — grant one: martha collections grant <name> --to agent:${boot.agent?.agent_id ?? "<id>"}`);
14635
14636
  }
14636
14637
  for (const s of boot.skipped ?? []) {
@@ -14792,6 +14793,7 @@ init_errors();
14792
14793
  var AGENTS_PATH2 = "/api/admin/definitions/agents";
14793
14794
  var SUPPORTED_CHANNELS = ["buzz"];
14794
14795
  var BUZZ_HARNESS_ID = "martha";
14796
+ var BUZZ_INSTALL_DOCS_URL = "https://docs.martha.nomadriver.co/buzz";
14795
14797
  function buzzHarnessDefinition(opts = {}) {
14796
14798
  return {
14797
14799
  id: opts.id ?? BUZZ_HARNESS_ID,
@@ -14804,8 +14806,8 @@ function buzzHarnessDefinition(opts = {}) {
14804
14806
  BUZZ_ACP_KINDS: DEFAULT_BUZZ_KINDS,
14805
14807
  ...opts.profile ? { MARTHA_PROFILE: opts.profile } : {}
14806
14808
  },
14807
- installInstructionsUrl: "https://docs.martha.nomadriver.co/cli/buzz",
14808
- installHint: "npm i -g @aiaiai-pt/martha-cli"
14809
+ installInstructionsUrl: BUZZ_INSTALL_DOCS_URL,
14810
+ installHint: "npx -y @aiaiai-pt/martha-cli channels install-harness buzz"
14809
14811
  };
14810
14812
  }
14811
14813
  function isValidHarnessId(id) {
@@ -15238,6 +15240,11 @@ function registerChannelCommands(program2) {
15238
15240
  const json = JSON.stringify(def, null, 2) + `
15239
15241
  `;
15240
15242
  if (opts.print) {
15243
+ process.stderr.write(`# Buzz custom harness definition — save as ${def.id}.json in Buzz's
15244
+ ` + `# custom_harnesses directory, or let the CLI place it:
15245
+ ` + `# npx -y @aiaiai-pt/martha-cli channels install-harness buzz
15246
+ ` + `# ${BUZZ_INSTALL_DOCS_URL}
15247
+ `);
15241
15248
  console.log(json);
15242
15249
  return;
15243
15250
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiaiai-pt/martha-cli",
3
- "version": "0.57.0",
3
+ "version": "0.58.1",
4
4
  "description": "Terminal-first client for the Martha AI platform",
5
5
  "homepage": "https://docs.martha.nomadriver.co",
6
6
  "repository": {