next-issue 16.6.0 → 16.8.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.
@@ -94,9 +94,9 @@ async function watchPasses(failed, watch) {
94
94
  }
95
95
  const minutes = backOffMinutes(step);
96
96
  step += 1;
97
- const woken = watch.watching?.changed();
97
+ const woken = AbortSignal.any([watch.watching?.changed(), watch.lookNow?.()].filter((signal) => signal !== undefined));
98
98
  if (!(await watch.wait(minutes, woken))) {
99
- if (woken?.aborted !== true || watch.stop() || !watching()) {
99
+ if (!woken.aborted || watch.stop() || !watching()) {
100
100
  return { reports };
101
101
  }
102
102
  step = 0;
@@ -86,6 +86,7 @@ export function watchRun(args, loop, context, controls, print) {
86
86
  hunter: hunt,
87
87
  hunting: controls.hunting ?? onOff(args.hunt),
88
88
  watching: controls.watching,
89
+ lookNow: controls.lookNow,
89
90
  });
90
91
  }
91
92
  function recordLoopEnd(recorder, stoppedAt, stopped, error) {
@@ -7,6 +7,7 @@ export function newRun(progress) {
7
7
  return {
8
8
  progress,
9
9
  children: runChildren(),
10
+ lookNow: new AbortController(),
10
11
  watching: onOff(progress.watching === true),
11
12
  hunting: onOff(progress.hunting),
12
13
  };
@@ -51,6 +52,8 @@ export function joinRun(run, given) {
51
52
  if (given.hunt !== undefined) {
52
53
  setHunting(run, given.hunt);
53
54
  }
55
+ run.lookNow.abort();
56
+ run.lookNow = new AbortController();
54
57
  return undefined;
55
58
  }
56
59
  export function stopPoint(after) {
@@ -137,6 +140,7 @@ export function runControls(run, update) {
137
140
  interrupts: runInterrupts(run),
138
141
  hunting: run.hunting,
139
142
  watching: run.watching,
143
+ lookNow: () => run.lookNow.signal,
140
144
  onEvent: (record) => update(applyEvent(run.progress, record)),
141
145
  onHunter: (busy) => {
142
146
  run.huntBusy = busy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "16.6.0",
3
+ "version": "16.8.0",
4
4
  "description": "Autonomous issue harness driven by the Claude Agent SDK",
5
5
  "keywords": [
6
6
  "github",
@@ -42,7 +42,11 @@ Turn the problem of the user into one GitHub issue, or a split of linked issues
42
42
 
43
43
  For a confirmed split, repeat steps 5 to 7 for each issue of the split, in order. Create each one with `--blocked-by` the issues of the split it depends on, so it is linked before you add its ready label.
44
44
 
45
- 8. Once the issue exists, or the last issue of a split, give the user the issue url, or each url of a split, and stop. Run no next-issue command and ask nothing about a run.
45
+ 8. Once the issue exists with its ready label, or the last issue of a split has its ready label, run `npx -y next-issue@latest status` once. When `labels.ready` is empty, run it too, since the worker claims every open issue.
46
+
47
+ When the first line of the status starts with `stopping`, run no `start`: the run is stopping, so the issue waits for the next run. Otherwise run `npx -y next-issue@latest start` once. It starts a run when none is going, and joins a going run.
48
+
49
+ Then give the user the issue url, or each url of a split, and the outcome of `start`, or that the run is stopping, in one line, and stop.
46
50
 
47
51
  9. When the user asks for a change to the issue, make the change on GitHub. Write the new body into the temporary file and run:
48
52