nexus-agents 4.22.1 → 4.22.3

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-GNF2DS7K.js → child-mcp-config-Y3QSDCYI.js} +2 -2
  2. package/dist/{chunk-IDLQNS5U.js → chunk-2SVIHHNJ.js} +3 -3
  3. package/dist/{chunk-MDVHI3PP.js → chunk-6U3LS57H.js} +6 -6
  4. package/dist/{chunk-26VBDXT7.js → chunk-7HBTESFT.js} +13 -7
  5. package/dist/chunk-7HBTESFT.js.map +1 -0
  6. package/dist/{chunk-CQ77TF4Y.js → chunk-BYUVLVN7.js} +1 -1
  7. package/dist/{chunk-CQ77TF4Y.js.map → chunk-BYUVLVN7.js.map} +1 -1
  8. package/dist/{chunk-TV3L3GME.js → chunk-CBORIR4Y.js} +2 -2
  9. package/dist/{chunk-JJC5YKBH.js → chunk-D6ZTSN34.js} +3 -3
  10. package/dist/{chunk-6MVRXQ6V.js → chunk-DGLAEH7Y.js} +2 -2
  11. package/dist/{chunk-HVCYICUX.js → chunk-EU7S5CDW.js} +35 -24
  12. package/dist/chunk-EU7S5CDW.js.map +1 -0
  13. package/dist/{chunk-QWTDGESS.js → chunk-FVUQY73A.js} +2 -2
  14. package/dist/{chunk-HWBUN7WP.js → chunk-GMJQ6QMZ.js} +2 -2
  15. package/dist/{chunk-S3EAMH4I.js → chunk-H7CV35LZ.js} +3 -3
  16. package/dist/{chunk-2SXZIUEA.js → chunk-ICGYXBS6.js} +2 -2
  17. package/dist/{chunk-3AAAEN6N.js → chunk-IK6JPHMX.js} +5 -5
  18. package/dist/{chunk-C67BIG35.js → chunk-JM42KPWJ.js} +8 -8
  19. package/dist/{chunk-3X2ZQAJI.js → chunk-JR4XD3T7.js} +4 -4
  20. package/dist/{chunk-BZTFS7FN.js → chunk-JV6SMJMJ.js} +2 -2
  21. package/dist/{chunk-Z6W6G35I.js → chunk-KDUSLLZM.js} +2 -2
  22. package/dist/{chunk-UTJRTD7H.js → chunk-LX5HF6N5.js} +134 -73
  23. package/dist/{chunk-UTJRTD7H.js.map → chunk-LX5HF6N5.js.map} +1 -1
  24. package/dist/{chunk-PT3QWCKF.js → chunk-MM7BINTV.js} +3 -3
  25. package/dist/{chunk-MNPD6TMW.js → chunk-MTGMOLRO.js} +2 -2
  26. package/dist/{chunk-CMXVOO4L.js → chunk-N5W3GATS.js} +7 -7
  27. package/dist/{chunk-7B5YTCHU.js → chunk-P422WQJM.js} +2 -2
  28. package/dist/{chunk-KASC5XK7.js → chunk-PSXX2GBZ.js} +7 -7
  29. package/dist/{chunk-VZHZFAYL.js → chunk-QRG7UR2F.js} +2 -2
  30. package/dist/{chunk-LYI5GXON.js → chunk-RE2GYZRK.js} +5 -5
  31. package/dist/{chunk-PAZLJC46.js → chunk-RMTTKP4L.js} +2 -2
  32. package/dist/{chunk-BDEWOJL4.js → chunk-SBLLJXJO.js} +2 -2
  33. package/dist/{chunk-ZDLWHEFZ.js → chunk-TBXAEAKP.js} +2 -2
  34. package/dist/{chunk-M4BAGHYQ.js → chunk-TMKBZG3W.js} +2 -2
  35. package/dist/{chunk-AQV5RKO7.js → chunk-V533P6BT.js} +4 -4
  36. package/dist/{chunk-G2USF7DN.js → chunk-W2DYH4WL.js} +8 -8
  37. package/dist/{chunk-NF7GW4QQ.js → chunk-X7MLVGJV.js} +2 -2
  38. package/dist/{chunk-AJM6RCCB.js → chunk-XYWCZNFC.js} +2 -2
  39. package/dist/{cli-circuit-breaker-NSXLDTKZ.js → cli-circuit-breaker-T2IKLJVA.js} +3 -3
  40. package/dist/cli.js +41 -43
  41. package/dist/cli.js.map +1 -1
  42. package/dist/{composite-router-ULSYJV7S.js → composite-router-CCDCVYTY.js} +2 -2
  43. package/dist/{consensus-vote-OUZGLMJ4.js → consensus-vote-TMMGZROW.js} +16 -16
  44. package/dist/{context-retriever-QAZWTGAT.js → context-retriever-CKJ7EJME.js} +8 -8
  45. package/dist/{doctor-deep-IWQUV5IH.js → doctor-deep-MIQ5QYUL.js} +3 -3
  46. package/dist/{doctor-live-MJSBAH5J.js → doctor-live-IAERE7DO.js} +9 -9
  47. package/dist/{expert-bridge-6D43UDLS.js → expert-bridge-5MK4DOB7.js} +4 -4
  48. package/dist/{factory-2MLMLJDK.js → factory-6FNJM6P3.js} +9 -9
  49. package/dist/{factory-GUBAT3HH.js → factory-OO7MN24L.js} +5 -5
  50. package/dist/{improvement-review-W6HJIQLG.js → improvement-review-DKCVIJSF.js} +5 -5
  51. package/dist/index.js +31 -31
  52. package/dist/{init-opencode-TCP3OSFK.js → init-opencode-CM2HL2PI.js} +6 -6
  53. package/dist/issue-triage-NH25YRNT.js +17 -0
  54. package/dist/{pr-reviewer-helpers-VKQR2T3Y.js → pr-reviewer-helpers-I5UIREUR.js} +5 -5
  55. package/dist/{registry-command-ALLKEWVO.js → registry-command-BYRGRQ3I.js} +2 -2
  56. package/dist/{repo-security-plan-SJYA5PJC.js → repo-security-plan-NP6AT3NR.js} +3 -3
  57. package/dist/{research-helpers-synthesize-ERZD3P4M.js → research-helpers-synthesize-2R6TO2SP.js} +4 -4
  58. package/dist/{routing-memory-4WAKAU2L.js → routing-memory-IZH3XQQH.js} +2 -2
  59. package/dist/{session-memory-XR5FJQSM.js → session-memory-OWEWA5BX.js} +3 -3
  60. package/dist/{setup-config-26GAKOC3.js → setup-config-O7LHHD42.js} +3 -3
  61. package/dist/{setup-custom-api-TKMWDJJW.js → setup-custom-api-OZ3QCQTJ.js} +4 -4
  62. package/dist/setup-data-dir-XPXP3KIZ.js +28 -0
  63. package/dist/{tool-memory-QCZKITSG.js → tool-memory-LYKMCW7U.js} +5 -5
  64. package/dist/{unified-registry-63G7RTA6.js → unified-registry-ZSPVJ4BO.js} +10 -10
  65. package/dist/{weather-report-JVVJXNQY.js → weather-report-4OFVK5Q5.js} +2 -2
  66. package/package.json +1 -1
  67. package/dist/chunk-26VBDXT7.js.map +0 -1
  68. package/dist/chunk-HVCYICUX.js.map +0 -1
  69. package/dist/issue-triage-CLHI2MHK.js +0 -17
  70. package/dist/setup-data-dir-BKIKRQCE.js +0 -28
  71. /package/dist/{child-mcp-config-GNF2DS7K.js.map → child-mcp-config-Y3QSDCYI.js.map} +0 -0
  72. /package/dist/{chunk-IDLQNS5U.js.map → chunk-2SVIHHNJ.js.map} +0 -0
  73. /package/dist/{chunk-MDVHI3PP.js.map → chunk-6U3LS57H.js.map} +0 -0
  74. /package/dist/{chunk-TV3L3GME.js.map → chunk-CBORIR4Y.js.map} +0 -0
  75. /package/dist/{chunk-JJC5YKBH.js.map → chunk-D6ZTSN34.js.map} +0 -0
  76. /package/dist/{chunk-6MVRXQ6V.js.map → chunk-DGLAEH7Y.js.map} +0 -0
  77. /package/dist/{chunk-QWTDGESS.js.map → chunk-FVUQY73A.js.map} +0 -0
  78. /package/dist/{chunk-HWBUN7WP.js.map → chunk-GMJQ6QMZ.js.map} +0 -0
  79. /package/dist/{chunk-S3EAMH4I.js.map → chunk-H7CV35LZ.js.map} +0 -0
  80. /package/dist/{chunk-2SXZIUEA.js.map → chunk-ICGYXBS6.js.map} +0 -0
  81. /package/dist/{chunk-3AAAEN6N.js.map → chunk-IK6JPHMX.js.map} +0 -0
  82. /package/dist/{chunk-C67BIG35.js.map → chunk-JM42KPWJ.js.map} +0 -0
  83. /package/dist/{chunk-3X2ZQAJI.js.map → chunk-JR4XD3T7.js.map} +0 -0
  84. /package/dist/{chunk-BZTFS7FN.js.map → chunk-JV6SMJMJ.js.map} +0 -0
  85. /package/dist/{chunk-Z6W6G35I.js.map → chunk-KDUSLLZM.js.map} +0 -0
  86. /package/dist/{chunk-PT3QWCKF.js.map → chunk-MM7BINTV.js.map} +0 -0
  87. /package/dist/{chunk-MNPD6TMW.js.map → chunk-MTGMOLRO.js.map} +0 -0
  88. /package/dist/{chunk-CMXVOO4L.js.map → chunk-N5W3GATS.js.map} +0 -0
  89. /package/dist/{chunk-7B5YTCHU.js.map → chunk-P422WQJM.js.map} +0 -0
  90. /package/dist/{chunk-KASC5XK7.js.map → chunk-PSXX2GBZ.js.map} +0 -0
  91. /package/dist/{chunk-VZHZFAYL.js.map → chunk-QRG7UR2F.js.map} +0 -0
  92. /package/dist/{chunk-LYI5GXON.js.map → chunk-RE2GYZRK.js.map} +0 -0
  93. /package/dist/{chunk-PAZLJC46.js.map → chunk-RMTTKP4L.js.map} +0 -0
  94. /package/dist/{chunk-BDEWOJL4.js.map → chunk-SBLLJXJO.js.map} +0 -0
  95. /package/dist/{chunk-ZDLWHEFZ.js.map → chunk-TBXAEAKP.js.map} +0 -0
  96. /package/dist/{chunk-M4BAGHYQ.js.map → chunk-TMKBZG3W.js.map} +0 -0
  97. /package/dist/{chunk-AQV5RKO7.js.map → chunk-V533P6BT.js.map} +0 -0
  98. /package/dist/{chunk-G2USF7DN.js.map → chunk-W2DYH4WL.js.map} +0 -0
  99. /package/dist/{chunk-NF7GW4QQ.js.map → chunk-X7MLVGJV.js.map} +0 -0
  100. /package/dist/{chunk-AJM6RCCB.js.map → chunk-XYWCZNFC.js.map} +0 -0
  101. /package/dist/{cli-circuit-breaker-NSXLDTKZ.js.map → cli-circuit-breaker-T2IKLJVA.js.map} +0 -0
  102. /package/dist/{composite-router-ULSYJV7S.js.map → composite-router-CCDCVYTY.js.map} +0 -0
  103. /package/dist/{consensus-vote-OUZGLMJ4.js.map → consensus-vote-TMMGZROW.js.map} +0 -0
  104. /package/dist/{context-retriever-QAZWTGAT.js.map → context-retriever-CKJ7EJME.js.map} +0 -0
  105. /package/dist/{doctor-deep-IWQUV5IH.js.map → doctor-deep-MIQ5QYUL.js.map} +0 -0
  106. /package/dist/{doctor-live-MJSBAH5J.js.map → doctor-live-IAERE7DO.js.map} +0 -0
  107. /package/dist/{expert-bridge-6D43UDLS.js.map → expert-bridge-5MK4DOB7.js.map} +0 -0
  108. /package/dist/{factory-2MLMLJDK.js.map → factory-6FNJM6P3.js.map} +0 -0
  109. /package/dist/{factory-GUBAT3HH.js.map → factory-OO7MN24L.js.map} +0 -0
  110. /package/dist/{improvement-review-W6HJIQLG.js.map → improvement-review-DKCVIJSF.js.map} +0 -0
  111. /package/dist/{init-opencode-TCP3OSFK.js.map → init-opencode-CM2HL2PI.js.map} +0 -0
  112. /package/dist/{issue-triage-CLHI2MHK.js.map → issue-triage-NH25YRNT.js.map} +0 -0
  113. /package/dist/{pr-reviewer-helpers-VKQR2T3Y.js.map → pr-reviewer-helpers-I5UIREUR.js.map} +0 -0
  114. /package/dist/{registry-command-ALLKEWVO.js.map → registry-command-BYRGRQ3I.js.map} +0 -0
  115. /package/dist/{repo-security-plan-SJYA5PJC.js.map → repo-security-plan-NP6AT3NR.js.map} +0 -0
  116. /package/dist/{research-helpers-synthesize-ERZD3P4M.js.map → research-helpers-synthesize-2R6TO2SP.js.map} +0 -0
  117. /package/dist/{routing-memory-4WAKAU2L.js.map → routing-memory-IZH3XQQH.js.map} +0 -0
  118. /package/dist/{session-memory-XR5FJQSM.js.map → session-memory-OWEWA5BX.js.map} +0 -0
  119. /package/dist/{setup-config-26GAKOC3.js.map → setup-config-O7LHHD42.js.map} +0 -0
  120. /package/dist/{setup-custom-api-TKMWDJJW.js.map → setup-custom-api-OZ3QCQTJ.js.map} +0 -0
  121. /package/dist/{setup-data-dir-BKIKRQCE.js.map → setup-data-dir-XPXP3KIZ.js.map} +0 -0
  122. /package/dist/{tool-memory-QCZKITSG.js.map → tool-memory-LYKMCW7U.js.map} +0 -0
  123. /package/dist/{unified-registry-63G7RTA6.js.map → unified-registry-ZSPVJ4BO.js.map} +0 -0
  124. /package/dist/{weather-report-JVVJXNQY.js.map → weather-report-4OFVK5Q5.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-VZHZFAYL.js";
3
+ } from "./chunk-QRG7UR2F.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-HFOQKCD2.js";
@@ -17,14 +17,14 @@ import {
17
17
  FINDING_SEVERITY_LEVELS,
18
18
  SARIF_LEVEL_MAP,
19
19
  SEVERITY_ORDER
20
- } from "./chunk-CQ77TF4Y.js";
20
+ } from "./chunk-BYUVLVN7.js";
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-CMXVOO4L.js";
24
+ } from "./chunk-N5W3GATS.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-KASC5XK7.js";
27
+ } from "./chunk-PSXX2GBZ.js";
28
28
  import {
29
29
  JobStatusSchema,
30
30
  abortJob,
@@ -46,24 +46,24 @@ import {
46
46
  simulationDeniedResult,
47
47
  toJobSummary,
48
48
  writeJobCancelled
49
- } from "./chunk-G2USF7DN.js";
49
+ } from "./chunk-W2DYH4WL.js";
50
50
  import {
51
51
  allOf
52
52
  } from "./chunk-OQB3XC5O.js";
