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