@juspay/neurolink 10.8.20 → 10.8.22

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [10.8.22](https://github.com/juspay/neurolink/compare/v10.8.21...v10.8.22) (2026-08-05)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **(proxy):** close updater and worker review gaps ([2631e23](https://github.com/juspay/neurolink/commit/2631e23dee43b0352e0fff85a462dcb252c013ec))
6
+
7
+ ## [10.8.21](https://github.com/juspay/neurolink/compare/v10.8.20...v10.8.21) (2026-08-05)
8
+
1
9
  ## [10.8.20](https://github.com/juspay/neurolink/compare/v10.8.19...v10.8.20) (2026-08-05)
2
10
 
3
11
  ### Bug Fixes
@@ -677,8 +677,9 @@ async function getRollingActivationFailure(host, port, expectedVersion) {
677
677
  failure.workerExitCode === null
678
678
  ? `exitCode=${failure.workerExitCode ?? "none"}`
679
679
  : null,
680
- typeof failure.workerExitSignal === "string"
681
- ? `exitSignal=${failure.workerExitSignal}`
680
+ typeof failure.workerExitSignal === "string" ||
681
+ failure.workerExitSignal === null
682
+ ? `exitSignal=${failure.workerExitSignal ?? "none"}`
682
683
  : null,
683
684
  typeof failure.supervisorAction === "string"
684
685
  ? `supervisorAction=${failure.supervisorAction}`
@@ -6,6 +6,8 @@ export declare function getGlobalInstallArgs(kind: GlobalInstallerKind, packageS
6
6
  * Return whether a global package-manager failure is likely environmental and
7
7
  * worth retrying. Configuration and permission failures deliberately return
8
8
  * false so the updater does not repeatedly mutate a broken installation.
9
+ *
10
+ * @param error - The package-manager error, including any nested `cause` chain.
9
11
  */
10
12
  export declare function isTransientInstallFailure(error: unknown): boolean;
11
13
  /**
@@ -146,17 +146,25 @@ const TRANSIENT_INSTALL_FAILURE_CODES = new Set([
146
146
  "EPIPE",
147
147
  "ETIMEDOUT",
148
148
  ]);
149
+ const MAX_INSTALL_FAILURE_CAUSE_DEPTH = 10;
149
150
  /**
150
151
  * Return whether a global package-manager failure is likely environmental and
151
152
  * worth retrying. Configuration and permission failures deliberately return
152
153
  * false so the updater does not repeatedly mutate a broken installation.
154
+ *
155
+ * @param error - The package-manager error, including any nested `cause` chain.
153
156
  */
154
157
  export function isTransientInstallFailure(error) {
155
158
  let current = error;
156
- for (let depth = 0; depth < 5 && current; depth++) {
159
+ const seen = new Set();
160
+ for (let depth = 0; depth < MAX_INSTALL_FAILURE_CAUSE_DEPTH && current; depth++) {
157
161
  if (typeof current !== "object") {
158
162
  return false;
159
163
  }
164
+ if (seen.has(current)) {
165
+ return false;
166
+ }
167
+ seen.add(current);
160
168
  const candidate = current;
161
169
  if (typeof candidate.code === "string" &&
162
170
  TRANSIENT_INSTALL_FAILURE_CODES.has(candidate.code)) {
@@ -424,10 +424,12 @@ export class RollingWorkerSupervisor {
424
424
  if (this.active?.generation === worker.generation && !this.closed) {
425
425
  this.active = null;
426
426
  this.draining.set(worker.generation, worker);
427
- // The child may own a duplicate of an incompletely transferred socket.
428
- // SIGKILL closes its descriptor without worker-side shutdown(2), after
429
- // which the parent rejects its copy rather than attempting unsafe replay.
430
- worker.handle.terminate("SIGKILL");
427
+ if (!lifecycle.observedExit) {
428
+ // The child may own a duplicate of an incompletely transferred socket.
429
+ // SIGKILL closes its descriptor without worker-side shutdown(2), after
430
+ // which the parent rejects its copy rather than attempting unsafe replay.
431
+ worker.handle.terminate("SIGKILL");
432
+ }
431
433
  this.publishState();
432
434
  }
433
435
  this.rejectSocket(socket);
@@ -6,6 +6,8 @@ export declare function getGlobalInstallArgs(kind: GlobalInstallerKind, packageS
6
6
  * Return whether a global package-manager failure is likely environmental and
7
7
  * worth retrying. Configuration and permission failures deliberately return
8
8
  * false so the updater does not repeatedly mutate a broken installation.
9
+ *
10
+ * @param error - The package-manager error, including any nested `cause` chain.
9
11
  */
10
12
  export declare function isTransientInstallFailure(error: unknown): boolean;
11
13
  /**
@@ -146,17 +146,25 @@ const TRANSIENT_INSTALL_FAILURE_CODES = new Set([
146
146
  "EPIPE",
147
147
  "ETIMEDOUT",
148
148
  ]);
149
+ const MAX_INSTALL_FAILURE_CAUSE_DEPTH = 10;
149
150
  /**
150
151
  * Return whether a global package-manager failure is likely environmental and
151
152
  * worth retrying. Configuration and permission failures deliberately return
152
153
  * false so the updater does not repeatedly mutate a broken installation.
154
+ *
155
+ * @param error - The package-manager error, including any nested `cause` chain.
153
156
  */
154
157
  export function isTransientInstallFailure(error) {
155
158
  let current = error;
156
- for (let depth = 0; depth < 5 && current; depth++) {
159
+ const seen = new Set();
160
+ for (let depth = 0; depth < MAX_INSTALL_FAILURE_CAUSE_DEPTH && current; depth++) {
157
161
  if (typeof current !== "object") {
158
162
  return false;
159
163
  }
164
+ if (seen.has(current)) {
165
+ return false;
166
+ }
167
+ seen.add(current);
160
168
  const candidate = current;
161
169
  if (typeof candidate.code === "string" &&
162
170
  TRANSIENT_INSTALL_FAILURE_CODES.has(candidate.code)) {
@@ -424,10 +424,12 @@ export class RollingWorkerSupervisor {
424
424
  if (this.active?.generation === worker.generation && !this.closed) {
425
425
  this.active = null;
426
426
  this.draining.set(worker.generation, worker);
427
- // The child may own a duplicate of an incompletely transferred socket.
428
- // SIGKILL closes its descriptor without worker-side shutdown(2), after
429
- // which the parent rejects its copy rather than attempting unsafe replay.
430
- worker.handle.terminate("SIGKILL");
427
+ if (!lifecycle.observedExit) {
428
+ // The child may own a duplicate of an incompletely transferred socket.
429
+ // SIGKILL closes its descriptor without worker-side shutdown(2), after
430
+ // which the parent rejects its copy rather than attempting unsafe replay.
431
+ worker.handle.terminate("SIGKILL");
432
+ }
431
433
  this.publishState();
432
434
  }
433
435
  this.rejectSocket(socket);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "10.8.20",
3
+ "version": "10.8.22",
4
4
  "packageManager": "pnpm@10.15.1",
5
5
  "description": "TypeScript AI SDK with 24+ LLM providers behind one consistent API. MCP-native (connect any MCP server), voice TTS/STT/realtime, RAG, agents, memory, context compaction. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · DeepSeek · NVIDIA NIM and more.",
6
6
  "author": {
@@ -143,7 +143,7 @@
143
143
  "test:model-pool": "npx tsx test/continuous-test-suite-model-pool.ts",
144
144
  "test:model-not-found-retryable": "npx tsx test/continuous-test-suite-model-not-found-retryable.ts",
145
145
  "test:model-capabilities": "npx tsx test/continuous-test-suite-model-capabilities.ts",
146
- "test:agent-runtime:vitest": "pnpm exec vitest run test/agentRuntime.test.ts test/agentPlumbing.test.ts test/toolExecutionRecorder.test.ts",
146
+ "test:agent-runtime:vitest": "pnpm exec vitest run test/agentRuntime.test.ts",
147
147
  "test:retry-after:vitest": "pnpm exec vitest run test/retryAfter.test.ts",
148
148
  "test:ci": "pnpm run test && pnpm run test:client && pnpm run test:hitl",
149
149
  "// CI tier — fast, no live AI calls, safe for every commit": "",
@@ -152,7 +152,7 @@
152
152
  "test:system-messages": "npx tsx test/continuous-test-suite-system-messages.ts",
153
153
  "test:test-stubs": "npx tsx test/continuous-test-suite-test-stubs.ts",
154
154
  "test:tool-routing-semantic": "npx tsx test/continuous-test-suite-tool-routing-semantic.ts",
155
- "test:unit": "pnpm run test:envguard && pnpm run test:bugfixes && pnpm run test:file-detector-extension && pnpm run test:file-detector-magic-bytes && pnpm run test:mcp:infra && pnpm run test:mcp:bash && pnpm run test:mcp:limits && pnpm run test:mcp:spans && pnpm run test:autoresearch:redis && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:litellm-context && pnpm run test:dedup-execute-map && pnpm run test:step-budget-guard:vitest && pnpm run test:system-messages && pnpm run test:tool-routing-semantic && pnpm run test:anthropic-tools-policy && pnpm run test:sagemaker-tools && pnpm run test:anthropic-multimodal && pnpm run test:excel-interop && pnpm run test:model-capabilities && pnpm run test:agent-runtime:vitest && pnpm run test:agent-delegation && pnpm run test:retry-after:vitest && pnpm run test:sampling-params && pnpm run test:structured-recovery && pnpm run test:prompt-redaction && pnpm run test:mcp-result-cache && pnpm run test:test-stubs && pnpm run test:model-not-found-retryable",
155
+ "test:unit": "pnpm run test:envguard && pnpm run test:bugfixes && pnpm run test:file-detector-extension && pnpm run test:file-detector-magic-bytes && pnpm run test:mcp:infra && pnpm run test:mcp:bash && pnpm run test:mcp:limits && pnpm run test:mcp:spans && pnpm run test:autoresearch:redis && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:litellm-context && pnpm run test:dedup-execute-map && pnpm run test:step-budget-guard && pnpm run test:agent-plumbing && pnpm run test:tool-execution-recorder && pnpm run test:proxy-terminal-errors && pnpm run test:system-messages && pnpm run test:tool-routing-semantic && pnpm run test:anthropic-tools-policy && pnpm run test:sagemaker-tools && pnpm run test:anthropic-multimodal && pnpm run test:excel-interop && pnpm run test:model-capabilities && pnpm run test:agent-runtime:vitest && pnpm run test:agent-delegation && pnpm run test:retry-after:vitest && pnpm run test:sampling-params && pnpm run test:structured-recovery && pnpm run test:prompt-redaction && pnpm run test:mcp-result-cache && pnpm run test:test-stubs && pnpm run test:model-not-found-retryable",
156
156
  "// CI tier — live providers, runs only when API keys are present (test:credentials and test:dynamic make real provider calls when keys are set, so they live here, not in test:unit)": "",
157
157
  "test:live": "pnpm run test:providers && pnpm run test:mcp:http && pnpm run test:mcp:sdk && pnpm run test:mcp:cli && pnpm run test:observability && pnpm run test:context && pnpm run test:memory && pnpm run test:tool-reliability && pnpm run test:evaluation && pnpm run test:autoresearch && pnpm run test:credentials && pnpm run test:dynamic",
158
158
  "// CI tier — product output (image/video/TTS/PPT) — costs $$ per run": "",
@@ -217,7 +217,10 @@
217
217
  "test:litellm-context": "npx tsx test/continuous-test-suite-litellm-context-windows.ts",
218
218
  "test:dedup-execute-map": "npx tsx test/continuous-test-suite-dedup-execute-map.ts",
219
219
  "test:agent-delegation": "npx tsx test/continuous-test-suite-agent-delegation.ts",
220
- "test:step-budget-guard:vitest": "pnpm exec vitest run test/stepBudgetGuard.test.ts",
220
+ "test:step-budget-guard": "npx tsx test/continuous-test-suite-step-budget-guard.ts",
221
+ "test:agent-plumbing": "npx tsx test/continuous-test-suite-agent-plumbing.ts",
222
+ "test:tool-execution-recorder": "npx tsx test/continuous-test-suite-tool-execution-recorder.ts",
223
+ "test:proxy-terminal-errors": "npx tsx test/continuous-test-suite-proxy-terminal-errors.ts",
221
224
  "test:audio": "npx tsx test/continuous-test-suite-audio.ts",
222
225
  "test:office": "npx tsx test/continuous-test-suite-office.ts",
223
226
  "test:tts:unit": "npx tsx test/continuous-test-suite-tts-unit.ts",