nexus-agents 3.15.0 → 4.0.0

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 (124) hide show
  1. package/dist/{child-mcp-config-P3IMY3SJ.js → child-mcp-config-BV3OSP24.js} +2 -2
  2. package/dist/{chunk-GVGH5NFB.js → chunk-2HCONJES.js} +2 -2
  3. package/dist/{chunk-ALAWHZGZ.js → chunk-3OM2W7H7.js} +2 -2
  4. package/dist/{chunk-CVXS5BGE.js → chunk-4O7TU6R3.js} +2 -2
  5. package/dist/{chunk-5XDHMVYV.js → chunk-4XWRSCZ2.js} +3 -3
  6. package/dist/{chunk-IQJUVQXT.js → chunk-4Z2Z52C7.js} +7 -7
  7. package/dist/{chunk-4LD5TWZ5.js → chunk-5HPJB35V.js} +2 -2
  8. package/dist/{chunk-J4VCW54Q.js → chunk-6SBSQDCX.js} +2 -2
  9. package/dist/{chunk-YQWTGCN4.js → chunk-6XQYOWU3.js} +5 -5
  10. package/dist/{chunk-OUE5RIYB.js → chunk-7LCLCIGM.js} +387 -562
  11. package/dist/chunk-7LCLCIGM.js.map +1 -0
  12. package/dist/{chunk-4L7OIPPC.js → chunk-ADIMVMAB.js} +2 -2
  13. package/dist/{chunk-XFWFCNBH.js → chunk-AMEVOGE7.js} +8 -8
  14. package/dist/{chunk-TXZVEYXX.js → chunk-BMEJLPAE.js} +3 -3
  15. package/dist/{chunk-VJIHSPXE.js → chunk-BYDUN7A5.js} +2 -2
  16. package/dist/{chunk-AWMFJK5J.js → chunk-C3KZXEBR.js} +4 -4
  17. package/dist/{chunk-6RMLXVDE.js → chunk-CNB4PA7Q.js} +5 -5
  18. package/dist/{chunk-GNSY44I6.js → chunk-EXX6WINJ.js} +2 -2
  19. package/dist/{chunk-BWP3SQRB.js → chunk-FD3I5B4X.js} +2 -2
  20. package/dist/{chunk-V5OV5KMM.js → chunk-FRTNZUUF.js} +2 -2
  21. package/dist/{chunk-FMEZ3J4A.js → chunk-HNC2G7AS.js} +2 -2
  22. package/dist/{chunk-ZUHUAKX7.js → chunk-JJEOBIOI.js} +2 -2
  23. package/dist/{chunk-SR5LZ5ZU.js → chunk-JRU5G6VW.js} +2 -2
  24. package/dist/{chunk-PKFOCPWL.js → chunk-KLN7TJLT.js} +2 -2
  25. package/dist/{chunk-3J7AZXDA.js → chunk-KVHA4AEF.js} +4 -4
  26. package/dist/{chunk-Z3EIIXYW.js → chunk-N7YLNXHT.js} +6 -6
  27. package/dist/{chunk-ZD37OJIB.js → chunk-NZHI7FHX.js} +5 -5
  28. package/dist/{chunk-ACR53LYN.js → chunk-QJKXF2MY.js} +31 -8
  29. package/dist/chunk-QJKXF2MY.js.map +1 -0
  30. package/dist/{chunk-WIHC4JQB.js → chunk-S645LGB6.js} +2 -2
  31. package/dist/{chunk-PKJMR6LK.js → chunk-THTBIBCW.js} +8 -8
  32. package/dist/{chunk-PKJMR6LK.js.map → chunk-THTBIBCW.js.map} +1 -1
  33. package/dist/{chunk-SH3A7WBR.js → chunk-TN7HF2SQ.js} +8 -24
  34. package/dist/{chunk-SH3A7WBR.js.map → chunk-TN7HF2SQ.js.map} +1 -1
  35. package/dist/{chunk-I7GXJESU.js → chunk-UM376MEM.js} +2 -2
  36. package/dist/{chunk-SEIKS6JB.js → chunk-VKLMXCI2.js} +4 -4
  37. package/dist/{chunk-AKFSWIMY.js → chunk-VOLQTAV4.js} +4 -4
  38. package/dist/chunk-VOLQTAV4.js.map +1 -0
  39. package/dist/{chunk-GFQI6SWN.js → chunk-WXCRNJNO.js} +3 -3
  40. package/dist/{cli-circuit-breaker-5XIYJDMM.js → cli-circuit-breaker-NRGM3VBL.js} +3 -3
  41. package/dist/cli.js +41 -41
  42. package/dist/{composite-router-RNU4YHES.js → composite-router-TSPOS57H.js} +2 -2
  43. package/dist/{consensus-vote-CPZ6E5NS.js → consensus-vote-U3OPVEUE.js} +16 -16
  44. package/dist/{context-retriever-HS2TOSPT.js → context-retriever-SGJTQUCI.js} +8 -8
  45. package/dist/{doctor-deep-WULFW3CA.js → doctor-deep-33C5GGB3.js} +3 -3
  46. package/dist/{doctor-live-U5AUMZGG.js → doctor-live-XRIVOJLP.js} +9 -9
  47. package/dist/{expert-bridge-S6SBBQGK.js → expert-bridge-UH44L5CN.js} +4 -4
  48. package/dist/{factory-SOAR6BIV.js → factory-GUDAJED7.js} +9 -9
  49. package/dist/{factory-MZGIHXPG.js → factory-HYFTOF35.js} +5 -5
  50. package/dist/{improvement-review-ZZE67B4L.js → improvement-review-KTOY6EEF.js} +5 -5
  51. package/dist/index.d.ts +42 -202
  52. package/dist/index.js +30 -30
  53. package/dist/{init-opencode-3BV3QDQX.js → init-opencode-PXLOY7XY.js} +6 -6
  54. package/dist/issue-triage-B3KU37U3.js +17 -0
  55. package/dist/{pr-reviewer-helpers-X2F4GXAU.js → pr-reviewer-helpers-QU4F2A3X.js} +4 -4
  56. package/dist/{registry-command-PNBED2PE.js → registry-command-2LQLUUXG.js} +2 -2
  57. package/dist/{repo-security-plan-UHYMCN54.js → repo-security-plan-E2MTJPSC.js} +3 -3
  58. package/dist/{research-helpers-synthesize-QBW2J7OI.js → research-helpers-synthesize-4YBZF2LZ.js} +4 -4
  59. package/dist/{routing-memory-NOXXAXQG.js → routing-memory-EIF5XALW.js} +2 -2
  60. package/dist/{session-memory-OOOKYNUT.js → session-memory-5GVHJR26.js} +3 -3
  61. package/dist/{setup-command-GAUYRBED.js → setup-command-MKCEHLU7.js} +14 -14
  62. package/dist/{setup-config-C5SBEC56.js → setup-config-PMGHQJ6O.js} +3 -3
  63. package/dist/{setup-custom-api-DOE4TSAW.js → setup-custom-api-JXXGF5QD.js} +4 -4
  64. package/dist/{tool-memory-G3FU2RMU.js → tool-memory-YFXJCJFI.js} +5 -5
  65. package/dist/{unified-registry-G4HGJYBH.js → unified-registry-OGXE4772.js} +10 -10
  66. package/dist/{weather-report-HQCHYA6M.js → weather-report-FV6YYGT4.js} +2 -2
  67. package/package.json +1 -1
  68. package/dist/chunk-ACR53LYN.js.map +0 -1
  69. package/dist/chunk-AKFSWIMY.js.map +0 -1
  70. package/dist/chunk-OUE5RIYB.js.map +0 -1
  71. package/dist/issue-triage-NLIV37LO.js +0 -17
  72. /package/dist/{child-mcp-config-P3IMY3SJ.js.map → child-mcp-config-BV3OSP24.js.map} +0 -0
  73. /package/dist/{chunk-GVGH5NFB.js.map → chunk-2HCONJES.js.map} +0 -0
  74. /package/dist/{chunk-ALAWHZGZ.js.map → chunk-3OM2W7H7.js.map} +0 -0
  75. /package/dist/{chunk-CVXS5BGE.js.map → chunk-4O7TU6R3.js.map} +0 -0
  76. /package/dist/{chunk-5XDHMVYV.js.map → chunk-4XWRSCZ2.js.map} +0 -0
  77. /package/dist/{chunk-IQJUVQXT.js.map → chunk-4Z2Z52C7.js.map} +0 -0
  78. /package/dist/{chunk-4LD5TWZ5.js.map → chunk-5HPJB35V.js.map} +0 -0
  79. /package/dist/{chunk-J4VCW54Q.js.map → chunk-6SBSQDCX.js.map} +0 -0
  80. /package/dist/{chunk-YQWTGCN4.js.map → chunk-6XQYOWU3.js.map} +0 -0
  81. /package/dist/{chunk-4L7OIPPC.js.map → chunk-ADIMVMAB.js.map} +0 -0
  82. /package/dist/{chunk-XFWFCNBH.js.map → chunk-AMEVOGE7.js.map} +0 -0
  83. /package/dist/{chunk-TXZVEYXX.js.map → chunk-BMEJLPAE.js.map} +0 -0
  84. /package/dist/{chunk-VJIHSPXE.js.map → chunk-BYDUN7A5.js.map} +0 -0
  85. /package/dist/{chunk-AWMFJK5J.js.map → chunk-C3KZXEBR.js.map} +0 -0
  86. /package/dist/{chunk-6RMLXVDE.js.map → chunk-CNB4PA7Q.js.map} +0 -0
  87. /package/dist/{chunk-GNSY44I6.js.map → chunk-EXX6WINJ.js.map} +0 -0
  88. /package/dist/{chunk-BWP3SQRB.js.map → chunk-FD3I5B4X.js.map} +0 -0
  89. /package/dist/{chunk-V5OV5KMM.js.map → chunk-FRTNZUUF.js.map} +0 -0
  90. /package/dist/{chunk-FMEZ3J4A.js.map → chunk-HNC2G7AS.js.map} +0 -0
  91. /package/dist/{chunk-ZUHUAKX7.js.map → chunk-JJEOBIOI.js.map} +0 -0
  92. /package/dist/{chunk-SR5LZ5ZU.js.map → chunk-JRU5G6VW.js.map} +0 -0
  93. /package/dist/{chunk-PKFOCPWL.js.map → chunk-KLN7TJLT.js.map} +0 -0
  94. /package/dist/{chunk-3J7AZXDA.js.map → chunk-KVHA4AEF.js.map} +0 -0
  95. /package/dist/{chunk-Z3EIIXYW.js.map → chunk-N7YLNXHT.js.map} +0 -0
  96. /package/dist/{chunk-ZD37OJIB.js.map → chunk-NZHI7FHX.js.map} +0 -0
  97. /package/dist/{chunk-WIHC4JQB.js.map → chunk-S645LGB6.js.map} +0 -0
  98. /package/dist/{chunk-I7GXJESU.js.map → chunk-UM376MEM.js.map} +0 -0
  99. /package/dist/{chunk-SEIKS6JB.js.map → chunk-VKLMXCI2.js.map} +0 -0
  100. /package/dist/{chunk-GFQI6SWN.js.map → chunk-WXCRNJNO.js.map} +0 -0
  101. /package/dist/{cli-circuit-breaker-5XIYJDMM.js.map → cli-circuit-breaker-NRGM3VBL.js.map} +0 -0
  102. /package/dist/{composite-router-RNU4YHES.js.map → composite-router-TSPOS57H.js.map} +0 -0
  103. /package/dist/{consensus-vote-CPZ6E5NS.js.map → consensus-vote-U3OPVEUE.js.map} +0 -0
  104. /package/dist/{context-retriever-HS2TOSPT.js.map → context-retriever-SGJTQUCI.js.map} +0 -0
  105. /package/dist/{doctor-deep-WULFW3CA.js.map → doctor-deep-33C5GGB3.js.map} +0 -0
  106. /package/dist/{doctor-live-U5AUMZGG.js.map → doctor-live-XRIVOJLP.js.map} +0 -0
  107. /package/dist/{expert-bridge-S6SBBQGK.js.map → expert-bridge-UH44L5CN.js.map} +0 -0
  108. /package/dist/{factory-MZGIHXPG.js.map → factory-GUDAJED7.js.map} +0 -0
  109. /package/dist/{factory-SOAR6BIV.js.map → factory-HYFTOF35.js.map} +0 -0
  110. /package/dist/{improvement-review-ZZE67B4L.js.map → improvement-review-KTOY6EEF.js.map} +0 -0
  111. /package/dist/{init-opencode-3BV3QDQX.js.map → init-opencode-PXLOY7XY.js.map} +0 -0
  112. /package/dist/{issue-triage-NLIV37LO.js.map → issue-triage-B3KU37U3.js.map} +0 -0
  113. /package/dist/{pr-reviewer-helpers-X2F4GXAU.js.map → pr-reviewer-helpers-QU4F2A3X.js.map} +0 -0
  114. /package/dist/{registry-command-PNBED2PE.js.map → registry-command-2LQLUUXG.js.map} +0 -0
  115. /package/dist/{repo-security-plan-UHYMCN54.js.map → repo-security-plan-E2MTJPSC.js.map} +0 -0
  116. /package/dist/{research-helpers-synthesize-QBW2J7OI.js.map → research-helpers-synthesize-4YBZF2LZ.js.map} +0 -0
  117. /package/dist/{routing-memory-NOXXAXQG.js.map → routing-memory-EIF5XALW.js.map} +0 -0
  118. /package/dist/{session-memory-OOOKYNUT.js.map → session-memory-5GVHJR26.js.map} +0 -0
  119. /package/dist/{setup-command-GAUYRBED.js.map → setup-command-MKCEHLU7.js.map} +0 -0
  120. /package/dist/{setup-config-C5SBEC56.js.map → setup-config-PMGHQJ6O.js.map} +0 -0
  121. /package/dist/{setup-custom-api-DOE4TSAW.js.map → setup-custom-api-JXXGF5QD.js.map} +0 -0
  122. /package/dist/{tool-memory-G3FU2RMU.js.map → tool-memory-YFXJCJFI.js.map} +0 -0
  123. /package/dist/{unified-registry-G4HGJYBH.js.map → unified-registry-OGXE4772.js.map} +0 -0
  124. /package/dist/{weather-report-HQCHYA6M.js.map → weather-report-FV6YYGT4.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -9463,6 +9463,16 @@ interface AggregationMetadata {
9463
9463
  conflictCount: number;
9464
9464
  averageConfidence: number;
9465
9465
  totalTokensUsed: number;
9466
+ /**
9467
+ * How many contributors reported no measured usage (#4743).
9468
+ *
9469
+ * `totalTokensUsed` sums what was measured. A contributor whose adapter
9470
+ * reported nothing carries a placeholder `0` (`ResultMetadata.tokensMeasured
9471
+ * === false`), so without this count the total reads as complete when it is a
9472
+ * LOWER BOUND. Absent means the aggregate predates the distinction — unknown,
9473
+ * not zero.
9474
+ */
9475
+ unmeasuredResults?: number;
9466
9476
  aggregatedAt: string;
9467
9477
  }
9468
9478
  /**
@@ -11335,7 +11345,15 @@ interface WaveSchedulerConfig {
11335
11345
  readonly maxConcurrency: number;
11336
11346
  /** Maximum output length (chars) per task result. Default: 2000. */
11337
11347
  readonly maxOutputChars: number;
11338
- /** Maximum total token budget across all waves. 0 = unlimited. Default: 0. */
11348
+ /**
11349
+ * Maximum total token budget across all waves. 0 = unlimited. Default: 0.
11350
+ *
11351
+ * Enforced against the SUM OF ESTIMATES described on
11352
+ * `WaveTaskResult.estimatedTokens`, which excludes input tokens and counts a
11353
+ * failed task as zero. Both errors run in the same direction: the budget
11354
+ * believes it has more headroom than it does, so enabling this does not give
11355
+ * you a reliable spend cap (#4761).
11356
+ */
11339
11357
  readonly maxTotalTokens: number;
11340
11358
  /** Whether to abort remaining waves on first task failure. Default: false. */
11341
11359
  readonly abortOnFailure: boolean;
@@ -11376,7 +11394,19 @@ interface WaveTaskResult {
11376
11394
  readonly truncated: boolean;
11377
11395
  /** Original output length before truncation. */
11378
11396
  readonly originalLength: number;
11379
- /** Estimated tokens consumed by this task. */
11397
+ /**
11398
+ * Rough token estimate for this task, derived as `outputChars / 4` (#4761).
11399
+ *
11400
+ * NOT a measurement, and specifically NOT comparable to
11401
+ * `ResultMetadata.tokensUsed`:
11402
+ * - **Input is not counted.** Prompt and context usually dominate an agent
11403
+ * task's spend, so a large prompt with a terse answer looks nearly free.
11404
+ * - **A failed task reports 0**, however long it ran before throwing.
11405
+ *
11406
+ * Real usage is not available here: `WaveTaskExecutor` returns a bare string,
11407
+ * so the scheduler has nothing better to sum. Treat this as a coarse
11408
+ * output-size signal, not a spend figure.
11409
+ */
11380
11410
  readonly estimatedTokens: number;
11381
11411
  /** Duration of this task in ms. */
11382
11412
  readonly durationMs: number;
@@ -13241,8 +13271,17 @@ interface TrinityPhaseResult {
13241
13271
  readonly output: string;
13242
13272
  /** Duration in milliseconds */
13243
13273
  readonly durationMs: number;
13244
- /** Tokens used */
13274
+ /** Tokens used. Meaningful only when `tokensMeasured` is not `false`. */
13245
13275
  readonly tokensUsed: number;
13276
+ /**
13277
+ * Whether `tokensUsed` is a measurement (#4743).
13278
+ *
13279
+ * `false` means the adapter reported no usage, so `tokensUsed` is a
13280
+ * placeholder zero rather than a count. Absent means the producer predates
13281
+ * the distinction — unknown, not measured. Additive and optional, so no
13282
+ * existing reader breaks.
13283
+ */
13284
+ readonly tokensMeasured?: boolean;
13246
13285
  }
13247
13286
  /** Thinker's analysis output. */
13248
13287
  interface ThinkerOutput {
@@ -17689,198 +17728,6 @@ declare class StepExecutor {
17689
17728
  */
17690
17729
  declare function createStepExecutor(deps: StepExecutorDeps): StepExecutor;
17691
17730
 
17692
- /**
17693
- * nexus-agents/workflows - Budget Circuit Breaker Types
17694
- *
17695
- * Type definitions, Zod schemas, and error classes for budget enforcement
17696
- * circuit breaker pattern.
17697
- *
17698
- * (Source: Issue #349 - Implement budget enforcement circuit breaker)
17699
- */
17700
-
17701
- /**
17702
- * Budget circuit breaker states.
17703
- *
17704
- * - closed: Normal operation, budget tracking active
17705
- * - open: Budget exceeded, operations blocked
17706
- * - half-open: Testing if budget has been freed (e.g., after pruning)
17707
- */
17708
- type BudgetCircuitState = 'closed' | 'open' | 'half-open';
17709
- /**
17710
- * Zod schema for budget circuit breaker configuration.
17711
- */
17712
- declare const BudgetCircuitBreakerConfigSchema: z.ZodObject<{
17713
- warningThreshold: z.ZodDefault<z.ZodNumber>;
17714
- criticalThreshold: z.ZodDefault<z.ZodNumber>;
17715
- cooldownMs: z.ZodDefault<z.ZodNumber>;
17716
- recoveryProbes: z.ZodDefault<z.ZodNumber>;
17717
- hardStop: z.ZodDefault<z.ZodBoolean>;
17718
- stepReserve: z.ZodDefault<z.ZodNumber>;
17719
- }, z.core.$strip>;
17720
- type BudgetCircuitBreakerConfig = z.infer<typeof BudgetCircuitBreakerConfigSchema>;
17721
- /**
17722
- * Budget usage snapshot at a point in time.
17723
- */
17724
- interface BudgetUsageSnapshot {
17725
- /** Total tokens currently used */
17726
- readonly currentTokens: number;
17727
- /** Maximum allowed tokens */
17728
- readonly maxTokens: number;
17729
- /** Usage as a percentage (0-1) */
17730
- readonly usagePercent: number;
17731
- /** Tokens available for new operations */
17732
- readonly availableTokens: number;
17733
- /** Timestamp of the snapshot */
17734
- readonly timestamp: number;
17735
- }
17736
- /**
17737
- * Result of a budget enforcement check.
17738
- */
17739
- interface BudgetEnforcementResult {
17740
- /** Whether the operation is allowed to proceed */
17741
- readonly allowed: boolean;
17742
- /** Reason for the decision */
17743
- readonly reason: string;
17744
- /** Current budget usage */
17745
- readonly usage: BudgetUsageSnapshot;
17746
- /** Current circuit state */
17747
- readonly circuitState: BudgetCircuitState;
17748
- /** Tokens allocated for this operation (if allowed) */
17749
- readonly allocatedTokens?: number;
17750
- /** Warning message (if approaching threshold) */
17751
- readonly warning?: string;
17752
- }
17753
- /**
17754
- * Per-step budget allocation.
17755
- */
17756
- interface StepBudgetAllocation {
17757
- /** Step ID */
17758
- readonly stepId: string;
17759
- /** Allocated tokens for this step */
17760
- readonly allocatedTokens: number;
17761
- /** Tokens remaining for subsequent steps */
17762
- readonly remainingForOtherSteps: number;
17763
- /** Number of remaining steps */
17764
- readonly remainingStepCount: number;
17765
- }
17766
- /**
17767
- * Budget circuit breaker state snapshot.
17768
- */
17769
- interface BudgetCircuitSnapshot {
17770
- /** Current circuit state */
17771
- readonly state: BudgetCircuitState;
17772
- /** When the state last changed */
17773
- readonly lastStateChange: number;
17774
- /** Number of consecutive violations */
17775
- readonly violationCount: number;
17776
- /** Number of successful recovery probes */
17777
- readonly recoveryProbeCount: number;
17778
- /** Last budget usage snapshot */
17779
- readonly lastUsage: BudgetUsageSnapshot | null;
17780
- /** Configuration used */
17781
- readonly config: BudgetCircuitBreakerConfig;
17782
- }
17783
- /**
17784
- * Event emitted on budget circuit state changes.
17785
- */
17786
- interface BudgetCircuitStateChangeEvent {
17787
- /** Previous state */
17788
- readonly previousState: BudgetCircuitState;
17789
- /** New state */
17790
- readonly newState: BudgetCircuitState;
17791
- /** Timestamp of change */
17792
- readonly timestamp: number;
17793
- /** Reason for state change */
17794
- readonly reason: string;
17795
- /** Budget usage at time of change */
17796
- readonly usage: BudgetUsageSnapshot;
17797
- }
17798
- /**
17799
- * Listener for circuit state changes.
17800
- */
17801
- type BudgetCircuitStateChangeListener = (event: BudgetCircuitStateChangeEvent) => void;
17802
- /**
17803
- * Interface for budget circuit breaker operations.
17804
- */
17805
- interface IBudgetCircuitBreaker {
17806
- /**
17807
- * Check if an operation is allowed within budget.
17808
- * @param estimatedTokens - Estimated tokens for the operation
17809
- * @returns Budget enforcement result
17810
- */
17811
- checkBudget(estimatedTokens: number): BudgetEnforcementResult;
17812
- /**
17813
- * Record token usage after an operation completes.
17814
- * @param actualTokens - Actual tokens consumed
17815
- */
17816
- recordUsage(actualTokens: number): void;
17817
- /**
17818
- * Allocate budget for a specific step with reservation for remaining steps.
17819
- * @param stepId - Step identifier
17820
- * @param remainingSteps - Number of remaining steps including this one
17821
- * @returns Step budget allocation
17822
- */
17823
- allocateForStep(stepId: string, remainingSteps: number): StepBudgetAllocation;
17824
- /**
17825
- * Get current circuit state.
17826
- */
17827
- getState(): BudgetCircuitState;
17828
- /**
17829
- * Get full circuit snapshot.
17830
- */
17831
- getSnapshot(): BudgetCircuitSnapshot;
17832
- /**
17833
- * Reset the circuit breaker to closed state.
17834
- */
17835
- reset(): void;
17836
- /**
17837
- * Force circuit to open state (for external triggers).
17838
- * @param reason - Reason for forcing open
17839
- */
17840
- forceOpen(reason: string): void;
17841
- /**
17842
- * Add a listener for state changes.
17843
- */
17844
- addStateChangeListener(listener: BudgetCircuitStateChangeListener): void;
17845
- /**
17846
- * Remove a state change listener.
17847
- */
17848
- removeStateChangeListener(listener: BudgetCircuitStateChangeListener): void;
17849
- }
17850
-
17851
- /**
17852
- * nexus-agents/workflows - Budget Enforcement
17853
- *
17854
- * Helper module for context budget enforcement during workflow execution.
17855
- * Integrates with BudgetCircuitBreaker for actual enforcement.
17856
- *
17857
- * (Updated: Issue #349 - Implement budget enforcement circuit breaker)
17858
- */
17859
-
17860
- /**
17861
- * Budget enforcement event logged during execution.
17862
- */
17863
- interface BudgetEnforcementEvent {
17864
- /** Timestamp of the event */
17865
- timestamp: number;
17866
- /** Step ID where budget was applied */
17867
- stepId: string;
17868
- /** Budget that was applied */
17869
- budget: ContextBudget$1;
17870
- /** Whether this was a step override or workflow default */
17871
- source: 'step' | 'workflow' | 'engine';
17872
- /** Context stats before step execution */
17873
- statsBefore?: {
17874
- totalTokens: number;
17875
- availableTokens: number;
17876
- usagePercentage: number;
17877
- };
17878
- /** Enforcement result from circuit breaker */
17879
- enforcementResult?: BudgetEnforcementResult;
17880
- /** Whether the step was blocked */
17881
- blocked?: boolean;
17882
- }
17883
-
17884
17731
  /**
17885
17732
  * Workflow Engine Helpers - Pure helper functions and types for WorkflowEngine.
17886
17733
  *
@@ -17896,10 +17743,6 @@ interface WorkflowEngineConfig {
17896
17743
  contextManagerConfig?: Omit<ContextManagerConfig, 'budget'>;
17897
17744
  defaultBudget?: ContextBudget$1;
17898
17745
  logger?: ILogger;
17899
- /** Budget circuit breaker configuration */
17900
- budgetCircuitBreakerConfig?: Partial<BudgetCircuitBreakerConfig>;
17901
- /** Enable hard budget enforcement (default: false for backward compatibility) */
17902
- enableBudgetEnforcement?: boolean;
17903
17746
  }
17904
17747
  /** Execution plan with phases. */
17905
17748
  interface ExecutionPlan {
@@ -17918,9 +17761,6 @@ interface ExecutionContext {
17918
17761
  variables: Map<string, unknown>;
17919
17762
  abortController: AbortController;
17920
17763
  contextManager: ContextManager | undefined;
17921
- budgetEvents: BudgetEnforcementEvent[];
17922
- /** Budget circuit breaker for enforcement (optional) */
17923
- budgetCircuitBreaker: IBudgetCircuitBreaker | undefined;
17924
17764
  }
17925
17765
  /** Options for phase execution. */
17926
17766
  interface ExecutionOptions {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createGitHubProvider,
3
3
  createScmProvider
4
- } from "./chunk-AWMFJK5J.js";
4
+ } from "./chunk-C3KZXEBR.js";
5
5
  import {
6
6
  ALLOWED_COMMANDS,
7
7
  ARTIFACT_TYPES,
@@ -541,7 +541,7 @@ import {
541
541
  withLogging,
542
542
  withRetry,
543
543
  withRetryWrapper
544
- } from "./chunk-OUE5RIYB.js";
544
+ } from "./chunk-7LCLCIGM.js";
545
545
  import {
546
546
  FALLBACK_SCANNER_DATA,
547
547
  buildPlanFromAnalysis,
@@ -549,7 +549,7 @@ import {
549
549
  generateSecurityPlan,
550
550
  getRegistryManifest,
551
551
  resolveScannerData
552
- } from "./chunk-BWP3SQRB.js";
552
+ } from "./chunk-FD3I5B4X.js";
553
553
  import {
554
554
  analyzeGitHubRepo,
555
555
  analyzeRepo,
@@ -575,16 +575,16 @@ import {
575
575
  getKnownNexusVarNames,
576
576
  startStdioServer,
577
577
  validateNexusEnv
578
- } from "./chunk-PKJMR6LK.js";
578
+ } from "./chunk-THTBIBCW.js";
579
579
  import {
580
580
  OPENAI_MODELS,
581
581
  OPENAI_MODEL_ALIASES,
582
582
  OpenAIAdapter,
583
583
  createOpenAIAdapter
584
- } from "./chunk-ZD37OJIB.js";
584
+ } from "./chunk-NZHI7FHX.js";
585
585
  import {
586
586
  executeExpert
587
- } from "./chunk-IQJUVQXT.js";
587
+ } from "./chunk-4Z2Z52C7.js";
588
588
  import {
589
589
  AgentFindingSchema,
590
590
  ConsensusEngine,
@@ -633,12 +633,12 @@ import {
633
633
  generateProposalId,
634
634
  parseAgentPairKey,
635
635
  registerConsensusVoteTool
636
- } from "./chunk-ACR53LYN.js";
637
- import "./chunk-VJIHSPXE.js";
636
+ } from "./chunk-QJKXF2MY.js";
637
+ import "./chunk-BYDUN7A5.js";
638
638
  import {
639
639
  allOf
640
640
  } from "./chunk-OQB3XC5O.js";
641
- import "./chunk-TXZVEYXX.js";
641
+ import "./chunk-BMEJLPAE.js";
642
642
  import {
643
643
  AgentActionSchema,
644
644
  GitHubReviewer,
@@ -661,11 +661,11 @@ import {
661
661
  requiresHumanApproval,
662
662
  validateAgentAction,
663
663
  validateCorroboration
664
- } from "./chunk-Z3EIIXYW.js";
664
+ } from "./chunk-N7YLNXHT.js";
665
665
  import {
666
666
  GitHubProvider,
667
667
  ScmError
668
- } from "./chunk-ZUHUAKX7.js";
668
+ } from "./chunk-JJEOBIOI.js";
669
669
  import {
670
670
  GitHubUserRoleSchema,
671
671
  InjectionFlagSchema,
@@ -680,11 +680,11 @@ import {
680
680
  assessReputation,
681
681
  reconcileTrustTier,
682
682
  sanitizeInput
683
- } from "./chunk-4LD5TWZ5.js";
683
+ } from "./chunk-5HPJB35V.js";
684
684
  import {
685
685
  ImprovementReviewInputSchema,
686
686
  registerImprovementReviewTool
687
- } from "./chunk-GFQI6SWN.js";
687
+ } from "./chunk-WXCRNJNO.js";
688
688
  import {
689
689
  AgentPerformanceSchema,
690
690
  ConsensusAlgorithmSchema,
@@ -720,7 +720,7 @@ import {
720
720
  toolSuccess,
721
721
  toolSuccessStructured,
722
722
  validateToolInput
723
- } from "./chunk-AKFSWIMY.js";
723
+ } from "./chunk-VOLQTAV4.js";
724
724
  import {
725
725
  AuditTrail,
726
726
  MAX_STRIPPED_ELEMENTS_PER_EVENT,
@@ -732,13 +732,13 @@ import {
732
732
  emitReputationEvent,
733
733
  emitSanitizationEvent,
734
734
  emitTrustEvent
735
- } from "./chunk-4L7OIPPC.js";
735
+ } from "./chunk-ADIMVMAB.js";
736
736
  import {
737
737
  UnifiedAdapterRegistry,
738
738
  createUnifiedRegistry,
739
739
  getGlobalRegistry,
740
740
  resetGlobalRegistry
741
- } from "./chunk-SEIKS6JB.js";
741
+ } from "./chunk-VKLMXCI2.js";
742
742
  import {
743
743
  PersistentStrategyDistiller,
744
744
  RulesSnapshotSchema,
@@ -746,19 +746,19 @@ import {
746
746
  TokenCounter,
747
747
  TokenCounterProvider,
748
748
  createTokenCounter
749
- } from "./chunk-6RMLXVDE.js";
750
- import "./chunk-I7GXJESU.js";
749
+ } from "./chunk-CNB4PA7Q.js";
750
+ import "./chunk-UM376MEM.js";
751
751
  import "./chunk-NUBSJGQZ.js";
