xtrm-tools 2.1.22 → 2.1.24

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/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-cli",
3
- "version": "2.1.22",
3
+ "version": "2.1.24",
4
4
  "description": "Claude Code tools installer (skills, hooks, MCP servers)",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -43,9 +43,9 @@ export default function (pi: ExtensionAPI) {
43
43
  if (ctx.hasUI) {
44
44
  ctx.ui.notify("Beads: Edit blocked. Claim an issue first.", "warning");
45
45
  }
46
- return {
47
- block: true,
48
- reason: "No active issue claim for this session. Use `/claim <id>` to track your work."
46
+ return {
47
+ block: true,
48
+ reason: `No active issue claim for this session (${sessionId}).\n bd update <id> --claim\n bd kv set "claimed:${sessionId}" "<id>"`,
49
49
  };
50
50
  }
51
51
  }
@@ -56,9 +56,9 @@ export default function (pi: ExtensionAPI) {
56
56
  if (command && /\bgit\s+commit\b/.test(command)) {
57
57
  const claim = await getSessionClaim(sessionId, cwd);
58
58
  if (claim) {
59
- return {
60
- block: true,
61
- reason: `Resolve open claim [${claim}] before committing.`
59
+ return {
60
+ block: true,
61
+ reason: `Resolve open claim [${claim}] before committing.`,
62
62
  };
63
63
  }
64
64
  }
@@ -70,6 +70,21 @@ export default function (pi: ExtensionAPI) {
70
70
  pi.on("tool_result", async (event, ctx) => {
71
71
  if (isBashToolResult(event)) {
72
72
  const command = event.input.command;
73
+
74
+ // Auto-claim on bd update --claim regardless of exit code.
75
+ // bd returns exit 1 with "already in_progress" when status unchanged — still a valid claim intent.
76
+ if (command && /\bbd\s+update\b/.test(command) && /--claim\b/.test(command)) {
77
+ const issueMatch = command.match(/\bbd\s+update\s+(\S+)/);
78
+ if (issueMatch) {
79
+ const issueId = issueMatch[1];
80
+ const cwd = getCwd(ctx);
81
+ const sessionId = ctx.sessionManager.sessionId;
82
+ await SubprocessRunner.run("bd", ["kv", "set", `claimed:${sessionId}`, issueId], { cwd });
83
+ const claimNotice = `\n\n✅ **Beads**: Session \`${sessionId}\` claimed issue \`${issueId}\`. File edits are now unblocked.`;
84
+ return { content: [...event.content, { type: "text", text: claimNotice }] };
85
+ }
86
+ }
87
+
73
88
  if (command && /\bbd\s+close\b/.test(command) && !event.isError) {
74
89
  const reminder = "\n\n**Beads Insight**: Work completed. Consider if this session produced insights worth persisting via `bd remember`.";
75
90
  const newContent = [...event.content, { type: "text", text: reminder }];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xtrm-tools",
3
- "version": "2.1.22",
3
+ "version": "2.1.24",
4
4
  "description": "Claude Code tools installer (skills, hooks, MCP servers)",
5
5
  "license": "MIT",
6
6
  "type": "module",