nexus-agents 11.6.2 → 11.7.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 (144) hide show
  1. package/dist/{ast-rule-runner-GRU2OC5H.js → ast-rule-runner-PIIAHXDA.js} +5 -5
  2. package/dist/{child-mcp-config-DNZN7CMS.js → child-mcp-config-B6BTYZT4.js} +4 -4
  3. package/dist/{chunk-L4QFWMXB.js → chunk-26WUCAGU.js} +4 -4
  4. package/dist/{chunk-MFBTGXR6.js → chunk-3QKRY72I.js} +8 -435
  5. package/dist/chunk-3QKRY72I.js.map +1 -0
  6. package/dist/{chunk-UMG4PRKT.js → chunk-4HOSKAB3.js} +4 -4
  7. package/dist/{chunk-2URHVZJR.js → chunk-4MKZAA6W.js} +5 -4
  8. package/dist/chunk-4MKZAA6W.js.map +1 -0
  9. package/dist/{chunk-JLJVZP7U.js → chunk-4NNCB7O2.js} +5 -5
  10. package/dist/{chunk-Z5XFIY4Q.js → chunk-5BEFQVPR.js} +2 -2
  11. package/dist/chunk-6IP3FOEC.js +365 -0
  12. package/dist/chunk-6IP3FOEC.js.map +1 -0
  13. package/dist/{chunk-4X4RJ6AP.js → chunk-6T6YL7MV.js} +4 -4
  14. package/dist/{chunk-RWBF3Y4A.js → chunk-7HI6EWY5.js} +2 -2
  15. package/dist/{chunk-45G5ZV3K.js → chunk-7Y6SB623.js} +2 -2
  16. package/dist/{chunk-N5YTX4UL.js → chunk-BSX3PMNN.js} +2 -2
  17. package/dist/{chunk-6A6YA4C4.js → chunk-BVUPPTAD.js} +6 -6
  18. package/dist/{chunk-L3VR5RXX.js → chunk-E5XKXB3G.js} +2 -2
  19. package/dist/chunk-ENX4WYFX.js +441 -0
  20. package/dist/chunk-ENX4WYFX.js.map +1 -0
  21. package/dist/{chunk-6WCFWNIR.js → chunk-FOJ2INSI.js} +3 -3
  22. package/dist/{chunk-OMQC4NWX.js → chunk-GCRXO43T.js} +2 -2
  23. package/dist/{chunk-U36QOTW3.js → chunk-HCTKX472.js} +8 -8
  24. package/dist/{chunk-2UEI7ZZ5.js → chunk-HT7QZ3JB.js} +5 -5
  25. package/dist/{chunk-7GTIW25A.js → chunk-IHGMXLLO.js} +6 -5
  26. package/dist/chunk-IHGMXLLO.js.map +1 -0
  27. package/dist/{chunk-UBK5LSLD.js → chunk-IJCEGKCM.js} +222 -152
  28. package/dist/{chunk-UBK5LSLD.js.map → chunk-IJCEGKCM.js.map} +1 -1
  29. package/dist/{chunk-4X3HAJWZ.js → chunk-IKGAI6ES.js} +2 -2
  30. package/dist/{chunk-GIW4L5PI.js → chunk-INVGMQKJ.js} +2 -2
  31. package/dist/{chunk-GP2O652R.js → chunk-JMKK6UBR.js} +34 -389
  32. package/dist/chunk-JMKK6UBR.js.map +1 -0
  33. package/dist/{chunk-STKHXNVO.js → chunk-ML7FSBBM.js} +4 -4
  34. package/dist/{chunk-CHYLIBKP.js → chunk-OHI6P6GE.js} +4 -4
  35. package/dist/{chunk-ZYZIRL4X.js → chunk-OMWOFIK5.js} +2657 -2525
  36. package/dist/chunk-OMWOFIK5.js.map +1 -0
  37. package/dist/{chunk-HWAJUCPO.js → chunk-PHLASJD2.js} +31 -26
  38. package/dist/chunk-PHLASJD2.js.map +1 -0
  39. package/dist/{chunk-2SFOJPJH.js → chunk-PYTN5UNL.js} +2 -2
  40. package/dist/{chunk-6KIQF3UT.js → chunk-RRZOCS22.js} +4 -4
  41. package/dist/{chunk-3QBKZZKE.js → chunk-U4GRHZRQ.js} +1705 -1490
  42. package/dist/chunk-U4GRHZRQ.js.map +1 -0
  43. package/dist/{chunk-UL2JGKCQ.js → chunk-VPRBPMVL.js} +3 -3
  44. package/dist/{chunk-O3FMPRQH.js → chunk-VVDPRJU7.js} +3 -1
  45. package/dist/chunk-VVDPRJU7.js.map +1 -0
  46. package/dist/{chunk-AZPPUDUR.js → chunk-YHW6FXKC.js} +7 -7
  47. package/dist/{chunk-PO2CMGVP.js → chunk-YI6DZGN6.js} +2 -2
  48. package/dist/{cli-circuit-breaker-KAOHEKYP.js → cli-circuit-breaker-HV7WXCVP.js} +5 -5
  49. package/dist/{cli-readiness-X7O3LCWW.js → cli-readiness-N4WWAROI.js} +10 -9
  50. package/dist/{cli-server-gateway-P4F66L2K.js → cli-server-gateway-5N7MHUO6.js} +15 -13
  51. package/dist/cli.js +88 -85
  52. package/dist/cli.js.map +1 -1
  53. package/dist/{composite-router-4QGXSANU.js → composite-router-TXGVXX56.js} +4 -4
  54. package/dist/{consensus-vote-ZCZJT3HS.js → consensus-vote-BYEM44JH.js} +19 -17
  55. package/dist/{context-retriever-2XMORQMD.js → context-retriever-NT2DYPFG.js} +11 -11
  56. package/dist/{doctor-deep-RLYWXUJX.js → doctor-deep-RUWHL6R5.js} +5 -5
  57. package/dist/{doctor-gateway-report-AKE3S2UH.js → doctor-gateway-report-BBMWMMVQ.js} +8 -8
  58. package/dist/{doctor-live-MA7S3NS7.js → doctor-live-NI27JU6K.js} +15 -13
  59. package/dist/{doctor-live-MA7S3NS7.js.map → doctor-live-NI27JU6K.js.map} +1 -1
  60. package/dist/{expert-bridge-2TNU6HKC.js → expert-bridge-V2R5PAXS.js} +6 -6
  61. package/dist/{factory-UCKSPZ5G.js → factory-3PBQNM44.js} +14 -12
  62. package/dist/{factory-5UWGAQOB.js → factory-YZILOS2Z.js} +7 -7
  63. package/dist/gemini-adapter-IZ3TS6KZ.js +28 -0
  64. package/dist/{improvement-review-PHNGPUYO.js → improvement-review-N6W2FWFO.js} +7 -7
  65. package/dist/index.d.ts +68 -2
  66. package/dist/index.js +132 -128
  67. package/dist/index.js.map +1 -1
  68. package/dist/{init-opencode-CII5S6XH.js → init-opencode-PLMPOB55.js} +7 -7
  69. package/dist/{issue-triage-DO6ATHBV.js → issue-triage-W5XKE324.js} +7 -7
  70. package/dist/{model-config-helpers-3U6IEHM6.js → model-config-helpers-5DTFDWYR.js} +7 -3
  71. package/dist/{openai-compat-adapter-7G6JYZLY.js → openai-compat-adapter-4VREPXZT.js} +7 -7
  72. package/dist/{pr-reviewer-helpers-JSLG5YYG.js → pr-reviewer-helpers-RAPVW52Y.js} +6 -6
  73. package/dist/{registry-command-X5NLFI3D.js → registry-command-3XWS7G6F.js} +2 -2
  74. package/dist/{repo-security-plan-DLROWMDR.js → repo-security-plan-BITATHGO.js} +4 -4
  75. package/dist/{research-helpers-synthesize-NE3I56IC.js → research-helpers-synthesize-FW47ZIMK.js} +6 -6
  76. package/dist/{routing-memory-YFSHH2AN.js → routing-memory-POESZPDJ.js} +4 -4
  77. package/dist/{session-memory-ZE2FUHO3.js → session-memory-TBBFP3XP.js} +5 -5
  78. package/dist/{setup-config-SFNU2QL4.js → setup-config-AKFLKDMP.js} +5 -5
  79. package/dist/{setup-custom-api-JBCH5YAW.js → setup-custom-api-WQMO2OV7.js} +5 -5
  80. package/dist/{tool-memory-Z3X6EFMS.js → tool-memory-RLCP6WVV.js} +7 -7
  81. package/dist/{unified-registry-2YSSICSB.js → unified-registry-MIANRTCJ.js} +14 -12
  82. package/dist/{weather-report-YSGMEYVV.js → weather-report-QB2TYTYU.js} +4 -4
  83. package/dist/weather-report-QB2TYTYU.js.map +1 -0
  84. package/package.json +1 -1
  85. package/dist/chunk-2URHVZJR.js.map +0 -1
  86. package/dist/chunk-3QBKZZKE.js.map +0 -1
  87. package/dist/chunk-7GTIW25A.js.map +0 -1
  88. package/dist/chunk-GP2O652R.js.map +0 -1
  89. package/dist/chunk-HWAJUCPO.js.map +0 -1
  90. package/dist/chunk-MFBTGXR6.js.map +0 -1
  91. package/dist/chunk-O3FMPRQH.js.map +0 -1
  92. package/dist/chunk-ZYZIRL4X.js.map +0 -1
  93. /package/dist/{ast-rule-runner-GRU2OC5H.js.map → ast-rule-runner-PIIAHXDA.js.map} +0 -0
  94. /package/dist/{child-mcp-config-DNZN7CMS.js.map → child-mcp-config-B6BTYZT4.js.map} +0 -0
  95. /package/dist/{chunk-L4QFWMXB.js.map → chunk-26WUCAGU.js.map} +0 -0
  96. /package/dist/{chunk-UMG4PRKT.js.map → chunk-4HOSKAB3.js.map} +0 -0
  97. /package/dist/{chunk-JLJVZP7U.js.map → chunk-4NNCB7O2.js.map} +0 -0
  98. /package/dist/{chunk-Z5XFIY4Q.js.map → chunk-5BEFQVPR.js.map} +0 -0
  99. /package/dist/{chunk-4X4RJ6AP.js.map → chunk-6T6YL7MV.js.map} +0 -0
  100. /package/dist/{chunk-RWBF3Y4A.js.map → chunk-7HI6EWY5.js.map} +0 -0
  101. /package/dist/{chunk-45G5ZV3K.js.map → chunk-7Y6SB623.js.map} +0 -0
  102. /package/dist/{chunk-N5YTX4UL.js.map → chunk-BSX3PMNN.js.map} +0 -0
  103. /package/dist/{chunk-6A6YA4C4.js.map → chunk-BVUPPTAD.js.map} +0 -0
  104. /package/dist/{chunk-L3VR5RXX.js.map → chunk-E5XKXB3G.js.map} +0 -0
  105. /package/dist/{chunk-6WCFWNIR.js.map → chunk-FOJ2INSI.js.map} +0 -0
  106. /package/dist/{chunk-OMQC4NWX.js.map → chunk-GCRXO43T.js.map} +0 -0
  107. /package/dist/{chunk-U36QOTW3.js.map → chunk-HCTKX472.js.map} +0 -0
  108. /package/dist/{chunk-2UEI7ZZ5.js.map → chunk-HT7QZ3JB.js.map} +0 -0
  109. /package/dist/{chunk-4X3HAJWZ.js.map → chunk-IKGAI6ES.js.map} +0 -0
  110. /package/dist/{chunk-GIW4L5PI.js.map → chunk-INVGMQKJ.js.map} +0 -0
  111. /package/dist/{chunk-STKHXNVO.js.map → chunk-ML7FSBBM.js.map} +0 -0
  112. /package/dist/{chunk-CHYLIBKP.js.map → chunk-OHI6P6GE.js.map} +0 -0
  113. /package/dist/{chunk-2SFOJPJH.js.map → chunk-PYTN5UNL.js.map} +0 -0
  114. /package/dist/{chunk-6KIQF3UT.js.map → chunk-RRZOCS22.js.map} +0 -0
  115. /package/dist/{chunk-UL2JGKCQ.js.map → chunk-VPRBPMVL.js.map} +0 -0
  116. /package/dist/{chunk-AZPPUDUR.js.map → chunk-YHW6FXKC.js.map} +0 -0
  117. /package/dist/{chunk-PO2CMGVP.js.map → chunk-YI6DZGN6.js.map} +0 -0
  118. /package/dist/{cli-circuit-breaker-KAOHEKYP.js.map → cli-circuit-breaker-HV7WXCVP.js.map} +0 -0
  119. /package/dist/{cli-readiness-X7O3LCWW.js.map → cli-readiness-N4WWAROI.js.map} +0 -0
  120. /package/dist/{cli-server-gateway-P4F66L2K.js.map → cli-server-gateway-5N7MHUO6.js.map} +0 -0
  121. /package/dist/{composite-router-4QGXSANU.js.map → composite-router-TXGVXX56.js.map} +0 -0
  122. /package/dist/{consensus-vote-ZCZJT3HS.js.map → consensus-vote-BYEM44JH.js.map} +0 -0
  123. /package/dist/{context-retriever-2XMORQMD.js.map → context-retriever-NT2DYPFG.js.map} +0 -0
  124. /package/dist/{doctor-deep-RLYWXUJX.js.map → doctor-deep-RUWHL6R5.js.map} +0 -0
  125. /package/dist/{doctor-gateway-report-AKE3S2UH.js.map → doctor-gateway-report-BBMWMMVQ.js.map} +0 -0
  126. /package/dist/{expert-bridge-2TNU6HKC.js.map → expert-bridge-V2R5PAXS.js.map} +0 -0
  127. /package/dist/{factory-5UWGAQOB.js.map → factory-3PBQNM44.js.map} +0 -0
  128. /package/dist/{factory-UCKSPZ5G.js.map → factory-YZILOS2Z.js.map} +0 -0
  129. /package/dist/{improvement-review-PHNGPUYO.js.map → gemini-adapter-IZ3TS6KZ.js.map} +0 -0
  130. /package/dist/{issue-triage-DO6ATHBV.js.map → improvement-review-N6W2FWFO.js.map} +0 -0
  131. /package/dist/{init-opencode-CII5S6XH.js.map → init-opencode-PLMPOB55.js.map} +0 -0
  132. /package/dist/{model-config-helpers-3U6IEHM6.js.map → issue-triage-W5XKE324.js.map} +0 -0
  133. /package/dist/{openai-compat-adapter-7G6JYZLY.js.map → model-config-helpers-5DTFDWYR.js.map} +0 -0
  134. /package/dist/{pr-reviewer-helpers-JSLG5YYG.js.map → openai-compat-adapter-4VREPXZT.js.map} +0 -0
  135. /package/dist/{repo-security-plan-DLROWMDR.js.map → pr-reviewer-helpers-RAPVW52Y.js.map} +0 -0
  136. /package/dist/{registry-command-X5NLFI3D.js.map → registry-command-3XWS7G6F.js.map} +0 -0
  137. /package/dist/{research-helpers-synthesize-NE3I56IC.js.map → repo-security-plan-BITATHGO.js.map} +0 -0
  138. /package/dist/{routing-memory-YFSHH2AN.js.map → research-helpers-synthesize-FW47ZIMK.js.map} +0 -0
  139. /package/dist/{session-memory-ZE2FUHO3.js.map → routing-memory-POESZPDJ.js.map} +0 -0
  140. /package/dist/{setup-config-SFNU2QL4.js.map → session-memory-TBBFP3XP.js.map} +0 -0
  141. /package/dist/{tool-memory-Z3X6EFMS.js.map → setup-config-AKFLKDMP.js.map} +0 -0
  142. /package/dist/{setup-custom-api-JBCH5YAW.js.map → setup-custom-api-WQMO2OV7.js.map} +0 -0
  143. /package/dist/{unified-registry-2YSSICSB.js.map → tool-memory-RLCP6WVV.js.map} +0 -0
  144. /package/dist/{weather-report-YSGMEYVV.js.map → unified-registry-MIANRTCJ.js.map} +0 -0