752
752
  import {
753
753
  getTokenEnvVars,
754
754
  hasToken,
755
755
  resolveToken
756
- } from "./chunk-ALAWHZGZ.js";
756
+ } from "./chunk-3OM2W7H7.js";
757
757
  import {
758
758
  MemoryError
759
- } from "./chunk-3J7AZXDA.js";
759
+ } from "./chunk-KVHA4AEF.js";
760
760
  import "./chunk-6T3EPABN.js";
761
- import "./chunk-SR5LZ5ZU.js";
761
+ import "./chunk-JRU5G6VW.js";
762
762
  import {
763
763
  BUILT_IN_EXPERTS,
764
764
  BuiltInExpertTypeSchema,
@@ -803,7 +803,7 @@ import {
803
803
  isCliAvailable,
804
804
  isRetryableError,
805
805
  sleep
806
- } from "./chunk-XFWFCNBH.js";
806
+ } from "./chunk-AMEVOGE7.js";
807
807
  import {
808
808
  AdapterModelError,
809
809
  BaseAdapter,
@@ -825,11 +825,11 @@ import {
825
825
  tapStream,
826
826
  transformStream,
827
827
  withTimeout
828
- } from "./chunk-PKFOCPWL.js";
829
- import "./chunk-FMEZ3J4A.js";
828
+ } from "./chunk-KLN7TJLT.js";
829
+ import "./chunk-HNC2G7AS.js";
830
830
  import {
831
831
  PROVIDER_ENV_KEYS
832
- } from "./chunk-GVGH5NFB.js";
832
+ } from "./chunk-2HCONJES.js";
833
833
  import "./chunk-SNJNRDKZ.js";
834
834
  import {
835
835
  AvailabilityCache,
@@ -839,13 +839,13 @@ import {
839
839
  getFallbackChain,
840
840
  resetAvailabilityCache,
841
841
  resolveFallback
842
- } from "./chunk-WIHC4JQB.js";
842
+ } from "./chunk-S645LGB6.js";
843
843
  import "./chunk-QZUG667L.js";
844
- import "./chunk-V5OV5KMM.js";
844
+ import "./chunk-FRTNZUUF.js";
845
845
  import {
846
846
  CliCircuitBreakerIntegration,
847
847
  createCliCircuitBreakerIntegration
848
- } from "./chunk-CVXS5BGE.js";
848
+ } from "./chunk-4O7TU6R3.js";
849
849
  import {
850
850
  AgentCapability,
851
851
  AgentError,
@@ -919,7 +919,7 @@ import {
919
919
  toError,
920
920
  unwrap,
921
921
  unwrapOr
922
- } from "./chunk-SH3A7WBR.js";
922
+ } from "./chunk-TN7HF2SQ.js";
923
923
  import "./chunk-2HUC6NZN.js";
924
924
  import "./chunk-OQLFRJCW.js";
925
925
  import "./chunk-ZPWHCABL.js";
@@ -4728,7 +4728,7 @@ function buildVotingInput(plan, config) {
4728
4728
  }
