nexus-agents 2.63.0 → 2.63.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/README.md +7 -7
- package/dist/{adaptive-memory-TSZEJUJC.js → adaptive-memory-2UIPH67R.js} +5 -4
- package/dist/{chunk-JKDHWOQL.js → chunk-46S665SD.js} +6 -6
- package/dist/{chunk-PTGBJFSD.js → chunk-CDWQP3UC.js} +3 -3
- package/dist/{chunk-4G7MSCIK.js → chunk-EB7LP5WD.js} +182 -181
- package/dist/{chunk-4G7MSCIK.js.map → chunk-EB7LP5WD.js.map} +1 -1
- package/dist/{chunk-QGZBCD2A.js → chunk-EBFXDM3P.js} +2 -2
- package/dist/{chunk-GMOGKX4E.js → chunk-ETZULQ7Z.js} +2 -2
- package/dist/{chunk-R2Y57PM3.js → chunk-FAUHVWYZ.js} +2 -2
- package/dist/{chunk-H43PABG4.js → chunk-FHFNOMNK.js} +2 -2
- package/dist/{chunk-EDGG3RQE.js → chunk-FTWGBV7S.js} +2 -2
- package/dist/{chunk-7Y36JLES.js → chunk-I37IQ26H.js} +2 -2
- package/dist/{chunk-XEMRMZUN.js → chunk-KLZHA5KA.js} +4 -4
- package/dist/{chunk-TFEFN37P.js → chunk-KVZNQWWI.js} +2 -2
- package/dist/chunk-LJT65EA7.js +32 -0
- package/dist/chunk-LJT65EA7.js.map +1 -0
- package/dist/{chunk-6QU4DJYW.js → chunk-MSFUOGN4.js} +2 -2
- package/dist/{chunk-YU4NABXM.js → chunk-NF5KOUKM.js} +2 -2
- package/dist/{chunk-TC46TRLR.js → chunk-PB2EXTSV.js} +2 -2
- package/dist/{chunk-FEWWXGFE.js → chunk-PEDEZRPR.js} +54 -30
- package/dist/chunk-PEDEZRPR.js.map +1 -0
- package/dist/{chunk-V5CGWMYL.js → chunk-QAOI6EIU.js} +2 -2
- package/dist/{chunk-FMFQJLMR.js → chunk-QJTOZIE7.js} +19 -20
- package/dist/chunk-QJTOZIE7.js.map +1 -0
- package/dist/{chunk-AFSIP6JH.js → chunk-RCQZMJBZ.js} +3 -3
- package/dist/{chunk-EZXOJZYE.js → chunk-UCQTXKTS.js} +2 -2
- package/dist/{chunk-K7EA5OV4.js → chunk-UDKYZ7CS.js} +2 -2
- package/dist/{chunk-7C32M23X.js → chunk-V276U3ZC.js} +4 -4
- package/dist/{chunk-YQAOMDR2.js → chunk-ZC4KHPRL.js} +3 -3
- package/dist/cli-circuit-breaker-5E6OWOMI.js +14 -0
- package/dist/cli.js +42 -35
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-A7URDW4X.js → composite-router-FC3H7NKN.js} +4 -3
- package/dist/{consensus-vote-PRLGGUNY.js → consensus-vote-6FKSINXV.js} +11 -11
- package/dist/doctor-deep-X3YCUM4Q.js +13 -0
- package/dist/expert-bridge-R6FQWUHB.js +11 -0
- package/dist/factory-7DJA2CIL.js +15 -0
- package/dist/{factory-6MT5VKI3.js → factory-BOXBN4ZS.js} +6 -5
- package/dist/index.js +43 -45
- package/dist/index.js.map +1 -1
- package/dist/issue-triage-DGDKQQTD.js +16 -0
- package/dist/learning-persistence-FILWP3IR.js +17 -0
- package/dist/mcp-config-CHS2ZC42.js +13 -0
- package/dist/{mobimem-QDBP37H7.js → mobimem-NO7I2Y4O.js} +4 -3
- package/dist/{registry-command-TTXAUCOK.js → registry-command-ZO75YQJG.js} +9 -11
- package/dist/{registry-command-TTXAUCOK.js.map → registry-command-ZO75YQJG.js.map} +1 -1
- package/dist/{repo-security-plan-C3LLE3Z7.js → repo-security-plan-BZ3WOIEZ.js} +5 -4
- package/dist/research-helpers-synthesize-SH34FJIE.js +12 -0
- package/dist/{routing-memory-W3YWMLJM.js → routing-memory-SALB3DZI.js} +4 -3
- package/dist/{session-memory-DWF5Z2LC.js → session-memory-IOXXN6XA.js} +5 -4
- package/dist/{setup-command-QKAVRVLV.js → setup-command-IP2PV75E.js} +10 -10
- package/dist/setup-config-FYRXUWQH.js +11 -0
- package/dist/{setup-custom-api-CSB26HWD.js → setup-custom-api-VAFP4X43.js} +6 -5
- package/dist/{setup-custom-api-CSB26HWD.js.map → setup-custom-api-VAFP4X43.js.map} +1 -1
- package/dist/{weather-report-YQSLX4MS.js → weather-report-SBJRXFTW.js} +4 -3
- package/package.json +1 -1
- package/dist/chunk-CLYZ7FWP.js +0 -30
- package/dist/chunk-CLYZ7FWP.js.map +0 -1
- package/dist/chunk-FEWWXGFE.js.map +0 -1
- package/dist/chunk-FMFQJLMR.js.map +0 -1
- package/dist/cli-circuit-breaker-SL73NWX2.js +0 -13
- package/dist/doctor-deep-VN6KMUCG.js +0 -12
- package/dist/expert-bridge-BHTUNALT.js +0 -10
- package/dist/factory-FA7WDPZW.js +0 -14
- package/dist/issue-triage-YYTE6KTC.js +0 -15
- package/dist/learning-persistence-WMWZJZ35.js +0 -16
- package/dist/mcp-config-34XMRM64.js +0 -12
- package/dist/research-helpers-synthesize-NVQIWLQL.js +0 -11
- package/dist/setup-config-JA5IX53Q.js +0 -10
- /package/dist/{adaptive-memory-TSZEJUJC.js.map → adaptive-memory-2UIPH67R.js.map} +0 -0
- /package/dist/{chunk-JKDHWOQL.js.map → chunk-46S665SD.js.map} +0 -0
- /package/dist/{chunk-PTGBJFSD.js.map → chunk-CDWQP3UC.js.map} +0 -0
- /package/dist/{chunk-QGZBCD2A.js.map → chunk-EBFXDM3P.js.map} +0 -0
- /package/dist/{chunk-GMOGKX4E.js.map → chunk-ETZULQ7Z.js.map} +0 -0
- /package/dist/{chunk-R2Y57PM3.js.map → chunk-FAUHVWYZ.js.map} +0 -0
- /package/dist/{chunk-H43PABG4.js.map → chunk-FHFNOMNK.js.map} +0 -0
- /package/dist/{chunk-EDGG3RQE.js.map → chunk-FTWGBV7S.js.map} +0 -0
- /package/dist/{chunk-7Y36JLES.js.map → chunk-I37IQ26H.js.map} +0 -0
- /package/dist/{chunk-XEMRMZUN.js.map → chunk-KLZHA5KA.js.map} +0 -0
- /package/dist/{chunk-TFEFN37P.js.map → chunk-KVZNQWWI.js.map} +0 -0
- /package/dist/{chunk-6QU4DJYW.js.map → chunk-MSFUOGN4.js.map} +0 -0
- /package/dist/{chunk-YU4NABXM.js.map → chunk-NF5KOUKM.js.map} +0 -0
- /package/dist/{chunk-TC46TRLR.js.map → chunk-PB2EXTSV.js.map} +0 -0
- /package/dist/{chunk-V5CGWMYL.js.map → chunk-QAOI6EIU.js.map} +0 -0
- /package/dist/{chunk-AFSIP6JH.js.map → chunk-RCQZMJBZ.js.map} +0 -0
- /package/dist/{chunk-EZXOJZYE.js.map → chunk-UCQTXKTS.js.map} +0 -0
- /package/dist/{chunk-K7EA5OV4.js.map → chunk-UDKYZ7CS.js.map} +0 -0
- /package/dist/{chunk-7C32M23X.js.map → chunk-V276U3ZC.js.map} +0 -0
- /package/dist/{chunk-YQAOMDR2.js.map → chunk-ZC4KHPRL.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-SL73NWX2.js.map → cli-circuit-breaker-5E6OWOMI.js.map} +0 -0
- /package/dist/{composite-router-A7URDW4X.js.map → composite-router-FC3H7NKN.js.map} +0 -0
- /package/dist/{consensus-vote-PRLGGUNY.js.map → consensus-vote-6FKSINXV.js.map} +0 -0
- /package/dist/{doctor-deep-VN6KMUCG.js.map → doctor-deep-X3YCUM4Q.js.map} +0 -0
- /package/dist/{expert-bridge-BHTUNALT.js.map → expert-bridge-R6FQWUHB.js.map} +0 -0
- /package/dist/{factory-6MT5VKI3.js.map → factory-7DJA2CIL.js.map} +0 -0
- /package/dist/{factory-FA7WDPZW.js.map → factory-BOXBN4ZS.js.map} +0 -0
- /package/dist/{issue-triage-YYTE6KTC.js.map → issue-triage-DGDKQQTD.js.map} +0 -0
- /package/dist/{learning-persistence-WMWZJZ35.js.map → learning-persistence-FILWP3IR.js.map} +0 -0
- /package/dist/{mcp-config-34XMRM64.js.map → mcp-config-CHS2ZC42.js.map} +0 -0
- /package/dist/{mobimem-QDBP37H7.js.map → mobimem-NO7I2Y4O.js.map} +0 -0
- /package/dist/{repo-security-plan-C3LLE3Z7.js.map → repo-security-plan-BZ3WOIEZ.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-NVQIWLQL.js.map → research-helpers-synthesize-SH34FJIE.js.map} +0 -0
- /package/dist/{routing-memory-W3YWMLJM.js.map → routing-memory-SALB3DZI.js.map} +0 -0
- /package/dist/{session-memory-DWF5Z2LC.js.map → session-memory-IOXXN6XA.js.map} +0 -0
- /package/dist/{setup-command-QKAVRVLV.js.map → setup-command-IP2PV75E.js.map} +0 -0
- /package/dist/{setup-config-JA5IX53Q.js.map → setup-config-FYRXUWQH.js.map} +0 -0
- /package/dist/{weather-report-YQSLX4MS.js.map → weather-report-SBJRXFTW.js.map} +0 -0
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getTokenEnvVars,
|
|
6
6
|
resolveToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UCQTXKTS.js";
|
|
8
8
|
import {
|
|
9
9
|
executeExpert
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-46S665SD.js";
|
|
11
11
|
import {
|
|
12
12
|
ClaudeAdapter,
|
|
13
13
|
DEFAULT_RELEVANCE_CONFIG,
|
|
@@ -32,10 +32,11 @@ import {
|
|
|
32
32
|
toolError,
|
|
33
33
|
toolSuccess,
|
|
34
34
|
toolSuccessStructured,
|
|
35
|
+
warnIfSimulatedOutsideTests,
|
|
35
36
|
withAccessPolicy,
|
|
36
37
|
withProgressHeartbeat,
|
|
37
38
|
wrapToolWithTimeout
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PEDEZRPR.js";
|
|
39
40
|
import {
|
|
40
41
|
REGISTRY_PATH,
|
|
41
42
|
getProjectRoot,
|
|
@@ -44,14 +45,14 @@ import {
|
|
|
44
45
|
normalizeTopicToCanonical,
|
|
45
46
|
savePapersRegistry,
|
|
46
47
|
synthesizeResearch
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-PB2EXTSV.js";
|
|
48
49
|
import {
|
|
49
50
|
IssueTriage,
|
|
50
51
|
sanitizeInput
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-RCQZMJBZ.js";
|
|
52
53
|
import {
|
|
53
54
|
generateSecurityPlan
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-QAOI6EIU.js";
|
|
55
56
|
import {
|
|
56
57
|
analyzeGitHubRepo
|
|
57
58
|
} from "./chunk-BC3M4VLP.js";
|
|
@@ -68,16 +69,22 @@ import {
|
|
|
68
69
|
clampTaskTtl,
|
|
69
70
|
getAvailabilityCache,
|
|
70
71
|
resolveFallback
|
|
71
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-QJTOZIE7.js";
|
|
72
73
|
import {
|
|
73
74
|
DEFAULTS
|
|
74
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-FHFNOMNK.js";
|
|
75
76
|
import {
|
|
76
77
|
resolveInsideRoot
|
|
77
78
|
} from "./chunk-NUBSJGQZ.js";
|
|
78
79
|
import {
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
ClaudeCliAdapter,
|
|
81
|
+
CliDetectionCache,
|
|
82
|
+
asRecord,
|
|
83
|
+
extractNumberField,
|
|
84
|
+
getAvailableClis,
|
|
85
|
+
sleep,
|
|
86
|
+
withTimeout
|
|
87
|
+
} from "./chunk-ZC4KHPRL.js";
|
|
81
88
|
import {
|
|
82
89
|
BUILT_IN_EXPERTS,
|
|
83
90
|
BuiltInExpertTypeSchema,
|
|
@@ -86,11 +93,11 @@ import {
|
|
|
86
93
|
} from "./chunk-GJVHRJO2.js";
|
|
87
94
|
import {
|
|
88
95
|
createSessionMemory
|
|
89
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-I37IQ26H.js";
|
|
90
97
|
import {
|
|
91
98
|
MemoryImportance,
|
|
92
99
|
calculateTextJaccardSimilarity
|
|
93
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-KVZNQWWI.js";
|
|
94
101
|
import {
|
|
95
102
|
STOPWORDS,
|
|
96
103
|
capitalize,
|
|
@@ -99,19 +106,10 @@ import {
|
|
|
99
106
|
} from "./chunk-633WH2ML.js";
|
|
100
107
|
import {
|
|
101
108
|
generateMcpConfig
|
|
102
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-FTWGBV7S.js";
|
|
103
110
|
import {
|
|
104
111
|
getFallbackChainForCategory
|
|
105
|
-
} from "./chunk-
|
|
106
|
-
import {
|
|
107
|
-
ClaudeCliAdapter,
|
|
108
|
-
CliDetectionCache,
|
|
109
|
-
asRecord,
|
|
110
|
-
extractNumberField,
|
|
111
|
-
getAvailableClis,
|
|
112
|
-
sleep,
|
|
113
|
-
withTimeout
|
|
114
|
-
} from "./chunk-YQAOMDR2.js";
|
|
112
|
+
} from "./chunk-CDWQP3UC.js";
|
|
115
113
|
import {
|
|
116
114
|
AGENT_ROUTER_TIMEOUTS,
|
|
117
115
|
API_TIMEOUTS,
|
|
@@ -176,7 +174,10 @@ import {
|
|
|
176
174
|
ok,
|
|
177
175
|
toExpertTaskAnalysisResult,
|
|
178
176
|
withStep
|
|
179
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-FAUHVWYZ.js";
|
|
178
|
+
import {
|
|
179
|
+
nexusDataPath
|
|
180
|
+
} from "./chunk-FDNWRZNJ.js";
|
|
180
181
|
|
|
181
182
|
// src/agents/state-machine-types.ts
|
|
182
183
|
var VALID_TRANSITIONS = /* @__PURE__ */ new Map([
|
|
@@ -13863,7 +13864,7 @@ function wouldCreateCycle(from, to, getNode) {
|
|
|
13863
13864
|
return canReach(to, from, /* @__PURE__ */ new Set(), getNode);
|
|
13864
13865
|
}
|
|
13865
13866
|
function findCyclePath(from, to, getNode) {
|
|
13866
|
-
const
|
|
13867
|
+
const path19 = [from, to];
|
|
13867
13868
|
const visited = /* @__PURE__ */ new Set([from]);
|
|
13868
13869
|
const findPath = (current) => {
|
|
13869
13870
|
if (current === from) return true;
|
|
@@ -13872,9 +13873,9 @@ function findCyclePath(from, to, getNode) {
|
|
|
13872
13873
|
for (const depId of node.dependencies.keys()) {
|
|
13873
13874
|
if (!visited.has(depId)) {
|
|
13874
13875
|
visited.add(depId);
|
|
13875
|
-
|
|
13876
|
+
path19.push(depId);
|
|
13876
13877
|
if (findPath(depId)) return true;
|
|
13877
|
-
|
|
13878
|
+
path19.pop();
|
|
13878
13879
|
} else if (depId === from) {
|
|
13879
13880
|
return true;
|
|
13880
13881
|
}
|
|
@@ -13882,7 +13883,7 @@ function findCyclePath(from, to, getNode) {
|
|
|
13882
13883
|
return false;
|
|
13883
13884
|
};
|
|
13884
13885
|
findPath(to);
|
|
13885
|
-
return
|
|
13886
|
+
return path19;
|
|
13886
13887
|
}
|
|
13887
13888
|
function detectCycleDFS(nodeId, visited, stack, getNode) {
|
|
13888
13889
|
visited.add(nodeId);
|
|
@@ -13901,29 +13902,29 @@ function detectCycleDFS(nodeId, visited, stack, getNode) {
|
|
|
13901
13902
|
return false;
|
|
13902
13903
|
}
|
|
13903
13904
|
function findCycleFromNode(startId, getNode) {
|
|
13904
|
-
const
|
|
13905
|
+
const path19 = [];
|
|
13905
13906
|
const visited = /* @__PURE__ */ new Set();
|
|
13906
13907
|
const dfs = (nodeId) => {
|
|
13907
|
-
if (
|
|
13908
|
-
const cycleStart =
|
|
13909
|
-
|
|
13910
|
-
|
|
13908
|
+
if (path19.includes(nodeId)) {
|
|
13909
|
+
const cycleStart = path19.indexOf(nodeId);
|
|
13910
|
+
path19.splice(0, cycleStart);
|
|
13911
|
+
path19.push(nodeId);
|
|
13911
13912
|
return true;
|
|
13912
13913
|
}
|
|
13913
13914
|
if (visited.has(nodeId)) return false;
|
|
13914
13915
|
visited.add(nodeId);
|
|
13915
|
-
|
|
13916
|
+
path19.push(nodeId);
|
|
13916
13917
|
const node = getNode(nodeId);
|
|
13917
13918
|
if (node) {
|
|
13918
13919
|
for (const depId of node.dependencies.keys()) {
|
|
13919
13920
|
if (dfs(depId)) return true;
|
|
13920
13921
|
}
|
|
13921
13922
|
}
|
|
13922
|
-
|
|
13923
|
+
path19.pop();
|
|
13923
13924
|
return false;
|
|
13924
13925
|
};
|
|
13925
13926
|
dfs(startId);
|
|
13926
|
-
return
|
|
13927
|
+
return path19;
|
|
13927
13928
|
}
|
|
13928
13929
|
|
|
13929
13930
|
// src/agents/skills/skill-dependency-graph.ts
|
|
@@ -18468,18 +18469,18 @@ var DependencyGraph = class {
|
|
|
18468
18469
|
}
|
|
18469
18470
|
const startNode = firstNode;
|
|
18470
18471
|
const visited = /* @__PURE__ */ new Set();
|
|
18471
|
-
const
|
|
18472
|
+
const path19 = [];
|
|
18472
18473
|
const dfs = (nodeId) => {
|
|
18473
|
-
if (
|
|
18474
|
-
const cycleStart =
|
|
18475
|
-
|
|
18474
|
+
if (path19.includes(nodeId)) {
|
|
18475
|
+
const cycleStart = path19.indexOf(nodeId);
|
|
18476
|
+
path19.splice(0, cycleStart);
|
|
18476
18477
|
return true;
|
|
18477
18478
|
}
|
|
18478
18479
|
if (visited.has(nodeId)) {
|
|
18479
18480
|
return false;
|
|
18480
18481
|
}
|
|
18481
18482
|
visited.add(nodeId);
|
|
18482
|
-
|
|
18483
|
+
path19.push(nodeId);
|
|
18483
18484
|
const node = this.nodes.get(nodeId);
|
|
18484
18485
|
if (node) {
|
|
18485
18486
|
for (const depId of node.dependencies) {
|
|
@@ -18490,11 +18491,11 @@ var DependencyGraph = class {
|
|
|
18490
18491
|
}
|
|
18491
18492
|
}
|
|
18492
18493
|
}
|
|
18493
|
-
|
|
18494
|
+
path19.pop();
|
|
18494
18495
|
return false;
|
|
18495
18496
|
};
|
|
18496
18497
|
dfs(startNode);
|
|
18497
|
-
return
|
|
18498
|
+
return path19.length > 0 ? path19 : cycleNodes.slice(0, 3);
|
|
18498
18499
|
}
|
|
18499
18500
|
/**
|
|
18500
18501
|
* Gets the execution order (topologically sorted step IDs).
|
|
@@ -19346,9 +19347,9 @@ function getBuiltInTemplatesPath() {
|
|
|
19346
19347
|
join3(dirname2(currentDir), "workflows", "templates"),
|
|
19347
19348
|
join3(dirname2(currentDir), "dist", "workflows", "templates")
|
|
19348
19349
|
];
|
|
19349
|
-
for (const
|
|
19350
|
-
if (existsSync3(
|
|
19351
|
-
return
|
|
19350
|
+
for (const path19 of possiblePaths) {
|
|
19351
|
+
if (existsSync3(path19)) {
|
|
19352
|
+
return path19;
|
|
19352
19353
|
}
|
|
19353
19354
|
}
|
|
19354
19355
|
return join3(currentDir, "templates");
|
|
@@ -19889,9 +19890,9 @@ function validateRequiredInputs(inputs, required) {
|
|
|
19889
19890
|
}
|
|
19890
19891
|
|
|
19891
19892
|
// src/workflows/expression-resolver-helpers.ts
|
|
19892
|
-
function getNestedValue(obj,
|
|
19893
|
+
function getNestedValue(obj, path19) {
|
|
19893
19894
|
let current = obj;
|
|
19894
|
-
for (const key of
|
|
19895
|
+
for (const key of path19) {
|
|
19895
19896
|
if (current === null || current === void 0) {
|
|
19896
19897
|
return void 0;
|
|
19897
19898
|
}
|
|
@@ -19902,24 +19903,24 @@ function getNestedValue(obj, path20) {
|
|
|
19902
19903
|
}
|
|
19903
19904
|
return current;
|
|
19904
19905
|
}
|
|
19905
|
-
function resolveInputs(
|
|
19906
|
-
const value = getNestedValue(context.inputs,
|
|
19906
|
+
function resolveInputs(path19, context) {
|
|
19907
|
+
const value = getNestedValue(context.inputs, path19);
|
|
19907
19908
|
if (value === void 0) {
|
|
19908
19909
|
return {
|
|
19909
19910
|
success: false,
|
|
19910
|
-
error: `Input '${
|
|
19911
|
+
error: `Input '${path19.join(".")}' not found`
|
|
19911
19912
|
};
|
|
19912
19913
|
}
|
|
19913
19914
|
return { success: true, value };
|
|
19914
19915
|
}
|
|
19915
|
-
function validateStepPath(
|
|
19916
|
-
if (
|
|
19916
|
+
function validateStepPath(path19) {
|
|
19917
|
+
if (path19.length < 2) {
|
|
19917
19918
|
return {
|
|
19918
19919
|
success: false,
|
|
19919
19920
|
error: "Steps expression requires at least stepId and output"
|
|
19920
19921
|
};
|
|
19921
19922
|
}
|
|
19922
|
-
if (
|
|
19923
|
+
if (path19[0] === void 0 || path19[1] === void 0) {
|
|
19923
19924
|
return {
|
|
19924
19925
|
success: false,
|
|
19925
19926
|
error: "Steps expression requires stepId and output"
|
|
@@ -19945,12 +19946,12 @@ function validateStepResult(stepId, outputKey, stepResult) {
|
|
|
19945
19946
|
}
|
|
19946
19947
|
return null;
|
|
19947
19948
|
}
|
|
19948
|
-
function resolveSteps(
|
|
19949
|
-
const pathError = validateStepPath(
|
|
19949
|
+
function resolveSteps(path19, context) {
|
|
19950
|
+
const pathError = validateStepPath(path19);
|
|
19950
19951
|
if (pathError !== null) return pathError;
|
|
19951
|
-
const stepId =
|
|
19952
|
-
const outputKey =
|
|
19953
|
-
const rest =
|
|
19952
|
+
const stepId = path19[0] ?? "";
|
|
19953
|
+
const outputKey = path19[1] ?? "";
|
|
19954
|
+
const rest = path19.slice(2);
|
|
19954
19955
|
const stepResult = context.stepResults.get(stepId);
|
|
19955
19956
|
const earlyReturn = validateStepResult(stepId, outputKey, stepResult);
|
|
19956
19957
|
if (earlyReturn !== null) return earlyReturn;
|
|
@@ -19966,15 +19967,15 @@ function resolveSteps(path20, context) {
|
|
|
19966
19967
|
}
|
|
19967
19968
|
return { success: true, value };
|
|
19968
19969
|
}
|
|
19969
|
-
function resolveVariables(
|
|
19970
|
-
if (
|
|
19970
|
+
function resolveVariables(path19, context) {
|
|
19971
|
+
if (path19.length === 0) {
|
|
19971
19972
|
return {
|
|
19972
19973
|
success: false,
|
|
19973
19974
|
error: "Variables expression requires a variable name"
|
|
19974
19975
|
};
|
|
19975
19976
|
}
|
|
19976
|
-
const varName =
|
|
19977
|
-
const rest =
|
|
19977
|
+
const varName = path19[0];
|
|
19978
|
+
const rest = path19.slice(1);
|
|
19978
19979
|
if (varName === void 0) {
|
|
19979
19980
|
return {
|
|
19980
19981
|
success: false,
|
|
@@ -20997,8 +20998,8 @@ var WorkflowEngine = class {
|
|
|
20997
20998
|
this.config = resolveConfig2(config);
|
|
20998
20999
|
}
|
|
20999
21000
|
/** Load workflow template from file. */
|
|
21000
|
-
async loadTemplate(
|
|
21001
|
-
return this.deps.loadWorkflowFile(
|
|
21001
|
+
async loadTemplate(path19) {
|
|
21002
|
+
return this.deps.loadWorkflowFile(path19);
|
|
21002
21003
|
}
|
|
21003
21004
|
/** Execute a workflow with inputs. */
|
|
21004
21005
|
async execute(workflow, inputs) {
|
|
@@ -21102,8 +21103,8 @@ var WorkflowEngine = class {
|
|
|
21102
21103
|
}
|
|
21103
21104
|
return Promise.resolve(templates);
|
|
21104
21105
|
}
|
|
21105
|
-
createTemplate(workflow,
|
|
21106
|
-
const t = { name: workflow.name, version: workflow.version, path:
|
|
21106
|
+
createTemplate(workflow, path19, category) {
|
|
21107
|
+
const t = { name: workflow.name, version: workflow.version, path: path19, category };
|
|
21107
21108
|
if (workflow.description !== void 0) t.description = workflow.description;
|
|
21108
21109
|
return t;
|
|
21109
21110
|
}
|
|
@@ -21389,8 +21390,8 @@ function createParseWorkflow() {
|
|
|
21389
21390
|
};
|
|
21390
21391
|
}
|
|
21391
21392
|
function createLoadWorkflowFile() {
|
|
21392
|
-
return async (
|
|
21393
|
-
const result = await loadWorkflowFile(
|
|
21393
|
+
return async (path19) => {
|
|
21394
|
+
const result = await loadWorkflowFile(path19);
|
|
21394
21395
|
if (!result.ok) {
|
|
21395
21396
|
if (result.error instanceof ParseError) {
|
|
21396
21397
|
return result;
|
|
@@ -27031,31 +27032,31 @@ var GraphBuilder = class {
|
|
|
27031
27032
|
}
|
|
27032
27033
|
const visited = /* @__PURE__ */ new Set();
|
|
27033
27034
|
const stack = /* @__PURE__ */ new Set();
|
|
27034
|
-
const
|
|
27035
|
+
const path19 = [];
|
|
27035
27036
|
for (const nodeId of this.nodes.keys()) {
|
|
27036
|
-
const cycle = this.dfs(nodeId, adj, visited, stack,
|
|
27037
|
+
const cycle = this.dfs(nodeId, adj, visited, stack, path19);
|
|
27037
27038
|
if (cycle !== void 0) return cycle;
|
|
27038
27039
|
}
|
|
27039
27040
|
return void 0;
|
|
27040
27041
|
}
|
|
27041
|
-
dfs(nodeId, adj, visited, stack,
|
|
27042
|
+
dfs(nodeId, adj, visited, stack, path19) {
|
|
27042
27043
|
if (stack.has(nodeId)) {
|
|
27043
|
-
const cycleStart =
|
|
27044
|
-
const cyclePath =
|
|
27044
|
+
const cycleStart = path19.indexOf(nodeId);
|
|
27045
|
+
const cyclePath = path19.slice(cycleStart);
|
|
27045
27046
|
cyclePath.push(nodeId);
|
|
27046
27047
|
return { type: "cycle_detected", path: cyclePath };
|
|
27047
27048
|
}
|
|
27048
27049
|
if (visited.has(nodeId)) return void 0;
|
|
27049
27050
|
visited.add(nodeId);
|
|
27050
27051
|
stack.add(nodeId);
|
|
27051
|
-
|
|
27052
|
+
path19.push(nodeId);
|
|
27052
27053
|
const neighbors = adj.get(nodeId) ?? [];
|
|
27053
27054
|
for (const neighbor of neighbors) {
|
|
27054
|
-
const cycle = this.dfs(neighbor, adj, visited, stack,
|
|
27055
|
+
const cycle = this.dfs(neighbor, adj, visited, stack, path19);
|
|
27055
27056
|
if (cycle !== void 0) return cycle;
|
|
27056
27057
|
}
|
|
27057
27058
|
stack.delete(nodeId);
|
|
27058
|
-
|
|
27059
|
+
path19.pop();
|
|
27059
27060
|
return void 0;
|
|
27060
27061
|
}
|
|
27061
27062
|
checkReachability() {
|
|
@@ -27723,8 +27724,8 @@ function extractModelAttribution(event) {
|
|
|
27723
27724
|
};
|
|
27724
27725
|
}
|
|
27725
27726
|
function extractRoutingAttribution(event) {
|
|
27726
|
-
const
|
|
27727
|
-
return { modelId: event.selectedModel, reasoning: event.reasoning, decisionPath:
|
|
27727
|
+
const path19 = event.decisionPath !== void 0 ? [...event.decisionPath] : void 0;
|
|
27728
|
+
return { modelId: event.selectedModel, reasoning: event.reasoning, decisionPath: path19 };
|
|
27728
27729
|
}
|
|
27729
27730
|
function extractPipelineAttribution(event) {
|
|
27730
27731
|
if (event.type === "pipeline.completed") {
|
|
@@ -31930,8 +31931,6 @@ function isReflectiveShadowMode() {
|
|
|
31930
31931
|
}
|
|
31931
31932
|
|
|
31932
31933
|
// src/mcp/tools/orchestrate-reflection.ts
|
|
31933
|
-
import * as os from "os";
|
|
31934
|
-
import * as path4 from "path";
|
|
31935
31934
|
var logger28 = createLogger({ component: "orchestrate-reflection" });
|
|
31936
31935
|
var REFLECTION_MAX_TOKENS2 = 1e3;
|
|
31937
31936
|
var REFLECTION_WRITE_CONFIDENCE_THRESHOLD = 0.6;
|
|
@@ -32022,7 +32021,7 @@ function writeLearningsToSession(learnings, taskDescription) {
|
|
|
32022
32021
|
}
|
|
32023
32022
|
if (eligible.length === 0) return 0;
|
|
32024
32023
|
try {
|
|
32025
|
-
const memoryDir =
|
|
32024
|
+
const memoryDir = nexusDataPath("memory", "sessions");
|
|
32026
32025
|
const memory = createSessionMemory(memoryDir);
|
|
32027
32026
|
const sessionId = `reflection-${String(Date.now())}`;
|
|
32028
32027
|
const startResult = memory.startSession(sessionId);
|
|
@@ -32470,8 +32469,7 @@ function hashObjective(userObjective) {
|
|
|
32470
32469
|
|
|
32471
32470
|
// src/context/structured-task-state.ts
|
|
32472
32471
|
import * as fs5 from "fs";
|
|
32473
|
-
import * as
|
|
32474
|
-
import * as os2 from "os";
|
|
32472
|
+
import * as path4 from "path";
|
|
32475
32473
|
|
|
32476
32474
|
// src/context/structured-task-state-types.ts
|
|
32477
32475
|
import { z as z55 } from "zod";
|
|
@@ -32594,15 +32592,15 @@ var StructuredTaskLogEntrySchema = z55.discriminatedUnion("event", [
|
|
|
32594
32592
|
|
|
32595
32593
|
// src/context/structured-task-state.ts
|
|
32596
32594
|
var logger29 = createLogger({ component: "structured-task-state" });
|
|
32597
|
-
var
|
|
32595
|
+
var TASKS_SUBDIR = "tasks";
|
|
32598
32596
|
var FILE_MODE2 = 384;
|
|
32599
32597
|
var DIR_MODE3 = 448;
|
|
32600
32598
|
function getTasksDir(customDir) {
|
|
32601
|
-
if (customDir !== void 0) return
|
|
32602
|
-
return
|
|
32599
|
+
if (customDir !== void 0) return path4.resolve(customDir);
|
|
32600
|
+
return nexusDataPath(TASKS_SUBDIR);
|
|
32603
32601
|
}
|
|
32604
32602
|
function getLogPath(taskId, customDir) {
|
|
32605
|
-
return
|
|
32603
|
+
return path4.join(getTasksDir(customDir), `state-${taskId}.jsonl`);
|
|
32606
32604
|
}
|
|
32607
32605
|
function validateTaskId(taskId) {
|
|
32608
32606
|
if (taskId.includes("..") || taskId.includes("/") || taskId.includes("\\")) {
|
|
@@ -36383,18 +36381,18 @@ function parseArxivEntries(xml, source, topic = "") {
|
|
|
36383
36381
|
|
|
36384
36382
|
// src/cli/research-helpers-sources-io.ts
|
|
36385
36383
|
import * as fs6 from "fs/promises";
|
|
36386
|
-
import * as
|
|
36384
|
+
import * as path5 from "path";
|
|
36387
36385
|
import { parse as parseYaml2, stringify as stringifyYaml } from "yaml";
|
|
36388
36386
|
var SOURCES_FILE = "sources.yaml";
|
|
36389
36387
|
function validatePath3(constructedPath, allowedRoot) {
|
|
36390
36388
|
const resolved = resolveInsideRoot(constructedPath, allowedRoot);
|
|
36391
36389
|
if (resolved === null) {
|
|
36392
|
-
const root =
|
|
36390
|
+
const root = path5.resolve(allowedRoot);
|
|
36393
36391
|
return {
|
|
36394
36392
|
ok: false,
|
|
36395
36393
|
error: {
|
|
36396
36394
|
code: "PATH_TRAVERSAL",
|
|
36397
|
-
message: `Path ${
|
|
36395
|
+
message: `Path ${path5.resolve(constructedPath)} is outside ${root}`
|
|
36398
36396
|
}
|
|
36399
36397
|
};
|
|
36400
36398
|
}
|
|
@@ -36402,7 +36400,7 @@ function validatePath3(constructedPath, allowedRoot) {
|
|
|
36402
36400
|
}
|
|
36403
36401
|
async function loadSourcesRegistry(rootDir) {
|
|
36404
36402
|
const root = rootDir ?? getProjectRoot();
|
|
36405
|
-
const filePath =
|
|
36403
|
+
const filePath = path5.join(root, REGISTRY_PATH, SOURCES_FILE);
|
|
36406
36404
|
const pathResult = validatePath3(filePath, root);
|
|
36407
36405
|
if (!pathResult.ok) return pathResult;
|
|
36408
36406
|
try {
|
|
@@ -36428,7 +36426,7 @@ async function loadSourcesRegistry(rootDir) {
|
|
|
36428
36426
|
}
|
|
36429
36427
|
async function saveSourcesRegistry(registry, rootDir) {
|
|
36430
36428
|
const root = rootDir ?? getProjectRoot();
|
|
36431
|
-
const filePath =
|
|
36429
|
+
const filePath = path5.join(root, REGISTRY_PATH, SOURCES_FILE);
|
|
36432
36430
|
const pathResult = validatePath3(filePath, root);
|
|
36433
36431
|
if (!pathResult.ok) return pathResult;
|
|
36434
36432
|
try {
|
|
@@ -36735,12 +36733,12 @@ function rankDiscoveredItems(items, topic) {
|
|
|
36735
36733
|
|
|
36736
36734
|
// src/cli/research-helpers-index-ops.ts
|
|
36737
36735
|
import * as fs7 from "fs/promises";
|
|
36738
|
-
import * as
|
|
36736
|
+
import * as path6 from "path";
|
|
36739
36737
|
function getRegistryPath() {
|
|
36740
|
-
return
|
|
36738
|
+
return path6.resolve(process.cwd(), "docs/research/registry");
|
|
36741
36739
|
}
|
|
36742
36740
|
function getIndexPath() {
|
|
36743
|
-
return
|
|
36741
|
+
return path6.resolve(process.cwd(), "docs/research/RESEARCH_INDEX.md");
|
|
36744
36742
|
}
|
|
36745
36743
|
async function handleStatsCommand(options) {
|
|
36746
36744
|
const registryPath = getRegistryPath();
|
|
@@ -36770,7 +36768,7 @@ async function handleRefreshCommand(options) {
|
|
|
36770
36768
|
if (!mdResult.ok) {
|
|
36771
36769
|
return `Error: Failed to generate markdown: ${mdResult.error.message}`;
|
|
36772
36770
|
}
|
|
36773
|
-
await fs7.mkdir(
|
|
36771
|
+
await fs7.mkdir(path6.dirname(outputPath), { recursive: true });
|
|
36774
36772
|
await fs7.writeFile(outputPath, mdResult.value, "utf-8");
|
|
36775
36773
|
const stats = index.stats;
|
|
36776
36774
|
return [
|
|
@@ -38710,12 +38708,12 @@ function extractFileReferences(markdown) {
|
|
|
38710
38708
|
let match;
|
|
38711
38709
|
FILE_REF_PATTERN.lastIndex = 0;
|
|
38712
38710
|
while ((match = FILE_REF_PATTERN.exec(markdown)) !== null) {
|
|
38713
|
-
const
|
|
38714
|
-
if (
|
|
38715
|
-
seen.add(
|
|
38711
|
+
const path19 = match[1];
|
|
38712
|
+
if (path19 === void 0 || seen.has(path19)) continue;
|
|
38713
|
+
seen.add(path19);
|
|
38716
38714
|
const lineStr = match[2];
|
|
38717
38715
|
const line = lineStr !== void 0 ? parseInt(lineStr, 10) : void 0;
|
|
38718
|
-
refs.push(line !== void 0 ? { path:
|
|
38716
|
+
refs.push(line !== void 0 ? { path: path19, line } : { path: path19 });
|
|
38719
38717
|
}
|
|
38720
38718
|
return refs;
|
|
38721
38719
|
}
|
|
@@ -39999,7 +39997,7 @@ function registerExtractSymbolsTool(server, deps) {
|
|
|
39999
39997
|
|
|
40000
39998
|
// src/mcp/tools/query-trace-tool.ts
|
|
40001
39999
|
import { readFile as readFile5, stat as stat3 } from "fs/promises";
|
|
40002
|
-
import { join as
|
|
40000
|
+
import { join as join8, resolve as resolve11, sep as sep3 } from "path";
|
|
40003
40001
|
import { z as z84 } from "zod";
|
|
40004
40002
|
var QueryTraceInputSchema = z84.object({
|
|
40005
40003
|
runId: z84.string().min(1).max(128).regex(/^[a-zA-Z0-9_-]+$/, "runId must be alphanumeric, hyphens, or underscores").describe("Run ID to query traces for"),
|
|
@@ -40040,7 +40038,7 @@ var EMPTY_RESPONSE = {
|
|
|
40040
40038
|
};
|
|
40041
40039
|
async function queryTraceFromDisk(input, runsDir) {
|
|
40042
40040
|
const dir = runsDir ?? DEFAULT_RUNS_DIR;
|
|
40043
|
-
const tracePath =
|
|
40041
|
+
const tracePath = join8(dir, input.runId, "trace.jsonl");
|
|
40044
40042
|
const resolvedDir = resolve11(dir);
|
|
40045
40043
|
const resolvedTrace = resolve11(tracePath);
|
|
40046
40044
|
if (!resolvedTrace.startsWith(resolvedDir + sep3) && resolvedTrace !== resolvedDir) {
|
|
@@ -40350,11 +40348,11 @@ var InMemoryAuditStorage = class {
|
|
|
40350
40348
|
|
|
40351
40349
|
// src/audit/audit-storage.ts
|
|
40352
40350
|
import * as fs9 from "fs";
|
|
40353
|
-
import * as
|
|
40351
|
+
import * as path7 from "path";
|
|
40354
40352
|
function validateLogDir(logDir, allowedRoot) {
|
|
40355
|
-
const resolvedRoot =
|
|
40356
|
-
const resolvedLogDir =
|
|
40357
|
-
if (!resolvedLogDir.startsWith(resolvedRoot +
|
|
40353
|
+
const resolvedRoot = path7.resolve(allowedRoot);
|
|
40354
|
+
const resolvedLogDir = path7.resolve(allowedRoot, logDir);
|
|
40355
|
+
if (!resolvedLogDir.startsWith(resolvedRoot + path7.sep) && resolvedLogDir !== resolvedRoot) {
|
|
40358
40356
|
return {
|
|
40359
40357
|
ok: false,
|
|
40360
40358
|
error: new SecurityError("Path traversal detected: logDir escapes allowed root directory", {
|
|
@@ -40377,10 +40375,10 @@ function validateLogDirBasic(logDir) {
|
|
|
40377
40375
|
};
|
|
40378
40376
|
}
|
|
40379
40377
|
}
|
|
40380
|
-
const resolved =
|
|
40378
|
+
const resolved = path7.resolve(logDir);
|
|
40381
40379
|
const systemDirs = ["/etc", "/var", "/usr", "/bin", "/sbin", "/root", "/proc", "/sys"];
|
|
40382
40380
|
for (const sysDir of systemDirs) {
|
|
40383
|
-
if (resolved === sysDir || resolved.startsWith(sysDir +
|
|
40381
|
+
if (resolved === sysDir || resolved.startsWith(sysDir + path7.sep)) {
|
|
40384
40382
|
return {
|
|
40385
40383
|
ok: false,
|
|
40386
40384
|
error: new SecurityError("logDir cannot be a system directory", {
|
|
@@ -40469,7 +40467,7 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
40469
40467
|
const existingFiles = this.getExistingLogFiles();
|
|
40470
40468
|
const latestFileName = existingFiles[0];
|
|
40471
40469
|
if (existingFiles.length > 0 && latestFileName !== void 0) {
|
|
40472
|
-
const latestFile =
|
|
40470
|
+
const latestFile = path7.join(this.logDir, latestFileName);
|
|
40473
40471
|
const stats = fs9.statSync(latestFile);
|
|
40474
40472
|
if (stats.size < this.maxFileSizeBytes) {
|
|
40475
40473
|
this.currentFile = latestFile;
|
|
@@ -40492,7 +40490,7 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
40492
40490
|
this.writeStream.end();
|
|
40493
40491
|
this.writeStream = null;
|
|
40494
40492
|
}
|
|
40495
|
-
this.currentFile =
|
|
40493
|
+
this.currentFile = path7.join(this.logDir, this.generateFileName());
|
|
40496
40494
|
this.currentFileSize = 0;
|
|
40497
40495
|
this.openWriteStream();
|
|
40498
40496
|
this.logger.debug("Rotated audit log file", { file: this.currentFile });
|
|
@@ -40503,7 +40501,7 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
40503
40501
|
if (files.length > this.maxFiles) {
|
|
40504
40502
|
const filesToDelete = files.slice(this.maxFiles);
|
|
40505
40503
|
for (const file of filesToDelete) {
|
|
40506
|
-
const filePath =
|
|
40504
|
+
const filePath = path7.join(this.logDir, file);
|
|
40507
40505
|
fs9.unlinkSync(filePath);
|
|
40508
40506
|
this.logger.info("Pruned old audit log", { file });
|
|
40509
40507
|
}
|
|
@@ -40557,7 +40555,7 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
40557
40555
|
let skipped = 0;
|
|
40558
40556
|
for (const file of files) {
|
|
40559
40557
|
if (results.length >= limit) break;
|
|
40560
|
-
const filePath =
|
|
40558
|
+
const filePath = path7.join(this.logDir, file);
|
|
40561
40559
|
const events = await readAuditFile({
|
|
40562
40560
|
filePath,
|
|
40563
40561
|
criteria,
|
|
@@ -41225,7 +41223,7 @@ async function tryIssueTriage(task) {
|
|
|
41225
41223
|
try {
|
|
41226
41224
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
41227
41225
|
if (issueMatch === null) return null;
|
|
41228
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
41226
|
+
const { createIssueTriage } = await import("./issue-triage-DGDKQQTD.js");
|
|
41229
41227
|
const triage = createIssueTriage();
|
|
41230
41228
|
const owner = issueMatch[1] ?? "";
|
|
41231
41229
|
const num = issueMatch[2] ?? "";
|
|
@@ -41253,7 +41251,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
41253
41251
|
]);
|
|
41254
41252
|
async function classifyWithLLM(task) {
|
|
41255
41253
|
try {
|
|
41256
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
41254
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-R6FQWUHB.js");
|
|
41257
41255
|
const prompt = [
|
|
41258
41256
|
"Classify this task into exactly one pipeline template.",
|
|
41259
41257
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -41528,7 +41526,7 @@ function resolveConfidence(rule) {
|
|
|
41528
41526
|
}
|
|
41529
41527
|
|
|
41530
41528
|
// src/mcp/tools/security-scan.ts
|
|
41531
|
-
import * as
|
|
41529
|
+
import * as path8 from "path";
|
|
41532
41530
|
var logger33 = createLogger({ component: "security-scan" });
|
|
41533
41531
|
var SCAN_TIMEOUT_MS = 3e5;
|
|
41534
41532
|
async function isSemgrepAvailable() {
|
|
@@ -41555,9 +41553,9 @@ async function runSemgrep(targetDir, rulesets) {
|
|
|
41555
41553
|
return stdout;
|
|
41556
41554
|
}
|
|
41557
41555
|
function validateTargetPath(target) {
|
|
41558
|
-
const root =
|
|
41559
|
-
const resolved =
|
|
41560
|
-
if (resolved !== root && !resolved.startsWith(root +
|
|
41556
|
+
const root = path8.resolve(process.cwd());
|
|
41557
|
+
const resolved = path8.resolve(root, target);
|
|
41558
|
+
if (resolved !== root && !resolved.startsWith(root + path8.sep)) {
|
|
41561
41559
|
throw new Error(
|
|
41562
41560
|
`Invalid target path: must resolve inside ${root} (got ${resolved})`
|
|
41563
41561
|
);
|
|
@@ -41986,8 +41984,8 @@ async function runOsvCheck(targetDir, enabled) {
|
|
|
41986
41984
|
if (!enabled) return [];
|
|
41987
41985
|
try {
|
|
41988
41986
|
const fs20 = await import("fs");
|
|
41989
|
-
const
|
|
41990
|
-
const pkgPath =
|
|
41987
|
+
const path19 = await import("path");
|
|
41988
|
+
const pkgPath = path19.join(targetDir, "package.json");
|
|
41991
41989
|
if (!fs20.existsSync(pkgPath)) return [];
|
|
41992
41990
|
const pkg = JSON.parse(fs20.readFileSync(pkgPath, "utf-8"));
|
|
41993
41991
|
const deps = Object.entries(pkg.dependencies ?? {}).slice(0, 20).map(([name, version]) => ({
|
|
@@ -42047,9 +42045,9 @@ var memoryInitPromise = null;
|
|
|
42047
42045
|
async function initPipelineMemory() {
|
|
42048
42046
|
if (cachedMemory !== null) return cachedMemory;
|
|
42049
42047
|
try {
|
|
42050
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
42051
|
-
const {
|
|
42052
|
-
const mem = createSessionMemory2(
|
|
42048
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-IOXXN6XA.js");
|
|
42049
|
+
const { getLearningDir } = await import("./learning-persistence-FILWP3IR.js");
|
|
42050
|
+
const mem = createSessionMemory2(getLearningDir());
|
|
42053
42051
|
mem.startSession(`pipeline-${String(Date.now())}`);
|
|
42054
42052
|
cachedMemory = {
|
|
42055
42053
|
recordLearning: (l) => {
|
|
@@ -42096,10 +42094,10 @@ function flushPipelineMemory() {
|
|
|
42096
42094
|
}
|
|
42097
42095
|
async function persistMobiMemState() {
|
|
42098
42096
|
try {
|
|
42099
|
-
const { isPersistenceEnabled } = await import("./learning-persistence-
|
|
42097
|
+
const { isPersistenceEnabled } = await import("./learning-persistence-FILWP3IR.js");
|
|
42100
42098
|
if (!isPersistenceEnabled()) return;
|
|
42101
42099
|
const { nexusDataPath: nexusDataPath2 } = await import("./nexus-data-dir-M6DYKIHJ.js");
|
|
42102
|
-
const { createMobiMem } = await import("./mobimem-
|
|
42100
|
+
const { createMobiMem } = await import("./mobimem-NO7I2Y4O.js");
|
|
42103
42101
|
const mobimem = createMobiMem();
|
|
42104
42102
|
const savePath = nexusDataPath2("memory", "mobimem-state.json");
|
|
42105
42103
|
await mobimem.save(savePath);
|
|
@@ -42116,7 +42114,7 @@ function recordRoutingExperience(category, success, durationMs) {
|
|
|
42116
42114
|
callRecord(routingMemoryCache);
|
|
42117
42115
|
return;
|
|
42118
42116
|
}
|
|
42119
|
-
void import("./routing-memory-
|
|
42117
|
+
void import("./routing-memory-SALB3DZI.js").then(({ createRoutingMemory }) => {
|
|
42120
42118
|
routingMemoryCache = createRoutingMemory();
|
|
42121
42119
|
callRecord(routingMemoryCache);
|
|
42122
42120
|
}).catch((error) => {
|
|
@@ -42145,7 +42143,7 @@ ${text}` : "";
|
|
|
42145
42143
|
}
|
|
42146
42144
|
async function getWeatherContext() {
|
|
42147
42145
|
try {
|
|
42148
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
42146
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-SBJRXFTW.js");
|
|
42149
42147
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
42150
42148
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
42151
42149
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -42162,9 +42160,9 @@ ${lines}
|
|
|
42162
42160
|
}
|
|
42163
42161
|
async function getMemoryContext(task) {
|
|
42164
42162
|
try {
|
|
42165
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
42166
|
-
const {
|
|
42167
|
-
const memory = createSessionMemory2(
|
|
42163
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-IOXXN6XA.js");
|
|
42164
|
+
const { getLearningDir } = await import("./learning-persistence-FILWP3IR.js");
|
|
42165
|
+
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
42168
42166
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
42169
42167
|
if (learnings.length === 0) return "";
|
|
42170
42168
|
const lines = learnings.slice(0, 8).map((l) => `- ${l.pattern}`).join("\n");
|
|
@@ -42255,7 +42253,7 @@ ${contextBlock}`;
|
|
|
42255
42253
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
42256
42254
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
42257
42255
|
try {
|
|
42258
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
42256
|
+
const { executeVoting } = await import("./consensus-vote-6FKSINXV.js");
|
|
42259
42257
|
const votingResult = await executeVoting(
|
|
42260
42258
|
{
|
|
42261
42259
|
proposal: plan.slice(0, 4e3),
|
|
@@ -42415,7 +42413,7 @@ function extractIssues(text) {
|
|
|
42415
42413
|
|
|
42416
42414
|
// src/pipeline/pipeline-checkpoint.ts
|
|
42417
42415
|
import * as fs10 from "fs";
|
|
42418
|
-
import * as
|
|
42416
|
+
import * as path9 from "path";
|
|
42419
42417
|
var logger38 = createLogger({ component: "pipeline-checkpoint" });
|
|
42420
42418
|
var SESSION_ID_REGEX = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
42421
42419
|
function validateSessionId(sessionId) {
|
|
@@ -42427,7 +42425,7 @@ function getCheckpointPath(sessionId, customDir) {
|
|
|
42427
42425
|
logger38.warn("Checkpoint directory unavailable", { error: dirResult.error.message });
|
|
42428
42426
|
return null;
|
|
42429
42427
|
}
|
|
42430
|
-
return
|
|
42428
|
+
return path9.join(dirResult.value, `pipeline-${sessionId}.jsonl`);
|
|
42431
42429
|
}
|
|
42432
42430
|
function saveStageCheckpoint(sessionId, stage, data, customDir) {
|
|
42433
42431
|
if (!validateSessionId(sessionId)) {
|
|
@@ -43100,11 +43098,11 @@ async function extractSymbolsForTask(task) {
|
|
|
43100
43098
|
const fileRefs = task.match(/(?:src|lib|packages)\/[^\s,)]+\.ts/g);
|
|
43101
43099
|
if (fileRefs === null || fileRefs.length === 0) return null;
|
|
43102
43100
|
const { extractSymbols: extractSymbols2 } = await import("./symbol-extractor-UEBANFSN.js");
|
|
43103
|
-
const
|
|
43101
|
+
const path19 = await import("path");
|
|
43104
43102
|
const summaries = [];
|
|
43105
43103
|
for (const ref of fileRefs.slice(0, 3)) {
|
|
43106
43104
|
try {
|
|
43107
|
-
const resolved =
|
|
43105
|
+
const resolved = path19.resolve(ref);
|
|
43108
43106
|
const result = await extractSymbols2(resolved);
|
|
43109
43107
|
const exported = result.symbols.filter((s) => s.exported);
|
|
43110
43108
|
if (exported.length > 0) {
|
|
@@ -43120,13 +43118,13 @@ async function extractSymbolsForTask(task) {
|
|
|
43120
43118
|
}
|
|
43121
43119
|
async function retrieveAdaptiveMemory(task) {
|
|
43122
43120
|
try {
|
|
43123
|
-
const { AdaptiveMemoryBackend } = await import("./adaptive-memory-
|
|
43124
|
-
const
|
|
43121
|
+
const { AdaptiveMemoryBackend } = await import("./adaptive-memory-2UIPH67R.js");
|
|
43122
|
+
const path19 = await import("path");
|
|
43125
43123
|
const { nexusDataPath: nexusDataPath2 } = await import("./nexus-data-dir-M6DYKIHJ.js");
|
|
43126
43124
|
const baseDir = nexusDataPath2("memory");
|
|
43127
43125
|
const memory = new AdaptiveMemoryBackend({
|
|
43128
|
-
dbPath:
|
|
43129
|
-
markdownDir:
|
|
43126
|
+
dbPath: path19.join(baseDir, "adaptive.db"),
|
|
43127
|
+
markdownDir: path19.join(baseDir, "adaptive-md")
|
|
43130
43128
|
});
|
|
43131
43129
|
const key = task.slice(0, 50).replace(/\s+/g, "-").toLowerCase();
|
|
43132
43130
|
const result = await memory.retrieve(key);
|
|
@@ -43139,7 +43137,7 @@ async function retrieveAdaptiveMemory(task) {
|
|
|
43139
43137
|
}
|
|
43140
43138
|
async function queryResearchRegistry(task) {
|
|
43141
43139
|
try {
|
|
43142
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
43140
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-SH34FJIE.js");
|
|
43143
43141
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
43144
43142
|
if (topic === void 0) return null;
|
|
43145
43143
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -43224,7 +43222,7 @@ function createScanStageWrapper() {
|
|
|
43224
43222
|
try {
|
|
43225
43223
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
43226
43224
|
if (slug !== void 0) {
|
|
43227
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
43225
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-BZ3WOIEZ.js");
|
|
43228
43226
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
43229
43227
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
43230
43228
|
ctx.sharedMemory.write("scan", "decision", { recommendations: recs });
|
|
@@ -43575,7 +43573,7 @@ function registerQueryTaskStateTool(server, deps) {
|
|
|
43575
43573
|
|
|
43576
43574
|
// src/mcp/tools/verify-audit-chain-tool.ts
|
|
43577
43575
|
import * as fs11 from "fs/promises";
|
|
43578
|
-
import * as
|
|
43576
|
+
import * as path10 from "path";
|
|
43579
43577
|
import { z as z92 } from "zod";
|
|
43580
43578
|
var VerifyAuditChainInputSchema = z92.object({
|
|
43581
43579
|
logDir: z92.string().min(1).max(512).describe(
|
|
@@ -43587,7 +43585,7 @@ async function loadAuditEvents(dir, logger56) {
|
|
|
43587
43585
|
const auditFiles = entries.filter((name) => name.startsWith("audit-") && name.endsWith(".jsonl")).sort();
|
|
43588
43586
|
const events = [];
|
|
43589
43587
|
for (const filename of auditFiles) {
|
|
43590
|
-
const fullPath =
|
|
43588
|
+
const fullPath = path10.join(dir, filename);
|
|
43591
43589
|
let content;
|
|
43592
43590
|
try {
|
|
43593
43591
|
content = await fs11.readFile(fullPath, "utf-8");
|
|
@@ -43622,7 +43620,7 @@ async function handler2(args, ctx) {
|
|
|
43622
43620
|
if (!parsed.success) {
|
|
43623
43621
|
return toolError(`Validation error: ${formatZodError(parsed.error)}`);
|
|
43624
43622
|
}
|
|
43625
|
-
const resolvedDir =
|
|
43623
|
+
const resolvedDir = path10.resolve(parsed.data.logDir);
|
|
43626
43624
|
let dirStats;
|
|
43627
43625
|
try {
|
|
43628
43626
|
dirStats = await fs11.stat(resolvedDir);
|
|
@@ -43672,7 +43670,7 @@ function registerVerifyAuditChainTool(server, deps) {
|
|
|
43672
43670
|
// src/mcp/tools/pipeline-tool.ts
|
|
43673
43671
|
import { z as z93 } from "zod";
|
|
43674
43672
|
import * as fs12 from "fs";
|
|
43675
|
-
import * as
|
|
43673
|
+
import * as path11 from "path";
|
|
43676
43674
|
var PipelineInputSchema = z93.object({
|
|
43677
43675
|
/** The task to execute. */
|
|
43678
43676
|
task: z93.string().min(5).max(1e4).describe("Task description \u2014 pipeline template auto-selected based on content"),
|
|
@@ -43697,8 +43695,8 @@ var PipelineInputSchema = z93.object({
|
|
|
43697
43695
|
timeoutMs: z93.number().int().min(3e4).max(6e5).optional().describe("Max time per stage in ms (30000-600000). Default: varies by stage complexity"),
|
|
43698
43696
|
/** Stop after planning/voting (no implementation). */
|
|
43699
43697
|
dryRun: z93.boolean().default(false).describe("Stop after vote stage (no implementation)"),
|
|
43700
|
-
/**
|
|
43701
|
-
simulateVotes: z93.boolean().default(false).describe("
|
|
43698
|
+
/** TESTS ONLY — random output, must not be used for real decisions. (#2319) */
|
|
43699
|
+
simulateVotes: z93.boolean().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)")
|
|
43702
43700
|
});
|
|
43703
43701
|
function buildOutput2(result) {
|
|
43704
43702
|
return {
|
|
@@ -43715,8 +43713,8 @@ function buildOutput2(result) {
|
|
|
43715
43713
|
}
|
|
43716
43714
|
function resolveTask(task, specFile) {
|
|
43717
43715
|
if (specFile === void 0) return task;
|
|
43718
|
-
const resolved =
|
|
43719
|
-
const cwdRoot =
|
|
43716
|
+
const resolved = path11.resolve(specFile);
|
|
43717
|
+
const cwdRoot = path11.resolve(".");
|
|
43720
43718
|
if (!resolved.startsWith(cwdRoot)) {
|
|
43721
43719
|
throw new Error(`Path traversal denied: specFile must be within ${cwdRoot}`);
|
|
43722
43720
|
}
|
|
@@ -43743,6 +43741,9 @@ function selectStageRegistry(template, task, agentStages) {
|
|
|
43743
43741
|
function registerPipelineTool(server, _deps) {
|
|
43744
43742
|
server.tool("run_pipeline", PipelineInputSchema.shape, async (args) => {
|
|
43745
43743
|
const input = PipelineInputSchema.parse(args);
|
|
43744
|
+
if (input.simulateVotes) {
|
|
43745
|
+
warnIfSimulatedOutsideTests("run_pipeline", createLogger({ tool: "run_pipeline" }));
|
|
43746
|
+
}
|
|
43746
43747
|
try {
|
|
43747
43748
|
const task = resolveTask(input.task, input.specFile);
|
|
43748
43749
|
const agentStages = createAgentStages({
|
|
@@ -48147,13 +48148,13 @@ function createEmptyContext() {
|
|
|
48147
48148
|
approachHistory: []
|
|
48148
48149
|
};
|
|
48149
48150
|
}
|
|
48150
|
-
function assignRelevance(
|
|
48151
|
+
function assignRelevance(path19, response) {
|
|
48151
48152
|
const lowerResponse = response.toLowerCase();
|
|
48152
|
-
const lowerPath =
|
|
48153
|
+
const lowerPath = path19.toLowerCase();
|
|
48153
48154
|
const idx = lowerResponse.indexOf(lowerPath);
|
|
48154
48155
|
if (idx === -1) return "low";
|
|
48155
48156
|
const surroundStart = Math.max(0, idx - 100);
|
|
48156
|
-
const surroundEnd = Math.min(lowerResponse.length, idx +
|
|
48157
|
+
const surroundEnd = Math.min(lowerResponse.length, idx + path19.length + 100);
|
|
48157
48158
|
const surrounding = lowerResponse.slice(surroundStart, surroundEnd);
|
|
48158
48159
|
if (/(?:root cause|bug|fix|patch|change|modify|edit)/i.test(surrounding)) {
|
|
48159
48160
|
return "high";
|
|
@@ -48297,9 +48298,9 @@ var SAFE_COMMIT_RE = /^[0-9a-f]{7,40}$/i;
|
|
|
48297
48298
|
var SAFE_REPO_RE = /^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+$/;
|
|
48298
48299
|
async function tryExistingClone(repoDir, commit, exec5) {
|
|
48299
48300
|
const fs20 = await import("fs/promises");
|
|
48300
|
-
const
|
|
48301
|
+
const path19 = await import("path");
|
|
48301
48302
|
try {
|
|
48302
|
-
await fs20.access(
|
|
48303
|
+
await fs20.access(path19.join(repoDir, ".git"));
|
|
48303
48304
|
await exec5(`git checkout -- .`, { cwd: repoDir, timeout: GIT_TIMEOUT_MS });
|
|
48304
48305
|
await exec5(`git clean -fd`, { cwd: repoDir, timeout: GIT_TIMEOUT_MS });
|
|
48305
48306
|
try {
|
|
@@ -48318,7 +48319,7 @@ async function tryExistingClone(repoDir, commit, exec5) {
|
|
|
48318
48319
|
}
|
|
48319
48320
|
}
|
|
48320
48321
|
async function cloneRepository(repo, commit, workDir) {
|
|
48321
|
-
const
|
|
48322
|
+
const path19 = await import("path");
|
|
48322
48323
|
const fs20 = await import("fs/promises");
|
|
48323
48324
|
const childProcess = await import("child_process");
|
|
48324
48325
|
const { promisify: promisify9 } = await import("util");
|
|
@@ -48329,7 +48330,7 @@ async function cloneRepository(repo, commit, workDir) {
|
|
|
48329
48330
|
if (!SAFE_COMMIT_RE.test(commit)) {
|
|
48330
48331
|
return { ok: false, error: new AgentRunnerError(`Invalid commit hash: ${commit}`) };
|
|
48331
48332
|
}
|
|
48332
|
-
const repoDir =
|
|
48333
|
+
const repoDir = path19.join(workDir, repo.replaceAll("/", "__"));
|
|
48333
48334
|
try {
|
|
48334
48335
|
await fs20.mkdir(workDir, { recursive: true });
|
|
48335
48336
|
const cloned = await tryExistingClone(repoDir, commit, exec5);
|
|
@@ -48348,8 +48349,8 @@ async function applyPatch(repoDir, patch) {
|
|
|
48348
48349
|
const { promisify: promisify9 } = await import("util");
|
|
48349
48350
|
const exec5 = promisify9(childProcess.exec);
|
|
48350
48351
|
const fs20 = await import("fs/promises");
|
|
48351
|
-
const
|
|
48352
|
-
const patchFile =
|
|
48352
|
+
const path19 = await import("path");
|
|
48353
|
+
const patchFile = path19.join(repoDir, ".agent_patch.diff");
|
|
48353
48354
|
try {
|
|
48354
48355
|
await fs20.writeFile(patchFile, patch);
|
|
48355
48356
|
await exec5(`git apply --whitespace=fix ${patchFile}`, {
|
|
@@ -49487,7 +49488,7 @@ function transformHarnessOutput(raw) {
|
|
|
49487
49488
|
// src/swe-bench/harness-file-operations.ts
|
|
49488
49489
|
import { spawn } from "child_process";
|
|
49489
49490
|
import * as fs14 from "fs/promises";
|
|
49490
|
-
import * as
|
|
49491
|
+
import * as path12 from "path";
|
|
49491
49492
|
var capitalizeFirst = capitalize;
|
|
49492
49493
|
function buildHarnessArgs(config) {
|
|
49493
49494
|
const args = [
|
|
@@ -49584,7 +49585,7 @@ function createInitialProgress(totalCount) {
|
|
|
49584
49585
|
};
|
|
49585
49586
|
}
|
|
49586
49587
|
function getResultsFilePath(config) {
|
|
49587
|
-
return
|
|
49588
|
+
return path12.join(config.outputDir, config.runId, "results.json");
|
|
49588
49589
|
}
|
|
49589
49590
|
|
|
49590
49591
|
// src/swe-bench/harness-process-runner.ts
|
|
@@ -50141,7 +50142,7 @@ function formatValidationResult(result) {
|
|
|
50141
50142
|
}
|
|
50142
50143
|
|
|
50143
50144
|
// src/swe-bench/evaluation-harness-helpers.ts
|
|
50144
|
-
import * as
|
|
50145
|
+
import * as os from "os";
|
|
50145
50146
|
function calculateMetrics(results) {
|
|
50146
50147
|
const totalInstances = results.length;
|
|
50147
50148
|
const predictedInstances = totalInstances;
|
|
@@ -50233,12 +50234,12 @@ function createProgressAdapter(totalPredictions, onProgress) {
|
|
|
50233
50234
|
}
|
|
50234
50235
|
function getMemoryInfo() {
|
|
50235
50236
|
return {
|
|
50236
|
-
total:
|
|
50237
|
-
free:
|
|
50237
|
+
total: os.totalmem(),
|
|
50238
|
+
free: os.freemem()
|
|
50238
50239
|
};
|
|
50239
50240
|
}
|
|
50240
50241
|
function getCpuCores() {
|
|
50241
|
-
return
|
|
50242
|
+
return os.cpus().length;
|
|
50242
50243
|
}
|
|
50243
50244
|
|
|
50244
50245
|
// src/swe-bench/evaluation-harness.ts
|
|
@@ -51322,11 +51323,11 @@ function parsePatch(patch) {
|
|
|
51322
51323
|
import { execFile as execFile5 } from "child_process";
|
|
51323
51324
|
import { promisify as promisify7 } from "util";
|
|
51324
51325
|
import * as fs15 from "fs/promises";
|
|
51325
|
-
import * as
|
|
51326
|
+
import * as path13 from "path";
|
|
51326
51327
|
var execFileAsync5 = promisify7(execFile5);
|
|
51327
51328
|
var MAX_OUTPUT_BUFFER = 5 * 1024 * 1024;
|
|
51328
51329
|
async function writeTempPatch(patch, workDir) {
|
|
51329
|
-
const tempPath =
|
|
51330
|
+
const tempPath = path13.join(workDir, `.patch-${String(getTimeProvider().now())}.patch`);
|
|
51330
51331
|
await fs15.writeFile(tempPath, patch, "utf-8");
|
|
51331
51332
|
return tempPath;
|
|
51332
51333
|
}
|
|
@@ -51577,9 +51578,9 @@ var TestRunnerError = class extends Error {
|
|
|
51577
51578
|
|
|
51578
51579
|
// src/swe-bench/test-runner-parser.ts
|
|
51579
51580
|
import * as fs16 from "fs/promises";
|
|
51580
|
-
import * as
|
|
51581
|
+
import * as path14 from "path";
|
|
51581
51582
|
async function readJsonResults(workDir) {
|
|
51582
|
-
const jsonPath =
|
|
51583
|
+
const jsonPath = path14.join(workDir, "test-results.json");
|
|
51583
51584
|
try {
|
|
51584
51585
|
const content = await fs16.readFile(jsonPath, "utf-8");
|
|
51585
51586
|
return JSON.parse(content);
|
|
@@ -51774,7 +51775,7 @@ ${getStderr()}`.trim();
|
|
|
51774
51775
|
import { exec as exec3 } from "child_process";
|
|
51775
51776
|
import { promisify as promisify8 } from "util";
|
|
51776
51777
|
import * as fs17 from "fs/promises";
|
|
51777
|
-
import * as
|
|
51778
|
+
import * as path15 from "path";
|
|
51778
51779
|
var execAsync3 = promisify8(exec3);
|
|
51779
51780
|
var FRAMEWORK_CONFIG_FILES = {
|
|
51780
51781
|
pytest: ["pytest.ini", "pyproject.toml", "setup.cfg", "conftest.py", "tox.ini"],
|
|
@@ -51880,7 +51881,7 @@ var TestRunner = class {
|
|
|
51880
51881
|
async findConfigFiles(workDir, configFiles) {
|
|
51881
51882
|
const found = [];
|
|
51882
51883
|
for (const file of configFiles) {
|
|
51883
|
-
const filePath =
|
|
51884
|
+
const filePath = path15.join(workDir, file);
|
|
51884
51885
|
try {
|
|
51885
51886
|
await fs17.access(filePath);
|
|
51886
51887
|
found.push(file);
|
|
@@ -52033,7 +52034,7 @@ async function detectTestFramework(workDir) {
|
|
|
52033
52034
|
|
|
52034
52035
|
// src/swe-bench/report-generator.ts
|
|
52035
52036
|
import * as fs18 from "fs/promises";
|
|
52036
|
-
import * as
|
|
52037
|
+
import * as path16 from "path";
|
|
52037
52038
|
|
|
52038
52039
|
// src/swe-bench/report-renderer.ts
|
|
52039
52040
|
function renderReport(report, format) {
|
|
@@ -52389,7 +52390,7 @@ var ReportGenerator = class {
|
|
|
52389
52390
|
async save(report, config) {
|
|
52390
52391
|
this.logger.info("Saving report", { outputPath: config.outputPath });
|
|
52391
52392
|
const content = await this.render(report, config.format);
|
|
52392
|
-
await fs18.mkdir(
|
|
52393
|
+
await fs18.mkdir(path16.dirname(config.outputPath), { recursive: true });
|
|
52393
52394
|
await fs18.writeFile(config.outputPath, content, "utf-8");
|
|
52394
52395
|
this.logger.info("Report saved", { path: config.outputPath, format: config.format });
|
|
52395
52396
|
}
|
|
@@ -52609,14 +52610,14 @@ async function exportReport(result, outputPath, config) {
|
|
|
52609
52610
|
|
|
52610
52611
|
// src/swe-bench/trace-logger.ts
|
|
52611
52612
|
import { appendFile, writeFile as writeFile6 } from "fs/promises";
|
|
52612
|
-
import * as
|
|
52613
|
+
import * as path17 from "path";
|
|
52613
52614
|
function deriveTracePath(outputPath) {
|
|
52614
|
-
const ext =
|
|
52615
|
+
const ext = path17.extname(outputPath);
|
|
52615
52616
|
const base = outputPath.slice(0, outputPath.length - ext.length);
|
|
52616
52617
|
return `${base}-trace.jsonl`;
|
|
52617
52618
|
}
|
|
52618
52619
|
function deriveStatusPath(outputPath) {
|
|
52619
|
-
const ext =
|
|
52620
|
+
const ext = path17.extname(outputPath);
|
|
52620
52621
|
const base = outputPath.slice(0, outputPath.length - ext.length);
|
|
52621
52622
|
return `${base}-status.json`;
|
|
52622
52623
|
}
|
|
@@ -52822,7 +52823,7 @@ function getStdinLifecycleMonitor() {
|
|
|
52822
52823
|
|
|
52823
52824
|
// src/pipeline/task-tracker.ts
|
|
52824
52825
|
import * as fs19 from "fs";
|
|
52825
|
-
import * as
|
|
52826
|
+
import * as path18 from "path";
|
|
52826
52827
|
var logger55 = createLogger({ component: "task-tracker" });
|
|
52827
52828
|
async function exec4(cmd, args, timeout = 15e3) {
|
|
52828
52829
|
const { execFile: execFile6 } = await import("child_process");
|
|
@@ -52838,7 +52839,7 @@ var GitHubTaskTracker = class {
|
|
|
52838
52839
|
cachedProvider = null;
|
|
52839
52840
|
async getProvider() {
|
|
52840
52841
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
52841
|
-
const { createScmProvider } = await import("./factory-
|
|
52842
|
+
const { createScmProvider } = await import("./factory-7DJA2CIL.js");
|
|
52842
52843
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
52843
52844
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
52844
52845
|
this.cachedProvider = result.value;
|
|
@@ -52900,8 +52901,8 @@ var JsonTaskTracker = class {
|
|
|
52900
52901
|
outputPath;
|
|
52901
52902
|
constructor(config) {
|
|
52902
52903
|
const dir = config.outputDir ?? ".nexus-pipeline";
|
|
52903
|
-
this.outputPath =
|
|
52904
|
-
fs19.mkdirSync(
|
|
52904
|
+
this.outputPath = path18.resolve(dir, "tasks.json");
|
|
52905
|
+
fs19.mkdirSync(path18.dirname(this.outputPath), { recursive: true });
|
|
52905
52906
|
}
|
|
52906
52907
|
async createTask(title, body) {
|
|
52907
52908
|
const id = String(this.nextId++);
|
|
@@ -53661,4 +53662,4 @@ export {
|
|
|
53661
53662
|
detectBackend,
|
|
53662
53663
|
createTaskTracker
|
|
53663
53664
|
};
|
|
53664
|
-
//# sourceMappingURL=chunk-
|
|
53665
|
+
//# sourceMappingURL=chunk-EB7LP5WD.js.map
|