nexus-agents 2.92.5 → 2.93.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/dist/{child-mcp-config-PIDVHWJ7.js → child-mcp-config-WNISXFYD.js} +2 -2
- package/dist/{chunk-SIICMKBA.js → chunk-2IBJC2EP.js} +2 -2
- package/dist/chunk-2IBJC2EP.js.map +1 -0
- package/dist/{chunk-WXEMTPML.js → chunk-2T4NV6QT.js} +2 -2
- package/dist/{chunk-PIDABDFE.js → chunk-4A4WPM75.js} +10 -126
- package/dist/chunk-4A4WPM75.js.map +1 -0
- package/dist/{chunk-U4RLBLNO.js → chunk-57OH2O2U.js} +2 -2
- package/dist/{chunk-3XC5LFWH.js → chunk-5BTRDVWC.js} +5 -5
- package/dist/{chunk-QQMYKFG7.js → chunk-AZP66FIA.js} +3 -3
- package/dist/{chunk-DNSBKQ7I.js → chunk-BHA6V7GK.js} +4 -4
- package/dist/{chunk-TOQJ3UN5.js → chunk-BNHBZRU7.js} +3 -3
- package/dist/{chunk-YQAS2EGR.js → chunk-CPH6LKXO.js} +2 -2
- package/dist/{chunk-VBIAMMZZ.js → chunk-DTFMYM3V.js} +2 -2
- package/dist/{chunk-QADQ4LN4.js → chunk-E3QWWP67.js} +2 -2
- package/dist/{chunk-FL3AXIUL.js → chunk-FTCU55O6.js} +4 -4
- package/dist/{chunk-BG4WK4UP.js → chunk-G5IDRWWI.js} +15 -6
- package/dist/chunk-G5IDRWWI.js.map +1 -0
- package/dist/{chunk-L5BXCSMP.js → chunk-HKISF2E7.js} +183 -10
- package/dist/chunk-HKISF2E7.js.map +1 -0
- package/dist/{chunk-KTJUMU2A.js → chunk-IJ2AZZVH.js} +66 -48
- package/dist/chunk-IJ2AZZVH.js.map +1 -0
- package/dist/{chunk-OXLXVSN3.js → chunk-JCETWDU7.js} +2 -2
- package/dist/{chunk-DSERRMPX.js → chunk-JEBWSHSU.js} +2 -2
- package/dist/{chunk-VU54VB6K.js → chunk-K7VGX37L.js} +3 -3
- package/dist/{chunk-NYWZI46K.js → chunk-LJMO5P6O.js} +38 -128
- package/dist/chunk-LJMO5P6O.js.map +1 -0
- package/dist/chunk-NESW2TTD.js +134 -0
- package/dist/chunk-NESW2TTD.js.map +1 -0
- package/dist/{chunk-MBK6P4VV.js → chunk-RTUZSR4R.js} +2 -2
- package/dist/{chunk-QXGLZETS.js → chunk-SHSKW5ML.js} +7 -7
- package/dist/{chunk-YJUHVQSG.js → chunk-SMGH2B3A.js} +2 -2
- package/dist/{chunk-ZYYU26YH.js → chunk-SORBJPRA.js} +2 -2
- package/dist/{chunk-EI2E43HI.js → chunk-T73G67GT.js} +3 -3
- package/dist/{chunk-2QJJYCPD.js → chunk-ULBKFMVO.js} +2 -2
- package/dist/{chunk-3TU3RJNK.js → chunk-VSG6RSE6.js} +3 -3
- package/dist/{chunk-DQEREDUW.js → chunk-WU3SUA35.js} +2 -2
- package/dist/{chunk-G55LVPNH.js → chunk-XVY3I7JT.js} +7 -7
- package/dist/{chunk-P646QQYW.js → chunk-ZOAU7RE4.js} +6 -4
- package/dist/chunk-ZOAU7RE4.js.map +1 -0
- package/dist/{chunk-GKFFRRS4.js → chunk-ZYHHDPFW.js} +4 -4
- package/dist/{cli-circuit-breaker-HFSOBCPK.js → cli-circuit-breaker-6E4E2IU7.js} +4 -4
- package/dist/cli.js +109 -38
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-T2XYCQOU.js → composite-router-MQOPXLVV.js} +2 -2
- package/dist/{consensus-vote-IDHQVKX2.js → consensus-vote-ZRADOLXH.js} +13 -12
- package/dist/{context-retriever-5BJYPAX7.js → context-retriever-TZGIETJO.js} +6 -6
- package/dist/{doctor-deep-OVGRBG3Z.js → doctor-deep-OU2WC55V.js} +3 -3
- package/dist/{expert-bridge-JPTHFWPW.js → expert-bridge-WP5ZWXFY.js} +4 -4
- package/dist/{factory-NE7SNW7V.js → factory-2TN2VZTR.js} +5 -5
- package/dist/{factory-734UWF4C.js → factory-RJTRVII5.js} +5 -5
- package/dist/index.d.ts +52 -9
- package/dist/index.js +199 -55
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-2ZBDJILW.js → init-opencode-AYMNMWU7.js} +5 -5
- package/dist/{issue-triage-AGGTH767.js → issue-triage-QIVZN3PJ.js} +5 -5
- package/dist/{pr-reviewer-helpers-WGPLUXPU.js → pr-reviewer-helpers-P24OBKVM.js} +4 -4
- package/dist/{registry-command-CZZM5SF2.js → registry-command-KWWOKJ5C.js} +2 -2
- package/dist/{repo-security-plan-X42KXHT2.js → repo-security-plan-KZNEXDCI.js} +3 -3
- package/dist/{research-helpers-synthesize-C7YGRQI6.js → research-helpers-synthesize-DH5PPX7A.js} +4 -3
- package/dist/{routing-memory-2FYZDQUC.js → routing-memory-AGHJQTRH.js} +2 -2
- package/dist/{session-memory-53NZRZB6.js → session-memory-O24IVZAW.js} +3 -3
- package/dist/{setup-command-ZV6VZLP4.js → setup-command-NBXZ4NGV.js} +12 -11
- package/dist/{setup-config-CYRK4UFF.js → setup-config-Y4JA5QWO.js} +3 -3
- package/dist/{setup-custom-api-GXHPYLDR.js → setup-custom-api-UNX4OJEX.js} +5 -4
- package/dist/{setup-custom-api-GXHPYLDR.js.map → setup-custom-api-UNX4OJEX.js.map} +1 -1
- package/dist/{tool-memory-AX5G67J6.js → tool-memory-UEQNXIGC.js} +5 -5
- package/dist/{weather-report-AUMNGHYZ.js → weather-report-S5YXRY7G.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-BG4WK4UP.js.map +0 -1
- package/dist/chunk-KTJUMU2A.js.map +0 -1
- package/dist/chunk-L5BXCSMP.js.map +0 -1
- package/dist/chunk-NYWZI46K.js.map +0 -1
- package/dist/chunk-P646QQYW.js.map +0 -1
- package/dist/chunk-PIDABDFE.js.map +0 -1
- package/dist/chunk-SIICMKBA.js.map +0 -1
- /package/dist/{child-mcp-config-PIDVHWJ7.js.map → child-mcp-config-WNISXFYD.js.map} +0 -0
- /package/dist/{chunk-WXEMTPML.js.map → chunk-2T4NV6QT.js.map} +0 -0
- /package/dist/{chunk-U4RLBLNO.js.map → chunk-57OH2O2U.js.map} +0 -0
- /package/dist/{chunk-3XC5LFWH.js.map → chunk-5BTRDVWC.js.map} +0 -0
- /package/dist/{chunk-QQMYKFG7.js.map → chunk-AZP66FIA.js.map} +0 -0
- /package/dist/{chunk-DNSBKQ7I.js.map → chunk-BHA6V7GK.js.map} +0 -0
- /package/dist/{chunk-TOQJ3UN5.js.map → chunk-BNHBZRU7.js.map} +0 -0
- /package/dist/{chunk-YQAS2EGR.js.map → chunk-CPH6LKXO.js.map} +0 -0
- /package/dist/{chunk-VBIAMMZZ.js.map → chunk-DTFMYM3V.js.map} +0 -0
- /package/dist/{chunk-QADQ4LN4.js.map → chunk-E3QWWP67.js.map} +0 -0
- /package/dist/{chunk-FL3AXIUL.js.map → chunk-FTCU55O6.js.map} +0 -0
- /package/dist/{chunk-OXLXVSN3.js.map → chunk-JCETWDU7.js.map} +0 -0
- /package/dist/{chunk-DSERRMPX.js.map → chunk-JEBWSHSU.js.map} +0 -0
- /package/dist/{chunk-VU54VB6K.js.map → chunk-K7VGX37L.js.map} +0 -0
- /package/dist/{chunk-MBK6P4VV.js.map → chunk-RTUZSR4R.js.map} +0 -0
- /package/dist/{chunk-QXGLZETS.js.map → chunk-SHSKW5ML.js.map} +0 -0
- /package/dist/{chunk-YJUHVQSG.js.map → chunk-SMGH2B3A.js.map} +0 -0
- /package/dist/{chunk-ZYYU26YH.js.map → chunk-SORBJPRA.js.map} +0 -0
- /package/dist/{chunk-EI2E43HI.js.map → chunk-T73G67GT.js.map} +0 -0
- /package/dist/{chunk-2QJJYCPD.js.map → chunk-ULBKFMVO.js.map} +0 -0
- /package/dist/{chunk-3TU3RJNK.js.map → chunk-VSG6RSE6.js.map} +0 -0
- /package/dist/{chunk-DQEREDUW.js.map → chunk-WU3SUA35.js.map} +0 -0
- /package/dist/{chunk-G55LVPNH.js.map → chunk-XVY3I7JT.js.map} +0 -0
- /package/dist/{chunk-GKFFRRS4.js.map → chunk-ZYHHDPFW.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-HFSOBCPK.js.map → cli-circuit-breaker-6E4E2IU7.js.map} +0 -0
- /package/dist/{composite-router-T2XYCQOU.js.map → composite-router-MQOPXLVV.js.map} +0 -0
- /package/dist/{consensus-vote-IDHQVKX2.js.map → consensus-vote-ZRADOLXH.js.map} +0 -0
- /package/dist/{context-retriever-5BJYPAX7.js.map → context-retriever-TZGIETJO.js.map} +0 -0
- /package/dist/{doctor-deep-OVGRBG3Z.js.map → doctor-deep-OU2WC55V.js.map} +0 -0
- /package/dist/{expert-bridge-JPTHFWPW.js.map → expert-bridge-WP5ZWXFY.js.map} +0 -0
- /package/dist/{factory-734UWF4C.js.map → factory-2TN2VZTR.js.map} +0 -0
- /package/dist/{factory-NE7SNW7V.js.map → factory-RJTRVII5.js.map} +0 -0
- /package/dist/{init-opencode-2ZBDJILW.js.map → init-opencode-AYMNMWU7.js.map} +0 -0
- /package/dist/{issue-triage-AGGTH767.js.map → issue-triage-QIVZN3PJ.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-WGPLUXPU.js.map → pr-reviewer-helpers-P24OBKVM.js.map} +0 -0
- /package/dist/{registry-command-CZZM5SF2.js.map → registry-command-KWWOKJ5C.js.map} +0 -0
- /package/dist/{repo-security-plan-X42KXHT2.js.map → repo-security-plan-KZNEXDCI.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-C7YGRQI6.js.map → research-helpers-synthesize-DH5PPX7A.js.map} +0 -0
- /package/dist/{routing-memory-2FYZDQUC.js.map → routing-memory-AGHJQTRH.js.map} +0 -0
- /package/dist/{session-memory-53NZRZB6.js.map → session-memory-O24IVZAW.js.map} +0 -0
- /package/dist/{setup-command-ZV6VZLP4.js.map → setup-command-NBXZ4NGV.js.map} +0 -0
- /package/dist/{setup-config-CYRK4UFF.js.map → setup-config-Y4JA5QWO.js.map} +0 -0
- /package/dist/{tool-memory-AX5G67J6.js.map → tool-memory-UEQNXIGC.js.map} +0 -0
- /package/dist/{weather-report-AUMNGHYZ.js.map → weather-report-S5YXRY7G.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CliCircuitBreakerIntegration,
|
|
3
3
|
createCliCircuitBreakerIntegration
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-T73G67GT.js";
|
|
5
|
+
import "./chunk-RTUZSR4R.js";
|
|
6
|
+
import "./chunk-HKISF2E7.js";
|
|
7
7
|
import "./chunk-CH7QIDHQ.js";
|
|
8
8
|
import "./chunk-PR4QN5HX.js";
|
|
9
9
|
export {
|
|
10
10
|
CliCircuitBreakerIntegration,
|
|
11
11
|
createCliCircuitBreakerIntegration
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=cli-circuit-breaker-
|
|
13
|
+
//# sourceMappingURL=cli-circuit-breaker-6E4E2IU7.js.map
|
package/dist/cli.js
CHANGED
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
generateSummary,
|
|
14
14
|
parseFindings,
|
|
15
15
|
sumFindings
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-VSG6RSE6.js";
|
|
17
|
+
import "./chunk-E3QWWP67.js";
|
|
18
18
|
import {
|
|
19
19
|
buildOpenAICompatAdapters,
|
|
20
20
|
loadUsageEvents,
|
|
21
21
|
readOpenAICompatEnv,
|
|
22
22
|
rollupByModel
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AZP66FIA.js";
|
|
24
24
|
import {
|
|
25
25
|
setupCommandAsync,
|
|
26
26
|
verifyCommand
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-5BTRDVWC.js";
|
|
28
|
+
import "./chunk-2T4NV6QT.js";
|
|
29
29
|
import {
|
|
30
30
|
AuthHandler,
|
|
31
31
|
DEFAULT_EXPERTS,
|
|
@@ -164,19 +164,19 @@ import {
|
|
|
164
164
|
validateCommand,
|
|
165
165
|
validateWorkflow,
|
|
166
166
|
wrapInMarkdownFence
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-IJ2AZZVH.js";
|
|
168
168
|
import {
|
|
169
169
|
resolveToken
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-WU3SUA35.js";
|
|
171
171
|
import {
|
|
172
172
|
CATEGORY_DISPLAY_NAMES,
|
|
173
173
|
DEFAULT_PR_REVIEW_CONFIG
|
|
174
174
|
} from "./chunk-OK6U5N5Y.js";
|
|
175
|
-
import "./chunk-
|
|
176
|
-
import "./chunk-
|
|
175
|
+
import "./chunk-BNHBZRU7.js";
|
|
176
|
+
import "./chunk-T73G67GT.js";
|
|
177
177
|
import {
|
|
178
178
|
shutdownExpertBridge
|
|
179
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-XVY3I7JT.js";
|
|
180
180
|
import {
|
|
181
181
|
DEFAULT_VOTE_TIMEOUT_MS,
|
|
182
182
|
ErrorPolicySchema,
|
|
@@ -194,34 +194,34 @@ import {
|
|
|
194
194
|
toolSuccessStructured,
|
|
195
195
|
warnIfSimulatedOutsideTests,
|
|
196
196
|
wrapToolWithTimeout
|
|
197
|
-
} from "./chunk-
|
|
198
|
-
import "./chunk-
|
|
199
|
-
import "./chunk-
|
|
197
|
+
} from "./chunk-LJMO5P6O.js";
|
|
198
|
+
import "./chunk-JEBWSHSU.js";
|
|
199
|
+
import "./chunk-2IBJC2EP.js";
|
|
200
200
|
import {
|
|
201
201
|
loadPapersRegistry,
|
|
202
202
|
loadTechniquesRegistry,
|
|
203
203
|
savePapersRegistry,
|
|
204
204
|
synthesizeResearch
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-ZOAU7RE4.js";
|
|
206
206
|
import {
|
|
207
207
|
classifyTrust,
|
|
208
208
|
createFullGitHubProvider,
|
|
209
209
|
evaluatePolicy,
|
|
210
210
|
parsePRUrl
|
|
211
|
-
} from "./chunk-
|
|
212
|
-
import "./chunk-
|
|
211
|
+
} from "./chunk-G5IDRWWI.js";
|
|
212
|
+
import "./chunk-CPH6LKXO.js";
|
|
213
213
|
import {
|
|
214
214
|
ReputationCache,
|
|
215
215
|
sanitizeInput
|
|
216
|
-
} from "./chunk-
|
|
217
|
-
import "./chunk-
|
|
216
|
+
} from "./chunk-DTFMYM3V.js";
|
|
217
|
+
import "./chunk-ULBKFMVO.js";
|
|
218
218
|
import "./chunk-HFOQKCD2.js";
|
|
219
219
|
import "./chunk-3ACDP4E6.js";
|
|
220
|
-
import "./chunk-
|
|
220
|
+
import "./chunk-K7VGX37L.js";
|
|
221
221
|
import {
|
|
222
222
|
MemoryError,
|
|
223
223
|
shutdownToolMemory
|
|
224
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-FTCU55O6.js";
|
|
225
225
|
import {
|
|
226
226
|
CustomExpertDefinitionSchema,
|
|
227
227
|
DATA_SUBDIRECTORIES,
|
|
@@ -240,13 +240,16 @@ import {
|
|
|
240
240
|
loadConfig,
|
|
241
241
|
runDoctor,
|
|
242
242
|
validateNexusEnv
|
|
243
|
-
} from "./chunk-
|
|
244
|
-
import "./chunk-
|
|
245
|
-
import "./chunk-
|
|
243
|
+
} from "./chunk-SHSKW5ML.js";
|
|
244
|
+
import "./chunk-SMGH2B3A.js";
|
|
245
|
+
import "./chunk-57OH2O2U.js";
|
|
246
246
|
import {
|
|
247
247
|
DEFAULTS
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-4A4WPM75.js";
|
|
249
249
|
import "./chunk-NUBSJGQZ.js";
|
|
250
|
+
import {
|
|
251
|
+
parseBoolEnv
|
|
252
|
+
} from "./chunk-NESW2TTD.js";
|
|
250
253
|
import {
|
|
251
254
|
capitalize,
|
|
252
255
|
capitalizeKebab,
|
|
@@ -257,12 +260,12 @@ import {
|
|
|
257
260
|
getAvailableClis,
|
|
258
261
|
isRecord,
|
|
259
262
|
probeAllClis
|
|
260
|
-
} from "./chunk-
|
|
261
|
-
import "./chunk-
|
|
262
|
-
import "./chunk-
|
|
263
|
+
} from "./chunk-BHA6V7GK.js";
|
|
264
|
+
import "./chunk-RTUZSR4R.js";
|
|
265
|
+
import "./chunk-SORBJPRA.js";
|
|
263
266
|
import "./chunk-ZM4O442V.js";
|
|
264
267
|
import "./chunk-PQHVC4BD.js";
|
|
265
|
-
import "./chunk-
|
|
268
|
+
import "./chunk-JCETWDU7.js";
|
|
266
269
|
import {
|
|
267
270
|
API_TIMEOUTS,
|
|
268
271
|
AgentCapability,
|
|
@@ -330,7 +333,7 @@ import {
|
|
|
330
333
|
validateTimeout,
|
|
331
334
|
writeEmptyLine,
|
|
332
335
|
writeLine
|
|
333
|
-
} from "./chunk-
|
|
336
|
+
} from "./chunk-HKISF2E7.js";
|
|
334
337
|
import {
|
|
335
338
|
applyPortableMode,
|
|
336
339
|
detectSandbox,
|
|
@@ -3109,7 +3112,7 @@ ${file.patch}
|
|
|
3109
3112
|
violations: policyResult.violations
|
|
3110
3113
|
});
|
|
3111
3114
|
}
|
|
3112
|
-
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-
|
|
3115
|
+
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-P24OBKVM.js");
|
|
3113
3116
|
const body = formatReviewComment2(result);
|
|
3114
3117
|
const postResult = await provider.createReview(pr.prNumber, body, result.decision);
|
|
3115
3118
|
if (!postResult.ok) {
|
|
@@ -12419,8 +12422,7 @@ var HookEnvVars = {
|
|
|
12419
12422
|
NEXUS_DISABLE_METRICS: "NEXUS_DISABLE_METRICS"
|
|
12420
12423
|
};
|
|
12421
12424
|
function isFeatureDisabled(envVar) {
|
|
12422
|
-
|
|
12423
|
-
return value === "1" || value === "true";
|
|
12425
|
+
return parseBoolEnv(envVar, false);
|
|
12424
12426
|
}
|
|
12425
12427
|
function getDbPathFromEnv() {
|
|
12426
12428
|
return process.env[HookEnvVars.NEXUS_SESSIONS_DB] ?? getDefaultDbPath2();
|
|
@@ -17426,6 +17428,73 @@ function runStpaSafetyAnalysis(logger18, failOnHighSeverity) {
|
|
|
17426
17428
|
}
|
|
17427
17429
|
}
|
|
17428
17430
|
|
|
17431
|
+
// src/pipeline/tune-stage.ts
|
|
17432
|
+
var defaultLogger = createLogger({ component: "TuneStage" });
|
|
17433
|
+
var TUNE_SIGNAL_TYPES = [
|
|
17434
|
+
"signal.fitness_declined",
|
|
17435
|
+
"signal.swarm_unhealthy",
|
|
17436
|
+
"signal.vote_rejected"
|
|
17437
|
+
];
|
|
17438
|
+
function intendedActionFor(event) {
|
|
17439
|
+
switch (event.type) {
|
|
17440
|
+
case "signal.fitness_declined":
|
|
17441
|
+
return {
|
|
17442
|
+
kind: "flag_tech_debt",
|
|
17443
|
+
detail: `fitness ${String(event.score)} below floor ${String(event.floor)}${event.dimension !== void 0 ? ` (dimension: ${event.dimension})` : ""} \u2014 would surface a tech-debt remediation signal`,
|
|
17444
|
+
signal: event.type
|
|
17445
|
+
};
|
|
17446
|
+
case "signal.swarm_unhealthy":
|
|
17447
|
+
return {
|
|
17448
|
+
kind: "downweight_agent",
|
|
17449
|
+
detail: `agent ${event.agentId} unhealthy (${event.reason}) \u2014 would downweight it for routing (bounded, never zeroed)`,
|
|
17450
|
+
signal: event.type
|
|
17451
|
+
};
|
|
17452
|
+
case "signal.vote_rejected":
|
|
17453
|
+
return {
|
|
17454
|
+
kind: "record_rejection",
|
|
17455
|
+
detail: `proposal ${event.proposalId} rejected at ${String(event.approvalPercentage)}% \u2014 would record a rejection signal for review`,
|
|
17456
|
+
signal: event.type
|
|
17457
|
+
};
|
|
17458
|
+
default:
|
|
17459
|
+
return void 0;
|
|
17460
|
+
}
|
|
17461
|
+
}
|
|
17462
|
+
function createTuneStage(bus, options = {}) {
|
|
17463
|
+
const enabled = options.enabled ?? false;
|
|
17464
|
+
const log = options.logger ?? defaultLogger;
|
|
17465
|
+
return bus.subscribe({ type: [...TUNE_SIGNAL_TYPES] }, (event) => {
|
|
17466
|
+
try {
|
|
17467
|
+
const action = intendedActionFor(event);
|
|
17468
|
+
if (action === void 0) return;
|
|
17469
|
+
if (enabled) {
|
|
17470
|
+
log.warn("TuneStage enabled but bounded mutation is not implemented yet; no-op", {
|
|
17471
|
+
kind: action.kind,
|
|
17472
|
+
signal: action.signal
|
|
17473
|
+
});
|
|
17474
|
+
return;
|
|
17475
|
+
}
|
|
17476
|
+
log.info("TuneStage (shadow) \u2014 intended action", {
|
|
17477
|
+
kind: action.kind,
|
|
17478
|
+
signal: action.signal,
|
|
17479
|
+
detail: action.detail
|
|
17480
|
+
});
|
|
17481
|
+
} catch (e) {
|
|
17482
|
+
log.warn("TuneStage handler error", { error: getErrorMessage(e) });
|
|
17483
|
+
}
|
|
17484
|
+
});
|
|
17485
|
+
}
|
|
17486
|
+
var cachedTuneUnsubscribe = null;
|
|
17487
|
+
function startTuneStage(bus, options) {
|
|
17488
|
+
if (cachedTuneUnsubscribe !== null) return;
|
|
17489
|
+
cachedTuneUnsubscribe = createTuneStage(bus, options);
|
|
17490
|
+
}
|
|
17491
|
+
function shutdownTuneStage() {
|
|
17492
|
+
if (cachedTuneUnsubscribe !== null) {
|
|
17493
|
+
cachedTuneUnsubscribe();
|
|
17494
|
+
cachedTuneUnsubscribe = null;
|
|
17495
|
+
}
|
|
17496
|
+
}
|
|
17497
|
+
|
|
17429
17498
|
// src/mcp/gateway/upstream-client.ts
|
|
17430
17499
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
17431
17500
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
@@ -17951,6 +18020,7 @@ function initV2PipelineSubsystems(logger18) {
|
|
|
17951
18020
|
const pipelineEventBus = getPipelineEventBus();
|
|
17952
18021
|
const bridge = createEventBusBridge({ source: pipelineEventBus });
|
|
17953
18022
|
startFeedbackSubscriber(pipelineEventBus, getOutcomeStore());
|
|
18023
|
+
startTuneStage(pipelineEventBus);
|
|
17954
18024
|
const policyEngine = createDefaultPolicyEngine();
|
|
17955
18025
|
const v2Config = resolveV2Config();
|
|
17956
18026
|
logger18.info("V2 Pipeline OS initialized", {
|
|
@@ -19276,7 +19346,7 @@ function adaptConfigToLibrary(config) {
|
|
|
19276
19346
|
}
|
|
19277
19347
|
function createBeliefPromoter() {
|
|
19278
19348
|
return async (event) => {
|
|
19279
|
-
const { getToolMemory } = await import("./tool-memory-
|
|
19349
|
+
const { getToolMemory } = await import("./tool-memory-UEQNXIGC.js");
|
|
19280
19350
|
const tm = getToolMemory();
|
|
19281
19351
|
await tm.recordBelief(
|
|
19282
19352
|
`skill:${event.name}`,
|
|
@@ -19590,6 +19660,7 @@ function createShutdownCleanup(options) {
|
|
|
19590
19660
|
shutdownToolMemory();
|
|
19591
19661
|
await shutdownExpertBridge();
|
|
19592
19662
|
shutdownFeedbackSubscriber();
|
|
19663
|
+
shutdownTuneStage();
|
|
19593
19664
|
const closeResult = await closeServer(server, serverLogger);
|
|
19594
19665
|
if (!closeResult.ok) {
|
|
19595
19666
|
throw new Error(closeResult.error.message);
|
|
@@ -20139,7 +20210,7 @@ async function handleResearchCommand(args) {
|
|
|
20139
20210
|
}
|
|
20140
20211
|
}
|
|
20141
20212
|
async function handleRegistryCommand(args) {
|
|
20142
|
-
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-
|
|
20213
|
+
const { registryCommand, isValidRegistrySubcommand, formatRegistryUsage } = await import("./registry-command-KWWOKJ5C.js");
|
|
20143
20214
|
const subcommand = args.subcommand;
|
|
20144
20215
|
if (!isValidRegistrySubcommand(subcommand)) {
|
|
20145
20216
|
process.stdout.write(`${formatRegistryUsage()}
|
|
@@ -20187,7 +20258,7 @@ async function handleVerifyCommand(args) {
|
|
|
20187
20258
|
async function handleDoctorCommand(args) {
|
|
20188
20259
|
const exitCode = await doctorCommand({ fix: args.options.fix });
|
|
20189
20260
|
if (args.options.deep) {
|
|
20190
|
-
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-
|
|
20261
|
+
const { runDeepDiagnostics: runDeepDiagnostics2, formatDeepDiagnostics: formatDeepDiagnostics2 } = await import("./doctor-deep-OU2WC55V.js");
|
|
20191
20262
|
const diag = runDeepDiagnostics2();
|
|
20192
20263
|
process.stdout.write(formatDeepDiagnostics2(diag) + "\n");
|
|
20193
20264
|
}
|
|
@@ -20231,7 +20302,7 @@ async function handleInitCommand(args) {
|
|
|
20231
20302
|
process.exit(result.success ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20232
20303
|
}
|
|
20233
20304
|
async function runInitOpencodeFlow(args) {
|
|
20234
|
-
const { runInitOpencode } = await import("./init-opencode-
|
|
20305
|
+
const { runInitOpencode } = await import("./init-opencode-AYMNMWU7.js");
|
|
20235
20306
|
const opencodePath = args.options.opencode;
|
|
20236
20307
|
if (opencodePath === void 0 || opencodePath === "") {
|
|
20237
20308
|
process.stderr.write("Error: --opencode requires a path argument.\n");
|
|
@@ -20258,7 +20329,7 @@ async function runInitOpencodeFlow(args) {
|
|
|
20258
20329
|
process.exit(EXIT_CODES.SUCCESS);
|
|
20259
20330
|
}
|
|
20260
20331
|
async function renderOpencodeValidate(opencodePath) {
|
|
20261
|
-
const { runOpencodeValidate } = await import("./init-opencode-
|
|
20332
|
+
const { runOpencodeValidate } = await import("./init-opencode-AYMNMWU7.js");
|
|
20262
20333
|
const result = await runOpencodeValidate(opencodePath);
|
|
20263
20334
|
if (!result.ok) {
|
|
20264
20335
|
process.stderr.write(`init --opencode --validate: ${result.reason ?? "failed"}
|
|
@@ -20298,7 +20369,7 @@ async function handleSetupCommandAsync(args) {
|
|
|
20298
20369
|
process.exit(exitCode === 0 ? EXIT_CODES.SUCCESS : EXIT_CODES.SERVER_START_FAILED);
|
|
20299
20370
|
}
|
|
20300
20371
|
async function runCustomApiSetup(args) {
|
|
20301
|
-
const { configureCustomApi } = await import("./setup-custom-api-
|
|
20372
|
+
const { configureCustomApi } = await import("./setup-custom-api-UNX4OJEX.js");
|
|
20302
20373
|
const baseUrl = args.options.customApi;
|
|
20303
20374
|
if (baseUrl === void 0) return EXIT_CODES.SERVER_START_FAILED;
|
|
20304
20375
|
const input = {
|