claude-threads 0.31.2 → 0.31.3

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
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.31.3] - 2026-01-03
11
+
12
+ ### Fixed
13
+ - **Clean up stale browser bridge sockets** - Removes stale `claude-mcp-browser-bridge-*` socket files from temp directory before starting Claude CLI. This works around a Claude CLI bug where it tries to `fs.watch()` existing socket files, which fails with `EOPNOTSUPP`. The socket files are left over from previous Chrome integration sessions.
14
+
10
15
  ## [0.31.2] - 2026-01-03
11
16
 
12
17
  ### Fixed
package/dist/index.js CHANGED
@@ -8933,7 +8933,7 @@ var require_minimist = __commonJS((exports, module) => {
8933
8933
  // node_modules/rc/index.js
8934
8934
  var require_rc = __commonJS((exports, module) => {
8935
8935
  var cc = require_utils();
8936
- var join2 = __require("path").join;
8936
+ var join3 = __require("path").join;
8937
8937
  var deepExtend = require_deep_extend();
8938
8938
  var etc = "/etc";
8939
8939
  var win = process.platform === "win32";
@@ -8959,15 +8959,15 @@ var require_rc = __commonJS((exports, module) => {
8959
8959
  }
8960
8960
  if (!win)
8961
8961
  [
8962
- join2(etc, name, "config"),
8963
- join2(etc, name + "rc")
8962
+ join3(etc, name, "config"),
8963
+ join3(etc, name + "rc")
8964
8964
  ].forEach(addConfigFile);
8965
8965
  if (home)
8966
8966
  [
8967
- join2(home, ".config", name, "config"),
8968
- join2(home, ".config", name),
8969
- join2(home, "." + name, "config"),
8970
- join2(home, "." + name + "rc")
8967
+ join3(home, ".config", name, "config"),
8968
+ join3(home, ".config", name),
8969
+ join3(home, "." + name, "config"),
8970
+ join3(home, "." + name + "rc")
8971
8971
  ].forEach(addConfigFile);
8972
8972
  addConfigFile(cc.find("." + name + "rc"));
8973
8973
  if (env3.config)
@@ -15729,8 +15729,30 @@ import { spawn } from "child_process";
15729
15729
  import { EventEmitter as EventEmitter2 } from "events";
15730
15730
  import { resolve as resolve2, dirname as dirname2 } from "path";
15731
15731
  import { fileURLToPath } from "url";
15732
- import { existsSync as existsSync4, readFileSync as readFileSync4, watchFile, unwatchFile, unlinkSync } from "fs";
15732
+ import { existsSync as existsSync4, readFileSync as readFileSync4, watchFile, unwatchFile, unlinkSync, statSync, readdirSync } from "fs";
15733
+ import { tmpdir } from "os";
15734
+ import { join as join2 } from "path";
15733
15735
  var log8 = createLogger("claude");
15736
+ function cleanupBrowserBridgeSockets() {
15737
+ try {
15738
+ const tempDir = tmpdir();
15739
+ const files = readdirSync(tempDir);
15740
+ for (const file of files) {
15741
+ if (file.startsWith("claude-mcp-browser-bridge-")) {
15742
+ const filePath = join2(tempDir, file);
15743
+ try {
15744
+ const stats = statSync(filePath);
15745
+ if (stats.isSocket()) {
15746
+ unlinkSync(filePath);
15747
+ log8.debug(`Removed stale browser bridge socket: ${file}`);
15748
+ }
15749
+ } catch {}
15750
+ }
15751
+ }
15752
+ } catch (err) {
15753
+ log8.debug(`Browser bridge cleanup failed: ${err}`);
15754
+ }
15755
+ }
15734
15756
 
15735
15757
  class ClaudeCli extends EventEmitter2 {
15736
15758
  process = null;
@@ -15784,6 +15806,7 @@ class ClaudeCli extends EventEmitter2 {
15784
15806
  if (this.process)
15785
15807
  throw new Error("Already running");
15786
15808
  this.stderrBuffer = "";
15809
+ cleanupBrowserBridgeSockets();
15787
15810
  const claudePath = process.env.CLAUDE_PATH || "claude";
15788
15811
  const args = [
15789
15812
  "--input-format",
@@ -15969,7 +15992,7 @@ class ClaudeCli extends EventEmitter2 {
15969
15992
  // src/session/commands.ts
15970
15993
  import { randomUUID as randomUUID2 } from "crypto";
15971
15994
  import { resolve as resolve5 } from "path";
15972
- import { existsSync as existsSync7, statSync } from "fs";
15995
+ import { existsSync as existsSync7, statSync as statSync2 } from "fs";
15973
15996
 
15974
15997
  // node_modules/update-notifier/update-notifier.js
15975
15998
  import process10 from "process";
@@ -19993,7 +20016,7 @@ async function changeDirectory(session, newDir, username, ctx) {
19993
20016
  await postError(session, `Directory does not exist: \`${newDir}\``);
19994
20017
  return;
19995
20018
  }
19996
- if (!statSync(absoluteDir).isDirectory()) {
20019
+ if (!statSync2(absoluteDir).isDirectory()) {
19997
20020
  await postError(session, `Not a directory: \`${newDir}\``);
19998
20021
  return;
19999
20022
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-threads",
3
- "version": "0.31.2",
3
+ "version": "0.31.3",
4
4
  "description": "Share Claude Code sessions live in a Mattermost channel with interactive features",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",