@@ -3,95 +3,6 @@ import {
3
3
  SARIF_LEVEL_MAP,
4
4
  SEVERITY_ORDER
5
5
  } from "./chunk-Z2AAMUNG.js";
6
- import {
7
- normalizeTopicToCanonical,
8
- synthesizeResearch
9
- } from "./chunk-6WCFWNIR.js";
10
- import {
11
- IssueTriage,
12
- createAuditTrail,
13
- createDurableAuditSink,
14
- createDurableAuditTrail,
15
- createGraphAuditBridge,
16
- emitPipelinePolicyEvent,
17
- readActionRefusal
18
- } from "./chunk-CHYLIBKP.js";
19
- import {
20
- sanitizeInput
21
- } from "./chunk-U44OI6Z5.js";
22
- import {
23
- withPrerequisite
24
- } from "./chunk-UL2JGKCQ.js";
25
- import {
26
- generateSecurityPlan
27
- } from "./chunk-PX7KZWZT.js";
28
- import {
29
- analyzeGitHubRepo
30
- } from "./chunk-4GDMHCKX.js";
31
- import {
32
- CodebaseIndex,
33
- DEFAULT_INDEX_MAX_DEPTH,
34
- MAX_INDEX_MAX_DEPTH,
35
- extractSymbolIndexResult,
36
- extractSymbols,
37
- findSourceFiles
38
- } from "./chunk-I2THTVA4.js";
39
- import {
40
- IDENTIFIER_RE,
41
- LANG_VALUES,
42
- addResearchPaper,
43
- addSourceToRegistry,
44
- computeSourceQualityScore,
45
- createResearchIssue,
46
- discoverArxiv,
47
- discoverDeepMind,
48
- discoverGitHubRepos,
49
- discoverGoogleAI,
50
- discoverMetaFAIR,
51
- discoverMicrosoftResearch,
52
- discoverOpenAlex,
53
- discoverPapersWithCode,
54
- discoverSemanticScholar,
55
- fetchSource,
56
- findOverlaps,
57
- findUsagesInSource,
58
- formatResearchIssueBody,
59
- generateStatsJson,
60
- getContextForTask,
61
- getContextPromptPrefix,
62
- getResearchInsightsForTask,
63
- getResearchStatus,
64
- inferLang,
65
- inferTaskCategory,
66
- langToNapi,
67
- paperExists,
68
- parseRegistry,
69
- sourceExistsInRegistry,
70
- summarizeContextForPrompt
71
- } from "./chunk-JLJVZP7U.js";
72
- import {
73
- REGISTRY_PATH,
74
- getProjectRoot,
75
- loadPapersRegistry,
76
- loadTechniquesRegistry,
77
- resolveRegistryRoot
78
- } from "./chunk-RWBF3Y4A.js";
79
- import {
80
- getTokenEnvVars,
81
- resolveToken
82
- } from "./chunk-45G5ZV3K.js";
83
- import {
84
- BUILT_IN_EXPERTS,
85
- BuiltInExpertTypeSchema,
86
- ExpertConfigSchema,
87
- getSecurityKnowledgePrompt
88
- } from "./chunk-TDTCWDZR.js";
89
- import {
90
- initDataDirectories
91
- } from "./chunk-MZWHXERV.js";
92
- import {
93
- executeExpert
94
- } from "./chunk-U36QOTW3.js";
95
6
  import {
96
7
  CONTRARIAN_PROPOSAL_BUDGET,
97
8
  JobStatusSchema,
@@ -128,6 +39,7 @@ import {
128
39
  listJobsWithDiagnostics,
129
40
  listTaskStateIds,
130
41
  modeEnumErrorNamingDispatch,
42
+ planFailureEvidenceFromTaskState,
131
43
  readJobResult,
132
44
  readTaskState,
133
45
  recordCompletedVote,
@@ -149,11 +61,30 @@ import {
149
61
  updateStage,
150
62
  withFileLock,
151
63
  writeJobCancelled
152
- } from "./chunk-3QBKZZKE.js";
64
+ } from "./chunk-U4GRHZRQ.js";
153
65
  import {
154
66
  allOf,
155
67
  anyOf
156
68
  } from "./chunk-EZNIYU5T.js";
69
+ import {
70
+ normalizeTopicToCanonical,
71
+ synthesizeResearch
72
+ } from "./chunk-FOJ2INSI.js";
73
+ import {
74
+ IssueTriage,
75
+ createAuditTrail,
76
+ createDurableAuditSink,
77
+ createDurableAuditTrail,
78
+ createGraphAuditBridge,
79
+ emitPipelinePolicyEvent,
80
+ readActionRefusal
81
+ } from "./chunk-OHI6P6GE.js";
82
+ import {
83
+ sanitizeInput
84
+ } from "./chunk-U44OI6Z5.js";
85
+ import {
86
+ withPrerequisite
87
+ } from "./chunk-VPRBPMVL.js";
157
88
  import {
158
89
  NOOP_NOTIFIER,
159
90
  RateLimiter,
@@ -185,7 +116,65 @@ import {
185
116
  toolSuccess,
186
117
  withProgressHeartbeat,
187
118
  wrapToolWithTimeout
188
- } from "./chunk-7GTIW25A.js";
119
+ } from "./chunk-IHGMXLLO.js";
120
+ import {
121
+ generateSecurityPlan
122
+ } from "./chunk-PX7KZWZT.js";
123
+ import {
124
+ analyzeGitHubRepo
125
+ } from "./chunk-4GDMHCKX.js";
126
+ import {
127
+ CodebaseIndex,
128
+ DEFAULT_INDEX_MAX_DEPTH,
129
+ MAX_INDEX_MAX_DEPTH,
130
+ extractSymbolIndexResult,
131
+ extractSymbols,
132
+ findSourceFiles
133
+ } from "./chunk-I2THTVA4.js";
134
+ import {
135
+ IDENTIFIER_RE,
136
+ LANG_VALUES,
137
+ addResearchPaper,
138
+ addSourceToRegistry,
139
+ computeSourceQualityScore,
140
+ createResearchIssue,
141
+ discoverArxiv,
142
+ discoverDeepMind,
143
+ discoverGitHubRepos,
144
+ discoverGoogleAI,
145
+ discoverMetaFAIR,
146
+ discoverMicrosoftResearch,
147
+ discoverOpenAlex,
148
+ discoverPapersWithCode,
149
+ discoverSemanticScholar,
150
+ fetchSource,
151
+ findOverlaps,
152
+ findUsagesInSource,
153
+ formatResearchIssueBody,
154
+ generateStatsJson,
155
+ getContextForTask,
156
+ getContextPromptPrefix,
157
+ getResearchInsightsForTask,
158
+ getResearchStatus,
159
+ inferLang,
160
+ inferTaskCategory,
161
+ langToNapi,
162
+ paperExists,
163
+ parseRegistry,
164
+ sourceExistsInRegistry,
165
+ summarizeContextForPrompt
166
+ } from "./chunk-4NNCB7O2.js";
167
+ import {
168
+ REGISTRY_PATH,
169
+ getProjectRoot,
170
+ loadPapersRegistry,
171
+ loadTechniquesRegistry,
172
+ resolveRegistryRoot
173
+ } from "./chunk-7HI6EWY5.js";
174
+ import {
175
+ getTokenEnvVars,
176
+ resolveToken
177
+ } from "./chunk-7Y6SB623.js";
189
178
  import {
190
179
  DEFAULT_RELEVANCE_CONFIG,
191
180
  MemoryImportance,
@@ -193,13 +182,31 @@ import {
193
182
  calculateTextJaccardSimilarity,
194
183
  getToolMemory,
195
184
  memoryTrustTierTag
196
- } from "./chunk-UMG4PRKT.js";
185
+ } from "./chunk-4HOSKAB3.js";
197
186
  import {
198
187
  EXTERNAL_CONTENT_TRUST_TIER,
199
188
  resolveContentTrustProvenance,
200
189
  resolveContentTrustTier,
201
190
  toContentTrustProvenanceRecord
202
191
  } from "./chunk-ZO6ZKR7L.js";
192
+ import {
193
+ createSessionMemory
194
+ } from "./chunk-YI6DZGN6.js";
195
+ import {
196
+ TrustTierSchema
197
+ } from "./chunk-CJKHQ6MV.js";
198
+ import {
199
+ BUILT_IN_EXPERTS,
200
+ BuiltInExpertTypeSchema,
201
+ ExpertConfigSchema,
202
+ getSecurityKnowledgePrompt
203
+ } from "./chunk-TDTCWDZR.js";
204
+ import {
205
+ initDataDirectories
206
+ } from "./chunk-MZWHXERV.js";
207
+ import {
208
+ executeExpert
209
+ } from "./chunk-HCTKX472.js";
203
210
  import {
204
211
  BWRAP_READ_ONLY_ARGS,
205
212
  CliDetectionCache,
@@ -211,7 +218,7 @@ import {
211
218
  getAvailableClis,
212
219
  getGlobalEventBus,
213
220
  getGlobalRegistry
214
- } from "./chunk-GP2O652R.js";
221
+ } from "./chunk-JMKK6UBR.js";
215
222
  import {
216
223
  DEFAULTS
217
224
  } from "./chunk-7KBE5M6C.js";
@@ -228,7 +235,7 @@ import {
228
235
  getAvailabilityCache,
229
236
  getCliForModelId,
230
237
  resolveFallback
231
- } from "./chunk-STKHXNVO.js";
238
+ } from "./chunk-ML7FSBBM.js";
232
239
  import {
233
240
  BaseAdapter,
234
241
  createStream,
@@ -236,13 +243,7 @@ import {
236
243
  parseGatewayExtraHeaders,
237
244
  requireApiKey,
238
245
  validateApiKeyPresence
239
- } from "./chunk-6A6YA4C4.js";
240
- import {
241
- createSessionMemory
242
- } from "./chunk-PO2CMGVP.js";
243
- import {
244
- TrustTierSchema
245
- } from "./chunk-CJKHQ6MV.js";
246
+ } from "./chunk-BVUPPTAD.js";
246
247
  import {
247
248
  getMemoryRegistry
248
249
  } from "./chunk-ROYGBFVE.js";