4729
4729
  async function executeSingleVote(plan, config, log) {
4730
4730
  try {
4731
- const { executeVoting } = await import("./consensus-vote-CPZ6E5NS.js");
4731
+ const { executeVoting } = await import("./consensus-vote-U3OPVEUE.js");
4732
4732
  const input = buildVotingInput(plan, config);
4733
4733
  const result = await executeVoting(input, log);
4734
4734
  return parseVotingResult(result);
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  discoverModels,
3
3
  readOpencodeGateway
4
- } from "./chunk-ZD37OJIB.js";
5
- import "./chunk-VJIHSPXE.js";
6
- import "./chunk-PKFOCPWL.js";
7
- import "./chunk-GVGH5NFB.js";
4
+ } from "./chunk-NZHI7FHX.js";
5
+ import "./chunk-BYDUN7A5.js";
6
+ import "./chunk-KLN7TJLT.js";
7
+ import "./chunk-2HCONJES.js";
8
8
  import {
9
9
  createLogger
10
- } from "./chunk-SH3A7WBR.js";
10
+ } from "./chunk-TN7HF2SQ.js";
11
11
  import "./chunk-2HUC6NZN.js";
12
12
  import "./chunk-OQLFRJCW.js";
13
13
  import "./chunk-ZPWHCABL.js";
