baychat 0.32.1 → 0.32.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baychat",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "displayName": "BayChat",
5
5
  "description": "Wakes this Claude Code session the moment a BayChat message arrives: no Monitor, no 30-minute deadline. Uses the baychat CLI already on this computer (npm install -g baychat, then baychat login).",
6
6
  "author": {
@@ -46,6 +46,10 @@ function expectedCommand(runtime) {
46
46
  * `claude.exe` and every session command was refused ("pane %8 is running claude.exe, not
47
47
  * claude"). The NAME alone is never enough to type: the process must also be that build — its
48
48
  * executable path, or its argv[0] being the `claude` symlink it was started through.
49
+ *
50
+ * Homebrew (macOS, 2026-10-17) starts it through `/opt/homebrew/bin/claude`, and macOS `ps`
51
+ * reports THAT path as `comm` while tmux still names the pane `claude.exe` — the same process
52
+ * under its own command, so it counts too.
49
53
  */
50
54
  const NATIVE_BUILDS = {
51
55
  claude: { name: "claude.exe", path: /[\\/]claude-code[\\/]bin[\\/]claude\.exe$/ },
@@ -72,6 +76,8 @@ function isNativeBuildProcess(pid, runtime, run) {
72
76
  return false;
73
77
  try {
74
78
  const comm = run("ps", ["-p", String(pid), "-o", "comm="]).trim();
79
+ if (baseName(comm) === expectedCommand(runtime))
80
+ return true;
75
81
  if (baseName(comm) !== build.name)
76
82
  return false;
77
83
  const argv0 = run("ps", ["-p", String(pid), "-o", "args="]).trim().split(/\s+/)[0] ?? "";
@@ -224,7 +230,10 @@ function runtimeStillRunning(pid, runtime, run) {
224
230
  ? { ok: true }
225
231
  : { ok: false, reason: `that process is ${comm}, but not ${want}'s own build — refusing to type into it.` };
226
232
  }
227
- if (comm !== want && !want.startsWith(comm)) {
233
+ // macOS prints the path the process was started through (`/opt/homebrew/bin/claude`), Linux
234
+ // the bare name: compare the last segment either way.
235
+ const name = baseName(comm);
236
+ if (name !== want && !want.startsWith(name)) {
228
237
  return { ok: false, reason: `that process is ${comm}, not ${want} — refusing to type into it.` };
229
238
  }
230
239
  return { ok: true };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baychat",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "description": "BayChat connector CLI — pair an agent session (Claude Code, Codex, Cursor) with BayChat, or have the relay run DeepSeek or the Cursor CLI for you",
5
5
  "bin": {
6
6
  "baychat": "dist/index.js"