@@ -252,18 +253,18 @@ import {
252
253
  terminateProcessTree,
253
254
  trackProcessTree,
254
255
  withTimeout
255
- } from "./chunk-MFBTGXR6.js";
256
+ } from "./chunk-3QKRY72I.js";
256
257
  import {
257
258
  generateHyphenId,
258
259
  generateUUID
259
- } from "./chunk-GIW4L5PI.js";
260
+ } from "./chunk-INVGMQKJ.js";
260
261
  import {
261
262
  getDefaultCliCircuitBreakerRegistry
262
- } from "./chunk-OMQC4NWX.js";
263
+ } from "./chunk-GCRXO43T.js";
263
264
  import {
264
265
  sanitizeErrorDetails,
265
266
  sanitizeOutput
266
- } from "./chunk-O3FMPRQH.js";
267
+ } from "./chunk-VVDPRJU7.js";
267
268
  import {
268
269
  ARCHITECTURE_KEYWORDS,
269
270
  AUTHORITY_TIERS,
@@ -281,6 +282,8 @@ import {
281
282
  LinUCBBandit,
282
283
  MODELSDEV_CATALOGUE_CAVEATS,
283
284
  ModelCapability,
285
+ ModelError,
286
+ ModelToCliAdapter,
284
287
  NEUTRAL_BANDIT_FEATURE,
285
288
  NexusError,
286
289
  ObservedAttemptUsageSchema,
@@ -324,6 +327,7 @@ import {
324
327
  formatZodError,
325
328
  formatZodIssuesAsArray,
326
329
  gatewayEndpointRejection,
330
+ gatewayServedSlotOf,
327
331
  generateWeatherReport,
328
332
  getAdaptiveBonus,
329
333
  getDefaultAvailableModelsCache,
@@ -363,7 +367,7 @@ import {
363
367
  truncateText,
364
368
  truncateWithInfo,
365
369
  withStep
366
- } from "./chunk-ZYZIRL4X.js";
370
+ } from "./chunk-OMWOFIK5.js";
367
371
  import {
368
372
  SUPPORTED_EXTENSIONS
369
373
  } from "./chunk-XBEKMUTO.js";
@@ -373,18 +377,19 @@ import {
373
377
  findCanonicalModel,
374
378
  getCliModelName,
375
379
  getDefaultModelForCli,
380
+ getDefaultModelForGoogleApi,
376
381
  getInTreeCapabilitiesMatrix,
377
382
  getModelContextWindow,
378
383
  lookupInTreeCapability,
379
384
  modelSupportsAll,
380
385
  resolveOwnerCli
381
- } from "./chunk-HWAJUCPO.js";
386
+ } from "./chunk-PHLASJD2.js";
382
387
  import {
383
388
  deriveEntry,
384
389
  getDefaultRegistry,
385
390
  resolveModelIdentity,
386
391
  resolveModelIdentitySync
387
- } from "./chunk-2URHVZJR.js";
392
+ } from "./chunk-4MKZAA6W.js";
388
393
  import {
389
394
  ensureLearningDir,
390
395
  getMetaOutcomesFile,
@@ -30948,7 +30953,7 @@ function execIdFields(executionId) {
30948
30953
  async function populateUnifiedContextOnState(state, options) {
30949
30954
  const taskCandidate = state["task"];
30950
30955
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
30951
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-2XMORQMD.js");
30956
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-NT2DYPFG.js");
30952
30957
  const category = inferTaskCategory2(taskCandidate);
30953
30958
  const executionId = options?.executionId;
30954
30959
  const execFields = execIdFields(executionId);
@@ -36186,13 +36191,17 @@ async function callLlm(adapter, prompt, signal) {
36186
36191
  maxTokens: SYNTHESIS_MAX_TOKENS,
36187
36192
  ...signal !== void 0 ? { signal } : {}
36188
36193
  });
36189
- if (!response.ok) return null;
36190
- return extractTextFromBlocks(response.value.content);
36194
+ if (!response.ok) {
36195
+ if (response.error.context?.["operation"] === "orchestrate-call-budget" && response.error.context["attempted"] === false)
36196
+ return { attempted: false };
36197
+ return { attempted: true, text: null };
36198
+ }
36199
+ return { attempted: true, text: extractTextFromBlocks(response.value.content) };
36191
36200
  } catch (error) {
36192
36201
  logger30.debug("Synthesis LLM call failed", {
36193
36202
  error: error instanceof Error ? error.message : String(error)
36194
36203
  });
36195
- return null;
36204
+ return { attempted: true, text: null };
36196
36205
  }
36197
36206
  }
