next-issue 14.4.18 → 14.4.20

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.
@@ -105,6 +105,7 @@ export function run(command, args, options = {}) {
105
105
  reject(error);
106
106
  });
107
107
  child.on('exit', (code) => {
108
+ killTree(child);
108
109
  const finish = () => {
109
110
  child.stdout?.destroy();
110
111
  child.stderr?.destroy();
@@ -14,7 +14,7 @@ import { resumeOnSuccessor } from '../shared/worker-client.mjs';
14
14
  import { keepLogTrimmed, LOG_CHECK_MS } from './worker-log.mjs';
15
15
  import { checkSocketPath, workerPaths } from '../shared/worker-paths.mjs';
16
16
  import { active, dropUpgrade, endStatus, newRun, requestRefresh, requestStop, requestUpgrade, runControls, runsMessage, setHunting, setWatching, startRefusal, stoppingMessage, stopPoint, switchRefusal, } from './worker-run.mjs';
17
- import { broadcast, closer, fileId, isLaunch, listen, parseMessage, removeOwned, send, sendAll, shutdown, stopListening, } from './worker-server.mjs';
17
+ import { broadcast, closer, fileId, isLaunch, listen, parseMessage, removeOwned, send, sendAll, sendAllSent, shutdown, stopListening, } from './worker-server.mjs';
18
18
  const LOCK_WAIT_MS = 5_000;
19
19
  const IDLE_MS = 30_000;
20
20
  export async function startWorker(options) {
@@ -119,7 +119,7 @@ export async function startWorker(options) {
119
119
  }))
120
120
  .then((code) => {
121
121
  update({ ...run.progress, status: endStatus(run) });
122
- sendAll(sockets, {
122
+ return sendAllSent(sockets, {
123
123
  type: 'end',
124
124
  root,
125
125
  code,
@@ -127,7 +127,7 @@ export async function startWorker(options) {
127
127
  });
128
128
  }, (error) => {
129
129
  update({ ...run.progress, status: 'failed', error: message(error) });
130
- sendAll(sockets, { type: 'end', root, code: 1, error: message(error) });
130
+ return sendAllSent(sockets, { type: 'end', root, code: 1, error: message(error) });
131
131
  })
132
132
  .finally(() => void close());
133
133
  };
@@ -48,6 +48,10 @@ export function sendAll(sockets, value) {
48
48
  send(socket, value);
49
49
  }
50
50
  }
51
+ export async function sendAllSent(sockets, value) {
52
+ const text = JSON.stringify(value);
53
+ await Promise.all([...sockets.clients].map((socket) => new Promise((resolve) => socket.send(text, () => resolve()))));
54
+ }
51
55
  export function listen(server, path) {
52
56
  return new Promise((resolve, reject) => {
53
57
  server.once('error', reject);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "14.4.18",
3
+ "version": "14.4.20",
4
4
  "description": "Autonomous issue harness driven by the Claude Agent SDK",
5
5
  "keywords": [
6
6
  "github",