claude-threads 1.31.0 → 1.31.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 +9 -0
- package/dist/index.js +6 -2
- package/dist/mcp/mcp-server.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.31.1] - 2026-08-29
|
|
9
|
+
|
|
10
|
+
### Security
|
|
11
|
+
- **Regression guard for the cross-platform resume scoping (1.31.0).** The `resumePausedSession` sink is now covered by a test that fails if the `platformId` scope is removed — a message on one platform must never resume a session persisted under another platform whose thread id collides. The fix shipped correct in 1.31.0 but without this guard.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **A rejected branch name can no longer break its own error message.** An invalid `!worktree <name>` whose name contains a backtick or newline is sanitized for display, so it stays inside its markdown code span in the error post.
|
|
15
|
+
- **A downgraded "✅ Invite to session" reaction is no longer silent.** When a non-owner participant's ✅ is downgraded to a one-shot allow (only the owner may grant standing membership), the bot now says so, instead of leaving the reactor to assume the invite succeeded.
|
|
16
|
+
|
|
8
17
|
## [1.31.0] - 2026-08-29
|
|
9
18
|
|
|
10
19
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -62633,6 +62633,7 @@ class MessageApprovalExecutor extends BaseExecutor {
|
|
|
62633
62633
|
const isInviteAuthorized = pending.sessionOwner !== undefined && user === pending.sessionOwner || ctx.platform.isUserAllowed(user);
|
|
62634
62634
|
if (!isInviteAuthorized) {
|
|
62635
62635
|
ctx.logger.info(`Message approval invite (✅) from @${user} downgraded to allow-once: only the session owner may invite`);
|
|
62636
|
+
await ctx.createPost(`ℹ️ Only the session owner can invite ${ctx.formatter.formatUserMention(pending.fromUser)} to the session — allowing this one message instead.`, { type: "system" });
|
|
62636
62637
|
const handled2 = await this.handleMessageApprovalResponse(postId, "allow", user, ctx);
|
|
62637
62638
|
ctx.logger.debug(`MessageApprovalExecutor: outcome=allow (invite downgraded), handled=${handled2}`);
|
|
62638
62639
|
return handled2;
|
|
@@ -65482,6 +65483,9 @@ import { randomUUID as randomUUID5 } from "crypto";
|
|
|
65482
65483
|
init_logger();
|
|
65483
65484
|
var log24 = createLogger("worktree");
|
|
65484
65485
|
var sessionLog5 = createSessionLog(log24);
|
|
65486
|
+
function displayBranchName(name) {
|
|
65487
|
+
return name.replace(/[`\r\n]/g, "").slice(0, 100);
|
|
65488
|
+
}
|
|
65485
65489
|
function parseWorktreeError(error) {
|
|
65486
65490
|
const message = error instanceof Error ? error.message : String(error);
|
|
65487
65491
|
const lowerMessage = message.toLowerCase();
|
|
@@ -65652,7 +65656,7 @@ async function handleWorktreeBranchResponse(session, branchName, username, respo
|
|
|
65652
65656
|
return false;
|
|
65653
65657
|
}
|
|
65654
65658
|
if (!isValidBranchName(branchName)) {
|
|
65655
|
-
await postError(session, `Invalid branch name: \`${branchName}\`. Please provide a valid git branch name.`);
|
|
65659
|
+
await postError(session, `Invalid branch name: \`${displayBranchName(branchName)}\`. Please provide a valid git branch name.`);
|
|
65656
65660
|
sessionLog5(session).warn(`\uD83C\uDF3F Invalid branch name: ${branchName}`);
|
|
65657
65661
|
return true;
|
|
65658
65662
|
}
|
|
@@ -65696,7 +65700,7 @@ async function createAndSwitchToWorktree(session, branch, username, options) {
|
|
|
65696
65700
|
if (!await requireSessionOwner(session, username, "manage worktrees"))
|
|
65697
65701
|
return;
|
|
65698
65702
|
if (!isValidBranchName(branch)) {
|
|
65699
|
-
await postError(session, `Invalid branch name: \`${branch}\`. Please provide a valid git branch name.`);
|
|
65703
|
+
await postError(session, `Invalid branch name: \`${displayBranchName(branch)}\`. Please provide a valid git branch name.`);
|
|
65700
65704
|
sessionLog5(session).warn(`\uD83C\uDF3F Rejected invalid branch name: ${branch}`);
|
|
65701
65705
|
return;
|
|
65702
65706
|
}
|
package/dist/mcp/mcp-server.js
CHANGED
|
@@ -51310,6 +51310,7 @@ class MessageApprovalExecutor extends BaseExecutor {
|
|
|
51310
51310
|
const isInviteAuthorized = pending.sessionOwner !== undefined && user === pending.sessionOwner || ctx.platform.isUserAllowed(user);
|
|
51311
51311
|
if (!isInviteAuthorized) {
|
|
51312
51312
|
ctx.logger.info(`Message approval invite (✅) from @${user} downgraded to allow-once: only the session owner may invite`);
|
|
51313
|
+
await ctx.createPost(`ℹ️ Only the session owner can invite ${ctx.formatter.formatUserMention(pending.fromUser)} to the session — allowing this one message instead.`, { type: "system" });
|
|
51313
51314
|
const handled2 = await this.handleMessageApprovalResponse(postId, "allow", user, ctx);
|
|
51314
51315
|
ctx.logger.debug(`MessageApprovalExecutor: outcome=allow (invite downgraded), handled=${handled2}`);
|
|
51315
51316
|
return handled2;
|
package/package.json
CHANGED