@staff0rd/assist 0.557.6 → 0.558.0

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/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.557.6",
9
+ version: "0.558.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -6758,9 +6758,9 @@ function buildArgs(prompt, options2) {
6758
6758
  return prompt ? ["--resume", options2.resumeSessionId, prompt] : ["--resume", options2.resumeSessionId];
6759
6759
  }
6760
6760
  if (options2.sessionId) {
6761
- return ["--session-id", options2.sessionId, prompt];
6761
+ return prompt ? ["--session-id", options2.sessionId, prompt] : ["--session-id", options2.sessionId];
6762
6762
  }
6763
- return [prompt];
6763
+ return prompt ? [prompt] : [];
6764
6764
  }
6765
6765
 
6766
6766
  // src/commands/backlog/ensureStoryBranch.ts
@@ -26098,6 +26098,19 @@ function registerRefactor(program2) {
26098
26098
  registerRestructure(refactorCommand);
26099
26099
  }
26100
26100
 
26101
+ // src/commands/review/checkoutOnlySession.ts
26102
+ import { randomUUID as randomUUID10 } from "crypto";
26103
+ async function checkoutOnlySession(number) {
26104
+ await checkoutPr(number);
26105
+ const claudeSessionId = randomUUID10();
26106
+ emitActivity({ kind: "command", name: "review", claudeSessionId });
26107
+ const { done: done2 } = spawnClaude("", {
26108
+ permissionMode: "acceptEdits",
26109
+ sessionId: claudeSessionId
26110
+ });
26111
+ await done2;
26112
+ }
26113
+
26101
26114
  // src/commands/review/annotateDiffWithLineNumbers.ts
26102
26115
  var FILE_HEADER2 = /^\+\+\+ (?:b\/)?(.+)$/;
26103
26116
  var HUNK_HEADER2 = /^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/;
@@ -27935,10 +27948,26 @@ function validateOptions(options2) {
27935
27948
  );
27936
27949
  process.exit(1);
27937
27950
  }
27951
+ validateCheckoutOnly(options2);
27952
+ }
27953
+ function validateCheckoutOnly(options2) {
27954
+ if (!options2.checkoutOnly) return;
27955
+ if (!options2.number) {
27956
+ console.error("Error: --checkout-only requires a PR number.");
27957
+ process.exit(1);
27958
+ }
27959
+ if (options2.refine || options2.apply || options2.backlog || options2.submit) {
27960
+ console.error(
27961
+ "Error: --checkout-only cannot be combined with --refine, --apply, --backlog or --submit."
27962
+ );
27963
+ process.exit(1);
27964
+ }
27938
27965
  }
27939
27966
  async function review(options2 = {}) {
27940
27967
  validateOptions(options2);
27941
27968
  const invokedIn = resolveRepoRoot();
27969
+ if (options2.checkoutOnly && options2.number)
27970
+ return checkoutOnlySession(options2.number);
27942
27971
  emitActivity({ kind: "command", name: "review" });
27943
27972
  if (!options2.number) return reviewPr(invokedIn, options2);
27944
27973
  await checkoutPr(options2.number);
@@ -27948,7 +27977,7 @@ async function review(options2 = {}) {
27948
27977
  // src/commands/registerReview.ts
27949
27978
  function registerReview(program2) {
27950
27979
  program2.command("review").description(
27951
- "Run Claude and Codex in parallel to review the current branch's PR, or check out a PR by number first when given"
27980
+ "Run Claude and Codex in parallel to review the current branch's PR, or check out a PR by number first when given; --checkout-only just checks the PR out and leaves an idle Claude session in the checkout tree"
27952
27981
  ).argument(
27953
27982
  "[number]",
27954
27983
  "Optional PR number; when provided, runs `gh pr checkout <number>` before reviewing"
@@ -27970,6 +27999,9 @@ function registerReview(program2) {
27970
27999
  ).option(
27971
28000
  "--backlog",
27972
28001
  "After synthesis, launch an interactive Claude session running /bug to file all findings as a single backlog item with one phase per finding, instead of posting to the PR"
28002
+ ).option(
28003
+ "--checkout-only",
28004
+ "Check the PR out and start an idle interactive Claude session in the checkout tree instead of reviewing; requires a PR number and cannot be combined with --refine, --apply, --backlog or --submit"
27973
28005
  ).option(
27974
28006
  "--address-comments",
27975
28007
  "After posting and submitting the review, start an Address Comments session (assist review-pr-comments <n>) for the PR; no-op when nothing was posted or the review was not submitted, and only inside an assist session"
@@ -31432,7 +31464,7 @@ var ClientHub = class extends Set {
31432
31464
  };
31433
31465
 
31434
31466
  // src/commands/sessions/daemon/createSession.ts
31435
- import { randomUUID as randomUUID10 } from "crypto";
31467
+ import { randomUUID as randomUUID11 } from "crypto";
31436
31468
 
31437
31469
  // src/commands/sessions/daemon/sessionBase.ts
31438
31470
  function sessionBase(id, status3) {
@@ -31628,7 +31660,7 @@ function spawnRun(opts) {
31628
31660
  function createSession(id, prompt, cwd, design, harness, holdPty) {
31629
31661
  if (harness && harness !== "claude")
31630
31662
  return createHarnessSession(id, harness, prompt, cwd, holdPty);
31631
- const claudeSessionId = randomUUID10();
31663
+ const claudeSessionId = randomUUID11();
31632
31664
  return {
31633
31665
  ...sessionBase(id, prompt ? "running" : "waiting"),
31634
31666
  name: `Session ${id}`,
@@ -33666,7 +33698,7 @@ function codexRespawnPlan(session) {
33666
33698
  }
33667
33699
 
33668
33700
  // src/commands/sessions/daemon/interactiveRespawnPlan.ts
33669
- import { randomUUID as randomUUID11 } from "crypto";
33701
+ import { randomUUID as randomUUID12 } from "crypto";
33670
33702
  function interactiveRespawnPlan(session, resumes) {
33671
33703
  const { claudeSessionId, cwd, initialPrompt } = session;
33672
33704
  if (!resumes) return null;
@@ -33684,7 +33716,7 @@ function interactiveRespawnPlan(session, resumes) {
33684
33716
  return null;
33685
33717
  }
33686
33718
  function freshClaudePlan(session, prompt, cwd) {
33687
- const claudeSessionId = randomUUID11();
33719
+ const claudeSessionId = randomUUID12();
33688
33720
  return {
33689
33721
  spawn: () => {
33690
33722
  session.claudeSessionId = claudeSessionId;
@@ -34562,10 +34594,10 @@ function startReusedRunPty(session, assistArgs, itemId2, hold, clients, onStatus
34562
34594
  }
34563
34595
 
34564
34596
  // src/commands/sessions/daemon/createWatcherSession.ts
34565
- import { randomUUID as randomUUID12 } from "crypto";
34597
+ import { randomUUID as randomUUID13 } from "crypto";
34566
34598
  var WATCH_PROMPT = "/watch";
34567
34599
  function createWatcherSession(id, cwd) {
34568
- const claudeSessionId = randomUUID12();
34600
+ const claudeSessionId = randomUUID13();
34569
34601
  return {
34570
34602
  ...sessionBase(id, "running"),
34571
34603
  name: `Session ${id}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.557.6",
3
+ "version": "0.558.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {