nexus-agents 2.95.0 → 2.97.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.
- package/README.md +4 -4
- package/dist/{child-mcp-config-NW7JMSDK.js → child-mcp-config-WVPJIK2J.js} +2 -2
- package/dist/chunk-5LGAPYX7.js +2133 -0
- package/dist/chunk-5LGAPYX7.js.map +1 -0
- package/dist/{chunk-LXROEQAO.js → chunk-65LE457J.js} +2 -2
- package/dist/{chunk-47Z3YPOK.js → chunk-674NONPG.js} +2 -2
- package/dist/{chunk-2X24T4ZD.js → chunk-6IN4MKDA.js} +7 -7
- package/dist/{chunk-FYGZ4MEQ.js → chunk-76FTBRUS.js} +415 -1410
- package/dist/chunk-76FTBRUS.js.map +1 -0
- package/dist/{chunk-YYXJ6RTO.js → chunk-7BLBXITB.js} +3 -3
- package/dist/{chunk-GC5FH2IA.js → chunk-APLZRTYC.js} +7 -7
- package/dist/{chunk-TEKWQNQ2.js → chunk-D3OT7TOA.js} +3 -3
- package/dist/{chunk-3HXWI34V.js → chunk-E43RUPLP.js} +3 -3
- package/dist/{chunk-LZOTH2GI.js → chunk-EY7LL4F4.js} +2 -2
- package/dist/{chunk-5HBDXW44.js → chunk-FDTIRCSL.js} +2 -2
- package/dist/{chunk-VTMQND6B.js → chunk-GAIUXYF4.js} +366 -2470
- package/dist/chunk-GAIUXYF4.js.map +1 -0
- package/dist/{chunk-D3JSXVX3.js → chunk-GERVGPTF.js} +2 -2
- package/dist/{chunk-6IWPN5UB.js → chunk-HIWO2WWP.js} +2 -2
- package/dist/{chunk-WGA4VGIR.js → chunk-HWCMNFIS.js} +3 -3
- package/dist/{chunk-G42N55ZR.js → chunk-HZGHPBTV.js} +2 -2
- package/dist/{chunk-KHZGMF2W.js → chunk-IHKPGTF3.js} +4 -4
- package/dist/{chunk-ECBH5INZ.js → chunk-JTQLV374.js} +71 -6
- package/dist/chunk-JTQLV374.js.map +1 -0
- package/dist/{chunk-PFOY5ML6.js → chunk-JX6VL7JF.js} +3 -3
- package/dist/{chunk-4NVYN2MB.js → chunk-KKVH3PDK.js} +4 -4
- package/dist/{chunk-3H6Q3RZM.js → chunk-ML4IF3PS.js} +4 -4
- package/dist/{chunk-QUPPV6UO.js → chunk-N5656LE3.js} +2 -2
- package/dist/{chunk-FXVJLJUF.js → chunk-NTBVUWU4.js} +2 -2
- package/dist/{chunk-ZICVVBDW.js → chunk-OKRTOMKX.js} +2 -2
- package/dist/{chunk-Y3OOHHKQ.js → chunk-OSHCOBDK.js} +2 -2
- package/dist/chunk-P2BKWVKF.js +1095 -0
- package/dist/chunk-P2BKWVKF.js.map +1 -0
- package/dist/{chunk-FTDVA33Z.js → chunk-SAUBPHQ7.js} +4 -4
- package/dist/{chunk-55G7KQ7F.js → chunk-SWNOQW7Y.js} +5 -5
- package/dist/{chunk-O4LVC4MQ.js → chunk-SZNNT2DH.js} +2 -2
- package/dist/{chunk-ECZW5FXN.js → chunk-T5TYWM5S.js} +2 -2
- package/dist/{chunk-7GUP6KQQ.js → chunk-UNOOL6EN.js} +2 -2
- package/dist/{chunk-BSHDI4BH.js → chunk-WXDWDGVL.js} +2 -2
- package/dist/{cli-circuit-breaker-LNU5DQSB.js → cli-circuit-breaker-STKW4DTL.js} +4 -4
- package/dist/cli.js +149 -52
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-DJ54ND5X.js → composite-router-POFAM7T4.js} +2 -2
- package/dist/{consensus-vote-XLEQFVE7.js → consensus-vote-EQAYX53Z.js} +13 -12
- package/dist/{context-retriever-6O6TREXH.js → context-retriever-H22L3WFV.js} +6 -6
- package/dist/{doctor-deep-PSNJPELP.js → doctor-deep-HGAC6N5Y.js} +3 -3
- package/dist/{expert-bridge-Q3OWPD4L.js → expert-bridge-IAQPOJAQ.js} +4 -4
- package/dist/{factory-PSMTMC7V.js → factory-P2SQS7UM.js} +5 -5
- package/dist/{factory-43RVPRT5.js → factory-ZIZYUDKH.js} +5 -5
- package/dist/improvement-review-G2HAMGZP.js +27 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.js +52 -49
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-25AUARJH.js → init-opencode-RHCYZDZW.js} +5 -5
- package/dist/{issue-triage-KZTENUDH.js → issue-triage-VVNQIQW5.js} +5 -5
- package/dist/{pr-reviewer-helpers-XENJ4E2T.js → pr-reviewer-helpers-UN7RDPDN.js} +4 -4
- package/dist/{registry-command-X3O34FAK.js → registry-command-OVRRKYHO.js} +2 -2
- package/dist/{repo-security-plan-XCX7EFJR.js → repo-security-plan-X74TBYOV.js} +3 -3
- package/dist/{research-helpers-synthesize-CGVR6M4S.js → research-helpers-synthesize-OSP6FGNV.js} +3 -3
- package/dist/{routing-memory-YZRYGXQC.js → routing-memory-5T5QJF47.js} +2 -2
- package/dist/{session-memory-SXQAA2EN.js → session-memory-X7CJ6X4A.js} +3 -3
- package/dist/{setup-command-VG7JZI6O.js → setup-command-ZWJCGPJ5.js} +11 -11
- package/dist/{setup-config-VJAK6AA2.js → setup-config-YVIKUNOB.js} +3 -3
- package/dist/{setup-custom-api-KSF2JMTS.js → setup-custom-api-FLV4SELI.js} +4 -4
- package/dist/{tool-memory-L7SDFSF5.js → tool-memory-QNEAKRKV.js} +5 -5
- package/dist/{weather-report-D6HFOK7S.js → weather-report-SUVIXWKI.js} +2 -2
- package/dist/weather-report-SUVIXWKI.js.map +1 -0
- package/package.json +12 -2
- package/dist/chunk-ECBH5INZ.js.map +0 -1
- package/dist/chunk-FYGZ4MEQ.js.map +0 -1
- package/dist/chunk-VTMQND6B.js.map +0 -1
- /package/dist/{child-mcp-config-NW7JMSDK.js.map → child-mcp-config-WVPJIK2J.js.map} +0 -0
- /package/dist/{chunk-LXROEQAO.js.map → chunk-65LE457J.js.map} +0 -0
- /package/dist/{chunk-47Z3YPOK.js.map → chunk-674NONPG.js.map} +0 -0
- /package/dist/{chunk-2X24T4ZD.js.map → chunk-6IN4MKDA.js.map} +0 -0
- /package/dist/{chunk-YYXJ6RTO.js.map → chunk-7BLBXITB.js.map} +0 -0
- /package/dist/{chunk-GC5FH2IA.js.map → chunk-APLZRTYC.js.map} +0 -0
- /package/dist/{chunk-TEKWQNQ2.js.map → chunk-D3OT7TOA.js.map} +0 -0
- /package/dist/{chunk-3HXWI34V.js.map → chunk-E43RUPLP.js.map} +0 -0
- /package/dist/{chunk-LZOTH2GI.js.map → chunk-EY7LL4F4.js.map} +0 -0
- /package/dist/{chunk-5HBDXW44.js.map → chunk-FDTIRCSL.js.map} +0 -0
- /package/dist/{chunk-D3JSXVX3.js.map → chunk-GERVGPTF.js.map} +0 -0
- /package/dist/{chunk-6IWPN5UB.js.map → chunk-HIWO2WWP.js.map} +0 -0
- /package/dist/{chunk-WGA4VGIR.js.map → chunk-HWCMNFIS.js.map} +0 -0
- /package/dist/{chunk-G42N55ZR.js.map → chunk-HZGHPBTV.js.map} +0 -0
- /package/dist/{chunk-KHZGMF2W.js.map → chunk-IHKPGTF3.js.map} +0 -0
- /package/dist/{chunk-PFOY5ML6.js.map → chunk-JX6VL7JF.js.map} +0 -0
- /package/dist/{chunk-4NVYN2MB.js.map → chunk-KKVH3PDK.js.map} +0 -0
- /package/dist/{chunk-3H6Q3RZM.js.map → chunk-ML4IF3PS.js.map} +0 -0
- /package/dist/{chunk-QUPPV6UO.js.map → chunk-N5656LE3.js.map} +0 -0
- /package/dist/{chunk-FXVJLJUF.js.map → chunk-NTBVUWU4.js.map} +0 -0
- /package/dist/{chunk-ZICVVBDW.js.map → chunk-OKRTOMKX.js.map} +0 -0
- /package/dist/{chunk-Y3OOHHKQ.js.map → chunk-OSHCOBDK.js.map} +0 -0
- /package/dist/{chunk-FTDVA33Z.js.map → chunk-SAUBPHQ7.js.map} +0 -0
- /package/dist/{chunk-55G7KQ7F.js.map → chunk-SWNOQW7Y.js.map} +0 -0
- /package/dist/{chunk-O4LVC4MQ.js.map → chunk-SZNNT2DH.js.map} +0 -0
- /package/dist/{chunk-ECZW5FXN.js.map → chunk-T5TYWM5S.js.map} +0 -0
- /package/dist/{chunk-7GUP6KQQ.js.map → chunk-UNOOL6EN.js.map} +0 -0
- /package/dist/{chunk-BSHDI4BH.js.map → chunk-WXDWDGVL.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-LNU5DQSB.js.map → cli-circuit-breaker-STKW4DTL.js.map} +0 -0
- /package/dist/{composite-router-DJ54ND5X.js.map → composite-router-POFAM7T4.js.map} +0 -0
- /package/dist/{consensus-vote-XLEQFVE7.js.map → consensus-vote-EQAYX53Z.js.map} +0 -0
- /package/dist/{context-retriever-6O6TREXH.js.map → context-retriever-H22L3WFV.js.map} +0 -0
- /package/dist/{doctor-deep-PSNJPELP.js.map → doctor-deep-HGAC6N5Y.js.map} +0 -0
- /package/dist/{expert-bridge-Q3OWPD4L.js.map → expert-bridge-IAQPOJAQ.js.map} +0 -0
- /package/dist/{factory-43RVPRT5.js.map → factory-P2SQS7UM.js.map} +0 -0
- /package/dist/{factory-PSMTMC7V.js.map → factory-ZIZYUDKH.js.map} +0 -0
- /package/dist/{issue-triage-KZTENUDH.js.map → improvement-review-G2HAMGZP.js.map} +0 -0
- /package/dist/{init-opencode-25AUARJH.js.map → init-opencode-RHCYZDZW.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-XENJ4E2T.js.map → issue-triage-VVNQIQW5.js.map} +0 -0
- /package/dist/{repo-security-plan-XCX7EFJR.js.map → pr-reviewer-helpers-UN7RDPDN.js.map} +0 -0
- /package/dist/{registry-command-X3O34FAK.js.map → registry-command-OVRRKYHO.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-CGVR6M4S.js.map → repo-security-plan-X74TBYOV.js.map} +0 -0
- /package/dist/{routing-memory-YZRYGXQC.js.map → research-helpers-synthesize-OSP6FGNV.js.map} +0 -0
- /package/dist/{session-memory-SXQAA2EN.js.map → routing-memory-5T5QJF47.js.map} +0 -0
- /package/dist/{setup-command-VG7JZI6O.js.map → session-memory-X7CJ6X4A.js.map} +0 -0
- /package/dist/{setup-config-VJAK6AA2.js.map → setup-command-ZWJCGPJ5.js.map} +0 -0
- /package/dist/{tool-memory-L7SDFSF5.js.map → setup-config-YVIKUNOB.js.map} +0 -0
- /package/dist/{setup-custom-api-KSF2JMTS.js.map → setup-custom-api-FLV4SELI.js.map} +0 -0
- /package/dist/{weather-report-D6HFOK7S.js.map → tool-memory-QNEAKRKV.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -13,26 +13,25 @@ import {
|
|
|
13
13
|
generateSummary,
|
|
14
14
|
parseFindings,
|
|
15
15
|
sumFindings
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-7BLBXITB.js";
|
|
17
|
+
import "./chunk-OKRTOMKX.js";
|
|
18
18
|
import {
|
|
19
19
|
buildOpenAICompatAdapters,
|
|
20
20
|
loadUsageEvents,
|
|
21
21
|
readOpenAICompatEnv,
|
|
22
22
|
rollupByModel
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JX6VL7JF.js";
|
|
24
24
|
import {
|
|
25
25
|
setupCommandAsync,
|
|
26
26
|
verifyCommand
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-SWNOQW7Y.js";
|
|
28
|
+
import "./chunk-NTBVUWU4.js";
|
|
29
29
|
import {
|
|
30
30
|
AuthHandler,
|
|
31
31
|
DEFAULT_EXPERTS,
|
|
32
32
|
DEVELOPMENT_POLICY,
|
|
33
33
|
ExpertFactory,
|
|
34
34
|
FeedbackIntegration,
|
|
35
|
-
ImprovementReviewInputSchema,
|
|
36
35
|
Orchestrator,
|
|
37
36
|
OrchestratorFactory,
|
|
38
37
|
PaperStatusSchema,
|
|
@@ -44,7 +43,6 @@ import {
|
|
|
44
43
|
ValidationDashboard,
|
|
45
44
|
WorkflowDefinitionSchema,
|
|
46
45
|
analyzeTools,
|
|
47
|
-
calculateFitnessScore,
|
|
48
46
|
createAgentStages,
|
|
49
47
|
createAnnotationsProxy,
|
|
50
48
|
createAuditLogger,
|
|
@@ -53,7 +51,6 @@ import {
|
|
|
53
51
|
createDefaultPolicyEngine,
|
|
54
52
|
createEventBusBridge,
|
|
55
53
|
createFeedbackIntegration,
|
|
56
|
-
createFitnessScoreCalculator,
|
|
57
54
|
createGatewayServerProxy,
|
|
58
55
|
createLearnablePolicy,
|
|
59
56
|
createMockOrchestrator,
|
|
@@ -119,7 +116,6 @@ import {
|
|
|
119
116
|
registerExecuteSpecTool,
|
|
120
117
|
registerExtractSymbolsTool,
|
|
121
118
|
registerGetJobResultTool,
|
|
122
|
-
registerImprovementReviewTool,
|
|
123
119
|
registerIssueTriageTool,
|
|
124
120
|
registerListExpertsTool,
|
|
125
121
|
registerListJobsTool,
|
|
@@ -155,7 +151,6 @@ import {
|
|
|
155
151
|
registerWeatherReportTool,
|
|
156
152
|
resolveV2Config,
|
|
157
153
|
runDevPipeline,
|
|
158
|
-
runImprovementReview,
|
|
159
154
|
saveSourcesRegistry,
|
|
160
155
|
setGlobalToolRateLimiterFactory,
|
|
161
156
|
shutdownFailoverSignals,
|
|
@@ -168,64 +163,73 @@ import {
|
|
|
168
163
|
validateCommand,
|
|
169
164
|
validateWorkflow,
|
|
170
165
|
wrapInMarkdownFence
|
|
171
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-76FTBRUS.js";
|
|
167
|
+
import "./chunk-3ACDP4E6.js";
|
|
172
168
|
import {
|
|
173
169
|
resolveToken
|
|
174
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-FDTIRCSL.js";
|
|
175
171
|
import {
|
|
176
172
|
CATEGORY_DISPLAY_NAMES,
|
|
177
173
|
DEFAULT_PR_REVIEW_CONFIG
|
|
178
174
|
} from "./chunk-OK6U5N5Y.js";
|
|
179
|
-
import "./chunk-
|
|
180
|
-
import "./chunk-
|
|
175
|
+
import "./chunk-HWCMNFIS.js";
|
|
176
|
+
import "./chunk-E43RUPLP.js";
|
|
181
177
|
import {
|
|
182
178
|
shutdownExpertBridge
|
|
183
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-6IN4MKDA.js";
|
|
184
180
|
import {
|
|
185
181
|
DEFAULT_VOTE_TIMEOUT_MS,
|
|
186
182
|
ErrorPolicySchema,
|
|
187
183
|
VOTER_ROLES,
|
|
188
184
|
VoteThresholdSchema,
|
|
189
|
-
createDefaultPolicyFirewall,
|
|
190
|
-
createSecureHandler,
|
|
191
185
|
createUnifiedRegistry,
|
|
192
186
|
executeVoting,
|
|
193
|
-
getToolAnnotations,
|
|
194
|
-
getToolTimeout,
|
|
195
187
|
registerConsensusVoteTool,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
wrapToolWithTimeout
|
|
201
|
-
} from "./chunk-VTMQND6B.js";
|
|
202
|
-
import "./chunk-D3JSXVX3.js";
|
|
203
|
-
import "./chunk-LXROEQAO.js";
|
|
188
|
+
warnIfSimulatedOutsideTests
|
|
189
|
+
} from "./chunk-GAIUXYF4.js";
|
|
190
|
+
import "./chunk-GERVGPTF.js";
|
|
191
|
+
import "./chunk-65LE457J.js";
|
|
204
192
|
import {
|
|
205
193
|
loadPapersRegistry,
|
|
206
194
|
loadTechniquesRegistry,
|
|
207
195
|
savePapersRegistry,
|
|
208
196
|
synthesizeResearch
|
|
209
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-T5TYWM5S.js";
|
|
210
198
|
import {
|
|
211
199
|
classifyTrust,
|
|
212
200
|
createFullGitHubProvider,
|
|
213
201
|
evaluatePolicy,
|
|
214
202
|
parsePRUrl
|
|
215
|
-
} from "./chunk-
|
|
216
|
-
import "./chunk-
|
|
203
|
+
} from "./chunk-KKVH3PDK.js";
|
|
204
|
+
import "./chunk-EY7LL4F4.js";
|
|
217
205
|
import {
|
|
218
206
|
ReputationCache,
|
|
219
207
|
sanitizeInput
|
|
220
|
-
} from "./chunk-
|
|
221
|
-
import
|
|
208
|
+
} from "./chunk-SZNNT2DH.js";
|
|
209
|
+
import {
|
|
210
|
+
ImprovementReviewInputSchema,
|
|
211
|
+
calculateFitnessScore,
|
|
212
|
+
createFitnessScoreCalculator,
|
|
213
|
+
registerImprovementReviewTool,
|
|
214
|
+
runImprovementReview
|
|
215
|
+
} from "./chunk-P2BKWVKF.js";
|
|
216
|
+
import {
|
|
217
|
+
createDefaultPolicyFirewall,
|
|
218
|
+
createSecureHandler,
|
|
219
|
+
getToolAnnotations,
|
|
220
|
+
getToolTimeout,
|
|
221
|
+
toSdkCallback,
|
|
222
|
+
toolStructuredError,
|
|
223
|
+
toolSuccessStructured,
|
|
224
|
+
wrapToolWithTimeout
|
|
225
|
+
} from "./chunk-5LGAPYX7.js";
|
|
226
|
+
import "./chunk-WXDWDGVL.js";
|
|
222
227
|
import "./chunk-HFOQKCD2.js";
|
|
223
|
-
import "./chunk-
|
|
224
|
-
import "./chunk-TEKWQNQ2.js";
|
|
228
|
+
import "./chunk-D3OT7TOA.js";
|
|
225
229
|
import {
|
|
226
230
|
MemoryError,
|
|
227
231
|
shutdownToolMemory
|
|
228
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-IHKPGTF3.js";
|
|
229
233
|
import {
|
|
230
234
|
CustomExpertDefinitionSchema,
|
|
231
235
|
DATA_SUBDIRECTORIES,
|
|
@@ -244,12 +248,12 @@ import {
|
|
|
244
248
|
loadConfig,
|
|
245
249
|
runDoctor,
|
|
246
250
|
validateNexusEnv
|
|
247
|
-
} from "./chunk-
|
|
248
|
-
import "./chunk-
|
|
249
|
-
import "./chunk-
|
|
251
|
+
} from "./chunk-APLZRTYC.js";
|
|
252
|
+
import "./chunk-N5656LE3.js";
|
|
253
|
+
import "./chunk-OSHCOBDK.js";
|
|
250
254
|
import {
|
|
251
255
|
DEFAULTS
|
|
252
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-UNOOL6EN.js";
|
|
253
257
|
import "./chunk-NUBSJGQZ.js";
|
|
254
258
|
import {
|
|
255
259
|
capitalize,
|
|
@@ -261,12 +265,12 @@ import {
|
|
|
261
265
|
getAvailableClis,
|
|
262
266
|
isRecord,
|
|
263
267
|
probeAllClis
|
|
264
|
-
} from "./chunk-
|
|
265
|
-
import "./chunk-
|
|
266
|
-
import "./chunk-
|
|
268
|
+
} from "./chunk-ML4IF3PS.js";
|
|
269
|
+
import "./chunk-674NONPG.js";
|
|
270
|
+
import "./chunk-HZGHPBTV.js";
|
|
267
271
|
import "./chunk-ZM4O442V.js";
|
|
268
272
|
import "./chunk-PQHVC4BD.js";
|
|
269
|
-
import "./chunk-
|
|
273
|
+
import "./chunk-HIWO2WWP.js";
|
|
270
274
|
import {
|
|
271
275
|
API_TIMEOUTS,
|
|
272
276
|
AgentCapability,
|
|
@@ -323,6 +327,7 @@ import {
|
|
|
323
327
|
lookupInTreeCapability,
|
|
324
328
|
ok,
|
|
325
329
|
parseBoolEnv,
|
|
330
|
+
parseIntEnv,
|
|
326
331
|
parseTierOverrides,
|
|
327
332
|
resetOutcomeStore,
|
|
328
333
|
runWarmUp,
|
|
@@ -336,7 +341,7 @@ import {
|
|
|
336
341
|
validateTimeout,
|
|
337
342
|
writeEmptyLine,
|
|
338
343
|
writeLine
|
|
339
|
-
} from "./chunk-
|
|
344
|
+
} from "./chunk-JTQLV374.js";
|
|
340
345
|
import {
|
|
341
346
|
applyPortableMode,
|
|
342
347
|
detectSandbox,
|
|
@@ -3115,7 +3120,7 @@ ${file.patch}
|
|
|
3115
3120
|
violations: policyResult.violations
|
|
3116
3121
|
});
|
|
3117
3122
|
}
|
|
3118
|
-
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-
|
|
3123
|
+
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-UN7RDPDN.js");
|
|
3119
3124
|
const body = formatReviewComment2(result);
|
|
3120
3125
|
const postResult = await provider.createReview(pr.prNumber, body, result.decision);
|
|
3121
3126
|
if (!postResult.ok) {
|
|
@@ -17542,7 +17547,7 @@ function createTuneStage(bus, options = {}) {
|
|
|
17542
17547
|
var cachedTuneUnsubscribe = null;
|
|
17543
17548
|
function startTuneStage(bus, options) {
|
|
17544
17549
|
if (cachedTuneUnsubscribe !== null) return;
|
|
17545
|
-
const enabled = options?.enabled ?? parseBoolEnv(TUNE_ENFORCE_ENV,
|
|
17550
|
+
const enabled = options?.enabled ?? parseBoolEnv(TUNE_ENFORCE_ENV, true);
|
|
17546
17551
|
cachedTuneUnsubscribe = createTuneStage(bus, { ...options, enabled });
|
|
17547
17552
|
}
|
|
17548
17553
|
function shutdownTuneStage() {
|
|
@@ -17552,6 +17557,51 @@ function shutdownTuneStage() {
|
|
|
17552
17557
|
}
|
|
17553
17558
|
}
|
|
17554
17559
|
|
|
17560
|
+
// src/mcp/tools/improvement-review-scheduler.ts
|
|
17561
|
+
var defaultLogger2 = createLogger({ component: "ImprovementReviewScheduler" });
|
|
17562
|
+
var INTERVAL_ENV = "NEXUS_IMPROVEMENT_REVIEW_INTERVAL_MS";
|
|
17563
|
+
var FILE_ISSUES_ENV = "NEXUS_IMPROVEMENT_REVIEW_FILE_ISSUES";
|
|
17564
|
+
var schedulerTimer;
|
|
17565
|
+
function startImprovementReviewScheduler(options) {
|
|
17566
|
+
if (schedulerTimer !== void 0) return;
|
|
17567
|
+
const logger18 = options?.logger ?? defaultLogger2;
|
|
17568
|
+
const intervalMs = options?.intervalMs ?? parseIntEnv(INTERVAL_ENV, 0);
|
|
17569
|
+
if (intervalMs <= 0) return;
|
|
17570
|
+
const fileIssues = options?.fileIssues ?? parseBoolEnv(FILE_ISSUES_ENV, false);
|
|
17571
|
+
let running = false;
|
|
17572
|
+
const runOnce = async () => {
|
|
17573
|
+
try {
|
|
17574
|
+
const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-G2HAMGZP.js");
|
|
17575
|
+
const input = ImprovementReviewInputSchema2.parse({ fileIssues });
|
|
17576
|
+
const result = await runImprovementReview2(input, { logger: logger18 });
|
|
17577
|
+
logger18.info("Scheduled improvement_review complete", {
|
|
17578
|
+
signals: result.signals.length,
|
|
17579
|
+
issuesFiled: result.issuesFiled.length
|
|
17580
|
+
});
|
|
17581
|
+
} catch (error) {
|
|
17582
|
+
logger18.warn("Scheduled improvement_review failed", { error: getErrorMessage(error) });
|
|
17583
|
+
} finally {
|
|
17584
|
+
running = false;
|
|
17585
|
+
}
|
|
17586
|
+
};
|
|
17587
|
+
schedulerTimer = setInterval(() => {
|
|
17588
|
+
if (running) {
|
|
17589
|
+
logger18.debug("Scheduled improvement_review skipped \u2014 previous run still in progress");
|
|
17590
|
+
return;
|
|
17591
|
+
}
|
|
17592
|
+
running = true;
|
|
17593
|
+
void runOnce();
|
|
17594
|
+
}, intervalMs);
|
|
17595
|
+
schedulerTimer.unref();
|
|
17596
|
+
logger18.info("Scheduled improvement_review enabled", { intervalMs, fileIssues });
|
|
17597
|
+
}
|
|
17598
|
+
function shutdownImprovementReviewScheduler() {
|
|
17599
|
+
if (schedulerTimer !== void 0) {
|
|
17600
|
+
clearInterval(schedulerTimer);
|
|
17601
|
+
schedulerTimer = void 0;
|
|
17602
|
+
}
|
|
17603
|
+
}
|
|
17604
|
+
|
|
17555
17605
|
// src/mcp/gateway/upstream-client.ts
|
|
17556
17606
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
17557
17607
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
@@ -18080,6 +18130,7 @@ function initV2PipelineSubsystems(logger18, auditLogger) {
|
|
|
18080
18130
|
startTuneStage(pipelineEventBus, auditLogger !== void 0 ? { auditLogger } : void 0);
|
|
18081
18131
|
startSwarmHealthSignals(getSwarmObserver(), pipelineEventBus);
|
|
18082
18132
|
startFailoverSignals({ pipelineBus: pipelineEventBus });
|
|
18133
|
+
startImprovementReviewScheduler();
|
|
18083
18134
|
const policyEngine = createDefaultPolicyEngine();
|
|
18084
18135
|
const v2Config = resolveV2Config();
|
|
18085
18136
|
logger18.info("V2 Pipeline OS initialized", {
|
|
@@ -18140,6 +18191,50 @@ function registerMcpTools(options) {
|
|
|
18140
18191
|
// src/cli-server.ts
|
|
18141
18192
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
18142
18193
|
|
|
18194
|
+
// src/cli/version-check.ts
|
|
18195
|
+
import semver from "semver";
|
|
18196
|
+
var REGISTRY_LATEST_URL = "https://registry.npmjs.org/nexus-agents/latest";
|
|
18197
|
+
var DEFAULT_TIMEOUT_MS3 = 1500;
|
|
18198
|
+
var ENV_FLAG = "NEXUS_VERSION_CHECK";
|
|
18199
|
+
async function fetchLatestVersion(doFetch, timeoutMs) {
|
|
18200
|
+
try {
|
|
18201
|
+
const res = await doFetch(REGISTRY_LATEST_URL, { signal: AbortSignal.timeout(timeoutMs) });
|
|
18202
|
+
if (!res.ok) return null;
|
|
18203
|
+
const body = await res.json();
|
|
18204
|
+
const latest = typeof body.version === "string" ? body.version : null;
|
|
18205
|
+
return latest !== null && semver.valid(latest) !== null ? latest : null;
|
|
18206
|
+
} catch {
|
|
18207
|
+
return null;
|
|
18208
|
+
}
|
|
18209
|
+
}
|
|
18210
|
+
async function checkVersionDrift(options) {
|
|
18211
|
+
const current = options?.currentVersion ?? VERSION;
|
|
18212
|
+
if (semver.valid(current) === null) return null;
|
|
18213
|
+
const doFetch = options?.fetchImpl ?? globalThis.fetch;
|
|
18214
|
+
if (typeof doFetch !== "function") return null;
|
|
18215
|
+
const latest = await fetchLatestVersion(doFetch, options?.timeoutMs ?? DEFAULT_TIMEOUT_MS3);
|
|
18216
|
+
if (latest === null) return null;
|
|
18217
|
+
return { current, latest, stale: semver.lt(current, latest) };
|
|
18218
|
+
}
|
|
18219
|
+
async function warnIfVersionStale(logger18, options) {
|
|
18220
|
+
if (!parseBoolEnv(ENV_FLAG, true)) return;
|
|
18221
|
+
if (process.env["CI"] !== void 0 && process.env["CI"] !== "") return;
|
|
18222
|
+
try {
|
|
18223
|
+
const drift = await checkVersionDrift(options);
|
|
18224
|
+
if (drift?.stale === true) {
|
|
18225
|
+
logger18.warn(
|
|
18226
|
+
"nexus-agents is running a stale version \u2014 you may be serving old code (#3283)",
|
|
18227
|
+
{
|
|
18228
|
+
running: drift.current,
|
|
18229
|
+
latestPublished: drift.latest,
|
|
18230
|
+
fix: "npm i -g nexus-agents@latest, then restart the MCP server"
|
|
18231
|
+
}
|
|
18232
|
+
);
|
|
18233
|
+
}
|
|
18234
|
+
} catch {
|
|
18235
|
+
}
|
|
18236
|
+
}
|
|
18237
|
+
|
|
18143
18238
|
// src/cli-server-lifecycle.ts
|
|
18144
18239
|
function initializeSwarmObserver(logger18, options) {
|
|
18145
18240
|
const maxEvents = options?.maxEvents ?? 1e4;
|
|
@@ -19405,7 +19500,7 @@ function adaptConfigToLibrary(config) {
|
|
|
19405
19500
|
}
|
|
19406
19501
|
function createBeliefPromoter() {
|
|
19407
19502
|
return async (event) => {
|
|
19408
|
-
const { getToolMemory } = await import("./tool-memory-
|
|
19503
|
+
const { getToolMemory } = await import("./tool-memory-QNEAKRKV.js");
|
|
19409
19504
|
const tm = getToolMemory();
|
|
19410
19505
|
await tm.recordBelief(
|
|
19411
19506
|
`skill:${event.name}`,
|
|
@@ -19722,6 +19817,7 @@ function createShutdownCleanup(options) {
|
|
|
19722
19817
|
shutdownTuneStage();
|
|
19723
19818
|
shutdownSwarmHealthSignals();
|
|
19724
19819
|
shutdownFailoverSignals();
|
|
19820
|
+
shutdownImprovementReviewScheduler();
|
|
19725
19821
|
const closeResult = await closeServer(server, serverLogger);
|
|
19726
19822
|
if (!closeResult.ok) {
|
|
19727
19823
|
throw new Error(closeResult.error.message);
|
|
@@ -19877,6 +19973,7 @@ async function startServer(verbose, mode, modeWasExplicit = false, orchestratorO
|
|
|
19877
19973
|
startupWatchdog.unref();
|
|
19878
19974
|
const detectionResult = detectMode({ explicitMode: modeWasExplicit ? mode : void 0 });
|
|
19879
19975
|
logStartupInfo(logger18, detectionResult, verbose);
|
|
19976
|
+
void warnIfVersionStale(logger18);
|
|
19880
19977
|
const configResult = loadAndLogConfig(logger18);
|
|
19881
19978
|
applyLoggingConfig(logger18, verbose, configResult.config);
|
|
19882
19979
|
validateNexusEnv(logger18);
|
|
@@ -20270,7 +20367,7 @@ async function handleResearchCommand(args) {
|
|
|
20270
20367
|
}
|
|
20271
20368
|
}
|
|
20272
20369
|
async function handleRegistryCommand(args) {
|
|
20273
|
-
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-
|
|
20370
|
+
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-OVRRKYHO.js");
|
|
20274
20371
|
const subcommand = args.subcommand;
|
|
20275
20372
|
if (!isValidRegistrySubcommand(subcommand)) {
|
|
20276
20373
|
process.stdout.write(`${formatRegistryUsage()}
|
|
@@ -20318,7 +20415,7 @@ async function handleVerifyCommand(args) {
|
|
|
20318
20415
|
async function handleDoctorCommand(args) {
|
|
20319
20416
|
const exitCode = await doctorCommand({ fix: args.options.fix });
|
|
20320
20417
|
if (args.options.deep) {
|
|
20321
|
-
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-
|
|
20418
|
+
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-HGAC6N5Y.js");
|
|
20322
20419
|
const diag = runDeepDiagnostics2();
|
|
20323
20420
|
process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
|
|
20324
20421
|
}
|
|
@@ -20362,7 +20459,7 @@ async function handleInitCommand(args) {
|
|
|
20362
20459
|
process.exit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20363
20460
|
}
|
|
20364
20461
|
async function runInitOpencodeFlow(args) {
|
|
20365
|
-
const { runInitOpencode } = await import("./init-opencode-
|
|
20462
|
+
const { runInitOpencode } = await import("./init-opencode-RHCYZDZW.js");
|
|
20366
20463
|
const opencodePath = args.options.opencode;
|
|
20367
20464
|
if (opencodePath === void 0 || opencodePath === "") {
|
|
20368
20465
|
process.stderr.write("Error: --opencode requires a path argument.\n");
|
|
@@ -20389,7 +20486,7 @@ async function runInitOpencodeFlow(args) {
|
|
|
20389
20486
|
process.exit(EXIT_CODES.SUCCESS);
|
|
20390
20487
|
}
|
|
20391
20488
|
async function renderOpencodeValidate(opencodePath) {
|
|
20392
|
-
const { runOpencodeValidate } = await import("./init-opencode-
|
|
20489
|
+
const { runOpencodeValidate } = await import("./init-opencode-RHCYZDZW.js");
|
|
20393
20490
|
const result = await runOpencodeValidate(opencodePath);
|
|
20394
20491
|
if (!result.ok) {
|
|
20395
20492
|
process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
|
|
@@ -20429,7 +20526,7 @@ async function handleSetupCommandAsync(args) {
|
|
|
20429
20526
|
process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20430
20527
|
}
|
|
20431
20528
|
async function runCustomApiSetup(args) {
|
|
20432
|
-
const { configureCustomApi } = await import("./setup-custom-api-
|
|
20529
|
+
const { configureCustomApi } = await import("./setup-custom-api-FLV4SELI.js");
|
|
20433
20530
|
const baseUrl = args.options.customApi;
|
|
20434
20531
|
if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
|
|
20435
20532
|
const input = {
|