36198
36207
  function buildReimaginePr(input) {
@@ -36233,8 +36242,10 @@ async function synthesizeTier2(input, inputLength, patternKey, excludedWorkerCou
36233
36242
  const { results, conflicts, taskDescription, modelAdapter } = input;
36234
36243
  const tracker = getSynthesisHistoryTracker();
36235
36244
  const prompt = buildSynthesisPrompt({ results, conflicts, taskDescription });
36236
- const tier2Text = await callLlm(modelAdapter, prompt, input.signal);
36237
- if (isCancelled3(input.signal)) return mkFallback(results, conflicts, excludedWorkerCount);
36245
+ const attempt = await callLlm(modelAdapter, prompt, input.signal);
36246
+ if (isCancelled3(input.signal) || !attempt.attempted)
36247
+ return mkFallback(results, conflicts, excludedWorkerCount);
36248
+ const tier2Text = attempt.text;
36238
36249
  if (tier2Text === null) {
36239
36250
  tracker.record(patternKey, 2, false);
36240
36251
  logger30.warn("Synthesis LLM call failed, using fallback");
@@ -36255,8 +36266,10 @@ async function synthesizeTier3(input, inputLength, patternKey, excludedWorkerCou
36255
36266
  const { results, conflicts, taskDescription, modelAdapter } = input;
36256
36267
  const tracker = getSynthesisHistoryTracker();
36257
36268
  const reimaginePrompt = buildReimaginePr({ results, conflicts, taskDescription });
36258
- const tier3Text = await callLlm(modelAdapter, reimaginePrompt, input.signal);
36259
- if (isCancelled3(input.signal)) return mkFallback(results, conflicts, excludedWorkerCount);
36269
+ const attempt = await callLlm(modelAdapter, reimaginePrompt, input.signal);
36270
+ if (isCancelled3(input.signal) || !attempt.attempted)
36271
+ return mkFallback(results, conflicts, excludedWorkerCount);
36272
+ const tier3Text = attempt.text;
36260
36273
  if (tier3Text !== null && !isSynthesisLowQuality(tier3Text, inputLength)) {
36261
36274
  tracker.record(patternKey, 3, true);
36262
36275
  return { ok: true, value: tier3Text, synthesisSource: "reimagine", excludedWorkerCount };
@@ -36681,11 +36694,17 @@ function resolveWorkerAdapter(entry, fallback, fallbackCli, perWorkerRouting, lo
36681
36694
  const cliName = resolved.providerId;
36682
36695
  return { adapter: resolved, cliName };
36683
36696
  }
36697
+ function reserveWorkerCall(counter) {
36698
+ if (counter.attempts >= counter.maxCalls) return false;
36699
+ counter.attempts++;
36700
+ return true;
36701
+ }
36684
36702
  async function executeOnAdapter(opts) {
36685
36703
  const invocation = { attempts: 0 };
36686
36704
  const result = await completeOnAdapter(opts, () => {
36705
+ if (!reserveWorkerCall(opts.callCounter)) return false;
36687
36706
  invocation.attempts++;
36688
- opts.callCounter.attempts++;
36707
+ return true;
36689
36708
  });
36690
36709
  if (invocation.attempts === 0) return result;
36691
36710
  if (result.status === "success") return { ...result, accessMode: WORKER_ACCESS_MODE };
@@ -36724,7 +36743,7 @@ async function completeOnAdapter(opts, onAttempt) {
36724
36743
  };
36725
36744
  const { prompt, evidence } = prepared.value;
36726
36745
  try {
36727
- onAttempt();
36746
+ if (!onAttempt()) return exhaustedWorkerResult(opts, evidence);
36728
36747
  const result = await adapter.complete({
36729
36748
  messages: [{ role: "user", content: prompt }],
36730
36749
  maxTokens: WORKER_MAX_TOKENS,
@@ -36755,6 +36774,16 @@ async function completeOnAdapter(opts, onAttempt) {
36755
36774
  };
36756
36775
  }
36757
36776
  }
36777
+ function exhaustedWorkerResult(opts, evidence) {
36778
+ return {
36779
+ ...makeErrorResult(
36780
+ opts.entry,
36781
+ opts.workerStartMs,
36782
+ "Worker call budget exhausted before completion"
36783
+ ),
36784
+ promptEvidence: { ...evidence, rawInputCoverage: "UNSUPPORTED" }
36785
+ };
36786
+ }
36758
36787
  function deliveredWorkerOutput(content, evidence) {
36759
36788
  const text = content.filter((b) => b.type === "text").map((b) => b.text).join("\n");
36760
36789
  return evidence.rawInputCoverage === "PARTIAL" ? `[INLINE INPUT COVERAGE: PARTIAL; raw-byte QA unsupported; model inspection unmeasured]
@@ -36875,6 +36904,29 @@ function saveFailedCheckpoints(results, store) {
36875
36904
  store.save(`${r.role}:${r.subTask}`, createCheckpoint2(r.role, r.subTask, r.output));
36876
36905
  }
36877
36906
  }
36907
+ function synthesisAdapter(adapter, counter) {
36908
+ const listModels = adapter.listModels?.bind(adapter);
36909
+ return {
36910
+ providerId: adapter.providerId,
36911
+ modelId: adapter.modelId,
36912
+ capabilities: adapter.capabilities,
36913
+ complete: async (request) => {
36914
+ if (!reserveWorkerCall(counter)) {
36915
+ return err(
36916
+ new ModelError("Worker call budget exhausted before synthesis", {
36917
+ retryable: false,
36918
+ context: { operation: "orchestrate-call-budget", attempted: false }
36919
+ })
36920
+ );
36921
+ }
36922
+ return adapter.complete(request);
36923
+ },
36924
+ stream: (request) => adapter.stream(request),
36925
+ countTokens: (text) => adapter.countTokens(text),
36926
+ validateConfig: () => adapter.validateConfig(),
36927
+ ...listModels !== void 0 ? { listModels } : {}
36928
+ };
36929
+ }
36878
36930
  async function runSynthesisPhase(state, options, maxCalls) {
36879
36931
  if (options.synthesize !== true || state.totalModelCalls >= maxCalls) return;
36880
36932
  const successResults = state.results.filter((r) => r.status === "success");
@@ -36884,12 +36936,10 @@ async function runSynthesisPhase(state, options, maxCalls) {
36884
36936
  results: state.results,
36885
36937
  conflicts: [...detectConflicts(state.results)],
36886
36938
  taskDescription: options.taskDescription,
36887
- modelAdapter: options.modelAdapter,
36939
+ modelAdapter: synthesisAdapter(options.modelAdapter, state.callCounter),
36888
36940
  ...options.signal !== void 0 ? { signal: options.signal } : {}
36889
36941
  });
36890
- if (synthResult.ok && synthResult.synthesisSource !== "deterministic") {
36891
- state.totalModelCalls++;
36892
- }
36942
+ state.totalModelCalls = state.callCounter.attempts;
36893
36943
  if (!synthResult.ok) {
36894
36944
  options.logger.warn("Synthesis failed", { error: synthResult.error });
36895
36945
  return;
@@ -36934,7 +36984,6 @@ async function runRefinementPhase(state, entries, options, maxCalls) {
36934
36984
  remaining,
36935
36985
  checkpoints: checkpointCount
36936
36986
  });
36937
- const attemptsBeforeRefinement = state.callCounter.attempts;
36938
36987
  const executor = createWorkerExecutor({
36939
36988
  callCounter: state.callCounter,
36940
36989
  taskDescription: options.taskDescription,
@@ -36950,7 +36999,7 @@ async function runRefinementPhase(state, entries, options, maxCalls) {
36950
36999
  executionId: `refine-${Date.now().toString(36)}`,
36951
37000
  ...options.signal !== void 0 ? { signal: options.signal } : {}
36952
37001
  });
36953
- state.totalModelCalls += state.callCounter.attempts - attemptsBeforeRefinement;
37002
+ state.totalModelCalls = state.callCounter.attempts;
36954
37003
  state.results = mergeRefinedResults(state.results, refinedResults);
36955
37004
  return true;
36956
37005
  }
@@ -36971,7 +37020,7 @@ function prepareBudgetedEntries(plan, maxCalls, log) {
36971
37020
  });
36972
37021
  return entries;
36973
37022
  }
36974
- function createPinnedExecutorConfig(options, entries) {
37023
+ function createPinnedExecutorConfig(options, entries, maxCalls) {
36975
37024
  const { taskDescription, modelAdapter, logger: logger60 } = options;
36976
37025
  const resolvedAdapters = new Map(
36977
37026
  entries.map((entry) => [
@@ -36986,7 +37035,7 @@ function createPinnedExecutorConfig(options, entries) {
36986
37035
  ])
36987
37036
  );
36988
37037
  return {
36989
- callCounter: { attempts: 0 },
37038
+ callCounter: { attempts: 0, maxCalls },
36990
37039
  taskDescription,
36991
37040
  modelAdapter,
36992
37041
  logger: logger60,
@@ -36995,9 +37044,9 @@ function createPinnedExecutorConfig(options, entries) {
36995
37044
  ...options.perWorkerRouting !== void 0 ? { perWorkerRouting: options.perWorkerRouting } : {}
36996
37045
  };
36997
37046
  }
36998
- async function prepareDispatchPreflight(options) {
37047
+ async function prepareDispatchPreflight(options, maxCalls) {
36999
37048
  const entries = options.agentPlan.entries;
37000
- const pinnedConfig = createPinnedExecutorConfig(options, entries);
37049
+ const pinnedConfig = createPinnedExecutorConfig(options, entries, maxCalls);
37001
37050
  const unsupported = await preflightWorkerPrompts({
37002
37051
  entries,
37003
37052
  taskDescription: options.taskDescription,
@@ -37019,7 +37068,7 @@ async function executeWorkerDispatch(options) {
37019
37068
  const startMs = getTimeProvider().now();
37020
37069
  const entries = prepareBudgetedEntries(agentPlan, maxCalls, logger60);
37021
37070
  const qualityGate = options.qualityGate === false ? void 0 : options.qualityGate;
37022
- const { pinnedConfig, unsupported } = await prepareDispatchPreflight(options);
37071
+ const { pinnedConfig, unsupported } = await prepareDispatchPreflight(options, maxCalls);
37023
37072
  if (unsupported !== void 0) {
37024
37073
  return refusedInlineDispatch(entries, taskDescription, unsupported, startMs, logger60);
37025
37074
  }
@@ -38701,11 +38750,13 @@ var DEFAULT_CAPABILITIES2 = {
38701
38750
  function mapCompositeDecisionToOutput(decision, estimatedTokens) {
38702
38751
  const slot = routingArmCliSlot(decision.cliName);
38703
38752
  const endpoint = slot === void 0 && isEndpointArmId(decision.cliName);
38704
- const modelName = endpoint ? decision.adapter.getModelInfo().id : decision.model ?? (slot === void 0 ? decision.cliName : cliNameToModel(slot));
38705
- const caps = endpoint ? decision.adapter.capabilities : resolveCapabilityProfile(modelName) ?? DEFAULT_CAPABILITIES2;
38753
+ const gateway = gatewayServedSlotOf(decision.adapter);
38754
+ const adapterBound = endpoint || decision.adapter instanceof ModelToCliAdapter || gateway !== void 0;
38755
+ const modelName = adapterBound ? decision.adapter.getModelInfo().id : decision.model ?? (slot === void 0 ? decision.cliName : cliNameToModel(slot));
38756
+ const caps = adapterBound ? decision.adapter.capabilities : resolveCapabilityProfile(modelName) ?? DEFAULT_CAPABILITIES2;
38706
38757
  return {
38707
38758
  recommended_model: modelName,
38708
- reasoning: decision.reason,
38759
+ reasoning: describeGatewayCapabilityEvidence(decision),
38709
38760
  capabilities: caps,
38710
38761
  estimated_tokens: estimatedTokens,
38711
38762
  // A decision has only the winner's adapter. Endpoint alternatives cannot
@@ -38716,8 +38767,14 @@ function mapCompositeDecisionToOutput(decision, estimatedTokens) {
38716
38767
  }).slice(0, 3)
38717
38768
  };
38718
38769
  }
38770
+ function describeGatewayCapabilityEvidence(decision) {
38771
+ const served = gatewayServedSlotOf(decision.adapter);
38772
+ if (served === void 0 || lookupInTreeCapability(served.modelId)?.qualityScores !== void 0)
38773
+ return decision.reason;
38774
+ return `${decision.reason}; capabilities unmeasured \u2014 neutral bridge estimates shown`;
38775
+ }
38719
38776
  function describeAlternative(alt, slot, decision, bestCaps) {
38720
- const model = cliNameToModel(slot);
38777
+ const model = alt === "api:google" ? getDefaultModelForGoogleApi() : cliNameToModel(slot);
38721
38778
  const altCaps = resolveCapabilityProfile(model) ?? DEFAULT_CAPABILITIES2;
38722
38779
  const ranked = decision.alternativeScores?.get(alt);
38723
38780
  if (ranked !== void 0) {
@@ -45236,11 +45293,19 @@ function jobResultFromTaskState(state, jobId) {
45236
45293
  return reason !== void 0 ? { ...record, error: reason } : record;
45237
45294
  }
45238
45295
  if (status === "failed") {
45239
- const msg = lastBlockerMessage(state);
45240
- return msg !== void 0 ? { ...record, error: msg } : record;
45296
+ return failedRecordFromTaskState(state, record);
45241
45297
  }
45242
45298
  return record;
45243
45299
  }
45300
+ function failedRecordFromTaskState(state, record) {
45301
+ const msg = lastBlockerMessage(state);
45302
+ const failureEvidence = state.dispatch === "async" && state.taskId === record.jobId ? planFailureEvidenceFromTaskState(state.result, record.jobId, state.asyncDispatchId) : void 0;
45303
+ return {
45304
+ ...record,
45305
+ ...msg !== void 0 ? { error: msg } : {},
45306
+ ...failureEvidence !== void 0 ? { failureEvidence } : {}
45307
+ };
45308
+ }
45244
45309
  function readJobResultFromTaskState(jobId, customDir) {
45245
45310
  const stateResult = readTaskState(jobId, customDir);
45246
45311
  if (!stateResult.ok) return null;
@@ -45358,7 +45423,7 @@ function registerGetJobResultTool(server, deps) {
45358
45423
  'Job ID returned by any tool called with dispatch: "async" (e.g. orchestrate)'
45359
45424
  )
45360
45425
  };
45361
- const description = `Read the result of an async-mode tool invocation by jobId. Returns the structured record (status, result | error, timestamps, producerVersion) plus producerVersionMeasured \u2014 false when the producer was a dev build or the record predates the field, so its version must not be compared to this server's _meta build stamp \u2014 and producerVersionSource (sidecar | task_state; a task_state record never carries a version). A pending record may carry lastProgressAt, the job body's last heartbeat, so slow can be told from stuck (#6162). Poll until status !== "pending". Stage-1 of epic #2631 \u2014 Stage 2 will fold this into query_task_state once StructuredTaskState gains the result field.`;
45426
+ const description = `Read the result of an async-mode tool invocation by jobId. Returns the structured record (status, result | error, timestamps, producerVersion) plus producerVersionMeasured \u2014 false when the producer was a dev build or the record predates the field, so its version must not be compared to this server's _meta build stamp \u2014 and producerVersionSource (sidecar | task_state; a task_state record never carries a version). A pending record may carry lastProgressAt, the job body's last heartbeat, so slow can be told from stuck (#6162). Poll until status !== "pending". Failed development-plan jobs may carry failureEvidence (diagnostics, never approval or a resumable checkpoint). Each plan/proposal retains at most 32768 UTF-8 bytes. coverage is complete, redacted, truncated or invalid; redacted and truncated flags distinguish combined transformations. rawSha256 binds original bytes, sanitizedSha256 binds all delivery-sanitized bytes, and retainedSha256 binds returned text. Evidence is made stable under both leaf and serialized JSON redaction before hashing. For example, coverage=redacted with truncated=false means all sanitized text survived, but the raw artifact cannot be reconstructed. Absent evidence or proposal means unmeasured, not complete. Terminal task state takes precedence over the sidecar.`;
45362
45427
  const secureHandler = createSecureHandler(getJobResultHandler, {
45363
45428
  toolName: "get_job_result",
45364
45429
  rateLimiter: deps.rateLimiter,
@@ -47811,7 +47876,7 @@ async function tryIssueTriage(task) {
47811
47876
  try {
47812
47877
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
47813
47878
  if (issueMatch === null) return null;
47814
- const { createIssueTriage } = await import("./issue-triage-DO6ATHBV.js");
47879
+ const { createIssueTriage } = await import("./issue-triage-W5XKE324.js");
47815
47880
  const triage = createIssueTriage();
47816
47881
  const owner = issueMatch[1] ?? "";
47817
47882
  const num2 = issueMatch[2] ?? "";
@@ -47839,7 +47904,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
47839
47904
  ]);
47840
47905
  async function classifyWithLLM(task) {
47841
47906
  try {
47842
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-2TNU6HKC.js");
47907
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-V2R5PAXS.js");
47843
47908
  const prompt = [
47844
47909
  "Classify this task into exactly one pipeline template.",
47845
47910
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -48208,7 +48273,7 @@ function buildVotingInput(plan, config) {
48208
48273
  }
48209
48274
  async function executeSingleVote(plan, config, log) {
48210
48275
  try {
48211
- const { executeVoting } = await import("./consensus-vote-ZCZJT3HS.js");
48276
+ const { executeVoting } = await import("./consensus-vote-BYEM44JH.js");
48212
48277
  const input = buildVotingInput(plan, config);
48213
48278
  const result = await executeVoting(input, log);
48214
48279
  return parseVotingResult(result);
@@ -49381,6 +49446,7 @@ function buildPlanFailureResult(planResult) {
49381
49446
  }
49382
49447
  function planVoteEvidence(planResult) {
49383
49448
  return {
49449
+ ...planResult.planVoteProposal !== void 0 ? { planVoteProposal: planResult.planVoteProposal } : {},
49384
49450
  ...planResult.planVoteDecision !== void 0 ? { planVoteDecision: planResult.planVoteDecision } : {},
49385
49451
  ...planResult.planVoteReason !== void 0 ? { planVoteReason: planResult.planVoteReason } : {},
49386
49452
  ...planResult.planVoteApprovalPercentage !== void 0 ? { planVoteApprovalPercentage: planResult.planVoteApprovalPercentage } : {},
@@ -49676,7 +49742,10 @@ function buildApprovedPlanResult(plan, iterations, vote, sessionId) {
49676
49742
  };
49677
49743
  }
49678
49744
  function recordIdOf(vote) {
49679
- return vote?.voteRecordId !== void 0 ? { planVoteRecordId: vote.voteRecordId } : {};
49745
+ return {
49746
+ ...vote?.voteRecordId !== void 0 ? { planVoteRecordId: vote.voteRecordId } : {},
49747
+ ...vote?.kind !== "approved" && vote?.proposal !== void 0 ? { planVoteProposal: vote.proposal } : {}
49748
+ };
49680
49749
  }
49681
49750
  async function runPlanVote(plan, research, stages, iteration) {
49682
49751
  return withStep({ name: `vote (i=${String(iteration)})`, attrs: { iteration } }, async (ctx) => {
@@ -50036,7 +50105,7 @@ var memoryInitPromise = null;
50036
50105
  async function initPipelineMemory() {
50037
50106
  if (cachedMemory !== null) return cachedMemory;
50038
50107
  try {
50039
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-ZE2FUHO3.js");
50108
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-TBBFP3XP.js");
50040
50109
  const { getLearningDir } = await import("./learning-persistence-NW5AE222.js");
50041
50110
  const mem = createSessionMemory2(getLearningDir());
50042
50111
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -50098,7 +50167,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
50098
50167
  callRecord(routingMemoryCache);
50099
50168
  return;
50100
50169
  }
50101
- routingMemoryInitPromise ??= import("./routing-memory-YFSHH2AN.js").then(({ createRoutingMemory }) => {
50170
+ routingMemoryInitPromise ??= import("./routing-memory-POESZPDJ.js").then(({ createRoutingMemory }) => {
50102
50171
  routingMemoryCache ??= createRoutingMemory();
50103
50172
  return routingMemoryCache;
50104
50173
  }).catch((error) => {
@@ -50668,7 +50737,7 @@ async function prepareCompletePlanVote(plan, research, config, signal) {
50668
50737
  return { proposal, roleAdapters: panel.seats };
50669
50738
  }
50670
50739
  async function executePlanVote(plan, research, config, strategy, signal) {
50671
- const { executeVoting } = await import("./consensus-vote-ZCZJT3HS.js");
50740
+ const { executeVoting } = await import("./consensus-vote-BYEM44JH.js");
50672
50741
  const { proposal, roleAdapters } = await prepareCompletePlanVote(plan, research, config, signal);
50673
50742
  const votingResult = await executeVoting(
50674
50743
  {
@@ -50773,7 +50842,7 @@ function createVoteStage({ config, startStage }) {
50773
50842
  "Vote",
50774
50843
  `${label} (${String(Math.round(vote.approvalPercentage))}%, ${String(ms)}ms)`
50775
50844
  );
50776
- return vote;
50845
+ return vote.kind === "approved" ? vote : { ...vote, proposal };
50777
50846
  } catch (error) {
50778
50847
  return failClosedVote(config, start, error);
50779
50848
  }
@@ -52479,7 +52548,7 @@ ${text}` : "";
52479
52548
  }
52480
52549
  async function getWeatherContext() {
52481
52550
  try {
52482
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-YSGMEYVV.js");
52551
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-QB2TYTYU.js");
52483
52552
  const report = generateWeatherReport2({ includeAdaptive: true });
52484
52553
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
52485
52554
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -52497,7 +52566,7 @@ ${lines}
52497
52566
  }
52498
52567
  async function getMemoryContext(task) {
52499
52568
  try {
52500
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-ZE2FUHO3.js");
52569
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-TBBFP3XP.js");
52501
52570
  const { getLearningDir } = await import("./learning-persistence-NW5AE222.js");
52502
52571
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
52503
52572
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -53251,7 +53320,7 @@ async function searchCodebaseForTask(task) {
53251
53320
  }
53252
53321
  async function queryResearchRegistry(task) {
53253
53322
  try {
53254
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-NE3I56IC.js");
53323
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-FW47ZIMK.js");
53255
53324
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
53256
53325
  if (topic === void 0) return null;
53257
53326
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -53370,7 +53439,7 @@ function createScanStageWrapper() {
53370
53439
  try {
53371
53440
  const repo = await selectAuditRepository(ctx.task);
53372
53441
  if (!repo.ok) return failOutput(PIPELINE_STATE_KEYS.FINDINGS, repo.error, getTimeProvider().now() - start);
53373
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-DLROWMDR.js");
53442
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-BITATHGO.js");
53374
53443
  const plan = await generateSecurityPlan2({ repo: repo.value, maxScanners: 10 });
53375
53444
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
53376
53445
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -56660,6 +56729,7 @@ function buildStructuredOutput(result, simulated) {
56660
56729
  voteIterations: result.voteIterations,
56661
56730
  qaIterations: result.qaIterations,
56662
56731
  plan: result.plan,
56732
+ ...result.planVoteProposal !== void 0 ? { planVoteProposal: result.planVoteProposal } : {},
56663
56733
  tasks: result.tasks.map((t) => ({
56664
56734
  id: t.id,
56665
56735
  title: t.title,
@@ -56738,7 +56808,7 @@ var GitHubTaskTracker = class {
56738
56808
  cachedProvider = null;
56739
56809
  async getProvider() {
56740
56810
  if (this.cachedProvider !== null) return this.cachedProvider;
56741
- const { createScmProvider } = await import("./factory-5UWGAQOB.js");
56811
+ const { createScmProvider } = await import("./factory-YZILOS2Z.js");
56742
56812
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
56743
56813
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
56744
56814
  this.cachedProvider = result.value;
@@ -57857,7 +57927,7 @@ function withCatalogueCaveat(report) {
57857
57927
  var GATEWAY_TRANSPORT = "gateway";
57858
57928
  var GATEWAY_API_ARM = "api:custom-openai";
57859
57929
  async function gatewaySource(apiArm) {
57860
- const { discoverModels, readOpenAICompatEnv } = await import("./openai-compat-adapter-7G6JYZLY.js");
57930
+ const { discoverModels, readOpenAICompatEnv } = await import("./openai-compat-adapter-4VREPXZT.js");
57861
57931
  const config = readOpenAICompatEnv();
57862
57932
  if (config !== null) {
57863
57933
  return {
@@ -57876,7 +57946,7 @@ async function gatewaySource(apiArm) {
57876
57946
  }
57877
57947
  async function defaultSources(includeOpenRouter, adaptersFactory) {
57878
57948
  const adapters = new Map(
57879
- adaptersFactory !== void 0 ? adaptersFactory() : (await import("./factory-UCKSPZ5G.js")).createAllAdapters()
57949
+ adaptersFactory !== void 0 ? adaptersFactory() : (await import("./factory-3PBQNM44.js")).createAllAdapters()
57880
57950
  );
57881
57951
  const apiArm = adapters.get(GATEWAY_API_ARM);
57882
57952
  adapters.delete(GATEWAY_API_ARM);
@@ -61257,4 +61327,4 @@ export {
61257
61327
  initializeSandbox,
61258
61328
  getSandboxMode
61259
61329
  };
61260
- //# sourceMappingURL=chunk-UBK5LSLD.js.map
61330
+ //# sourceMappingURL=chunk-IJCEGKCM.js.map