53
53
  import {
54
54
  normalizeTopicToCanonical,
55
55
  synthesizeResearch
56
- } from "./chunk-S3EAMH4I.js";
56
+ } from "./chunk-H7CV35LZ.js";
57
57
  import {
58
58
  IssueTriage
59
- } from "./chunk-MDVHI3PP.js";
59
+ } from "./chunk-6U3LS57H.js";
60
60
  import {
61
61
  resolveEnvMode,
62
62
  sanitizeInput
63
- } from "./chunk-HWBUN7WP.js";
63
+ } from "./chunk-GMJQ6QMZ.js";
64
64
  import {
65
65
  withPrerequisite
66
- } from "./chunk-PT3QWCKF.js";
66
+ } from "./chunk-MM7BINTV.js";
67
67
  import {
68
68
  NOOP_NOTIFIER,
69
69
  RateLimiter,
@@ -87,18 +87,18 @@ import {
87
87
  withAuditTrail,
88
88
  withProgressHeartbeat,
89
89
  wrapToolWithTimeout
90
- } from "./chunk-JJC5YKBH.js";
90
+ } from "./chunk-D6ZTSN34.js";
91
91
  import {
92
92
  createAuditTrail,
93
93
  createGraphAuditBridge,
94
94
  emitPipelinePolicyEvent
95
- } from "./chunk-NF7GW4QQ.js";
95
+ } from "./chunk-X7MLVGJV.js";
96
96
  import {
97
97
  EventTopics,
98
98
  createEvent,
99
99
  getGlobalEventBus,
100
100
  getGlobalRegistry
101
- } from "./chunk-AQV5RKO7.js";
101
+ } from "./chunk-V533P6BT.js";
102
102
  import {
103
103
  IDENTIFIER_RE,
104
104
  LANG_VALUES,
@@ -131,29 +131,29 @@ import {
131
131
  parseRegistry,
132
132
  sourceExistsInRegistry,
133
133
  summarizeContextForPrompt
134
- } from "./chunk-3AAAEN6N.js";
134
+ } from "./chunk-IK6JPHMX.js";
135
135
  import {
136
136
  loadPapersRegistry,
137
137
  loadTechniquesRegistry,
138
138
  resolveInsideRoot
139
- } from "./chunk-7B5YTCHU.js";
139
+ } from "./chunk-P422WQJM.js";
140
140
  import {
141
141
  getTokenEnvVars,
142
142
  resolveToken
143
- } from "./chunk-AJM6RCCB.js";
143
+ } from "./chunk-XYWCZNFC.js";
144
144
  import {
145
145
  DEFAULT_RELEVANCE_CONFIG,
146
146
  MemoryImportance,
147
147
  calculateTextJaccardSimilarity,
148
148
  getToolMemory
149
- } from "./chunk-HVCYICUX.js";
149
+ } from "./chunk-EU7S5CDW.js";
150
150
  import {
151
151
  STOPWORDS,
152
152
  truncateWithInfo
153
153
  } from "./chunk-6T3EPABN.js";
