nexus-agents 2.176.2 → 2.178.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 (127) hide show
  1. package/dist/{child-mcp-config-HPWYQFLG.js → child-mcp-config-PACKMI72.js} +2 -2
  2. package/dist/{chunk-YU2JCUM7.js → chunk-27RVYUCU.js} +2 -2
  3. package/dist/{chunk-CNHPSIHY.js → chunk-2UH5MVYS.js} +14 -6
  4. package/dist/chunk-2UH5MVYS.js.map +1 -0
  5. package/dist/{chunk-JRKF4FYO.js → chunk-47UPLZWW.js} +2 -2
  6. package/dist/{chunk-J55NMZ7R.js → chunk-4AF6VYQ7.js} +2 -2
  7. package/dist/{chunk-4S6S6S2S.js → chunk-4IOIURV4.js} +2 -2
  8. package/dist/{chunk-5LTRHNOI.js → chunk-4JIVEF5J.js} +3 -3
  9. package/dist/{chunk-2DE5L734.js → chunk-4NESLVOU.js} +2 -2
  10. package/dist/{chunk-ZOOSSM7D.js → chunk-AIBM5TJS.js} +5 -5
  11. package/dist/{chunk-J4BGV5VE.js → chunk-BP662TCH.js} +2 -2
  12. package/dist/{chunk-XES5DPHV.js → chunk-BPGEBBMI.js} +3 -3
  13. package/dist/{chunk-QI5U2YUL.js → chunk-CCOPA2YX.js} +5 -5
  14. package/dist/chunk-CCOPA2YX.js.map +1 -0
  15. package/dist/{chunk-JGL5HYZL.js → chunk-E4PCF6Q5.js} +3 -3
  16. package/dist/{chunk-XZJU6WLL.js → chunk-E5YASO4I.js} +4 -4
  17. package/dist/{chunk-46XEDJRB.js → chunk-E7BIMTCD.js} +2 -2
  18. package/dist/{chunk-Z55WHIRU.js → chunk-ELH4PIFM.js} +2 -2
  19. package/dist/{chunk-NQU4LNN7.js → chunk-H2PV2ZOM.js} +4 -4
  20. package/dist/{chunk-6HBMN6GZ.js → chunk-HEYVV4XQ.js} +57 -55
  21. package/dist/chunk-HEYVV4XQ.js.map +1 -0
  22. package/dist/{chunk-5YXHHEAG.js → chunk-JZDD7Z2Z.js} +5 -5
  23. package/dist/{chunk-G42V4A5Q.js → chunk-KFEHSYLI.js} +2 -2
  24. package/dist/{chunk-WMV2CXBB.js → chunk-KVQD7Z3R.js} +2 -2
  25. package/dist/{chunk-G5URP3V7.js → chunk-LJ36QD7F.js} +7 -7
  26. package/dist/{chunk-WT4BJODZ.js → chunk-LYDBCTT4.js} +16 -10
  27. package/dist/chunk-LYDBCTT4.js.map +1 -0
  28. package/dist/{chunk-ECBV4JNL.js → chunk-RTGLOWR6.js} +2 -2
  29. package/dist/{chunk-7TXEBDRM.js → chunk-SKVPP327.js} +2 -2
  30. package/dist/{chunk-QQ3CUUBU.js → chunk-SMP4NQ6T.js} +4 -4
  31. package/dist/{chunk-XAWRBQB7.js → chunk-SOZYAAFS.js} +3 -3
  32. package/dist/{chunk-4OPEUDHY.js → chunk-U5ODY6VK.js} +25 -12
  33. package/dist/chunk-U5ODY6VK.js.map +1 -0
  34. package/dist/{chunk-U5CV76ZW.js → chunk-UTWNUG3M.js} +2 -2
  35. package/dist/{chunk-LGBCHTC6.js → chunk-VDYFOQXY.js} +8 -8
  36. package/dist/{chunk-YB4QE7MD.js → chunk-VWKOCFOQ.js} +2 -2
  37. package/dist/{chunk-CGD63GSC.js → chunk-XXTMXJWZ.js} +5 -5
  38. package/dist/{chunk-5ALUADB6.js → chunk-ZH5B2BIL.js} +2 -2
  39. package/dist/{chunk-N3XDPW64.js → chunk-ZQGTPRIM.js} +48 -65
  40. package/dist/chunk-ZQGTPRIM.js.map +1 -0
  41. package/dist/{cli-circuit-breaker-PJOQTGFZ.js → cli-circuit-breaker-OWSE7HFZ.js} +3 -3
  42. package/dist/cli.d.ts +1 -1
  43. package/dist/cli.js +40 -40
  44. package/dist/{composite-router-IRXFQSB6.js → composite-router-ZTARSEYG.js} +2 -2
  45. package/dist/{consensus-vote-O6Q266QE.js → consensus-vote-BEU24RCT.js} +16 -16
  46. package/dist/{consensus-vote-types-BlbNhK1n.d.ts → consensus-vote-types-DusDu6pM.d.ts} +31 -4
  47. package/dist/{context-retriever-GO6ET3MF.js → context-retriever-ZX3CBXIC.js} +8 -8
  48. package/dist/{doctor-deep-6HCHHMRP.js → doctor-deep-U52LMY2R.js} +3 -3
  49. package/dist/{expert-bridge-6OLG6THF.js → expert-bridge-GY5GGOJW.js} +4 -4
  50. package/dist/{factory-MJFGYMNE.js → factory-PBHDVNU2.js} +5 -5
  51. package/dist/{factory-7OM526WB.js → factory-XR2UQOEH.js} +9 -9
  52. package/dist/{improvement-review-PALAAG7V.js → improvement-review-FPZ23HIJ.js} +5 -5
  53. package/dist/index.d.ts +61 -23
  54. package/dist/index.js +30 -30
  55. package/dist/index.js.map +1 -1
  56. package/dist/{init-opencode-NUMHNVIF.js → init-opencode-LLNCIUUF.js} +6 -6
  57. package/dist/{issue-triage-N7GFXNPY.js → issue-triage-PSHCE7RU.js} +6 -6
  58. package/dist/{pr-reviewer-helpers-6EIUJPXS.js → pr-reviewer-helpers-3WVNJRCK.js} +4 -4
  59. package/dist/{registry-command-SVTX7FKB.js → registry-command-JNSSDYGB.js} +2 -2
  60. package/dist/{repo-security-plan-AT7LOXLG.js → repo-security-plan-7QYZJCGT.js} +3 -3
  61. package/dist/{research-helpers-synthesize-R722YWRS.js → research-helpers-synthesize-TSIH4U7M.js} +4 -4
  62. package/dist/{routing-memory-4FXQT5H6.js → routing-memory-PHOZF4L2.js} +2 -2
  63. package/dist/{session-memory-ZQJ6AUSQ.js → session-memory-T5NHGNC5.js} +3 -3
  64. package/dist/{setup-command-IYBRT734.js → setup-command-MJP66PED.js} +14 -14
  65. package/dist/{setup-config-MYLZ2UHR.js → setup-config-2GJZNH7Z.js} +3 -3
  66. package/dist/{setup-custom-api-WZPLTGRQ.js → setup-custom-api-F6FEC2HD.js} +4 -4
  67. package/dist/{tool-memory-5REJXBCB.js → tool-memory-UIWAECRB.js} +5 -5
  68. package/dist/{unified-registry-FM3QB2VN.js → unified-registry-J7NOHQ44.js} +10 -10
  69. package/dist/{weather-report-Y2GYJA6I.js → weather-report-DQANKBJK.js} +2 -2
  70. package/package.json +1 -1
  71. package/dist/chunk-4OPEUDHY.js.map +0 -1
  72. package/dist/chunk-6HBMN6GZ.js.map +0 -1
  73. package/dist/chunk-CNHPSIHY.js.map +0 -1
  74. package/dist/chunk-N3XDPW64.js.map +0 -1
  75. package/dist/chunk-QI5U2YUL.js.map +0 -1
  76. package/dist/chunk-WT4BJODZ.js.map +0 -1
  77. /package/dist/{child-mcp-config-HPWYQFLG.js.map → child-mcp-config-PACKMI72.js.map} +0 -0
  78. /package/dist/{chunk-YU2JCUM7.js.map → chunk-27RVYUCU.js.map} +0 -0
  79. /package/dist/{chunk-JRKF4FYO.js.map → chunk-47UPLZWW.js.map} +0 -0
  80. /package/dist/{chunk-J55NMZ7R.js.map → chunk-4AF6VYQ7.js.map} +0 -0
  81. /package/dist/{chunk-4S6S6S2S.js.map → chunk-4IOIURV4.js.map} +0 -0
  82. /package/dist/{chunk-5LTRHNOI.js.map → chunk-4JIVEF5J.js.map} +0 -0
  83. /package/dist/{chunk-2DE5L734.js.map → chunk-4NESLVOU.js.map} +0 -0
  84. /package/dist/{chunk-ZOOSSM7D.js.map → chunk-AIBM5TJS.js.map} +0 -0
  85. /package/dist/{chunk-J4BGV5VE.js.map → chunk-BP662TCH.js.map} +0 -0
  86. /package/dist/{chunk-XES5DPHV.js.map → chunk-BPGEBBMI.js.map} +0 -0
  87. /package/dist/{chunk-JGL5HYZL.js.map → chunk-E4PCF6Q5.js.map} +0 -0
  88. /package/dist/{chunk-XZJU6WLL.js.map → chunk-E5YASO4I.js.map} +0 -0
  89. /package/dist/{chunk-46XEDJRB.js.map → chunk-E7BIMTCD.js.map} +0 -0
  90. /package/dist/{chunk-Z55WHIRU.js.map → chunk-ELH4PIFM.js.map} +0 -0
  91. /package/dist/{chunk-NQU4LNN7.js.map → chunk-H2PV2ZOM.js.map} +0 -0
  92. /package/dist/{chunk-5YXHHEAG.js.map → chunk-JZDD7Z2Z.js.map} +0 -0
  93. /package/dist/{chunk-G42V4A5Q.js.map → chunk-KFEHSYLI.js.map} +0 -0
  94. /package/dist/{chunk-WMV2CXBB.js.map → chunk-KVQD7Z3R.js.map} +0 -0
  95. /package/dist/{chunk-G5URP3V7.js.map → chunk-LJ36QD7F.js.map} +0 -0
  96. /package/dist/{chunk-ECBV4JNL.js.map → chunk-RTGLOWR6.js.map} +0 -0
  97. /package/dist/{chunk-7TXEBDRM.js.map → chunk-SKVPP327.js.map} +0 -0
  98. /package/dist/{chunk-QQ3CUUBU.js.map → chunk-SMP4NQ6T.js.map} +0 -0
  99. /package/dist/{chunk-XAWRBQB7.js.map → chunk-SOZYAAFS.js.map} +0 -0
  100. /package/dist/{chunk-U5CV76ZW.js.map → chunk-UTWNUG3M.js.map} +0 -0
  101. /package/dist/{chunk-LGBCHTC6.js.map → chunk-VDYFOQXY.js.map} +0 -0
  102. /package/dist/{chunk-YB4QE7MD.js.map → chunk-VWKOCFOQ.js.map} +0 -0
  103. /package/dist/{chunk-CGD63GSC.js.map → chunk-XXTMXJWZ.js.map} +0 -0
  104. /package/dist/{chunk-5ALUADB6.js.map → chunk-ZH5B2BIL.js.map} +0 -0
  105. /package/dist/{cli-circuit-breaker-PJOQTGFZ.js.map → cli-circuit-breaker-OWSE7HFZ.js.map} +0 -0
  106. /package/dist/{composite-router-IRXFQSB6.js.map → composite-router-ZTARSEYG.js.map} +0 -0
  107. /package/dist/{consensus-vote-O6Q266QE.js.map → consensus-vote-BEU24RCT.js.map} +0 -0
  108. /package/dist/{context-retriever-GO6ET3MF.js.map → context-retriever-ZX3CBXIC.js.map} +0 -0
  109. /package/dist/{doctor-deep-6HCHHMRP.js.map → doctor-deep-U52LMY2R.js.map} +0 -0
  110. /package/dist/{expert-bridge-6OLG6THF.js.map → expert-bridge-GY5GGOJW.js.map} +0 -0
  111. /package/dist/{factory-7OM526WB.js.map → factory-PBHDVNU2.js.map} +0 -0
  112. /package/dist/{factory-MJFGYMNE.js.map → factory-XR2UQOEH.js.map} +0 -0
  113. /package/dist/{improvement-review-PALAAG7V.js.map → improvement-review-FPZ23HIJ.js.map} +0 -0
  114. /package/dist/{init-opencode-NUMHNVIF.js.map → init-opencode-LLNCIUUF.js.map} +0 -0
  115. /package/dist/{issue-triage-N7GFXNPY.js.map → issue-triage-PSHCE7RU.js.map} +0 -0
  116. /package/dist/{pr-reviewer-helpers-6EIUJPXS.js.map → pr-reviewer-helpers-3WVNJRCK.js.map} +0 -0
  117. /package/dist/{registry-command-SVTX7FKB.js.map → registry-command-JNSSDYGB.js.map} +0 -0
  118. /package/dist/{repo-security-plan-AT7LOXLG.js.map → repo-security-plan-7QYZJCGT.js.map} +0 -0
  119. /package/dist/{research-helpers-synthesize-R722YWRS.js.map → research-helpers-synthesize-TSIH4U7M.js.map} +0 -0
  120. /package/dist/{routing-memory-4FXQT5H6.js.map → routing-memory-PHOZF4L2.js.map} +0 -0
  121. /package/dist/{session-memory-ZQJ6AUSQ.js.map → session-memory-T5NHGNC5.js.map} +0 -0
  122. /package/dist/{setup-command-IYBRT734.js.map → setup-command-MJP66PED.js.map} +0 -0
  123. /package/dist/{setup-config-MYLZ2UHR.js.map → setup-config-2GJZNH7Z.js.map} +0 -0
  124. /package/dist/{setup-custom-api-WZPLTGRQ.js.map → setup-custom-api-F6FEC2HD.js.map} +0 -0
  125. /package/dist/{tool-memory-5REJXBCB.js.map → tool-memory-UIWAECRB.js.map} +0 -0
  126. /package/dist/{unified-registry-FM3QB2VN.js.map → unified-registry-J7NOHQ44.js.map} +0 -0
  127. /package/dist/{weather-report-Y2GYJA6I.js.map → weather-report-DQANKBJK.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-J4BGV5VE.js";
3
+ } from "./chunk-BP662TCH.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-HFOQKCD2.js";
@@ -21,10 +21,10 @@ import {
21
21
  DEFAULT_TASK_TTL_MS,
22
22
  DEFAULT_TOOL_RATE_LIMITS,
23
23
  clampTaskTtl
24
- } from "./chunk-LGBCHTC6.js";
24
+ } from "./chunk-VDYFOQXY.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-G5URP3V7.js";
27
+ } from "./chunk-LJ36QD7F.js";
28
28
  import {
29
29
  JobStatusSchema,
30
30
  abortJob,
@@ -45,21 +45,21 @@ import {
45
45
  simulationDeniedResult,
46
46
  toJobSummary,
47
47
  writeJobCancelled
48
- } from "./chunk-4OPEUDHY.js";
48
+ } from "./chunk-U5ODY6VK.js";
49
49
  import {
50
50
  normalizeTopicToCanonical,
51
51
  synthesizeResearch
52
- } from "./chunk-JGL5HYZL.js";
52
+ } from "./chunk-E4PCF6Q5.js";
53
53
  import {
54
54
  IssueTriage
55
- } from "./chunk-5YXHHEAG.js";
55
+ } from "./chunk-JZDD7Z2Z.js";
56
56
  import {
57
57
  resolveEnvMode,
58
58
  sanitizeInput
59
- } from "./chunk-YU2JCUM7.js";
59
+ } from "./chunk-27RVYUCU.js";
60
60
  import {
61
61
  withPrerequisite
62
- } from "./chunk-XES5DPHV.js";
62
+ } from "./chunk-BPGEBBMI.js";
63
63
  import {
64
64
  NOOP_NOTIFIER,
65
65
  RateLimiter,
@@ -82,18 +82,18 @@ import {
82
82
  withAuditTrail,
83
83
  withProgressHeartbeat,
84
84
  wrapToolWithTimeout
85
- } from "./chunk-XAWRBQB7.js";
85
+ } from "./chunk-SOZYAAFS.js";
86
86
  import {
87
87
  createAuditTrail,
88
88
  createGraphAuditBridge,
89
89
  emitPipelinePolicyEvent
90
- } from "./chunk-G42V4A5Q.js";
90
+ } from "./chunk-KFEHSYLI.js";
91
91
  import {
92
92
  EventTopics,
93
93
  createEvent,
94
94
  getGlobalEventBus,
95
95
  getGlobalRegistry
96
- } from "./chunk-QQ3CUUBU.js";
96
+ } from "./chunk-SMP4NQ6T.js";
97
97
  import {
98
98
  IDENTIFIER_RE,
99
99
  LANG_VALUES,
@@ -126,15 +126,15 @@ import {
126
126
  parseRegistry,
127
127
  sourceExistsInRegistry,
128
128
  summarizeContextForPrompt
129
- } from "./chunk-CGD63GSC.js";
129
+ } from "./chunk-XXTMXJWZ.js";
130
130
  import {
131
131
  getTokenEnvVars,
132
132
  resolveToken
133
- } from "./chunk-JRKF4FYO.js";
133
+ } from "./chunk-47UPLZWW.js";
134
134
  import {
135
135
  loadPapersRegistry,
136
136
  loadTechniquesRegistry
137
- } from "./chunk-46XEDJRB.js";
137
+ } from "./chunk-E7BIMTCD.js";
138
138
  import {
139
139
  resolveInsideRoot
140
140
  } from "./chunk-NUBSJGQZ.js";
