nexus-agents 2.173.2 → 2.173.4

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/dist/index.d.ts CHANGED
@@ -12495,6 +12495,16 @@ type FailureClassification = {
12495
12495
  * See the module header for the ordered decision procedure. `signal` is checked
12496
12496
  * first (mandatory guard): RETRYABLE_ERROR_PATTERNS matches /aborted/i, so
12497
12497
  * without this a cancelled task would otherwise be retried.
12498
+ *
12499
+ * Fails CLOSED on a throwing classifier (#4303): the body reads `error.message`
12500
+ * and walks `.cause` (via getErrorMessage/extractErrorMessage/isRetryableErrorChain)
12501
+ * and calls `detector.detect`. An Error-like object with a throwing `.message` or
12502
+ * `.cause` getter would make any of those throw. `execute()` runs this INSIDE
12503
+ * `withRetry`'s isRetryable predicate and again in annotateExhausted, neither of
12504
+ * which is try-guarded by withRetry (adapters/retry.ts:339-363 catches only
12505
+ * `operation()`), so an escaping throw would reject the `Promise<Result<…>>` and
12506
+ * break the never-throws contract `execute_expert` relies on. This single outer
12507
+ * guard covers BOTH call sites: any throw during classification → permanent.
12498
12508
  */
12499
12509
  declare function classifyExpertFailure(error: unknown, detector: FailureDetector, taskDescription?: string, signal?: AbortSignal): FailureClassification;
12500
12510
  /**
@@ -12511,6 +12521,18 @@ declare class RecoverableExpert extends Expert {
12511
12521
  execute(task: Task$1, options?: {
12512
12522
  signal?: AbortSignal;
12513
12523
  }): Promise<Result<TaskResult, AgentError$1>>;
12524
+ /**
12525
+ * Per-retry callback: logs the attempt and, for a recoverable archetype,
12526
+ * injects archetype-specific guidance into the next attempt's task.
12527
+ *
12528
+ * Returns the (possibly augmented) task. onRetry runs INSIDE withRetry's catch
12529
+ * but is NOT itself try-guarded (adapters/retry.ts:352-359 — the try wraps only
12530
+ * `operation()`), so a throw here would escape withRetry and reject the Promise.
12531
+ * The guidance path re-reads the error (extractErrorMessage) and calls
12532
+ * detector.detect, so a pathological error (#4303 throwing getter) could throw —
12533
+ * guard it: on failure, skip injection and retry with the un-augmented task.
12534
+ */
12535
+ private handleRetry;
12514
12536
  /**
12515
12537
  * Builds the annotated failure returned when recovery is exhausted. withRetry
12516
12538
  * skips isRetryable on the final attempt, so the per-attempt `lastClassification`
package/dist/index.js CHANGED
@@ -541,7 +541,7 @@ import {
541
541
  withLogging,
542
542
  withRetry,
543
543
  withRetryWrapper
544
- } from "./chunk-5UKKGPRS.js";
544
+ } from "./chunk-R4ZINS62.js";
545
545
  import {
546
546
  FALLBACK_SCANNER_DATA,
547
547
  buildPlanFromAnalysis,
@@ -575,7 +575,7 @@ import {
575
575
  getKnownNexusVarNames,
576
576
  startStdioServer,
577
577
  validateNexusEnv
578
- } from "./chunk-H63X54TU.js";
578
+ } from "./chunk-YYCG236I.js";
579
579
  import {
580
580
  OPENAI_MODELS,
581
581
  OPENAI_MODEL_ALIASES,
@@ -8,9 +8,9 @@ import {
8
8
  runWizard,
9
9
  setupCommand,
10
10
  setupCommandAsync
11
- } from "./chunk-GNXQBXFI.js";
11
+ } from "./chunk-CGIT3MVV.js";
12
12
  import "./chunk-4KURMOBY.js";
13
- import "./chunk-H63X54TU.js";
13
+ import "./chunk-YYCG236I.js";
14
14
  import "./chunk-3DYABC5Y.js";
15
15
  import "./chunk-5IDFZ2PC.js";
16
16
  import "./chunk-NUBSJGQZ.js";
@@ -38,4 +38,4 @@ export {
38
38
  setupCommand,
39
39
  setupCommandAsync
40
40
  };
41
- //# sourceMappingURL=setup-command-24Z3KEHP.js.map
41
+ //# sourceMappingURL=setup-command-EQGY5TZ5.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-agents",
3
- "version": "2.173.2",
3
+ "version": "2.173.4",
4
4
  "description": "Governance substrate for AI coding agents — adversarial PR review, drift-detected rules, tamper-evident audit, and closed-loop outcome routing for Claude, Codex, Gemini, and OpenCode",
5
5
  "mcpName": "io.github.nexus-substrate/nexus-agents",
6
6
  "license": "MIT",