nexus-agents 2.134.0 → 2.136.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 (153) hide show
  1. package/dist/{child-mcp-config-TWHH63UK.js → child-mcp-config-TM6OCARU.js} +4 -3
  2. package/dist/{child-mcp-config-TWHH63UK.js.map → child-mcp-config-TM6OCARU.js.map} +1 -1
  3. package/dist/{chunk-E64SZTEP.js → chunk-257QMFTM.js} +3 -3
  4. package/dist/{chunk-PQHVC4BD.js → chunk-2XRPKJKX.js} +23 -12
  5. package/dist/chunk-2XRPKJKX.js.map +1 -0
  6. package/dist/{chunk-FUJ3XR7T.js → chunk-3AAJWZCR.js} +4 -4
  7. package/dist/{chunk-Z6DXZ6AS.js → chunk-3JSDOBOA.js} +2 -2
  8. package/dist/{chunk-FPMQ2JAK.js → chunk-3QH2KWLH.js} +2 -2
  9. package/dist/{chunk-7TQZR5VU.js → chunk-3WBEEYCS.js} +116 -22
  10. package/dist/chunk-3WBEEYCS.js.map +1 -0
  11. package/dist/{chunk-UDB5NHJI.js → chunk-4GVPON4W.js} +3 -3
  12. package/dist/{chunk-QZUT22LP.js → chunk-5546JU53.js} +8 -8
  13. package/dist/chunk-5SXGPX34.js +44 -0
  14. package/dist/chunk-5SXGPX34.js.map +1 -0
  15. package/dist/{chunk-7GSYICTL.js → chunk-66TXNH4S.js} +14 -12
  16. package/dist/{chunk-7GSYICTL.js.map → chunk-66TXNH4S.js.map} +1 -1
  17. package/dist/{chunk-76R5ES6Z.js → chunk-6JOXXQK2.js} +191 -132
  18. package/dist/chunk-6JOXXQK2.js.map +1 -0
  19. package/dist/{chunk-ZMDOGN33.js → chunk-7E5UXA4U.js} +2 -2
  20. package/dist/{chunk-F74ZGHAP.js → chunk-7G63H7ZT.js} +2 -2
  21. package/dist/{chunk-FVSZLVMR.js → chunk-CQDGPGTL.js} +3 -3
  22. package/dist/{chunk-33MFMXBQ.js → chunk-ESP6U3LW.js} +13 -81
  23. package/dist/chunk-ESP6U3LW.js.map +1 -0
  24. package/dist/{chunk-MY52DFXC.js → chunk-FHFEC2XM.js} +2 -2
  25. package/dist/{chunk-ORQAFTAZ.js → chunk-FIQSOSQU.js} +2 -2
  26. package/dist/{chunk-EHLJLIHS.js → chunk-FSUZIIOJ.js} +2 -2
  27. package/dist/{chunk-3EYXPV5F.js → chunk-GWOXPCIF.js} +13 -13
  28. package/dist/{chunk-WYJJUF6N.js → chunk-HMZT2SJK.js} +4 -4
  29. package/dist/{chunk-OCKZ6F5O.js → chunk-JK4L2TQ6.js} +3 -3
  30. package/dist/{chunk-6UCWR3DS.js → chunk-JVZ7FGWR.js} +3 -3
  31. package/dist/{chunk-PFBV5FCT.js → chunk-KOVTOPEQ.js} +2 -2
  32. package/dist/{chunk-GZ4NF4ZW.js → chunk-L4QFWOOQ.js} +63 -92
  33. package/dist/chunk-L4QFWOOQ.js.map +1 -0
  34. package/dist/{chunk-6LMZ7HFU.js → chunk-LCSGGLZZ.js} +2 -2
  35. package/dist/{chunk-IWQH6TP7.js → chunk-MTE7THMR.js} +6 -6
  36. package/dist/{chunk-DLUFDKPA.js → chunk-N67LHY47.js} +89 -32
  37. package/dist/chunk-N67LHY47.js.map +1 -0
  38. package/dist/{chunk-DBDWMHUL.js → chunk-OCJEYHUQ.js} +18 -10
  39. package/dist/chunk-OCJEYHUQ.js.map +1 -0
  40. package/dist/chunk-UGAKYSDO.js +92 -0
  41. package/dist/chunk-UGAKYSDO.js.map +1 -0
  42. package/dist/{chunk-VI7LELES.js → chunk-UH3F4RZB.js} +7 -7
  43. package/dist/{chunk-COJOUIO2.js → chunk-VN3CKPEF.js} +3 -3
  44. package/dist/{chunk-FSFF7EFR.js → chunk-VVBKPRLI.js} +2 -2
  45. package/dist/{chunk-OU2NQVKD.js → chunk-VY4FZNZA.js} +2 -2
  46. package/dist/{chunk-BTYYZ6VU.js → chunk-WOE5J5M6.js} +4 -4
  47. package/dist/{chunk-B26FGLIJ.js → chunk-ZHCEOIEQ.js} +2 -2
  48. package/dist/{chunk-WFKVUZ3O.js → chunk-ZII5MDUO.js} +2 -2
  49. package/dist/{chunk-CLRSNWRQ.js → chunk-ZLENFXL5.js} +4 -4
  50. package/dist/cli-circuit-breaker-HFFMCA43.js +14 -0
  51. package/dist/cli.d.ts +1 -1
  52. package/dist/cli.js +68 -66
  53. package/dist/cli.js.map +1 -1
  54. package/dist/{composite-router-E6FXXMMR.js → composite-router-PS42433A.js} +4 -3
  55. package/dist/consensus-vote-K2SHY4TC.js +39 -0
  56. package/dist/{consensus-vote-types-CYBHW8vY.d.ts → consensus-vote-types-Dx4pf3YW.d.ts} +16 -0
  57. package/dist/{context-retriever-I4NEOUEV.js → context-retriever-NIFXFYPQ.js} +12 -10
  58. package/dist/{dist-C4457XNQ.js → dist-KGTVHDVC.js} +4 -2
  59. package/dist/doctor-deep-VQQNT7VN.js +13 -0
  60. package/dist/{expert-bridge-GMB5IHHF.js → expert-bridge-NY6FAFQH.js} +6 -5
  61. package/dist/factory-6A26HIWS.js +15 -0
  62. package/dist/factory-GGSACEWN.js +22 -0
  63. package/dist/{improvement-review-77BKIQGN.js → improvement-review-JDSRWFHM.js} +8 -5
  64. package/dist/index.d.ts +27 -20
  65. package/dist/index.js +64 -62
  66. package/dist/index.js.map +1 -1
  67. package/dist/{init-opencode-4H2VPN23.js → init-opencode-C7U6ZQK3.js} +8 -7
  68. package/dist/{init-opencode-4H2VPN23.js.map → init-opencode-C7U6ZQK3.js.map} +1 -1
  69. package/dist/issue-triage-7RN74LBU.js +17 -0
  70. package/dist/{learning-persistence-2KO4CXNL.js → learning-persistence-EHTHKWR5.js} +3 -2
  71. package/dist/{pr-reviewer-helpers-F3SHCHNV.js → pr-reviewer-helpers-D47TVXFX.js} +6 -5
  72. package/dist/{registry-command-VFCSMHME.js → registry-command-PVC47NSQ.js} +4 -3
  73. package/dist/{registry-command-VFCSMHME.js.map → registry-command-PVC47NSQ.js.map} +1 -1
  74. package/dist/{repo-security-plan-U2ZIFW53.js → repo-security-plan-76IXMJNC.js} +5 -4
  75. package/dist/research-helpers-synthesize-WH4IC36H.js +15 -0
  76. package/dist/{routing-memory-VVLJL3MG.js → routing-memory-RAYIYIUP.js} +4 -3
  77. package/dist/{session-memory-GMQYZLJE.js → session-memory-WZCS7WDH.js} +5 -4
  78. package/dist/{setup-command-IMAX6EAO.js → setup-command-O62DVQ2U.js} +13 -12
  79. package/dist/setup-config-KEBEUMC3.js +11 -0
  80. package/dist/{setup-custom-api-NJGCRIRO.js → setup-custom-api-2PQP6UOT.js} +5 -4
  81. package/dist/{setup-custom-api-NJGCRIRO.js.map → setup-custom-api-2PQP6UOT.js.map} +1 -1
  82. package/dist/tool-memory-RAQWOUXV.js +22 -0
  83. package/dist/tool-memory-registry-adapters-Y4EGADHN.js +12 -0
  84. package/dist/unified-registry-L5PGLSEI.js +25 -0
  85. package/dist/{weather-report-OU65NJS3.js → weather-report-TEBEALS7.js} +4 -3
  86. package/dist/weather-report-TEBEALS7.js.map +1 -0
  87. package/package.json +2 -2
  88. package/dist/chunk-33MFMXBQ.js.map +0 -1
  89. package/dist/chunk-76R5ES6Z.js.map +0 -1
  90. package/dist/chunk-7TQZR5VU.js.map +0 -1
  91. package/dist/chunk-DBDWMHUL.js.map +0 -1
  92. package/dist/chunk-DLUFDKPA.js.map +0 -1
  93. package/dist/chunk-GZ4NF4ZW.js.map +0 -1
  94. package/dist/chunk-PQHVC4BD.js.map +0 -1
  95. package/dist/cli-circuit-breaker-VXBDCAD7.js +0 -13
  96. package/dist/consensus-vote-R6X5IL57.js +0 -37
  97. package/dist/doctor-deep-CZXN4YD6.js +0 -12
  98. package/dist/factory-WR62MEIJ.js +0 -14
  99. package/dist/factory-ZBQGA373.js +0 -21
  100. package/dist/issue-triage-NJB6SL4S.js +0 -16
  101. package/dist/research-helpers-synthesize-5TLNHT3I.js +0 -14
  102. package/dist/setup-config-2ZSJ3HNE.js +0 -10
  103. package/dist/tool-memory-TSYJXGOV.js +0 -20
  104. package/dist/unified-registry-IMAL3SY6.js +0 -24
  105. /package/dist/{chunk-E64SZTEP.js.map → chunk-257QMFTM.js.map} +0 -0
  106. /package/dist/{chunk-FUJ3XR7T.js.map → chunk-3AAJWZCR.js.map} +0 -0
  107. /package/dist/{chunk-Z6DXZ6AS.js.map → chunk-3JSDOBOA.js.map} +0 -0
  108. /package/dist/{chunk-FPMQ2JAK.js.map → chunk-3QH2KWLH.js.map} +0 -0
  109. /package/dist/{chunk-UDB5NHJI.js.map → chunk-4GVPON4W.js.map} +0 -0
  110. /package/dist/{chunk-QZUT22LP.js.map → chunk-5546JU53.js.map} +0 -0
  111. /package/dist/{chunk-ZMDOGN33.js.map → chunk-7E5UXA4U.js.map} +0 -0
  112. /package/dist/{chunk-F74ZGHAP.js.map → chunk-7G63H7ZT.js.map} +0 -0
  113. /package/dist/{chunk-FVSZLVMR.js.map → chunk-CQDGPGTL.js.map} +0 -0
  114. /package/dist/{chunk-MY52DFXC.js.map → chunk-FHFEC2XM.js.map} +0 -0
  115. /package/dist/{chunk-ORQAFTAZ.js.map → chunk-FIQSOSQU.js.map} +0 -0
  116. /package/dist/{chunk-EHLJLIHS.js.map → chunk-FSUZIIOJ.js.map} +0 -0
  117. /package/dist/{chunk-3EYXPV5F.js.map → chunk-GWOXPCIF.js.map} +0 -0
  118. /package/dist/{chunk-WYJJUF6N.js.map → chunk-HMZT2SJK.js.map} +0 -0
  119. /package/dist/{chunk-OCKZ6F5O.js.map → chunk-JK4L2TQ6.js.map} +0 -0
  120. /package/dist/{chunk-6UCWR3DS.js.map → chunk-JVZ7FGWR.js.map} +0 -0
  121. /package/dist/{chunk-PFBV5FCT.js.map → chunk-KOVTOPEQ.js.map} +0 -0
  122. /package/dist/{chunk-6LMZ7HFU.js.map → chunk-LCSGGLZZ.js.map} +0 -0
  123. /package/dist/{chunk-IWQH6TP7.js.map → chunk-MTE7THMR.js.map} +0 -0
  124. /package/dist/{chunk-VI7LELES.js.map → chunk-UH3F4RZB.js.map} +0 -0
  125. /package/dist/{chunk-COJOUIO2.js.map → chunk-VN3CKPEF.js.map} +0 -0
  126. /package/dist/{chunk-FSFF7EFR.js.map → chunk-VVBKPRLI.js.map} +0 -0
  127. /package/dist/{chunk-OU2NQVKD.js.map → chunk-VY4FZNZA.js.map} +0 -0
  128. /package/dist/{chunk-BTYYZ6VU.js.map → chunk-WOE5J5M6.js.map} +0 -0
  129. /package/dist/{chunk-B26FGLIJ.js.map → chunk-ZHCEOIEQ.js.map} +0 -0
  130. /package/dist/{chunk-WFKVUZ3O.js.map → chunk-ZII5MDUO.js.map} +0 -0
  131. /package/dist/{chunk-CLRSNWRQ.js.map → chunk-ZLENFXL5.js.map} +0 -0
  132. /package/dist/{cli-circuit-breaker-VXBDCAD7.js.map → cli-circuit-breaker-HFFMCA43.js.map} +0 -0
  133. /package/dist/{composite-router-E6FXXMMR.js.map → composite-router-PS42433A.js.map} +0 -0
  134. /package/dist/{consensus-vote-R6X5IL57.js.map → consensus-vote-K2SHY4TC.js.map} +0 -0
  135. /package/dist/{context-retriever-I4NEOUEV.js.map → context-retriever-NIFXFYPQ.js.map} +0 -0
  136. /package/dist/{dist-C4457XNQ.js.map → dist-KGTVHDVC.js.map} +0 -0
  137. /package/dist/{doctor-deep-CZXN4YD6.js.map → doctor-deep-VQQNT7VN.js.map} +0 -0
  138. /package/dist/{expert-bridge-GMB5IHHF.js.map → expert-bridge-NY6FAFQH.js.map} +0 -0
  139. /package/dist/{factory-WR62MEIJ.js.map → factory-6A26HIWS.js.map} +0 -0
  140. /package/dist/{factory-ZBQGA373.js.map → factory-GGSACEWN.js.map} +0 -0
  141. /package/dist/{improvement-review-77BKIQGN.js.map → improvement-review-JDSRWFHM.js.map} +0 -0
  142. /package/dist/{issue-triage-NJB6SL4S.js.map → issue-triage-7RN74LBU.js.map} +0 -0
  143. /package/dist/{learning-persistence-2KO4CXNL.js.map → learning-persistence-EHTHKWR5.js.map} +0 -0
  144. /package/dist/{pr-reviewer-helpers-F3SHCHNV.js.map → pr-reviewer-helpers-D47TVXFX.js.map} +0 -0
  145. /package/dist/{repo-security-plan-U2ZIFW53.js.map → repo-security-plan-76IXMJNC.js.map} +0 -0
  146. /package/dist/{research-helpers-synthesize-5TLNHT3I.js.map → research-helpers-synthesize-WH4IC36H.js.map} +0 -0
  147. /package/dist/{routing-memory-VVLJL3MG.js.map → routing-memory-RAYIYIUP.js.map} +0 -0
  148. /package/dist/{session-memory-GMQYZLJE.js.map → session-memory-WZCS7WDH.js.map} +0 -0
  149. /package/dist/{setup-command-IMAX6EAO.js.map → setup-command-O62DVQ2U.js.map} +0 -0
  150. /package/dist/{setup-config-2ZSJ3HNE.js.map → setup-config-KEBEUMC3.js.map} +0 -0
  151. /package/dist/{tool-memory-TSYJXGOV.js.map → tool-memory-RAQWOUXV.js.map} +0 -0
  152. /package/dist/{unified-registry-IMAL3SY6.js.map → tool-memory-registry-adapters-Y4EGADHN.js.map} +0 -0
  153. /package/dist/{weather-report-OU65NJS3.js.map → unified-registry-L5PGLSEI.js.map} +0 -0
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-Z6DXZ6AS.js";
3
+ } from "./chunk-3JSDOBOA.js";
4
+ import {
5
+ analyzeGitHubRepo
6
+ } from "./chunk-HFOQKCD2.js";
4
7
  import {
5
8
  CodebaseIndex,
6
9
  extractSymbolIndex,
@@ -11,9 +14,14 @@ import {
11
14
  SARIF_LEVEL_MAP,
12
15
  SEVERITY_ORDER
13
16
  } from "./chunk-WAYGXUSM.js";
17
+ import {
18
+ DEFAULT_TASK_TTL_MS,
19
+ DEFAULT_TOOL_RATE_LIMITS,
20
+ clampTaskTtl
21
+ } from "./chunk-66TXNH4S.js";
14
22
  import {
15
23
  executeExpert
16
- } from "./chunk-VI7LELES.js";
24
+ } from "./chunk-UH3F4RZB.js";
17
25
  import {
18
26
  JobStatusSchema,
19
27
  collectRealVotes,
@@ -32,24 +40,24 @@ import {
32
40
  toJobSummary,
33
41
  warnIfSimulatedOutsideTests,
34
42
  writeJobCancelled
35
- } from "./chunk-DLUFDKPA.js";
43
+ } from "./chunk-N67LHY47.js";
36
44
  import {
37
45
  normalizeTopicToCanonical,
38
46
  synthesizeResearch
39
- } from "./chunk-UDB5NHJI.js";
47
+ } from "./chunk-4GVPON4W.js";
40
48
  import {
41
49
  IssueTriage,
42
50
  createAuditTrail,
43
51
  createGraphAuditBridge,
44
52
  emitPipelinePolicyEvent
45
- } from "./chunk-FUJ3XR7T.js";
53
+ } from "./chunk-3AAJWZCR.js";
46
54
  import {
47
55
  resolveEnvMode,
48
56
  sanitizeInput
49
- } from "./chunk-EHLJLIHS.js";
57
+ } from "./chunk-FSUZIIOJ.js";
50
58
  import {
51
59
  withPrerequisite
52
- } from "./chunk-7TQZR5VU.js";
60
+ } from "./chunk-3WBEEYCS.js";
53
61
  import {
54
62
  NOOP_NOTIFIER,
55
63
  RateLimiter,
@@ -71,10 +79,7 @@ import {
71
79
  withAccessPolicy,
72
80
  withProgressHeartbeat,
73
81
  wrapToolWithTimeout
74
- } from "./chunk-6UCWR3DS.js";
75
- import {
76
- analyzeGitHubRepo
77
- } from "./chunk-HFOQKCD2.js";
82
+ } from "./chunk-JVZ7FGWR.js";
78
83
  import {
79
84
  addResearchPaper,
80
85
  addSourceToRegistry,
@@ -102,36 +107,31 @@ import {
102
107
  parseRegistry,
103
108
  sourceExistsInRegistry,
104
109
  summarizeContextForPrompt
105
- } from "./chunk-QZUT22LP.js";
110
+ } from "./chunk-5546JU53.js";
106
111
  import {
107
112
  getTokenEnvVars,
108
113
  resolveToken
109
- } from "./chunk-MY52DFXC.js";
114
+ } from "./chunk-FHFEC2XM.js";
110
115
  import {
111
116
  loadPapersRegistry,
112
117
  loadTechniquesRegistry
113
- } from "./chunk-B26FGLIJ.js";
118
+ } from "./chunk-ZHCEOIEQ.js";
119
+ import {
120
+ resolveInsideRoot
121
+ } from "./chunk-NUBSJGQZ.js";
114
122
  import {
115
123
  DEFAULT_RELEVANCE_CONFIG,
116
124
  MemoryImportance,
117
125
  calculateTextJaccardSimilarity,
118
126
  getToolMemory
119
- } from "./chunk-33MFMXBQ.js";
120
- import {
121
- createSessionMemory
122
- } from "./chunk-FPMQ2JAK.js";
123
- import {
124
- DEFAULT_TASK_TTL_MS,
125
- DEFAULT_TOOL_RATE_LIMITS,
126
- clampTaskTtl
127
- } from "./chunk-7GSYICTL.js";
128
- import {
129
- resolveInsideRoot
130
- } from "./chunk-NUBSJGQZ.js";
127
+ } from "./chunk-ESP6U3LW.js";
131
128
  import {
132
129
  STOPWORDS,
133
130
  truncateWithInfo
134
131
  } from "./chunk-6T3EPABN.js";