@@ -176,4 +176,4 @@ export {
176
176
  runInitOpencode,
177
177
  runOpencodeValidate
178
178
  };
179
- //# sourceMappingURL=init-opencode-3BV3QDQX.js.map
179
+ //# sourceMappingURL=init-opencode-PXLOY7XY.js.map
@@ -0,0 +1,17 @@
1
+ import {
2
+ IssueTriage,
3
+ createIssueTriage
4
+ } from "./chunk-N7YLNXHT.js";
5
+ import "./chunk-JJEOBIOI.js";
6
+ import "./chunk-5HPJB35V.js";
7
+ import "./chunk-ADIMVMAB.js";
8
+ import "./chunk-3OM2W7H7.js";
9
+ import "./chunk-TN7HF2SQ.js";
10
+ import "./chunk-2HUC6NZN.js";
11
+ import "./chunk-OQLFRJCW.js";
12
+ import "./chunk-ZPWHCABL.js";
13
+ export {
14
+ IssueTriage,
15
+ createIssueTriage
16
+ };
17
+ //# sourceMappingURL=issue-triage-B3KU37U3.js.map
@@ -17,11 +17,11 @@ import {
17
17
  parseFindings,
18
18
  parseSeverity,
19
19
  sumFindings
20
- } from "./chunk-5XDHMVYV.js";
20
+ } from "./chunk-4XWRSCZ2.js";
21
21
  import "./chunk-CQ77TF4Y.js";
