next-issue 16.5.1 → 16.5.3

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.
@@ -9,7 +9,7 @@ const REFUSED_GOING = [
9
9
  'the worker is restarting, try again soon',
10
10
  ];
11
11
  const SILENT = 'the next-issue worker did not answer';
12
- const STARTED = 'next-issue: the run started in the worker; follow it with npx -y next-issue@latest logs and stop it with npx -y next-issue@latest stop\n';
12
+ const STARTED = 'the run started in the worker; follow it with npx -y next-issue@latest logs and stop it with npx -y next-issue@latest stop\n';
13
13
  export async function startInWorker(root, argv) {
14
14
  const version = await packageVersion();
15
15
  const given = givenStartFlags(argv);
@@ -19,7 +19,7 @@ export async function startInWorker(root, argv) {
19
19
  if (going(progress)) {
20
20
  const join = await joined(connection, root, argv, progress);
21
21
  if (join.joined) {
22
- return statusText(connection.version, join.progress);
22
+ return `a run is going already\n${statusText(connection.version, join.progress)}`;
23
23
  }
24
24
  if (!isNewer(version, connection.version) || !REFUSED_GOING.includes(join.refusal)) {
25
25
  throw new Error(join.refusal);
@@ -31,7 +31,7 @@ export async function startInWorker(root, argv) {
31
31
  if (given.hunt !== undefined) {
32
32
  latest = await switched(connection, root, 'hunt', given.hunt);
33
33
  }
34
- return statusText(connection.version, latest);
34
+ return `a run is going already\n${statusText(connection.version, latest)}`;
35
35
  }
36
36
  const id = randomUUID();
37
37
  const accepted = startedRun(connection, root, id);
@@ -3,7 +3,7 @@ import { isNewer } from '../shared/protocol.mjs';
3
3
  import { packageVersion } from '../shared/version.mjs';
4
4
  import { ANSWER_TIMEOUT_MS, CLOSED, findWorker, going, } from '../shared/worker-client.mjs';
5
5
  const FIELDS = { watch: 'watching', hunt: 'hunting' };
6
- const NO_RUN = 'next-issue: no run is going in this repository\n';
6
+ const NO_RUN = 'no run is going in this repository\n';
7
7
  function onOffText(on) {
8
8
  return on === true ? 'on' : 'off';
9
9
  }
@@ -13,7 +13,7 @@ export function switchInWorker(root, name, on) {
13
13
  throw new Error(`the worker of the going run is older than next-issue, so it cannot switch ${FIELDS[name]}. Stop the run, then start it again`);
14
14
  }
15
15
  const progress = await switched(connection, root, name, on);
16
- return `next-issue: watching ${onOffText(progress.watching)}, hunting ${onOffText(progress.hunting)}\n`;
16
+ return `watching ${onOffText(progress.watching)}, hunting ${onOffText(progress.hunting)}\n`;
17
17
  });
18
18
  }
19
19
  async function inWorker(root, act) {
@@ -56,10 +56,10 @@ export function switched(connection, root, name, on) {
56
56
  export function stopInWorker(root) {
57
57
  return inWorker(root, async (connection, progress) => {
58
58
  if (progress.status === 'stopping' && progress.upgrade === undefined) {
59
- return 'next-issue: the run is stopping already\n';
59
+ return 'the run is stopping already\n';
60
60
  }
61
61
  const reply = await stopReply(connection, root);
62
- return `next-issue: ${stopText(progress, reply)}\n`;
62
+ return `${stopText(progress, reply)}\n`;
63
63
  });
64
64
  }
65
65
  function stopReply(connection, root) {
@@ -103,7 +103,7 @@ export function statusInWorker(root) {
103
103
  }
104
104
  export function statusText(version, progress) {
105
105
  const lines = [
106
- `next-issue: the run is ${progress.status} in worker ${version}`,
106
+ `${progress.status} in worker ${version}`,
107
107
  `watching ${onOffText(progress.watching)}, hunting ${onOffText(progress.hunting)}`,
108
108
  ];
109
109
  if (progress.upgrade !== undefined) {
package/dist/cli.mjs CHANGED
@@ -58,7 +58,7 @@ async function main() {
58
58
  async function logs(root) {
59
59
  const file = await newestRunLog(root);
60
60
  if (file === undefined) {
61
- await write(process.stderr, `next-issue: no run log in ${STATE_DIR}/runs\n`);
61
+ await write(process.stderr, `no run log in ${STATE_DIR}/runs\n`);
62
62
  return 1;
63
63
  }
64
64
  const tail = process.stdout.isTTY ? Math.max(1, (process.stdout.rows || 24) - 1) : undefined;
@@ -93,6 +93,6 @@ async function excludeStateDirectories(root, stream) {
93
93
  }
94
94
  }
95
95
  main().then((code) => process.exit(code), async (error) => {
96
- await write(process.stderr, `next-issue failed: ${message(error)}\n`);
96
+ await write(process.stderr, `${message(error)}\n`);
97
97
  process.exit(1);
98
98
  });
@@ -169,7 +169,7 @@ function heldLock(path, id, text) {
169
169
  export async function lock(path, waitMs, readStart = processStart) {
170
170
  const started = await readStart(process.pid);
171
171
  if (started === undefined) {
172
- throw new Error('next-issue: cannot read the start time of this process');
172
+ throw new Error('cannot read the start time of this process');
173
173
  }
174
174
  const text = `${process.pid} ${started}\n`;
175
175
  const deadline = Date.now() + waitMs;
@@ -28,7 +28,7 @@ class Sink {
28
28
  return;
29
29
  }
30
30
  this.failed = true;
31
- this.output(`next-issue: the run log ${this.file} cannot be written (${message(error)}); the run goes on without it\n`);
31
+ this.output(`the run log ${this.file} cannot be written (${message(error)}); the run goes on without it\n`);
32
32
  }
33
33
  write(record) {
34
34
  if (!this.failed) {
@@ -47,7 +47,7 @@ export async function startWorker(options) {
47
47
  }
48
48
  catch (error) {
49
49
  const reason = `the worker could not start next-issue ${restart}: ${message(error)}`;
50
- process.stderr.write(`next-issue: ${reason}\n`);
50
+ process.stderr.write(`${reason}\n`);
51
51
  run.progress = { ...run.progress, status: 'failed', error: reason };
52
52
  broadcast(sockets, runs);
53
53
  }
@@ -160,7 +160,7 @@ export async function startWorker(options) {
160
160
  ...(summary === undefined ? {} : { summary }),
161
161
  });
162
162
  }, (error) => {
163
- process.stderr.write(`next-issue failed: ${message(error)}\n`);
163
+ process.stderr.write(`${message(error)}\n`);
164
164
  update({ ...run.progress, status: 'failed', error: message(error) });
165
165
  return sendAllSent(sockets, { type: 'end', root, code: 1, error: message(error) });
166
166
  })
@@ -284,7 +284,7 @@ export async function serve(root, logCheckMs = LOG_CHECK_MS) {
284
284
  });
285
285
  if (worker === undefined) {
286
286
  stopTrimming();
287
- process.stderr.write('next-issue: another worker is running\n');
287
+ process.stderr.write('another worker is running\n');
288
288
  return 1;
289
289
  }
290
290
  const end = (signal) => {
@@ -300,7 +300,7 @@ export async function serve(root, logCheckMs = LOG_CHECK_MS) {
300
300
  process.on('SIGTERM', onTerminate);
301
301
  process.on('SIGINT', onInterrupt);
302
302
  process.on('SIGHUP', onHangUp);
303
- process.stderr.write(`next-issue: worker listening on ${paths.socketPath}\n`);
303
+ process.stderr.write(`worker listening on ${paths.socketPath}\n`);
304
304
  await worker.closed;
305
305
  stopTrimming();
306
306
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "16.5.1",
3
+ "version": "16.5.3",
4
4
  "description": "Autonomous issue harness driven by the Claude Agent SDK",
5
5
  "keywords": [
6
6
  "github",