132
+ import {
133
+ createSessionMemory
134
+ } from "./chunk-3QH2KWLH.js";
135
135
  import {
136
136
  BUILT_IN_EXPERTS,
137
137
  BuiltInExpertTypeSchema,
@@ -140,13 +140,13 @@ import {
140
140
  } from "./chunk-ZM4O442V.js";
141
141
  import {
142
142
  getMemoryRegistry
143
- } from "./chunk-PQHVC4BD.js";
143
+ } from "./chunk-2XRPKJKX.js";
144
144
  import {
145
145
  EventTopics,
146
146
  createEvent,
147
147
  getGlobalEventBus,
148
148
  getGlobalRegistry
149
- } from "./chunk-WYJJUF6N.js";
149
+ } from "./chunk-HMZT2SJK.js";
150
150
  import {
151
151
  CliDetectionCache,
152
152
  asRecord,
@@ -154,19 +154,19 @@ import {
154
154
  getAvailableClis,
155
155
  sleep,
156
156
  withTimeout
157
- } from "./chunk-3EYXPV5F.js";
157
+ } from "./chunk-GWOXPCIF.js";
158
158
  import {
159
159
  DEFAULTS
160
- } from "./chunk-ZMDOGN33.js";
160
+ } from "./chunk-7E5UXA4U.js";
161
161
  import {
162
162
  getAvailabilityCache,
163
163
  getCliForModelId,
164
164
  resolveFallback
165
- } from "./chunk-PFBV5FCT.js";
165
+ } from "./chunk-KOVTOPEQ.js";
166
166
  import {
167
167
  generateHyphenId,
168
168
  generateUUID
169
- } from "./chunk-ORQAFTAZ.js";
169
+ } from "./chunk-FIQSOSQU.js";
170
170
  import {
171
171
  AGENT_ROUTER_TIMEOUTS,
172
172
  API_TIMEOUTS,
@@ -258,14 +258,16 @@ import {
258
258
  selectStrategyByManifest,
259
259
  toExpertTaskAnalysisResult,
260
260
  withStep
261
- } from "./chunk-DBDWMHUL.js";
261
+ } from "./chunk-OCJEYHUQ.js";
262
262
  import {
263
263
  ensureLearningDir,
264
264
  getMetaOutcomesFile,
265
- isPersistenceEnabled,
265
+ isPersistenceEnabled
266
+ } from "./chunk-5SXGPX34.js";
267
+ import {
266
268
  nexusDataPath,
267
269
  nexusDataPathEnsure
268
- } from "./chunk-GZ4NF4ZW.js";
270
+ } from "./chunk-L4QFWOOQ.js";
269
271
 
