nexus-agents 4.1.4 → 4.3.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-BV3OSP24.js → child-mcp-config-JTLIU3JR.js} +2 -2
- package/dist/{chunk-KVHA4AEF.js → chunk-2QYJ7IE2.js} +4 -4
- package/dist/{chunk-JRU5G6VW.js → chunk-3K3VGOY4.js} +2 -2
- package/dist/{chunk-BYDUN7A5.js → chunk-3P6N3XZF.js} +2 -2
- package/dist/{chunk-4O7TU6R3.js → chunk-4JKO5B7A.js} +2 -2
- package/dist/{chunk-QJKXF2MY.js → chunk-4WU3BGGK.js} +8 -8
- package/dist/{chunk-JJEOBIOI.js → chunk-55XLIDEN.js} +2 -2
- package/dist/{chunk-ADIMVMAB.js → chunk-5GUP54YH.js} +2 -2
- package/dist/{chunk-6SBSQDCX.js → chunk-73U6W5ZU.js} +2 -2
- package/dist/{chunk-BMEJLPAE.js → chunk-A7DEF2I6.js} +3 -3
- package/dist/{chunk-5HPJB35V.js → chunk-AQAGVYWS.js} +2 -2
- package/dist/{chunk-VKLMXCI2.js → chunk-B6JICUQ6.js} +17 -4
- package/dist/chunk-B6JICUQ6.js.map +1 -0
- package/dist/{chunk-FRTNZUUF.js → chunk-CYCXJNPA.js} +2 -2
- package/dist/{chunk-PQPAB7C5.js → chunk-D32WYARF.js} +5 -5
- package/dist/{chunk-GSUC22YA.js → chunk-D3BKW23W.js} +8 -8
- package/dist/{chunk-HNC2G7AS.js → chunk-DL5RN53R.js} +2 -2
- package/dist/{chunk-FD3I5B4X.js → chunk-FHXDRCIW.js} +2 -2
- package/dist/{chunk-N7YLNXHT.js → chunk-H64DUJSZ.js} +6 -6
- package/dist/{chunk-EXX6WINJ.js → chunk-JV5HRP3S.js} +2 -2
- package/dist/{chunk-C3KZXEBR.js → chunk-KIWPXWL7.js} +4 -4
- package/dist/{chunk-CNB4PA7Q.js → chunk-LGTY3B3Q.js} +5 -5
- package/dist/{chunk-KLN7TJLT.js → chunk-MLR4PF64.js} +2 -2
- package/dist/{chunk-AMEVOGE7.js → chunk-MPCBYY4J.js} +8 -8
- package/dist/{chunk-WXCRNJNO.js → chunk-MPEQHP4D.js} +3 -3
- package/dist/{chunk-CKOUOEK2.js → chunk-OHRCTQDC.js} +268 -227
- package/dist/chunk-OHRCTQDC.js.map +1 -0
- package/dist/{chunk-4Z2Z52C7.js → chunk-OYNZ6FCZ.js} +7 -7
- package/dist/{chunk-NZHI7FHX.js → chunk-ROAVF3S5.js} +5 -5
- package/dist/{chunk-4XWRSCZ2.js → chunk-SF6KSPBW.js} +3 -3
- package/dist/{chunk-S645LGB6.js → chunk-TKA6653I.js} +2 -2
- package/dist/{chunk-TN7HF2SQ.js → chunk-TMYLHKLJ.js} +12 -12
- package/dist/{chunk-VOLQTAV4.js → chunk-WX5TASVN.js} +11 -5
- package/dist/chunk-WX5TASVN.js.map +1 -0
- package/dist/{chunk-2HCONJES.js → chunk-X57EI3U6.js} +2 -2
- package/dist/{chunk-3OM2W7H7.js → chunk-XABDFFQV.js} +2 -2
- package/dist/{chunk-UM376MEM.js → chunk-Y3WYSLFZ.js} +2 -2
- package/dist/{cli-circuit-breaker-NRGM3VBL.js → cli-circuit-breaker-DG2L4C3C.js} +3 -3
- package/dist/cli.js +41 -41
- package/dist/{composite-router-TSPOS57H.js → composite-router-X5QU6XNZ.js} +2 -2
- package/dist/{consensus-vote-U3OPVEUE.js → consensus-vote-ZRLZYJ4D.js} +16 -16
- package/dist/{context-retriever-SGJTQUCI.js → context-retriever-CIFLPUJA.js} +8 -8
- package/dist/{doctor-deep-33C5GGB3.js → doctor-deep-FZGNQXDZ.js} +3 -3
- package/dist/{doctor-live-XRIVOJLP.js → doctor-live-KGQWMYJY.js} +9 -9
- package/dist/{expert-bridge-UH44L5CN.js → expert-bridge-B6ZTEZNH.js} +4 -4
- package/dist/{factory-GUDAJED7.js → factory-5BEGXJVB.js} +9 -9
- package/dist/{factory-HYFTOF35.js → factory-RLGGFLYD.js} +5 -5
- package/dist/{improvement-review-KTOY6EEF.js → improvement-review-52J36YLJ.js} +5 -5
- package/dist/index.d.ts +133 -56
- package/dist/index.js +30 -30
- package/dist/{init-opencode-PXLOY7XY.js → init-opencode-JAJXMGOI.js} +6 -6
- package/dist/issue-triage-APE6L5YP.js +17 -0
- package/dist/{pr-reviewer-helpers-QU4F2A3X.js → pr-reviewer-helpers-KZ4MNSUT.js} +4 -4
- package/dist/{registry-command-2LQLUUXG.js → registry-command-AHGSBCNL.js} +2 -2
- package/dist/{repo-security-plan-E2MTJPSC.js → repo-security-plan-C4ZSWVY7.js} +3 -3
- package/dist/{research-helpers-synthesize-4YBZF2LZ.js → research-helpers-synthesize-C4GK3GU4.js} +4 -4
- package/dist/{routing-memory-EIF5XALW.js → routing-memory-WU4C63BA.js} +2 -2
- package/dist/{session-memory-5GVHJR26.js → session-memory-LYX5N2IP.js} +3 -3
- package/dist/{setup-command-RQKGR4EX.js → setup-command-775JEHPJ.js} +14 -14
- package/dist/{setup-config-PMGHQJ6O.js → setup-config-P722TC57.js} +3 -3
- package/dist/{setup-custom-api-JXXGF5QD.js → setup-custom-api-P7T5YKIK.js} +4 -4
- package/dist/{tool-memory-YFXJCJFI.js → tool-memory-AL5PXKB4.js} +5 -5
- package/dist/{unified-registry-OGXE4772.js → unified-registry-UM4GSYMB.js} +10 -10
- package/dist/{weather-report-FV6YYGT4.js → weather-report-QLHSZQOT.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-CKOUOEK2.js.map +0 -1
- package/dist/chunk-VKLMXCI2.js.map +0 -1
- package/dist/chunk-VOLQTAV4.js.map +0 -1
- package/dist/issue-triage-B3KU37U3.js +0 -17
- /package/dist/{child-mcp-config-BV3OSP24.js.map → child-mcp-config-JTLIU3JR.js.map} +0 -0
- /package/dist/{chunk-KVHA4AEF.js.map → chunk-2QYJ7IE2.js.map} +0 -0
- /package/dist/{chunk-JRU5G6VW.js.map → chunk-3K3VGOY4.js.map} +0 -0
- /package/dist/{chunk-BYDUN7A5.js.map → chunk-3P6N3XZF.js.map} +0 -0
- /package/dist/{chunk-4O7TU6R3.js.map → chunk-4JKO5B7A.js.map} +0 -0
- /package/dist/{chunk-QJKXF2MY.js.map → chunk-4WU3BGGK.js.map} +0 -0
- /package/dist/{chunk-JJEOBIOI.js.map → chunk-55XLIDEN.js.map} +0 -0
- /package/dist/{chunk-ADIMVMAB.js.map → chunk-5GUP54YH.js.map} +0 -0
- /package/dist/{chunk-6SBSQDCX.js.map → chunk-73U6W5ZU.js.map} +0 -0
- /package/dist/{chunk-BMEJLPAE.js.map → chunk-A7DEF2I6.js.map} +0 -0
- /package/dist/{chunk-5HPJB35V.js.map → chunk-AQAGVYWS.js.map} +0 -0
- /package/dist/{chunk-FRTNZUUF.js.map → chunk-CYCXJNPA.js.map} +0 -0
- /package/dist/{chunk-PQPAB7C5.js.map → chunk-D32WYARF.js.map} +0 -0
- /package/dist/{chunk-GSUC22YA.js.map → chunk-D3BKW23W.js.map} +0 -0
- /package/dist/{chunk-HNC2G7AS.js.map → chunk-DL5RN53R.js.map} +0 -0
- /package/dist/{chunk-FD3I5B4X.js.map → chunk-FHXDRCIW.js.map} +0 -0
- /package/dist/{chunk-N7YLNXHT.js.map → chunk-H64DUJSZ.js.map} +0 -0
- /package/dist/{chunk-EXX6WINJ.js.map → chunk-JV5HRP3S.js.map} +0 -0
- /package/dist/{chunk-C3KZXEBR.js.map → chunk-KIWPXWL7.js.map} +0 -0
- /package/dist/{chunk-CNB4PA7Q.js.map → chunk-LGTY3B3Q.js.map} +0 -0
- /package/dist/{chunk-KLN7TJLT.js.map → chunk-MLR4PF64.js.map} +0 -0
- /package/dist/{chunk-AMEVOGE7.js.map → chunk-MPCBYY4J.js.map} +0 -0
- /package/dist/{chunk-WXCRNJNO.js.map → chunk-MPEQHP4D.js.map} +0 -0
- /package/dist/{chunk-4Z2Z52C7.js.map → chunk-OYNZ6FCZ.js.map} +0 -0
- /package/dist/{chunk-NZHI7FHX.js.map → chunk-ROAVF3S5.js.map} +0 -0
- /package/dist/{chunk-4XWRSCZ2.js.map → chunk-SF6KSPBW.js.map} +0 -0
- /package/dist/{chunk-S645LGB6.js.map → chunk-TKA6653I.js.map} +0 -0
- /package/dist/{chunk-TN7HF2SQ.js.map → chunk-TMYLHKLJ.js.map} +0 -0
- /package/dist/{chunk-2HCONJES.js.map → chunk-X57EI3U6.js.map} +0 -0
- /package/dist/{chunk-3OM2W7H7.js.map → chunk-XABDFFQV.js.map} +0 -0
- /package/dist/{chunk-UM376MEM.js.map → chunk-Y3WYSLFZ.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-NRGM3VBL.js.map → cli-circuit-breaker-DG2L4C3C.js.map} +0 -0
- /package/dist/{composite-router-TSPOS57H.js.map → composite-router-X5QU6XNZ.js.map} +0 -0
- /package/dist/{consensus-vote-U3OPVEUE.js.map → consensus-vote-ZRLZYJ4D.js.map} +0 -0
- /package/dist/{context-retriever-SGJTQUCI.js.map → context-retriever-CIFLPUJA.js.map} +0 -0
- /package/dist/{doctor-deep-33C5GGB3.js.map → doctor-deep-FZGNQXDZ.js.map} +0 -0
- /package/dist/{doctor-live-XRIVOJLP.js.map → doctor-live-KGQWMYJY.js.map} +0 -0
- /package/dist/{expert-bridge-UH44L5CN.js.map → expert-bridge-B6ZTEZNH.js.map} +0 -0
- /package/dist/{factory-GUDAJED7.js.map → factory-5BEGXJVB.js.map} +0 -0
- /package/dist/{factory-HYFTOF35.js.map → factory-RLGGFLYD.js.map} +0 -0
- /package/dist/{improvement-review-KTOY6EEF.js.map → improvement-review-52J36YLJ.js.map} +0 -0
- /package/dist/{init-opencode-PXLOY7XY.js.map → init-opencode-JAJXMGOI.js.map} +0 -0
- /package/dist/{issue-triage-B3KU37U3.js.map → issue-triage-APE6L5YP.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-QU4F2A3X.js.map → pr-reviewer-helpers-KZ4MNSUT.js.map} +0 -0
- /package/dist/{registry-command-2LQLUUXG.js.map → registry-command-AHGSBCNL.js.map} +0 -0
- /package/dist/{repo-security-plan-E2MTJPSC.js.map → repo-security-plan-C4ZSWVY7.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-4YBZF2LZ.js.map → research-helpers-synthesize-C4GK3GU4.js.map} +0 -0
- /package/dist/{routing-memory-EIF5XALW.js.map → routing-memory-WU4C63BA.js.map} +0 -0
- /package/dist/{session-memory-5GVHJR26.js.map → session-memory-LYX5N2IP.js.map} +0 -0
- /package/dist/{setup-command-RQKGR4EX.js.map → setup-command-775JEHPJ.js.map} +0 -0
- /package/dist/{setup-config-PMGHQJ6O.js.map → setup-config-P722TC57.js.map} +0 -0
- /package/dist/{setup-custom-api-JXXGF5QD.js.map → setup-custom-api-P7T5YKIK.js.map} +0 -0
- /package/dist/{tool-memory-YFXJCJFI.js.map → tool-memory-AL5PXKB4.js.map} +0 -0
- /package/dist/{unified-registry-OGXE4772.js.map → unified-registry-UM4GSYMB.js.map} +0 -0
- /package/dist/{weather-report-FV6YYGT4.js.map → weather-report-QLHSZQOT.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSecurityPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FHXDRCIW.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzeGitHubRepo
|
|
6
6
|
} from "./chunk-HFOQKCD2.js";
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
24
24
|
clampTaskTtl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-D3BKW23W.js";
|
|
26
26
|
import {
|
|
27
27
|
executeExpert
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OYNZ6FCZ.js";
|
|
29
29
|
import {
|
|
30
30
|
JobStatusSchema,
|
|
31
31
|
abortJob,
|
|
@@ -46,24 +46,24 @@ import {
|
|
|
46
46
|
simulationDeniedResult,
|
|
47
47
|
toJobSummary,
|
|
48
48
|
writeJobCancelled
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-4WU3BGGK.js";
|
|
50
50
|
import {
|
|
51
51
|
allOf
|
|
52
52
|
} from "./chunk-OQB3XC5O.js";
|
|
53
53
|
import {
|
|
54
54
|
normalizeTopicToCanonical,
|
|
55
55
|
synthesizeResearch
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-A7DEF2I6.js";
|
|
57
57
|
import {
|
|
58
58
|
IssueTriage
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-H64DUJSZ.js";
|
|
60
60
|
import {
|
|
61
61
|
resolveEnvMode,
|
|
62
62
|
sanitizeInput
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-AQAGVYWS.js";
|
|
64
64
|
import {
|
|
65
65
|
withPrerequisite
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-MPEQHP4D.js";
|
|
67
67
|
import {
|
|
68
68
|
NOOP_NOTIFIER,
|
|
69
69
|
RateLimiter,
|
|
@@ -87,18 +87,18 @@ import {
|
|
|
87
87
|
withAuditTrail,
|
|
88
88
|
withProgressHeartbeat,
|
|
89
89
|
wrapToolWithTimeout
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-WX5TASVN.js";
|
|
91
91
|
import {
|
|
92
92
|
createAuditTrail,
|
|
93
93
|
createGraphAuditBridge,
|
|
94
94
|
emitPipelinePolicyEvent
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-5GUP54YH.js";
|
|
96
96
|
import {
|
|
97
97
|
EventTopics,
|
|
98
98
|
createEvent,
|
|
99
99
|
getGlobalEventBus,
|
|
100
100
|
getGlobalRegistry
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-B6JICUQ6.js";
|
|
102
102
|
import {
|
|
103
103
|
IDENTIFIER_RE,
|
|
104
104
|
LANG_VALUES,
|
|
@@ -131,31 +131,31 @@ import {
|
|
|
131
131
|
parseRegistry,
|
|
132
132
|
sourceExistsInRegistry,
|
|
133
133
|
summarizeContextForPrompt
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-LGTY3B3Q.js";
|
|
135
135
|
import {
|
|
136
136
|
loadPapersRegistry,
|
|
137
137
|
loadTechniquesRegistry
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-Y3WYSLFZ.js";
|
|
139
139
|
import {
|
|
140
140
|
resolveInsideRoot
|
|
141
141
|
} from "./chunk-NUBSJGQZ.js";
|
|
142
142
|
import {
|
|
143
143
|
getTokenEnvVars,
|
|
144
144
|
resolveToken
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-XABDFFQV.js";
|
|
146
146
|
import {
|
|
147
147
|
DEFAULT_RELEVANCE_CONFIG,
|
|
148
148
|
MemoryImportance,
|
|
149
149
|
calculateTextJaccardSimilarity,
|
|
150
150
|
getToolMemory
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-2QYJ7IE2.js";
|
|
152
152
|
import {
|
|
153
153
|
STOPWORDS,
|
|
154
154
|
truncateWithInfo
|
|
155
155
|
} from "./chunk-6T3EPABN.js";
|
|
156
156
|
import {
|
|
157
157
|
createSessionMemory
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-3K3VGOY4.js";
|
|
159
159
|
import {
|
|
160
160
|
BUILT_IN_EXPERTS,
|
|
161
161
|
BuiltInExpertTypeSchema,
|
|
@@ -173,25 +173,25 @@ import {
|
|
|
173
173
|
getAvailableClis,
|
|
174
174
|
sleep,
|
|
175
175
|
withTimeout
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-MPCBYY4J.js";
|
|
177
177
|
import {
|
|
178
178
|
BaseAdapter,
|
|
179
179
|
createStream,
|
|
180
180
|
requireApiKey,
|
|
181
181
|
validateApiKeyPresence
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-MLR4PF64.js";
|
|
183
183
|
import {
|
|
184
184
|
DEFAULTS
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-DL5RN53R.js";
|
|
186
186
|
import {
|
|
187
187
|
getAvailabilityCache,
|
|
188
188
|
getCliForModelId,
|
|
189
189
|
resolveFallback
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-TKA6653I.js";
|
|
191
191
|
import {
|
|
192
192
|
generateHyphenId,
|
|
193
193
|
generateUUID
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-CYCXJNPA.js";
|
|
195
195
|
import {
|
|
196
196
|
AGENT_ROUTER_TIMEOUTS,
|
|
197
197
|
API_TIMEOUTS,
|
|
@@ -291,7 +291,7 @@ import {
|
|
|
291
291
|
selectStrategyByManifest,
|
|
292
292
|
toExpertTaskAnalysisResult,
|
|
293
293
|
withStep
|
|
294
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-TMYLHKLJ.js";
|
|
295
295
|
import {
|
|
296
296
|
ensureLearningDir,
|
|
297
297
|
getMetaOutcomesFile,
|
|
@@ -28244,7 +28244,7 @@ function execIdFields(executionId) {
|
|
|
28244
28244
|
async function populateUnifiedContextOnState(state, options) {
|
|
28245
28245
|
const taskCandidate = state["task"];
|
|
28246
28246
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
28247
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
28247
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-CIFLPUJA.js");
|
|
28248
28248
|
const category = inferTaskCategory2(taskCandidate);
|
|
28249
28249
|
const executionId = options?.executionId;
|
|
28250
28250
|
const execFields = execIdFields(executionId);
|
|
@@ -43929,7 +43929,7 @@ async function tryIssueTriage(task) {
|
|
|
43929
43929
|
try {
|
|
43930
43930
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
43931
43931
|
if (issueMatch === null) return null;
|
|
43932
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
43932
|
+
const { createIssueTriage } = await import("./issue-triage-APE6L5YP.js");
|
|
43933
43933
|
const triage = createIssueTriage();
|
|
43934
43934
|
const owner = issueMatch[1] ?? "";
|
|
43935
43935
|
const num = issueMatch[2] ?? "";
|
|
@@ -43957,7 +43957,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
43957
43957
|
]);
|
|
43958
43958
|
async function classifyWithLLM(task) {
|
|
43959
43959
|
try {
|
|
43960
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
43960
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-B6ZTEZNH.js");
|
|
43961
43961
|
const prompt = [
|
|
43962
43962
|
"Classify this task into exactly one pipeline template.",
|
|
43963
43963
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -45698,7 +45698,7 @@ var memoryInitPromise = null;
|
|
|
45698
45698
|
async function initPipelineMemory() {
|
|
45699
45699
|
if (cachedMemory !== null) return cachedMemory;
|
|
45700
45700
|
try {
|
|
45701
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
45701
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-LYX5N2IP.js");
|
|
45702
45702
|
const { getLearningDir } = await import("./learning-persistence-EGY4VKKO.js");
|
|
45703
45703
|
const mem = createSessionMemory2(getLearningDir());
|
|
45704
45704
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
@@ -45760,7 +45760,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
45760
45760
|
callRecord(routingMemoryCache);
|
|
45761
45761
|
return;
|
|
45762
45762
|
}
|
|
45763
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
45763
|
+
routingMemoryInitPromise ??= import("./routing-memory-WU4C63BA.js").then(({ createRoutingMemory }) => {
|
|
45764
45764
|
routingMemoryCache ??= createRoutingMemory();
|
|
45765
45765
|
return routingMemoryCache;
|
|
45766
45766
|
}).catch((error) => {
|
|
@@ -45794,7 +45794,7 @@ ${text}` : "";
|
|
|
45794
45794
|
}
|
|
45795
45795
|
async function getWeatherContext() {
|
|
45796
45796
|
try {
|
|
45797
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
45797
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-QLHSZQOT.js");
|
|
45798
45798
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
45799
45799
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
45800
45800
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -45812,7 +45812,7 @@ ${lines}
|
|
|
45812
45812
|
}
|
|
45813
45813
|
async function getMemoryContext(task) {
|
|
45814
45814
|
try {
|
|
45815
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
45815
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-LYX5N2IP.js");
|
|
45816
45816
|
const { getLearningDir } = await import("./learning-persistence-EGY4VKKO.js");
|
|
45817
45817
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
45818
45818
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
@@ -45931,7 +45931,7 @@ ${contextBlock}`;
|
|
|
45931
45931
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
45932
45932
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
45933
45933
|
try {
|
|
45934
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
45934
|
+
const { executeVoting } = await import("./consensus-vote-ZRLZYJ4D.js");
|
|
45935
45935
|
const votingResult = await executeVoting(
|
|
45936
45936
|
{
|
|
45937
45937
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -46370,7 +46370,7 @@ async function searchCodebaseForTask(task) {
|
|
|
46370
46370
|
}
|
|
46371
46371
|
async function queryResearchRegistry(task) {
|
|
46372
46372
|
try {
|
|
46373
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
46373
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-C4GK3GU4.js");
|
|
46374
46374
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
46375
46375
|
if (topic === void 0) return null;
|
|
46376
46376
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -46441,7 +46441,7 @@ function createScanStageWrapper() {
|
|
|
46441
46441
|
try {
|
|
46442
46442
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
46443
46443
|
if (slug !== void 0) {
|
|
46444
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
46444
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-C4ZSWVY7.js");
|
|
46445
46445
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
46446
46446
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
46447
46447
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -48663,102 +48663,101 @@ function registerSuggestResearchTasksTool(server, deps) {
|
|
|
48663
48663
|
import { z as z107 } from "zod";
|
|
48664
48664
|
import { randomUUID as randomUUID17 } from "crypto";
|
|
48665
48665
|
|
|
48666
|
-
// src/orchestration/meta-
|
|
48667
|
-
|
|
48668
|
-
|
|
48669
|
-
|
|
48670
|
-
|
|
48671
|
-
|
|
48672
|
-
|
|
48673
|
-
|
|
48674
|
-
|
|
48675
|
-
|
|
48676
|
-
|
|
48677
|
-
const { pipelineType } = classification;
|
|
48678
|
-
const selection = selectStrategyByManifest({
|
|
48679
|
-
pattern,
|
|
48680
|
-
pipelineType,
|
|
48681
|
-
complexity: analysis.complexity
|
|
48682
|
-
});
|
|
48683
|
-
if (selection === void 0) {
|
|
48684
|
-
const fallback = "orchestrate";
|
|
48685
|
-
return {
|
|
48686
|
-
strategy: fallback,
|
|
48687
|
-
reasoning: `No manifest rule matched pattern "${pattern}" \u2014 structural fallback to ${fallback}`,
|
|
48688
|
-
confidence: routing.confidence,
|
|
48689
|
-
manifestId: fallback,
|
|
48690
|
-
manifestSchemaVersion: 0
|
|
48691
|
-
};
|
|
48666
|
+
// src/orchestration/meta-dispatcher.ts
|
|
48667
|
+
var MetaDispatchError = class extends Error {
|
|
48668
|
+
code;
|
|
48669
|
+
strategy;
|
|
48670
|
+
decisionId;
|
|
48671
|
+
constructor(code, strategy, decisionId, message, options) {
|
|
48672
|
+
super(message, options);
|
|
48673
|
+
this.name = "MetaDispatchError";
|
|
48674
|
+
this.code = code;
|
|
48675
|
+
this.strategy = strategy;
|
|
48676
|
+
this.decisionId = decisionId;
|
|
48692
48677
|
}
|
|
48693
|
-
|
|
48678
|
+
};
|
|
48679
|
+
function createAuditLogOutcomeSink(logger59) {
|
|
48694
48680
|
return {
|
|
48695
|
-
|
|
48696
|
-
|
|
48697
|
-
|
|
48698
|
-
manifestId: selection.manifest.id,
|
|
48699
|
-
manifestSchemaVersion: selection.manifest.schemaVersion
|
|
48681
|
+
recordOutcome(record) {
|
|
48682
|
+
logger59.info("MetaDispatcher execution outcome", { ...record });
|
|
48683
|
+
}
|
|
48700
48684
|
};
|
|
48701
48685
|
}
|
|
48702
|
-
function
|
|
48703
|
-
|
|
48704
|
-
pattern: routing.pattern,
|
|
48705
|
-
pipelineType: classification.pipelineType,
|
|
48706
|
-
complexity: routing.analysis.complexity
|
|
48707
|
-
});
|
|
48708
|
-
return ranked.filter((s) => s !== chosen);
|
|
48686
|
+
function errorMessage(err2) {
|
|
48687
|
+
return err2 instanceof Error ? err2.message : String(err2);
|
|
48709
48688
|
}
|
|
48710
|
-
|
|
48711
|
-
|
|
48712
|
-
|
|
48713
|
-
|
|
48714
|
-
|
|
48715
|
-
|
|
48716
|
-
|
|
48717
|
-
...
|
|
48689
|
+
function recordOutcome2(deps, decision, start, success, failureReason) {
|
|
48690
|
+
const record = {
|
|
48691
|
+
decisionId: decision.decisionId,
|
|
48692
|
+
timestamp: new Date(getTimeProvider().now()).toISOString(),
|
|
48693
|
+
strategy: decision.strategy,
|
|
48694
|
+
success,
|
|
48695
|
+
durationMs: Math.max(0, getTimeProvider().now() - start),
|
|
48696
|
+
...failureReason !== void 0 ? { failureReason } : {}
|
|
48718
48697
|
};
|
|
48698
|
+
deps.outcomeSink.recordOutcome(record);
|
|
48699
|
+
if (deps.onOutcome !== void 0) {
|
|
48700
|
+
try {
|
|
48701
|
+
deps.onOutcome(record, decision);
|
|
48702
|
+
} catch (err2) {
|
|
48703
|
+
deps.logger.warn("MetaDispatcher onOutcome observer threw (ignored)", {
|
|
48704
|
+
decisionId: decision.decisionId,
|
|
48705
|
+
error: errorMessage(err2)
|
|
48706
|
+
});
|
|
48707
|
+
}
|
|
48708
|
+
}
|
|
48719
48709
|
}
|
|
48720
|
-
function
|
|
48721
|
-
const
|
|
48722
|
-
|
|
48723
|
-
|
|
48724
|
-
|
|
48725
|
-
|
|
48726
|
-
|
|
48727
|
-
|
|
48728
|
-
|
|
48729
|
-
|
|
48730
|
-
|
|
48731
|
-
|
|
48710
|
+
async function dispatchDecision(decision, input, deps) {
|
|
48711
|
+
const { strategy, decisionId } = decision;
|
|
48712
|
+
const start = getTimeProvider().now();
|
|
48713
|
+
const executor = deps.executors[strategy];
|
|
48714
|
+
if (executor === void 0) {
|
|
48715
|
+
const reason = `No executor registered for strategy "${strategy}"`;
|
|
48716
|
+
recordOutcome2(deps, decision, start, false, reason);
|
|
48717
|
+
deps.logger.error("MetaDispatcher dispatch failed", void 0, {
|
|
48718
|
+
decisionId,
|
|
48719
|
+
strategy,
|
|
48720
|
+
reason
|
|
48721
|
+
});
|
|
48722
|
+
throw new MetaDispatchError("no_executor", strategy, decisionId, reason);
|
|
48723
|
+
}
|
|
48724
|
+
try {
|
|
48725
|
+
const result = await executor(decision, input);
|
|
48726
|
+
recordOutcome2(deps, decision, start, true);
|
|
48727
|
+
return {
|
|
48728
|
+
decisionId,
|
|
48729
|
+
strategy,
|
|
48730
|
+
durationMs: Math.max(0, getTimeProvider().now() - start),
|
|
48731
|
+
result
|
|
48732
|
+
};
|
|
48733
|
+
} catch (err2) {
|
|
48734
|
+
const reason = errorMessage(err2);
|
|
48735
|
+
recordOutcome2(deps, decision, start, false, reason);
|
|
48736
|
+
deps.logger.error(
|
|
48737
|
+
"MetaDispatcher strategy executor threw",
|
|
48738
|
+
err2 instanceof Error ? err2 : void 0,
|
|
48739
|
+
{
|
|
48740
|
+
decisionId,
|
|
48741
|
+
strategy,
|
|
48742
|
+
reason
|
|
48743
|
+
}
|
|
48744
|
+
);
|
|
48745
|
+
throw new MetaDispatchError("executor_failed", strategy, decisionId, reason, { cause: err2 });
|
|
48746
|
+
}
|
|
48732
48747
|
}
|
|
48733
|
-
function
|
|
48734
|
-
const
|
|
48735
|
-
const
|
|
48736
|
-
|
|
48737
|
-
|
|
48738
|
-
|
|
48739
|
-
|
|
48740
|
-
|
|
48741
|
-
needsShaping,
|
|
48742
|
-
manifestId: core.manifestId,
|
|
48743
|
-
manifestSchemaVersion: core.manifestSchemaVersion,
|
|
48744
|
-
...needsShaping && routing.suggestedQuestions !== void 0 ? { shapingQuestions: routing.suggestedQuestions } : {},
|
|
48745
|
-
...subSignals(routing, classification)
|
|
48748
|
+
function createMetaDispatcher(options) {
|
|
48749
|
+
const logger59 = options.logger ?? createLogger({ component: "MetaDispatcher" });
|
|
48750
|
+
const outcomeSink = options.outcomeSink ?? createAuditLogOutcomeSink(logger59);
|
|
48751
|
+
const deps = {
|
|
48752
|
+
executors: options.executors,
|
|
48753
|
+
outcomeSink,
|
|
48754
|
+
logger: logger59,
|
|
48755
|
+
onOutcome: options.onOutcome
|
|
48746
48756
|
};
|
|
48747
|
-
}
|
|
48748
|
-
function toRecord(decision, goal, forced, timestamp) {
|
|
48749
48757
|
return {
|
|
48750
|
-
|
|
48751
|
-
|
|
48752
|
-
|
|
48753
|
-
strategy: decision.strategy,
|
|
48754
|
-
confidence: decision.confidence,
|
|
48755
|
-
pattern: decision.pattern,
|
|
48756
|
-
pipelineType: decision.pipelineType,
|
|
48757
|
-
alternatives: decision.alternatives,
|
|
48758
|
-
needsShaping: decision.needsShaping,
|
|
48759
|
-
forced,
|
|
48760
|
-
manifestId: decision.manifestId,
|
|
48761
|
-
manifestSchemaVersion: decision.manifestSchemaVersion
|
|
48758
|
+
dispatch(decision, input) {
|
|
48759
|
+
return dispatchDecision(decision, input, deps);
|
|
48760
|
+
}
|
|
48762
48761
|
};
|
|
48763
48762
|
}
|
|
48764
48763
|
|
|
@@ -48855,6 +48854,129 @@ function guardExecuteEnvelope(strategy) {
|
|
|
48855
48854
|
return decision.envelope;
|
|
48856
48855
|
}
|
|
48857
48856
|
|
|
48857
|
+
// src/mcp/tools/run-tool-dry-run.ts
|
|
48858
|
+
var DRY_RUN_CAPABLE = "dev-pipeline";
|
|
48859
|
+
var DryRunUnsupportedError = class extends Error {
|
|
48860
|
+
constructor(strategy) {
|
|
48861
|
+
super(
|
|
48862
|
+
`dryRun is not supported by the '${strategy}' strategy \u2014 only '${DRY_RUN_CAPABLE}' stops after plan+vote. Refusing rather than running for real. Re-run without dryRun, or force the ${DRY_RUN_CAPABLE} strategy.`
|
|
48863
|
+
);
|
|
48864
|
+
this.strategy = strategy;
|
|
48865
|
+
this.name = "DryRunUnsupportedError";
|
|
48866
|
+
}
|
|
48867
|
+
strategy;
|
|
48868
|
+
};
|
|
48869
|
+
function assertDryRunSupported(dryRun, strategy) {
|
|
48870
|
+
if (dryRun === true && strategy !== DRY_RUN_CAPABLE) {
|
|
48871
|
+
throw new DryRunUnsupportedError(strategy);
|
|
48872
|
+
}
|
|
48873
|
+
}
|
|
48874
|
+
function classifyDispatchError(err2) {
|
|
48875
|
+
const noExecutor = err2 instanceof MetaDispatchError && err2.code === "no_executor";
|
|
48876
|
+
const refused = err2 instanceof AuthorityRefusalError;
|
|
48877
|
+
const dryRunUnsupported = err2 instanceof DryRunUnsupportedError;
|
|
48878
|
+
return noExecutor || refused || dryRunUnsupported ? "business" : "internal";
|
|
48879
|
+
}
|
|
48880
|
+
|
|
48881
|
+
// src/orchestration/meta-orchestrator.ts
|
|
48882
|
+
import { randomUUID as randomUUID14 } from "crypto";
|
|
48883
|
+
|
|
48884
|
+
// src/orchestration/meta-orchestrator-routing.ts
|
|
48885
|
+
function reasoningFor(selection, routing) {
|
|
48886
|
+
const { manifest, rule } = selection;
|
|
48887
|
+
const cause = rule.pipelineTypes !== void 0 && rule.patterns === void 0 ? `pipeline template "${rule.pipelineTypes.join("/")}"` : rule.pipelineTypes !== void 0 ? `pipeline template "${rule.pipelineTypes.join("/")}" under pattern "${routing.pattern}"` : `pattern "${routing.pattern}"`;
|
|
48888
|
+
return `${cause} \u2192 ${manifest.strategy} (manifest ${manifest.id}; ${routing.reasoning})`;
|
|
48889
|
+
}
|
|
48890
|
+
function decideStrategy(routing, classification) {
|
|
48891
|
+
const { pattern, analysis } = routing;
|
|
48892
|
+
const { pipelineType } = classification;
|
|
48893
|
+
const selection = selectStrategyByManifest({
|
|
48894
|
+
pattern,
|
|
48895
|
+
pipelineType,
|
|
48896
|
+
complexity: analysis.complexity
|
|
48897
|
+
});
|
|
48898
|
+
if (selection === void 0) {
|
|
48899
|
+
const fallback = "orchestrate";
|
|
48900
|
+
return {
|
|
48901
|
+
strategy: fallback,
|
|
48902
|
+
reasoning: `No manifest rule matched pattern "${pattern}" \u2014 structural fallback to ${fallback}`,
|
|
48903
|
+
confidence: routing.confidence,
|
|
48904
|
+
manifestId: fallback,
|
|
48905
|
+
manifestSchemaVersion: 0
|
|
48906
|
+
};
|
|
48907
|
+
}
|
|
48908
|
+
const fromTemplate = selection.rule.pipelineTypes !== void 0;
|
|
48909
|
+
return {
|
|
48910
|
+
strategy: selection.strategy,
|
|
48911
|
+
reasoning: reasoningFor(selection, routing),
|
|
48912
|
+
confidence: fromTemplate ? classification.confidence : routing.confidence,
|
|
48913
|
+
manifestId: selection.manifest.id,
|
|
48914
|
+
manifestSchemaVersion: selection.manifest.schemaVersion
|
|
48915
|
+
};
|
|
48916
|
+
}
|
|
48917
|
+
function buildAlternatives(chosen, routing, classification) {
|
|
48918
|
+
const ranked = rankStrategiesByManifest({
|
|
48919
|
+
pattern: routing.pattern,
|
|
48920
|
+
pipelineType: classification.pipelineType,
|
|
48921
|
+
complexity: routing.analysis.complexity
|
|
48922
|
+
});
|
|
48923
|
+
return ranked.filter((s) => s !== chosen);
|
|
48924
|
+
}
|
|
48925
|
+
|
|
48926
|
+
// src/orchestration/meta-orchestrator-decision.ts
|
|
48927
|
+
function subSignals(routing, classification) {
|
|
48928
|
+
return {
|
|
48929
|
+
pattern: routing.pattern,
|
|
48930
|
+
pipelineType: classification.pipelineType,
|
|
48931
|
+
analysis: routing.analysis,
|
|
48932
|
+
...routing.capabilityGaps !== void 0 ? { capabilityGaps: routing.capabilityGaps } : {}
|
|
48933
|
+
};
|
|
48934
|
+
}
|
|
48935
|
+
function buildForcedDecision(forced, routing, classification) {
|
|
48936
|
+
const manifest = getStrategyManifest(forced);
|
|
48937
|
+
return {
|
|
48938
|
+
strategy: forced,
|
|
48939
|
+
reasoning: `Strategy forced by caller: ${forced} (entrypoint ${entrypointToolFor(forced)})`,
|
|
48940
|
+
confidence: 1,
|
|
48941
|
+
alternatives: buildAlternatives(forced, routing, classification),
|
|
48942
|
+
needsShaping: false,
|
|
48943
|
+
manifestId: manifest?.id ?? forced,
|
|
48944
|
+
manifestSchemaVersion: manifest?.schemaVersion ?? 0,
|
|
48945
|
+
...subSignals(routing, classification)
|
|
48946
|
+
};
|
|
48947
|
+
}
|
|
48948
|
+
function buildSelectedDecision(routing, classification) {
|
|
48949
|
+
const core = decideStrategy(routing, classification);
|
|
48950
|
+
const needsShaping = routing.needsClarification === true;
|
|
48951
|
+
return {
|
|
48952
|
+
strategy: core.strategy,
|
|
48953
|
+
reasoning: core.reasoning,
|
|
48954
|
+
confidence: core.confidence,
|
|
48955
|
+
alternatives: buildAlternatives(core.strategy, routing, classification),
|
|
48956
|
+
needsShaping,
|
|
48957
|
+
manifestId: core.manifestId,
|
|
48958
|
+
manifestSchemaVersion: core.manifestSchemaVersion,
|
|
48959
|
+
...needsShaping && routing.suggestedQuestions !== void 0 ? { shapingQuestions: routing.suggestedQuestions } : {},
|
|
48960
|
+
...subSignals(routing, classification)
|
|
48961
|
+
};
|
|
48962
|
+
}
|
|
48963
|
+
function toRecord(decision, goal, forced, timestamp) {
|
|
48964
|
+
return {
|
|
48965
|
+
decisionId: decision.decisionId,
|
|
48966
|
+
timestamp,
|
|
48967
|
+
goal,
|
|
48968
|
+
strategy: decision.strategy,
|
|
48969
|
+
confidence: decision.confidence,
|
|
48970
|
+
pattern: decision.pattern,
|
|
48971
|
+
pipelineType: decision.pipelineType,
|
|
48972
|
+
alternatives: decision.alternatives,
|
|
48973
|
+
needsShaping: decision.needsShaping,
|
|
48974
|
+
forced,
|
|
48975
|
+
manifestId: decision.manifestId,
|
|
48976
|
+
manifestSchemaVersion: decision.manifestSchemaVersion
|
|
48977
|
+
};
|
|
48978
|
+
}
|
|
48979
|
+
|
|
48858
48980
|
// src/orchestration/meta-orchestrator.ts
|
|
48859
48981
|
function createAuditLogSink(logger59) {
|
|
48860
48982
|
return {
|
|
@@ -49417,104 +49539,6 @@ function evaluateMetaStrategyReadiness(result, config = DEFAULT_META_STRATEGY_RE
|
|
|
49417
49539
|
return { ready: blockers.length === 0, criteria, blockers };
|
|
49418
49540
|
}
|
|
49419
49541
|
|
|
49420
|
-
// src/orchestration/meta-dispatcher.ts
|
|
49421
|
-
var MetaDispatchError = class extends Error {
|
|
49422
|
-
code;
|
|
49423
|
-
strategy;
|
|
49424
|
-
decisionId;
|
|
49425
|
-
constructor(code, strategy, decisionId, message, options) {
|
|
49426
|
-
super(message, options);
|
|
49427
|
-
this.name = "MetaDispatchError";
|
|
49428
|
-
this.code = code;
|
|
49429
|
-
this.strategy = strategy;
|
|
49430
|
-
this.decisionId = decisionId;
|
|
49431
|
-
}
|
|
49432
|
-
};
|
|
49433
|
-
function createAuditLogOutcomeSink(logger59) {
|
|
49434
|
-
return {
|
|
49435
|
-
recordOutcome(record) {
|
|
49436
|
-
logger59.info("MetaDispatcher execution outcome", { ...record });
|
|
49437
|
-
}
|
|
49438
|
-
};
|
|
49439
|
-
}
|
|
49440
|
-
function errorMessage(err2) {
|
|
49441
|
-
return err2 instanceof Error ? err2.message : String(err2);
|
|
49442
|
-
}
|
|
49443
|
-
function recordOutcome2(deps, decision, start, success, failureReason) {
|
|
49444
|
-
const record = {
|
|
49445
|
-
decisionId: decision.decisionId,
|
|
49446
|
-
timestamp: new Date(getTimeProvider().now()).toISOString(),
|
|
49447
|
-
strategy: decision.strategy,
|
|
49448
|
-
success,
|
|
49449
|
-
durationMs: Math.max(0, getTimeProvider().now() - start),
|
|
49450
|
-
...failureReason !== void 0 ? { failureReason } : {}
|
|
49451
|
-
};
|
|
49452
|
-
deps.outcomeSink.recordOutcome(record);
|
|
49453
|
-
if (deps.onOutcome !== void 0) {
|
|
49454
|
-
try {
|
|
49455
|
-
deps.onOutcome(record, decision);
|
|
49456
|
-
} catch (err2) {
|
|
49457
|
-
deps.logger.warn("MetaDispatcher onOutcome observer threw (ignored)", {
|
|
49458
|
-
decisionId: decision.decisionId,
|
|
49459
|
-
error: errorMessage(err2)
|
|
49460
|
-
});
|
|
49461
|
-
}
|
|
49462
|
-
}
|
|
49463
|
-
}
|
|
49464
|
-
async function dispatchDecision(decision, input, deps) {
|
|
49465
|
-
const { strategy, decisionId } = decision;
|
|
49466
|
-
const start = getTimeProvider().now();
|
|
49467
|
-
const executor = deps.executors[strategy];
|
|
49468
|
-
if (executor === void 0) {
|
|
49469
|
-
const reason = `No executor registered for strategy "${strategy}"`;
|
|
49470
|
-
recordOutcome2(deps, decision, start, false, reason);
|
|
49471
|
-
deps.logger.error("MetaDispatcher dispatch failed", void 0, {
|
|
49472
|
-
decisionId,
|
|
49473
|
-
strategy,
|
|
49474
|
-
reason
|
|
49475
|
-
});
|
|
49476
|
-
throw new MetaDispatchError("no_executor", strategy, decisionId, reason);
|
|
49477
|
-
}
|
|
49478
|
-
try {
|
|
49479
|
-
const result = await executor(decision, input);
|
|
49480
|
-
recordOutcome2(deps, decision, start, true);
|
|
49481
|
-
return {
|
|
49482
|
-
decisionId,
|
|
49483
|
-
strategy,
|
|
49484
|
-
durationMs: Math.max(0, getTimeProvider().now() - start),
|
|
49485
|
-
result
|
|
49486
|
-
};
|
|
49487
|
-
} catch (err2) {
|
|
49488
|
-
const reason = errorMessage(err2);
|
|
49489
|
-
recordOutcome2(deps, decision, start, false, reason);
|
|
49490
|
-
deps.logger.error(
|
|
49491
|
-
"MetaDispatcher strategy executor threw",
|
|
49492
|
-
err2 instanceof Error ? err2 : void 0,
|
|
49493
|
-
{
|
|
49494
|
-
decisionId,
|
|
49495
|
-
strategy,
|
|
49496
|
-
reason
|
|
49497
|
-
}
|
|
49498
|
-
);
|
|
49499
|
-
throw new MetaDispatchError("executor_failed", strategy, decisionId, reason, { cause: err2 });
|
|
49500
|
-
}
|
|
49501
|
-
}
|
|
49502
|
-
function createMetaDispatcher(options) {
|
|
49503
|
-
const logger59 = options.logger ?? createLogger({ component: "MetaDispatcher" });
|
|
49504
|
-
const outcomeSink = options.outcomeSink ?? createAuditLogOutcomeSink(logger59);
|
|
49505
|
-
const deps = {
|
|
49506
|
-
executors: options.executors,
|
|
49507
|
-
outcomeSink,
|
|
49508
|
-
logger: logger59,
|
|
49509
|
-
onOutcome: options.onOutcome
|
|
49510
|
-
};
|
|
49511
|
-
return {
|
|
49512
|
-
dispatch(decision, input) {
|
|
49513
|
-
return dispatchDecision(decision, input, deps);
|
|
49514
|
-
}
|
|
49515
|
-
};
|
|
49516
|
-
}
|
|
49517
|
-
|
|
49518
49542
|
// src/mcp/tools/dev-pipeline-tool.ts
|
|
49519
49543
|
import { z as z105 } from "zod";
|
|
49520
49544
|
import * as fs11 from "fs";
|
|
@@ -49540,7 +49564,7 @@ var GitHubTaskTracker = class {
|
|
|
49540
49564
|
cachedProvider = null;
|
|
49541
49565
|
async getProvider() {
|
|
49542
49566
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
49543
|
-
const { createScmProvider } = await import("./factory-
|
|
49567
|
+
const { createScmProvider } = await import("./factory-RLGGFLYD.js");
|
|
49544
49568
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
49545
49569
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
49546
49570
|
this.cachedProvider = result.value;
|
|
@@ -49770,8 +49794,11 @@ async function createStages(input, trustTier) {
|
|
|
49770
49794
|
}
|
|
49771
49795
|
});
|
|
49772
49796
|
}
|
|
49773
|
-
async function runDevPipelineForGoal(goal, trustTier) {
|
|
49774
|
-
const input = DevPipelineInputSchema.parse({
|
|
49797
|
+
async function runDevPipelineForGoal(goal, trustTier, dryRun) {
|
|
49798
|
+
const input = DevPipelineInputSchema.parse({
|
|
49799
|
+
task: goal,
|
|
49800
|
+
...dryRun !== void 0 ? { dryRun } : {}
|
|
49801
|
+
});
|
|
49775
49802
|
const stages = await createStages(input, trustTier);
|
|
49776
49803
|
return runDevPipeline(goal, stages, trustTier !== void 0 ? { trustTier } : void 0);
|
|
49777
49804
|
}
|
|
@@ -50131,6 +50158,21 @@ var RunInputSchema = z107.object({
|
|
|
50131
50158
|
execute: z107.boolean().optional().describe(
|
|
50132
50159
|
"When true, actually run the selected strategy (if an executor is wired) and return its result; otherwise return the routing decision only (default false, read-only)."
|
|
50133
50160
|
),
|
|
50161
|
+
/**
|
|
50162
|
+
* Plan and vote without implementing (#4806).
|
|
50163
|
+
*
|
|
50164
|
+
* `run` is the documented default entry point, but until now it could not
|
|
50165
|
+
* express the cautious caller's first request — "show me the plan, don't
|
|
50166
|
+
* build it". `execute: false` is not a substitute: that returns the SELECTED
|
|
50167
|
+
* STRATEGY, having done no planning and no voting.
|
|
50168
|
+
*
|
|
50169
|
+
* Only the dev-pipeline strategy can honour it. When the router selects any
|
|
50170
|
+
* other, the call is REFUSED rather than executed: silently ignoring a
|
|
50171
|
+
* do-not-act flag is the one outcome a governance substrate cannot allow.
|
|
50172
|
+
*/
|
|
50173
|
+
dryRun: z107.boolean().optional().describe(
|
|
50174
|
+
"Plan and vote only, no implementation (#4806). Requires the dev-pipeline strategy \u2014 refused (never silently executed) when the router selects another."
|
|
50175
|
+
),
|
|
50134
50176
|
/**
|
|
50135
50177
|
* Dispatch mode (#3732). Only meaningful with `execute: true` — `run`
|
|
50136
50178
|
* dispatches the heaviest engines (dev-pipeline/pipeline), which can exceed
|
|
@@ -50203,9 +50245,9 @@ function routeGoal(input, logger59) {
|
|
|
50203
50245
|
note: NOTE
|
|
50204
50246
|
};
|
|
50205
50247
|
}
|
|
50206
|
-
function buildDefaultExecutors(trustTier, gatewayAdapters) {
|
|
50248
|
+
function buildDefaultExecutors(trustTier, gatewayAdapters, dryRun) {
|
|
50207
50249
|
return {
|
|
50208
|
-
"dev-pipeline": (_decision, metaInput) => runDevPipelineForGoal(metaInput.goal, trustTier),
|
|
50250
|
+
"dev-pipeline": (_decision, metaInput) => runDevPipelineForGoal(metaInput.goal, trustTier, dryRun),
|
|
50209
50251
|
pipeline: (_decision, metaInput) => runPipelineForGoal(metaInput.goal),
|
|
50210
50252
|
// #3988: `research` deliberately ALIASES the `pipeline` engine — it runs the
|
|
50211
50253
|
// SAME generic stage registry (selectStageRegistry only branches greenfield/
|
|
@@ -50238,9 +50280,10 @@ function buildShadowTrainObserver(logger59) {
|
|
|
50238
50280
|
}
|
|
50239
50281
|
async function executeGoal(input, opts = {}) {
|
|
50240
50282
|
const decision = selectDecision(input, "execute", opts.logger);
|
|
50283
|
+
assertDryRunSupported(input.dryRun, decision.strategy);
|
|
50241
50284
|
const onOutcome = opts.onOutcome ?? buildShadowTrainObserver(opts.logger);
|
|
50242
50285
|
const dispatcher = createMetaDispatcher({
|
|
50243
|
-
executors: opts.executors ?? buildDefaultExecutors(opts.trustTier, opts.gatewayAdapters),
|
|
50286
|
+
executors: opts.executors ?? buildDefaultExecutors(opts.trustTier, opts.gatewayAdapters, input.dryRun),
|
|
50244
50287
|
...opts.logger !== void 0 ? { logger: opts.logger } : {},
|
|
50245
50288
|
...opts.outcomeSink !== void 0 ? { outcomeSink: opts.outcomeSink } : {},
|
|
50246
50289
|
...onOutcome !== void 0 ? { onOutcome } : {}
|
|
@@ -50306,10 +50349,8 @@ async function executeRunBody(input, logger59, trustTier, gatewayAdapters) {
|
|
|
50306
50349
|
}
|
|
50307
50350
|
return toolSuccess(JSON.stringify(exec2, null, 2));
|
|
50308
50351
|
} catch (err2) {
|
|
50309
|
-
const noExecutor = err2 instanceof MetaDispatchError && err2.code === "no_executor";
|
|
50310
|
-
const refused = err2 instanceof AuthorityRefusalError;
|
|
50311
50352
|
return toolStructuredError({
|
|
50312
|
-
errorCategory:
|
|
50353
|
+
errorCategory: classifyDispatchError(err2),
|
|
50313
50354
|
message: err2 instanceof Error ? err2.message : String(err2)
|
|
50314
50355
|
});
|
|
50315
50356
|
}
|
|
@@ -50414,7 +50455,7 @@ async function probeSource(source, includeModelIds) {
|
|
|
50414
50455
|
}
|
|
50415
50456
|
}
|
|
50416
50457
|
async function defaultSources(includeOpenRouter) {
|
|
50417
|
-
const { createAllAdapters: createAllAdapters2 } = await import("./factory-
|
|
50458
|
+
const { createAllAdapters: createAllAdapters2 } = await import("./factory-5BEGXJVB.js");
|
|
50418
50459
|
const adapters = createAllAdapters2();
|
|
50419
50460
|
return buildDefaultModelSources(adapters, { includeOpenRouter });
|
|
50420
50461
|
}
|
|
@@ -54456,4 +54497,4 @@ export {
|
|
|
54456
54497
|
shutdownFeedbackSubscriber,
|
|
54457
54498
|
createEventBusBridge
|
|
54458
54499
|
};
|
|
54459
|
-
//# sourceMappingURL=chunk-
|
|
54500
|
+
//# sourceMappingURL=chunk-OHRCTQDC.js.map
|