@retasc/cli 1.6.3 → 1.7.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.
@@ -67,10 +67,10 @@ export async function claimAction(opts) {
67
67
  }
68
68
  requestedId = norm;
69
69
  }
70
- // --mine filters the next_issue pull; on a targeted claim it would be
70
+ // --all-lanes widens the next_issue pull; on a targeted claim it would be
71
71
  // silently ignored — reject instead of letting the intent evaporate.
72
- if (requestedId && opts.mine) {
73
- note(`✗ --mine only applies when pulling the next issue; drop it to claim ${requestedId} directly.`);
72
+ if (requestedId && opts.allLanes) {
73
+ note(`✗ --all-lanes only applies when pulling the next issue; drop it to claim ${requestedId} directly.`);
74
74
  process.exit(1);
75
75
  }
76
76
  const makeWorktree = opts.worktree !== false;
@@ -99,7 +99,7 @@ export async function claimAction(opts) {
99
99
  try {
100
100
  const result = requestedId
101
101
  ? await mcpCall(conn, "claim_issue", { identifier: requestedId })
102
- : await mcpCall(conn, "next_issue", opts.mine ? { mine: true } : {});
102
+ : await mcpCall(conn, "next_issue", opts.allLanes ? { allLanes: true } : {});
103
103
  claim = parseClaimResult(result);
104
104
  }
105
105
  catch (e) {
@@ -119,6 +119,11 @@ export async function claimAction(opts) {
119
119
  if (claim.ready !== undefined) {
120
120
  note(` ready: ${claim.ready ?? 0} blocked: ${claim.blocked ?? 0} claimed: ${claim.claimed ?? 0}`);
121
121
  }
122
+ // RTSC-306: nothing in YOUR lane, but ready work is stranded in another
123
+ // human's lane — offer the cross-lane opt-out rather than reading "empty".
124
+ if (claim.otherLanes) {
125
+ note(` ${claim.otherLanes} ready in other humans' lanes — re-run with --all-lanes to pull them, or go unblock the owner.`);
126
+ }
122
127
  process.exit(0);
123
128
  }
124
129
  // The id flows into a git ref and a filesystem path — reject a malformed one.
package/dist/index.js CHANGED
@@ -428,7 +428,7 @@ gate
428
428
  function addClaimFlags(cmd) {
429
429
  return cmd
430
430
  .option("--id <RTSC-NN>", "Claim one specific issue instead of the next unblocked one")
431
- .option("--mine", "Pull only issues assigned to your principal (or unassigned)")
431
+ .option("--all-lanes", "Pull from every lane, including other humans' work (default: only your lane + unassigned)")
432
432
  .option("--base <ref>", "Base ref for the new branch", "origin/main")
433
433
  .option("--dir <path>", "Parent dir for the worktree (default: beside the main checkout)")
434
434
  .option("--no-fetch", "Skip refreshing the base ref from origin first")
package/dist/lib/claim.js CHANGED
@@ -120,7 +120,7 @@ export function parseClaimResult(result) {
120
120
  // An empty next_issue (issue:null) — or any payload without a usable id — is a
121
121
  // stall, never a claim. Surface the queue counts so it's never silent.
122
122
  if (!issueId) {
123
- return { ready: r.ready, blocked: r.blocked, claimed: r.claimed };
123
+ return { ready: r.ready, blocked: r.blocked, claimed: r.claimed, otherLanes: r.otherLanes };
124
124
  }
125
125
  const title = typeof r.issue === "object" ? r.issue?.title : undefined;
126
126
  return { issueId, title, claimToken: r.claimToken };
@@ -40,6 +40,15 @@ export function applyObservation(leases, o) {
40
40
  const id = typeof o.args?.identifier === "string" ? o.args.identifier : undefined;
41
41
  if (id && o.toolName === "release_issue")
42
42
  leases.delete(id);
43
+ // RTSC-321: moving to `review` (RTSC-257) hands the lease back server-side (the
44
+ // author's work is done, pending a reviewer), so stop heartbeating it — like a
45
+ // release, NOT a terminal close. It must NOT reap: `terminalCloseId` stays
46
+ // done|canceled only, so the branch/worktree survives for the review + PR. (The
47
+ // reviewer's send-back review→todo also releases server-side but is undetectable
48
+ // from args alone — doing→todo does NOT release — so that case self-heals via the
49
+ // failed-heartbeat path instead.)
50
+ if (id && o.toolName === "save_issue" && o.args?.status === "review")
51
+ leases.delete(id);
43
52
  const closeId = terminalCloseId(o);
44
53
  if (closeId)
45
54
  leases.delete(closeId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retasc/cli",
3
- "version": "1.6.3",
3
+ "version": "1.7.1",
4
4
  "description": "Retasc CLI — sign in with GitHub, create projects, mint agent API keys, and wire your agent to the Retasc MCP server in one command.",
5
5
  "type": "module",
6
6
  "bin": {