270
272
  // src/agents/state-machine-types.ts
271
273
  var VALID_TRANSITIONS = /* @__PURE__ */ new Map([
@@ -2555,13 +2557,13 @@ function makeCancelError(taskId) {
2555
2557
  }
2556
2558
  function executeWithTimeout(params) {
2557
2559
  const { task, maxDurationMs, executeTask, transformError, signal } = params;
2558
- return new Promise((resolve18) => {
2560
+ return new Promise((resolve19) => {
2559
2561
  let settled = false;
2560
2562
  const settle = (result) => {
2561
2563
  if (settled) return;
2562
2564
  settled = true;
2563
2565
  clearTimeout(timeoutId);
2564
- resolve18(result);
2566
+ resolve19(result);
2565
2567
  };
2566
2568
  const timeoutId = setTimeout(() => {
2567
2569
  settle(
@@ -7971,13 +7973,13 @@ var WaveScheduler = class {
7971
7973
  }
7972
7974
  async withTimeout(promise, timeoutMs, taskId) {
7973
7975
  if (timeoutMs <= 0) return promise;
7974
- return new Promise((resolve18, reject) => {
7976
+ return new Promise((resolve19, reject) => {
7975
7977
  const timer = setTimeout(() => {
7976
7978
  reject(new Error(`Task ${taskId} timed out after ${String(timeoutMs)}ms`));
7977
7979
  }, timeoutMs);
7978
7980
  promise.then((result) => {
7979
7981
  clearTimeout(timer);
7980
- resolve18(result);
7982
+ resolve19(result);
7981
7983
  }).catch((error) => {
7982
7984
  clearTimeout(timer);
7983
7985
  reject(error instanceof Error ? error : new Error(String(error)));
@@ -14911,8 +14913,8 @@ var Semaphore = class {
14911
14913
  this.available -= 1;
14912
14914
  return Promise.resolve();
14913
14915
  }
14914
- return new Promise((resolve18) => {
14915
- this.waiters.push(resolve18);
14916
+ return new Promise((resolve19) => {
14917
+ this.waiters.push(resolve19);
14916
14918
  });
14917
14919
  }
14918
14920
  release() {
@@ -18345,9 +18347,9 @@ var ExpertPool = class {
18345
18347
  if (this.active < this.capacity) {
18346
18348
  return this.issuePermit();
18347
18349
  }
18348
- return new Promise((resolve18, reject) => {
18350
+ return new Promise((resolve19, reject) => {
18349
18351
  const timer = setTimeout(() => {
18350
- const idx = this.queue.findIndex((e) => e.resolve === resolve18);
18352
+ const idx = this.queue.findIndex((e) => e.resolve === resolve19);
18351
18353
  if (idx !== -1) {
18352
18354
  this.queue.splice(idx, 1);
18353
18355
  }
@@ -18357,7 +18359,7 @@ var ExpertPool = class {
18357
18359
  )
18358
18360
  );
18359
18361
  }, this.acquireTimeoutMs);
18360
- this.queue.push({ resolve: resolve18, reject, timer });
18362
+ this.queue.push({ resolve: resolve19, reject, timer });
18361
18363
  });
18362
18364
  }
18363
18365
  /** Release a permit back to the pool. */
@@ -18941,8 +18943,8 @@ var TaskQueue = class {
18941
18943
  if (this.cancelled) {
18942
18944
  return Promise.reject(new Error("Queue has been cancelled"));
18943
18945
  }
18944
- return new Promise((resolve18, reject) => {
18945
- this.queue.push({ task, resolve: resolve18, reject });
18946
+ return new Promise((resolve19, reject) => {
18947
+ this.queue.push({ task, resolve: resolve19, reject });
18946
18948
  this.processNext();
18947
18949
  });
18948
18950
  }
@@ -19218,16 +19220,16 @@ async function executeStepWithTimeout(step, context, stepExecutor, signal) {
19218
19220
  return executeWithTimeout2(step, stepContext, stepExecutor, stepTimeout, startTime);
19219
19221
  }
19220
19222
  function executeWithTimeout2(step, context, executor, timeout, startTime) {
19221
- return new Promise((resolve18) => {
19223
+ return new Promise((resolve19) => {
19222
19224
  const timeoutId = setTimeout(() => {
19223
- resolve18(createTimeoutResult(step.id, getTimeProvider().now() - startTime, timeout));
19225
+ resolve19(createTimeoutResult(step.id, getTimeProvider().now() - startTime, timeout));
19224
19226
  }, timeout);
19225
19227
  executor(step, context).then((result) => {
19226
19228
  clearTimeout(timeoutId);
19227
- resolve18(result);
19229
+ resolve19(result);
19228
19230
  }).catch((error) => {
19229
19231
  clearTimeout(timeoutId);
19230
- resolve18(createErrorResult(step.id, getTimeProvider().now() - startTime, error));
19232
+ resolve19(createErrorResult(step.id, getTimeProvider().now() - startTime, error));
19231
19233
  });
19232
19234
  });
19233
19235
  }
@@ -23634,10 +23636,10 @@ function calculateZStatistic(params) {
23634
23636
  function calculateDifferenceCI(p1, p2, total1, total2, confidence) {
23635
23637
  const difference = p1 - p2;
23636
23638
  const seDiff = Math.sqrt(p1 * (1 - p1) / (total1 || 1) + p2 * (1 - p2) / (total2 || 1));
23637
- const z115 = getZScore(confidence);
23639
+ const z116 = getZScore(confidence);
23638
23640
  return {
23639
- lower: difference - z115 * seDiff,
23640
- upper: difference + z115 * seDiff,
23641
+ lower: difference - z116 * seDiff,
23642
+ upper: difference + z116 * seDiff,
23641
23643
  estimate: difference,
23642
23644
  confidence,
23643
23645
  n: total1 + total2,
@@ -23660,11 +23662,11 @@ function proportionConfidenceInterval(successes, total, options = {}) {
23660
23662
  standardError: 0
23661
23663
  };
23662
23664
  }
23663
- const z115 = getZScore(opts.confidence);
23664
- const z210 = z115 * z115;
23665
+ const z116 = getZScore(opts.confidence);
23666
+ const z210 = z116 * z116;
23665
23667
  const denominator = 1 + z210 / n;
23666
23668
  const center = (p + z210 / (2 * n)) / denominator;
23667
- const margin = z115 / denominator * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
23669
+ const margin = z116 / denominator * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
23668
23670
  const lower = Math.max(0, center - margin);
23669
23671
  const upper = Math.min(1, center + margin);
23670
23672
  const standardError = Math.sqrt(p * (1 - p) / n);
@@ -23694,8 +23696,8 @@ function meanConfidenceInterval(values, options = {}) {
23694
23696
  const variance = values.reduce((sum, v) => sum + (v - mean) ** 2, 0) / (n - 1 || 1);
23695
23697
  const stdDev = Math.sqrt(variance);
23696
23698
  const standardError = stdDev / Math.sqrt(n);
23697
- const z115 = getZScore(opts.confidence);
23698
- const margin = z115 * standardError;
23699
+ const z116 = getZScore(opts.confidence);
23700
+ const margin = z116 * standardError;
23699
23701
  return {
23700
23702
  lower: mean - margin,
23701
23703
  upper: mean + margin,
@@ -25144,20 +25146,22 @@ function recordExpertError(role, errorMessage2) {
25144
25146
  }
25145
25147
 
25146
25148
  // src/mcp/tools/create-expert.ts
25149
+ var CREATE_EXPERT_ROLES = [
25150
+ "code_expert",
25151
+ "architecture_expert",
25152
+ "security_expert",
25153
+ "documentation_expert",
25154
+ "testing_expert",
25155
+ "devops_expert",
25156
+ "research_expert",
25157
+ "pm_expert",
25158
+ "ux_expert",
25159
+ "infrastructure_expert",
25160
+ "qa_expert",
25161
+ "data_visualization_expert"
25162
+ ];
25147
25163
  var CreateExpertInputSchema = z43.object({
25148
- role: z43.enum([
25149
- "code_expert",
25150
- "architecture_expert",
25151
- "security_expert",
25152
- "documentation_expert",
25153
- "testing_expert",
25154
- "devops_expert",
25155
- "research_expert",
25156
- "pm_expert",
25157
- "ux_expert",
25158
- "infrastructure_expert",
25159
- "data_visualization_expert"
25160
- ]).describe("Expert role to create"),
25164
+ role: z43.enum(CREATE_EXPERT_ROLES).describe("Expert role to create"),
25161
25165
  modelPreference: z43.string().max(100).optional().describe("Preferred model (e.g., claude-sonnet-4)")
25162
25166
  });
25163
25167
  var MAX_EXPERTS = 100;
@@ -25268,21 +25272,12 @@ function createCreateExpertHandler(deps) {
25268
25272
  function registerCreateExpertTool(server, deps) {
25269
25273
  const logger57 = deps.logger ?? createLogger({ tool: "create_expert" });
25270
25274
  const toolSchema = {
25271
- role: z43.enum([
25272
- "code_expert",
25273
- "architecture_expert",
25274
- "security_expert",
25275
- "documentation_expert",
25276
- "testing_expert",
25277
- "devops_expert",
25278
- "research_expert",
25279
- "pm_expert",
25280
- "ux_expert",
25281
- "infrastructure_expert"
25282
- ]).describe("Expert role to create"),
25275
+ // Derived from the single-source CREATE_EXPERT_ROLES so the registered enum
25276
+ // can never drift from the exported CreateExpertInputSchema (#3978).
25277
+ role: z43.enum(CREATE_EXPERT_ROLES).describe("Expert role to create"),
25283
25278
  modelPreference: z43.string().max(100).optional().describe("Preferred model (e.g., claude-sonnet-4)")
25284
25279
  };
25285
- const description = "Create a specialized expert agent for code, architecture, security, documentation, testing, devops, research, product management, UX, or infrastructure tasks";
25280
+ const description = "Create a specialized expert agent for code, architecture, security, documentation, testing, devops, research, product management, UX, infrastructure, quality assurance (QA), or data visualization tasks";
25286
25281
  const secureHandler = createSecureHandler(createCreateExpertHandler(deps), {
25287
25282
  toolName: "create_expert",
25288
25283
  rateLimiter: deps.rateLimiter,
@@ -25886,7 +25881,7 @@ function registerRunWorkflowTool(server, deps) {
25886
25881
  server.registerTool(
25887
25882
  "run_workflow",
25888
25883
  {
25889
- description: "Run a LINEAR (single-path) workflow template by name with typed inputs. For DAG-shaped workflows with branching, checkpoints, or rollback, use `run_graph_workflow` instead.",
25884
+ description: "Run a LINEAR (single-path) workflow template by name with typed inputs. For DAG-shaped workflows with branching, checkpoints, or rollback, use `run_graph_workflow` instead. Supports mode: 'async' (non-dryRun runs) \u2014 returns a jobId immediately; poll get_job_result.",
25890
25885
  inputSchema: toolInputSchema,
25891
25886
  annotations: getToolAnnotations("run_workflow")
25892
25887
  },
@@ -26297,7 +26292,7 @@ function execIdFields(executionId) {
26297
26292
  async function populateUnifiedContextOnState(state, options) {
26298
26293
  const taskCandidate = state["task"];
26299
26294
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
26300
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-I4NEOUEV.js");
26295
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-NIFXFYPQ.js");
26301
26296
  const category = inferTaskCategory2(taskCandidate);
26302
26297
  const executionId = options?.executionId;
26303
26298
  const execFields = execIdFields(executionId);
@@ -26794,13 +26789,13 @@ function dedupe(ids) {
26794
26789
  return [...new Set(ids)];
26795
26790
  }
26796
26791
  async function withTimeout2(promise, ms) {
26797
- return new Promise((resolve18, reject) => {
26792
+ return new Promise((resolve19, reject) => {
26798
26793
  const timer = setTimeout(() => {
26799
26794
  reject(new Error(`Node timed out after ${String(ms)}ms`));
26800
26795
  }, ms);
26801
26796
  promise.then((result) => {
26802
26797
  clearTimeout(timer);
26803
- resolve18(result);
26798
+ resolve19(result);
26804
26799
  }).catch((error) => {
26805
26800
  clearTimeout(timer);
26806
26801
  reject(error instanceof Error ? error : new Error(String(error)));
@@ -29218,11 +29213,11 @@ function createMockOrchestrator() {
29218
29213
  async function raceAgainstDeadline(promise, deadlineMs, onTimeout) {
29219
29214
  const startedAt = Date.now();
29220
29215
  let timer;
29221
- const timeoutP = new Promise((resolve18, reject) => {
29216
+ const timeoutP = new Promise((resolve19, reject) => {
29222
29217
  timer = setTimeout(
29223
29218
  () => {
29224
29219
  try {
29225
- resolve18(onTimeout(Date.now() - startedAt));
29220
+ resolve19(onTimeout(Date.now() - startedAt));
29226
29221
  } catch (err2) {
29227
29222
  reject(err2 instanceof Error ? err2 : new Error(String(err2)));
29228
29223
  }
@@ -30425,11 +30420,11 @@ function createWorkerTask(entry, taskIndex, waveNumber, opts) {
30425
30420
  const staggerSlot = taskIndex % opts.maxConcurrency;
30426
30421
  const staggerMs = staggerSlot * opts.staggerDelayMs;
30427
30422
  if (staggerMs > 0) {
30428
- await new Promise((resolve18) => setTimeout(resolve18, staggerMs));
30423
+ await new Promise((resolve19) => setTimeout(resolve19, staggerMs));
30429
30424
  }
30430
30425
  const spacingDelay = opts.failureTracker.getSpacingDelay(entry.role);
30431
30426
  if (spacingDelay > 0) {
30432
- await new Promise((resolve18) => setTimeout(resolve18, spacingDelay));
30427
+ await new Promise((resolve19) => setTimeout(resolve19, spacingDelay));
30433
30428
  }
30434
30429
  const timeoutMs = opts.options.workerTimeoutMs ?? getExpertTaskTimeout(entry.subTask);
30435
30430
  const result = await executeSafe({
@@ -30481,7 +30476,7 @@ async function maybeDelayForRateLimit(results, waveIdx, totalWaves) {
30481
30476
  );
30482
30477
  if (hasRateLimit) {
30483
30478
  logger25.warn("Rate-limit detected \u2014 delaying next wave", { delayMs: RATE_LIMIT_WAVE_DELAY_MS });
30484
- await new Promise((resolve18) => setTimeout(resolve18, RATE_LIMIT_WAVE_DELAY_MS));
30479
+ await new Promise((resolve19) => setTimeout(resolve19, RATE_LIMIT_WAVE_DELAY_MS));
30485
30480
  }
30486
30481
  }
30487
30482
  function emitWaveStarted(ctx, workerCount, roles) {
@@ -30579,7 +30574,7 @@ async function maybeRetryAfterTriage(opts) {
30579
30574
  }
30580
30575
  const useAltCli = triage.action === "retry_different_cli" && altExecuteWorker !== void 0;
30581
30576
  if (triage.action === "retry_different_cli") {
30582
- await new Promise((resolve18) => setTimeout(resolve18, RATE_LIMIT_SPACING_MS));
30577
+ await new Promise((resolve19) => setTimeout(resolve19, RATE_LIMIT_SPACING_MS));
30583
30578
  }
30584
30579
  const retryTimeout = triage.action === "extend_timeout" ? Math.min(timeoutMs * TIMEOUT_EXTENSION_FACTOR, MAX_WORKER_TIMEOUT_MS) : timeoutMs;
30585
30580
  const retryExecutor = useAltCli ? altExecuteWorker : executeWorker;
@@ -34431,7 +34426,7 @@ function registerDelegateToModelTool(server, deps) {
34431
34426
  server.registerTool(
34432
34427
  "delegate_to_model",
34433
34428
  {
34434
- description: "Pick which EXISTING model should handle a task. Inspects task complexity and returns the best-fit model from the routing registry \u2014 does NOT add a new model. Read-only. (For drafting a registry entry for a new model, use `registry_import`.)",
34429
+ description: "Pick which EXISTING model should handle a task. Inspects task complexity and returns the best-fit model from the routing registry \u2014 does NOT add a new model. Records the routing decision to tool-memory for learning feedback (not a pure read). (For drafting a registry entry for a new model, use `registry_import`.)",
34435
34430
  inputSchema: TOOL_SCHEMA,
34436
34431
  outputSchema: DelegateOutputSchema.shape,
34437
34432
  annotations: getToolAnnotations("delegate_to_model")
@@ -36495,7 +36490,7 @@ var ResearchAddSourceInputSchema = z61.object({
36495
36490
  has_tests: z61.boolean().optional(),
36496
36491
  has_docs: z61.boolean().optional(),
36497
36492
  has_paper: z61.boolean().optional()
36498
- }).optional().describe("Quality signals (auto-fetched for GitHub repos if omitted)"),
36493
+ }).optional().describe("Quality signals used to compute quality_score; provide explicitly \u2014 no GitHub metadata is fetched"),
36499
36494
  techniques_extracted: z61.array(z61.string().max(100)).max(5).optional().describe("Techniques identified in this source (max 5)"),
36500
36495
  verdict: VerdictEnum.optional().describe("Adoption verdict"),
36501
36496
  verdict_notes: z61.string().max(500).optional().describe("Notes explaining the verdict"),
@@ -37460,7 +37455,7 @@ function registerResearchCatalogReviewTool(server, deps) {
37460
37455
  topic: z64.string().optional().describe("Topic for approved papers"),
37461
37456
  createIssue: z64.boolean().optional().describe("Create GitHub issue when approving")
37462
37457
  };
37463
- const description = "Review auto-cataloged research references found during tool execution. List pending references, approve them for registry addition, dismiss, or clear all.";
37458
+ const description = "Review auto-cataloged research references found during tool execution. List pending references, approve them for registry addition (optionally filing a GitHub issue), dismiss, or clear all.";
37464
37459
  const secureHandler = createSecureHandler(createCatalogReviewHandler(deps), {
37465
37460
  toolName: "research_catalog_review",
37466
37461
  rateLimiter: deps.rateLimiter,
@@ -37779,7 +37774,7 @@ async function handleRunGraphWorkflow(input, logger57) {
37779
37774
  checkpointCount
37780
37775
  };
37781
37776
  }
37782
- var GRAPH_WORKFLOW_DESCRIPTION = "Run a DAG-shaped workflow with per-node checkpoints, event streaming, and an audit trail. Checkpoints drive the executor in-process recovery (crash-resume + selective node retry) and inspection \u2014 the MCP call is fire-and-forget with NO caller resume input, and the checkpoint store is in-memory (not durable across process restarts). For straight linear templates, use `run_workflow` instead.";
37777
+ var GRAPH_WORKFLOW_DESCRIPTION = "Run a DAG-shaped workflow with per-node checkpoints, event streaming, and an audit trail. Checkpoints drive the executor in-process recovery (crash-resume + selective node retry) and inspection \u2014 the MCP call is fire-and-forget with NO caller resume input, and the checkpoint store is in-memory (not durable across process restarts). For straight linear templates, use `run_workflow` instead. Supports dispatch: 'async' \u2014 returns a jobId immediately; poll get_job_result.";
37783
37778
  var GRAPH_WORKFLOW_SCHEMA = {
37784
37779
  workflow: z67.string().min(1).max(100).describe(
37785
37780
  'Workflow name: echo, pipeline, code-review, security-scan. Use "list" for available workflows.'
@@ -38953,7 +38948,7 @@ function registerMemoryWriteTool(server, deps) {
38953
38948
  confidence: z71.enum(["high", "medium", "low"]).optional().describe("Confidence level (default: medium)"),
38954
38949
  metadata: z71.record(z71.string().max(100), z71.string().max(500)).optional().describe("Optional key-value metadata tags")
38955
38950
  };
38956
- const description = "Write a memory entry to a specific backend. Supports session (learnings), belief (subject-predicate-object triples), agentic (knowledge with attributes), adaptive (priority-scored), and typed (MIRIX-style semantic) backends.";
38951
+ const description = "Write a memory entry to a specific backend. Supports session (learnings), belief assertions (subject + object; predicate fixed as `has_knowledge`), agentic (knowledge with attributes), adaptive (priority-scored), and typed (MIRIX-style semantic) backends.";
38957
38952
  const secureHandler = createSecureHandler(memoryWriteHandler, {
38958
38953
  toolName: "memory_write",
38959
38954
  rateLimiter: deps.rateLimiter,
@@ -39072,8 +39067,8 @@ var RegistryImportInputSchema = z73.object({
39072
39067
  provider: z73.enum(["anthropic", "google", "openai"]).describe("Model provider (anthropic, google, openai)"),
39073
39068
  /** Model identifier from the provider (e.g., "claude-4-opus-20260201"). */
39074
39069
  modelId: z73.string().min(1).describe("Provider model identifier"),
39075
- /** Preview without persisting (default: true). */
39076
- dryRun: z73.boolean().optional().default(true).describe("Preview without persisting")
39070
+ /** No-op flag echoed back in the response; the tool never persists regardless. */
39071
+ dryRun: z73.boolean().optional().default(true).describe("No-op flag echoed back in the response; the tool never persists regardless")
39077
39072
  });
39078
39073
 
39079
39074
  // src/mcp/tools/registry-import-tool.ts
@@ -39189,9 +39184,9 @@ function registerRegistryImportTool(server, deps) {
39189
39184
  const toolSchema = {
39190
39185
  provider: z74.enum(["anthropic", "google", "openai"]).describe("Model provider (anthropic, google, openai)"),
39191
39186
  modelId: z74.string().min(1).describe("Provider model identifier"),
39192
- dryRun: z74.boolean().optional().describe("Preview without persisting (default: true)")
39187
+ dryRun: z74.boolean().optional().describe("No-op flag echoed back in the response; the tool never persists regardless")
39193
39188
  };
39194
- const description = "Draft a registry ENTRY for a NEW model so routing can consider it later. Generates a ModelCapability YAML with conservative quality scores (5/10) for human review. For picking among ALREADY-registered models, use `delegate_to_model`. Use dryRun=true (default) to preview the entry without saving.";
39189
+ const description = "Draft a registry ENTRY for a NEW model so routing can consider it later. Generates a ModelCapability YAML with conservative quality scores (5/10) for human review. Always returns a draft entry for human review (never persists). For picking among ALREADY-registered models, use `delegate_to_model`.";
39195
39190
  const secureHandler = createSecureHandler(registryImportHandler, {
39196
39191
  toolName: "registry_import",
39197
39192
  rateLimiter: deps.rateLimiter,
@@ -39219,8 +39214,12 @@ var RepoAnalyzeInputSchema = z75.object({
39219
39214
  (v) => !v.includes("://") || /^https?:\/\//i.test(v),
39220
39215
  "Only HTTP/HTTPS URLs are allowed"
39221
39216
  ).describe('GitHub repository in "owner/name" format (e.g., "cloudfoundry/korifi") or full URL'),
39222
- /** Analysis depth: shallow (tree + README) or deep (full analysis). */
39223
- depth: z75.enum(["shallow", "deep"]).optional().default("shallow").describe("Analysis depth: shallow (tree + README) or deep (full analysis)")
39217
+ /**
39218
+ * Currently a no-op: the handler ignores this flag and always runs the full
39219
+ * analysis. Both values resolve to identical behavior; retained for input-shape
39220
+ * stability until a distinct shallow path is implemented.
39221
+ */
39222
+ depth: z75.enum(["shallow", "deep"]).optional().default("shallow").describe("Currently a no-op \u2014 the handler always runs the full analysis (both values identical)")
39224
39223
  });
39225
39224
 
39226
39225
  // src/mcp/tools/repo-analyze-tool.ts
@@ -39244,7 +39243,7 @@ function registerRepoAnalyzeTool(server, deps) {
39244
39243
  const logger57 = deps.logger ?? createLogger({ tool: "repo_analyze" });
39245
39244
  const toolSchema = {
39246
39245
  repo: z76.string().min(1).describe('GitHub repository in "owner/name" format or full URL'),
39247
- depth: z76.enum(["shallow", "deep"]).optional().describe("Analysis depth: shallow (tree + README) or deep")
39246
+ depth: z76.enum(["shallow", "deep"]).optional().describe("Currently a no-op \u2014 the handler always runs the full analysis (both values identical)")
39248
39247
  };
39249
39248
  const description = "Analyze a GitHub repository structure. Returns language, framework, package manager, CI provider, security tooling, Dockerfile/Helm/Makefile detection, and gap identification. Replaces multi-step manual inspection with a single structured query.";
39250
39249
  const secureHandler = createSecureHandler(repoAnalyzeHandler, {
@@ -40469,27 +40468,27 @@ var FileAuditStorage = class _FileAuditStorage {
40469
40468
  const data = this.writeBuffer.join("");
40470
40469
  this.writeBuffer = [];
40471
40470
  const stream = this.writeStream;
40472
- return new Promise((resolve18, reject) => {
40471
+ return new Promise((resolve19, reject) => {
40473
40472
  stream.write(data, (err2) => {
40474
40473
  if (err2 !== void 0 && err2 !== null) {
40475
40474
  reject(new AuditError("Failed to flush audit log", { cause: err2 }));
40476
40475
  } else {
40477
- resolve18();
40476
+ resolve19();
40478
40477
  }
40479
40478
  });
40480
40479
  });
40481
40480
  }
40482
40481
  async close() {
40483
40482
  await this.flush();
40484
- return new Promise((resolve18) => {
40483
+ return new Promise((resolve19) => {
40485
40484
  if (this.writeStream === null) {
40486
- resolve18();
40485
+ resolve19();
40487
40486
  return;
40488
40487
  }
40489
40488
  this.writeStream.end(() => {
40490
40489
  this.writeStream = null;
40491
40490
  this.logger.info("Audit storage closed");
40492
- resolve18();
40491
+ resolve19();
40493
40492
  });
40494
40493
  });
40495
40494
  }
@@ -41390,7 +41389,7 @@ async function tryIssueTriage(task) {
41390
41389
  try {
41391
41390
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
41392
41391
  if (issueMatch === null) return null;
41393
- const { createIssueTriage } = await import("./issue-triage-NJB6SL4S.js");
41392
+ const { createIssueTriage } = await import("./issue-triage-7RN74LBU.js");
41394
41393
  const triage = createIssueTriage();
41395
41394
  const owner = issueMatch[1] ?? "";
41396
41395
  const num = issueMatch[2] ?? "";
@@ -41418,7 +41417,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
41418
41417
  ]);
41419
41418
  async function classifyWithLLM(task) {
41420
41419
  try {
41421
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-GMB5IHHF.js");
41420
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-NY6FAFQH.js");
41422
41421
  const prompt = [
41423
41422
  "Classify this task into exactly one pipeline template.",
41424
41423
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -43184,8 +43183,8 @@ var memoryInitPromise = null;
43184
43183
  async function initPipelineMemory() {
43185
43184
  if (cachedMemory !== null) return cachedMemory;
43186
43185
  try {
43187
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-GMQYZLJE.js");
43188
- const { getLearningDir } = await import("./learning-persistence-2KO4CXNL.js");
43186
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-WZCS7WDH.js");
43187
+ const { getLearningDir } = await import("./learning-persistence-EHTHKWR5.js");
43189
43188
  const mem = createSessionMemory2(getLearningDir());
43190
43189
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
43191
43190
  cachedMemory = {
@@ -43246,7 +43245,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
43246
43245
  callRecord(routingMemoryCache);
43247
43246
  return;
43248
43247
  }
43249
- routingMemoryInitPromise ??= import("./routing-memory-VVLJL3MG.js").then(({ createRoutingMemory }) => {
43248
+ routingMemoryInitPromise ??= import("./routing-memory-RAYIYIUP.js").then(({ createRoutingMemory }) => {
43250
43249
  routingMemoryCache ??= createRoutingMemory();
43251
43250
  return routingMemoryCache;
43252
43251
  }).catch((error) => {
@@ -43280,7 +43279,7 @@ ${text}` : "";
43280
43279
  }
43281
43280
  async function getWeatherContext() {
43282
43281
  try {
43283
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-OU65NJS3.js");
43282
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-TEBEALS7.js");
43284
43283
  const report = generateWeatherReport2({ includeAdaptive: true });
43285
43284
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
43286
43285
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -43298,8 +43297,8 @@ ${lines}
43298
43297
  }
43299
43298
  async function getMemoryContext(task) {
43300
43299
  try {
43301
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-GMQYZLJE.js");
43302
- const { getLearningDir } = await import("./learning-persistence-2KO4CXNL.js");
43300
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-WZCS7WDH.js");
43301
+ const { getLearningDir } = await import("./learning-persistence-EHTHKWR5.js");
43303
43302
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
43304
43303
  const learnings = memory.searchLearnings(task.slice(0, 200));
43305
43304
  if (learnings.length === 0) return "";
@@ -43410,7 +43409,7 @@ ${contextBlock}`;
43410
43409
  const strategy = config.votingStrategy ?? "higher_order";
43411
43410
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43412
43411
  try {
43413
- const { executeVoting } = await import("./consensus-vote-R6X5IL57.js");
43412
+ const { executeVoting } = await import("./consensus-vote-K2SHY4TC.js");
43414
43413
  const votingResult = await executeVoting(
43415
43414
  {
43416
43415
  proposal: buildVoteProposal(plan, research),
@@ -43847,7 +43846,7 @@ async function searchCodebaseForTask(task) {
43847
43846
  }
43848
43847
  async function queryResearchRegistry(task) {
43849
43848
  try {
43850
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-5TLNHT3I.js");
43849
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-WH4IC36H.js");
43851
43850
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
43852
43851
  if (topic === void 0) return null;
43853
43852
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -43918,7 +43917,7 @@ function createScanStageWrapper() {
43918
43917
  try {
43919
43918
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
43920
43919
  if (slug !== void 0) {
43921
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-U2ZIFW53.js");
43920
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-76IXMJNC.js");
43922
43921
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
43923
43922
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
43924
43923
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -45387,9 +45386,9 @@ var RESEARCH_BUDGET_MS = 2e4;
45387
45386
  var RESEARCH_TIMED_OUT = /* @__PURE__ */ Symbol("research-budget-exceeded");
45388
45387
  async function withResearchBudget(p, ms) {
45389
45388
  let timer;
45390
- const budget = new Promise((resolve18) => {
45389
+ const budget = new Promise((resolve19) => {
45391
45390
  timer = setTimeout(() => {
45392
- resolve18(RESEARCH_TIMED_OUT);
45391
+ resolve19(RESEARCH_TIMED_OUT);
45393
45392
  }, ms);
45394
45393
  });
45395
45394
  try {
@@ -46024,7 +46023,7 @@ var GitHubTaskTracker = class {
46024
46023
  cachedProvider = null;
46025
46024
  async getProvider() {
46026
46025
  if (this.cachedProvider !== null) return this.cachedProvider;
46027
- const { createScmProvider } = await import("./factory-WR62MEIJ.js");
46026
+ const { createScmProvider } = await import("./factory-6A26HIWS.js");
46028
46027
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
46029
46028
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
46030
46029
  this.cachedProvider = result.value;
@@ -46274,7 +46273,7 @@ function buildStructuredOutput(result) {
46274
46273
  }))
46275
46274
  };
46276
46275
  }
46277
- var RUN_DEV_PIPELINE_DESCRIPTION = "Run the multi-agent development pipeline. Accepts direct task instructions, a plan file, or a spec file. Supports dry-run (plan+vote only).";
46276
+ var RUN_DEV_PIPELINE_DESCRIPTION = "Run the multi-agent development pipeline. Accepts direct task instructions, a plan file, or a spec file. Supports dry-run (plan+vote only). Supports dispatch: 'async' (non-dryRun runs) \u2014 returns a jobId immediately; poll get_job_result.";
46278
46277
  function buildPipelineOptions(input, trustTier, auditLogger) {
46279
46278
  return {
46280
46279
  ...input.sessionId !== void 0 ? { sessionId: input.sessionId } : {},
@@ -46487,7 +46486,7 @@ function selectStageRegistry(template, task, agentStages) {
46487
46486
  }
46488
46487
  return createDevStageRegistry(agentStages);
46489
46488
  }
46490
- var RUN_PIPELINE_DESCRIPTION = `Single unified entry point for all pipeline templates (${listTemplateIds().join("/")}). Auto-detects template from task content or accepts an explicit override.`;
46489
+ var RUN_PIPELINE_DESCRIPTION = `Single unified entry point for all pipeline templates (${listTemplateIds().join("/")}). Auto-detects template from task content or accepts an explicit override. Supports dispatch: 'async' (non-dryRun runs) \u2014 returns a jobId immediately; poll get_job_result.`;
46491
46490
  async function runPipelineForGoal(goal, logger57 = createLogger({ tool: "run_pipeline" })) {
46492
46491
  const budget = resolveRunBudget(goal, void 0, logger57);
46493
46492
  const agentStages = createAgentStages(budget !== void 0 ? { budget } : {});
@@ -46789,7 +46788,7 @@ async function probeSource(source, includeModelIds) {
46789
46788
  }
46790
46789
  }
46791
46790
  async function defaultSources(includeOpenRouter) {
46792
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-ZBQGA373.js");
46791
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-GGSACEWN.js");
46793
46792
  const adapters = createAllAdapters2();
46794
46793
  return buildDefaultModelSources(adapters, { includeOpenRouter });
46795
46794
  }
@@ -49355,6 +49354,66 @@ function computeOutcomeReward(collector, outcome) {
49355
49354
  return collector.computeReward(outcome);
49356
49355
  }
49357
49356
 
49357
+ // src/audit/pr-review-record.ts
49358
+ import * as crypto2 from "crypto";
49359
+ import { z as z115 } from "zod";
49360
+ var PrReviewVerdictSchema = z115.enum(["approve", "request_changes", "abstain"]);
49361
+ var PrReviewVoteCountsSchema = z115.object({
49362
+ approve: z115.number().int().nonnegative(),
49363
+ request_changes: z115.number().int().nonnegative(),
49364
+ abstain: z115.number().int().nonnegative(),
49365
+ error: z115.number().int().nonnegative(),
49366
+ total: z115.number().int().nonnegative()
49367
+ }).strict();
49368
+ var PrReviewRecordSchema = z115.object({
49369
+ /** Schema version. '1.0' is the initial record-set+sequence model (#3831). */
49370
+ version: z115.literal("1.0"),
49371
+ /**
49372
+ * Monotonic sequence number (integer ≥ 0). Assigned as (max existing
49373
+ * sequence)+1 at write time. Sorted, the set of sequences must cover
49374
+ * 0..maxSeq with no gap (omission detection); DUPLICATE sequences are a
49375
+ * benign concurrent-fork signal, not tampering.
49376
+ */
49377
+ sequence: z115.number().int().nonnegative(),
49378
+ /** The PR number the review covers. */
49379
+ prNumber: z115.number().int().positive(),
49380
+ /**
49381
+ * The 40-hex head commit SHA the review was run against. SHA-BINDING
49382
+ * (condition 1): the gate matches THIS sha — a record for a stale head does
49383
+ * NOT satisfy a later push, and the hash below covers it so it cannot be
49384
+ * edited to claim a different reviewed sha.
49385
+ */
49386
+ headSha: z115.string().regex(/^[0-9a-f]{40}$/, "headSha must be a 40-char lowercase hex commit sha"),
49387
+ /** ISO-8601 timestamp the review was recorded. */
49388
+ recordedAt: z115.string().min(1),
49389
+ /** The resolved aggregate verdict. */
49390
+ verdict: PrReviewVerdictSchema,
49391
+ /**
49392
+ * Whether the aggregate carried a VERIFIED finding (the 4-point gate). A
49393
+ * `request_changes` with `verified: true` is a strict blocker; covered by the
49394
+ * hash so it cannot be flipped without detection.
49395
+ */
49396
+ verified: z115.boolean(),
49397
+ /** Per-decision voter tally from the pr_review aggregate. */
49398
+ voteCounts: PrReviewVoteCountsSchema,
49399
+ /** Truncated human-readable review summary for the reviewer record. */
49400
+ summary: z115.string(),
49401
+ /** Optional correlation/decision id linking to the cost rollup / trace. */
49402
+ correlationId: z115.string().min(1).optional(),
49403
+ /**
49404
+ * ADVISORY hash of the tip record at write time (absent for the first).
49405
+ * Retained for audit texture but NOT covered by `hash` and NOT verified —
49406
+ * the record-set model is position-independent (mirrors #3927).
49407
+ */
49408
+ previousHash: z115.string().length(64).optional(),
49409
+ /** SHA-256 over every field above EXCEPT `previousHash` (and except `hash`). */
49410
+ hash: z115.string().length(64)
49411
+ }).strict();
49412
+
49413
+ // src/audit/pr-review-record-store.ts
49414
+ import { existsSync as existsSync12, readFileSync as readFileSync10 } from "fs";
49415
+ import { isAbsolute, join as join10, resolve as resolve17 } from "path";
49416
+
49358
49417
  // src/security/sandbox/sandbox-types.ts
49359
49418
  var DEFAULT_RESOURCE_LIMITS = {
49360
49419
  maxMemoryBytes: 512 * 1024 * 1024,
@@ -49770,7 +49829,7 @@ function getPolicy(id) {
49770
49829
  // src/security/sandbox/sandbox-executor.ts
49771
49830
  import { execFile } from "child_process";
49772
49831
  import { promisify } from "util";
49773
- import { resolve as resolve17, normalize as normalize2, sep as sep11 } from "path";
49832
+ import { resolve as resolve18, normalize as normalize2, sep as sep11 } from "path";
49774
49833
  var execFileAsync = promisify(execFile);
49775
49834
  var logger51 = createLogger({ component: "sandbox-executor" });
49776
49835
  function parseExecError(error) {
@@ -49850,9 +49909,9 @@ var PolicySandboxExecutor = class {
49850
49909
  */
49851
49910
  validateCwd(cwd, policy) {
49852
49911
  if (cwd === void 0) return null;
49853
- const normalizedCwd = normalize2(resolve17(cwd));
49912
+ const normalizedCwd = normalize2(resolve18(cwd));
49854
49913
  const isAllowed = policy.pathRules.some((rule) => {
49855
- const normalizedRule = normalize2(resolve17(rule.path));
49914
+ const normalizedRule = normalize2(resolve18(rule.path));
49856
49915
  const isUnderRule = normalizedCwd === normalizedRule || normalizedCwd.startsWith(normalizedRule + sep11);
49857
49916
  return isUnderRule && rule.access !== "none";
49858
49917
  });
@@ -50852,4 +50911,4 @@ export {
50852
50911
  shutdownFeedbackSubscriber,
50853
50912
  createEventBusBridge
50854
50913
  };
50855
- //# sourceMappingURL=chunk-76R5ES6Z.js.map
50914
+ //# sourceMappingURL=chunk-6JOXXQK2.js.map