@aiaiai-pt/martha-cli 0.53.1 → 0.54.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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
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.54.0] — 2026-08-03
6
+
7
+ ### Added — `channels` uses the Buzz binaries Desktop already ships
8
+
9
+ - `buzz` and `buzz-acp` are now resolved from the user's PATH **or** from Buzz
10
+ Desktop's own bundle (`Buzz.app/Contents/MacOS` and the platform
11
+ equivalents), and `connect` prepends that directory to the harness's PATH so
12
+ `acp-serve --post-reply` can reach `buzz` to deliver. Desktop ships both as
13
+ Tauri sidecars and does exactly this for the agents it spawns itself
14
+ (`runtime/path.rs`); doing the same means a machine with Buzz Desktop
15
+ installed needs nothing on PATH and nothing built. Telling someone to
16
+ `cargo build` a binary sitting in their Applications folder was a
17
+ prerequisite we invented.
18
+ - The two checks now read `buzz-acp` / `buzz CLI` rather than `… on PATH`,
19
+ since PATH is no longer the only place they can come from, and the detail
20
+ says which copy is in use. When neither has it, the fix leads with installing
21
+ Buzz Desktop and keeps the build-from-source path as the alternative.
22
+
5
23
  ## [0.53.1] — 2026-08-03
6
24
 
7
25
  ### Fixed — `channels install-harness` told a Buzz-less machine to "launch Buzz once"
package/dist/index.js CHANGED
@@ -11129,7 +11129,7 @@ init_config();
11129
11129
  init_errors();
11130
11130
 
11131
11131
  // src/version.ts
11132
- var CLI_VERSION = "0.53.1";
11132
+ var CLI_VERSION = "0.54.0";
11133
11133
 
11134
11134
  // src/commands/sessions.ts
11135
11135
  function relativeTime(iso) {
@@ -14785,6 +14785,28 @@ function buzzAppCandidates(platform, env2, home) {
14785
14785
  ];
14786
14786
  }
14787
14787
  var BUZZ_RELEASES_URL = "https://github.com/block/buzz/releases/latest";
