nexus-agents 2.134.0 → 2.135.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{child-mcp-config-TWHH63UK.js → child-mcp-config-RIEZRHWO.js} +2 -2
- package/dist/{chunk-6LMZ7HFU.js → chunk-2QTDOKWV.js} +2 -2
- package/dist/{chunk-CLRSNWRQ.js → chunk-3IT473PY.js} +4 -4
- package/dist/{chunk-FUJ3XR7T.js → chunk-4L4VXVKC.js} +4 -4
- package/dist/{chunk-ZMDOGN33.js → chunk-4NANSSKX.js} +2 -2
- package/dist/{chunk-FPMQ2JAK.js → chunk-52N3NGEY.js} +2 -2
- package/dist/{chunk-UDB5NHJI.js → chunk-5MWNLEU2.js} +3 -3
- package/dist/{chunk-WFKVUZ3O.js → chunk-BGGX3BXC.js} +2 -2
- package/dist/{chunk-B26FGLIJ.js → chunk-C46YFMFO.js} +2 -2
- package/dist/{chunk-FVSZLVMR.js → chunk-C4GDV57D.js} +3 -3
- package/dist/{chunk-QZUT22LP.js → chunk-C5FWXNAR.js} +5 -5
- package/dist/{chunk-DBDWMHUL.js → chunk-CBJN5MYW.js} +10 -5
- package/dist/chunk-CBJN5MYW.js.map +1 -0
- package/dist/{chunk-COJOUIO2.js → chunk-DXVQ6VFB.js} +2 -2
- package/dist/{chunk-E64SZTEP.js → chunk-FGQL4LZP.js} +3 -3
- package/dist/{chunk-IWQH6TP7.js → chunk-FNYTCR6R.js} +5 -5
- package/dist/{chunk-OU2NQVKD.js → chunk-GM5F2FO5.js} +2 -2
- package/dist/{chunk-PFBV5FCT.js → chunk-HDBV64A3.js} +2 -2
- package/dist/{chunk-F74ZGHAP.js → chunk-HGYJLSLL.js} +2 -2
- package/dist/{chunk-WYJJUF6N.js → chunk-ILH5TZAX.js} +4 -4
- package/dist/{chunk-Z6DXZ6AS.js → chunk-JA3SDBVY.js} +2 -2
- package/dist/{chunk-7GSYICTL.js → chunk-JWWCNN76.js} +7 -7
- package/dist/{chunk-3EYXPV5F.js → chunk-K5O7SSOH.js} +7 -7
- package/dist/{chunk-7TQZR5VU.js → chunk-KAIRRC5R.js} +115 -21
- package/dist/chunk-KAIRRC5R.js.map +1 -0
- package/dist/{chunk-DLUFDKPA.js → chunk-ME4DQ6BI.js} +9 -9
- package/dist/chunk-ME4DQ6BI.js.map +1 -0
- package/dist/{chunk-6UCWR3DS.js → chunk-MREIJMH7.js} +2 -2
- package/dist/{chunk-OCKZ6F5O.js → chunk-OQZQITVU.js} +3 -3
- package/dist/{chunk-76R5ES6Z.js → chunk-PZ3MGLJU.js} +172 -115
- package/dist/chunk-PZ3MGLJU.js.map +1 -0
- package/dist/{chunk-EHLJLIHS.js → chunk-QX2Y5QWO.js} +2 -2
- package/dist/{chunk-FSFF7EFR.js → chunk-SMRXY5ZN.js} +2 -2
- package/dist/{chunk-BTYYZ6VU.js → chunk-T77RGBUF.js} +4 -4
- package/dist/{chunk-MY52DFXC.js → chunk-V6XZFDFR.js} +2 -2
- package/dist/{chunk-ORQAFTAZ.js → chunk-WRP5COST.js} +2 -2
- package/dist/{chunk-VI7LELES.js → chunk-XM3OQXN5.js} +7 -7
- package/dist/{chunk-33MFMXBQ.js → chunk-ZVIBVJBI.js} +4 -4
- package/dist/{cli-circuit-breaker-VXBDCAD7.js → cli-circuit-breaker-QONQNI3B.js} +4 -4
- package/dist/cli.js +40 -40
- package/dist/{composite-router-E6FXXMMR.js → composite-router-DU22RBNQ.js} +2 -2
- package/dist/{consensus-vote-R6X5IL57.js → consensus-vote-ZBSY2SCU.js} +14 -14
- package/dist/{context-retriever-I4NEOUEV.js → context-retriever-BWLNV73G.js} +8 -8
- package/dist/{doctor-deep-CZXN4YD6.js → doctor-deep-JW3Y5ZD2.js} +3 -3
- package/dist/{expert-bridge-GMB5IHHF.js → expert-bridge-4YXDWOMR.js} +4 -4
- package/dist/{factory-WR62MEIJ.js → factory-3HBHEN54.js} +5 -5
- package/dist/factory-7XUQGSHC.js +21 -0
- package/dist/{improvement-review-77BKIQGN.js → improvement-review-GUPEYLGP.js} +6 -4
- package/dist/index.d.ts +20 -13
- package/dist/index.js +29 -29
- package/dist/{init-opencode-4H2VPN23.js → init-opencode-3ETCD3BE.js} +6 -6
- package/dist/{issue-triage-NJB6SL4S.js → issue-triage-7QHWTJRD.js} +5 -5
- package/dist/{pr-reviewer-helpers-F3SHCHNV.js → pr-reviewer-helpers-56FWDR3G.js} +4 -4
- package/dist/{registry-command-VFCSMHME.js → registry-command-PYAMTDT2.js} +2 -2
- package/dist/{repo-security-plan-U2ZIFW53.js → repo-security-plan-WJM2JXPT.js} +3 -3
- package/dist/{research-helpers-synthesize-5TLNHT3I.js → research-helpers-synthesize-K4Z4BYGI.js} +4 -4
- package/dist/{routing-memory-VVLJL3MG.js → routing-memory-K54FC6WD.js} +2 -2
- package/dist/{session-memory-GMQYZLJE.js → session-memory-G5DWGR6S.js} +3 -3
- package/dist/{setup-command-IMAX6EAO.js → setup-command-7IN7ORLV.js} +11 -11
- package/dist/{setup-config-2ZSJ3HNE.js → setup-config-PTRDCT22.js} +3 -3
- package/dist/{setup-custom-api-NJGCRIRO.js → setup-custom-api-2IDPBBER.js} +3 -3
- package/dist/{tool-memory-TSYJXGOV.js → tool-memory-GGQVY2GX.js} +5 -5
- package/dist/{unified-registry-IMAL3SY6.js → unified-registry-3QASCESS.js} +9 -9
- package/dist/{weather-report-OU65NJS3.js → weather-report-RYUENMV5.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-76R5ES6Z.js.map +0 -1
- package/dist/chunk-7TQZR5VU.js.map +0 -1
- package/dist/chunk-DBDWMHUL.js.map +0 -1
- package/dist/chunk-DLUFDKPA.js.map +0 -1
- package/dist/factory-ZBQGA373.js +0 -21
- /package/dist/{child-mcp-config-TWHH63UK.js.map → child-mcp-config-RIEZRHWO.js.map} +0 -0
- /package/dist/{chunk-6LMZ7HFU.js.map → chunk-2QTDOKWV.js.map} +0 -0
- /package/dist/{chunk-CLRSNWRQ.js.map → chunk-3IT473PY.js.map} +0 -0
- /package/dist/{chunk-FUJ3XR7T.js.map → chunk-4L4VXVKC.js.map} +0 -0
- /package/dist/{chunk-ZMDOGN33.js.map → chunk-4NANSSKX.js.map} +0 -0
- /package/dist/{chunk-FPMQ2JAK.js.map → chunk-52N3NGEY.js.map} +0 -0
- /package/dist/{chunk-UDB5NHJI.js.map → chunk-5MWNLEU2.js.map} +0 -0
- /package/dist/{chunk-WFKVUZ3O.js.map → chunk-BGGX3BXC.js.map} +0 -0
- /package/dist/{chunk-B26FGLIJ.js.map → chunk-C46YFMFO.js.map} +0 -0
- /package/dist/{chunk-FVSZLVMR.js.map → chunk-C4GDV57D.js.map} +0 -0
- /package/dist/{chunk-QZUT22LP.js.map → chunk-C5FWXNAR.js.map} +0 -0
- /package/dist/{chunk-COJOUIO2.js.map → chunk-DXVQ6VFB.js.map} +0 -0
- /package/dist/{chunk-E64SZTEP.js.map → chunk-FGQL4LZP.js.map} +0 -0
- /package/dist/{chunk-IWQH6TP7.js.map → chunk-FNYTCR6R.js.map} +0 -0
- /package/dist/{chunk-OU2NQVKD.js.map → chunk-GM5F2FO5.js.map} +0 -0
- /package/dist/{chunk-PFBV5FCT.js.map → chunk-HDBV64A3.js.map} +0 -0
- /package/dist/{chunk-F74ZGHAP.js.map → chunk-HGYJLSLL.js.map} +0 -0
- /package/dist/{chunk-WYJJUF6N.js.map → chunk-ILH5TZAX.js.map} +0 -0
- /package/dist/{chunk-Z6DXZ6AS.js.map → chunk-JA3SDBVY.js.map} +0 -0
- /package/dist/{chunk-7GSYICTL.js.map → chunk-JWWCNN76.js.map} +0 -0
- /package/dist/{chunk-3EYXPV5F.js.map → chunk-K5O7SSOH.js.map} +0 -0
- /package/dist/{chunk-6UCWR3DS.js.map → chunk-MREIJMH7.js.map} +0 -0
- /package/dist/{chunk-OCKZ6F5O.js.map → chunk-OQZQITVU.js.map} +0 -0
- /package/dist/{chunk-EHLJLIHS.js.map → chunk-QX2Y5QWO.js.map} +0 -0
- /package/dist/{chunk-FSFF7EFR.js.map → chunk-SMRXY5ZN.js.map} +0 -0
- /package/dist/{chunk-BTYYZ6VU.js.map → chunk-T77RGBUF.js.map} +0 -0
- /package/dist/{chunk-MY52DFXC.js.map → chunk-V6XZFDFR.js.map} +0 -0
- /package/dist/{chunk-ORQAFTAZ.js.map → chunk-WRP5COST.js.map} +0 -0
- /package/dist/{chunk-VI7LELES.js.map → chunk-XM3OQXN5.js.map} +0 -0
- /package/dist/{chunk-33MFMXBQ.js.map → chunk-ZVIBVJBI.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-VXBDCAD7.js.map → cli-circuit-breaker-QONQNI3B.js.map} +0 -0
- /package/dist/{composite-router-E6FXXMMR.js.map → composite-router-DU22RBNQ.js.map} +0 -0
- /package/dist/{consensus-vote-R6X5IL57.js.map → consensus-vote-ZBSY2SCU.js.map} +0 -0
- /package/dist/{context-retriever-I4NEOUEV.js.map → context-retriever-BWLNV73G.js.map} +0 -0
- /package/dist/{doctor-deep-CZXN4YD6.js.map → doctor-deep-JW3Y5ZD2.js.map} +0 -0
- /package/dist/{expert-bridge-GMB5IHHF.js.map → expert-bridge-4YXDWOMR.js.map} +0 -0
- /package/dist/{factory-WR62MEIJ.js.map → factory-3HBHEN54.js.map} +0 -0
- /package/dist/{factory-ZBQGA373.js.map → factory-7XUQGSHC.js.map} +0 -0
- /package/dist/{improvement-review-77BKIQGN.js.map → improvement-review-GUPEYLGP.js.map} +0 -0
- /package/dist/{init-opencode-4H2VPN23.js.map → init-opencode-3ETCD3BE.js.map} +0 -0
- /package/dist/{issue-triage-NJB6SL4S.js.map → issue-triage-7QHWTJRD.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-F3SHCHNV.js.map → pr-reviewer-helpers-56FWDR3G.js.map} +0 -0
- /package/dist/{registry-command-VFCSMHME.js.map → registry-command-PYAMTDT2.js.map} +0 -0
- /package/dist/{repo-security-plan-U2ZIFW53.js.map → repo-security-plan-WJM2JXPT.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-5TLNHT3I.js.map → research-helpers-synthesize-K4Z4BYGI.js.map} +0 -0
- /package/dist/{routing-memory-VVLJL3MG.js.map → routing-memory-K54FC6WD.js.map} +0 -0
- /package/dist/{session-memory-GMQYZLJE.js.map → session-memory-G5DWGR6S.js.map} +0 -0
- /package/dist/{setup-command-IMAX6EAO.js.map → setup-command-7IN7ORLV.js.map} +0 -0
- /package/dist/{setup-config-2ZSJ3HNE.js.map → setup-config-PTRDCT22.js.map} +0 -0
- /package/dist/{setup-custom-api-NJGCRIRO.js.map → setup-custom-api-2IDPBBER.js.map} +0 -0
- /package/dist/{tool-memory-TSYJXGOV.js.map → tool-memory-GGQVY2GX.js.map} +0 -0
- /package/dist/{unified-registry-IMAL3SY6.js.map → unified-registry-3QASCESS.js.map} +0 -0
- /package/dist/{weather-report-OU65NJS3.js.map → weather-report-RYUENMV5.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSecurityPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JA3SDBVY.js";
|
|
4
4
|
import {
|
|
5
5
|
CodebaseIndex,
|
|
6
6
|
extractSymbolIndex,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-WAYGXUSM.js";
|
|
14
14
|
import {
|
|
15
15
|
executeExpert
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XM3OQXN5.js";
|
|
17
17
|
import {
|
|
18
18
|
JobStatusSchema,
|
|
19
19
|
collectRealVotes,
|
|
@@ -32,24 +32,24 @@ import {
|
|
|
32
32
|
toJobSummary,
|
|
33
33
|
warnIfSimulatedOutsideTests,
|
|
34
34
|
writeJobCancelled
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ME4DQ6BI.js";
|
|
36
36
|
import {
|
|
37
37
|
normalizeTopicToCanonical,
|
|
38
38
|
synthesizeResearch
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5MWNLEU2.js";
|
|
40
40
|
import {
|
|
41
41
|
IssueTriage,
|
|
42
42
|
createAuditTrail,
|
|
43
43
|
createGraphAuditBridge,
|
|
44
44
|
emitPipelinePolicyEvent
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-4L4VXVKC.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveEnvMode,
|
|
48
48
|
sanitizeInput
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-QX2Y5QWO.js";
|
|
50
50
|
import {
|
|
51
51
|
withPrerequisite
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-KAIRRC5R.js";
|
|
53
53
|
import {
|
|
54
54
|
NOOP_NOTIFIER,
|
|
55
55
|
RateLimiter,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
withAccessPolicy,
|
|
72
72
|
withProgressHeartbeat,
|
|
73
73
|
wrapToolWithTimeout
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-MREIJMH7.js";
|
|
75
75
|
import {
|
|
76
76
|
analyzeGitHubRepo
|
|
77
77
|
} from "./chunk-HFOQKCD2.js";
|
|
@@ -102,29 +102,29 @@ import {
|
|
|
102
102
|
parseRegistry,
|
|
103
103
|
sourceExistsInRegistry,
|
|
104
104
|
summarizeContextForPrompt
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-C5FWXNAR.js";
|
|
106
106
|
import {
|
|
107
107
|
getTokenEnvVars,
|
|
108
108
|
resolveToken
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-V6XZFDFR.js";
|
|
110
110
|
import {
|
|
111
111
|
loadPapersRegistry,
|
|
112
112
|
loadTechniquesRegistry
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-C46YFMFO.js";
|
|
114
114
|
import {
|
|
115
115
|
DEFAULT_RELEVANCE_CONFIG,
|
|
116
116
|
MemoryImportance,
|
|
117
117
|
calculateTextJaccardSimilarity,
|
|
118
118
|
getToolMemory
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-ZVIBVJBI.js";
|
|
120
120
|
import {
|
|
121
121
|
createSessionMemory
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-52N3NGEY.js";
|
|
123
123
|
import {
|
|
124
124
|
DEFAULT_TASK_TTL_MS,
|
|
125
125
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
126
126
|
clampTaskTtl
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-JWWCNN76.js";
|
|
128
128
|
import {
|
|
129
129
|
resolveInsideRoot
|
|
130
130
|
} from "./chunk-NUBSJGQZ.js";
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
createEvent,
|
|
147
147
|
getGlobalEventBus,
|
|
148
148
|
getGlobalRegistry
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-ILH5TZAX.js";
|
|
150
150
|
import {
|
|
151
151
|
CliDetectionCache,
|
|
152
152
|
asRecord,
|
|
@@ -154,19 +154,19 @@ import {
|
|
|
154
154
|
getAvailableClis,
|
|
155
155
|
sleep,
|
|
156
156
|
withTimeout
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-K5O7SSOH.js";
|
|
158
158
|
import {
|
|
159
159
|
DEFAULTS
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-4NANSSKX.js";
|
|
161
161
|
import {
|
|
162
162
|
getAvailabilityCache,
|
|
163
163
|
getCliForModelId,
|
|
164
164
|
resolveFallback
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-HDBV64A3.js";
|
|
166
166
|
import {
|
|
167
167
|
generateHyphenId,
|
|
168
168
|
generateUUID
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-WRP5COST.js";
|
|
170
170
|
import {
|
|
171
171
|
AGENT_ROUTER_TIMEOUTS,
|
|
172
172
|
API_TIMEOUTS,
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
selectStrategyByManifest,
|
|
259
259
|
toExpertTaskAnalysisResult,
|
|
260
260
|
withStep
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-CBJN5MYW.js";
|
|
262
262
|
import {
|
|
263
263
|
ensureLearningDir,
|
|
264
264
|
getMetaOutcomesFile,
|
|
@@ -2555,13 +2555,13 @@ function makeCancelError(taskId) {
|
|
|
2555
2555
|
}
|
|
2556
2556
|
function executeWithTimeout(params) {
|
|
2557
2557
|
const { task, maxDurationMs, executeTask, transformError, signal } = params;
|
|
2558
|
-
return new Promise((
|
|
2558
|
+
return new Promise((resolve19) => {
|
|
2559
2559
|
let settled = false;
|
|
2560
2560
|
const settle = (result) => {
|
|
2561
2561
|
if (settled) return;
|
|
2562
2562
|
settled = true;
|
|
2563
2563
|
clearTimeout(timeoutId);
|
|
2564
|
-
|
|
2564
|
+
resolve19(result);
|
|
2565
2565
|
};
|
|
2566
2566
|
const timeoutId = setTimeout(() => {
|
|
2567
2567
|
settle(
|
|
@@ -7971,13 +7971,13 @@ var WaveScheduler = class {
|
|
|
7971
7971
|
}
|
|
7972
7972
|
async withTimeout(promise, timeoutMs, taskId) {
|
|
7973
7973
|
if (timeoutMs <= 0) return promise;
|
|
7974
|
-
return new Promise((
|
|
7974
|
+
return new Promise((resolve19, reject) => {
|
|
7975
7975
|
const timer = setTimeout(() => {
|
|
7976
7976
|
reject(new Error(`Task ${taskId} timed out after ${String(timeoutMs)}ms`));
|
|
7977
7977
|
}, timeoutMs);
|
|
7978
7978
|
promise.then((result) => {
|
|
7979
7979
|
clearTimeout(timer);
|
|
7980
|
-
|
|
7980
|
+
resolve19(result);
|
|
7981
7981
|
}).catch((error) => {
|
|
7982
7982
|
clearTimeout(timer);
|
|
7983
7983
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
@@ -14911,8 +14911,8 @@ var Semaphore = class {
|
|
|
14911
14911
|
this.available -= 1;
|
|
14912
14912
|
return Promise.resolve();
|
|
14913
14913
|
}
|
|
14914
|
-
return new Promise((
|
|
14915
|
-
this.waiters.push(
|
|
14914
|
+
return new Promise((resolve19) => {
|
|
14915
|
+
this.waiters.push(resolve19);
|
|
14916
14916
|
});
|
|
14917
14917
|
}
|
|
14918
14918
|
release() {
|
|
@@ -18345,9 +18345,9 @@ var ExpertPool = class {
|
|
|
18345
18345
|
if (this.active < this.capacity) {
|
|
18346
18346
|
return this.issuePermit();
|
|
18347
18347
|
}
|
|
18348
|
-
return new Promise((
|
|
18348
|
+
return new Promise((resolve19, reject) => {
|
|
18349
18349
|
const timer = setTimeout(() => {
|
|
18350
|
-
const idx = this.queue.findIndex((e) => e.resolve ===
|
|
18350
|
+
const idx = this.queue.findIndex((e) => e.resolve === resolve19);
|
|
18351
18351
|
if (idx !== -1) {
|
|
18352
18352
|
this.queue.splice(idx, 1);
|
|
18353
18353
|
}
|
|
@@ -18357,7 +18357,7 @@ var ExpertPool = class {
|
|
|
18357
18357
|
)
|
|
18358
18358
|
);
|
|
18359
18359
|
}, this.acquireTimeoutMs);
|
|
18360
|
-
this.queue.push({ resolve:
|
|
18360
|
+
this.queue.push({ resolve: resolve19, reject, timer });
|
|
18361
18361
|
});
|
|
18362
18362
|
}
|
|
18363
18363
|
/** Release a permit back to the pool. */
|
|
@@ -18941,8 +18941,8 @@ var TaskQueue = class {
|
|
|
18941
18941
|
if (this.cancelled) {
|
|
18942
18942
|
return Promise.reject(new Error("Queue has been cancelled"));
|
|
18943
18943
|
}
|
|
18944
|
-
return new Promise((
|
|
18945
|
-
this.queue.push({ task, resolve:
|
|
18944
|
+
return new Promise((resolve19, reject) => {
|
|
18945
|
+
this.queue.push({ task, resolve: resolve19, reject });
|
|
18946
18946
|
this.processNext();
|
|
18947
18947
|
});
|
|
18948
18948
|
}
|
|
@@ -19218,16 +19218,16 @@ async function executeStepWithTimeout(step, context, stepExecutor, signal) {
|
|
|
19218
19218
|
return executeWithTimeout2(step, stepContext, stepExecutor, stepTimeout, startTime);
|
|
19219
19219
|
}
|
|
19220
19220
|
function executeWithTimeout2(step, context, executor, timeout, startTime) {
|
|
19221
|
-
return new Promise((
|
|
19221
|
+
return new Promise((resolve19) => {
|
|
19222
19222
|
const timeoutId = setTimeout(() => {
|
|
19223
|
-
|
|
19223
|
+
resolve19(createTimeoutResult(step.id, getTimeProvider().now() - startTime, timeout));
|
|
19224
19224
|
}, timeout);
|
|
19225
19225
|
executor(step, context).then((result) => {
|
|
19226
19226
|
clearTimeout(timeoutId);
|
|
19227
|
-
|
|
19227
|
+
resolve19(result);
|
|
19228
19228
|
}).catch((error) => {
|
|
19229
19229
|
clearTimeout(timeoutId);
|
|
19230
|
-
|
|
19230
|
+
resolve19(createErrorResult(step.id, getTimeProvider().now() - startTime, error));
|
|
19231
19231
|
});
|
|
19232
19232
|
});
|
|
19233
19233
|
}
|
|
@@ -23634,10 +23634,10 @@ function calculateZStatistic(params) {
|
|
|
23634
23634
|
function calculateDifferenceCI(p1, p2, total1, total2, confidence) {
|
|
23635
23635
|
const difference = p1 - p2;
|
|
23636
23636
|
const seDiff = Math.sqrt(p1 * (1 - p1) / (total1 || 1) + p2 * (1 - p2) / (total2 || 1));
|
|
23637
|
-
const
|
|
23637
|
+
const z116 = getZScore(confidence);
|
|
23638
23638
|
return {
|
|
23639
|
-
lower: difference -
|
|
23640
|
-
upper: difference +
|
|
23639
|
+
lower: difference - z116 * seDiff,
|
|
23640
|
+
upper: difference + z116 * seDiff,
|
|
23641
23641
|
estimate: difference,
|
|
23642
23642
|
confidence,
|
|
23643
23643
|
n: total1 + total2,
|
|
@@ -23660,11 +23660,11 @@ function proportionConfidenceInterval(successes, total, options = {}) {
|
|
|
23660
23660
|
standardError: 0
|
|
23661
23661
|
};
|
|
23662
23662
|
}
|
|
23663
|
-
const
|
|
23664
|
-
const z210 =
|
|
23663
|
+
const z116 = getZScore(opts.confidence);
|
|
23664
|
+
const z210 = z116 * z116;
|
|
23665
23665
|
const denominator = 1 + z210 / n;
|
|
23666
23666
|
const center = (p + z210 / (2 * n)) / denominator;
|
|
23667
|
-
const margin =
|
|
23667
|
+
const margin = z116 / denominator * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
|
|
23668
23668
|
const lower = Math.max(0, center - margin);
|
|
23669
23669
|
const upper = Math.min(1, center + margin);
|
|
23670
23670
|
const standardError = Math.sqrt(p * (1 - p) / n);
|
|
@@ -23694,8 +23694,8 @@ function meanConfidenceInterval(values, options = {}) {
|
|
|
23694
23694
|
const variance = values.reduce((sum, v) => sum + (v - mean) ** 2, 0) / (n - 1 || 1);
|
|
23695
23695
|
const stdDev = Math.sqrt(variance);
|
|
23696
23696
|
const standardError = stdDev / Math.sqrt(n);
|
|
23697
|
-
const
|
|
23698
|
-
const margin =
|
|
23697
|
+
const z116 = getZScore(opts.confidence);
|
|
23698
|
+
const margin = z116 * standardError;
|
|
23699
23699
|
return {
|
|
23700
23700
|
lower: mean - margin,
|
|
23701
23701
|
upper: mean + margin,
|
|
@@ -25144,20 +25144,22 @@ function recordExpertError(role, errorMessage2) {
|
|
|
25144
25144
|
}
|
|
25145
25145
|
|
|
25146
25146
|
// src/mcp/tools/create-expert.ts
|
|
25147
|
+
var CREATE_EXPERT_ROLES = [
|
|
25148
|
+
"code_expert",
|
|
25149
|
+
"architecture_expert",
|
|
25150
|
+
"security_expert",
|
|
25151
|
+
"documentation_expert",
|
|
25152
|
+
"testing_expert",
|
|
25153
|
+
"devops_expert",
|
|
25154
|
+
"research_expert",
|
|
25155
|
+
"pm_expert",
|
|
25156
|
+
"ux_expert",
|
|
25157
|
+
"infrastructure_expert",
|
|
25158
|
+
"qa_expert",
|
|
25159
|
+
"data_visualization_expert"
|
|
25160
|
+
];
|
|
25147
25161
|
var CreateExpertInputSchema = z43.object({
|
|
25148
|
-
role: z43.enum(
|
|
25149
|
-
"code_expert",
|
|
25150
|
-
"architecture_expert",
|
|
25151
|
-
"security_expert",
|
|
25152
|
-
"documentation_expert",
|
|
25153
|
-
"testing_expert",
|
|
25154
|
-
"devops_expert",
|
|
25155
|
-
"research_expert",
|
|
25156
|
-
"pm_expert",
|
|
25157
|
-
"ux_expert",
|
|
25158
|
-
"infrastructure_expert",
|
|
25159
|
-
"data_visualization_expert"
|
|
25160
|
-
]).describe("Expert role to create"),
|
|
25162
|
+
role: z43.enum(CREATE_EXPERT_ROLES).describe("Expert role to create"),
|
|
25161
25163
|
modelPreference: z43.string().max(100).optional().describe("Preferred model (e.g., claude-sonnet-4)")
|
|
25162
25164
|
});
|
|
25163
25165
|
var MAX_EXPERTS = 100;
|
|
@@ -25268,21 +25270,12 @@ function createCreateExpertHandler(deps) {
|
|
|
25268
25270
|
function registerCreateExpertTool(server, deps) {
|
|
25269
25271
|
const logger57 = deps.logger ?? createLogger({ tool: "create_expert" });
|
|
25270
25272
|
const toolSchema = {
|
|
25271
|
-
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
"security_expert",
|
|
25275
|
-
"documentation_expert",
|
|
25276
|
-
"testing_expert",
|
|
25277
|
-
"devops_expert",
|
|
25278
|
-
"research_expert",
|
|
25279
|
-
"pm_expert",
|
|
25280
|
-
"ux_expert",
|
|
25281
|
-
"infrastructure_expert"
|
|
25282
|
-
]).describe("Expert role to create"),
|
|
25273
|
+
// Derived from the single-source CREATE_EXPERT_ROLES so the registered enum
|
|
25274
|
+
// can never drift from the exported CreateExpertInputSchema (#3978).
|
|
25275
|
+
role: z43.enum(CREATE_EXPERT_ROLES).describe("Expert role to create"),
|
|
25283
25276
|
modelPreference: z43.string().max(100).optional().describe("Preferred model (e.g., claude-sonnet-4)")
|
|
25284
25277
|
};
|
|
25285
|
-
const description = "Create a specialized expert agent for code, architecture, security, documentation, testing, devops, research, product management, UX, or
|
|
25278
|
+
const description = "Create a specialized expert agent for code, architecture, security, documentation, testing, devops, research, product management, UX, infrastructure, quality assurance (QA), or data visualization tasks";
|
|
25286
25279
|
const secureHandler = createSecureHandler(createCreateExpertHandler(deps), {
|
|
25287
25280
|
toolName: "create_expert",
|
|
25288
25281
|
rateLimiter: deps.rateLimiter,
|
|
@@ -25886,7 +25879,7 @@ function registerRunWorkflowTool(server, deps) {
|
|
|
25886
25879
|
server.registerTool(
|
|
25887
25880
|
"run_workflow",
|
|
25888
25881
|
{
|
|
25889
|
-
description: "Run a LINEAR (single-path) workflow template by name with typed inputs. For DAG-shaped workflows with branching, checkpoints, or rollback, use `run_graph_workflow` instead.",
|
|
25882
|
+
description: "Run a LINEAR (single-path) workflow template by name with typed inputs. For DAG-shaped workflows with branching, checkpoints, or rollback, use `run_graph_workflow` instead. Supports mode: 'async' (non-dryRun runs) \u2014 returns a jobId immediately; poll get_job_result.",
|
|
25890
25883
|
inputSchema: toolInputSchema,
|
|
25891
25884
|
annotations: getToolAnnotations("run_workflow")
|
|
25892
25885
|
},
|
|
@@ -26297,7 +26290,7 @@ function execIdFields(executionId) {
|
|
|
26297
26290
|
async function populateUnifiedContextOnState(state, options) {
|
|
26298
26291
|
const taskCandidate = state["task"];
|
|
26299
26292
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
26300
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
26293
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-BWLNV73G.js");
|
|
26301
26294
|
const category = inferTaskCategory2(taskCandidate);
|
|
26302
26295
|
const executionId = options?.executionId;
|
|
26303
26296
|
const execFields = execIdFields(executionId);
|
|
@@ -26794,13 +26787,13 @@ function dedupe(ids) {
|
|
|
26794
26787
|
return [...new Set(ids)];
|
|
26795
26788
|
}
|
|
26796
26789
|
async function withTimeout2(promise, ms) {
|
|
26797
|
-
return new Promise((
|
|
26790
|
+
return new Promise((resolve19, reject) => {
|
|
26798
26791
|
const timer = setTimeout(() => {
|
|
26799
26792
|
reject(new Error(`Node timed out after ${String(ms)}ms`));
|
|
26800
26793
|
}, ms);
|
|
26801
26794
|
promise.then((result) => {
|
|
26802
26795
|
clearTimeout(timer);
|
|
26803
|
-
|
|
26796
|
+
resolve19(result);
|
|
26804
26797
|
}).catch((error) => {
|
|
26805
26798
|
clearTimeout(timer);
|
|
26806
26799
|
reject(error instanceof Error ? error : new Error(String(error)));
|
|
@@ -29218,11 +29211,11 @@ function createMockOrchestrator() {
|
|
|
29218
29211
|
async function raceAgainstDeadline(promise, deadlineMs, onTimeout) {
|
|
29219
29212
|
const startedAt = Date.now();
|
|
29220
29213
|
let timer;
|
|
29221
|
-
const timeoutP = new Promise((
|
|
29214
|
+
const timeoutP = new Promise((resolve19, reject) => {
|
|
29222
29215
|
timer = setTimeout(
|
|
29223
29216
|
() => {
|
|
29224
29217
|
try {
|
|
29225
|
-
|
|
29218
|
+
resolve19(onTimeout(Date.now() - startedAt));
|
|
29226
29219
|
} catch (err2) {
|
|
29227
29220
|
reject(err2 instanceof Error ? err2 : new Error(String(err2)));
|
|
29228
29221
|
}
|
|
@@ -30425,11 +30418,11 @@ function createWorkerTask(entry, taskIndex, waveNumber, opts) {
|
|
|
30425
30418
|
const staggerSlot = taskIndex % opts.maxConcurrency;
|
|
30426
30419
|
const staggerMs = staggerSlot * opts.staggerDelayMs;
|
|
30427
30420
|
if (staggerMs > 0) {
|
|
30428
|
-
await new Promise((
|
|
30421
|
+
await new Promise((resolve19) => setTimeout(resolve19, staggerMs));
|
|
30429
30422
|
}
|
|
30430
30423
|
const spacingDelay = opts.failureTracker.getSpacingDelay(entry.role);
|
|
30431
30424
|
if (spacingDelay > 0) {
|
|
30432
|
-
await new Promise((
|
|
30425
|
+
await new Promise((resolve19) => setTimeout(resolve19, spacingDelay));
|
|
30433
30426
|
}
|
|
30434
30427
|
const timeoutMs = opts.options.workerTimeoutMs ?? getExpertTaskTimeout(entry.subTask);
|
|
30435
30428
|
const result = await executeSafe({
|
|
@@ -30481,7 +30474,7 @@ async function maybeDelayForRateLimit(results, waveIdx, totalWaves) {
|
|
|
30481
30474
|
);
|
|
30482
30475
|
if (hasRateLimit) {
|
|
30483
30476
|
logger25.warn("Rate-limit detected \u2014 delaying next wave", { delayMs: RATE_LIMIT_WAVE_DELAY_MS });
|
|
30484
|
-
await new Promise((
|
|
30477
|
+
await new Promise((resolve19) => setTimeout(resolve19, RATE_LIMIT_WAVE_DELAY_MS));
|
|
30485
30478
|
}
|
|
30486
30479
|
}
|
|
30487
30480
|
function emitWaveStarted(ctx, workerCount, roles) {
|
|
@@ -30579,7 +30572,7 @@ async function maybeRetryAfterTriage(opts) {
|
|
|
30579
30572
|
}
|
|
30580
30573
|
const useAltCli = triage.action === "retry_different_cli" && altExecuteWorker !== void 0;
|
|
30581
30574
|
if (triage.action === "retry_different_cli") {
|
|
30582
|
-
await new Promise((
|
|
30575
|
+
await new Promise((resolve19) => setTimeout(resolve19, RATE_LIMIT_SPACING_MS));
|
|
30583
30576
|
}
|
|
30584
30577
|
const retryTimeout = triage.action === "extend_timeout" ? Math.min(timeoutMs * TIMEOUT_EXTENSION_FACTOR, MAX_WORKER_TIMEOUT_MS) : timeoutMs;
|
|
30585
30578
|
const retryExecutor = useAltCli ? altExecuteWorker : executeWorker;
|
|
@@ -34431,7 +34424,7 @@ function registerDelegateToModelTool(server, deps) {
|
|
|
34431
34424
|
server.registerTool(
|
|
34432
34425
|
"delegate_to_model",
|
|
34433
34426
|
{
|
|
34434
|
-
description: "Pick which EXISTING model should handle a task. Inspects task complexity and returns the best-fit model from the routing registry \u2014 does NOT add a new model.
|
|
34427
|
+
description: "Pick which EXISTING model should handle a task. Inspects task complexity and returns the best-fit model from the routing registry \u2014 does NOT add a new model. Records the routing decision to tool-memory for learning feedback (not a pure read). (For drafting a registry entry for a new model, use `registry_import`.)",
|
|
34435
34428
|
inputSchema: TOOL_SCHEMA,
|
|
34436
34429
|
outputSchema: DelegateOutputSchema.shape,
|
|
34437
34430
|
annotations: getToolAnnotations("delegate_to_model")
|
|
@@ -36495,7 +36488,7 @@ var ResearchAddSourceInputSchema = z61.object({
|
|
|
36495
36488
|
has_tests: z61.boolean().optional(),
|
|
36496
36489
|
has_docs: z61.boolean().optional(),
|
|
36497
36490
|
has_paper: z61.boolean().optional()
|
|
36498
|
-
}).optional().describe("Quality signals
|
|
36491
|
+
}).optional().describe("Quality signals used to compute quality_score; provide explicitly \u2014 no GitHub metadata is fetched"),
|
|
36499
36492
|
techniques_extracted: z61.array(z61.string().max(100)).max(5).optional().describe("Techniques identified in this source (max 5)"),
|
|
36500
36493
|
verdict: VerdictEnum.optional().describe("Adoption verdict"),
|
|
36501
36494
|
verdict_notes: z61.string().max(500).optional().describe("Notes explaining the verdict"),
|
|
@@ -37460,7 +37453,7 @@ function registerResearchCatalogReviewTool(server, deps) {
|
|
|
37460
37453
|
topic: z64.string().optional().describe("Topic for approved papers"),
|
|
37461
37454
|
createIssue: z64.boolean().optional().describe("Create GitHub issue when approving")
|
|
37462
37455
|
};
|
|
37463
|
-
const description = "Review auto-cataloged research references found during tool execution. List pending references, approve them for registry addition, dismiss, or clear all.";
|
|
37456
|
+
const description = "Review auto-cataloged research references found during tool execution. List pending references, approve them for registry addition (optionally filing a GitHub issue), dismiss, or clear all.";
|
|
37464
37457
|
const secureHandler = createSecureHandler(createCatalogReviewHandler(deps), {
|
|
37465
37458
|
toolName: "research_catalog_review",
|
|
37466
37459
|
rateLimiter: deps.rateLimiter,
|
|
@@ -37779,7 +37772,7 @@ async function handleRunGraphWorkflow(input, logger57) {
|
|
|
37779
37772
|
checkpointCount
|
|
37780
37773
|
};
|
|
37781
37774
|
}
|
|
37782
|
-
var GRAPH_WORKFLOW_DESCRIPTION = "Run a DAG-shaped workflow with per-node checkpoints, event streaming, and an audit trail. Checkpoints drive the executor in-process recovery (crash-resume + selective node retry) and inspection \u2014 the MCP call is fire-and-forget with NO caller resume input, and the checkpoint store is in-memory (not durable across process restarts). For straight linear templates, use `run_workflow` instead.";
|
|
37775
|
+
var GRAPH_WORKFLOW_DESCRIPTION = "Run a DAG-shaped workflow with per-node checkpoints, event streaming, and an audit trail. Checkpoints drive the executor in-process recovery (crash-resume + selective node retry) and inspection \u2014 the MCP call is fire-and-forget with NO caller resume input, and the checkpoint store is in-memory (not durable across process restarts). For straight linear templates, use `run_workflow` instead. Supports dispatch: 'async' \u2014 returns a jobId immediately; poll get_job_result.";
|
|
37783
37776
|
var GRAPH_WORKFLOW_SCHEMA = {
|
|
37784
37777
|
workflow: z67.string().min(1).max(100).describe(
|
|
37785
37778
|
'Workflow name: echo, pipeline, code-review, security-scan. Use "list" for available workflows.'
|
|
@@ -38953,7 +38946,7 @@ function registerMemoryWriteTool(server, deps) {
|
|
|
38953
38946
|
confidence: z71.enum(["high", "medium", "low"]).optional().describe("Confidence level (default: medium)"),
|
|
38954
38947
|
metadata: z71.record(z71.string().max(100), z71.string().max(500)).optional().describe("Optional key-value metadata tags")
|
|
38955
38948
|
};
|
|
38956
|
-
const description = "Write a memory entry to a specific backend. Supports session (learnings), belief (subject
|
|
38949
|
+
const description = "Write a memory entry to a specific backend. Supports session (learnings), belief assertions (subject + object; predicate fixed as `has_knowledge`), agentic (knowledge with attributes), adaptive (priority-scored), and typed (MIRIX-style semantic) backends.";
|
|
38957
38950
|
const secureHandler = createSecureHandler(memoryWriteHandler, {
|
|
38958
38951
|
toolName: "memory_write",
|
|
38959
38952
|
rateLimiter: deps.rateLimiter,
|
|
@@ -39072,8 +39065,8 @@ var RegistryImportInputSchema = z73.object({
|
|
|
39072
39065
|
provider: z73.enum(["anthropic", "google", "openai"]).describe("Model provider (anthropic, google, openai)"),
|
|
39073
39066
|
/** Model identifier from the provider (e.g., "claude-4-opus-20260201"). */
|
|
39074
39067
|
modelId: z73.string().min(1).describe("Provider model identifier"),
|
|
39075
|
-
/**
|
|
39076
|
-
dryRun: z73.boolean().optional().default(true).describe("
|
|
39068
|
+
/** No-op flag echoed back in the response; the tool never persists regardless. */
|
|
39069
|
+
dryRun: z73.boolean().optional().default(true).describe("No-op flag echoed back in the response; the tool never persists regardless")
|
|
39077
39070
|
});
|
|
39078
39071
|
|
|
39079
39072
|
// src/mcp/tools/registry-import-tool.ts
|
|
@@ -39189,9 +39182,9 @@ function registerRegistryImportTool(server, deps) {
|
|
|
39189
39182
|
const toolSchema = {
|
|
39190
39183
|
provider: z74.enum(["anthropic", "google", "openai"]).describe("Model provider (anthropic, google, openai)"),
|
|
39191
39184
|
modelId: z74.string().min(1).describe("Provider model identifier"),
|
|
39192
|
-
dryRun: z74.boolean().optional().describe("
|
|
39185
|
+
dryRun: z74.boolean().optional().describe("No-op flag echoed back in the response; the tool never persists regardless")
|
|
39193
39186
|
};
|
|
39194
|
-
const description = "Draft a registry ENTRY for a NEW model so routing can consider it later. Generates a ModelCapability YAML with conservative quality scores (5/10) for human review. For picking among ALREADY-registered models, use `delegate_to_model`.
|
|
39187
|
+
const description = "Draft a registry ENTRY for a NEW model so routing can consider it later. Generates a ModelCapability YAML with conservative quality scores (5/10) for human review. Always returns a draft entry for human review (never persists). For picking among ALREADY-registered models, use `delegate_to_model`.";
|
|
39195
39188
|
const secureHandler = createSecureHandler(registryImportHandler, {
|
|
39196
39189
|
toolName: "registry_import",
|
|
39197
39190
|
rateLimiter: deps.rateLimiter,
|
|
@@ -39219,8 +39212,12 @@ var RepoAnalyzeInputSchema = z75.object({
|
|
|
39219
39212
|
(v) => !v.includes("://") || /^https?:\/\//i.test(v),
|
|
39220
39213
|
"Only HTTP/HTTPS URLs are allowed"
|
|
39221
39214
|
).describe('GitHub repository in "owner/name" format (e.g., "cloudfoundry/korifi") or full URL'),
|
|
39222
|
-
/**
|
|
39223
|
-
|
|
39215
|
+
/**
|
|
39216
|
+
* Currently a no-op: the handler ignores this flag and always runs the full
|
|
39217
|
+
* analysis. Both values resolve to identical behavior; retained for input-shape
|
|
39218
|
+
* stability until a distinct shallow path is implemented.
|
|
39219
|
+
*/
|
|
39220
|
+
depth: z75.enum(["shallow", "deep"]).optional().default("shallow").describe("Currently a no-op \u2014 the handler always runs the full analysis (both values identical)")
|
|
39224
39221
|
});
|
|
39225
39222
|
|
|
39226
39223
|
// src/mcp/tools/repo-analyze-tool.ts
|
|
@@ -39244,7 +39241,7 @@ function registerRepoAnalyzeTool(server, deps) {
|
|
|
39244
39241
|
const logger57 = deps.logger ?? createLogger({ tool: "repo_analyze" });
|
|
39245
39242
|
const toolSchema = {
|
|
39246
39243
|
repo: z76.string().min(1).describe('GitHub repository in "owner/name" format or full URL'),
|
|
39247
|
-
depth: z76.enum(["shallow", "deep"]).optional().describe("
|
|
39244
|
+
depth: z76.enum(["shallow", "deep"]).optional().describe("Currently a no-op \u2014 the handler always runs the full analysis (both values identical)")
|
|
39248
39245
|
};
|
|
39249
39246
|
const description = "Analyze a GitHub repository structure. Returns language, framework, package manager, CI provider, security tooling, Dockerfile/Helm/Makefile detection, and gap identification. Replaces multi-step manual inspection with a single structured query.";
|
|
39250
39247
|
const secureHandler = createSecureHandler(repoAnalyzeHandler, {
|
|
@@ -40469,27 +40466,27 @@ var FileAuditStorage = class _FileAuditStorage {
|
|
|
40469
40466
|
const data = this.writeBuffer.join("");
|
|
40470
40467
|
this.writeBuffer = [];
|
|
40471
40468
|
const stream = this.writeStream;
|
|
40472
|
-
return new Promise((
|
|
40469
|
+
return new Promise((resolve19, reject) => {
|
|
40473
40470
|
stream.write(data, (err2) => {
|
|
40474
40471
|
if (err2 !== void 0 && err2 !== null) {
|
|
40475
40472
|
reject(new AuditError("Failed to flush audit log", { cause: err2 }));
|
|
40476
40473
|
} else {
|
|
40477
|
-
|
|
40474
|
+
resolve19();
|
|
40478
40475
|
}
|
|
40479
40476
|
});
|
|
40480
40477
|
});
|
|
40481
40478
|
}
|
|
40482
40479
|
async close() {
|
|
40483
40480
|
await this.flush();
|
|
40484
|
-
return new Promise((
|
|
40481
|
+
return new Promise((resolve19) => {
|
|
40485
40482
|
if (this.writeStream === null) {
|
|
40486
|
-
|
|
40483
|
+
resolve19();
|
|
40487
40484
|
return;
|
|
40488
40485
|
}
|
|
40489
40486
|
this.writeStream.end(() => {
|
|
40490
40487
|
this.writeStream = null;
|
|
40491
40488
|
this.logger.info("Audit storage closed");
|
|
40492
|
-
|
|
40489
|
+
resolve19();
|
|
40493
40490
|
});
|
|
40494
40491
|
});
|
|
40495
40492
|
}
|
|
@@ -41390,7 +41387,7 @@ async function tryIssueTriage(task) {
|
|
|
41390
41387
|
try {
|
|
41391
41388
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
41392
41389
|
if (issueMatch === null) return null;
|
|
41393
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
41390
|
+
const { createIssueTriage } = await import("./issue-triage-7QHWTJRD.js");
|
|
41394
41391
|
const triage = createIssueTriage();
|
|
41395
41392
|
const owner = issueMatch[1] ?? "";
|
|
41396
41393
|
const num = issueMatch[2] ?? "";
|
|
@@ -41418,7 +41415,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
41418
41415
|
]);
|
|
41419
41416
|
async function classifyWithLLM(task) {
|
|
41420
41417
|
try {
|
|
41421
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
41418
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-4YXDWOMR.js");
|
|
41422
41419
|
const prompt = [
|
|
41423
41420
|
"Classify this task into exactly one pipeline template.",
|
|
41424
41421
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -43184,7 +43181,7 @@ var memoryInitPromise = null;
|
|
|
43184
43181
|
async function initPipelineMemory() {
|
|
43185
43182
|
if (cachedMemory !== null) return cachedMemory;
|
|
43186
43183
|
try {
|
|
43187
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
43184
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-G5DWGR6S.js");
|
|
43188
43185
|
const { getLearningDir } = await import("./learning-persistence-2KO4CXNL.js");
|
|
43189
43186
|
const mem = createSessionMemory2(getLearningDir());
|
|
43190
43187
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
@@ -43246,7 +43243,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
43246
43243
|
callRecord(routingMemoryCache);
|
|
43247
43244
|
return;
|
|
43248
43245
|
}
|
|
43249
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
43246
|
+
routingMemoryInitPromise ??= import("./routing-memory-K54FC6WD.js").then(({ createRoutingMemory }) => {
|
|
43250
43247
|
routingMemoryCache ??= createRoutingMemory();
|
|
43251
43248
|
return routingMemoryCache;
|
|
43252
43249
|
}).catch((error) => {
|
|
@@ -43280,7 +43277,7 @@ ${text}` : "";
|
|
|
43280
43277
|
}
|
|
43281
43278
|
async function getWeatherContext() {
|
|
43282
43279
|
try {
|
|
43283
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
43280
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-RYUENMV5.js");
|
|
43284
43281
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
43285
43282
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
43286
43283
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -43298,7 +43295,7 @@ ${lines}
|
|
|
43298
43295
|
}
|
|
43299
43296
|
async function getMemoryContext(task) {
|
|
43300
43297
|
try {
|
|
43301
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
43298
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-G5DWGR6S.js");
|
|
43302
43299
|
const { getLearningDir } = await import("./learning-persistence-2KO4CXNL.js");
|
|
43303
43300
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
43304
43301
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
@@ -43410,7 +43407,7 @@ ${contextBlock}`;
|
|
|
43410
43407
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
43411
43408
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
43412
43409
|
try {
|
|
43413
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
43410
|
+
const { executeVoting } = await import("./consensus-vote-ZBSY2SCU.js");
|
|
43414
43411
|
const votingResult = await executeVoting(
|
|
43415
43412
|
{
|
|
43416
43413
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -43847,7 +43844,7 @@ async function searchCodebaseForTask(task) {
|
|
|
43847
43844
|
}
|
|
43848
43845
|
async function queryResearchRegistry(task) {
|
|
43849
43846
|
try {
|
|
43850
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
43847
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-K4Z4BYGI.js");
|
|
43851
43848
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
43852
43849
|
if (topic === void 0) return null;
|
|
43853
43850
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -43918,7 +43915,7 @@ function createScanStageWrapper() {
|
|
|
43918
43915
|
try {
|
|
43919
43916
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
43920
43917
|
if (slug !== void 0) {
|
|
43921
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
43918
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-WJM2JXPT.js");
|
|
43922
43919
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
43923
43920
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
43924
43921
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -45387,9 +45384,9 @@ var RESEARCH_BUDGET_MS = 2e4;
|
|
|
45387
45384
|
var RESEARCH_TIMED_OUT = /* @__PURE__ */ Symbol("research-budget-exceeded");
|
|
45388
45385
|
async function withResearchBudget(p, ms) {
|
|
45389
45386
|
let timer;
|
|
45390
|
-
const budget = new Promise((
|
|
45387
|
+
const budget = new Promise((resolve19) => {
|
|
45391
45388
|
timer = setTimeout(() => {
|
|
45392
|
-
|
|
45389
|
+
resolve19(RESEARCH_TIMED_OUT);
|
|
45393
45390
|
}, ms);
|
|
45394
45391
|
});
|
|
45395
45392
|
try {
|
|
@@ -46024,7 +46021,7 @@ var GitHubTaskTracker = class {
|
|
|
46024
46021
|
cachedProvider = null;
|
|
46025
46022
|
async getProvider() {
|
|
46026
46023
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
46027
|
-
const { createScmProvider } = await import("./factory-
|
|
46024
|
+
const { createScmProvider } = await import("./factory-3HBHEN54.js");
|
|
46028
46025
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
46029
46026
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
46030
46027
|
this.cachedProvider = result.value;
|
|
@@ -46274,7 +46271,7 @@ function buildStructuredOutput(result) {
|
|
|
46274
46271
|
}))
|
|
46275
46272
|
};
|
|
46276
46273
|
}
|
|
46277
|
-
var RUN_DEV_PIPELINE_DESCRIPTION = "Run the multi-agent development pipeline. Accepts direct task instructions, a plan file, or a spec file. Supports dry-run (plan+vote only).";
|
|
46274
|
+
var RUN_DEV_PIPELINE_DESCRIPTION = "Run the multi-agent development pipeline. Accepts direct task instructions, a plan file, or a spec file. Supports dry-run (plan+vote only). Supports dispatch: 'async' (non-dryRun runs) \u2014 returns a jobId immediately; poll get_job_result.";
|
|
46278
46275
|
function buildPipelineOptions(input, trustTier, auditLogger) {
|
|
46279
46276
|
return {
|
|
46280
46277
|
...input.sessionId !== void 0 ? { sessionId: input.sessionId } : {},
|
|
@@ -46487,7 +46484,7 @@ function selectStageRegistry(template, task, agentStages) {
|
|
|
46487
46484
|
}
|
|
46488
46485
|
return createDevStageRegistry(agentStages);
|
|
46489
46486
|
}
|
|
46490
|
-
var RUN_PIPELINE_DESCRIPTION = `Single unified entry point for all pipeline templates (${listTemplateIds().join("/")}). Auto-detects template from task content or accepts an explicit override.`;
|
|
46487
|
+
var RUN_PIPELINE_DESCRIPTION = `Single unified entry point for all pipeline templates (${listTemplateIds().join("/")}). Auto-detects template from task content or accepts an explicit override. Supports dispatch: 'async' (non-dryRun runs) \u2014 returns a jobId immediately; poll get_job_result.`;
|
|
46491
46488
|
async function runPipelineForGoal(goal, logger57 = createLogger({ tool: "run_pipeline" })) {
|
|
46492
46489
|
const budget = resolveRunBudget(goal, void 0, logger57);
|
|
46493
46490
|
const agentStages = createAgentStages(budget !== void 0 ? { budget } : {});
|
|
@@ -46789,7 +46786,7 @@ async function probeSource(source, includeModelIds) {
|
|
|
46789
46786
|
}
|
|
46790
46787
|
}
|
|
46791
46788
|
async function defaultSources(includeOpenRouter) {
|
|
46792
|
-
const { createAllAdapters: createAllAdapters2 } = await import("./factory-
|
|
46789
|
+
const { createAllAdapters: createAllAdapters2 } = await import("./factory-7XUQGSHC.js");
|
|
46793
46790
|
const adapters = createAllAdapters2();
|
|
46794
46791
|
return buildDefaultModelSources(adapters, { includeOpenRouter });
|
|
46795
46792
|
}
|
|
@@ -49355,6 +49352,66 @@ function computeOutcomeReward(collector, outcome) {
|
|
|
49355
49352
|
return collector.computeReward(outcome);
|
|
49356
49353
|
}
|
|
49357
49354
|
|
|
49355
|
+
// src/audit/pr-review-record.ts
|
|
49356
|
+
import * as crypto2 from "crypto";
|
|
49357
|
+
import { z as z115 } from "zod";
|
|
49358
|
+
var PrReviewVerdictSchema = z115.enum(["approve", "request_changes", "abstain"]);
|
|
49359
|
+
var PrReviewVoteCountsSchema = z115.object({
|
|
49360
|
+
approve: z115.number().int().nonnegative(),
|
|
49361
|
+
request_changes: z115.number().int().nonnegative(),
|
|
49362
|
+
abstain: z115.number().int().nonnegative(),
|
|
49363
|
+
error: z115.number().int().nonnegative(),
|
|
49364
|
+
total: z115.number().int().nonnegative()
|
|
49365
|
+
}).strict();
|
|
49366
|
+
var PrReviewRecordSchema = z115.object({
|
|
49367
|
+
/** Schema version. '1.0' is the initial record-set+sequence model (#3831). */
|
|
49368
|
+
version: z115.literal("1.0"),
|
|
49369
|
+
/**
|
|
49370
|
+
* Monotonic sequence number (integer ≥ 0). Assigned as (max existing
|
|
49371
|
+
* sequence)+1 at write time. Sorted, the set of sequences must cover
|
|
49372
|
+
* 0..maxSeq with no gap (omission detection); DUPLICATE sequences are a
|
|
49373
|
+
* benign concurrent-fork signal, not tampering.
|
|
49374
|
+
*/
|
|
49375
|
+
sequence: z115.number().int().nonnegative(),
|
|
49376
|
+
/** The PR number the review covers. */
|
|
49377
|
+
prNumber: z115.number().int().positive(),
|
|
49378
|
+
/**
|
|
49379
|
+
* The 40-hex head commit SHA the review was run against. SHA-BINDING
|
|
49380
|
+
* (condition 1): the gate matches THIS sha — a record for a stale head does
|
|
49381
|
+
* NOT satisfy a later push, and the hash below covers it so it cannot be
|
|
49382
|
+
* edited to claim a different reviewed sha.
|
|
49383
|
+
*/
|
|
49384
|
+
headSha: z115.string().regex(/^[0-9a-f]{40}$/, "headSha must be a 40-char lowercase hex commit sha"),
|
|
49385
|
+
/** ISO-8601 timestamp the review was recorded. */
|
|
49386
|
+
recordedAt: z115.string().min(1),
|
|
49387
|
+
/** The resolved aggregate verdict. */
|
|
49388
|
+
verdict: PrReviewVerdictSchema,
|
|
49389
|
+
/**
|
|
49390
|
+
* Whether the aggregate carried a VERIFIED finding (the 4-point gate). A
|
|
49391
|
+
* `request_changes` with `verified: true` is a strict blocker; covered by the
|
|
49392
|
+
* hash so it cannot be flipped without detection.
|
|
49393
|
+
*/
|
|
49394
|
+
verified: z115.boolean(),
|
|
49395
|
+
/** Per-decision voter tally from the pr_review aggregate. */
|
|
49396
|
+
voteCounts: PrReviewVoteCountsSchema,
|
|
49397
|
+
/** Truncated human-readable review summary for the reviewer record. */
|
|
49398
|
+
summary: z115.string(),
|
|
49399
|
+
/** Optional correlation/decision id linking to the cost rollup / trace. */
|
|
49400
|
+
correlationId: z115.string().min(1).optional(),
|
|
49401
|
+
/**
|
|
49402
|
+
* ADVISORY hash of the tip record at write time (absent for the first).
|
|
49403
|
+
* Retained for audit texture but NOT covered by `hash` and NOT verified —
|
|
49404
|
+
* the record-set model is position-independent (mirrors #3927).
|
|
49405
|
+
*/
|
|
49406
|
+
previousHash: z115.string().length(64).optional(),
|
|
49407
|
+
/** SHA-256 over every field above EXCEPT `previousHash` (and except `hash`). */
|
|
49408
|
+
hash: z115.string().length(64)
|
|
49409
|
+
}).strict();
|
|
49410
|
+
|
|
49411
|
+
// src/audit/pr-review-record-store.ts
|
|
49412
|
+
import { existsSync as existsSync12, readFileSync as readFileSync10 } from "fs";
|
|
49413
|
+
import { isAbsolute, join as join10, resolve as resolve17 } from "path";
|
|
49414
|
+
|
|
49358
49415
|
// src/security/sandbox/sandbox-types.ts
|
|
49359
49416
|
var DEFAULT_RESOURCE_LIMITS = {
|
|
49360
49417
|
maxMemoryBytes: 512 * 1024 * 1024,
|
|
@@ -49770,7 +49827,7 @@ function getPolicy(id) {
|
|
|
49770
49827
|
// src/security/sandbox/sandbox-executor.ts
|
|
49771
49828
|
import { execFile } from "child_process";
|
|
49772
49829
|
import { promisify } from "util";
|
|
49773
|
-
import { resolve as
|
|
49830
|
+
import { resolve as resolve18, normalize as normalize2, sep as sep11 } from "path";
|
|
49774
49831
|
var execFileAsync = promisify(execFile);
|
|
49775
49832
|
var logger51 = createLogger({ component: "sandbox-executor" });
|
|
49776
49833
|
function parseExecError(error) {
|
|
@@ -49850,9 +49907,9 @@ var PolicySandboxExecutor = class {
|
|
|
49850
49907
|
*/
|
|
49851
49908
|
validateCwd(cwd, policy) {
|
|
49852
49909
|
if (cwd === void 0) return null;
|
|
49853
|
-
const normalizedCwd = normalize2(
|
|
49910
|
+
const normalizedCwd = normalize2(resolve18(cwd));
|
|
49854
49911
|
const isAllowed = policy.pathRules.some((rule) => {
|
|
49855
|
-
const normalizedRule = normalize2(
|
|
49912
|
+
const normalizedRule = normalize2(resolve18(rule.path));
|
|
49856
49913
|
const isUnderRule = normalizedCwd === normalizedRule || normalizedCwd.startsWith(normalizedRule + sep11);
|
|
49857
49914
|
return isUnderRule && rule.access !== "none";
|
|
49858
49915
|
});
|
|
@@ -50852,4 +50909,4 @@ export {
|
|
|
50852
50909
|
shutdownFeedbackSubscriber,
|
|
50853
50910
|
createEventBusBridge
|
|
50854
50911
|
};
|
|
50855
|
-
//# sourceMappingURL=chunk-
|
|
50912
|
+
//# sourceMappingURL=chunk-PZ3MGLJU.js.map
|