154
154
  import {
155
155
  createSessionMemory
156
- } from "./chunk-6MVRXQ6V.js";
156
+ } from "./chunk-DGLAEH7Y.js";
157
157
  import {
158
158
  BUILT_IN_EXPERTS,
159
159
  BuiltInExpertTypeSchema,
@@ -171,25 +171,25 @@ import {
171
171
  getAvailableClis,
172
172
  sleep,
173
173
  withTimeout
174
- } from "./chunk-C67BIG35.js";
174
+ } from "./chunk-JM42KPWJ.js";
175
175
  import {
176
176
  BaseAdapter,
177
177
  createStream,
178
178
  requireApiKey,
179
179
  validateApiKeyPresence
180
- } from "./chunk-TV3L3GME.js";
180
+ } from "./chunk-CBORIR4Y.js";
181
181
  import {
182
182
  DEFAULTS
183
- } from "./chunk-M4BAGHYQ.js";
183
+ } from "./chunk-TMKBZG3W.js";
184
184
  import {
185
185
  getAvailabilityCache,
186
186
  getCliForModelId,
187
187
  resolveFallback
188
- } from "./chunk-PAZLJC46.js";
188
+ } from "./chunk-RMTTKP4L.js";
189
189
  import {
190
190
  generateHyphenId,
191
191
  generateUUID
192
- } from "./chunk-MNPD6TMW.js";
192
+ } from "./chunk-MTGMOLRO.js";
193
193
  import {
194
194
  AGENT_ROUTER_TIMEOUTS,
195
195
  API_TIMEOUTS,
@@ -293,7 +293,7 @@ import {
293
293
  selectStrategyByManifest,
294
294
  toExpertTaskAnalysisResult,
295
295
  withStep
296
- } from "./chunk-IDLQNS5U.js";
296
+ } from "./chunk-2SVIHHNJ.js";
297
297
  import {
298
298
  ensureLearningDir,
299
299
  getMetaOutcomesFile,
@@ -29544,7 +29544,7 @@ function execIdFields(executionId) {
29544
29544
  async function populateUnifiedContextOnState(state, options) {
29545
29545
  const taskCandidate = state["task"];
29546
29546
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
29547
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-QAZWTGAT.js");
29547
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-CKJ7EJME.js");
29548
29548
  const category = inferTaskCategory2(taskCandidate);
29549
29549
  const executionId = options?.executionId;
29550
29550
  const execFields = execIdFields(executionId);
@@ -42376,9 +42376,16 @@ function writeToSession(key, content, confidence) {
42376
42376
  async function writeToBelief(key, content, confidence) {
42377
42377
  const toolMemory = getToolMemory();
42378
42378
  const countBefore = toolMemory.getBeliefCount();
42379
- await toolMemory.recordBelief(key, "has_knowledge", content, confidence);
42380
- const countAfter = toolMemory.getBeliefCount();
42381
- const deduplicated = countAfter === countBefore;
42379
+ const outcome = await toolMemory.recordBelief(
42380
+ key,
42381
+ "has_knowledge",
42382
+ content,
42383
+ confidence
42384
+ );
42385
+ if (!outcome.persisted) {
42386
+ return { success: false, backend: "belief", key, error: outcome.reason };
42387
+ }
42388
+ const deduplicated = toolMemory.getBeliefCount() === countBefore;
42382
42389
  return { success: true, backend: "belief", key, ...deduplicated ? { deduplicated: true } : {} };
42383
42390
  }
42384
42391
  async function writeToAgentic(key, content, confidence, metadata) {
@@ -42391,10 +42398,13 @@ async function writeToAgentic(key, content, confidence, metadata) {
42391
42398
  error: "Agentic memory backend unavailable (requires SQLite)"
42392
42399
  };
42393
42400
  }
42394
- await toolMemory.recordKnowledge(key, content, {
42401
+ const outcome = await toolMemory.recordKnowledge(key, content, {
42395
42402
  importance: confidence,
42396
42403
  tags: metadata !== void 0 ? Object.keys(metadata) : []
42397
42404
  });
42405
+ if (!outcome.persisted) {
42406
+ return { success: false, backend: "agentic", key, error: outcome.reason };
42407
+ }
42398
42408
  return { success: true, backend: "agentic", key };
42399
42409
  }
42400
42410
  async function writeToAdaptive(key, content, confidence) {
@@ -42408,7 +42418,10 @@ async function writeToAdaptive(key, content, confidence) {
42408
42418
  };
42409
42419
  }
42410
42420
  const importance = confidence === "high" ? 0.9 : confidence === "medium" ? 0.7 : 0.5;
42411
- await toolMemory.storeAdaptive(key, content, importance);
42421
+ const outcome = await toolMemory.storeAdaptive(key, content, importance);
42422
+ if (!outcome.persisted) {
42423
+ return { success: false, backend: "adaptive", key, error: outcome.reason };
42424
+ }
42412
42425
  return { success: true, backend: "adaptive", key };
42413
42426
  }
42414
42427
  async function writeToTyped(key, content, confidence) {
@@ -42422,23 +42435,29 @@ async function writeToTyped(key, content, confidence) {
42422
42435
  };
42423
42436
  }
42424
42437
  const importance = confidence === "high" ? "high" : confidence === "medium" ? "medium" : "low";
42425
- await toolMemory.storeTyped(key, content, importance);
42438
+ const outcome = await toolMemory.storeTyped(key, content, importance);
42439
+ if (!outcome.persisted) {
42440
+ return { success: false, backend: "typed", key, error: outcome.reason };
42441
+ }
42426
42442
  return { success: true, backend: "typed", key };
42427
42443
  }
42428
42444
  var recentWriteKeys = /* @__PURE__ */ new Map();
42429
42445
  var MAX_DEDUP_CACHE = 200;
42430
- function isDuplicateWrite(key, content) {
42431
- const cacheKey = `${key}::${content.slice(0, 100)}`;
42432
- if (recentWriteKeys.has(cacheKey)) return true;
42446
+ function dedupCacheKey(input) {
42447
+ return `${input.backend}::${input.key}::${input.content}`;
42448
+ }
42449
+ function isDuplicateWrite(input) {
42450
+ return recentWriteKeys.has(dedupCacheKey(input));
42451
+ }
42452
+ function rememberWrite(input) {
42433
42453
  if (recentWriteKeys.size >= MAX_DEDUP_CACHE) {
42434
42454
  const firstKey = recentWriteKeys.keys().next().value;
42435
42455
  if (firstKey !== void 0) recentWriteKeys.delete(firstKey);
42436
42456
  }
42437
- recentWriteKeys.set(cacheKey, (/* @__PURE__ */ new Date()).toISOString());
42438
- return false;
42457
+ recentWriteKeys.set(dedupCacheKey(input), (/* @__PURE__ */ new Date()).toISOString());
42439
42458
  }
42440
42459
  async function executeMemoryWrite(input, logger59) {
42441
- if (isDuplicateWrite(input.key, input.content)) {
42460
+ if (isDuplicateWrite(input)) {
42442
42461
  logger59.debug("Skipping duplicate memory write", { key: input.key, backend: input.backend });
42443
42462
  return { success: true, backend: input.backend, key: input.key, deduplicated: true };
42444
42463
  }
@@ -42447,6 +42466,11 @@ async function executeMemoryWrite(input, logger59) {
42447
42466
  key: input.key,
42448
42467
  contentLength: input.content.length
42449
42468
  });
42469
+ const response = await dispatchWrite(input);
42470
+ if (response.success) rememberWrite(input);
42471
+ return response;
42472
+ }
42473
+ async function dispatchWrite(input) {
42450
42474
  switch (input.backend) {
42451
42475
  case "session":
42452
42476
  return writeToSession(input.key, input.content, input.confidence);
@@ -45248,7 +45272,7 @@ async function tryIssueTriage(task) {
45248
45272
  try {
45249
45273
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
45250
45274
  if (issueMatch === null) return null;
45251
- const { createIssueTriage } = await import("./issue-triage-CLHI2MHK.js");
45275
+ const { createIssueTriage } = await import("./issue-triage-NH25YRNT.js");
45252
45276
  const triage = createIssueTriage();
45253
45277
  const owner = issueMatch[1] ?? "";
45254
45278
  const num = issueMatch[2] ?? "";
@@ -45276,7 +45300,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
45276
45300
  ]);
45277
45301
  async function classifyWithLLM(task) {
45278
45302
  try {
45279
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-6D43UDLS.js");
45303
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-5MK4DOB7.js");
45280
45304
  const prompt = [
45281
45305
  "Classify this task into exactly one pipeline template.",
45282
45306
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -46655,7 +46679,8 @@ async function runTriagePipeline(sarifResult, targetDir, config, start) {
46655
46679
  });
46656
46680
  lastTriageVerdicts = triageResult.triaged;
46657
46681
  recordTriageLifecycle(triageResult.triaged, lifecycleEntries);
46658
- const osvVulns = await runOsvCheck(targetDir, config.enableOsv ?? true);
46682
+ const osv = await runOsvCheck(targetDir, config.enableOsv ?? true);
46683
+ const osvVulns = osv.vulnerabilities;
46659
46684
  lastOsvVulnerabilities = osvVulns;
46660
46685
  const confirmed = getConfirmedBlockingFindings(sarifResult.findings, triageResult.triaged);
46661
46686
  const lifecycle = summarizeLifecycle(lifecycleEntries);
@@ -46663,13 +46688,15 @@ async function runTriagePipeline(sarifResult, targetDir, config, start) {
46663
46688
  sarifResult.totalFindings,
46664
46689
  confirmed.length,
46665
46690
  lifecycle.falsePositiveCount,
46666
- osvVulns.length
46691
+ osvVulns.length,
46692
+ osv
46667
46693
  );
46668
46694
  logger46.info("Security gate complete", {
46669
46695
  total: sarifResult.totalFindings,
46670
46696
  confirmed: confirmed.length,
46671
46697
  falsePositives: lifecycle.falsePositiveCount,
46672
- osvVulns: osvVulns.length
46698
+ osvVulns: osvVulns.length,
46699
+ osvFailedLookups: osv.failedLookups
46673
46700
  });
46674
46701
  const failed = confirmed.length > 0 || osvVulns.some((v) => v.severity === "CRITICAL");
46675
46702
  return {
@@ -46684,24 +46711,39 @@ function recordTriageLifecycle(verdicts, entries) {
46684
46711
  recordTriaged(triaged.finding, triaged.verdict, (entry) => entries.push(entry));
46685
46712
  }
46686
46713
  }
46714
+ var OSV_EMPTY = {
46715
+ vulnerabilities: [],
46716
+ failedLookups: 0,
46717
+ queried: 0,
46718
+ declared: 0
46719
+ };
46720
+ var OSV_DEPENDENCY_CAP = 20;
46687
46721
  async function runOsvCheck(targetDir, enabled) {
46688
- if (!enabled) return [];
46722
+ if (!enabled) return OSV_EMPTY;
46689
46723
  try {
46690
46724
  const fs13 = await import("fs");
46691
46725
  const path12 = await import("path");
46692
46726
  const pkgPath = path12.join(targetDir, "package.json");
46693
- if (!fs13.existsSync(pkgPath)) return [];
46727
+ if (!fs13.existsSync(pkgPath)) return OSV_EMPTY;
46694
46728
  const pkg = JSON.parse(fs13.readFileSync(pkgPath, "utf-8"));
46695
- const deps = Object.entries(pkg.dependencies ?? {}).slice(0, 20).map(([name, version]) => ({
46729
+ const declared = Object.keys(pkg.dependencies ?? {}).length;
46730
+ const deps = Object.entries(pkg.dependencies ?? {}).slice(0, OSV_DEPENDENCY_CAP).map(([name, version]) => ({
46696
46731
  name,
46697
46732
  version: version.replace(/^[\^~>=<]+/, "")
46698
46733
  }));
46699
- if (deps.length === 0) return [];
46734
+ if (deps.length === 0) return OSV_EMPTY;
46700
46735
  const results = await queryOsvBatch(deps);
46701
- return results.flatMap((r) => [...r.vulnerabilities]);
46736
+ return {
46737
+ vulnerabilities: results.flatMap((r) => [...r.vulnerabilities]),
46738
+ // The half that used to be dropped: a 503 or a timeout yields an empty
46739
+ // `vulnerabilities` array with an `error` set, which read as "clean".
46740
+ failedLookups: results.filter((r) => r.error !== null).length,
46741
+ queried: deps.length,
46742
+ declared
46743
+ };
46702
46744
  } catch (error) {
46703
46745
  logger46.debug("OSV check skipped", { error: String(error) });
46704
- return [];
46746
+ return OSV_EMPTY;
46705
46747
  }
46706
46748
  }
46707
46749
  function getConfirmedBlockingFindings(findings, verdicts) {
@@ -46713,12 +46755,23 @@ function getConfirmedBlockingFindings(findings, verdicts) {
46713
46755
  return verdict === void 0 || verdict.confirmed;
46714
46756
  });
46715
46757
  }
46716
- function buildScanSummary(total, confirmed, falsePositives, osvCount) {
46758
+ function buildScanSummary(total, confirmed, falsePositives, osvCount, osv) {
46717
46759
  const parts = [`${String(total)} SAST findings`];
46718
46760
  if (falsePositives > 0) parts.push(`${String(falsePositives)} filtered as false positives`);
46719
46761
  if (confirmed > 0) parts.push(`${String(confirmed)} confirmed blocking`);
46720
46762
  if (osvCount > 0) parts.push(`${String(osvCount)} OSV dependency vulnerabilities`);
46721
- if (confirmed === 0 && osvCount === 0) parts.push("none blocking");
46763
+ if (osv !== void 0 && osv.failedLookups > 0) {
46764
+ parts.push(
46765
+ `OSV not checked for ${String(osv.failedLookups)} of ${String(osv.queried)} dependencies (lookup failed)`
46766
+ );
46767
+ } else if (confirmed === 0 && osvCount === 0) {
46768
+ parts.push("none blocking");
46769
+ }
46770
+ if (osv !== void 0 && osv.declared > osv.queried) {
46771
+ parts.push(
46772
+ `OSV covered ${String(osv.queried)} of ${String(osv.declared)} declared dependencies`
46773
+ );
46774
+ }
46722
46775
  return parts.join(", ");
46723
46776
  }
46724
46777
 
@@ -47028,7 +47081,7 @@ var memoryInitPromise = null;
47028
47081
  async function initPipelineMemory() {
47029
47082
  if (cachedMemory !== null) return cachedMemory;
47030
47083
  try {
47031
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-XR5FJQSM.js");
47084
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-OWEWA5BX.js");
47032
47085
  const { getLearningDir } = await import("./learning-persistence-SR5F4DSY.js");
47033
47086
  const mem = createSessionMemory2(getLearningDir());
47034
47087
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -47090,7 +47143,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
47090
47143
  callRecord(routingMemoryCache);
47091
47144
  return;
47092
47145
  }
47093
- routingMemoryInitPromise ??= import("./routing-memory-4WAKAU2L.js").then(({ createRoutingMemory }) => {
47146
+ routingMemoryInitPromise ??= import("./routing-memory-IZH3XQQH.js").then(({ createRoutingMemory }) => {
47094
47147
  routingMemoryCache ??= createRoutingMemory();
47095
47148
  return routingMemoryCache;
47096
47149
  }).catch((error) => {
@@ -47124,7 +47177,7 @@ ${text}` : "";
47124
47177
  }
47125
47178
  async function getWeatherContext() {
47126
47179
  try {
47127
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-JVVJXNQY.js");
47180
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-4OFVK5Q5.js");
47128
47181
  const report = generateWeatherReport2({ includeAdaptive: true });
47129
47182
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
47130
47183
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -47142,7 +47195,7 @@ ${lines}
47142
47195
  }
47143
47196
  async function getMemoryContext(task) {
47144
47197
  try {
47145
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-XR5FJQSM.js");
47198
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-OWEWA5BX.js");
47146
47199
  const { getLearningDir } = await import("./learning-persistence-SR5F4DSY.js");
47147
47200
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
47148
47201
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -47261,7 +47314,7 @@ ${contextBlock}`;
47261
47314
  const strategy = config.votingStrategy ?? "higher_order";
47262
47315
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47263
47316
  try {
47264
- const { executeVoting } = await import("./consensus-vote-OUZGLMJ4.js");
47317
+ const { executeVoting } = await import("./consensus-vote-TMMGZROW.js");
47265
47318
  const votingResult = await executeVoting(
47266
47319
  {
47267
47320
  proposal: buildVoteProposal(plan, research),
@@ -47700,7 +47753,7 @@ async function searchCodebaseForTask(task) {
47700
47753
  }
47701
47754
  async function queryResearchRegistry(task) {
47702
47755
  try {
47703
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-ERZD3P4M.js");
47756
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-2R6TO2SP.js");
47704
47757
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
47705
47758
  if (topic === void 0) return null;
47706
47759
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -47771,7 +47824,7 @@ function createScanStageWrapper() {
47771
47824
  try {
47772
47825
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
47773
47826
  if (slug !== void 0) {
47774
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-SJYA5PJC.js");
47827
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-NP6AT3NR.js");
47775
47828
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
47776
47829
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
47777
47830
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -50106,7 +50159,9 @@ function permitsAction(declaredTier, actionClass) {
50106
50159
  function dispatchActionClass(_mode) {
50107
50160
  return "suggest";
50108
50161
  }
50109
- var AuthorityRefusalError = class extends Error {
50162
+ var PolicyRefusalError = class extends Error {
50163
+ };
50164
+ var AuthorityRefusalError = class extends PolicyRefusalError {
50110
50165
  code;
50111
50166
  strategy;
50112
50167
  /** The tier the strategy's manifest declared (undefined ⇒ none declared). */
@@ -50160,7 +50215,7 @@ function guardAuthority(strategy, actionClass) {
50160
50215
  throw decision.refusal;
50161
50216
  }
50162
50217
  }
50163
- var ExecuteEnvelopeRefusalError = class extends Error {
50218
+ var ExecuteEnvelopeRefusalError = class extends PolicyRefusalError {
50164
50219
  code = "envelope_undeclared";
50165
50220
  strategy;
50166
50221
  constructor(strategy) {
@@ -50186,7 +50241,7 @@ function guardExecuteEnvelope(strategy) {
50186
50241
 
50187
50242
  // src/mcp/tools/run-tool-dry-run.ts
50188
50243
  var DRY_RUN_CAPABLE = "dev-pipeline";
50189
- var DryRunUnsupportedError = class extends Error {
50244
+ var DryRunUnsupportedError = class extends PolicyRefusalError {
50190
50245
  constructor(strategy) {
50191
50246
  super(
50192
50247
  `dryRun is not supported by the '${strategy}' strategy \u2014 only '${DRY_RUN_CAPABLE}' stops after plan+vote. Refusing rather than running for real. Re-run without dryRun, or force the ${DRY_RUN_CAPABLE} strategy.`
@@ -50202,10 +50257,8 @@ function assertDryRunSupported(dryRun, strategy) {
50202
50257
  }
50203
50258
  }
50204
50259
  function classifyDispatchError(err2) {
50205
- const noExecutor = err2 instanceof MetaDispatchError && err2.code === "no_executor";
50206
- const refused = err2 instanceof AuthorityRefusalError;
50207
- const dryRunUnsupported = err2 instanceof DryRunUnsupportedError;
50208
- return noExecutor || refused || dryRunUnsupported ? "business" : "internal";
50260
+ if (err2 instanceof PolicyRefusalError) return "business";
50261
+ return err2 instanceof MetaDispatchError && err2.code === "no_executor" ? "business" : "internal";
50209
50262
  }
50210
50263
 
50211
50264
  // src/orchestration/meta-orchestrator.ts
@@ -50896,7 +50949,7 @@ var GitHubTaskTracker = class {
50896
50949
  cachedProvider = null;
50897
50950
  async getProvider() {
50898
50951
  if (this.cachedProvider !== null) return this.cachedProvider;
50899
- const { createScmProvider } = await import("./factory-GUBAT3HH.js");
50952
+ const { createScmProvider } = await import("./factory-OO7MN24L.js");
50900
50953
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
50901
50954
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
50902
50955
  this.cachedProvider = result.value;
@@ -51159,6 +51212,12 @@ function buildStructuredOutput(result, simulated) {
51159
51212
  // here, so they never reached the MCP surface.
51160
51213
  ...result.securityRan !== void 0 ? { securityRan: result.securityRan } : {},
51161
51214
  ...result.planStatus !== void 0 ? { planStatus: result.planStatus } : {},
51215
+ // #4993 added `dryRun` to DevPipelineResult for exactly the reason above —
51216
+ // it says `completed: false` was the request, not a fault — and then did
51217
+ // not list it here either. Same omission, same function, under the comment
51218
+ // describing it. A live `run_dev_pipeline({ dryRun: true })` came back with
51219
+ // no way to tell a successful dry run from a failed pipeline.
51220
+ ...result.dryRun !== void 0 ? { dryRun: result.dryRun } : {},
51162
51221
  voteIterations: result.voteIterations,
51163
51222
  qaIterations: result.qaIterations,
51164
51223
  plan: result.plan,
@@ -51803,7 +51862,7 @@ async function probeSource(source, includeModelIds) {
51803
51862
  }
51804
51863
  }
51805
51864
  async function defaultSources(includeOpenRouter) {
51806
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-2MLMLJDK.js");
51865
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-6FNJM6P3.js");
51807
51866
  const adapters = createAllAdapters2();
51808
51867
  return buildDefaultModelSources(adapters, { includeOpenRouter });
51809
51868
  }
@@ -55174,10 +55233,6 @@ function createFeedbackSubscriber(bus, store) {
55174
55233
  });
55175
55234
  }
55176
55235
  var cachedFeedbackUnsubscribe = null;
55177
- function startFeedbackSubscriber(bus, store) {
55178
- if (cachedFeedbackUnsubscribe !== null) return;
55179
- cachedFeedbackUnsubscribe = createFeedbackSubscriber(bus, store);
55180
- }
55181
55236
  function shutdownFeedbackSubscriber() {
55182
55237
  if (cachedFeedbackUnsubscribe !== null) {
55183
55238
  cachedFeedbackUnsubscribe();
@@ -55190,10 +55245,17 @@ function handleEvent2(event, store) {
55190
55245
  }
55191
55246
  }
55192
55247
  function recordStageFailed(event, store) {
55248
+ const cli = event.model === void 0 ? void 0 : lookupInTreeCapability(event.model)?.cliName;
55249
+ if (cli === void 0) {
55250
+ logger57.debug("Skipping stage-failure outcome \u2014 no attributable CLI", {
55251
+ stageId: event.stageId,
55252
+ model: event.model ?? "absent"
55253
+ });
55254
+ return;
55255
+ }
55193
55256
  const outcome = {
55194
55257
  id: `fb-fail-${event.executionId}-${String(event.timestamp)}`,
55195
- cli: DEFAULT_CLI,
55196
- // Stage failures don't carry CLI info; default to canonical fallback
55258
+ cli,
55197
55259
  category: "code_generation",
55198
55260
  // Real model id when the emitter attributed one (#4194); 'unknown' is
55199
55261
  // reserved for stages that genuinely have no single model — never a guess.
@@ -55861,8 +55923,7 @@ export {
55861
55923
  initializeSandbox,
55862
55924
  getSandboxMode,
55863
55925
  createFeedbackSubscriber,
55864
- startFeedbackSubscriber,
55865
55926
  shutdownFeedbackSubscriber,
55866
55927
  createEventBusBridge
55867
55928
  };
55868
- //# sourceMappingURL=chunk-UTJRTD7H.js.map
55929
+ //# sourceMappingURL=chunk-LX5HF6N5.js.map