claude-threads 1.5.1 → 1.6.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.
- package/CHANGELOG.md +44 -0
- package/bin/claude-threads-daemon +3 -0
- package/dist/index.js +192 -1118
- package/dist/mcp/permission-server.js +41 -13
- package/dist/statusline/writer.js +3 -2
- package/package.json +13 -7
|
@@ -49758,9 +49758,9 @@ var chromeToolsFormatter = {
|
|
|
49758
49758
|
const coord = input.coordinate;
|
|
49759
49759
|
const url2 = input.url || "";
|
|
49760
49760
|
const text = input.text || "";
|
|
49761
|
-
let detail = "";
|
|
49762
49761
|
switch (tool) {
|
|
49763
49762
|
case "computer": {
|
|
49763
|
+
let detail;
|
|
49764
49764
|
switch (action) {
|
|
49765
49765
|
case "screenshot":
|
|
49766
49766
|
detail = "screenshot";
|
|
@@ -50009,7 +50009,7 @@ var playwrightToolsFormatter = {
|
|
|
50009
50009
|
switch (tool) {
|
|
50010
50010
|
case "browser_navigate": {
|
|
50011
50011
|
const url2 = input.url || "";
|
|
50012
|
-
let domain2
|
|
50012
|
+
let domain2;
|
|
50013
50013
|
try {
|
|
50014
50014
|
domain2 = new URL(url2).hostname;
|
|
50015
50015
|
} catch {
|
|
@@ -50032,7 +50032,7 @@ var playwrightToolsFormatter = {
|
|
|
50032
50032
|
case "browser_wait_for": {
|
|
50033
50033
|
const time5 = input.time;
|
|
50034
50034
|
const selector = input.selector;
|
|
50035
|
-
let waitFor
|
|
50035
|
+
let waitFor;
|
|
50036
50036
|
if (time5)
|
|
50037
50037
|
waitFor = `${time5}ms`;
|
|
50038
50038
|
else if (selector)
|
|
@@ -50560,7 +50560,13 @@ var VERSION = pkgInfo.version;
|
|
|
50560
50560
|
var import_semver = __toESM(require_semver2(), 1);
|
|
50561
50561
|
import { execSync } from "child_process";
|
|
50562
50562
|
import { existsSync as existsSync2 } from "fs";
|
|
50563
|
-
|
|
50563
|
+
import { join } from "path";
|
|
50564
|
+
var COMMON_CLAUDE_PATHS = process.platform === "win32" ? [
|
|
50565
|
+
...process.env.APPDATA ? [join(process.env.APPDATA, "npm", "claude.cmd")] : [],
|
|
50566
|
+
...process.env.LOCALAPPDATA ? [join(process.env.LOCALAPPDATA, "npm", "claude.cmd")] : [],
|
|
50567
|
+
...process.env.NVM_SYMLINK ? [join(process.env.NVM_SYMLINK, "claude.cmd")] : [],
|
|
50568
|
+
...process.env.USERPROFILE ? [join(process.env.USERPROFILE, ".bun", "bin", "claude.cmd")] : []
|
|
50569
|
+
] : [
|
|
50564
50570
|
"/usr/local/bin/claude",
|
|
50565
50571
|
"/opt/homebrew/bin/claude",
|
|
50566
50572
|
`${process.env.HOME}/.local/bin/claude`,
|
|
@@ -50594,12 +50600,14 @@ function tryClaudeVersion(claudePath) {
|
|
|
50594
50600
|
}
|
|
50595
50601
|
function findClaudeInPath() {
|
|
50596
50602
|
try {
|
|
50597
|
-
const
|
|
50603
|
+
const findCommand = process.platform === "win32" ? "where claude" : "which claude";
|
|
50604
|
+
const result = execSync(findCommand, {
|
|
50598
50605
|
encoding: "utf8",
|
|
50599
50606
|
timeout: 5000,
|
|
50600
50607
|
stdio: ["pipe", "pipe", "pipe"]
|
|
50601
50608
|
}).trim();
|
|
50602
|
-
|
|
50609
|
+
const firstLine = result.split(/\r?\n/)[0];
|
|
50610
|
+
return firstLine || null;
|
|
50603
50611
|
} catch {
|
|
50604
50612
|
return null;
|
|
50605
50613
|
}
|
|
@@ -54100,9 +54108,9 @@ class Redactor {
|
|
|
54100
54108
|
|
|
54101
54109
|
// src/persistence/thread-logger.ts
|
|
54102
54110
|
import { homedir } from "os";
|
|
54103
|
-
import { join, dirname as dirname3 } from "path";
|
|
54111
|
+
import { join as join2, dirname as dirname3 } from "path";
|
|
54104
54112
|
var log6 = createLogger("thread-log");
|
|
54105
|
-
var LOGS_BASE_DIR =
|
|
54113
|
+
var LOGS_BASE_DIR = join2(homedir(), ".claude-threads", "logs");
|
|
54106
54114
|
|
|
54107
54115
|
// src/operations/bug-report/handler.ts
|
|
54108
54116
|
var piiRedactor = new Redactor({ aggressive: true });
|
|
@@ -54122,14 +54130,26 @@ class UsernameAnonymizer {
|
|
|
54122
54130
|
return anonymized;
|
|
54123
54131
|
}
|
|
54124
54132
|
}
|
|
54133
|
+
// src/utils/spawn.ts
|
|
54134
|
+
import { spawn as nodeSpawn, spawnSync as nodeSpawnSync } from "child_process";
|
|
54135
|
+
var isWindows = process.platform === "win32";
|
|
54136
|
+
function addWindowsShell(options2) {
|
|
54137
|
+
if (isWindows && options2.shell === undefined) {
|
|
54138
|
+
return { ...options2, shell: true };
|
|
54139
|
+
}
|
|
54140
|
+
return options2;
|
|
54141
|
+
}
|
|
54142
|
+
function crossSpawn(command, args, options2) {
|
|
54143
|
+
return nodeSpawn(command, args, addWindowsShell(options2 ?? {}));
|
|
54144
|
+
}
|
|
54145
|
+
|
|
54125
54146
|
// src/claude/cli.ts
|
|
54126
|
-
import { spawn as spawn2 } from "child_process";
|
|
54127
54147
|
import { EventEmitter as EventEmitter2 } from "events";
|
|
54128
54148
|
import { resolve as resolve3, dirname as dirname4 } from "path";
|
|
54129
54149
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
54130
54150
|
import { existsSync as existsSync4, readFileSync as readFileSync3, watchFile, unwatchFile, unlinkSync, statSync, readdirSync } from "fs";
|
|
54131
54151
|
import { tmpdir } from "os";
|
|
54132
|
-
import { join as
|
|
54152
|
+
import { join as join3 } from "path";
|
|
54133
54153
|
var log7 = createLogger("claude");
|
|
54134
54154
|
function cleanupBrowserBridgeSockets() {
|
|
54135
54155
|
try {
|
|
@@ -54137,7 +54157,7 @@ function cleanupBrowserBridgeSockets() {
|
|
|
54137
54157
|
const files = readdirSync(tempDir);
|
|
54138
54158
|
for (const file2 of files) {
|
|
54139
54159
|
if (file2.startsWith("claude-mcp-browser-bridge-")) {
|
|
54140
|
-
const filePath =
|
|
54160
|
+
const filePath = join3(tempDir, file2);
|
|
54141
54161
|
try {
|
|
54142
54162
|
const stats = statSync(filePath);
|
|
54143
54163
|
if (stats.isSocket()) {
|
|
@@ -54268,7 +54288,7 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
54268
54288
|
args.push("--append-system-prompt", this.options.appendSystemPrompt);
|
|
54269
54289
|
}
|
|
54270
54290
|
if (this.options.sessionId) {
|
|
54271
|
-
this.statusFilePath =
|
|
54291
|
+
this.statusFilePath = join3(tmpdir(), `claude-threads-status-${this.options.sessionId}.json`);
|
|
54272
54292
|
const statusLineWriterPath = this.getStatusLineWriterPath();
|
|
54273
54293
|
const statusLineSettings = {
|
|
54274
54294
|
statusLine: {
|
|
@@ -54280,7 +54300,7 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
54280
54300
|
args.push("--settings", JSON.stringify(statusLineSettings));
|
|
54281
54301
|
}
|
|
54282
54302
|
this.log.debug(`Starting: ${claudePath} ${args.slice(0, 5).join(" ")}...`);
|
|
54283
|
-
this.process =
|
|
54303
|
+
this.process = crossSpawn(claudePath, args, {
|
|
54284
54304
|
cwd: this.options.workingDir,
|
|
54285
54305
|
env: process.env,
|
|
54286
54306
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -54424,11 +54444,19 @@ class ClaudeCli extends EventEmitter2 {
|
|
|
54424
54444
|
getMcpServerPath() {
|
|
54425
54445
|
const __filename2 = fileURLToPath3(import.meta.url);
|
|
54426
54446
|
const __dirname4 = dirname4(__filename2);
|
|
54447
|
+
const bundledPath = resolve3(__dirname4, "mcp", "permission-server.js");
|
|
54448
|
+
if (existsSync4(bundledPath)) {
|
|
54449
|
+
return bundledPath;
|
|
54450
|
+
}
|
|
54427
54451
|
return resolve3(__dirname4, "..", "mcp", "permission-server.js");
|
|
54428
54452
|
}
|
|
54429
54453
|
getStatusLineWriterPath() {
|
|
54430
54454
|
const __filename2 = fileURLToPath3(import.meta.url);
|
|
54431
54455
|
const __dirname4 = dirname4(__filename2);
|
|
54456
|
+
const bundledPath = resolve3(__dirname4, "statusline", "writer.js");
|
|
54457
|
+
if (existsSync4(bundledPath)) {
|
|
54458
|
+
return bundledPath;
|
|
54459
|
+
}
|
|
54432
54460
|
return resolve3(__dirname4, "..", "statusline", "writer.js");
|
|
54433
54461
|
}
|
|
54434
54462
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
// src/statusline/writer.ts
|
|
4
4
|
import { writeFileSync, mkdirSync } from "fs";
|
|
5
|
-
import { dirname } from "path";
|
|
5
|
+
import { dirname, join } from "path";
|
|
6
|
+
import { tmpdir } from "os";
|
|
6
7
|
var sessionId = process.argv[2];
|
|
7
8
|
if (!sessionId) {
|
|
8
9
|
console.log("");
|
|
@@ -38,7 +39,7 @@ process.stdin.on("end", () => {
|
|
|
38
39
|
} : null,
|
|
39
40
|
timestamp: Date.now()
|
|
40
41
|
};
|
|
41
|
-
const filePath =
|
|
42
|
+
const filePath = join(tmpdir(), `claude-threads-status-${sessionId}.json`);
|
|
42
43
|
mkdirSync(dirname(filePath), { recursive: true });
|
|
43
44
|
writeFileSync(filePath, JSON.stringify(output, null, 2));
|
|
44
45
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-threads",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.2",
|
|
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",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"zod": "^4.3.6"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@eslint/js": "^
|
|
87
|
+
"@eslint/js": "^10.0.1",
|
|
88
88
|
"@types/bun": "latest",
|
|
89
89
|
"@types/js-yaml": "^4.0.9",
|
|
90
90
|
"@types/node": "^25.0.3",
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"@types/ws": "^8.18.0",
|
|
96
96
|
"@types/yauzl": "^2.10.3",
|
|
97
97
|
"@types/yazl": "^3.3.0",
|
|
98
|
-
"eslint": "^
|
|
98
|
+
"eslint": "^10.1.0",
|
|
99
99
|
"husky": "^9.1.7",
|
|
100
100
|
"lint-staged": "^16.2.7",
|
|
101
101
|
"prettier": "^3.4.2",
|
|
102
|
-
"typescript": "^
|
|
103
|
-
"typescript-eslint": "^8.
|
|
102
|
+
"typescript": "^6.0.2",
|
|
103
|
+
"typescript-eslint": "^8.57.2",
|
|
104
104
|
"yazl": "^3.3.1"
|
|
105
105
|
},
|
|
106
106
|
"engines": {
|
|
@@ -116,11 +116,17 @@
|
|
|
116
116
|
"overrides": {
|
|
117
117
|
"hono": "$hono",
|
|
118
118
|
"@hono/node-server": "$@hono/node-server",
|
|
119
|
-
"express-rate-limit": "$express-rate-limit"
|
|
119
|
+
"express-rate-limit": "$express-rate-limit",
|
|
120
|
+
"flatted": ">=3.4.0",
|
|
121
|
+
"picomatch": ">=2.3.2",
|
|
122
|
+
"path-to-regexp": ">=8.4.0"
|
|
120
123
|
},
|
|
121
124
|
"resolutions": {
|
|
122
125
|
"hono": "$hono",
|
|
123
126
|
"@hono/node-server": "$@hono/node-server",
|
|
124
|
-
"express-rate-limit": "$express-rate-limit"
|
|
127
|
+
"express-rate-limit": "$express-rate-limit",
|
|
128
|
+
"flatted": ">=3.4.0",
|
|
129
|
+
"picomatch": ">=2.3.2",
|
|
130
|
+
"path-to-regexp": ">=8.4.0"
|
|
125
131
|
}
|
|
126
132
|
}
|