22
22
  import "./chunk-OQB3XC5O.js";
23
- import "./chunk-4LD5TWZ5.js";
24
- import "./chunk-SH3A7WBR.js";
23
+ import "./chunk-5HPJB35V.js";
24
+ import "./chunk-TN7HF2SQ.js";
25
25
  import "./chunk-2HUC6NZN.js";
26
26
  import "./chunk-OQLFRJCW.js";
27
27
  import "./chunk-ZPWHCABL.js";
@@ -45,4 +45,4 @@ export {
45
45
  parseSeverity,
46
46
  sumFindings
47
47
  };
48
- //# sourceMappingURL=pr-reviewer-helpers-X2F4GXAU.js.map
48
+ //# sourceMappingURL=pr-reviewer-helpers-QU4F2A3X.js.map
@@ -7,7 +7,7 @@ import {
7
7
  loadGeneratedRegistryEntries,
8
8
  loadUserManifestOverlay,
9
9
  reloadDefaultRegistry
10
- } from "./chunk-SH3A7WBR.js";
10
+ } from "./chunk-TN7HF2SQ.js";
11
11
  import "./chunk-2HUC6NZN.js";
12
12
  import {
13
13
  nexusDataPath
@@ -249,4 +249,4 @@ export {
249
249
  isValidRegistrySubcommand,
250
250
  registryCommand
251
251
  };
252
- //# sourceMappingURL=registry-command-PNBED2PE.js.map
252
+ //# sourceMappingURL=registry-command-2LQLUUXG.js.map
@@ -3,9 +3,9 @@ import {
3
3
  buildPlanFromAnalysis,
4
4
  generateSecurityPlan,
5
5
  resolveScannerData
6
- } from "./chunk-BWP3SQRB.js";
6
+ } from "./chunk-FD3I5B4X.js";
7
7
  import "./chunk-HFOQKCD2.js";
