nexrall-code 0.5.160 → 0.5.161

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.
Files changed (2) hide show
  1. package/dist/index.js +33 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10369,9 +10369,18 @@ var require_client = __commonJS({
10369
10369
  const haveCompleteMessage = () => completedMessage !== null;
10370
10370
  const partialInputs = {};
10371
10371
  let heartbeatWatchdog;
10372
+ let onControllerAbort;
10372
10373
  try {
10373
10374
  await new Promise((resolve11, reject) => {
10374
10375
  const stream = response.body;
10376
+ onControllerAbort = () => {
10377
+ stream.destroy?.();
10378
+ resolve11();
10379
+ };
10380
+ if (controller.signal.aborted)
10381
+ onControllerAbort();
10382
+ else
10383
+ controller.signal.addEventListener("abort", onControllerAbort, { once: true });
10375
10384
  const HEARTBEAT_TIMEOUT_MS = 9e4;
10376
10385
  const FIRST_EVENT_TIMEOUT_MS = Number(process.env.NEXRALL_FIRST_EVENT_TIMEOUT_MS) || 3e5;
10377
10386
  const PROGRESS_TIMEOUT_MS = Number(process.env.NEXRALL_PROGRESS_TIMEOUT_MS) || 15e4;
@@ -10646,6 +10655,8 @@ var require_client = __commonJS({
10646
10655
  } finally {
10647
10656
  if (heartbeatWatchdog !== void 0)
10648
10657
  clearInterval(heartbeatWatchdog);
10658
+ if (onControllerAbort)
10659
+ controller.signal.removeEventListener("abort", onControllerAbort);
10649
10660
  }
10650
10661
  if (completedMessage) {
10651
10662
  return completedMessage;
@@ -173169,24 +173180,6 @@ program2.option("-p, --pro", "Use Claude Opus 5.5 (most capable)").option("-t, -
173169
173180
  console.error("--strict-mcp-config needs --mcp-config.");
173170
173181
  process.exit(1);
173171
173182
  }
173172
- if (options.bg) {
173173
- if (!promptParts.length) {
173174
- console.error('--bg needs a prompt: nex --bg "your task"');
173175
- process.exit(1);
173176
- }
173177
- if (process.env.NEXRALL_BG_JOB) {
173178
- console.error("--bg cannot be nested inside a background job.");
173179
- process.exit(1);
173180
- }
173181
- const args = stripBgFlag(process.argv.slice(2));
173182
- if (!options.outputFormat)
173183
- args.push("--output-format", "stream-json");
173184
- const job = startJob({ script: process.argv[1], args, cwd: process.cwd(), prompt: promptParts.join(" ") });
173185
- console.log(`Started background job ${job.id}`);
173186
- console.log(` nex logs ${job.id} -f follow its output`);
173187
- console.log(` nex jobs list jobs \xB7 nex kill ${job.id} stop it`);
173188
- process.exit(0);
173189
- }
173190
173183
  const addDirs = parseAddDirs(options.addDir, process.cwd());
173191
173184
  if (!addDirs.ok) {
173192
173185
  console.error(addDirs.error);
@@ -173211,6 +173204,28 @@ program2.option("-p, --pro", "Use Claude Opus 5.5 (most capable)").option("-t, -
173211
173204
  console.error(`Invalid --input-format "${options.inputFormat}". Use: text | stream-json`);
173212
173205
  process.exit(1);
173213
173206
  }
173207
+ if (options.bg) {
173208
+ if (!promptParts.length) {
173209
+ console.error('--bg needs a prompt: nex --bg "your task"');
173210
+ process.exit(1);
173211
+ }
173212
+ if (inFmt === "stream-json") {
173213
+ console.error("--bg cannot read stream-json from stdin (a background job has no stdin). Pass the prompt as an argument.");
173214
+ process.exit(1);
173215
+ }
173216
+ if (process.env.NEXRALL_BG_JOB) {
173217
+ console.error("--bg cannot be nested inside a background job.");
173218
+ process.exit(1);
173219
+ }
173220
+ const args = stripBgFlag(process.argv.slice(2));
173221
+ if (!options.outputFormat)
173222
+ args.push("--output-format", "stream-json");
173223
+ const job = startJob({ script: process.argv[1], args, cwd: process.cwd(), prompt: promptParts.join(" ") });
173224
+ console.log(`Started background job ${job.id}`);
173225
+ console.log(` nex logs ${job.id} -f follow its output`);
173226
+ console.log(` nex jobs list jobs \xB7 nex kill ${job.id} stop it`);
173227
+ process.exit(0);
173228
+ }
173214
173229
  const resume = options.resume === true ? "last" : typeof options.resume === "string" ? options.resume : void 0;
173215
173230
  const worktree = options.worktree === true ? true : typeof options.worktree === "string" ? options.worktree : void 0;
173216
173231
  let stdinText;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexrall-code",
3
- "version": "0.5.160",
3
+ "version": "0.5.161",
4
4
  "description": "Nexrall Code — AI coding assistant for your terminal (headless agent for scripts, CI and automation)",
5
5
  "keywords": [
6
6
  "ai",