@@ -143,14 +143,14 @@ import {
143
143
  MemoryImportance,
144
144
  calculateTextJaccardSimilarity,
145
145
  getToolMemory
146
- } from "./chunk-NQU4LNN7.js";
146
+ } from "./chunk-H2PV2ZOM.js";
147
147
  import {
148
148
  STOPWORDS,
149
149
  truncateWithInfo
150
150
  } from "./chunk-6T3EPABN.js";
151
151
  import {
152
152
  createSessionMemory
153
- } from "./chunk-U5CV76ZW.js";
153
+ } from "./chunk-UTWNUG3M.js";
154
154
  import {
155
155
  BUILT_IN_EXPERTS,
156
156
  BuiltInExpertTypeSchema,
@@ -168,25 +168,25 @@ import {
168
168
  getAvailableClis,
169
169
  sleep,
170
170
  withTimeout
171
- } from "./chunk-N3XDPW64.js";
171
+ } from "./chunk-ZQGTPRIM.js";
172
172
  import {
173
173
  BaseAdapter,
174
174
  createStream,
175
175
  requireApiKey,
176
176
  validateApiKeyPresence
177
- } from "./chunk-QI5U2YUL.js";
177
+ } from "./chunk-CCOPA2YX.js";
178
178
  import {
179
179
  DEFAULTS
180
- } from "./chunk-WMV2CXBB.js";
180
+ } from "./chunk-KVQD7Z3R.js";
181
181
  import {
182
182
  getAvailabilityCache,
183
183
  getCliForModelId,
184
184
  resolveFallback
185
- } from "./chunk-J55NMZ7R.js";
185
+ } from "./chunk-4AF6VYQ7.js";
186
186
  import {
187
187
  generateHyphenId,
188
188
  generateUUID
189
- } from "./chunk-YB4QE7MD.js";
189
+ } from "./chunk-VWKOCFOQ.js";
190
190
  import {
191
191
  AGENT_ROUTER_TIMEOUTS,
192
192
  API_TIMEOUTS,
@@ -283,7 +283,7 @@ import {
283
283
  selectStrategyByManifest,
284
284
  toExpertTaskAnalysisResult,
285
285
  withStep
286
- } from "./chunk-CNHPSIHY.js";
286
+ } from "./chunk-2UH5MVYS.js";
287
287
  import {
288
288
  ensureLearningDir,
289
289
  getMetaOutcomesFile,
@@ -1472,14 +1472,15 @@ var GeminiAdapter = class extends BaseAdapter {
1472
1472
  const content = this.extractContentBlocks(response);
1473
1473
  const candidate = response.candidates?.[0];
1474
1474
  const usageMetadata = response.usageMetadata;
1475
- const usage = {
1476
- inputTokens: usageMetadata?.promptTokenCount ?? 0,
1477
- outputTokens: usageMetadata?.candidatesTokenCount ?? 0,
1478
- totalTokens: usageMetadata?.totalTokenCount ?? 0
1475
+ const usage = usageMetadata === void 0 ? void 0 : {
1476
+ inputTokens: usageMetadata.promptTokenCount ?? 0,
1477
+ outputTokens: usageMetadata.candidatesTokenCount ?? 0,
1478
+ totalTokens: usageMetadata.totalTokenCount ?? 0,
1479
+ ...usageMetadata.cachedContentTokenCount !== void 0 ? { cachedInputTokens: usageMetadata.cachedContentTokenCount } : {}
1479
1480
  };
1480
1481
  return {
1481
1482
  content,
1482
- usage,
1483
+ ...usage !== void 0 ? { usage } : {},
1483
1484
  stopReason: mapStopReason2(candidate?.finishReason),
1484
1485
  model: this.resolvedModelId
1485
1486
  };
@@ -3799,9 +3800,9 @@ async function executeModelCompletion(params) {
3799
3800
  }
3800
3801
  budgetTracker.recordUsage({
3801
3802
  timestamp: getTimeProvider().now(),
3802
- inputTokens: result.value.usage.inputTokens,
3803
- outputTokens: result.value.usage.outputTokens,
3804
- totalTokens: result.value.usage.totalTokens
3803
+ inputTokens: result.value.usage?.inputTokens ?? 0,
3804
+ outputTokens: result.value.usage?.outputTokens ?? 0,
3805
+ totalTokens: result.value.usage?.totalTokens ?? 0
3805
3806
  });
3806
3807
  return ok(result.value);
3807
3808
  }
@@ -4702,7 +4703,7 @@ var SimpleAgent = class extends BaseAgent {
4702
4703
  output: textContent,
4703
4704
  metadata: {
4704
4705
  durationMs,
4705
- tokensUsed: result.value.usage.totalTokens,
4706
+ tokensUsed: result.value.usage?.totalTokens ?? 0,
4706
4707
  toolsUsed: [],
4707
4708
  model: result.value.model
4708
4709
  }
@@ -4727,7 +4728,7 @@ var SimpleAgent = class extends BaseAgent {
4727
4728
  output: text,
4728
4729
  metadata: {
4729
4730
  durationMs,
4730
- tokensUsed: retry.value.usage.totalTokens,
4731
+ tokensUsed: retry.value.usage?.totalTokens ?? 0,
4731
4732
  toolsUsed: [],
4732
4733
  model: retry.value.model
4733
4734
  }
@@ -9657,7 +9658,7 @@ Please analyze and provide your response in the JSON format specified.`
9657
9658
  output: result,
9658
9659
  metadata: {
9659
9660
  durationMs: getTimeProvider().now() - startTime,
9660
- tokensUsed: response.usage.totalTokens,
9661
+ tokensUsed: response.usage?.totalTokens ?? 0,
9661
9662
  toolsUsed: [],
9662
9663
  model: response.model
9663
9664
  }
@@ -10691,7 +10692,7 @@ Analyze for security vulnerabilities and provide findings in the specified JSON
10691
10692
  output: result,
10692
10693
  metadata: {
10693
10694
  durationMs: getTimeProvider().now() - startTime,
10694
- tokensUsed: response.usage.totalTokens,
10695
+ tokensUsed: response.usage?.totalTokens ?? 0,
10695
10696
  toolsUsed: [],
10696
10697
  model: response.model
10697
10698
  }
@@ -11031,7 +11032,7 @@ Analyze and provide your architectural recommendations in the specified JSON for
11031
11032
  output: result,
11032
11033
  metadata: {
11033
11034
  durationMs: getTimeProvider().now() - startTime,
11034
- tokensUsed: response.usage.totalTokens,
11035
+ tokensUsed: response.usage?.totalTokens ?? 0,
11035
11036
  toolsUsed: [],
11036
11037
  model: response.model
11037
11038
  }
@@ -11370,7 +11371,7 @@ Analyze and provide testing recommendations in the specified JSON format.`
11370
11371
  output: result,
11371
11372
  metadata: {
11372
11373
  durationMs: getTimeProvider().now() - startTime,
11373
- tokensUsed: response.usage.totalTokens,
11374
+ tokensUsed: response.usage?.totalTokens ?? 0,
11374
11375
  toolsUsed: [],
11375
11376
  model: response.model
11376
11377
  }
@@ -11728,7 +11729,7 @@ Generate documentation in the specified JSON format.`
11728
11729
  output: result,
11729
11730
  metadata: {
11730
11731
  durationMs: getTimeProvider().now() - startTime,
11731
- tokensUsed: response.usage.totalTokens,
11732
+ tokensUsed: response.usage?.totalTokens ?? 0,
11732
11733
  toolsUsed: [],
11733
11734
  model: response.model
11734
11735
  }
@@ -11808,7 +11809,8 @@ function isPlainObject(v) {
11808
11809
  return typeof v === "object" && v !== null && !Array.isArray(v);
11809
11810
  }
11810
11811
  function applyDocOptionalFields(result, p) {
11811
- if (Array.isArray(p["sections"])) result.sections = p["sections"];
11812
+ if (Array.isArray(p["sections"]))
11813
+ result.sections = p["sections"];
11812
11814
  if (isPlainObject(p["apiDocs"])) {
11813
11815
  result.apiDocs = p["apiDocs"];
11814
11816
  }
@@ -16759,8 +16761,8 @@ var AgenticAdapter = class {
16759
16761
  };
16760
16762
  }
16761
16763
  const response = completion.value;
16762
- state.totalInputTokens += response.usage.inputTokens;
16763
- state.totalOutputTokens += response.usage.outputTokens;
16764
+ state.totalInputTokens += response.usage?.inputTokens ?? 0;
16765
+ state.totalOutputTokens += response.usage?.outputTokens ?? 0;
16764
16766
  const toolUses = response.content.filter(
16765
16767
  (c) => c.type === "tool_use"
16766
16768
  );
@@ -17003,8 +17005,8 @@ function buildTurn(b) {
17003
17005
  toolResult: b.toolResult,
17004
17006
  modelLatencyMs: b.modelLatencyMs,
17005
17007
  toolLatencyMs: b.toolLatencyMs,
17006
- inputTokens: b.response.usage.inputTokens,
17007
- outputTokens: b.response.usage.outputTokens
17008
+ inputTokens: b.response.usage?.inputTokens ?? 0,
17009
+ outputTokens: b.response.usage?.outputTokens ?? 0
17008
17010
  };
17009
17011
  }
17010
17012
  function extractFinalText(content) {
@@ -28344,7 +28346,7 @@ function execIdFields(executionId) {
28344
28346
  async function populateUnifiedContextOnState(state, options) {
28345
28347
  const taskCandidate = state["task"];
28346
28348
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
28347
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-GO6ET3MF.js");
28349
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-ZX3CBXIC.js");
28348
28350
  const category = inferTaskCategory2(taskCandidate);
28349
28351
  const executionId = options?.executionId;
28350
28352
  const execFields = execIdFields(executionId);
@@ -43879,7 +43881,7 @@ async function tryIssueTriage(task) {
43879
43881
  try {
43880
43882
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
43881
43883
  if (issueMatch === null) return null;
43882
- const { createIssueTriage } = await import("./issue-triage-N7GFXNPY.js");
43884
+ const { createIssueTriage } = await import("./issue-triage-PSHCE7RU.js");
43883
43885
  const triage = createIssueTriage();
43884
43886
  const owner = issueMatch[1] ?? "";
43885
43887
  const num = issueMatch[2] ?? "";
@@ -43907,7 +43909,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
43907
43909
  ]);
43908
43910
  async function classifyWithLLM(task) {
43909
43911
  try {
43910
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-6OLG6THF.js");
43912
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-GY5GGOJW.js");
43911
43913
  const prompt = [
43912
43914
  "Classify this task into exactly one pipeline template.",
43913
43915
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -45548,7 +45550,7 @@ var memoryInitPromise = null;
45548
45550
  async function initPipelineMemory() {
45549
45551
  if (cachedMemory !== null) return cachedMemory;
45550
45552
  try {
45551
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-ZQJ6AUSQ.js");
45553
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-T5NHGNC5.js");
45552
45554
  const { getLearningDir } = await import("./learning-persistence-EGY4VKKO.js");
45553
45555
  const mem = createSessionMemory2(getLearningDir());
45554
45556
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -45610,7 +45612,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
45610
45612
  callRecord(routingMemoryCache);
45611
45613
  return;
45612
45614
  }
45613
- routingMemoryInitPromise ??= import("./routing-memory-4FXQT5H6.js").then(({ createRoutingMemory }) => {
45615
+ routingMemoryInitPromise ??= import("./routing-memory-PHOZF4L2.js").then(({ createRoutingMemory }) => {
45614
45616
  routingMemoryCache ??= createRoutingMemory();
45615
45617
  return routingMemoryCache;
45616
45618
  }).catch((error) => {
@@ -45644,7 +45646,7 @@ ${text}` : "";
45644
45646
  }
45645
45647
  async function getWeatherContext() {
45646
45648
  try {
45647
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-Y2GYJA6I.js");
45649
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-DQANKBJK.js");
45648
45650
  const report = generateWeatherReport2({ includeAdaptive: true });
45649
45651
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
45650
45652
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -45662,7 +45664,7 @@ ${lines}
45662
45664
  }
45663
45665
  async function getMemoryContext(task) {
45664
45666
  try {
45665
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-ZQJ6AUSQ.js");
45667
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-T5NHGNC5.js");
45666
45668
  const { getLearningDir } = await import("./learning-persistence-EGY4VKKO.js");
45667
45669
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
45668
45670
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -45777,7 +45779,7 @@ ${contextBlock}`;
45777
45779
  const strategy = config.votingStrategy ?? "higher_order";
45778
45780
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
45779
45781
  try {
45780
- const { executeVoting } = await import("./consensus-vote-O6Q266QE.js");
45782
+ const { executeVoting } = await import("./consensus-vote-BEU24RCT.js");
45781
45783
  const votingResult = await executeVoting(
45782
45784
  {
45783
45785
  proposal: buildVoteProposal(plan, research),
@@ -46218,7 +46220,7 @@ async function searchCodebaseForTask(task) {
46218
46220
  }
46219
46221
  async function queryResearchRegistry(task) {
46220
46222
  try {
46221
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-R722YWRS.js");
46223
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-TSIH4U7M.js");
46222
46224
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
46223
46225
  if (topic === void 0) return null;
46224
46226
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -46289,7 +46291,7 @@ function createScanStageWrapper() {
46289
46291
  try {
46290
46292
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
46291
46293
  if (slug !== void 0) {
46292
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-AT7LOXLG.js");
46294
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-7QYZJCGT.js");
46293
46295
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
46294
46296
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
46295
46297
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -49274,7 +49276,7 @@ var GitHubTaskTracker = class {
49274
49276
  cachedProvider = null;
49275
49277
  async getProvider() {
49276
49278
  if (this.cachedProvider !== null) return this.cachedProvider;
49277
- const { createScmProvider } = await import("./factory-MJFGYMNE.js");
49279
+ const { createScmProvider } = await import("./factory-PBHDVNU2.js");
49278
49280
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
49279
49281
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
49280
49282
  this.cachedProvider = result.value;
@@ -50116,7 +50118,7 @@ async function probeSource(source, includeModelIds) {
50116
50118
  }
50117
50119
  }
50118
50120
  async function defaultSources(includeOpenRouter) {
50119
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-7OM526WB.js");
50121
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-XR2UQOEH.js");
50120
50122
  const adapters = createAllAdapters2();
50121
50123
  return buildDefaultModelSources(adapters, { includeOpenRouter });
50122
50124
  }
@@ -54136,4 +54138,4 @@ export {
54136
54138
  shutdownFeedbackSubscriber,
54137
54139
  createEventBusBridge
54138
54140
  };
54139
- //# sourceMappingURL=chunk-6HBMN6GZ.js.map
54141
+ //# sourceMappingURL=chunk-HEYVV4XQ.js.map