8
- import "./chunk-SH3A7WBR.js";
8
+ import "./chunk-TN7HF2SQ.js";
9
9
  import "./chunk-2HUC6NZN.js";
10
10
  import "./chunk-OQLFRJCW.js";
11
11
  import "./chunk-ZPWHCABL.js";
@@ -15,4 +15,4 @@ export {
15
15
  generateSecurityPlan,
16
16
  resolveScannerData
17
17
  };
18
- //# sourceMappingURL=repo-security-plan-UHYMCN54.js.map
18
+ //# sourceMappingURL=repo-security-plan-E2MTJPSC.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  AttributedInsightSchema,
3
3
  synthesizeResearch
4
- } from "./chunk-TXZVEYXX.js";
5
- import "./chunk-I7GXJESU.js";
4
+ } from "./chunk-BMEJLPAE.js";
5
+ import "./chunk-UM376MEM.js";
6
6
  import "./chunk-NUBSJGQZ.js";
7
- import "./chunk-SH3A7WBR.js";
7
+ import "./chunk-TN7HF2SQ.js";
8
8
  import "./chunk-2HUC6NZN.js";
9
9
  import "./chunk-OQLFRJCW.js";
10
10
  import "./chunk-ZPWHCABL.js";
@@ -12,4 +12,4 @@ export {
12
12
  AttributedInsightSchema,
13
13
  synthesizeResearch
14
14
  };
