nexus-agents 7.0.2 → 8.0.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-ORXLS5HP.js → child-mcp-config-V2ESGPZ4.js} +7 -7
- package/dist/{chunk-RBF64DXJ.js → chunk-2S7Q7GHX.js} +5 -5
- package/dist/{chunk-AGFXJUTS.js → chunk-3GMYW66U.js} +14 -14
- package/dist/{chunk-4OW67KT2.js → chunk-4HXPNLZS.js} +6 -6
- package/dist/{chunk-W4Q5NZYZ.js → chunk-4QHAMZLU.js} +3 -3
- package/dist/{chunk-KSQSWEFH.js → chunk-54Z2II7G.js} +21 -11
- package/dist/chunk-54Z2II7G.js.map +1 -0
- package/dist/{chunk-WLIXCNZ6.js → chunk-5FBPGOKA.js} +24 -24
- package/dist/chunk-5FBPGOKA.js.map +1 -0
- package/dist/{chunk-RSMG2DPB.js → chunk-64GMIUM5.js} +5 -5
- package/dist/{chunk-RLBJTZHA.js → chunk-AHTOZ2UR.js} +2 -2
- package/dist/{chunk-JNZ3D5B5.js → chunk-AL5E5T3O.js} +4 -4
- package/dist/{chunk-3CGUPSBW.js → chunk-BKAUGBSF.js} +2 -2
- package/dist/{chunk-XREG2HTQ.js → chunk-BSWLRSOG.js} +4 -4
- package/dist/{chunk-JJT7NVNY.js → chunk-CHU7NTUR.js} +4 -4
- package/dist/{chunk-UVO673OY.js → chunk-DBDXS7PE.js} +3 -3
- package/dist/{chunk-VYAXMVI5.js → chunk-DEYXS6IZ.js} +5 -5
- package/dist/{chunk-VYAXMVI5.js.map → chunk-DEYXS6IZ.js.map} +1 -1
- package/dist/{chunk-HFOQKCD2.js → chunk-DGWT7DXX.js} +3 -3
- package/dist/{chunk-HFOQKCD2.js.map → chunk-DGWT7DXX.js.map} +1 -1
- package/dist/{chunk-LVYRGNOC.js → chunk-DWUF5YWG.js} +2 -2
- package/dist/{chunk-VVXHIUFQ.js → chunk-EGWPONTU.js} +6 -6
- package/dist/{chunk-OHULIRP6.js → chunk-EXAULYXZ.js} +19 -19
- package/dist/{chunk-K2AWJGQO.js → chunk-FSY2TYFX.js} +8 -8
- package/dist/{chunk-6GYTTWNM.js → chunk-FVHUWXM2.js} +2 -2
- package/dist/{chunk-ZGEDIKAM.js → chunk-FW2FBZBD.js} +4 -4
- package/dist/{chunk-ZD4VEHEG.js → chunk-H6BUSSTF.js} +2 -2
- package/dist/{chunk-D6TL5GZV.js → chunk-HKKLVWRO.js} +5 -5
- package/dist/{chunk-GBHJ37V3.js → chunk-ITCKXMOH.js} +4 -4
- package/dist/{chunk-Y742U2YM.js → chunk-J7SPTP2E.js} +119 -104
- package/dist/chunk-J7SPTP2E.js.map +1 -0
- package/dist/{chunk-KJWD2V4K.js → chunk-JFE3JT5Q.js} +7 -7
- package/dist/chunk-KRG23W3T.js +7 -0
- package/dist/{chunk-33FI7W3G.js → chunk-L2PDPA23.js} +3 -3
- package/dist/{chunk-XZEYSIGG.js → chunk-LOKTE5WE.js} +4 -4
- package/dist/{chunk-KUYKSKPV.js → chunk-LOYIV3HG.js} +214 -219
- package/dist/chunk-LOYIV3HG.js.map +1 -0
- package/dist/{chunk-Q6IODDEA.js → chunk-LVSKLVYC.js} +12 -12
- package/dist/{chunk-Q6IODDEA.js.map → chunk-LVSKLVYC.js.map} +1 -1
- package/dist/{chunk-JEAKVUWM.js → chunk-M6E5E7QV.js} +3 -3
- package/dist/{chunk-OGHEKPLD.js → chunk-MM223CVS.js} +10 -10
- package/dist/{chunk-6Q3KSZVI.js → chunk-MWS56UFF.js} +2 -2
- package/dist/{chunk-GAYSJGKD.js → chunk-OYWFWMLH.js} +13 -13
- package/dist/{chunk-S2Z7CME3.js → chunk-PXJ6CB5V.js} +2 -2
- package/dist/{chunk-Y5GYBP52.js → chunk-QTDUIXOJ.js} +4 -4
- package/dist/{chunk-7U7HAYPB.js → chunk-R4B4UJ6F.js} +25 -59
- package/dist/chunk-R4B4UJ6F.js.map +1 -0
- package/dist/{chunk-QAHGHWC7.js → chunk-WIJ5J7AH.js} +23 -23
- package/dist/{chunk-BTWKDT4F.js → chunk-YJ7Q2NHE.js} +20 -20
- package/dist/{chunk-IWTK6FDT.js → chunk-ZTPBXWA7.js} +4 -4
- package/dist/{cli-circuit-breaker-5FYJDS5O.js → cli-circuit-breaker-YFHX4FN2.js} +5 -5
- package/dist/cli.js +378 -379
- package/dist/cli.js.map +1 -1
- package/dist/{codebase-search-RHBGEWXK.js → codebase-search-3D4TW3KR.js} +2 -2
- package/dist/{composite-router-GE24MYPP.js → composite-router-224FZMI2.js} +4 -4
- package/dist/{consensus-vote-62FAN4ZN.js → consensus-vote-57SKG3EN.js} +22 -22
- package/dist/{context-retriever-3OO6N4V6.js → context-retriever-CCVDD7TO.js} +12 -12
- package/dist/{dist-IKZ53APZ.js → dist-JK32DFHT.js} +2 -2
- package/dist/doctor-deep-37II5V7H.js +13 -0
- package/dist/{doctor-live-J7JIZH3T.js → doctor-live-VXQOZW37.js} +13 -13
- package/dist/{expert-bridge-PWRVRFDG.js → expert-bridge-7LGHU7IL.js} +6 -6
- package/dist/factory-5URERSHK.js +25 -0
- package/dist/factory-SF6ZPN6D.js +15 -0
- package/dist/{improvement-review-QUU5HR7Z.js → improvement-review-2AFBFUQX.js} +8 -8
- package/dist/index.d.ts +58 -56
- package/dist/index.js +65 -76
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-GDPE4U65.js → init-opencode-ZFCKUI2N.js} +10 -10
- package/dist/issue-triage-IVYGGNB4.js +17 -0
- package/dist/{learning-persistence-7O5QYDM7.js → learning-persistence-7N5SZHNX.js} +3 -3
- package/dist/{pr-reviewer-helpers-KBOP72XG.js → pr-reviewer-helpers-TS2HJMZR.js} +6 -6
- package/dist/{registry-command-ZK4NQ2MX.js → registry-command-M6LXKNEY.js} +7 -7
- package/dist/{repo-analyze-UJOWFGNM.js → repo-analyze-DI65XOTQ.js} +2 -2
- package/dist/{repo-security-plan-SZU4O2TN.js → repo-security-plan-LS5GCASE.js} +6 -6
- package/dist/research-helpers-synthesize-NQMSFDMD.js +14 -0
- package/dist/{routing-memory-2SMMUPTB.js → routing-memory-BBHAEJUL.js} +4 -4
- package/dist/{session-memory-YQQVPLKM.js → session-memory-GYIEP7MM.js} +5 -5
- package/dist/setup-config-YIQ7ZZT3.js +11 -0
- package/dist/{setup-custom-api-ZSBUIJID.js → setup-custom-api-CHISHJZV.js} +7 -7
- package/dist/setup-data-dir-KQKFLBKQ.js +29 -0
- package/dist/tool-memory-TGNVGKUT.js +22 -0
- package/dist/tool-memory-registry-adapters-35IPCJLV.js +12 -0
- package/dist/unified-registry-D4QCQ36Z.js +26 -0
- package/dist/{weather-report-6AVPMHHM.js → weather-report-ZLQGZUDL.js} +4 -4
- package/package.json +4 -8
- package/dist/chunk-37JIYDVH.js +0 -7
- package/dist/chunk-7U7HAYPB.js.map +0 -1
- package/dist/chunk-KSQSWEFH.js.map +0 -1
- package/dist/chunk-KUYKSKPV.js.map +0 -1
- package/dist/chunk-WLIXCNZ6.js.map +0 -1
- package/dist/chunk-Y742U2YM.js.map +0 -1
- package/dist/doctor-deep-6WHVRRVQ.js +0 -13
- package/dist/factory-3BZDQQYM.js +0 -25
- package/dist/factory-UFKRSADE.js +0 -15
- package/dist/issue-triage-2LNYGQRJ.js +0 -17
- package/dist/research-helpers-synthesize-QY3DDHTD.js +0 -14
- package/dist/setup-config-LMZE4IRV.js +0 -11
- package/dist/setup-data-dir-ZEH7TFA6.js +0 -29
- package/dist/tool-memory-GUPG2M25.js +0 -22
- package/dist/tool-memory-registry-adapters-IMRSOAAV.js +0 -12
- package/dist/unified-registry-RPT4O3XB.js +0 -26
- package/scripts/postinstall.js +0 -12
- /package/dist/{child-mcp-config-ORXLS5HP.js.map → child-mcp-config-V2ESGPZ4.js.map} +0 -0
- /package/dist/{chunk-RBF64DXJ.js.map → chunk-2S7Q7GHX.js.map} +0 -0
- /package/dist/{chunk-AGFXJUTS.js.map → chunk-3GMYW66U.js.map} +0 -0
- /package/dist/{chunk-4OW67KT2.js.map → chunk-4HXPNLZS.js.map} +0 -0
- /package/dist/{chunk-W4Q5NZYZ.js.map → chunk-4QHAMZLU.js.map} +0 -0
- /package/dist/{chunk-RSMG2DPB.js.map → chunk-64GMIUM5.js.map} +0 -0
- /package/dist/{chunk-RLBJTZHA.js.map → chunk-AHTOZ2UR.js.map} +0 -0
- /package/dist/{chunk-JNZ3D5B5.js.map → chunk-AL5E5T3O.js.map} +0 -0
- /package/dist/{chunk-3CGUPSBW.js.map → chunk-BKAUGBSF.js.map} +0 -0
- /package/dist/{chunk-XREG2HTQ.js.map → chunk-BSWLRSOG.js.map} +0 -0
- /package/dist/{chunk-JJT7NVNY.js.map → chunk-CHU7NTUR.js.map} +0 -0
- /package/dist/{chunk-UVO673OY.js.map → chunk-DBDXS7PE.js.map} +0 -0
- /package/dist/{chunk-LVYRGNOC.js.map → chunk-DWUF5YWG.js.map} +0 -0
- /package/dist/{chunk-VVXHIUFQ.js.map → chunk-EGWPONTU.js.map} +0 -0
- /package/dist/{chunk-OHULIRP6.js.map → chunk-EXAULYXZ.js.map} +0 -0
- /package/dist/{chunk-K2AWJGQO.js.map → chunk-FSY2TYFX.js.map} +0 -0
- /package/dist/{chunk-6GYTTWNM.js.map → chunk-FVHUWXM2.js.map} +0 -0
- /package/dist/{chunk-ZGEDIKAM.js.map → chunk-FW2FBZBD.js.map} +0 -0
- /package/dist/{chunk-ZD4VEHEG.js.map → chunk-H6BUSSTF.js.map} +0 -0
- /package/dist/{chunk-D6TL5GZV.js.map → chunk-HKKLVWRO.js.map} +0 -0
- /package/dist/{chunk-GBHJ37V3.js.map → chunk-ITCKXMOH.js.map} +0 -0
- /package/dist/{chunk-KJWD2V4K.js.map → chunk-JFE3JT5Q.js.map} +0 -0
- /package/dist/{chunk-37JIYDVH.js.map → chunk-KRG23W3T.js.map} +0 -0
- /package/dist/{chunk-33FI7W3G.js.map → chunk-L2PDPA23.js.map} +0 -0
- /package/dist/{chunk-XZEYSIGG.js.map → chunk-LOKTE5WE.js.map} +0 -0
- /package/dist/{chunk-JEAKVUWM.js.map → chunk-M6E5E7QV.js.map} +0 -0
- /package/dist/{chunk-OGHEKPLD.js.map → chunk-MM223CVS.js.map} +0 -0
- /package/dist/{chunk-6Q3KSZVI.js.map → chunk-MWS56UFF.js.map} +0 -0
- /package/dist/{chunk-GAYSJGKD.js.map → chunk-OYWFWMLH.js.map} +0 -0
- /package/dist/{chunk-S2Z7CME3.js.map → chunk-PXJ6CB5V.js.map} +0 -0
- /package/dist/{chunk-Y5GYBP52.js.map → chunk-QTDUIXOJ.js.map} +0 -0
- /package/dist/{chunk-QAHGHWC7.js.map → chunk-WIJ5J7AH.js.map} +0 -0
- /package/dist/{chunk-BTWKDT4F.js.map → chunk-YJ7Q2NHE.js.map} +0 -0
- /package/dist/{chunk-IWTK6FDT.js.map → chunk-ZTPBXWA7.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-5FYJDS5O.js.map → cli-circuit-breaker-YFHX4FN2.js.map} +0 -0
- /package/dist/{codebase-search-RHBGEWXK.js.map → codebase-search-3D4TW3KR.js.map} +0 -0
- /package/dist/{composite-router-GE24MYPP.js.map → composite-router-224FZMI2.js.map} +0 -0
- /package/dist/{consensus-vote-62FAN4ZN.js.map → consensus-vote-57SKG3EN.js.map} +0 -0
- /package/dist/{context-retriever-3OO6N4V6.js.map → context-retriever-CCVDD7TO.js.map} +0 -0
- /package/dist/{dist-IKZ53APZ.js.map → dist-JK32DFHT.js.map} +0 -0
- /package/dist/{doctor-deep-6WHVRRVQ.js.map → doctor-deep-37II5V7H.js.map} +0 -0
- /package/dist/{doctor-live-J7JIZH3T.js.map → doctor-live-VXQOZW37.js.map} +0 -0
- /package/dist/{expert-bridge-PWRVRFDG.js.map → expert-bridge-7LGHU7IL.js.map} +0 -0
- /package/dist/{factory-3BZDQQYM.js.map → factory-5URERSHK.js.map} +0 -0
- /package/dist/{factory-UFKRSADE.js.map → factory-SF6ZPN6D.js.map} +0 -0
- /package/dist/{improvement-review-QUU5HR7Z.js.map → improvement-review-2AFBFUQX.js.map} +0 -0
- /package/dist/{init-opencode-GDPE4U65.js.map → init-opencode-ZFCKUI2N.js.map} +0 -0
- /package/dist/{issue-triage-2LNYGQRJ.js.map → issue-triage-IVYGGNB4.js.map} +0 -0
- /package/dist/{learning-persistence-7O5QYDM7.js.map → learning-persistence-7N5SZHNX.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-KBOP72XG.js.map → pr-reviewer-helpers-TS2HJMZR.js.map} +0 -0
- /package/dist/{registry-command-ZK4NQ2MX.js.map → registry-command-M6LXKNEY.js.map} +0 -0
- /package/dist/{repo-analyze-UJOWFGNM.js.map → repo-analyze-DI65XOTQ.js.map} +0 -0
- /package/dist/{repo-security-plan-SZU4O2TN.js.map → repo-security-plan-LS5GCASE.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-QY3DDHTD.js.map → research-helpers-synthesize-NQMSFDMD.js.map} +0 -0
- /package/dist/{routing-memory-2SMMUPTB.js.map → routing-memory-BBHAEJUL.js.map} +0 -0
- /package/dist/{session-memory-YQQVPLKM.js.map → session-memory-GYIEP7MM.js.map} +0 -0
- /package/dist/{setup-config-LMZE4IRV.js.map → setup-config-YIQ7ZZT3.js.map} +0 -0
- /package/dist/{setup-custom-api-ZSBUIJID.js.map → setup-custom-api-CHISHJZV.js.map} +0 -0
- /package/dist/{setup-data-dir-ZEH7TFA6.js.map → setup-data-dir-KQKFLBKQ.js.map} +0 -0
- /package/dist/{tool-memory-GUPG2M25.js.map → tool-memory-TGNVGKUT.js.map} +0 -0
- /package/dist/{tool-memory-registry-adapters-IMRSOAAV.js.map → tool-memory-registry-adapters-35IPCJLV.js.map} +0 -0
- /package/dist/{unified-registry-RPT4O3XB.js.map → unified-registry-D4QCQ36Z.js.map} +0 -0
- /package/dist/{weather-report-6AVPMHHM.js.map → weather-report-ZLQGZUDL.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSecurityPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DEYXS6IZ.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzeGitHubRepo
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DGWT7DXX.js";
|
|
7
7
|
import {
|
|
8
8
|
CodebaseIndex,
|
|
9
9
|
DEFAULT_INDEX_MAX_DEPTH,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
extractSymbolIndexResult,
|
|
13
13
|
extractSymbols,
|
|
14
14
|
findSourceFiles
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-64GMIUM5.js";
|
|
16
16
|
import {
|
|
17
17
|
FINDING_SEVERITY_LEVELS,
|
|
18
18
|
SARIF_LEVEL_MAP,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
clampTaskTtl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5FBPGOKA.js";
|
|
25
25
|
import {
|
|
26
26
|
executeExpert
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JFE3JT5Q.js";
|
|
28
28
|
import {
|
|
29
29
|
JobStatusSchema,
|
|
30
30
|
VOTER_ROLES,
|
|
@@ -47,24 +47,24 @@ import {
|
|
|
47
47
|
simulationDeniedResult,
|
|
48
48
|
toJobSummary,
|
|
49
49
|
writeJobCancelled
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-EXAULYXZ.js";
|
|
51
51
|
import {
|
|
52
52
|
allOf
|
|
53
53
|
} from "./chunk-OQB3XC5O.js";
|
|
54
54
|
import {
|
|
55
55
|
normalizeTopicToCanonical,
|
|
56
56
|
synthesizeResearch
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-DBDXS7PE.js";
|
|
58
58
|
import {
|
|
59
59
|
IssueTriage
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LVSKLVYC.js";
|
|
61
61
|
import {
|
|
62
62
|
resolveEnvMode,
|
|
63
63
|
sanitizeInput
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-AHTOZ2UR.js";
|
|
65
65
|
import {
|
|
66
66
|
withPrerequisite
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-3GMYW66U.js";
|
|
68
68
|
import {
|
|
69
69
|
NOOP_NOTIFIER,
|
|
70
70
|
RateLimiter,
|
|
@@ -89,18 +89,18 @@ import {
|
|
|
89
89
|
withAuditTrail,
|
|
90
90
|
withProgressHeartbeat,
|
|
91
91
|
wrapToolWithTimeout
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-OYWFWMLH.js";
|
|
93
93
|
import {
|
|
94
94
|
createAuditTrail,
|
|
95
95
|
createGraphAuditBridge,
|
|
96
96
|
emitPipelinePolicyEvent
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-MWS56UFF.js";
|
|
98
98
|
import {
|
|
99
99
|
EventTopics,
|
|
100
100
|
createEvent,
|
|
101
101
|
getGlobalEventBus,
|
|
102
102
|
getGlobalRegistry
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-HKKLVWRO.js";
|
|
104
104
|
import {
|
|
105
105
|
IDENTIFIER_RE,
|
|
106
106
|
LANG_VALUES,
|
|
@@ -133,29 +133,29 @@ import {
|
|
|
133
133
|
parseRegistry,
|
|
134
134
|
sourceExistsInRegistry,
|
|
135
135
|
summarizeContextForPrompt
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-WIJ5J7AH.js";
|
|
137
137
|
import {
|
|
138
138
|
loadPapersRegistry,
|
|
139
139
|
loadTechniquesRegistry,
|
|
140
140
|
resolveInsideRoot
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-FSY2TYFX.js";
|
|
142
142
|
import {
|
|
143
143
|
getTokenEnvVars,
|
|
144
144
|
resolveToken
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-LOKTE5WE.js";
|
|
146
146
|
import {
|
|
147
147
|
DEFAULT_RELEVANCE_CONFIG,
|
|
148
148
|
MemoryImportance,
|
|
149
149
|
calculateTextJaccardSimilarity,
|
|
150
150
|
getToolMemory
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-R4B4UJ6F.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-AL5E5T3O.js";
|
|
159
159
|
import {
|
|
160
160
|
BUILT_IN_EXPERTS,
|
|
161
161
|
BuiltInExpertTypeSchema,
|
|
@@ -164,7 +164,7 @@ import {
|
|
|
164
164
|
} from "./chunk-43SVUIPL.js";
|
|
165
165
|
import {
|
|
166
166
|
getMemoryRegistry
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-54Z2II7G.js";
|
|
168
168
|
import {
|
|
169
169
|
CliDetectionCache,
|
|
170
170
|
asRecord,
|
|
@@ -173,25 +173,25 @@ import {
|
|
|
173
173
|
getAvailableClis,
|
|
174
174
|
sleep,
|
|
175
175
|
withTimeout
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-YJ7Q2NHE.js";
|
|
177
177
|
import {
|
|
178
178
|
BaseAdapter,
|
|
179
179
|
createStream,
|
|
180
180
|
requireApiKey,
|
|
181
181
|
validateApiKeyPresence
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-DWUF5YWG.js";
|
|
183
183
|
import {
|
|
184
184
|
DEFAULTS
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-H6BUSSTF.js";
|
|
186
186
|
import {
|
|
187
187
|
getAvailabilityCache,
|
|
188
188
|
getCliForModelId,
|
|
189
189
|
resolveFallback
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-FVHUWXM2.js";
|
|
191
191
|
import {
|
|
192
192
|
generateHyphenId,
|
|
193
193
|
generateUUID
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-L2PDPA23.js";
|
|
195
195
|
import {
|
|
196
196
|
AGENT_ROUTER_TIMEOUTS,
|
|
197
197
|
API_TIMEOUTS,
|
|
@@ -297,18 +297,18 @@ import {
|
|
|
297
297
|
selectStrategyByManifest,
|
|
298
298
|
toExpertTaskAnalysisResult,
|
|
299
299
|
withStep
|
|
300
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-J7SPTP2E.js";
|
|
301
301
|
import {
|
|
302
302
|
ensureLearningDir,
|
|
303
303
|
getMetaOutcomesFile,
|
|
304
304
|
isPersistenceEnabled
|
|
305
|
-
} from "./chunk-
|
|
305
|
+
} from "./chunk-ITCKXMOH.js";
|
|
306
306
|
import {
|
|
307
307
|
findRepoRoot,
|
|
308
308
|
getNexusDataDir,
|
|
309
309
|
nexusDataPath,
|
|
310
310
|
nexusDataPathEnsure
|
|
311
|
-
} from "./chunk-
|
|
311
|
+
} from "./chunk-MM223CVS.js";
|
|
312
312
|
|
|
313
313
|
// src/config/schemas-core.ts
|
|
314
314
|
import { z } from "zod";
|
|
@@ -1416,8 +1416,8 @@ function getConfigManager() {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
|
|
1418
1418
|
// src/config/config-loader.ts
|
|
1419
|
-
import { readFileSync, existsSync } from "fs";
|
|
1420
|
-
import { resolve, join } from "path";
|
|
1419
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
1420
|
+
import { resolve, join } from "node:path";
|
|
1421
1421
|
import * as yaml from "yaml";
|
|
1422
1422
|
var DEFAULT_CONFIG_FILE = "nexus-agents.yaml";
|
|
1423
1423
|
var ALTERNATE_CONFIG_FILE = "nexus-agents.yml";
|
|
@@ -1953,7 +1953,7 @@ var RateLimiter2 = class {
|
|
|
1953
1953
|
* Sleeps for the specified duration.
|
|
1954
1954
|
*/
|
|
1955
1955
|
sleep(ms) {
|
|
1956
|
-
return new Promise((
|
|
1956
|
+
return new Promise((resolve21) => setTimeout(resolve21, ms));
|
|
1957
1957
|
}
|
|
1958
1958
|
/**
|
|
1959
1959
|
* Returns the current number of available tokens.
|
|
@@ -2213,7 +2213,7 @@ var AbortError = class extends Error {
|
|
|
2213
2213
|
function raceAbort(promise, signal) {
|
|
2214
2214
|
if (signal === void 0) return promise;
|
|
2215
2215
|
if (signal.aborted) return Promise.reject(new AbortError());
|
|
2216
|
-
return new Promise((
|
|
2216
|
+
return new Promise((resolve21, reject) => {
|
|
2217
2217
|
const onAbort = () => {
|
|
2218
2218
|
reject(new AbortError());
|
|
2219
2219
|
};
|
|
@@ -2221,7 +2221,7 @@ function raceAbort(promise, signal) {
|
|
|
2221
2221
|
promise.then(
|
|
2222
2222
|
(value) => {
|
|
2223
2223
|
signal.removeEventListener("abort", onAbort);
|
|
2224
|
-
|
|
2224
|
+
resolve21(value);
|
|
2225
2225
|
},
|
|
2226
2226
|
(error) => {
|
|
2227
2227
|
signal.removeEventListener("abort", onAbort);
|
|
@@ -5181,13 +5181,13 @@ function makeCancelError(taskId) {
|
|
|
5181
5181
|
}
|
|
5182
5182
|
function executeWithTimeout(params) {
|
|
5183
5183
|
const { task, maxDurationMs, executeTask, transformError, signal } = params;
|
|
5184
|
-
return new Promise((
|
|
5184
|
+
return new Promise((resolve21) => {
|
|
5185
5185
|
let settled = false;
|
|
5186
5186
|
const settle = (result) => {
|
|
5187
5187
|
if (settled) return;
|
|
5188
5188
|
settled = true;
|
|
5189
5189
|
clearTimeout(timeoutId);
|
|
5190
|
-
|
|
5190
|
+
resolve21(result);
|
|
5191
5191
|
};
|
|
5192
5192
|
const timeoutId = setTimeout(() => {
|
|
5193
5193
|
settle(
|
|
@@ -9952,10 +9952,6 @@ function wrapInMarkdownFence(diagram, title) {
|
|
|
9952
9952
|
return parts.join("\n");
|
|
9953
9953
|
}
|
|
9954
9954
|
|
|
9955
|
-
// src/utils/resolve-project-root.ts
|
|
9956
|
-
import { existsSync as existsSync2 } from "fs";
|
|
9957
|
-
import { dirname, join as join2, resolve as resolve2 } from "path";
|
|
9958
|
-
|
|
9959
9955
|
// src/agents/tech-lead-collaboration.ts
|
|
9960
9956
|
var DEFAULT_COLLAB_CONFIG = {
|
|
9961
9957
|
enableCollaborativeSynthesis: true,
|
|
@@ -10694,13 +10690,13 @@ var WaveScheduler = class {
|
|
|
10694
10690
|
}
|
|
10695
10691
|
async withTimeout(promise, timeoutMs, taskId) {
|
|
10696
10692
|
if (timeoutMs <= 0) return promise;
|
|
10697
|
-
return new Promise((
|
|
10693
|
+
return new Promise((resolve21, reject) => {
|
|
10698
10694
|
const timer = setTimeout(() => {
|
|
10699
10695
|
reject(new Error(`Task ${taskId} timed out after ${String(timeoutMs)}ms`));
|
|
10700
10696
|
}, timeoutMs);
|
|
10701
10697
|
promise.then((result) => {
|
|
10702
10698
|
clearTimeout(timer);
|
|
10703
|
-
|
|
10699
|
+
resolve21(result);
|
|
10704
10700
|
}).catch((error) => {
|
|
10705
10701
|
clearTimeout(timer);
|
|
10706
10702
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
@@ -16249,7 +16245,7 @@ var STOP_WORDS2 = /* @__PURE__ */ new Set([
|
|
|
16249
16245
|
]);
|
|
16250
16246
|
|
|
16251
16247
|
// src/agents/skills/skill-library.ts
|
|
16252
|
-
import { randomUUID } from "crypto";
|
|
16248
|
+
import { randomUUID } from "node:crypto";
|
|
16253
16249
|
|
|
16254
16250
|
// src/agents/skills/skill-search.ts
|
|
16255
16251
|
function extractKeywords2(text, stopWords) {
|
|
@@ -17976,7 +17972,7 @@ var ManifestSchema2 = z32.object({
|
|
|
17976
17972
|
});
|
|
17977
17973
|
async function resolveImportPath(source) {
|
|
17978
17974
|
if (source.startsWith("./") || source.startsWith("/") || source.startsWith("../")) {
|
|
17979
|
-
const pathModule = await import("path");
|
|
17975
|
+
const pathModule = await import("node:path");
|
|
17980
17976
|
return pathModule.resolve(process.cwd(), source);
|
|
17981
17977
|
}
|
|
17982
17978
|
return source;
|
|
@@ -18480,8 +18476,8 @@ var Semaphore = class {
|
|
|
18480
18476
|
this.available -= 1;
|
|
18481
18477
|
return Promise.resolve();
|
|
18482
18478
|
}
|
|
18483
|
-
return new Promise((
|
|
18484
|
-
this.waiters.push(
|
|
18479
|
+
return new Promise((resolve21) => {
|
|
18480
|
+
this.waiters.push(resolve21);
|
|
18485
18481
|
});
|
|
18486
18482
|
}
|
|
18487
18483
|
release() {
|
|
@@ -18826,8 +18822,8 @@ function createContextItem(id, content, source, relevance, timestamp) {
|
|
|
18826
18822
|
}
|
|
18827
18823
|
|
|
18828
18824
|
// src/agents/wave-checkpoint-persistence.ts
|
|
18829
|
-
import * as fs from "fs";
|
|
18830
|
-
import * as path from "path";
|
|
18825
|
+
import * as fs from "node:fs";
|
|
18826
|
+
import * as path from "node:path";
|
|
18831
18827
|
|
|
18832
18828
|
// src/agents/wave-checkpoint-types.ts
|
|
18833
18829
|
import { z as z39 } from "zod";
|
|
@@ -18888,7 +18884,7 @@ var DEFAULT_SICA_CONFIG2 = {
|
|
|
18888
18884
|
};
|
|
18889
18885
|
|
|
18890
18886
|
// src/agents/self-improving/sica-version-manager.ts
|
|
18891
|
-
import { randomUUID as randomUUID2 } from "crypto";
|
|
18887
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
18892
18888
|
var SicaVersionManager = class {
|
|
18893
18889
|
config;
|
|
18894
18890
|
logger;
|
|
@@ -19140,10 +19136,10 @@ var SicaVersionManager = class {
|
|
|
19140
19136
|
};
|
|
19141
19137
|
|
|
19142
19138
|
// src/agents/self-improving/sica-agent.ts
|
|
19143
|
-
import { randomUUID as randomUUID4 } from "crypto";
|
|
19139
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
19144
19140
|
|
|
19145
19141
|
// src/agents/self-improving/sica-agent-helpers.ts
|
|
19146
|
-
import { randomUUID as randomUUID3 } from "crypto";
|
|
19142
|
+
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
19147
19143
|
function estimateQuality(result) {
|
|
19148
19144
|
const output2 = result.output;
|
|
19149
19145
|
if (typeof output2 !== "string") return 0.5;
|
|
@@ -20864,7 +20860,7 @@ function calculateCompactionScore(hubAgents) {
|
|
|
20864
20860
|
}
|
|
20865
20861
|
|
|
20866
20862
|
// src/agents/orchestration/puppeteer-helpers.ts
|
|
20867
|
-
import { randomUUID as randomUUID5 } from "crypto";
|
|
20863
|
+
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
20868
20864
|
function generateSessionId() {
|
|
20869
20865
|
return `puppeteer-${randomUUID5().slice(0, 8)}`;
|
|
20870
20866
|
}
|
|
@@ -21130,7 +21126,7 @@ function createPolicyForMode(policyMode) {
|
|
|
21130
21126
|
}
|
|
21131
21127
|
|
|
21132
21128
|
// src/agents/orchestration/puppeteer-events.ts
|
|
21133
|
-
import { randomUUID as randomUUID6 } from "crypto";
|
|
21129
|
+
import { randomUUID as randomUUID6 } from "node:crypto";
|
|
21134
21130
|
var PuppeteerTopics = {
|
|
21135
21131
|
/** Orchestration session started */
|
|
21136
21132
|
STARTED: "puppeteer.started",
|
|
@@ -21905,9 +21901,9 @@ var ExpertPool = class {
|
|
|
21905
21901
|
if (this.active < this.capacity) {
|
|
21906
21902
|
return this.issuePermit();
|
|
21907
21903
|
}
|
|
21908
|
-
return new Promise((
|
|
21904
|
+
return new Promise((resolve21, reject) => {
|
|
21909
21905
|
const timer = setTimeout(() => {
|
|
21910
|
-
const idx = this.queue.findIndex((e) => e.resolve ===
|
|
21906
|
+
const idx = this.queue.findIndex((e) => e.resolve === resolve21);
|
|
21911
21907
|
if (idx !== -1) {
|
|
21912
21908
|
this.queue.splice(idx, 1);
|
|
21913
21909
|
}
|
|
@@ -21917,7 +21913,7 @@ var ExpertPool = class {
|
|
|
21917
21913
|
)
|
|
21918
21914
|
);
|
|
21919
21915
|
}, this.acquireTimeoutMs);
|
|
21920
|
-
this.queue.push({ resolve:
|
|
21916
|
+
this.queue.push({ resolve: resolve21, reject, timer });
|
|
21921
21917
|
});
|
|
21922
21918
|
}
|
|
21923
21919
|
/** Release a permit back to the pool. */
|
|
@@ -22279,8 +22275,8 @@ function getTopologicalOrder(workflow) {
|
|
|
22279
22275
|
}
|
|
22280
22276
|
|
|
22281
22277
|
// src/workflows/workflow-parser.ts
|
|
22282
|
-
import * as fs2 from "fs/promises";
|
|
22283
|
-
import * as path2 from "path";
|
|
22278
|
+
import * as fs2 from "node:fs/promises";
|
|
22279
|
+
import * as path2 from "node:path";
|
|
22284
22280
|
import * as yaml2 from "yaml";
|
|
22285
22281
|
var MAX_FILE_SIZE_BYTES = 1024 * 1024;
|
|
22286
22282
|
var SUPPORTED_EXTENSIONS2 = [".yaml", ".yml", ".json"];
|
|
@@ -22501,8 +22497,8 @@ var TaskQueue = class {
|
|
|
22501
22497
|
if (this.cancelled) {
|
|
22502
22498
|
return Promise.reject(new Error("Queue has been cancelled"));
|
|
22503
22499
|
}
|
|
22504
|
-
return new Promise((
|
|
22505
|
-
this.queue.push({ task, resolve:
|
|
22500
|
+
return new Promise((resolve21, reject) => {
|
|
22501
|
+
this.queue.push({ task, resolve: resolve21, reject });
|
|
22506
22502
|
this.processNext();
|
|
22507
22503
|
});
|
|
22508
22504
|
}
|
|
@@ -22778,16 +22774,16 @@ async function executeStepWithTimeout(step, context, stepExecutor, signal) {
|
|
|
22778
22774
|
return executeWithTimeout2(step, stepContext, stepExecutor, stepTimeout, startTime);
|
|
22779
22775
|
}
|
|
22780
22776
|
function executeWithTimeout2(step, context, executor, timeout, startTime) {
|
|
22781
|
-
return new Promise((
|
|
22777
|
+
return new Promise((resolve21) => {
|
|
22782
22778
|
const timeoutId = setTimeout(() => {
|
|
22783
|
-
|
|
22779
|
+
resolve21(createTimeoutResult(step.id, getTimeProvider().now() - startTime, timeout));
|
|
22784
22780
|
}, timeout);
|
|
22785
22781
|
executor(step, context).then((result) => {
|
|
22786
22782
|
clearTimeout(timeoutId);
|
|
22787
|
-
|
|
22783
|
+
resolve21(result);
|
|
22788
22784
|
}).catch((error) => {
|
|
22789
22785
|
clearTimeout(timeoutId);
|
|
22790
|
-
|
|
22786
|
+
resolve21(createErrorResult(step.id, getTimeProvider().now() - startTime, error));
|
|
22791
22787
|
});
|
|
22792
22788
|
});
|
|
22793
22789
|
}
|
|
@@ -23039,11 +23035,11 @@ var TEMPLATE_KEYWORDS = {
|
|
|
23039
23035
|
};
|
|
23040
23036
|
|
|
23041
23037
|
// src/workflows/template-loader.ts
|
|
23042
|
-
import { readFile as readFile2, readdir, stat as stat2 } from "fs/promises";
|
|
23043
|
-
import { existsSync as
|
|
23044
|
-
import { join as
|
|
23045
|
-
import { fileURLToPath } from "url";
|
|
23046
|
-
import { dirname
|
|
23038
|
+
import { readFile as readFile2, readdir, stat as stat2 } from "node:fs/promises";
|
|
23039
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
23040
|
+
import { join as join3, basename, extname as extname2, resolve as resolve4, sep } from "node:path";
|
|
23041
|
+
import { fileURLToPath } from "node:url";
|
|
23042
|
+
import { dirname } from "node:path";
|
|
23047
23043
|
import { parse as parseYaml2 } from "yaml";
|
|
23048
23044
|
function validatePath3(userPath, allowedRoot) {
|
|
23049
23045
|
const resolved = resolveInsideRoot(userPath, allowedRoot);
|
|
@@ -23051,7 +23047,7 @@ function validatePath3(userPath, allowedRoot) {
|
|
|
23051
23047
|
return {
|
|
23052
23048
|
ok: false,
|
|
23053
23049
|
error: new SecurityError("Path traversal detected: path escapes allowed root directory", {
|
|
23054
|
-
context: { userPath, allowedRoot:
|
|
23050
|
+
context: { userPath, allowedRoot: resolve4(allowedRoot) }
|
|
23055
23051
|
})
|
|
23056
23052
|
};
|
|
23057
23053
|
}
|
|
@@ -23059,32 +23055,32 @@ function validatePath3(userPath, allowedRoot) {
|
|
|
23059
23055
|
}
|
|
23060
23056
|
function getBuiltInTemplatesPath() {
|
|
23061
23057
|
const currentFile = fileURLToPath(import.meta.url);
|
|
23062
|
-
const currentDir =
|
|
23058
|
+
const currentDir = dirname(currentFile);
|
|
23063
23059
|
if (currentFile.includes(`${sep}dist${sep}`) || currentFile.endsWith(`${sep}dist`)) {
|
|
23064
23060
|
const distIndex = currentFile.lastIndexOf(`${sep}dist${sep}`);
|
|
23065
23061
|
if (distIndex !== -1) {
|
|
23066
23062
|
const distDir = currentFile.substring(0, distIndex + 5);
|
|
23067
|
-
const bundledPath =
|
|
23068
|
-
if (
|
|
23063
|
+
const bundledPath = join3(distDir, "workflows", "templates");
|
|
23064
|
+
if (existsSync3(bundledPath)) {
|
|
23069
23065
|
return bundledPath;
|
|
23070
23066
|
}
|
|
23071
23067
|
}
|
|
23072
23068
|
}
|
|
23073
23069
|
const possiblePaths = [
|
|
23074
23070
|
// Unbundled: relative to template-loader.ts in src/workflows/
|
|
23075
|
-
|
|
23071
|
+
join3(currentDir, "templates"),
|
|
23076
23072
|
// Bundled: relative to dist/ directory
|
|
23077
|
-
|
|
23073
|
+
join3(currentDir, "workflows", "templates"),
|
|
23078
23074
|
// Bundled chunk: may be in dist/ with workflows/templates as sibling
|
|
23079
|
-
|
|
23080
|
-
|
|
23075
|
+
join3(dirname(currentDir), "workflows", "templates"),
|
|
23076
|
+
join3(dirname(currentDir), "dist", "workflows", "templates")
|
|
23081
23077
|
];
|
|
23082
23078
|
for (const path12 of possiblePaths) {
|
|
23083
|
-
if (
|
|
23079
|
+
if (existsSync3(path12)) {
|
|
23084
23080
|
return path12;
|
|
23085
23081
|
}
|
|
23086
23082
|
}
|
|
23087
|
-
return
|
|
23083
|
+
return join3(currentDir, "templates");
|
|
23088
23084
|
}
|
|
23089
23085
|
function createValidationError(errors) {
|
|
23090
23086
|
const firstError = errors[0];
|
|
@@ -23166,7 +23162,7 @@ async function loadTemplatesFromDirectory(directoryPath) {
|
|
|
23166
23162
|
const templates = [];
|
|
23167
23163
|
const errors = [];
|
|
23168
23164
|
try {
|
|
23169
|
-
const resolvedDirectory =
|
|
23165
|
+
const resolvedDirectory = resolve4(directoryPath);
|
|
23170
23166
|
const stats = await stat2(resolvedDirectory);
|
|
23171
23167
|
if (!stats.isDirectory()) {
|
|
23172
23168
|
errors.push(new ParseError(`${resolvedDirectory} is not a directory`));
|
|
@@ -25186,9 +25182,9 @@ function withLogging(toolName, handler3, logger58) {
|
|
|
25186
25182
|
}
|
|
25187
25183
|
|
|
25188
25184
|
// src/mcp/middleware/auth-handler.ts
|
|
25189
|
-
import { randomBytes, timingSafeEqual } from "crypto";
|
|
25190
|
-
import { readFileSync as readFileSync3, writeFileSync, existsSync as
|
|
25191
|
-
import { dirname as
|
|
25185
|
+
import { randomBytes, timingSafeEqual } from "node:crypto";
|
|
25186
|
+
import { readFileSync as readFileSync3, writeFileSync, existsSync as existsSync4, mkdirSync as mkdirSync2 } from "node:fs";
|
|
25187
|
+
import { dirname as dirname2 } from "node:path";
|
|
25192
25188
|
var DEFAULT_AUTH_SUBDIR = "auth";
|
|
25193
25189
|
var DEFAULT_TOKEN_FILE = "server-token";
|
|
25194
25190
|
var TOKEN_LENGTH_BYTES = 32;
|
|
@@ -25200,7 +25196,7 @@ function generateSecureToken() {
|
|
|
25200
25196
|
}
|
|
25201
25197
|
function readStoredToken(tokenPath) {
|
|
25202
25198
|
try {
|
|
25203
|
-
if (!
|
|
25199
|
+
if (!existsSync4(tokenPath)) {
|
|
25204
25200
|
return void 0;
|
|
25205
25201
|
}
|
|
25206
25202
|
return readFileSync3(tokenPath, "utf-8").trim();
|
|
@@ -25209,8 +25205,8 @@ function readStoredToken(tokenPath) {
|
|
|
25209
25205
|
}
|
|
25210
25206
|
}
|
|
25211
25207
|
function writeToken(tokenPath, token) {
|
|
25212
|
-
const dir =
|
|
25213
|
-
if (!
|
|
25208
|
+
const dir = dirname2(tokenPath);
|
|
25209
|
+
if (!existsSync4(dir)) {
|
|
25214
25210
|
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
25215
25211
|
}
|
|
25216
25212
|
writeFileSync(tokenPath, token + "\n", { mode: 384 });
|
|
@@ -25368,7 +25364,7 @@ async function withToolError(prefix, logger58, fn) {
|
|
|
25368
25364
|
}
|
|
25369
25365
|
|
|
25370
25366
|
// src/mcp/middleware/spawn-depth-guard.ts
|
|
25371
|
-
import { AsyncLocalStorage } from "async_hooks";
|
|
25367
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
25372
25368
|
var logger13 = createLogger({ component: "spawn-depth-guard" });
|
|
25373
25369
|
var MAX_SPAWN_DEPTH = 3;
|
|
25374
25370
|
var depthStorage = new AsyncLocalStorage();
|
|
@@ -25770,7 +25766,7 @@ function createInteractionGraph() {
|
|
|
25770
25766
|
}
|
|
25771
25767
|
|
|
25772
25768
|
// src/observability/swarm-observer.ts
|
|
25773
|
-
import { randomUUID as randomUUID7 } from "crypto";
|
|
25769
|
+
import { randomUUID as randomUUID7 } from "node:crypto";
|
|
25774
25770
|
|
|
25775
25771
|
// src/observability/swarm-observer-helpers.ts
|
|
25776
25772
|
function calculateSeverity(queuedMessages, blockedAgents) {
|
|
@@ -28849,7 +28845,7 @@ var RunWorkflowInputSchema = z56.object({
|
|
|
28849
28845
|
});
|
|
28850
28846
|
|
|
28851
28847
|
// src/mcp/tools/run-workflow-helpers.ts
|
|
28852
|
-
import { resolve as
|
|
28848
|
+
import { resolve as resolve5, sep as sep2 } from "node:path";
|
|
28853
28849
|
function isFilePath(template) {
|
|
28854
28850
|
return template.includes("/") || template.includes("\\") || template.endsWith(".yaml") || template.endsWith(".yml");
|
|
28855
28851
|
}
|
|
@@ -28862,9 +28858,9 @@ function validateWorkflowPath(userPath, allowedRoots) {
|
|
|
28862
28858
|
})
|
|
28863
28859
|
};
|
|
28864
28860
|
}
|
|
28865
|
-
const resolvedPath =
|
|
28861
|
+
const resolvedPath = resolve5(userPath);
|
|
28866
28862
|
for (const root of allowedRoots) {
|
|
28867
|
-
const resolvedRoot =
|
|
28863
|
+
const resolvedRoot = resolve5(root);
|
|
28868
28864
|
if (resolvedPath === resolvedRoot || resolvedPath.startsWith(resolvedRoot + sep2)) {
|
|
28869
28865
|
return { ok: true, value: resolvedPath };
|
|
28870
28866
|
}
|
|
@@ -28872,7 +28868,7 @@ function validateWorkflowPath(userPath, allowedRoots) {
|
|
|
28872
28868
|
return {
|
|
28873
28869
|
ok: false,
|
|
28874
28870
|
error: new SecurityError("Path traversal detected: path escapes allowed directories", {
|
|
28875
|
-
context: { userPath, allowedDirectories: allowedRoots.map((r) =>
|
|
28871
|
+
context: { userPath, allowedDirectories: allowedRoots.map((r) => resolve5(r)) }
|
|
28876
28872
|
})
|
|
28877
28873
|
};
|
|
28878
28874
|
}
|
|
@@ -29048,11 +29044,11 @@ function formatValidationErrors(validation) {
|
|
|
29048
29044
|
}
|
|
29049
29045
|
|
|
29050
29046
|
// src/mcp/tools/run-workflow.ts
|
|
29051
|
-
import { randomUUID as randomUUID8 } from "crypto";
|
|
29047
|
+
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
29052
29048
|
function resolveExecutionEngineOrError(deps, workflowName) {
|
|
29053
29049
|
try {
|
|
29054
|
-
const
|
|
29055
|
-
return { ok: true, value:
|
|
29050
|
+
const resolve21 = deps.resolveExecutionEngine ?? (() => deps.workflowEngine);
|
|
29051
|
+
return { ok: true, value: resolve21() };
|
|
29056
29052
|
} catch (error) {
|
|
29057
29053
|
const message = error instanceof Error ? error.message : String(error);
|
|
29058
29054
|
deps.logger?.error(
|
|
@@ -29693,7 +29689,7 @@ function execIdFields(executionId) {
|
|
|
29693
29689
|
async function populateUnifiedContextOnState(state, options) {
|
|
29694
29690
|
const taskCandidate = state["task"];
|
|
29695
29691
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
29696
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
29692
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-CCVDD7TO.js");
|
|
29697
29693
|
const category = inferTaskCategory2(taskCandidate);
|
|
29698
29694
|
const executionId = options?.executionId;
|
|
29699
29695
|
const execFields = execIdFields(executionId);
|
|
@@ -30190,13 +30186,13 @@ function dedupe(ids) {
|
|
|
30190
30186
|
return [...new Set(ids)];
|
|
30191
30187
|
}
|
|
30192
30188
|
async function withTimeout3(promise, ms) {
|
|
30193
|
-
return new Promise((
|
|
30189
|
+
return new Promise((resolve21, reject) => {
|
|
30194
30190
|
const timer = setTimeout(() => {
|
|
30195
30191
|
reject(new Error(`Node timed out after ${String(ms)}ms`));
|
|
30196
30192
|
}, ms);
|
|
30197
30193
|
promise.then((result) => {
|
|
30198
30194
|
clearTimeout(timer);
|
|
30199
|
-
|
|
30195
|
+
resolve21(result);
|
|
30200
30196
|
}).catch((error) => {
|
|
30201
30197
|
clearTimeout(timer);
|
|
30202
30198
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
@@ -31120,14 +31116,14 @@ function emitPipelineStageEvent(prefix, stage, status, details) {
|
|
|
31120
31116
|
}
|
|
31121
31117
|
|
|
31122
31118
|
// src/pipeline/trace-writer.ts
|
|
31123
|
-
import { mkdir, writeFile, rename, unlink } from "fs/promises";
|
|
31124
|
-
import { join as
|
|
31119
|
+
import { mkdir, writeFile, rename, unlink } from "node:fs/promises";
|
|
31120
|
+
import { join as join4 } from "node:path";
|
|
31125
31121
|
var logger22 = createLogger({ component: "TraceWriter" });
|
|
31126
31122
|
var MAX_BUFFER_SIZE = 5e4;
|
|
31127
31123
|
var TraceWriter = class {
|
|
31128
31124
|
constructor(bus, options) {
|
|
31129
31125
|
this.options = options;
|
|
31130
|
-
this.runDir =
|
|
31126
|
+
this.runDir = join4(options.runsDir, options.runId);
|
|
31131
31127
|
this.maxBuffer = options.maxBufferSize ?? MAX_BUFFER_SIZE;
|
|
31132
31128
|
this.unsubscribe = bus.subscribe({}, (event) => {
|
|
31133
31129
|
if (!this.stopped) {
|
|
@@ -31149,7 +31145,7 @@ var TraceWriter = class {
|
|
|
31149
31145
|
if (this.buffer.length === 0) return;
|
|
31150
31146
|
await mkdir(this.runDir, { recursive: true });
|
|
31151
31147
|
const lines = this.buffer.map((e) => JSON.stringify(e)).join("\n");
|
|
31152
|
-
const tracePath =
|
|
31148
|
+
const tracePath = join4(this.runDir, "trace.jsonl");
|
|
31153
31149
|
const traceTmp = `${tracePath}.tmp.${String(process.pid)}`;
|
|
31154
31150
|
try {
|
|
31155
31151
|
await writeFile(traceTmp, lines + "\n", "utf-8");
|
|
@@ -31162,7 +31158,7 @@ var TraceWriter = class {
|
|
|
31162
31158
|
throw err2;
|
|
31163
31159
|
}
|
|
31164
31160
|
const indexContent = this.buildIndex();
|
|
31165
|
-
const indexPath =
|
|
31161
|
+
const indexPath = join4(this.runDir, "index.md");
|
|
31166
31162
|
const indexTmp = `${indexPath}.tmp.${String(process.pid)}`;
|
|
31167
31163
|
try {
|
|
31168
31164
|
await writeFile(indexTmp, indexContent, "utf-8");
|
|
@@ -31586,7 +31582,7 @@ function createDefaultPolicyEngine() {
|
|
|
31586
31582
|
}
|
|
31587
31583
|
|
|
31588
31584
|
// src/pipeline/task-contract-builders.ts
|
|
31589
|
-
import { randomUUID as randomUUID9 } from "crypto";
|
|
31585
|
+
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
31590
31586
|
function buildBaseTaskContract(input) {
|
|
31591
31587
|
const now = Date.now();
|
|
31592
31588
|
return {
|
|
@@ -31796,7 +31792,7 @@ async function executeOrchestratePipeline(task) {
|
|
|
31796
31792
|
}
|
|
31797
31793
|
|
|
31798
31794
|
// src/orchestration/orchestrator-factory.ts
|
|
31799
|
-
import { randomUUID as randomUUID10 } from "crypto";
|
|
31795
|
+
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
31800
31796
|
|
|
31801
31797
|
// src/orchestration/orchestrator-adapters.ts
|
|
31802
31798
|
function generateId2(prefix) {
|
|
@@ -32650,11 +32646,11 @@ function createMockOrchestrator() {
|
|
|
32650
32646
|
async function raceAgainstDeadline(promise, deadlineMs, onTimeout) {
|
|
32651
32647
|
const startedAt = Date.now();
|
|
32652
32648
|
let timer;
|
|
32653
|
-
const timeoutP = new Promise((
|
|
32649
|
+
const timeoutP = new Promise((resolve21, reject) => {
|
|
32654
32650
|
timer = setTimeout(
|
|
32655
32651
|
() => {
|
|
32656
32652
|
try {
|
|
32657
|
-
|
|
32653
|
+
resolve21(onTimeout(Date.now() - startedAt));
|
|
32658
32654
|
} catch (err2) {
|
|
32659
32655
|
reject(err2 instanceof Error ? err2 : new Error(String(err2)));
|
|
32660
32656
|
}
|
|
@@ -32785,7 +32781,7 @@ function createSicaOrchestratorAdapter(sicaAgent, _logger) {
|
|
|
32785
32781
|
}
|
|
32786
32782
|
|
|
32787
32783
|
// src/mcp/tools/research-auto-catalog.ts
|
|
32788
|
-
import * as fs3 from "fs";
|
|
32784
|
+
import * as fs3 from "node:fs";
|
|
32789
32785
|
import { z as z61 } from "zod";
|
|
32790
32786
|
var CATALOG_SUBDIR = "research";
|
|
32791
32787
|
var CATALOG_FILE = "pending-catalog.json";
|
|
@@ -33857,11 +33853,11 @@ function createWorkerTask(entry, taskIndex, waveNumber, opts) {
|
|
|
33857
33853
|
const staggerSlot = taskIndex % opts.maxConcurrency;
|
|
33858
33854
|
const staggerMs = staggerSlot * opts.staggerDelayMs;
|
|
33859
33855
|
if (staggerMs > 0) {
|
|
33860
|
-
await new Promise((
|
|
33856
|
+
await new Promise((resolve21) => setTimeout(resolve21, staggerMs));
|
|
33861
33857
|
}
|
|
33862
33858
|
const spacingDelay = opts.failureTracker.getSpacingDelay(entry.role);
|
|
33863
33859
|
if (spacingDelay > 0) {
|
|
33864
|
-
await new Promise((
|
|
33860
|
+
await new Promise((resolve21) => setTimeout(resolve21, spacingDelay));
|
|
33865
33861
|
}
|
|
33866
33862
|
const timeoutMs = opts.options.workerTimeoutMs ?? getExpertTaskTimeout(entry.subTask);
|
|
33867
33863
|
const result = await executeSafe({
|
|
@@ -33913,7 +33909,7 @@ async function maybeDelayForRateLimit(results, waveIdx, totalWaves) {
|
|
|
33913
33909
|
);
|
|
33914
33910
|
if (hasRateLimit) {
|
|
33915
33911
|
logger27.warn("Rate-limit detected \u2014 delaying next wave", { delayMs: RATE_LIMIT_WAVE_DELAY_MS });
|
|
33916
|
-
await new Promise((
|
|
33912
|
+
await new Promise((resolve21) => setTimeout(resolve21, RATE_LIMIT_WAVE_DELAY_MS));
|
|
33917
33913
|
}
|
|
33918
33914
|
}
|
|
33919
33915
|
function emitWaveStarted(ctx, workerCount, roles) {
|
|
@@ -34011,7 +34007,7 @@ async function maybeRetryAfterTriage(opts) {
|
|
|
34011
34007
|
}
|
|
34012
34008
|
const useAltCli = triage.action === "retry_different_cli" && altExecuteWorker !== void 0;
|
|
34013
34009
|
if (triage.action === "retry_different_cli") {
|
|
34014
|
-
await new Promise((
|
|
34010
|
+
await new Promise((resolve21) => setTimeout(resolve21, RATE_LIMIT_SPACING_MS));
|
|
34015
34011
|
}
|
|
34016
34012
|
const retryTimeout = triage.action === "extend_timeout" ? Math.min(timeoutMs * TIMEOUT_EXTENSION_FACTOR, MAX_WORKER_TIMEOUT_MS) : timeoutMs;
|
|
34017
34013
|
const retryExecutor = useAltCli ? altExecuteWorker : executeWorker;
|
|
@@ -35618,7 +35614,7 @@ function resolveAccessPolicyMode(env = process.env) {
|
|
|
35618
35614
|
}
|
|
35619
35615
|
|
|
35620
35616
|
// src/security/access-constraint-deriver/deriver.ts
|
|
35621
|
-
import { createHash as createHash2 } from "crypto";
|
|
35617
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
35622
35618
|
|
|
35623
35619
|
// src/security/access-constraint-deriver/cache.ts
|
|
35624
35620
|
var DEFAULT_MAX_ENTRIES = 256;
|
|
@@ -36167,8 +36163,8 @@ function createDurableAuditTrail(auditLogger) {
|
|
|
36167
36163
|
}
|
|
36168
36164
|
|
|
36169
36165
|
// src/context/structured-task-state.ts
|
|
36170
|
-
import * as fs4 from "fs";
|
|
36171
|
-
import * as path3 from "path";
|
|
36166
|
+
import * as fs4 from "node:fs";
|
|
36167
|
+
import * as path3 from "node:path";
|
|
36172
36168
|
|
|
36173
36169
|
// src/context/structured-task-state-types.ts
|
|
36174
36170
|
import { z as z65 } from "zod";
|
|
@@ -39877,11 +39873,11 @@ function registerExecuteExpertTool(server, deps) {
|
|
|
39877
39873
|
import { z as z70 } from "zod";
|
|
39878
39874
|
|
|
39879
39875
|
// src/research/negative-results.ts
|
|
39880
|
-
import { readFileSync as readFileSync6 } from "fs";
|
|
39881
|
-
import { resolve as
|
|
39876
|
+
import { readFileSync as readFileSync6 } from "node:fs";
|
|
39877
|
+
import { resolve as resolve7 } from "node:path";
|
|
39882
39878
|
import yaml3 from "yaml";
|
|
39883
39879
|
var logger34 = createLogger({ component: "negative-results" });
|
|
39884
|
-
var REGISTRY_PATH =
|
|
39880
|
+
var REGISTRY_PATH = resolve7("docs/research/registry/negative-results.yaml");
|
|
39885
39881
|
var cachedResults;
|
|
39886
39882
|
function loadNegativeResults() {
|
|
39887
39883
|
if (cachedResults !== void 0) return cachedResults;
|
|
@@ -41432,7 +41428,7 @@ function recordTriageOutcome(success, durationMs, errorMsg) {
|
|
|
41432
41428
|
|
|
41433
41429
|
// src/mcp/tools/run-graph-workflow.ts
|
|
41434
41430
|
import { z as z78 } from "zod";
|
|
41435
|
-
import { randomUUID as randomUUID11 } from "crypto";
|
|
41431
|
+
import { randomUUID as randomUUID11 } from "node:crypto";
|
|
41436
41432
|
var RunGraphWorkflowInputSchema = z78.object({
|
|
41437
41433
|
workflow: z78.string().min(1).max(100).describe("Name of the predefined graph workflow to execute"),
|
|
41438
41434
|
inputs: z78.record(z78.string(), z78.unknown()).optional().default({}).describe("Input values for the workflow"),
|
|
@@ -42170,7 +42166,7 @@ function suggestImprovement(criterion) {
|
|
|
42170
42166
|
|
|
42171
42167
|
// src/mcp/tools/execute-spec-tool.ts
|
|
42172
42168
|
import { z as z79 } from "zod";
|
|
42173
|
-
import { randomUUID as randomUUID12 } from "crypto";
|
|
42169
|
+
import { randomUUID as randomUUID12 } from "node:crypto";
|
|
42174
42170
|
var ExecuteSpecInputSchema = z79.object({
|
|
42175
42171
|
spec: z79.string().min(1).max(5e4).describe("Markdown specification to execute"),
|
|
42176
42172
|
dryRun: z79.boolean().optional().default(false).describe("Parse and decompose only"),
|
|
@@ -43151,7 +43147,7 @@ function registerRepoSecurityPlanTool(server, deps) {
|
|
|
43151
43147
|
}
|
|
43152
43148
|
|
|
43153
43149
|
// src/mcp/tools/search-codebase-tool.ts
|
|
43154
|
-
import { resolve as
|
|
43150
|
+
import { resolve as resolve8, sep as sep3 } from "node:path";
|
|
43155
43151
|
import { z as z90 } from "zod";
|
|
43156
43152
|
var SearchCodebaseInputSchema = z90.object({
|
|
43157
43153
|
query: z90.string().min(1).max(200).describe("Search query (symbol name, keyword, or pattern)"),
|
|
@@ -43206,8 +43202,8 @@ async function getIndex(dir, maxDepth) {
|
|
|
43206
43202
|
return promise;
|
|
43207
43203
|
}
|
|
43208
43204
|
function resolveSearchDir(directory) {
|
|
43209
|
-
const dir =
|
|
43210
|
-
const cwdRoot =
|
|
43205
|
+
const dir = resolve8(directory ?? process.cwd());
|
|
43206
|
+
const cwdRoot = resolve8(".");
|
|
43211
43207
|
if (dir !== cwdRoot && !dir.startsWith(cwdRoot + sep3)) {
|
|
43212
43208
|
return { error: `Path traversal denied: directory must be within ${cwdRoot}` };
|
|
43213
43209
|
}
|
|
@@ -43305,7 +43301,7 @@ function registerSearchCodebaseTool(server, deps) {
|
|
|
43305
43301
|
}
|
|
43306
43302
|
|
|
43307
43303
|
// src/mcp/tools/extract-symbols-tool.ts
|
|
43308
|
-
import { extname as extname3, resolve as
|
|
43304
|
+
import { extname as extname3, resolve as resolve9, sep as sep4 } from "node:path";
|
|
43309
43305
|
import { z as z91 } from "zod";
|
|
43310
43306
|
|
|
43311
43307
|
// src/core/task-analysis/tool-refusal-gap.ts
|
|
@@ -43427,8 +43423,8 @@ async function extractSymbolsHandler(args, ctx) {
|
|
|
43427
43423
|
});
|
|
43428
43424
|
}
|
|
43429
43425
|
const { filePath, mode, maxChars, maxSymbols } = parsed.data;
|
|
43430
|
-
const resolvedPath =
|
|
43431
|
-
const cwdRoot =
|
|
43426
|
+
const resolvedPath = resolve9(filePath);
|
|
43427
|
+
const cwdRoot = resolve9(".");
|
|
43432
43428
|
if (resolvedPath !== cwdRoot && !resolvedPath.startsWith(cwdRoot + sep4)) {
|
|
43433
43429
|
return toolStructuredError({
|
|
43434
43430
|
errorCategory: "permission",
|
|
@@ -43511,8 +43507,8 @@ function registerExtractSymbolsTool(server, deps) {
|
|
|
43511
43507
|
}
|
|
43512
43508
|
|
|
43513
43509
|
// src/mcp/tools/search-usages-tool.ts
|
|
43514
|
-
import { readFile as readFile3 } from "fs/promises";
|
|
43515
|
-
import { relative, resolve as
|
|
43510
|
+
import { readFile as readFile3 } from "node:fs/promises";
|
|
43511
|
+
import { relative, resolve as resolve10, sep as sep5 } from "node:path";
|
|
43516
43512
|
import { z as z92 } from "zod";
|
|
43517
43513
|
var DEFAULT_USAGES_LIMIT = 50;
|
|
43518
43514
|
var MAX_USAGES_LIMIT = 500;
|
|
@@ -43532,8 +43528,8 @@ var SearchUsagesInputSchema = z92.object({
|
|
|
43532
43528
|
maxDepth: z92.number().int().min(1).max(MAX_USAGES_MAX_DEPTH).optional().describe(`Directory walk depth for dir scope (default ${String(DEFAULT_USAGES_MAX_DEPTH)}).`)
|
|
43533
43529
|
});
|
|
43534
43530
|
function resolveWithinCwd(target) {
|
|
43535
|
-
const resolved =
|
|
43536
|
-
const cwdRoot =
|
|
43531
|
+
const resolved = resolve10(target);
|
|
43532
|
+
const cwdRoot = resolve10(".");
|
|
43537
43533
|
if (resolved !== cwdRoot && !resolved.startsWith(cwdRoot + sep5)) {
|
|
43538
43534
|
return { error: `Path traversal denied: scope must be within ${cwdRoot}` };
|
|
43539
43535
|
}
|
|
@@ -43543,7 +43539,7 @@ async function resolveFileScope(input) {
|
|
|
43543
43539
|
if (input.path !== void 0) {
|
|
43544
43540
|
const guard2 = resolveWithinCwd(input.path);
|
|
43545
43541
|
if ("error" in guard2) return guard2;
|
|
43546
|
-
return { files: [guard2.resolved], root:
|
|
43542
|
+
return { files: [guard2.resolved], root: resolve10(".") };
|
|
43547
43543
|
}
|
|
43548
43544
|
const guard = resolveWithinCwd(input.dir ?? process.cwd());
|
|
43549
43545
|
if ("error" in guard) return guard;
|
|
@@ -43638,8 +43634,8 @@ function registerSearchUsagesTool(server, deps) {
|
|
|
43638
43634
|
}
|
|
43639
43635
|
|
|
43640
43636
|
// src/mcp/tools/query-trace-tool.ts
|
|
43641
|
-
import { readFile as readFile4, stat as stat3 } from "fs/promises";
|
|
43642
|
-
import { join as
|
|
43637
|
+
import { readFile as readFile4, stat as stat3 } from "node:fs/promises";
|
|
43638
|
+
import { join as join6, resolve as resolve11, sep as sep6 } from "node:path";
|
|
43643
43639
|
import { z as z93 } from "zod";
|
|
43644
43640
|
var QueryTraceInputSchema = z93.object({
|
|
43645
43641
|
runId: z93.string().min(1).max(128).regex(/^[a-zA-Z0-9_-]+$/, "runId must be alphanumeric, hyphens, or underscores").describe("Run ID to query traces for"),
|
|
@@ -43687,9 +43683,9 @@ var EMPTY_RESPONSE = {
|
|
|
43687
43683
|
};
|
|
43688
43684
|
async function queryTraceFromDisk(input, runsDir) {
|
|
43689
43685
|
const dir = runsDir ?? getDefaultRunsDir();
|
|
43690
|
-
const tracePath =
|
|
43691
|
-
const resolvedDir =
|
|
43692
|
-
const resolvedTrace =
|
|
43686
|
+
const tracePath = join6(dir, input.runId, "trace.jsonl");
|
|
43687
|
+
const resolvedDir = resolve11(dir);
|
|
43688
|
+
const resolvedTrace = resolve11(tracePath);
|
|
43693
43689
|
if (!resolvedTrace.startsWith(resolvedDir + sep6) && resolvedTrace !== resolvedDir) {
|
|
43694
43690
|
return { runId: input.runId, ...EMPTY_RESPONSE };
|
|
43695
43691
|
}
|
|
@@ -44309,8 +44305,8 @@ var AuditQueryCriteriaSchema = z97.object({
|
|
|
44309
44305
|
});
|
|
44310
44306
|
|
|
44311
44307
|
// src/audit/audit-storage-queries.ts
|
|
44312
|
-
import * as fs5 from "fs";
|
|
44313
|
-
import * as readline from "readline";
|
|
44308
|
+
import * as fs5 from "node:fs";
|
|
44309
|
+
import * as readline from "node:readline";
|
|
44314
44310
|
function matchesTimeRange(event, criteria) {
|
|
44315
44311
|
if (criteria.startTime !== void 0 && new Date(event.timestamp) < criteria.startTime)
|
|
44316
44312
|
return false;
|
|
@@ -44390,8 +44386,8 @@ var InMemoryAuditStorage = class {
|
|
|
44390
44386
|
};
|
|
44391
44387
|
|
|
44392
44388
|
// src/audit/audit-storage.ts
|
|
44393
|
-
import * as fs6 from "fs";
|
|
44394
|
-
import * as path4 from "path";
|
|
44389
|
+
import * as fs6 from "node:fs";
|
|
44390
|
+
import * as path4 from "node:path";
|
|
44395
44391
|
function validateLogDir(logDir, allowedRoot) {
|
|
44396
44392
|
const resolvedRoot = path4.resolve(allowedRoot);
|
|
44397
44393
|
const resolvedLogDir = path4.resolve(allowedRoot, logDir);
|
|
@@ -44566,27 +44562,27 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
44566
44562
|
const data = this.writeBuffer.join("");
|
|
44567
44563
|
this.writeBuffer = [];
|
|
44568
44564
|
const stream = this.writeStream;
|
|
44569
|
-
return new Promise((
|
|
44565
|
+
return new Promise((resolve21, reject) => {
|
|
44570
44566
|
stream.write(data, (err2) => {
|
|
44571
44567
|
if (err2 !== void 0 && err2 !== null) {
|
|
44572
44568
|
reject(new AuditError("Failed to flush audit log", { cause: err2 }));
|
|
44573
44569
|
} else {
|
|
44574
|
-
|
|
44570
|
+
resolve21();
|
|
44575
44571
|
}
|
|
44576
44572
|
});
|
|
44577
44573
|
});
|
|
44578
44574
|
}
|
|
44579
44575
|
async close() {
|
|
44580
44576
|
await this.flush();
|
|
44581
|
-
return new Promise((
|
|
44577
|
+
return new Promise((resolve21) => {
|
|
44582
44578
|
if (this.writeStream === null) {
|
|
44583
|
-
|
|
44579
|
+
resolve21();
|
|
44584
44580
|
return;
|
|
44585
44581
|
}
|
|
44586
44582
|
this.writeStream.end(() => {
|
|
44587
44583
|
this.writeStream = null;
|
|
44588
44584
|
this.logger.info("Audit storage closed");
|
|
44589
|
-
|
|
44585
|
+
resolve21();
|
|
44590
44586
|
});
|
|
44591
44587
|
});
|
|
44592
44588
|
}
|
|
@@ -44620,7 +44616,7 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
44620
44616
|
};
|
|
44621
44617
|
|
|
44622
44618
|
// src/audit/audit-logger.ts
|
|
44623
|
-
import * as crypto from "crypto";
|
|
44619
|
+
import * as crypto from "node:crypto";
|
|
44624
44620
|
|
|
44625
44621
|
// src/audit/tier-transition-hash.ts
|
|
44626
44622
|
function hasTierTransitionPayload(event) {
|
|
@@ -45573,7 +45569,7 @@ async function tryIssueTriage(task) {
|
|
|
45573
45569
|
try {
|
|
45574
45570
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
45575
45571
|
if (issueMatch === null) return null;
|
|
45576
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
45572
|
+
const { createIssueTriage } = await import("./issue-triage-IVYGGNB4.js");
|
|
45577
45573
|
const triage = createIssueTriage();
|
|
45578
45574
|
const owner = issueMatch[1] ?? "";
|
|
45579
45575
|
const num = issueMatch[2] ?? "";
|
|
@@ -45601,7 +45597,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
45601
45597
|
]);
|
|
45602
45598
|
async function classifyWithLLM(task) {
|
|
45603
45599
|
try {
|
|
45604
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
45600
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-7LGHU7IL.js");
|
|
45605
45601
|
const prompt = [
|
|
45606
45602
|
"Classify this task into exactly one pipeline template.",
|
|
45607
45603
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -45707,8 +45703,8 @@ function ensureRunnableTemplate(template, stages) {
|
|
|
45707
45703
|
}
|
|
45708
45704
|
|
|
45709
45705
|
// src/pipeline/pipeline-checkpoint.ts
|
|
45710
|
-
import * as fs7 from "fs";
|
|
45711
|
-
import * as path5 from "path";
|
|
45706
|
+
import * as fs7 from "node:fs";
|
|
45707
|
+
import * as path5 from "node:path";
|
|
45712
45708
|
import { z as z98 } from "zod";
|
|
45713
45709
|
var logger40 = createLogger({ component: "pipeline-checkpoint" });
|
|
45714
45710
|
var SESSION_ID_REGEX = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
@@ -46692,13 +46688,13 @@ function resolveConfidence(rule) {
|
|
|
46692
46688
|
}
|
|
46693
46689
|
|
|
46694
46690
|
// src/mcp/tools/security-scan.ts
|
|
46695
|
-
import * as path6 from "path";
|
|
46691
|
+
import * as path6 from "node:path";
|
|
46696
46692
|
var logger43 = createLogger({ component: "security-scan" });
|
|
46697
46693
|
var SCAN_TIMEOUT_MS = 3e5;
|
|
46698
46694
|
async function isSemgrepAvailable() {
|
|
46699
46695
|
try {
|
|
46700
|
-
const { execFile: execFile2 } = await import("child_process");
|
|
46701
|
-
const { promisify: promisify2 } = await import("util");
|
|
46696
|
+
const { execFile: execFile2 } = await import("node:child_process");
|
|
46697
|
+
const { promisify: promisify2 } = await import("node:util");
|
|
46702
46698
|
const exec2 = promisify2(execFile2);
|
|
46703
46699
|
await exec2("semgrep", ["--version"], { timeout: 1e4 });
|
|
46704
46700
|
return true;
|
|
@@ -46707,8 +46703,8 @@ async function isSemgrepAvailable() {
|
|
|
46707
46703
|
}
|
|
46708
46704
|
}
|
|
46709
46705
|
async function runSemgrep(targetDir, rulesets) {
|
|
46710
|
-
const { execFile: execFile2 } = await import("child_process");
|
|
46711
|
-
const { promisify: promisify2 } = await import("util");
|
|
46706
|
+
const { execFile: execFile2 } = await import("node:child_process");
|
|
46707
|
+
const { promisify: promisify2 } = await import("node:util");
|
|
46712
46708
|
const exec2 = promisify2(execFile2);
|
|
46713
46709
|
const args = ["--sarif", "--quiet", ...rulesets.flatMap((r) => ["--config", r]), targetDir];
|
|
46714
46710
|
const { stdout } = await exec2("semgrep", args, {
|
|
@@ -46921,8 +46917,8 @@ var OSV_DEPENDENCY_CAP = 20;
|
|
|
46921
46917
|
async function runOsvCheck(targetDir, enabled) {
|
|
46922
46918
|
if (!enabled) return OSV_EMPTY;
|
|
46923
46919
|
try {
|
|
46924
|
-
const fs13 = await import("fs");
|
|
46925
|
-
const path12 = await import("path");
|
|
46920
|
+
const fs13 = await import("node:fs");
|
|
46921
|
+
const path12 = await import("node:path");
|
|
46926
46922
|
const pkgPath = path12.join(targetDir, "package.json");
|
|
46927
46923
|
if (!fs13.existsSync(pkgPath)) return OSV_EMPTY;
|
|
46928
46924
|
const pkg = JSON.parse(fs13.readFileSync(pkgPath, "utf-8"));
|
|
@@ -46981,8 +46977,8 @@ function buildScanSummary(total, blocking, osvCount, osv, sarifParseErrors = 0)
|
|
|
46981
46977
|
}
|
|
46982
46978
|
|
|
46983
46979
|
// src/security/quality-gate-commands.ts
|
|
46984
|
-
import { existsSync as
|
|
46985
|
-
import { join as
|
|
46980
|
+
import { existsSync as existsSync9, readFileSync as readFileSync8 } from "node:fs";
|
|
46981
|
+
import { join as join9 } from "node:path";
|
|
46986
46982
|
var LOCKFILES = [
|
|
46987
46983
|
{ file: "pnpm-lock.yaml", manager: "pnpm" },
|
|
46988
46984
|
{ file: "yarn.lock", manager: "yarn" },
|
|
@@ -46997,13 +46993,13 @@ var SCRIPT_CANDIDATES = {
|
|
|
46997
46993
|
};
|
|
46998
46994
|
function detectPackageManager(projectDir) {
|
|
46999
46995
|
for (const { file, manager } of LOCKFILES) {
|
|
47000
|
-
if (
|
|
46996
|
+
if (existsSync9(join9(projectDir, file))) return manager;
|
|
47001
46997
|
}
|
|
47002
46998
|
return "npm";
|
|
47003
46999
|
}
|
|
47004
47000
|
function readScripts(projectDir) {
|
|
47005
|
-
const manifest =
|
|
47006
|
-
if (!
|
|
47001
|
+
const manifest = join9(projectDir, "package.json");
|
|
47002
|
+
if (!existsSync9(manifest)) return void 0;
|
|
47007
47003
|
try {
|
|
47008
47004
|
const parsed = JSON.parse(readFileSync8(manifest, "utf-8"));
|
|
47009
47005
|
if (typeof parsed !== "object" || parsed === null) return void 0;
|
|
@@ -47046,8 +47042,8 @@ function resolveCheckCommand(projectDir, check) {
|
|
|
47046
47042
|
async function runCommandCheck(name, command, args, cwd) {
|
|
47047
47043
|
const start = Date.now();
|
|
47048
47044
|
try {
|
|
47049
|
-
const { execFile: execFile2 } = await import("child_process");
|
|
47050
|
-
const { promisify: promisify2 } = await import("util");
|
|
47045
|
+
const { execFile: execFile2 } = await import("node:child_process");
|
|
47046
|
+
const { promisify: promisify2 } = await import("node:util");
|
|
47051
47047
|
const exec2 = promisify2(execFile2);
|
|
47052
47048
|
await exec2(command, [...args], { timeout: 12e4, cwd });
|
|
47053
47049
|
return {
|
|
@@ -47292,8 +47288,8 @@ var memoryInitPromise = null;
|
|
|
47292
47288
|
async function initPipelineMemory() {
|
|
47293
47289
|
if (cachedMemory !== null) return cachedMemory;
|
|
47294
47290
|
try {
|
|
47295
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
47296
|
-
const { getLearningDir } = await import("./learning-persistence-
|
|
47291
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-GYIEP7MM.js");
|
|
47292
|
+
const { getLearningDir } = await import("./learning-persistence-7N5SZHNX.js");
|
|
47297
47293
|
const mem = createSessionMemory2(getLearningDir());
|
|
47298
47294
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
47299
47295
|
cachedMemory = {
|
|
@@ -47354,7 +47350,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
47354
47350
|
callRecord(routingMemoryCache);
|
|
47355
47351
|
return;
|
|
47356
47352
|
}
|
|
47357
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
47353
|
+
routingMemoryInitPromise ??= import("./routing-memory-BBHAEJUL.js").then(({ createRoutingMemory }) => {
|
|
47358
47354
|
routingMemoryCache ??= createRoutingMemory();
|
|
47359
47355
|
return routingMemoryCache;
|
|
47360
47356
|
}).catch((error) => {
|
|
@@ -47388,7 +47384,7 @@ ${text}` : "";
|
|
|
47388
47384
|
}
|
|
47389
47385
|
async function getWeatherContext() {
|
|
47390
47386
|
try {
|
|
47391
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
47387
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-ZLQGZUDL.js");
|
|
47392
47388
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
47393
47389
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
47394
47390
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -47406,8 +47402,8 @@ ${lines}
|
|
|
47406
47402
|
}
|
|
47407
47403
|
async function getMemoryContext(task) {
|
|
47408
47404
|
try {
|
|
47409
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
47410
|
-
const { getLearningDir } = await import("./learning-persistence-
|
|
47405
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-GYIEP7MM.js");
|
|
47406
|
+
const { getLearningDir } = await import("./learning-persistence-7N5SZHNX.js");
|
|
47411
47407
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
47412
47408
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
47413
47409
|
if (learnings.length === 0) return "";
|
|
@@ -47525,7 +47521,7 @@ ${contextBlock}`;
|
|
|
47525
47521
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
47526
47522
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
47527
47523
|
try {
|
|
47528
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47524
|
+
const { executeVoting } = await import("./consensus-vote-57SKG3EN.js");
|
|
47529
47525
|
const votingResult = await executeVoting(
|
|
47530
47526
|
{
|
|
47531
47527
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -47939,7 +47935,7 @@ function createScaffoldStageWrapper() {
|
|
|
47939
47935
|
}
|
|
47940
47936
|
async function searchCodebaseForTask(task) {
|
|
47941
47937
|
try {
|
|
47942
|
-
const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-search-
|
|
47938
|
+
const { CodebaseIndex: CodebaseIndex2 } = await import("./codebase-search-3D4TW3KR.js");
|
|
47943
47939
|
const index = new CodebaseIndex2(process.cwd());
|
|
47944
47940
|
const terms = task.toLowerCase().split(/\s+/).filter((w) => w.length > 4).slice(0, 3);
|
|
47945
47941
|
if (terms.length === 0) return null;
|
|
@@ -47954,7 +47950,7 @@ async function searchCodebaseForTask(task) {
|
|
|
47954
47950
|
}
|
|
47955
47951
|
async function queryResearchRegistry(task) {
|
|
47956
47952
|
try {
|
|
47957
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
47953
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-NQMSFDMD.js");
|
|
47958
47954
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
47959
47955
|
if (topic === void 0) return null;
|
|
47960
47956
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -48006,7 +48002,7 @@ function createAnalyzeStageWrapper() {
|
|
|
48006
48002
|
true
|
|
48007
48003
|
);
|
|
48008
48004
|
}
|
|
48009
|
-
const { analyzeGitHubRepo: analyzeGitHubRepo2 } = await import("./repo-analyze-
|
|
48005
|
+
const { analyzeGitHubRepo: analyzeGitHubRepo2 } = await import("./repo-analyze-DI65XOTQ.js");
|
|
48010
48006
|
const analysis = await analyzeGitHubRepo2({ repo: slug, depth: "deep" });
|
|
48011
48007
|
const summary = `Language: ${String(analysis.language)}, Framework: ${String(analysis.framework)}, CI: ${String(analysis.ciProvider)}, Security: ${analysis.securityTooling.join(", ") || "none"}`;
|
|
48012
48008
|
return output(PIPELINE_STATE_KEYS.RESEARCH, summary, getTimeProvider().now() - start, true);
|
|
@@ -48025,7 +48021,7 @@ function createScanStageWrapper() {
|
|
|
48025
48021
|
try {
|
|
48026
48022
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
48027
48023
|
if (slug !== void 0) {
|
|
48028
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
48024
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-LS5GCASE.js");
|
|
48029
48025
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
48030
48026
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
48031
48027
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -48066,7 +48062,7 @@ function createAuditStageRegistry() {
|
|
|
48066
48062
|
|
|
48067
48063
|
// src/mcp/tools/pr-review-tool.ts
|
|
48068
48064
|
import { z as z102 } from "zod";
|
|
48069
|
-
import { randomUUID as randomUUID13 } from "crypto";
|
|
48065
|
+
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
48070
48066
|
|
|
48071
48067
|
// src/mcp/tools/pr-review-findings.ts
|
|
48072
48068
|
import { parse as parseYaml3 } from "yaml";
|
|
@@ -48149,7 +48145,7 @@ var FINDINGS_FORMAT_INSTRUCTIONS = `If you have one or more findings (claims tha
|
|
|
48149
48145
|
A finding only triggers request_changes if ALL FOUR gate checks are 'passed' AND named_assertion is substantive (>10 chars, naming a concrete failure). Findings missing any of those surface as informational only \u2014 they do not block the merge. This is the #2225 verification gate; the 2026-04-25 audit found a 100% false-positive rate when this gate was not enforced.`;
|
|
48150
48146
|
|
|
48151
48147
|
// src/audit/reviewed-diff-hash.ts
|
|
48152
|
-
import * as crypto2 from "crypto";
|
|
48148
|
+
import * as crypto2 from "node:crypto";
|
|
48153
48149
|
var MAX_REVIEWED_DIFF_BYTES = 5e4;
|
|
48154
48150
|
var CANONICAL_GIT_DIFF_ARGS = Object.freeze([
|
|
48155
48151
|
"-c",
|
|
@@ -48176,11 +48172,11 @@ function reviewedDiffWasTruncated(diff) {
|
|
|
48176
48172
|
}
|
|
48177
48173
|
|
|
48178
48174
|
// src/audit/pr-review-record-store.ts
|
|
48179
|
-
import { appendFileSync as appendFileSync4, existsSync as
|
|
48180
|
-
import { dirname as
|
|
48175
|
+
import { appendFileSync as appendFileSync4, existsSync as existsSync10, mkdirSync as mkdirSync6, readFileSync as readFileSync9 } from "node:fs";
|
|
48176
|
+
import { dirname as dirname3, isAbsolute, join as join10, resolve as resolve14 } from "node:path";
|
|
48181
48177
|
|
|
48182
48178
|
// src/audit/pr-review-record.ts
|
|
48183
|
-
import * as crypto3 from "crypto";
|
|
48179
|
+
import * as crypto3 from "node:crypto";
|
|
48184
48180
|
import { z as z101 } from "zod";
|
|
48185
48181
|
var PrReviewVerdictSchema = z101.enum(["approve", "request_changes", "abstain"]);
|
|
48186
48182
|
var PrReviewVoteCountsSchema = z101.object({
|
|
@@ -48352,7 +48348,7 @@ function assertNotSourceCheckoutWrite(filePath) {
|
|
|
48352
48348
|
if (!isUnderTestRunner()) return;
|
|
48353
48349
|
const here = findRepoRoot(process.cwd());
|
|
48354
48350
|
if (here === null) return;
|
|
48355
|
-
if (
|
|
48351
|
+
if (resolve14(filePath) !== resolve14(join10(here, PR_REVIEW_RECORDS_REL_PATH))) return;
|
|
48356
48352
|
throw new Error(
|
|
48357
48353
|
`Refusing to write ${filePath} from a test run (#4415): this is the source checkout's tracked, hash-chained audit file, and a fabricated record that chains cleanly is indistinguishable from a real verdict. Pass repoPath to a throwaway repo, or set NEXUS_PR_REVIEW_RECORDS_PATH.`
|
|
48358
48354
|
);
|
|
@@ -48360,20 +48356,20 @@ function assertNotSourceCheckoutWrite(filePath) {
|
|
|
48360
48356
|
function resolvePrReviewRecordsPath(repoPathOverride) {
|
|
48361
48357
|
const envPath = process.env[PR_REVIEW_RECORDS_PATH_ENV];
|
|
48362
48358
|
if (envPath !== void 0 && envPath.trim() !== "") {
|
|
48363
|
-
return isAbsolute(envPath) ? envPath :
|
|
48359
|
+
return isAbsolute(envPath) ? envPath : resolve14(envPath);
|
|
48364
48360
|
}
|
|
48365
48361
|
if (repoPathOverride !== void 0 && repoPathOverride.trim() !== "") {
|
|
48366
48362
|
const overrideRoot = findRepoRoot(repoPathOverride);
|
|
48367
|
-
if (overrideRoot !== null) return
|
|
48363
|
+
if (overrideRoot !== null) return join10(overrideRoot, PR_REVIEW_RECORDS_REL_PATH);
|
|
48368
48364
|
}
|
|
48369
48365
|
const root = findRepoRoot(process.cwd());
|
|
48370
48366
|
if (root === null) return void 0;
|
|
48371
|
-
return
|
|
48367
|
+
return join10(root, PR_REVIEW_RECORDS_REL_PATH);
|
|
48372
48368
|
}
|
|
48373
48369
|
function readPrReviewRecords(filePath) {
|
|
48374
48370
|
const records = [];
|
|
48375
48371
|
const invalidLines = [];
|
|
48376
|
-
if (!
|
|
48372
|
+
if (!existsSync10(filePath)) return { records, invalidLines };
|
|
48377
48373
|
const lines = readFileSync9(filePath, "utf-8").split("\n").filter((l) => l.trim() !== "");
|
|
48378
48374
|
for (const [i, line] of lines.entries()) {
|
|
48379
48375
|
try {
|
|
@@ -48387,7 +48383,7 @@ function readPrReviewRecords(filePath) {
|
|
|
48387
48383
|
return { records, invalidLines };
|
|
48388
48384
|
}
|
|
48389
48385
|
function readPrReviewLedgerTip(filePath, logger58) {
|
|
48390
|
-
if (!
|
|
48386
|
+
if (!existsSync10(filePath)) return { maxSequence: -1, lastHash: void 0 };
|
|
48391
48387
|
try {
|
|
48392
48388
|
const { records } = readPrReviewRecords(filePath);
|
|
48393
48389
|
if (records.length === 0) return { maxSequence: -1, lastHash: void 0 };
|
|
@@ -48413,7 +48409,7 @@ function persistPrReviewRecord(opts) {
|
|
|
48413
48409
|
}
|
|
48414
48410
|
assertNotSourceCheckoutWrite(filePath);
|
|
48415
48411
|
try {
|
|
48416
|
-
mkdirSync6(
|
|
48412
|
+
mkdirSync6(dirname3(filePath), { recursive: true });
|
|
48417
48413
|
const { maxSequence, lastHash } = readPrReviewLedgerTip(filePath, logger58);
|
|
48418
48414
|
const record = buildPrReviewRecord({
|
|
48419
48415
|
...opts,
|
|
@@ -49357,8 +49353,8 @@ function registerVendorPublishingAuditTool(server, deps) {
|
|
|
49357
49353
|
|
|
49358
49354
|
// src/mcp/tools/compare-data-feeds.ts
|
|
49359
49355
|
import { z as z105 } from "zod";
|
|
49360
|
-
import * as path7 from "path";
|
|
49361
|
-
import * as fs8 from "fs";
|
|
49356
|
+
import * as path7 from "node:path";
|
|
49357
|
+
import * as fs8 from "node:fs";
|
|
49362
49358
|
import * as yaml4 from "yaml";
|
|
49363
49359
|
var CompareDataFeedsInputSchema = z105.object({
|
|
49364
49360
|
feedAPath: z105.string().min(1).max(1e3).describe("Filesystem path to feed A (YAML or JSON, auto-detected by extension)"),
|
|
@@ -49658,7 +49654,7 @@ function registerQueryTaskStateTool(server, deps) {
|
|
|
49658
49654
|
import { z as z109 } from "zod";
|
|
49659
49655
|
|
|
49660
49656
|
// src/mcp/tools/ci-health-log.ts
|
|
49661
|
-
import { appendFileSync as appendFileSync5, existsSync as
|
|
49657
|
+
import { appendFileSync as appendFileSync5, existsSync as existsSync12, readFileSync as readFileSync11, statSync as statSync2, writeFileSync as writeFileSync3 } from "node:fs";
|
|
49662
49658
|
import { z as z108 } from "zod";
|
|
49663
49659
|
|
|
49664
49660
|
// src/mcp/tools/ci-health-types.ts
|
|
@@ -49925,7 +49921,7 @@ function registerCiHealthCheckTool(server, deps) {
|
|
|
49925
49921
|
}
|
|
49926
49922
|
|
|
49927
49923
|
// src/mcp/tools/quality-gate-tool.ts
|
|
49928
|
-
import { statSync as statSync3 } from "fs";
|
|
49924
|
+
import { statSync as statSync3 } from "node:fs";
|
|
49929
49925
|
import { z as z110 } from "zod";
|
|
49930
49926
|
var QualityCheckSchema = z110.enum(["typecheck", "lint", "tests", "build", "security"]);
|
|
49931
49927
|
var DEFAULT_CHECKS = ["typecheck", "lint", "tests"];
|
|
@@ -50044,8 +50040,8 @@ function registerRunQualityGateTool(server, deps) {
|
|
|
50044
50040
|
}
|
|
50045
50041
|
|
|
50046
50042
|
// src/mcp/tools/verify-audit-chain-tool.ts
|
|
50047
|
-
import * as fs9 from "fs/promises";
|
|
50048
|
-
import * as path8 from "path";
|
|
50043
|
+
import * as fs9 from "node:fs/promises";
|
|
50044
|
+
import * as path8 from "node:path";
|
|
50049
50045
|
import { z as z111 } from "zod";
|
|
50050
50046
|
var VerifyAuditChainInputSchema = z111.object({
|
|
50051
50047
|
logDir: z111.string().min(1).max(512).describe(
|
|
@@ -50168,9 +50164,9 @@ var RESEARCH_BUDGET_MS = 2e4;
|
|
|
50168
50164
|
var RESEARCH_TIMED_OUT = /* @__PURE__ */ Symbol("research-budget-exceeded");
|
|
50169
50165
|
async function withResearchBudget(p, ms) {
|
|
50170
50166
|
let timer;
|
|
50171
|
-
const budget = new Promise((
|
|
50167
|
+
const budget = new Promise((resolve21) => {
|
|
50172
50168
|
timer = setTimeout(() => {
|
|
50173
|
-
|
|
50169
|
+
resolve21(RESEARCH_TIMED_OUT);
|
|
50174
50170
|
}, ms);
|
|
50175
50171
|
});
|
|
50176
50172
|
try {
|
|
@@ -50272,7 +50268,7 @@ function registerSuggestResearchTasksTool(server, deps) {
|
|
|
50272
50268
|
|
|
50273
50269
|
// src/mcp/tools/run-tool.ts
|
|
50274
50270
|
import { z as z116 } from "zod";
|
|
50275
|
-
import { randomUUID as randomUUID17 } from "crypto";
|
|
50271
|
+
import { randomUUID as randomUUID17 } from "node:crypto";
|
|
50276
50272
|
|
|
50277
50273
|
// src/orchestration/meta-dispatcher.ts
|
|
50278
50274
|
var MetaDispatchError = class extends Error {
|
|
@@ -50490,7 +50486,7 @@ function classifyDispatchError(err2) {
|
|
|
50490
50486
|
}
|
|
50491
50487
|
|
|
50492
50488
|
// src/orchestration/meta-orchestrator.ts
|
|
50493
|
-
import { randomUUID as randomUUID14 } from "crypto";
|
|
50489
|
+
import { randomUUID as randomUUID14 } from "node:crypto";
|
|
50494
50490
|
|
|
50495
50491
|
// src/orchestration/meta-orchestrator-routing.ts
|
|
50496
50492
|
function reasoningFor(selection, routing) {
|
|
@@ -50665,7 +50661,7 @@ function createMetaOrchestrator(options) {
|
|
|
50665
50661
|
}
|
|
50666
50662
|
|
|
50667
50663
|
// src/orchestration/meta-shadow-selector.ts
|
|
50668
|
-
import { appendFileSync as appendFileSync6, existsSync as
|
|
50664
|
+
import { appendFileSync as appendFileSync6, existsSync as existsSync13, readFileSync as readFileSync12 } from "node:fs";
|
|
50669
50665
|
import { z as z113 } from "zod";
|
|
50670
50666
|
var SHADOW_STRATEGY_ARMS = [
|
|
50671
50667
|
"single-shot",
|
|
@@ -50790,7 +50786,7 @@ function hydrateShadowSelector(selector) {
|
|
|
50790
50786
|
const hydratable = selector;
|
|
50791
50787
|
if (typeof hydratable.recordFromContext !== "function") return 0;
|
|
50792
50788
|
const file = getMetaOutcomesFile();
|
|
50793
|
-
if (!
|
|
50789
|
+
if (!existsSync13(file)) return 0;
|
|
50794
50790
|
let replayed = 0;
|
|
50795
50791
|
try {
|
|
50796
50792
|
const cutoff = Date.now() - HYDRATE_LOOKBACK_MS;
|
|
@@ -51159,17 +51155,17 @@ function evaluateMetaStrategyReadiness(result, config = DEFAULT_META_STRATEGY_RE
|
|
|
51159
51155
|
|
|
51160
51156
|
// src/mcp/tools/dev-pipeline-tool.ts
|
|
51161
51157
|
import { z as z114 } from "zod";
|
|
51162
|
-
import * as fs11 from "fs";
|
|
51163
|
-
import * as path10 from "path";
|
|
51164
|
-
import { randomUUID as randomUUID15 } from "crypto";
|
|
51158
|
+
import * as fs11 from "node:fs";
|
|
51159
|
+
import * as path10 from "node:path";
|
|
51160
|
+
import { randomUUID as randomUUID15 } from "node:crypto";
|
|
51165
51161
|
|
|
51166
51162
|
// src/pipeline/task-tracker.ts
|
|
51167
|
-
import * as fs10 from "fs";
|
|
51168
|
-
import * as path9 from "path";
|
|
51163
|
+
import * as fs10 from "node:fs";
|
|
51164
|
+
import * as path9 from "node:path";
|
|
51169
51165
|
var logger48 = createLogger({ component: "task-tracker" });
|
|
51170
51166
|
async function exec(cmd, args, timeout = 15e3) {
|
|
51171
|
-
const { execFile: execFile2 } = await import("child_process");
|
|
51172
|
-
const { promisify: promisify2 } = await import("util");
|
|
51167
|
+
const { execFile: execFile2 } = await import("node:child_process");
|
|
51168
|
+
const { promisify: promisify2 } = await import("node:util");
|
|
51173
51169
|
const run = promisify2(execFile2);
|
|
51174
51170
|
const { stdout } = await run(cmd, [...args], { timeout });
|
|
51175
51171
|
return stdout.trim();
|
|
@@ -51182,7 +51178,7 @@ var GitHubTaskTracker = class {
|
|
|
51182
51178
|
cachedProvider = null;
|
|
51183
51179
|
async getProvider() {
|
|
51184
51180
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
51185
|
-
const { createScmProvider } = await import("./factory-
|
|
51181
|
+
const { createScmProvider } = await import("./factory-SF6ZPN6D.js");
|
|
51186
51182
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
51187
51183
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
51188
51184
|
this.cachedProvider = result.value;
|
|
@@ -51572,9 +51568,9 @@ function registerDevPipelineTool(server, deps) {
|
|
|
51572
51568
|
|
|
51573
51569
|
// src/mcp/tools/pipeline-tool.ts
|
|
51574
51570
|
import { z as z115 } from "zod";
|
|
51575
|
-
import * as fs12 from "fs";
|
|
51576
|
-
import * as path11 from "path";
|
|
51577
|
-
import { randomUUID as randomUUID16 } from "crypto";
|
|
51571
|
+
import * as fs12 from "node:fs";
|
|
51572
|
+
import * as path11 from "node:path";
|
|
51573
|
+
import { randomUUID as randomUUID16 } from "node:crypto";
|
|
51578
51574
|
var PIPELINE_ASYNC_HINT = "A full run_pipeline run can exceed the synchronous MCP request timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
|
|
51579
51575
|
var PipelineInputSchema = z115.object({
|
|
51580
51576
|
/** The task to execute. */
|
|
@@ -52097,7 +52093,7 @@ async function probeSource(source, includeModelIds) {
|
|
|
52097
52093
|
}
|
|
52098
52094
|
}
|
|
52099
52095
|
async function defaultSources(includeOpenRouter) {
|
|
52100
|
-
const { createAllAdapters: createAllAdapters2 } = await import("./factory-
|
|
52096
|
+
const { createAllAdapters: createAllAdapters2 } = await import("./factory-5URERSHK.js");
|
|
52101
52097
|
const adapters = createAllAdapters2();
|
|
52102
52098
|
return buildDefaultModelSources(adapters, { includeOpenRouter });
|
|
52103
52099
|
}
|
|
@@ -52200,7 +52196,7 @@ var VoterEvalVerdictQuerySchema = z118.object({
|
|
|
52200
52196
|
|
|
52201
52197
|
// src/mcp/tools/supply-chain-tradeoff-panel.ts
|
|
52202
52198
|
import { z as z119 } from "zod";
|
|
52203
|
-
import { randomUUID as randomUUID18 } from "crypto";
|
|
52199
|
+
import { randomUUID as randomUUID18 } from "node:crypto";
|
|
52204
52200
|
var DEFAULT_AXES = [
|
|
52205
52201
|
"build_time_determinism",
|
|
52206
52202
|
"supply_chain_risk",
|
|
@@ -53940,7 +53936,6 @@ var ResponseCacheConfigSchema = z124.object({
|
|
|
53940
53936
|
});
|
|
53941
53937
|
|
|
53942
53938
|
// src/cli-adapters/response-cache-utils.ts
|
|
53943
|
-
import { createHash as createHash6 } from "crypto";
|
|
53944
53939
|
var logger51 = createLogger({ component: "ResponseCacheUtils" });
|
|
53945
53940
|
|
|
53946
53941
|
// src/cli-adapters/unified-routing-types.ts
|
|
@@ -54040,7 +54035,7 @@ var FeedbackCollectorConfigSchema = z126.object({
|
|
|
54040
54035
|
});
|
|
54041
54036
|
|
|
54042
54037
|
// src/learning/outcome-feedback-helpers.ts
|
|
54043
|
-
import { randomUUID as randomUUID19 } from "crypto";
|
|
54038
|
+
import { randomUUID as randomUUID19 } from "node:crypto";
|
|
54044
54039
|
function countOutcomesByClass(outcomes) {
|
|
54045
54040
|
const counts = {
|
|
54046
54041
|
success: 0,
|
|
@@ -54359,7 +54354,7 @@ var DEFAULT_FEEDBACK_INTEGRATION_CONFIG = {
|
|
|
54359
54354
|
};
|
|
54360
54355
|
|
|
54361
54356
|
// src/learning/feedback-integration.ts
|
|
54362
|
-
import { randomUUID as randomUUID20 } from "crypto";
|
|
54357
|
+
import { randomUUID as randomUUID20 } from "node:crypto";
|
|
54363
54358
|
var STEP_QUALITY_SCORING = {
|
|
54364
54359
|
/** Base score for successful steps. */
|
|
54365
54360
|
successBase: 0.8,
|
|
@@ -55109,9 +55104,9 @@ function getPolicy(id) {
|
|
|
55109
55104
|
}
|
|
55110
55105
|
|
|
55111
55106
|
// src/security/sandbox/sandbox-executor.ts
|
|
55112
|
-
import { execFile } from "child_process";
|
|
55113
|
-
import { promisify } from "util";
|
|
55114
|
-
import { resolve as
|
|
55107
|
+
import { execFile } from "node:child_process";
|
|
55108
|
+
import { promisify } from "node:util";
|
|
55109
|
+
import { resolve as resolve20, normalize as normalize2, sep as sep12 } from "node:path";
|
|
55115
55110
|
var execFileAsync = promisify(execFile);
|
|
55116
55111
|
var logger53 = createLogger({ component: "sandbox-executor" });
|
|
55117
55112
|
function parseExecError(error) {
|
|
@@ -55191,9 +55186,9 @@ var PolicySandboxExecutor = class {
|
|
|
55191
55186
|
*/
|
|
55192
55187
|
validateCwd(cwd, policy) {
|
|
55193
55188
|
if (cwd === void 0) return null;
|
|
55194
|
-
const normalizedCwd = normalize2(
|
|
55189
|
+
const normalizedCwd = normalize2(resolve20(cwd));
|
|
55195
55190
|
const isAllowed = policy.pathRules.some((rule) => {
|
|
55196
|
-
const normalizedRule = normalize2(
|
|
55191
|
+
const normalizedRule = normalize2(resolve20(rule.path));
|
|
55197
55192
|
const isUnderRule = normalizedCwd === normalizedRule || normalizedCwd.startsWith(normalizedRule + sep12);
|
|
55198
55193
|
return isUnderRule && rule.access !== "none";
|
|
55199
55194
|
});
|
|
@@ -56169,4 +56164,4 @@ export {
|
|
|
56169
56164
|
shutdownFeedbackSubscriber,
|
|
56170
56165
|
createEventBusBridge
|
|
56171
56166
|
};
|
|
56172
|
-
//# sourceMappingURL=chunk-
|
|
56167
|
+
//# sourceMappingURL=chunk-LOYIV3HG.js.map
|