14788
+ function buzzSidecarDirs(platform, env2, home) {
14789
+ if (platform === "darwin") {
14790
+ return buzzAppCandidates(platform, env2, home).map((app) => join3(app, "Contents", "MacOS"));
14791
+ }
14792
+ if (platform === "win32") {
14793
+ return buzzAppCandidates(platform, env2, home);
14794
+ }
14795
+ return ["/opt/Buzz"];
14796
+ }
14797
+ function resolveBuzzBinary(bin, opts) {
14798
+ const onPath = resolveOnPath(bin, opts.env, opts.platform, opts.isExecutable);
14799
+ if (onPath)
14800
+ return { path: onPath, source: "path" };
14801
+ if (bin.includes("/") || bin.includes("\\"))
14802
+ return null;
14803
+ for (const dir of buzzSidecarDirs(opts.platform, opts.env, opts.home)) {
14804
+ const candidate = join3(dir, bin);
14805
+ if (opts.isExecutable(candidate))
14806
+ return { path: candidate, source: "desktop" };
14807
+ }
14808
+ return null;
14809
+ }
14788
14810
  function missingAppDataMessage(candidates, appInstalled) {
14789
14811
  const looked = candidates.map((c) => ` ${c.dir} (${c.build})`).join(`
14790
14812
  `);
@@ -14844,6 +14866,14 @@ function executableOnDisk(p) {
14844
14866
  function which(bin) {
14845
14867
  return resolveOnPath(bin, process.env, process.platform, executableOnDisk);
14846
14868
  }
14869
+ function whichBuzz(bin) {
14870
+ return resolveBuzzBinary(bin, {
14871
+ platform: process.platform,
14872
+ env: process.env,
14873
+ home: homedir(),
14874
+ isExecutable: executableOnDisk
14875
+ });
14876
+ }
14847
14877
  function runBin(bin, args, env2) {
14848
14878
  return new Promise((resolve2) => {
14849
14879
  execFile2(bin, args, { env: env2, timeout: 15000, maxBuffer: 4 * 1024 * 1024 }, (err, stdout, stderr) => {
@@ -14889,20 +14919,22 @@ async function preflightBuzz(ctx, opts) {
14889
14919
  fix: supported ? undefined : "upgrade the CLI that is FIRST on PATH: npm i -g @aiaiai-pt/martha-cli@latest (or point --martha-bin at the right one)"
14890
14920
  });
14891
14921
  }
14892
- const acpPath = which(opts.buzzAcpBin);
14922
+ const resolveBin = opts.resolveBin ?? whichBuzz;
14923
+ const acp = resolveBin(opts.buzzAcpBin);
14893
14924
  checks.push({
14894
- ok: !!acpPath,
14895
- label: "buzz-acp on PATH",
14896
- detail: acpPath ?? `'${opts.buzzAcpBin}' not found`,
14897
- fix: acpPath ? undefined : "build it from block/buzz: cargo build -p buzz-acp, then put target/debug on PATH (or pass --buzz-acp-bin)"
14925
+ ok: !!acp,
14926
+ label: "buzz-acp",
14927
+ detail: acp ? acp.source === "desktop" ? `${acp.path} (bundled with Buzz Desktop)` : acp.path : `'${opts.buzzAcpBin}' not found on PATH or in Buzz Desktop`,
14928
+ fix: acp ? undefined : `install Buzz Desktop (${BUZZ_RELEASES_URL}) — it ships this binary — or build it: cargo build -p buzz-acp (or pass --buzz-acp-bin)`
14898
14929
  });
14899
- const buzzPath = which(opts.buzzBin);
14930
+ const buzz = resolveBin(opts.buzzBin);
14900
14931
  checks.push({
14901
- ok: !!buzzPath,
14902
- label: "buzz CLI on PATH",
14903
- detail: buzzPath ?? `'${opts.buzzBin}' not found`,
14904
- fix: buzzPath ? undefined : "build it from block/buzz: cargo build -p buzz-cli — acp-serve --post-reply shells it to deliver the answer"
14932
+ ok: !!buzz,
14933
+ label: "buzz CLI",
14934
+ detail: buzz ? buzz.source === "desktop" ? `${buzz.path} (bundled with Buzz Desktop)` : buzz.path : `'${opts.buzzBin}' not found on PATH or in Buzz Desktop`,
14935
+ fix: buzz ? undefined : `install Buzz Desktop (${BUZZ_RELEASES_URL}) — it ships this binary — or build it: cargo build -p buzz-cli. acp-serve --post-reply shells it to deliver the answer`
14905
14936
  });
14937
+ const buzzPath = buzz?.path ?? null;
14906
14938
  let whoami = null;
14907
14939
  try {
14908
14940
  whoami = await ctx.api.get("/api/tasks/whoami");
@@ -15222,21 +15254,25 @@ function registerChannelCommands(program2) {
15222
15254
  process.exitCode = 1 /* Error */;
15223
15255
  return;
15224
15256
  }
15225
- const acp = which(opts.buzzAcpBin);
15257
+ const acp = whichBuzz(opts.buzzAcpBin);
15258
+ const childPath = [
15259
+ ...buzzSidecarDirs(process.platform, process.env, homedir()).filter((d) => existsSync(d)),
15260
+ process.env.PATH ?? ""
15261
+ ].filter(Boolean).join(process.platform === "win32" ? ";" : ":");
15226
15262
  if (opts.dryRun) {
15227
15263
  console.log(source_default.bold(`Would launch:
15228
15264
  `));
15229
15265
  for (const [k, v] of Object.entries(env2))
15230
15266
  console.log(` ${k}=${v}`);
15231
- console.log(` ${acp}
15267
+ console.log(` ${acp.path}
15232
15268
  `);
15233
15269
  return;
15234
15270
  }
15235
15271
  console.log(source_default.bold(`
15236
15272
  Connecting '${opts.agent}' to ${opts.relay} …
15237
15273
  `));
15238
- const child = spawn3(acp, [], {
15239
- env: { ...process.env, ...env2 },
15274
+ const child = spawn3(acp.path, [], {
15275
+ env: { ...process.env, PATH: childPath, ...env2 },
15240
15276
  stdio: "inherit"
15241
15277
  });
15242
15278
  await new Promise((resolve2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiaiai-pt/martha-cli",
3
- "version": "0.53.1",
3
+ "version": "0.54.0",
4
4
  "description": "Terminal-first client for the Martha AI platform",
5
5
  "homepage": "https://docs.martha.nomadriver.co",
6
6
  "repository": {