15
- //# sourceMappingURL=research-helpers-synthesize-QBW2J7OI.js.map
15
+ //# sourceMappingURL=research-helpers-synthesize-4YBZF2LZ.js.map
@@ -2,7 +2,7 @@ import {
2
2
  DEFAULT_ROUTING_MEMORY_CONFIG,
3
3
  RoutingMemory,
4
4
  createRoutingMemory
5
- } from "./chunk-SH3A7WBR.js";
5
+ } from "./chunk-TN7HF2SQ.js";
6
6
  import "./chunk-2HUC6NZN.js";
7
7
  import "./chunk-OQLFRJCW.js";
8
8
  import "./chunk-ZPWHCABL.js";
@@ -11,4 +11,4 @@ export {
11
11
  RoutingMemory,
12
12
  createRoutingMemory
13
13
  };
14
- //# sourceMappingURL=routing-memory-NOXXAXQG.js.map
14
+ //# sourceMappingURL=routing-memory-EIF5XALW.js.map
@@ -6,8 +6,8 @@ import {
6
6
  SessionMemory,
7
7
  SessionMemoryError,
8
8
  createSessionMemory
9
- } from "./chunk-SR5LZ5ZU.js";
10
- import "./chunk-SH3A7WBR.js";
9
+ } from "./chunk-JRU5G6VW.js";
10
+ import "./chunk-TN7HF2SQ.js";
11
11
  import "./chunk-2HUC6NZN.js";
12
12
  import "./chunk-OQLFRJCW.js";
13
13
  import "./chunk-ZPWHCABL.js";
@@ -20,4 +20,4 @@ export {
20
20
  SessionMemoryError,
21
21
  createSessionMemory
22
22
  };
23
- //# sourceMappingURL=session-memory-OOOKYNUT.js.map
23
+ //# sourceMappingURL=session-memory-5GVHJR26.js.map
@@ -8,25 +8,25 @@ import {
8
8
  runWizard,
9
9
  setupCommand,
10
10
  setupCommandAsync
11
- } from "./chunk-YQWTGCN4.js";
12
- import "./chunk-J4VCW54Q.js";
13
- import "./chunk-PKJMR6LK.js";
14
- import "./chunk-ZD37OJIB.js";
15
- import "./chunk-VJIHSPXE.js";
11
+ } from "./chunk-6XQYOWU3.js";
12
+ import "./chunk-6SBSQDCX.js";
13
+ import "./chunk-THTBIBCW.js";
14
+ import "./chunk-NZHI7FHX.js";
15
+ import "./chunk-BYDUN7A5.js";
16
16
  import "./chunk-OQB3XC5O.js";
17
17
  import "./chunk-NUBSJGQZ.js";
18
18
  import "./chunk-6T3EPABN.js";
19
19
  import "./chunk-YPNQPT2F.js";
20
- import "./chunk-XFWFCNBH.js";
21
- import "./chunk-PKFOCPWL.js";
22
- import "./chunk-FMEZ3J4A.js";
23
- import "./chunk-GVGH5NFB.js";
20
+ import "./chunk-AMEVOGE7.js";
21
+ import "./chunk-KLN7TJLT.js";
22
+ import "./chunk-HNC2G7AS.js";
23
+ import "./chunk-2HCONJES.js";
24
24
  import "./chunk-SNJNRDKZ.js";
25
- import "./chunk-WIHC4JQB.js";
25
+ import "./chunk-S645LGB6.js";
26
26
  import "./chunk-QZUG667L.js";
27
- import "./chunk-V5OV5KMM.js";
28
- import "./chunk-CVXS5BGE.js";
29
- import "./chunk-SH3A7WBR.js";
27
+ import "./chunk-FRTNZUUF.js";
28
+ import "./chunk-4O7TU6R3.js";
29
+ import "./chunk-TN7HF2SQ.js";
30
30
  import "./chunk-2HUC6NZN.js";
31
31
  import "./chunk-OQLFRJCW.js";
32
32
  import "./chunk-ZPWHCABL.js";
@@ -41,4 +41,4 @@ export {
41
41
  setupCommand,
42
42
  setupCommandAsync
43
43
  };
44
- //# sourceMappingURL=setup-command-GAUYRBED.js.map
44
+ //# sourceMappingURL=setup-command-MKCEHLU7.js.map