nexus-agents 8.8.0 → 8.8.2
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/{ast-rule-runner-IESI3WWR.js → ast-rule-runner-WANOR3MX.js} +5 -5
- package/dist/{child-mcp-config-WQNW5YFO.js → child-mcp-config-N4HLLCEH.js} +5 -5
- package/dist/{chunk-TQT2BIZ7.js → chunk-276GRITW.js} +4 -4
- package/dist/{chunk-DEXENQXS.js → chunk-3CLKYFE3.js} +74 -7
- package/dist/chunk-3CLKYFE3.js.map +1 -0
- package/dist/{chunk-YUMKCIEL.js → chunk-3XQK4MEF.js} +2 -2
- package/dist/{chunk-6AGNJBHE.js → chunk-3YKFLM2B.js} +2 -2
- package/dist/{chunk-4HZCKQ25.js → chunk-64VMTY3M.js} +2 -2
- package/dist/{chunk-DY6DVTX2.js → chunk-6HETGJSB.js} +3 -3
- package/dist/{chunk-ODBLHHTP.js → chunk-6URMW3DB.js} +2 -2
- package/dist/{chunk-BNPXE7BD.js → chunk-7AU5WLAJ.js} +2 -2
- package/dist/{chunk-66GKBIY2.js → chunk-7J7UYJXC.js} +7 -7
- package/dist/{chunk-BIHRU7WA.js → chunk-7QQ5F7T5.js} +9 -9
- package/dist/{chunk-ITCKXMOH.js → chunk-7WJGV5DN.js} +2 -2
- package/dist/{chunk-ZN6BTFLD.js → chunk-AOS7F4QR.js} +2 -2
- package/dist/{chunk-7BYI5CBK.js → chunk-CQCVEC7P.js} +124 -111
- package/dist/{chunk-7BYI5CBK.js.map → chunk-CQCVEC7P.js.map} +1 -1
- package/dist/{chunk-4HXPNLZS.js → chunk-DKHBIJO4.js} +2 -2
- package/dist/{chunk-37ONEK7R.js → chunk-EALWAQAQ.js} +12 -12
- package/dist/chunk-EALWAQAQ.js.map +1 -0
- package/dist/{chunk-HEV2C6VS.js → chunk-ERL3XHQO.js} +6 -6
- package/dist/{chunk-OLR2RIN2.js → chunk-F2GERNMF.js} +2 -2
- package/dist/{chunk-7BNB4YVO.js → chunk-FBWOWMEB.js} +3 -3
- package/dist/{chunk-W5VBFX65.js → chunk-FKKVZRSY.js} +2 -2
- package/dist/{chunk-3SO5DMHS.js → chunk-GXLI2E4U.js} +4 -4
- package/dist/chunk-H5DTHO7O.js +7 -0
- package/dist/{chunk-RWZJ2D2N.js → chunk-II5NJRKH.js} +2 -2
- package/dist/{chunk-MM223CVS.js → chunk-J7QCZRVK.js} +6 -1
- package/dist/{chunk-MM223CVS.js.map → chunk-J7QCZRVK.js.map} +1 -1
- package/dist/{chunk-F26X4N73.js → chunk-K2PVLCHR.js} +2 -2
- package/dist/{chunk-DZ5V47RU.js → chunk-MXQG3A5W.js} +6 -6
- package/dist/{chunk-4AE2QO7Q.js → chunk-N347WXTT.js} +2 -2
- package/dist/{chunk-CRKF5LUZ.js → chunk-NR62IQDC.js} +6 -6
- package/dist/{chunk-REY2B5LO.js → chunk-Q5V3KTUL.js} +2 -2
- package/dist/{chunk-NSHGFRGF.js → chunk-QCSXKQTK.js} +2 -2
- package/dist/{chunk-HQ6K7OYH.js → chunk-QY3HOLGD.js} +10 -10
- package/dist/{chunk-SNEUKIBK.js → chunk-SNSPYZQT.js} +5 -5
- package/dist/{chunk-36AR3GCF.js → chunk-SQCFKQUR.js} +56 -23
- package/dist/{chunk-36AR3GCF.js.map → chunk-SQCFKQUR.js.map} +1 -1
- package/dist/{chunk-GUOMNRXZ.js → chunk-TZWJ7QLW.js} +2 -2
- package/dist/{chunk-PX422NHD.js → chunk-VADACTVB.js} +2 -2
- package/dist/{chunk-ZQD67JES.js → chunk-W6SM3MU5.js} +4 -4
- package/dist/{chunk-W37HHXDL.js → chunk-WXU4Y5T3.js} +2 -2
- package/dist/{chunk-OPHI2RB6.js → chunk-YQUM3UWK.js} +5 -5
- package/dist/{chunk-BBMGN7FS.js → chunk-ZGHJMFQ6.js} +3 -3
- package/dist/{cli-circuit-breaker-YAAGSJ5N.js → cli-circuit-breaker-AAHYLFXZ.js} +5 -5
- package/dist/cli.js +47 -47
- package/dist/{composite-router-TU6MVJBG.js → composite-router-VAVDLJGT.js} +4 -4
- package/dist/{consensus-vote-FJWLHMQL.js → consensus-vote-L4CN33XE.js} +21 -21
- package/dist/{context-retriever-A4BZMTWM.js → context-retriever-MYKBBDAN.js} +11 -11
- package/dist/doctor-deep-AKOPPCXB.js +13 -0
- package/dist/{doctor-live-G3EO5LQD.js → doctor-live-3PVIYQST.js} +12 -12
- package/dist/{expert-bridge-IKY5TTAH.js → expert-bridge-G3KN7QWL.js} +6 -6
- package/dist/factory-KVMLFEWJ.js +15 -0
- package/dist/factory-ROTP63IZ.js +25 -0
- package/dist/{improvement-review-JNHEZ2DJ.js → improvement-review-WTZ4JV5V.js} +8 -8
- package/dist/index.d.ts +49 -0
- package/dist/index.js +36 -36
- package/dist/{init-opencode-KENOM2HA.js → init-opencode-C63LASGX.js} +8 -8
- package/dist/issue-triage-PIE3YVCV.js +17 -0
- package/dist/{learning-persistence-7N5SZHNX.js → learning-persistence-JK2FELZL.js} +3 -3
- package/dist/{pr-reviewer-helpers-C72VNWXU.js → pr-reviewer-helpers-4VDGMGV5.js} +6 -6
- package/dist/{registry-command-53E7LRNR.js → registry-command-IRDP2L2R.js} +4 -4
- package/dist/{repo-security-plan-ZSXHLYMU.js → repo-security-plan-NS47HQEF.js} +5 -5
- package/dist/research-helpers-synthesize-5NBL637T.js +14 -0
- package/dist/{routing-memory-5RYZJE45.js → routing-memory-2IELT5GT.js} +4 -4
- package/dist/{session-memory-3GE74TXJ.js → session-memory-CH3CVLIT.js} +5 -5
- package/dist/setup-config-MKZZDUJP.js +11 -0
- package/dist/{setup-custom-api-5ZZQJ5WX.js → setup-custom-api-2I52S7XU.js} +6 -6
- package/dist/setup-data-dir-NU3YBIZB.js +29 -0
- package/dist/{tool-memory-ZW2J3PMR.js → tool-memory-STS3DWOK.js} +8 -8
- package/dist/{tool-memory-registry-adapters-PCOYMYRF.js → tool-memory-registry-adapters-MZ5CSCYW.js} +3 -3
- package/dist/unified-registry-NJS4ZWC3.js +26 -0
- package/dist/{weather-report-OQ2UA3DZ.js → weather-report-YG4T4Q23.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-37ONEK7R.js.map +0 -1
- package/dist/chunk-DEXENQXS.js.map +0 -1
- package/dist/chunk-SAKV5TSH.js +0 -7
- package/dist/doctor-deep-N4IFVZLP.js +0 -13
- package/dist/factory-EJ2ZMEQ7.js +0 -15
- package/dist/factory-VGRG7M62.js +0 -25
- package/dist/issue-triage-IWMHDNUY.js +0 -17
- package/dist/research-helpers-synthesize-X4O3S4SH.js +0 -14
- package/dist/setup-config-YGTQJTTC.js +0 -11
- package/dist/setup-data-dir-NKG6L7FO.js +0 -29
- package/dist/unified-registry-IH3UEZLZ.js +0 -26
- /package/dist/{ast-rule-runner-IESI3WWR.js.map → ast-rule-runner-WANOR3MX.js.map} +0 -0
- /package/dist/{child-mcp-config-WQNW5YFO.js.map → child-mcp-config-N4HLLCEH.js.map} +0 -0
- /package/dist/{chunk-TQT2BIZ7.js.map → chunk-276GRITW.js.map} +0 -0
- /package/dist/{chunk-YUMKCIEL.js.map → chunk-3XQK4MEF.js.map} +0 -0
- /package/dist/{chunk-6AGNJBHE.js.map → chunk-3YKFLM2B.js.map} +0 -0
- /package/dist/{chunk-4HZCKQ25.js.map → chunk-64VMTY3M.js.map} +0 -0
- /package/dist/{chunk-DY6DVTX2.js.map → chunk-6HETGJSB.js.map} +0 -0
- /package/dist/{chunk-ODBLHHTP.js.map → chunk-6URMW3DB.js.map} +0 -0
- /package/dist/{chunk-BNPXE7BD.js.map → chunk-7AU5WLAJ.js.map} +0 -0
- /package/dist/{chunk-66GKBIY2.js.map → chunk-7J7UYJXC.js.map} +0 -0
- /package/dist/{chunk-BIHRU7WA.js.map → chunk-7QQ5F7T5.js.map} +0 -0
- /package/dist/{chunk-ITCKXMOH.js.map → chunk-7WJGV5DN.js.map} +0 -0
- /package/dist/{chunk-ZN6BTFLD.js.map → chunk-AOS7F4QR.js.map} +0 -0
- /package/dist/{chunk-4HXPNLZS.js.map → chunk-DKHBIJO4.js.map} +0 -0
- /package/dist/{chunk-HEV2C6VS.js.map → chunk-ERL3XHQO.js.map} +0 -0
- /package/dist/{chunk-OLR2RIN2.js.map → chunk-F2GERNMF.js.map} +0 -0
- /package/dist/{chunk-7BNB4YVO.js.map → chunk-FBWOWMEB.js.map} +0 -0
- /package/dist/{chunk-W5VBFX65.js.map → chunk-FKKVZRSY.js.map} +0 -0
- /package/dist/{chunk-3SO5DMHS.js.map → chunk-GXLI2E4U.js.map} +0 -0
- /package/dist/{chunk-SAKV5TSH.js.map → chunk-H5DTHO7O.js.map} +0 -0
- /package/dist/{chunk-RWZJ2D2N.js.map → chunk-II5NJRKH.js.map} +0 -0
- /package/dist/{chunk-F26X4N73.js.map → chunk-K2PVLCHR.js.map} +0 -0
- /package/dist/{chunk-DZ5V47RU.js.map → chunk-MXQG3A5W.js.map} +0 -0
- /package/dist/{chunk-4AE2QO7Q.js.map → chunk-N347WXTT.js.map} +0 -0
- /package/dist/{chunk-CRKF5LUZ.js.map → chunk-NR62IQDC.js.map} +0 -0
- /package/dist/{chunk-REY2B5LO.js.map → chunk-Q5V3KTUL.js.map} +0 -0
- /package/dist/{chunk-NSHGFRGF.js.map → chunk-QCSXKQTK.js.map} +0 -0
- /package/dist/{chunk-HQ6K7OYH.js.map → chunk-QY3HOLGD.js.map} +0 -0
- /package/dist/{chunk-SNEUKIBK.js.map → chunk-SNSPYZQT.js.map} +0 -0
- /package/dist/{chunk-GUOMNRXZ.js.map → chunk-TZWJ7QLW.js.map} +0 -0
- /package/dist/{chunk-PX422NHD.js.map → chunk-VADACTVB.js.map} +0 -0
- /package/dist/{chunk-ZQD67JES.js.map → chunk-W6SM3MU5.js.map} +0 -0
- /package/dist/{chunk-W37HHXDL.js.map → chunk-WXU4Y5T3.js.map} +0 -0
- /package/dist/{chunk-OPHI2RB6.js.map → chunk-YQUM3UWK.js.map} +0 -0
- /package/dist/{chunk-BBMGN7FS.js.map → chunk-ZGHJMFQ6.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-YAAGSJ5N.js.map → cli-circuit-breaker-AAHYLFXZ.js.map} +0 -0
- /package/dist/{composite-router-TU6MVJBG.js.map → composite-router-VAVDLJGT.js.map} +0 -0
- /package/dist/{consensus-vote-FJWLHMQL.js.map → consensus-vote-L4CN33XE.js.map} +0 -0
- /package/dist/{context-retriever-A4BZMTWM.js.map → context-retriever-MYKBBDAN.js.map} +0 -0
- /package/dist/{doctor-deep-N4IFVZLP.js.map → doctor-deep-AKOPPCXB.js.map} +0 -0
- /package/dist/{doctor-live-G3EO5LQD.js.map → doctor-live-3PVIYQST.js.map} +0 -0
- /package/dist/{expert-bridge-IKY5TTAH.js.map → expert-bridge-G3KN7QWL.js.map} +0 -0
- /package/dist/{factory-EJ2ZMEQ7.js.map → factory-KVMLFEWJ.js.map} +0 -0
- /package/dist/{factory-VGRG7M62.js.map → factory-ROTP63IZ.js.map} +0 -0
- /package/dist/{improvement-review-JNHEZ2DJ.js.map → improvement-review-WTZ4JV5V.js.map} +0 -0
- /package/dist/{init-opencode-KENOM2HA.js.map → init-opencode-C63LASGX.js.map} +0 -0
- /package/dist/{issue-triage-IWMHDNUY.js.map → issue-triage-PIE3YVCV.js.map} +0 -0
- /package/dist/{learning-persistence-7N5SZHNX.js.map → learning-persistence-JK2FELZL.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-C72VNWXU.js.map → pr-reviewer-helpers-4VDGMGV5.js.map} +0 -0
- /package/dist/{registry-command-53E7LRNR.js.map → registry-command-IRDP2L2R.js.map} +0 -0
- /package/dist/{repo-security-plan-ZSXHLYMU.js.map → repo-security-plan-NS47HQEF.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-X4O3S4SH.js.map → research-helpers-synthesize-5NBL637T.js.map} +0 -0
- /package/dist/{routing-memory-5RYZJE45.js.map → routing-memory-2IELT5GT.js.map} +0 -0
- /package/dist/{session-memory-3GE74TXJ.js.map → session-memory-CH3CVLIT.js.map} +0 -0
- /package/dist/{setup-config-YGTQJTTC.js.map → setup-config-MKZZDUJP.js.map} +0 -0
- /package/dist/{setup-custom-api-5ZZQJ5WX.js.map → setup-custom-api-2I52S7XU.js.map} +0 -0
- /package/dist/{setup-data-dir-NKG6L7FO.js.map → setup-data-dir-NU3YBIZB.js.map} +0 -0
- /package/dist/{tool-memory-ZW2J3PMR.js.map → tool-memory-STS3DWOK.js.map} +0 -0
- /package/dist/{tool-memory-registry-adapters-PCOYMYRF.js.map → tool-memory-registry-adapters-MZ5CSCYW.js.map} +0 -0
- /package/dist/{unified-registry-IH3UEZLZ.js.map → unified-registry-NJS4ZWC3.js.map} +0 -0
- /package/dist/{weather-report-OQ2UA3DZ.js.map → weather-report-YG4T4Q23.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSecurityPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7AU5WLAJ.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzeGitHubRepo
|
|
6
6
|
} from "./chunk-DGWT7DXX.js";
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
clampTaskTtl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QY3HOLGD.js";
|
|
25
25
|
import {
|
|
26
26
|
executeExpert
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7J7UYJXC.js";
|
|
28
28
|
import {
|
|
29
29
|
JobStatusSchema,
|
|
30
30
|
VOTER_ROLES,
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
defaultPendingEnvelope,
|
|
37
37
|
defaultReplayEnvelope,
|
|
38
38
|
isAbandonedJob,
|
|
39
|
+
isMeasuredBuildVersion,
|
|
39
40
|
isRateLimitError,
|
|
40
41
|
listJobs,
|
|
41
42
|
readJobResult,
|
|
@@ -47,24 +48,24 @@ import {
|
|
|
47
48
|
simulationDeniedResult,
|
|
48
49
|
toJobSummary,
|
|
49
50
|
writeJobCancelled
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-SQCFKQUR.js";
|
|
51
52
|
import {
|
|
52
53
|
allOf
|
|
53
54
|
} from "./chunk-OQB3XC5O.js";
|
|
54
55
|
import {
|
|
55
56
|
normalizeTopicToCanonical,
|
|
56
57
|
synthesizeResearch
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-ZGHJMFQ6.js";
|
|
58
59
|
import {
|
|
59
60
|
IssueTriage
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-MXQG3A5W.js";
|
|
61
62
|
import {
|
|
62
63
|
resolveEnvMode,
|
|
63
64
|
sanitizeInput
|
|
64
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-N347WXTT.js";
|
|
65
66
|
import {
|
|
66
67
|
withPrerequisite
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-W6SM3MU5.js";
|
|
68
69
|
import {
|
|
69
70
|
NOOP_NOTIFIER,
|
|
70
71
|
RateLimiter,
|
|
@@ -89,18 +90,18 @@ import {
|
|
|
89
90
|
withAuditTrail,
|
|
90
91
|
withProgressHeartbeat,
|
|
91
92
|
wrapToolWithTimeout
|
|
92
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-YQUM3UWK.js";
|
|
93
94
|
import {
|
|
94
95
|
createAuditTrail,
|
|
95
96
|
createGraphAuditBridge,
|
|
96
97
|
emitPipelinePolicyEvent
|
|
97
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-3YKFLM2B.js";
|
|
98
99
|
import {
|
|
99
100
|
EventTopics,
|
|
100
101
|
createEvent,
|
|
101
102
|
getGlobalEventBus,
|
|
102
103
|
getGlobalRegistry
|
|
103
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-276GRITW.js";
|
|
104
105
|
import {
|
|
105
106
|
IDENTIFIER_RE,
|
|
106
107
|
LANG_VALUES,
|
|
@@ -133,29 +134,32 @@ import {
|
|
|
133
134
|
parseRegistry,
|
|
134
135
|
sourceExistsInRegistry,
|
|
135
136
|
summarizeContextForPrompt
|
|
136
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-EALWAQAQ.js";
|
|
137
138
|
import {
|
|
139
|
+
REGISTRY_PATH,
|
|
140
|
+
getProjectRoot,
|
|
138
141
|
loadPapersRegistry,
|
|
139
142
|
loadTechniquesRegistry,
|
|
140
|
-
resolveInsideRoot
|
|
141
|
-
|
|
143
|
+
resolveInsideRoot,
|
|
144
|
+
resolveRegistryRoot
|
|
145
|
+
} from "./chunk-3CLKYFE3.js";
|
|
142
146
|
import {
|
|
143
147
|
getTokenEnvVars,
|
|
144
148
|
resolveToken
|
|
145
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-II5NJRKH.js";
|
|
146
150
|
import {
|
|
147
151
|
DEFAULT_RELEVANCE_CONFIG,
|
|
148
152
|
MemoryImportance,
|
|
149
153
|
calculateTextJaccardSimilarity,
|
|
150
154
|
getToolMemory
|
|
151
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-NR62IQDC.js";
|
|
152
156
|
import {
|
|
153
157
|
STOPWORDS,
|
|
154
158
|
truncateWithInfo
|
|
155
159
|
} from "./chunk-6T3EPABN.js";
|
|
156
160
|
import {
|
|
157
161
|
createSessionMemory
|
|
158
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-K2PVLCHR.js";
|
|
159
163
|
import {
|
|
160
164
|
BUILT_IN_EXPERTS,
|
|
161
165
|
BuiltInExpertTypeSchema,
|
|
@@ -173,25 +177,25 @@ import {
|
|
|
173
177
|
getAvailableClis,
|
|
174
178
|
sleep,
|
|
175
179
|
withTimeout
|
|
176
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-7QQ5F7T5.js";
|
|
177
181
|
import {
|
|
178
182
|
BaseAdapter,
|
|
179
183
|
createStream,
|
|
180
184
|
requireApiKey,
|
|
181
185
|
validateApiKeyPresence
|
|
182
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-FKKVZRSY.js";
|
|
183
187
|
import {
|
|
184
188
|
DEFAULTS
|
|
185
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-QCSXKQTK.js";
|
|
186
190
|
import {
|
|
187
191
|
getAvailabilityCache,
|
|
188
192
|
getCliForModelId,
|
|
189
193
|
resolveFallback
|
|
190
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-TZWJ7QLW.js";
|
|
191
195
|
import {
|
|
192
196
|
generateHyphenId,
|
|
193
197
|
generateUUID
|
|
194
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-WXU4Y5T3.js";
|
|
195
199
|
import {
|
|
196
200
|
AGENT_ROUTER_TIMEOUTS,
|
|
197
201
|
API_TIMEOUTS,
|
|
@@ -297,18 +301,18 @@ import {
|
|
|
297
301
|
selectStrategyByManifest,
|
|
298
302
|
toExpertTaskAnalysisResult,
|
|
299
303
|
withStep
|
|
300
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-ERL3XHQO.js";
|
|
301
305
|
import {
|
|
302
306
|
ensureLearningDir,
|
|
303
307
|
getMetaOutcomesFile,
|
|
304
308
|
isPersistenceEnabled
|
|
305
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-7WJGV5DN.js";
|
|
306
310
|
import {
|
|
307
311
|
findRepoRoot,
|
|
308
312
|
getNexusDataDir,
|
|
309
313
|
nexusDataPath,
|
|
310
314
|
nexusDataPathEnsure
|
|
311
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-J7QCZRVK.js";
|
|
312
316
|
|
|
313
317
|
// src/config/schemas-core.ts
|
|
314
318
|
import { z } from "zod";
|
|
@@ -1961,7 +1965,7 @@ var RateLimiter2 = class {
|
|
|
1961
1965
|
* Sleeps for the specified duration.
|
|
1962
1966
|
*/
|
|
1963
1967
|
sleep(ms) {
|
|
1964
|
-
return new Promise((
|
|
1968
|
+
return new Promise((resolve20) => setTimeout(resolve20, ms));
|
|
1965
1969
|
}
|
|
1966
1970
|
/**
|
|
1967
1971
|
* Returns the current number of available tokens.
|
|
@@ -2221,7 +2225,7 @@ var AbortError = class extends Error {
|
|
|
2221
2225
|
function raceAbort(promise, signal) {
|
|
2222
2226
|
if (signal === void 0) return promise;
|
|
2223
2227
|
if (signal.aborted) return Promise.reject(new AbortError());
|
|
2224
|
-
return new Promise((
|
|
2228
|
+
return new Promise((resolve20, reject) => {
|
|
2225
2229
|
const onAbort = () => {
|
|
2226
2230
|
reject(new AbortError());
|
|
2227
2231
|
};
|
|
@@ -2229,7 +2233,7 @@ function raceAbort(promise, signal) {
|
|
|
2229
2233
|
promise.then(
|
|
2230
2234
|
(value) => {
|
|
2231
2235
|
signal.removeEventListener("abort", onAbort);
|
|
2232
|
-
|
|
2236
|
+
resolve20(value);
|
|
2233
2237
|
},
|
|
2234
2238
|
(error) => {
|
|
2235
2239
|
signal.removeEventListener("abort", onAbort);
|
|
@@ -5189,13 +5193,13 @@ function makeCancelError(taskId) {
|
|
|
5189
5193
|
}
|
|
5190
5194
|
function executeWithTimeout(params) {
|
|
5191
5195
|
const { task, maxDurationMs, executeTask, transformError, signal } = params;
|
|
5192
|
-
return new Promise((
|
|
5196
|
+
return new Promise((resolve20) => {
|
|
5193
5197
|
let settled = false;
|
|
5194
5198
|
const settle = (result) => {
|
|
5195
5199
|
if (settled) return;
|
|
5196
5200
|
settled = true;
|
|
5197
5201
|
clearTimeout(timeoutId);
|
|
5198
|
-
|
|
5202
|
+
resolve20(result);
|
|
5199
5203
|
};
|
|
5200
5204
|
const timeoutId = setTimeout(() => {
|
|
5201
5205
|
settle(
|
|
@@ -10698,13 +10702,13 @@ var WaveScheduler = class {
|
|
|
10698
10702
|
}
|
|
10699
10703
|
async withTimeout(promise, timeoutMs, taskId) {
|
|
10700
10704
|
if (timeoutMs <= 0) return promise;
|
|
10701
|
-
return new Promise((
|
|
10705
|
+
return new Promise((resolve20, reject) => {
|
|
10702
10706
|
const timer = setTimeout(() => {
|
|
10703
10707
|
reject(new Error(`Task ${taskId} timed out after ${String(timeoutMs)}ms`));
|
|
10704
10708
|
}, timeoutMs);
|
|
10705
10709
|
promise.then((result) => {
|
|
10706
10710
|
clearTimeout(timer);
|
|
10707
|
-
|
|
10711
|
+
resolve20(result);
|
|
10708
10712
|
}).catch((error) => {
|
|
10709
10713
|
clearTimeout(timer);
|
|
10710
10714
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
@@ -18484,8 +18488,8 @@ var Semaphore = class {
|
|
|
18484
18488
|
this.available -= 1;
|
|
18485
18489
|
return Promise.resolve();
|
|
18486
18490
|
}
|
|
18487
|
-
return new Promise((
|
|
18488
|
-
this.waiters.push(
|
|
18491
|
+
return new Promise((resolve20) => {
|
|
18492
|
+
this.waiters.push(resolve20);
|
|
18489
18493
|
});
|
|
18490
18494
|
}
|
|
18491
18495
|
release() {
|
|
@@ -21909,9 +21913,9 @@ var ExpertPool = class {
|
|
|
21909
21913
|
if (this.active < this.capacity) {
|
|
21910
21914
|
return this.issuePermit();
|
|
21911
21915
|
}
|
|
21912
|
-
return new Promise((
|
|
21916
|
+
return new Promise((resolve20, reject) => {
|
|
21913
21917
|
const timer = setTimeout(() => {
|
|
21914
|
-
const idx = this.queue.findIndex((e) => e.resolve ===
|
|
21918
|
+
const idx = this.queue.findIndex((e) => e.resolve === resolve20);
|
|
21915
21919
|
if (idx !== -1) {
|
|
21916
21920
|
this.queue.splice(idx, 1);
|
|
21917
21921
|
}
|
|
@@ -21921,7 +21925,7 @@ var ExpertPool = class {
|
|
|
21921
21925
|
)
|
|
21922
21926
|
);
|
|
21923
21927
|
}, this.acquireTimeoutMs);
|
|
21924
|
-
this.queue.push({ resolve:
|
|
21928
|
+
this.queue.push({ resolve: resolve20, reject, timer });
|
|
21925
21929
|
});
|
|
21926
21930
|
}
|
|
21927
21931
|
/** Release a permit back to the pool. */
|
|
@@ -22505,8 +22509,8 @@ var TaskQueue = class {
|
|
|
22505
22509
|
if (this.cancelled) {
|
|
22506
22510
|
return Promise.reject(new Error("Queue has been cancelled"));
|
|
22507
22511
|
}
|
|
22508
|
-
return new Promise((
|
|
22509
|
-
this.queue.push({ task, resolve:
|
|
22512
|
+
return new Promise((resolve20, reject) => {
|
|
22513
|
+
this.queue.push({ task, resolve: resolve20, reject });
|
|
22510
22514
|
this.processNext();
|
|
22511
22515
|
});
|
|
22512
22516
|
}
|
|
@@ -22782,16 +22786,16 @@ async function executeStepWithTimeout(step, context, stepExecutor, signal) {
|
|
|
22782
22786
|
return executeWithTimeout2(step, stepContext, stepExecutor, stepTimeout, startTime);
|
|
22783
22787
|
}
|
|
22784
22788
|
function executeWithTimeout2(step, context, executor, timeout, startTime) {
|
|
22785
|
-
return new Promise((
|
|
22789
|
+
return new Promise((resolve20) => {
|
|
22786
22790
|
const timeoutId = setTimeout(() => {
|
|
22787
|
-
|
|
22791
|
+
resolve20(createTimeoutResult(step.id, getTimeProvider().now() - startTime, timeout));
|
|
22788
22792
|
}, timeout);
|
|
22789
22793
|
executor(step, context).then((result) => {
|
|
22790
22794
|
clearTimeout(timeoutId);
|
|
22791
|
-
|
|
22795
|
+
resolve20(result);
|
|
22792
22796
|
}).catch((error) => {
|
|
22793
22797
|
clearTimeout(timeoutId);
|
|
22794
|
-
|
|
22798
|
+
resolve20(createErrorResult(step.id, getTimeProvider().now() - startTime, error));
|
|
22795
22799
|
});
|
|
22796
22800
|
});
|
|
22797
22801
|
}
|
|
@@ -29055,8 +29059,8 @@ function formatValidationErrors(validation) {
|
|
|
29055
29059
|
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
29056
29060
|
function resolveExecutionEngineOrError(deps, workflowName) {
|
|
29057
29061
|
try {
|
|
29058
|
-
const
|
|
29059
|
-
return { ok: true, value:
|
|
29062
|
+
const resolve20 = deps.resolveExecutionEngine ?? (() => deps.workflowEngine);
|
|
29063
|
+
return { ok: true, value: resolve20() };
|
|
29060
29064
|
} catch (error) {
|
|
29061
29065
|
const message = error instanceof Error ? error.message : String(error);
|
|
29062
29066
|
deps.logger?.error(
|
|
@@ -29697,7 +29701,7 @@ function execIdFields(executionId) {
|
|
|
29697
29701
|
async function populateUnifiedContextOnState(state, options) {
|
|
29698
29702
|
const taskCandidate = state["task"];
|
|
29699
29703
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
29700
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
29704
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-MYKBBDAN.js");
|
|
29701
29705
|
const category = inferTaskCategory2(taskCandidate);
|
|
29702
29706
|
const executionId = options?.executionId;
|
|
29703
29707
|
const execFields = execIdFields(executionId);
|
|
@@ -30194,13 +30198,13 @@ function dedupe(ids) {
|
|
|
30194
30198
|
return [...new Set(ids)];
|
|
30195
30199
|
}
|
|
30196
30200
|
async function withTimeout3(promise, ms) {
|
|
30197
|
-
return new Promise((
|
|
30201
|
+
return new Promise((resolve20, reject) => {
|
|
30198
30202
|
const timer = setTimeout(() => {
|
|
30199
30203
|
reject(new Error(`Node timed out after ${String(ms)}ms`));
|
|
30200
30204
|
}, ms);
|
|
30201
30205
|
promise.then((result) => {
|
|
30202
30206
|
clearTimeout(timer);
|
|
30203
|
-
|
|
30207
|
+
resolve20(result);
|
|
30204
30208
|
}).catch((error) => {
|
|
30205
30209
|
clearTimeout(timer);
|
|
30206
30210
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
@@ -32654,11 +32658,11 @@ function createMockOrchestrator() {
|
|
|
32654
32658
|
async function raceAgainstDeadline(promise, deadlineMs, onTimeout) {
|
|
32655
32659
|
const startedAt = Date.now();
|
|
32656
32660
|
let timer;
|
|
32657
|
-
const timeoutP = new Promise((
|
|
32661
|
+
const timeoutP = new Promise((resolve20, reject) => {
|
|
32658
32662
|
timer = setTimeout(
|
|
32659
32663
|
() => {
|
|
32660
32664
|
try {
|
|
32661
|
-
|
|
32665
|
+
resolve20(onTimeout(Date.now() - startedAt));
|
|
32662
32666
|
} catch (err2) {
|
|
32663
32667
|
reject(err2 instanceof Error ? err2 : new Error(String(err2)));
|
|
32664
32668
|
}
|
|
@@ -33861,11 +33865,11 @@ function createWorkerTask(entry, taskIndex, waveNumber, opts) {
|
|
|
33861
33865
|
const staggerSlot = taskIndex % opts.maxConcurrency;
|
|
33862
33866
|
const staggerMs = staggerSlot * opts.staggerDelayMs;
|
|
33863
33867
|
if (staggerMs > 0) {
|
|
33864
|
-
await new Promise((
|
|
33868
|
+
await new Promise((resolve20) => setTimeout(resolve20, staggerMs));
|
|
33865
33869
|
}
|
|
33866
33870
|
const spacingDelay = opts.failureTracker.getSpacingDelay(entry.role);
|
|
33867
33871
|
if (spacingDelay > 0) {
|
|
33868
|
-
await new Promise((
|
|
33872
|
+
await new Promise((resolve20) => setTimeout(resolve20, spacingDelay));
|
|
33869
33873
|
}
|
|
33870
33874
|
const timeoutMs = opts.options.workerTimeoutMs ?? getExpertTaskTimeout(entry.subTask);
|
|
33871
33875
|
const result = await executeSafe({
|
|
@@ -33917,7 +33921,7 @@ async function maybeDelayForRateLimit(results, waveIdx, totalWaves) {
|
|
|
33917
33921
|
);
|
|
33918
33922
|
if (hasRateLimit) {
|
|
33919
33923
|
logger27.warn("Rate-limit detected \u2014 delaying next wave", { delayMs: RATE_LIMIT_WAVE_DELAY_MS });
|
|
33920
|
-
await new Promise((
|
|
33924
|
+
await new Promise((resolve20) => setTimeout(resolve20, RATE_LIMIT_WAVE_DELAY_MS));
|
|
33921
33925
|
}
|
|
33922
33926
|
}
|
|
33923
33927
|
function emitWaveStarted(ctx, workerCount, roles) {
|
|
@@ -34015,7 +34019,7 @@ async function maybeRetryAfterTriage(opts) {
|
|
|
34015
34019
|
}
|
|
34016
34020
|
const useAltCli = triage.action === "retry_different_cli" && altExecuteWorker !== void 0;
|
|
34017
34021
|
if (triage.action === "retry_different_cli") {
|
|
34018
|
-
await new Promise((
|
|
34022
|
+
await new Promise((resolve20) => setTimeout(resolve20, RATE_LIMIT_SPACING_MS));
|
|
34019
34023
|
}
|
|
34020
34024
|
const retryTimeout = triage.action === "extend_timeout" ? Math.min(timeoutMs * TIMEOUT_EXTENSION_FACTOR, MAX_WORKER_TIMEOUT_MS) : timeoutMs;
|
|
34021
34025
|
const retryExecutor = useAltCli ? altExecuteWorker : executeWorker;
|
|
@@ -39879,23 +39883,28 @@ function registerExecuteExpertTool(server, deps) {
|
|
|
39879
39883
|
|
|
39880
39884
|
// src/mcp/tools/research-query.ts
|
|
39881
39885
|
import { z as z70 } from "zod";
|
|
39886
|
+
import { join as join7 } from "node:path";
|
|
39882
39887
|
|
|
39883
39888
|
// src/research/negative-results.ts
|
|
39884
39889
|
import { readFileSync as readFileSync6 } from "node:fs";
|
|
39885
|
-
import {
|
|
39890
|
+
import { join as join6 } from "node:path";
|
|
39886
39891
|
import yaml3 from "yaml";
|
|
39887
39892
|
var logger34 = createLogger({ component: "negative-results" });
|
|
39888
|
-
var
|
|
39893
|
+
var NEGATIVE_RESULTS_FILE = "negative-results.yaml";
|
|
39894
|
+
function negativeResultsPath() {
|
|
39895
|
+
return join6(resolveRegistryRoot(), REGISTRY_PATH, NEGATIVE_RESULTS_FILE);
|
|
39896
|
+
}
|
|
39889
39897
|
var cachedResults;
|
|
39890
39898
|
function loadNegativeResults() {
|
|
39891
39899
|
if (cachedResults !== void 0) return cachedResults;
|
|
39900
|
+
const registryPath = negativeResultsPath();
|
|
39892
39901
|
try {
|
|
39893
|
-
const content = readFileSync6(
|
|
39902
|
+
const content = readFileSync6(registryPath, "utf-8");
|
|
39894
39903
|
cachedResults = yaml3.parse(content);
|
|
39895
39904
|
return cachedResults;
|
|
39896
39905
|
} catch (error) {
|
|
39897
39906
|
logger34.debug("Could not load negative-results registry", {
|
|
39898
|
-
path:
|
|
39907
|
+
path: registryPath,
|
|
39899
39908
|
error: getErrorMessage(error)
|
|
39900
39909
|
});
|
|
39901
39910
|
return { negative_results: {} };
|
|
@@ -39972,7 +39981,7 @@ async function handleOverlap(input) {
|
|
|
39972
39981
|
};
|
|
39973
39982
|
}
|
|
39974
39983
|
function handleStats() {
|
|
39975
|
-
const registryPath =
|
|
39984
|
+
const registryPath = join7(getProjectRoot(), REGISTRY_PATH);
|
|
39976
39985
|
const result = parseRegistry({ registryPath });
|
|
39977
39986
|
if (!result.ok) {
|
|
39978
39987
|
return {
|
|
@@ -43173,7 +43182,7 @@ function registerRepoSecurityPlanTool(server, deps) {
|
|
|
43173
43182
|
}
|
|
43174
43183
|
|
|
43175
43184
|
// src/mcp/tools/search-codebase-tool.ts
|
|
43176
|
-
import { resolve as
|
|
43185
|
+
import { resolve as resolve7, sep as sep3 } from "node:path";
|
|
43177
43186
|
import { z as z90 } from "zod";
|
|
43178
43187
|
var SearchCodebaseInputSchema = z90.object({
|
|
43179
43188
|
query: z90.string().min(1).max(200).describe("Search query (symbol name, keyword, or pattern)"),
|
|
@@ -43228,8 +43237,8 @@ async function getIndex(dir, maxDepth) {
|
|
|
43228
43237
|
return promise;
|
|
43229
43238
|
}
|
|
43230
43239
|
function resolveSearchDir(directory) {
|
|
43231
|
-
const dir =
|
|
43232
|
-
const cwdRoot =
|
|
43240
|
+
const dir = resolve7(directory ?? process.cwd());
|
|
43241
|
+
const cwdRoot = resolve7(".");
|
|
43233
43242
|
if (dir !== cwdRoot && !dir.startsWith(cwdRoot + sep3)) {
|
|
43234
43243
|
return { error: `Path traversal denied: directory must be within ${cwdRoot}` };
|
|
43235
43244
|
}
|
|
@@ -43327,7 +43336,7 @@ function registerSearchCodebaseTool(server, deps) {
|
|
|
43327
43336
|
}
|
|
43328
43337
|
|
|
43329
43338
|
// src/mcp/tools/extract-symbols-tool.ts
|
|
43330
|
-
import { extname as extname3, resolve as
|
|
43339
|
+
import { extname as extname3, resolve as resolve8, sep as sep4 } from "node:path";
|
|
43331
43340
|
import { z as z91 } from "zod";
|
|
43332
43341
|
|
|
43333
43342
|
// src/core/task-analysis/tool-refusal-gap.ts
|
|
@@ -43449,8 +43458,8 @@ async function extractSymbolsHandler(args, ctx) {
|
|
|
43449
43458
|
});
|
|
43450
43459
|
}
|
|
43451
43460
|
const { filePath, mode, maxChars, maxSymbols } = parsed.data;
|
|
43452
|
-
const resolvedPath =
|
|
43453
|
-
const cwdRoot =
|
|
43461
|
+
const resolvedPath = resolve8(filePath);
|
|
43462
|
+
const cwdRoot = resolve8(".");
|
|
43454
43463
|
if (resolvedPath !== cwdRoot && !resolvedPath.startsWith(cwdRoot + sep4)) {
|
|
43455
43464
|
return toolStructuredError({
|
|
43456
43465
|
errorCategory: "permission",
|
|
@@ -43534,7 +43543,7 @@ function registerExtractSymbolsTool(server, deps) {
|
|
|
43534
43543
|
|
|
43535
43544
|
// src/mcp/tools/search-usages-tool.ts
|
|
43536
43545
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
43537
|
-
import { relative, resolve as
|
|
43546
|
+
import { relative, resolve as resolve9, sep as sep5 } from "node:path";
|
|
43538
43547
|
import { z as z92 } from "zod";
|
|
43539
43548
|
var DEFAULT_USAGES_LIMIT = 50;
|
|
43540
43549
|
var MAX_USAGES_LIMIT = 500;
|
|
@@ -43554,8 +43563,8 @@ var SearchUsagesInputSchema = z92.object({
|
|
|
43554
43563
|
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)}).`)
|
|
43555
43564
|
});
|
|
43556
43565
|
function resolveWithinCwd(target) {
|
|
43557
|
-
const resolved =
|
|
43558
|
-
const cwdRoot =
|
|
43566
|
+
const resolved = resolve9(target);
|
|
43567
|
+
const cwdRoot = resolve9(".");
|
|
43559
43568
|
if (resolved !== cwdRoot && !resolved.startsWith(cwdRoot + sep5)) {
|
|
43560
43569
|
return { error: `Path traversal denied: scope must be within ${cwdRoot}` };
|
|
43561
43570
|
}
|
|
@@ -43565,7 +43574,7 @@ async function resolveFileScope(input) {
|
|
|
43565
43574
|
if (input.path !== void 0) {
|
|
43566
43575
|
const guard2 = resolveWithinCwd(input.path);
|
|
43567
43576
|
if ("error" in guard2) return guard2;
|
|
43568
|
-
return { files: [guard2.resolved], root:
|
|
43577
|
+
return { files: [guard2.resolved], root: resolve9(".") };
|
|
43569
43578
|
}
|
|
43570
43579
|
const guard = resolveWithinCwd(input.dir ?? process.cwd());
|
|
43571
43580
|
if ("error" in guard) return guard;
|
|
@@ -43661,7 +43670,7 @@ function registerSearchUsagesTool(server, deps) {
|
|
|
43661
43670
|
|
|
43662
43671
|
// src/mcp/tools/query-trace-tool.ts
|
|
43663
43672
|
import { readFile as readFile4, stat as stat3 } from "node:fs/promises";
|
|
43664
|
-
import { join as
|
|
43673
|
+
import { join as join8, resolve as resolve10, sep as sep6 } from "node:path";
|
|
43665
43674
|
import { z as z93 } from "zod";
|
|
43666
43675
|
var QueryTraceInputSchema = z93.object({
|
|
43667
43676
|
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"),
|
|
@@ -43709,9 +43718,9 @@ var EMPTY_RESPONSE = {
|
|
|
43709
43718
|
};
|
|
43710
43719
|
async function queryTraceFromDisk(input, runsDir) {
|
|
43711
43720
|
const dir = runsDir ?? getDefaultRunsDir();
|
|
43712
|
-
const tracePath =
|
|
43713
|
-
const resolvedDir =
|
|
43714
|
-
const resolvedTrace =
|
|
43721
|
+
const tracePath = join8(dir, input.runId, "trace.jsonl");
|
|
43722
|
+
const resolvedDir = resolve10(dir);
|
|
43723
|
+
const resolvedTrace = resolve10(tracePath);
|
|
43715
43724
|
if (!resolvedTrace.startsWith(resolvedDir + sep6) && resolvedTrace !== resolvedDir) {
|
|
43716
43725
|
return { runId: input.runId, ...EMPTY_RESPONSE };
|
|
43717
43726
|
}
|
|
@@ -43873,15 +43882,16 @@ function readJobResultFromTaskState(jobId, customDir) {
|
|
|
43873
43882
|
function isTaskStateJobSource() {
|
|
43874
43883
|
return process.env["NEXUS_JOB_RESULT_SOURCE"]?.toLowerCase() === "task_state";
|
|
43875
43884
|
}
|
|
43876
|
-
function
|
|
43885
|
+
function resolveJobResultWithSource(jobId, customDir) {
|
|
43877
43886
|
if (isTaskStateJobSource()) {
|
|
43878
43887
|
const fromState = readJobResultFromTaskState(jobId, customDir);
|
|
43879
43888
|
if (fromState !== null) {
|
|
43880
43889
|
logger35.debug("Resolved job result from task-state", { jobId, status: fromState.status });
|
|
43881
|
-
return fromState;
|
|
43890
|
+
return { record: fromState, source: "task_state" };
|
|
43882
43891
|
}
|
|
43883
43892
|
}
|
|
43884
|
-
|
|
43893
|
+
const fromSidecar = readJobResult(jobId);
|
|
43894
|
+
return fromSidecar === null ? null : { record: fromSidecar, source: "sidecar" };
|
|
43885
43895
|
}
|
|
43886
43896
|
function listJobsFromTaskState(customDir) {
|
|
43887
43897
|
const summaries = [];
|
|
@@ -43914,8 +43924,8 @@ function getJobResultHandler(args) {
|
|
|
43914
43924
|
})
|
|
43915
43925
|
);
|
|
43916
43926
|
}
|
|
43917
|
-
const
|
|
43918
|
-
if (
|
|
43927
|
+
const resolved = resolveJobResultWithSource(parsed.data.jobId);
|
|
43928
|
+
if (resolved === null) {
|
|
43919
43929
|
const response2 = {
|
|
43920
43930
|
jobId: parsed.data.jobId,
|
|
43921
43931
|
found: false,
|
|
@@ -43923,11 +43933,14 @@ function getJobResultHandler(args) {
|
|
|
43923
43933
|
};
|
|
43924
43934
|
return Promise.resolve(toolSuccess(JSON.stringify(response2, null, 2)));
|
|
43925
43935
|
}
|
|
43936
|
+
const { record, source } = resolved;
|
|
43926
43937
|
const abandoned = isAbandonedJob(record, getTimeProvider().now());
|
|
43927
43938
|
const response = {
|
|
43928
43939
|
jobId: parsed.data.jobId,
|
|
43929
43940
|
found: true,
|
|
43930
43941
|
record,
|
|
43942
|
+
producerVersionMeasured: isMeasuredBuildVersion(record.producerVersion),
|
|
43943
|
+
producerVersionSource: source,
|
|
43931
43944
|
...abandoned ? {
|
|
43932
43945
|
abandoned: true,
|
|
43933
43946
|
errorMessage: "This job has been `pending` longer than the maximum a job body can run, so the process that owned it is gone. Nothing will settle it \u2014 dispatch again."
|
|
@@ -43940,7 +43953,7 @@ function registerGetJobResultTool(server, deps) {
|
|
|
43940
43953
|
const toolSchema = {
|
|
43941
43954
|
jobId: z94.string().min(1).max(128).describe('Job ID returned by orchestrate({ mode: "async" })')
|
|
43942
43955
|
};
|
|
43943
|
-
const description =
|
|
43956
|
+
const description = `Read the result of an async-mode tool invocation by jobId. Returns the structured record (status, result | error, timestamps, producerVersion) plus producerVersionMeasured \u2014 false when the producer was a dev build or the record predates the field, so its version must not be compared to this server's _meta build stamp \u2014 and producerVersionSource (sidecar | task_state; a task_state record never carries a version). Poll until status !== "pending". Stage-1 of epic #2631 \u2014 Stage 2 will fold this into query_task_state once StructuredTaskState gains the result field.`;
|
|
43944
43957
|
const secureHandler = createSecureHandler(getJobResultHandler, {
|
|
43945
43958
|
toolName: "get_job_result",
|
|
43946
43959
|
rateLimiter: deps.rateLimiter,
|
|
@@ -44588,27 +44601,27 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
44588
44601
|
const data = this.writeBuffer.join("");
|
|
44589
44602
|
this.writeBuffer = [];
|
|
44590
44603
|
const stream = this.writeStream;
|
|
44591
|
-
return new Promise((
|
|
44604
|
+
return new Promise((resolve20, reject) => {
|
|
44592
44605
|
stream.write(data, (err2) => {
|
|
44593
44606
|
if (err2 !== void 0 && err2 !== null) {
|
|
44594
44607
|
reject(new AuditError("Failed to flush audit log", { cause: err2 }));
|
|
44595
44608
|
} else {
|
|
44596
|
-
|
|
44609
|
+
resolve20();
|
|
44597
44610
|
}
|
|
44598
44611
|
});
|
|
44599
44612
|
});
|
|
44600
44613
|
}
|
|
44601
44614
|
async close() {
|
|
44602
44615
|
await this.flush();
|
|
44603
|
-
return new Promise((
|
|
44616
|
+
return new Promise((resolve20) => {
|
|
44604
44617
|
if (this.writeStream === null) {
|
|
44605
|
-
|
|
44618
|
+
resolve20();
|
|
44606
44619
|
return;
|
|
44607
44620
|
}
|
|
44608
44621
|
this.writeStream.end(() => {
|
|
44609
44622
|
this.writeStream = null;
|
|
44610
44623
|
this.logger.info("Audit storage closed");
|
|
44611
|
-
|
|
44624
|
+
resolve20();
|
|
44612
44625
|
});
|
|
44613
44626
|
});
|
|
44614
44627
|
}
|
|
@@ -45595,7 +45608,7 @@ async function tryIssueTriage(task) {
|
|
|
45595
45608
|
try {
|
|
45596
45609
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
45597
45610
|
if (issueMatch === null) return null;
|
|
45598
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
45611
|
+
const { createIssueTriage } = await import("./issue-triage-PIE3YVCV.js");
|
|
45599
45612
|
const triage = createIssueTriage();
|
|
45600
45613
|
const owner = issueMatch[1] ?? "";
|
|
45601
45614
|
const num = issueMatch[2] ?? "";
|
|
@@ -45623,7 +45636,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
45623
45636
|
]);
|
|
45624
45637
|
async function classifyWithLLM(task) {
|
|
45625
45638
|
try {
|
|
45626
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
45639
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-G3KN7QWL.js");
|
|
45627
45640
|
const prompt = [
|
|
45628
45641
|
"Classify this task into exactly one pipeline template.",
|
|
45629
45642
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -47004,7 +47017,7 @@ function buildScanSummary(total, blocking, osvCount, osv, sarifParseErrors = 0)
|
|
|
47004
47017
|
|
|
47005
47018
|
// src/security/quality-gate-commands.ts
|
|
47006
47019
|
import { existsSync as existsSync9, readFileSync as readFileSync8 } from "node:fs";
|
|
47007
|
-
import { join as
|
|
47020
|
+
import { join as join11 } from "node:path";
|
|
47008
47021
|
var LOCKFILES = [
|
|
47009
47022
|
{ file: "pnpm-lock.yaml", manager: "pnpm" },
|
|
47010
47023
|
{ file: "yarn.lock", manager: "yarn" },
|
|
@@ -47019,12 +47032,12 @@ var SCRIPT_CANDIDATES = {
|
|
|
47019
47032
|
};
|
|
47020
47033
|
function detectPackageManager(projectDir) {
|
|
47021
47034
|
for (const { file, manager } of LOCKFILES) {
|
|
47022
|
-
if (existsSync9(
|
|
47035
|
+
if (existsSync9(join11(projectDir, file))) return manager;
|
|
47023
47036
|
}
|
|
47024
47037
|
return "npm";
|
|
47025
47038
|
}
|
|
47026
47039
|
function readScripts(projectDir) {
|
|
47027
|
-
const manifest =
|
|
47040
|
+
const manifest = join11(projectDir, "package.json");
|
|
47028
47041
|
if (!existsSync9(manifest)) return void 0;
|
|
47029
47042
|
try {
|
|
47030
47043
|
const parsed = JSON.parse(readFileSync8(manifest, "utf-8"));
|
|
@@ -47314,8 +47327,8 @@ var memoryInitPromise = null;
|
|
|
47314
47327
|
async function initPipelineMemory() {
|
|
47315
47328
|
if (cachedMemory !== null) return cachedMemory;
|
|
47316
47329
|
try {
|
|
47317
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
47318
|
-
const { getLearningDir } = await import("./learning-persistence-
|
|
47330
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-CH3CVLIT.js");
|
|
47331
|
+
const { getLearningDir } = await import("./learning-persistence-JK2FELZL.js");
|
|
47319
47332
|
const mem = createSessionMemory2(getLearningDir());
|
|
47320
47333
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
47321
47334
|
cachedMemory = {
|
|
@@ -47376,7 +47389,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
47376
47389
|
callRecord(routingMemoryCache);
|
|
47377
47390
|
return;
|
|
47378
47391
|
}
|
|
47379
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
47392
|
+
routingMemoryInitPromise ??= import("./routing-memory-2IELT5GT.js").then(({ createRoutingMemory }) => {
|
|
47380
47393
|
routingMemoryCache ??= createRoutingMemory();
|
|
47381
47394
|
return routingMemoryCache;
|
|
47382
47395
|
}).catch((error) => {
|
|
@@ -47410,7 +47423,7 @@ ${text}` : "";
|
|
|
47410
47423
|
}
|
|
47411
47424
|
async function getWeatherContext() {
|
|
47412
47425
|
try {
|
|
47413
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
47426
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-YG4T4Q23.js");
|
|
47414
47427
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
47415
47428
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
47416
47429
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -47428,8 +47441,8 @@ ${lines}
|
|
|
47428
47441
|
}
|
|
47429
47442
|
async function getMemoryContext(task) {
|
|
47430
47443
|
try {
|
|
47431
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
47432
|
-
const { getLearningDir } = await import("./learning-persistence-
|
|
47444
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-CH3CVLIT.js");
|
|
47445
|
+
const { getLearningDir } = await import("./learning-persistence-JK2FELZL.js");
|
|
47433
47446
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
47434
47447
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
47435
47448
|
if (learnings.length === 0) return "";
|
|
@@ -47547,7 +47560,7 @@ ${contextBlock}`;
|
|
|
47547
47560
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
47548
47561
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
47549
47562
|
try {
|
|
47550
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47563
|
+
const { executeVoting } = await import("./consensus-vote-L4CN33XE.js");
|
|
47551
47564
|
const votingResult = await executeVoting(
|
|
47552
47565
|
{
|
|
47553
47566
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -47976,7 +47989,7 @@ async function searchCodebaseForTask(task) {
|
|
|
47976
47989
|
}
|
|
47977
47990
|
async function queryResearchRegistry(task) {
|
|
47978
47991
|
try {
|
|
47979
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
47992
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-5NBL637T.js");
|
|
47980
47993
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
47981
47994
|
if (topic === void 0) return null;
|
|
47982
47995
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -48047,7 +48060,7 @@ function createScanStageWrapper() {
|
|
|
48047
48060
|
try {
|
|
48048
48061
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
48049
48062
|
if (slug !== void 0) {
|
|
48050
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
48063
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-NS47HQEF.js");
|
|
48051
48064
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
48052
48065
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
48053
48066
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -48262,7 +48275,7 @@ function reviewedDiffWasTruncated(diff) {
|
|
|
48262
48275
|
|
|
48263
48276
|
// src/audit/pr-review-record-store.ts
|
|
48264
48277
|
import { appendFileSync as appendFileSync4, existsSync as existsSync10, mkdirSync as mkdirSync6, readFileSync as readFileSync9 } from "node:fs";
|
|
48265
|
-
import { dirname as dirname3, isAbsolute, join as
|
|
48278
|
+
import { dirname as dirname3, isAbsolute, join as join12, resolve as resolve13 } from "node:path";
|
|
48266
48279
|
|
|
48267
48280
|
// src/audit/pr-review-record.ts
|
|
48268
48281
|
import * as crypto3 from "node:crypto";
|
|
@@ -48437,7 +48450,7 @@ function assertNotSourceCheckoutWrite(filePath) {
|
|
|
48437
48450
|
if (!isUnderTestRunner()) return;
|
|
48438
48451
|
const here = findRepoRoot(process.cwd());
|
|
48439
48452
|
if (here === null) return;
|
|
48440
|
-
if (
|
|
48453
|
+
if (resolve13(filePath) !== resolve13(join12(here, PR_REVIEW_RECORDS_REL_PATH))) return;
|
|
48441
48454
|
throw new Error(
|
|
48442
48455
|
`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.`
|
|
48443
48456
|
);
|
|
@@ -48445,15 +48458,15 @@ function assertNotSourceCheckoutWrite(filePath) {
|
|
|
48445
48458
|
function resolvePrReviewRecordsPath(repoPathOverride) {
|
|
48446
48459
|
const envPath = process.env[PR_REVIEW_RECORDS_PATH_ENV];
|
|
48447
48460
|
if (envPath !== void 0 && envPath.trim() !== "") {
|
|
48448
|
-
return isAbsolute(envPath) ? envPath :
|
|
48461
|
+
return isAbsolute(envPath) ? envPath : resolve13(envPath);
|
|
48449
48462
|
}
|
|
48450
48463
|
if (repoPathOverride !== void 0 && repoPathOverride.trim() !== "") {
|
|
48451
48464
|
const overrideRoot = findRepoRoot(repoPathOverride);
|
|
48452
|
-
if (overrideRoot !== null) return
|
|
48465
|
+
if (overrideRoot !== null) return join12(overrideRoot, PR_REVIEW_RECORDS_REL_PATH);
|
|
48453
48466
|
}
|
|
48454
48467
|
const root = findRepoRoot(process.cwd());
|
|
48455
48468
|
if (root === null) return void 0;
|
|
48456
|
-
return
|
|
48469
|
+
return join12(root, PR_REVIEW_RECORDS_REL_PATH);
|
|
48457
48470
|
}
|
|
48458
48471
|
function readPrReviewRecords(filePath) {
|
|
48459
48472
|
const records = [];
|
|
@@ -50204,9 +50217,9 @@ var RESEARCH_BUDGET_MS = 2e4;
|
|
|
50204
50217
|
var RESEARCH_TIMED_OUT = /* @__PURE__ */ Symbol("research-budget-exceeded");
|
|
50205
50218
|
async function withResearchBudget(p, ms) {
|
|
50206
50219
|
let timer;
|
|
50207
|
-
const budget = new Promise((
|
|
50220
|
+
const budget = new Promise((resolve20) => {
|
|
50208
50221
|
timer = setTimeout(() => {
|
|
50209
|
-
|
|
50222
|
+
resolve20(RESEARCH_TIMED_OUT);
|
|
50210
50223
|
}, ms);
|
|
50211
50224
|
});
|
|
50212
50225
|
try {
|
|
@@ -51218,7 +51231,7 @@ var GitHubTaskTracker = class {
|
|
|
51218
51231
|
cachedProvider = null;
|
|
51219
51232
|
async getProvider() {
|
|
51220
51233
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
51221
|
-
const { createScmProvider } = await import("./factory-
|
|
51234
|
+
const { createScmProvider } = await import("./factory-KVMLFEWJ.js");
|
|
51222
51235
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
51223
51236
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
51224
51237
|
this.cachedProvider = result.value;
|
|
@@ -52133,7 +52146,7 @@ async function probeSource(source, includeModelIds) {
|
|
|
52133
52146
|
}
|
|
52134
52147
|
}
|
|
52135
52148
|
async function defaultSources(includeOpenRouter) {
|
|
52136
|
-
const { createAllAdapters: createAllAdapters2 } = await import("./factory-
|
|
52149
|
+
const { createAllAdapters: createAllAdapters2 } = await import("./factory-ROTP63IZ.js");
|
|
52137
52150
|
const adapters = createAllAdapters2();
|
|
52138
52151
|
return buildDefaultModelSources(adapters, { includeOpenRouter });
|
|
52139
52152
|
}
|
|
@@ -55146,7 +55159,7 @@ function getPolicy(id) {
|
|
|
55146
55159
|
// src/security/sandbox/sandbox-executor.ts
|
|
55147
55160
|
import { execFile } from "node:child_process";
|
|
55148
55161
|
import { promisify } from "node:util";
|
|
55149
|
-
import { resolve as
|
|
55162
|
+
import { resolve as resolve19, normalize as normalize2, sep as sep12 } from "node:path";
|
|
55150
55163
|
var execFileAsync = promisify(execFile);
|
|
55151
55164
|
var logger53 = createLogger({ component: "sandbox-executor" });
|
|
55152
55165
|
function parseExecError(error) {
|
|
@@ -55226,9 +55239,9 @@ var PolicySandboxExecutor = class {
|
|
|
55226
55239
|
*/
|
|
55227
55240
|
validateCwd(cwd, policy) {
|
|
55228
55241
|
if (cwd === void 0) return null;
|
|
55229
|
-
const normalizedCwd = normalize2(
|
|
55242
|
+
const normalizedCwd = normalize2(resolve19(cwd));
|
|
55230
55243
|
const isAllowed = policy.pathRules.some((rule) => {
|
|
55231
|
-
const normalizedRule = normalize2(
|
|
55244
|
+
const normalizedRule = normalize2(resolve19(rule.path));
|
|
55232
55245
|
const isUnderRule = normalizedCwd === normalizedRule || normalizedCwd.startsWith(normalizedRule + sep12);
|
|
55233
55246
|
return isUnderRule && rule.access !== "none";
|
|
55234
55247
|
});
|
|
@@ -56204,4 +56217,4 @@ export {
|
|
|
56204
56217
|
shutdownFeedbackSubscriber,
|
|
56205
56218
|
createEventBusBridge
|
|
56206
56219
|
};
|
|
56207
|
-
//# sourceMappingURL=chunk-
|
|
56220
|
+
//# sourceMappingURL=chunk-CQCVEC7P.js.map
|