nexus-agents 2.157.1 → 2.158.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/{child-mcp-config-3YUKLM5F.js → child-mcp-config-ODAUXUWE.js} +2 -2
- package/dist/{chunk-PZDDA6IW.js → chunk-2O63LDYB.js} +3 -3
- package/dist/{chunk-BM26VPV5.js → chunk-42ZSRIEX.js} +2 -2
- package/dist/{chunk-5ULXLPVP.js → chunk-4IXC6V6O.js} +2 -2
- package/dist/{chunk-JZ4PCEEN.js → chunk-55ZDYUBT.js} +2 -2
- package/dist/{chunk-RHUKGSH7.js → chunk-5CMDYYNC.js} +7 -7
- package/dist/{chunk-YZQXCCEA.js → chunk-6B5VQ2SY.js} +5 -5
- package/dist/{chunk-5FH7QZIT.js → chunk-6MCSD37T.js} +2 -2
- package/dist/{chunk-NELFMLLR.js → chunk-7J3AAPH5.js} +2 -2
- package/dist/{chunk-EJ3MAR5M.js → chunk-CSHFTQA7.js} +3 -3
- package/dist/{chunk-6ZKQRTTQ.js → chunk-CTL5HUZZ.js} +10 -7
- package/dist/chunk-CTL5HUZZ.js.map +1 -0
- package/dist/{chunk-IILTUCFB.js → chunk-DSUFV2ZN.js} +2 -2
- package/dist/{chunk-SCJ2EB6Z.js → chunk-FWW5GCEH.js} +2 -2
- package/dist/{chunk-7YOJXOFN.js → chunk-GG7MGRQ6.js} +4 -4
- package/dist/{chunk-VEINXCXS.js → chunk-HANP6FHM.js} +34 -34
- package/dist/{chunk-ENPYELJM.js → chunk-HHNBKTII.js} +9 -8
- package/dist/{chunk-ENPYELJM.js.map → chunk-HHNBKTII.js.map} +1 -1
- package/dist/{chunk-TNRTP5FW.js → chunk-I32MYAT5.js} +2 -2
- package/dist/{chunk-47WFM6QH.js → chunk-J2JP35S3.js} +4 -4
- package/dist/{chunk-LZ2LHYDO.js → chunk-K6HJLOPA.js} +3 -3
- package/dist/{chunk-HUN7CEAU.js → chunk-KS622JST.js} +3 -3
- package/dist/{chunk-BGAK4N74.js → chunk-LSWGHIJK.js} +7 -7
- package/dist/{chunk-XGUZ2OQK.js → chunk-OOGGQ2NA.js} +3 -3
- package/dist/{chunk-RCSDD2QY.js → chunk-Q4JNYY2Y.js} +4 -4
- package/dist/{chunk-RCSDD2QY.js.map → chunk-Q4JNYY2Y.js.map} +1 -1
- package/dist/{chunk-JWCD3JCB.js → chunk-Q7TALELN.js} +11 -10
- package/dist/{chunk-JWCD3JCB.js.map → chunk-Q7TALELN.js.map} +1 -1
- package/dist/{chunk-O7VPOR5A.js → chunk-R76LLKT2.js} +5 -5
- package/dist/{chunk-YGYJUPVX.js → chunk-RI3BFANI.js} +2 -2
- package/dist/{chunk-UAGYCCHY.js → chunk-S3H4VWN5.js} +2 -2
- package/dist/{chunk-M532SJS6.js → chunk-S7PFS6PX.js} +7 -7
- package/dist/{chunk-MYSS22Q2.js → chunk-U5KSLUZ6.js} +2 -2
- package/dist/{chunk-3NT6NAXD.js → chunk-UQOJ2KGW.js} +13 -12
- package/dist/chunk-UQOJ2KGW.js.map +1 -0
- package/dist/{chunk-TKCXD36G.js → chunk-VKVJSPHJ.js} +4 -4
- package/dist/{chunk-3S2OPUGU.js → chunk-XLJCXM7L.js} +2 -2
- package/dist/{chunk-HWG437YQ.js → chunk-YH5U3XCP.js} +2 -2
- package/dist/{chunk-AEPCCXMK.js → chunk-YMMX6ELC.js} +3 -3
- package/dist/{chunk-GYWYCCJC.js → chunk-YQRP5NST.js} +2 -2
- package/dist/{cli-circuit-breaker-Q43YSBCB.js → cli-circuit-breaker-MLVJXLK6.js} +4 -4
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +41 -41
- package/dist/{composite-router-5UHJFOB3.js → composite-router-FTECAR4U.js} +2 -2
- package/dist/{consensus-vote-ZYZMDGT5.js → consensus-vote-MMZTCPL7.js} +15 -15
- package/dist/{consensus-vote-types-BNBMB415.d.ts → consensus-vote-types-DB3SmULO.d.ts} +16 -10
- package/dist/{context-retriever-33SGXV33.js → context-retriever-MPZ7T4VA.js} +8 -8
- package/dist/{doctor-deep-RAN4HGOH.js → doctor-deep-KUB4HPCS.js} +3 -3
- package/dist/{expert-bridge-RJP57L75.js → expert-bridge-EK362QGQ.js} +4 -4
- package/dist/{factory-C5PY7R6O.js → factory-GOO7MH5G.js} +8 -8
- package/dist/{factory-YOUM5MCV.js → factory-XBUQP3UB.js} +5 -5
- package/dist/{improvement-review-H5BQ2JXK.js → improvement-review-XXRDVOJT.js} +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +30 -30
- package/dist/{init-opencode-KHODCXA6.js → init-opencode-RNSCHZIW.js} +6 -6
- package/dist/{issue-triage-OP3FDRKY.js → issue-triage-7TWTN6LI.js} +6 -6
- package/dist/{pr-reviewer-helpers-UF42XZB6.js → pr-reviewer-helpers-VT4DR5BC.js} +4 -4
- package/dist/{registry-command-EZ7735GC.js → registry-command-QVBYBBWR.js} +2 -2
- package/dist/{repo-security-plan-D62HB5PK.js → repo-security-plan-VSQWMONM.js} +3 -3
- package/dist/{research-helpers-synthesize-KUA53BAD.js → research-helpers-synthesize-VCUOMHPD.js} +4 -4
- package/dist/{routing-memory-FE4EQUXO.js → routing-memory-PP4UJVH4.js} +2 -2
- package/dist/{session-memory-RA7KE6CX.js → session-memory-TVV2IOGB.js} +3 -3
- package/dist/{setup-command-AX3B46CE.js → setup-command-D5PU6XXA.js} +11 -11
- package/dist/{setup-config-SHG2DMZJ.js → setup-config-HZHL4QMD.js} +3 -3
- package/dist/{setup-custom-api-NVS4EPBG.js → setup-custom-api-H6FJ5VWL.js} +3 -3
- package/dist/{tool-memory-UQH2FTAS.js → tool-memory-YLCJZVMV.js} +5 -5
- package/dist/{unified-registry-MMQXU622.js → unified-registry-ZUPTC7OR.js} +9 -9
- package/dist/{weather-report-HRQCJEU5.js → weather-report-XPDW6LGI.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-3NT6NAXD.js.map +0 -1
- package/dist/chunk-6ZKQRTTQ.js.map +0 -1
- /package/dist/{child-mcp-config-3YUKLM5F.js.map → child-mcp-config-ODAUXUWE.js.map} +0 -0
- /package/dist/{chunk-PZDDA6IW.js.map → chunk-2O63LDYB.js.map} +0 -0
- /package/dist/{chunk-BM26VPV5.js.map → chunk-42ZSRIEX.js.map} +0 -0
- /package/dist/{chunk-5ULXLPVP.js.map → chunk-4IXC6V6O.js.map} +0 -0
- /package/dist/{chunk-JZ4PCEEN.js.map → chunk-55ZDYUBT.js.map} +0 -0
- /package/dist/{chunk-RHUKGSH7.js.map → chunk-5CMDYYNC.js.map} +0 -0
- /package/dist/{chunk-YZQXCCEA.js.map → chunk-6B5VQ2SY.js.map} +0 -0
- /package/dist/{chunk-5FH7QZIT.js.map → chunk-6MCSD37T.js.map} +0 -0
- /package/dist/{chunk-NELFMLLR.js.map → chunk-7J3AAPH5.js.map} +0 -0
- /package/dist/{chunk-EJ3MAR5M.js.map → chunk-CSHFTQA7.js.map} +0 -0
- /package/dist/{chunk-IILTUCFB.js.map → chunk-DSUFV2ZN.js.map} +0 -0
- /package/dist/{chunk-SCJ2EB6Z.js.map → chunk-FWW5GCEH.js.map} +0 -0
- /package/dist/{chunk-7YOJXOFN.js.map → chunk-GG7MGRQ6.js.map} +0 -0
- /package/dist/{chunk-VEINXCXS.js.map → chunk-HANP6FHM.js.map} +0 -0
- /package/dist/{chunk-TNRTP5FW.js.map → chunk-I32MYAT5.js.map} +0 -0
- /package/dist/{chunk-47WFM6QH.js.map → chunk-J2JP35S3.js.map} +0 -0
- /package/dist/{chunk-LZ2LHYDO.js.map → chunk-K6HJLOPA.js.map} +0 -0
- /package/dist/{chunk-HUN7CEAU.js.map → chunk-KS622JST.js.map} +0 -0
- /package/dist/{chunk-BGAK4N74.js.map → chunk-LSWGHIJK.js.map} +0 -0
- /package/dist/{chunk-XGUZ2OQK.js.map → chunk-OOGGQ2NA.js.map} +0 -0
- /package/dist/{chunk-O7VPOR5A.js.map → chunk-R76LLKT2.js.map} +0 -0
- /package/dist/{chunk-YGYJUPVX.js.map → chunk-RI3BFANI.js.map} +0 -0
- /package/dist/{chunk-UAGYCCHY.js.map → chunk-S3H4VWN5.js.map} +0 -0
- /package/dist/{chunk-M532SJS6.js.map → chunk-S7PFS6PX.js.map} +0 -0
- /package/dist/{chunk-MYSS22Q2.js.map → chunk-U5KSLUZ6.js.map} +0 -0
- /package/dist/{chunk-TKCXD36G.js.map → chunk-VKVJSPHJ.js.map} +0 -0
- /package/dist/{chunk-3S2OPUGU.js.map → chunk-XLJCXM7L.js.map} +0 -0
- /package/dist/{chunk-HWG437YQ.js.map → chunk-YH5U3XCP.js.map} +0 -0
- /package/dist/{chunk-AEPCCXMK.js.map → chunk-YMMX6ELC.js.map} +0 -0
- /package/dist/{chunk-GYWYCCJC.js.map → chunk-YQRP5NST.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-Q43YSBCB.js.map → cli-circuit-breaker-MLVJXLK6.js.map} +0 -0
- /package/dist/{composite-router-5UHJFOB3.js.map → composite-router-FTECAR4U.js.map} +0 -0
- /package/dist/{consensus-vote-ZYZMDGT5.js.map → consensus-vote-MMZTCPL7.js.map} +0 -0
- /package/dist/{context-retriever-33SGXV33.js.map → context-retriever-MPZ7T4VA.js.map} +0 -0
- /package/dist/{doctor-deep-RAN4HGOH.js.map → doctor-deep-KUB4HPCS.js.map} +0 -0
- /package/dist/{expert-bridge-RJP57L75.js.map → expert-bridge-EK362QGQ.js.map} +0 -0
- /package/dist/{factory-C5PY7R6O.js.map → factory-GOO7MH5G.js.map} +0 -0
- /package/dist/{factory-YOUM5MCV.js.map → factory-XBUQP3UB.js.map} +0 -0
- /package/dist/{improvement-review-H5BQ2JXK.js.map → improvement-review-XXRDVOJT.js.map} +0 -0
- /package/dist/{init-opencode-KHODCXA6.js.map → init-opencode-RNSCHZIW.js.map} +0 -0
- /package/dist/{issue-triage-OP3FDRKY.js.map → issue-triage-7TWTN6LI.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-UF42XZB6.js.map → pr-reviewer-helpers-VT4DR5BC.js.map} +0 -0
- /package/dist/{registry-command-EZ7735GC.js.map → registry-command-QVBYBBWR.js.map} +0 -0
- /package/dist/{repo-security-plan-D62HB5PK.js.map → repo-security-plan-VSQWMONM.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-KUA53BAD.js.map → research-helpers-synthesize-VCUOMHPD.js.map} +0 -0
- /package/dist/{routing-memory-FE4EQUXO.js.map → routing-memory-PP4UJVH4.js.map} +0 -0
- /package/dist/{session-memory-RA7KE6CX.js.map → session-memory-TVV2IOGB.js.map} +0 -0
- /package/dist/{setup-command-AX3B46CE.js.map → setup-command-D5PU6XXA.js.map} +0 -0
- /package/dist/{setup-config-SHG2DMZJ.js.map → setup-config-HZHL4QMD.js.map} +0 -0
- /package/dist/{setup-custom-api-NVS4EPBG.js.map → setup-custom-api-H6FJ5VWL.js.map} +0 -0
- /package/dist/{tool-memory-UQH2FTAS.js.map → tool-memory-YLCJZVMV.js.map} +0 -0
- /package/dist/{unified-registry-MMQXU622.js.map → unified-registry-ZUPTC7OR.js.map} +0 -0
- /package/dist/{weather-report-HRQCJEU5.js.map → weather-report-XPDW6LGI.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
4
4
|
import "./chunk-NL7SZQPW.js";
|
|
5
5
|
import "./chunk-DHVMSIT5.js";
|
|
6
6
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -60,4 +60,4 @@ export {
|
|
|
60
60
|
generateMcpConfig,
|
|
61
61
|
getDefaultAllowedTools
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=child-mcp-config-
|
|
63
|
+
//# sourceMappingURL=child-mcp-config-ODAUXUWE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
emitClawGuardViolation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-42ZSRIEX.js";
|
|
4
4
|
import {
|
|
5
5
|
CACHE_TIMEOUTS,
|
|
6
6
|
MCP_TIMEOUTS,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getTimeProvider,
|
|
17
17
|
ok,
|
|
18
18
|
resolveToolClassGuardMs
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
20
20
|
import {
|
|
21
21
|
getNexusDataDir
|
|
22
22
|
} from "./chunk-DHVMSIT5.js";
|
|
@@ -2023,4 +2023,4 @@ export {
|
|
|
2023
2023
|
VOTING_THRESHOLDS,
|
|
2024
2024
|
ConsensusMetricsSchema
|
|
2025
2025
|
};
|
|
2026
|
-
//# sourceMappingURL=chunk-
|
|
2026
|
+
//# sourceMappingURL=chunk-2O63LDYB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTimeProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
4
4
|
|
|
5
5
|
// src/security/audit-trail.ts
|
|
6
6
|
var MAX_EVENTS = 1e4;
|
|
@@ -205,4 +205,4 @@ export {
|
|
|
205
205
|
createGraphAuditBridge,
|
|
206
206
|
createAuditTrail
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=chunk-
|
|
208
|
+
//# sourceMappingURL=chunk-42ZSRIEX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/setup-config.ts
|
|
6
6
|
import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
|
|
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
|
|
|
77
77
|
export {
|
|
78
78
|
runConfigInitSync
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-4IXC6V6O.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
isRateLimitLikeError,
|
|
12
12
|
lookupInTreeCapability,
|
|
13
13
|
ok
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
15
15
|
|
|
16
16
|
// src/config/model-parameter-support.ts
|
|
17
17
|
function parseClaudeMajorMinor(bareId) {
|
|
@@ -828,4 +828,4 @@ export {
|
|
|
828
828
|
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
829
829
|
collectStream
|
|
830
830
|
};
|
|
831
|
-
//# sourceMappingURL=chunk-
|
|
831
|
+
//# sourceMappingURL=chunk-55ZDYUBT.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
createAllAdapters,
|
|
9
9
|
probeCli
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S7PFS6PX.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULTS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-I32MYAT5.js";
|
|
14
14
|
import {
|
|
15
15
|
CliNameSchema,
|
|
16
16
|
DEFAULT_CAPABILITIES,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
ok,
|
|
27
27
|
symbols,
|
|
28
28
|
writeLine
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
30
30
|
import {
|
|
31
31
|
getLearningDir,
|
|
32
32
|
getOutcomesFile,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./chunk-DHVMSIT5.js";
|
|
43
43
|
|
|
44
44
|
// src/version.ts
|
|
45
|
-
var VERSION = true ? "2.
|
|
45
|
+
var VERSION = true ? "2.158.1" : "dev";
|
|
46
46
|
|
|
47
47
|
// src/config/schemas-core.ts
|
|
48
48
|
import { z } from "zod";
|
|
@@ -2135,7 +2135,7 @@ async function runDoctorFix(result) {
|
|
|
2135
2135
|
writeLine2("\u2500".repeat(40));
|
|
2136
2136
|
let fixCount = 0;
|
|
2137
2137
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
2138
|
-
const { runSetup } = await import("./setup-command-
|
|
2138
|
+
const { runSetup } = await import("./setup-command-D5PU6XXA.js");
|
|
2139
2139
|
const setupResult = runSetup({
|
|
2140
2140
|
skipMcp: true,
|
|
2141
2141
|
skipRules: true,
|
|
@@ -2149,7 +2149,7 @@ async function runDoctorFix(result) {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
}
|
|
2151
2151
|
if (!result.configFile.found) {
|
|
2152
|
-
const { runConfigInitSync } = await import("./setup-config-
|
|
2152
|
+
const { runConfigInitSync } = await import("./setup-config-HZHL4QMD.js");
|
|
2153
2153
|
const configResult = runConfigInitSync(process.cwd(), false, false);
|
|
2154
2154
|
if (configResult.success && configResult.created) {
|
|
2155
2155
|
writeLine2(`\u2713 Generated config: ${configResult.path}`);
|
|
@@ -2248,4 +2248,4 @@ export {
|
|
|
2248
2248
|
startStdioServer,
|
|
2249
2249
|
closeServer
|
|
2250
2250
|
};
|
|
2251
|
-
//# sourceMappingURL=chunk-
|
|
2251
|
+
//# sourceMappingURL=chunk-5CMDYYNC.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GitHubProvider,
|
|
3
3
|
ScmError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7J3AAPH5.js";
|
|
5
5
|
import {
|
|
6
6
|
ROLE_DEFAULT_TRUST,
|
|
7
7
|
ReputationCache,
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
gateWithReputation,
|
|
12
12
|
resolveReputationGatingMode,
|
|
13
13
|
sanitizeInput
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-S3H4VWN5.js";
|
|
15
15
|
import {
|
|
16
16
|
emitPolicyEvent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-42ZSRIEX.js";
|
|
18
18
|
import {
|
|
19
19
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
20
20
|
createLogger,
|
|
21
21
|
err,
|
|
22
22
|
getTimeProvider,
|
|
23
23
|
ok
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
25
25
|
|
|
26
26
|
// src/security/trust-classifier.ts
|
|
27
27
|
function mapAuthorAssociation(association) {
|
|
@@ -1211,4 +1211,4 @@ export {
|
|
|
1211
1211
|
IssueTriage,
|
|
1212
1212
|
createIssueTriage
|
|
1213
1213
|
};
|
|
1214
|
-
//# sourceMappingURL=chunk-
|
|
1214
|
+
//# sourceMappingURL=chunk-6B5VQ2SY.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
getTimeProvider
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
8
8
|
|
|
9
9
|
// src/mcp/tools/scanner-registry-fetcher.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -721,4 +721,4 @@ export {
|
|
|
721
721
|
generateSecurityPlan,
|
|
722
722
|
buildPlanFromAnalysis
|
|
723
723
|
};
|
|
724
|
-
//# sourceMappingURL=chunk-
|
|
724
|
+
//# sourceMappingURL=chunk-6MCSD37T.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
err,
|
|
5
5
|
getErrorMessage,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
8
8
|
|
|
9
9
|
// src/scm/types.ts
|
|
10
10
|
var ScmError = class extends Error {
|
|
@@ -263,4 +263,4 @@ export {
|
|
|
263
263
|
ScmError,
|
|
264
264
|
GitHubProvider
|
|
265
265
|
};
|
|
266
|
-
//# sourceMappingURL=chunk-
|
|
266
|
+
//# sourceMappingURL=chunk-7J3AAPH5.js.map
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
planOptionalParams,
|
|
5
5
|
requireApiKey,
|
|
6
6
|
validateApiKeyPresence
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-55ZDYUBT.js";
|
|
8
8
|
import {
|
|
9
9
|
ModelCapability,
|
|
10
10
|
err,
|
|
11
11
|
getCliModelName,
|
|
12
12
|
getTokenEstimator,
|
|
13
13
|
ok
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
15
15
|
|
|
16
16
|
// src/adapters/openai-types.ts
|
|
17
17
|
var OPENAI_MODELS = {
|
|
@@ -609,4 +609,4 @@ export {
|
|
|
609
609
|
OpenAIAdapter,
|
|
610
610
|
createOpenAIAdapter
|
|
611
611
|
};
|
|
612
|
-
//# sourceMappingURL=chunk-
|
|
612
|
+
//# sourceMappingURL=chunk-CSHFTQA7.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenAIAdapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CSHFTQA7.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
computeCostDetail,
|
|
6
6
|
recordUsageEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UQOJ2KGW.js";
|
|
8
8
|
import {
|
|
9
9
|
ConfigError,
|
|
10
10
|
createLogger,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getErrorMessage,
|
|
13
13
|
getTimeProvider,
|
|
14
14
|
ok
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
16
16
|
|
|
17
17
|
// src/config/opencode-bridge.ts
|
|
18
18
|
import { readFileSync } from "fs";
|
|
@@ -141,15 +141,18 @@ function withUsageRecording(inner) {
|
|
|
141
141
|
try {
|
|
142
142
|
if (result.ok) {
|
|
143
143
|
const u = result.value.usage;
|
|
144
|
+
const cost = computeCostDetail(inner.modelId, u.inputTokens, u.outputTokens);
|
|
144
145
|
recordUsageEvent({
|
|
145
146
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
146
147
|
modelId: inner.modelId,
|
|
147
148
|
providerId: inner.providerId,
|
|
148
149
|
inputTokens: u.inputTokens,
|
|
149
150
|
outputTokens: u.outputTokens,
|
|
150
|
-
usdCost:
|
|
151
|
+
usdCost: cost.costUsd,
|
|
151
152
|
latencyMs,
|
|
152
|
-
success: true
|
|
153
|
+
success: true,
|
|
154
|
+
priced: cost.priced,
|
|
155
|
+
...cost.priced ? { priceSource: cost.resolvedId } : {}
|
|
153
156
|
});
|
|
154
157
|
} else {
|
|
155
158
|
recordUsageEvent({
|
|
@@ -191,4 +194,4 @@ export {
|
|
|
191
194
|
discoverModels,
|
|
192
195
|
buildOpenAICompatAdapters
|
|
193
196
|
};
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
197
|
+
//# sourceMappingURL=chunk-CTL5HUZZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/opencode-bridge.ts","../src/adapters/openai-compat-adapter.ts"],"sourcesContent":["/**\n * opencode.json gateway-config bridge (#2503, child 3 of epic #2500).\n *\n * When nexus-agents runs as an MCP loaded by OpenCode (typically inside a\n * Docker sandbox), OpenCode's `opencode.json` already declares the\n * OpenAI-compatible gateway the harness uses. Reading it from there saves\n * the operator from re-declaring the same `baseURL` + `apiKey` as\n * NEXUS_OPENAI_COMPAT_* env vars.\n *\n * Scope (per direction discussion 2026-05-09):\n * - **Only** reads `providers.openai-compat.options.{baseURL, apiKey}`.\n * Does NOT read OpenCode's MCP config, model list, logging, or other\n * settings. nexus-agents' own behaviour stays driven by\n * `nexus-agents.yaml` + `NEXUS_*` env vars.\n * - Resolves OpenCode's `{env:VAR}` interpolation in the apiKey field.\n * - Returns `null` on any failure path (missing file, parse error,\n * missing fields, unset interpolated env var) — caller falls back to\n * env-var precedence; we don't throw.\n *\n * Precedence (applied in `openai-compat-adapter.ts`):\n * 1. `NEXUS_OPENAI_COMPAT_URL` + `NEXUS_OPENAI_COMPAT_KEY` env vars (if both set)\n * 2. `NEXUS_OPENCODE_CONFIG` → `opencode.json` → `providers.openai-compat`\n * 3. Unconfigured → `null`, no adapter registered\n *\n * Sanitised logging: never log the resolved apiKey. Only the baseURL is\n * logged on success.\n *\n * @module config/opencode-bridge\n */\n\nimport { readFileSync } from 'node:fs';\n\nimport { createLogger } from '../core/index.js';\n\nconst logger = createLogger({ component: 'opencode-bridge' });\n\nexport interface OpencodeGatewayConfig {\n readonly baseURL: string;\n readonly apiKey: string;\n}\n\n/**\n * Read `providers.openai-compat.options.{baseURL, apiKey}` from the given\n * opencode.json path. Returns `null` on any failure — the caller falls\n * back to env-var precedence.\n */\nexport function readOpencodeGateway(path: string): OpencodeGatewayConfig | null {\n const raw = readFileOrNull(path);\n if (raw === null) return null;\n\n const parsed = parseJsonOrNull(raw, path);\n if (parsed === null) return null;\n\n const options = extractOpenAICompatOptions(parsed);\n if (options === null) {\n logger.debug('opencode.json has no providers.openai-compat.options block', { path });\n return null;\n }\n\n const baseURL = typeof options.baseURL === 'string' ? options.baseURL.trim() : '';\n const apiKeyRaw = typeof options.apiKey === 'string' ? options.apiKey.trim() : '';\n if (baseURL === '' || apiKeyRaw === '') {\n logger.warn('opencode.json providers.openai-compat missing baseURL or apiKey', { path });\n return null;\n }\n\n const apiKey = resolveEnvInterpolation(apiKeyRaw);\n if (apiKey === null) {\n logger.warn(\n 'opencode.json apiKey references an env var that is not set; gateway not configured',\n { path }\n );\n return null;\n }\n\n logger.info('Gateway config sourced from opencode.json', { baseURL, path });\n return { baseURL, apiKey };\n}\n\nfunction readFileOrNull(path: string): string | null {\n try {\n return readFileSync(path, 'utf8');\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n logger.debug('Could not read opencode.json', { path, error: msg });\n return null;\n }\n}\n\nfunction parseJsonOrNull(raw: string, path: string): unknown {\n try {\n return JSON.parse(raw);\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n logger.warn('opencode.json is not valid JSON; ignoring', { path, error: msg });\n return null;\n }\n}\n\n/**\n * Pull `providers.openai-compat.options` out of the parsed JSON without\n * coupling to a Zod schema. OpenCode's config has many keys we don't\n * care about; we only navigate to the one we need.\n */\nfunction extractOpenAICompatOptions(\n parsed: unknown\n): { baseURL?: unknown; apiKey?: unknown } | null {\n if (typeof parsed !== 'object' || parsed === null) return null;\n const root = parsed as { providers?: unknown };\n const providers = root.providers;\n if (typeof providers !== 'object' || providers === null) return null;\n const provider = (providers as Record<string, unknown>)['openai-compat'];\n if (typeof provider !== 'object' || provider === null) return null;\n const options = (provider as { options?: unknown }).options;\n if (typeof options !== 'object' || options === null) return null;\n return options;\n}\n\n/**\n * Resolve OpenCode's `{env:VAR}` interpolation. Only the literal pattern\n * is supported (no shell expansion, no defaults). Returns the string as-is\n * when no interpolation is present; returns `null` when the referenced\n * env var is not set.\n */\nfunction resolveEnvInterpolation(value: string): string | null {\n const match = /^\\{env:([A-Z0-9_]+)\\}$/.exec(value);\n if (match === null) return value;\n const envName = match[1];\n if (envName === undefined) return null;\n const resolved = process.env[envName];\n if (resolved === undefined || resolved === '') return null;\n return resolved;\n}\n","/**\n * OpenAI-compatible gateway adapter — talk to any HTTP gateway that exposes\n * the OpenAI Chat Completions API. The gateway may itself be a multi-model\n * router (Bedrock/Vertex/Azure proxy, OpenRouter, vLLM, etc.). nexus-agents\n * sees one adapter, the gateway exposes N models, and the existing routing\n * pipeline picks among them.\n *\n * Source: Issue #2468 (epic #2467 child).\n *\n * Configuration precedence (#2503, child 3 of epic #2500):\n * 1. NEXUS_OPENAI_COMPAT_URL + NEXUS_OPENAI_COMPAT_KEY env vars (both required)\n * 2. NEXUS_OPENCODE_CONFIG path → opencode.json → providers.openai-compat\n * 3. Unconfigured → adapter not built\n *\n * Models are discovered via GET {base}/v1/models at first use. Each model\n * the gateway exposes can be selected by ID; the adapter wraps the existing\n * `OpenAIAdapter` for the actual chat-completions request, so streaming +\n * tool use + the full IModelAdapter contract come for free.\n */\n\nimport OpenAI from 'openai';\n\nimport type {\n Result,\n CompletionRequest,\n CompletionResponse,\n ModelError,\n ModelMetadata,\n IModelAdapter,\n} from '../core/index.js';\nimport { ok, err, ConfigError, getErrorMessage, getTimeProvider } from '../core/index.js';\nimport { OpenAIAdapter } from './openai-adapter.js';\nimport { recordUsageEvent, computeCostDetail } from '../learning/usage-log.js';\nimport { readOpencodeGateway } from '../config/opencode-bridge.js';\n\nexport interface OpenAICompatConfig {\n /** Gateway base URL — must reach `/v1/models` and `/v1/chat/completions`. */\n readonly baseUrl: string;\n /** API key the gateway expects. */\n readonly apiKey: string;\n}\n\nexport interface DiscoveredModel {\n readonly id: string;\n /** Unix epoch seconds when the model was created (per OpenAI API). */\n readonly created?: number;\n /** Owning organization or upstream provider name. */\n readonly ownedBy?: string;\n}\n\n/**\n * Read the gateway config with the precedence chain documented in the\n * module docstring: env vars > opencode.json > unconfigured.\n *\n * The env-var path (#2468) wins when both `NEXUS_OPENAI_COMPAT_URL` and\n * `NEXUS_OPENAI_COMPAT_KEY` are set. Otherwise, when `NEXUS_OPENCODE_CONFIG`\n * names a path, the opencode.json bridge tries to source the gateway from\n * `providers.openai-compat.options.{baseURL, apiKey}` (#2503). Returns\n * `null` when neither path yields a config — caller treats unset gateway\n * as \"no adapter from this source.\"\n */\nexport function readOpenAICompatEnv(): OpenAICompatConfig | null {\n const fromEnv = readGatewayFromEnv();\n if (fromEnv !== null) return fromEnv;\n return readGatewayFromOpencode();\n}\n\nfunction readGatewayFromEnv(): OpenAICompatConfig | null {\n const envUrl = process.env['NEXUS_OPENAI_COMPAT_URL']?.trim();\n const envKey = process.env['NEXUS_OPENAI_COMPAT_KEY']?.trim();\n if (envUrl === undefined || envUrl === '') return null;\n if (envKey === undefined || envKey === '') return null;\n return { baseUrl: envUrl, apiKey: envKey };\n}\n\nfunction readGatewayFromOpencode(): OpenAICompatConfig | null {\n const opencodePath = process.env['NEXUS_OPENCODE_CONFIG']?.trim();\n if (opencodePath === undefined || opencodePath === '') return null;\n const fromFile = readOpencodeGateway(opencodePath);\n if (fromFile === null) return null;\n return { baseUrl: fromFile.baseURL, apiKey: fromFile.apiKey };\n}\n\n/**\n * Discover available models by calling `GET {baseUrl}/v1/models`. Uses the\n * official `openai` SDK's `client.models.list()` so we benefit from its\n * pagination + retry handling. The list is the strongly authoritative\n * source: nexus-agents won't try to dispatch to a model the gateway doesn't\n * expose.\n */\nexport async function discoverModels(\n config: OpenAICompatConfig\n): Promise<Result<readonly DiscoveredModel[], ConfigError>> {\n try {\n const client = new OpenAI({ baseURL: config.baseUrl, apiKey: config.apiKey });\n const list = await client.models.list();\n const models: readonly DiscoveredModel[] = list.data.map((m) => ({\n id: m.id,\n created: m.created,\n ownedBy: m.owned_by,\n }));\n return ok(models);\n } catch (e: unknown) {\n return err(\n new ConfigError(\n `Failed to discover models from ${config.baseUrl}: ${getErrorMessage(e)}. ` +\n `Verify NEXUS_OPENAI_COMPAT_URL and NEXUS_OPENAI_COMPAT_KEY, then retry.`\n )\n );\n }\n}\n\n/**\n * Create an OpenAIAdapter pointed at the gateway for a specific model ID,\n * wrapped with usage recording so every completion appends a UsageEvent\n * to the JSONL log consumed by `nexus-agents usage`.\n *\n * The wrapper is transparent — same IModelAdapter contract, same fields,\n * same error handling. Recording is best-effort (telemetry never fails\n * the user's call).\n *\n * When invoked via MCP, the host harness's model identifier is passed\n * through verbatim — nexus-agents doesn't second-guess what the host is\n * already routing.\n */\nexport function createOpenAICompatAdapter(\n modelId: string,\n config: OpenAICompatConfig\n): IModelAdapter {\n const inner = new OpenAIAdapter({ modelId, apiKey: config.apiKey, baseUrl: config.baseUrl });\n return withUsageRecording(inner);\n}\n\n/**\n * Wrap any IModelAdapter so that successful + failed `complete()` calls\n * append a UsageEvent to the on-disk usage log. Stream calls aren't yet\n * instrumented (a future PR can add streaming-aware recording).\n *\n * The returned object preserves the IModelAdapter contract identically;\n * downstream code can't tell the difference except that one extra JSONL\n * line gets written per call.\n */\nfunction withUsageRecording(inner: IModelAdapter): IModelAdapter {\n const wrapped: IModelAdapter = {\n providerId: inner.providerId,\n modelId: inner.modelId,\n capabilities: inner.capabilities,\n countTokens: (text) => inner.countTokens(text),\n validateConfig: () => inner.validateConfig(),\n stream: (request) => inner.stream(request),\n async complete(request: CompletionRequest): Promise<Result<CompletionResponse, ModelError>> {\n const start = getTimeProvider().now();\n const result = await inner.complete(request);\n const latencyMs = getTimeProvider().now() - start;\n try {\n if (result.ok) {\n const u = result.value.usage;\n // Full-registry pricing with provenance (#4165): `priced: false`\n // marks the $0 as UNPRICED (unmeasured), not a real $0.\n const cost = computeCostDetail(inner.modelId, u.inputTokens, u.outputTokens);\n recordUsageEvent({\n timestamp: new Date().toISOString(),\n modelId: inner.modelId,\n providerId: inner.providerId,\n inputTokens: u.inputTokens,\n outputTokens: u.outputTokens,\n usdCost: cost.costUsd,\n latencyMs,\n success: true,\n priced: cost.priced,\n ...(cost.priced ? { priceSource: cost.resolvedId } : {}),\n });\n } else {\n recordUsageEvent({\n timestamp: new Date().toISOString(),\n modelId: inner.modelId,\n providerId: inner.providerId,\n inputTokens: 0,\n outputTokens: 0,\n usdCost: 0,\n latencyMs,\n success: false,\n errorCode: result.error.code,\n });\n }\n } catch {\n // Telemetry must not break user calls.\n }\n return result;\n },\n };\n attachListModels(wrapped, inner);\n return wrapped;\n}\n\n/**\n * (#2540) Forward `listModels` through the wrapper when the inner adapter\n * exposes one. Only attach when defined so the wrapper's `listModels?:`\n * hint stays accurate for the resolver. The inner reference is captured\n * by closure so the forwarded call binds `this` to the inner adapter.\n */\nfunction attachListModels(wrapped: IModelAdapter, inner: IModelAdapter): void {\n const list = inner.listModels?.bind(inner);\n if (list === undefined) return;\n wrapped.listModels = (): Promise<readonly ModelMetadata[]> => list();\n}\n\n/**\n * Convenience: read env, discover, return adapter instances for every\n * discovered model. Returns `null` (not an error) when env vars aren't set\n * — the caller treats unset gateway as \"no adapter from this source.\"\n *\n * Use case: the unified registry / factory calls this at startup; if the\n * operator has configured a gateway, every discovered model becomes a\n * dispatch target alongside the existing claude/codex/gemini/opencode\n * adapter slots.\n */\nexport async function buildOpenAICompatAdapters(): Promise<Result<\n readonly IModelAdapter[],\n ConfigError\n> | null> {\n const config = readOpenAICompatEnv();\n if (config === null) return null;\n const discovered = await discoverModels(config);\n if (!discovered.ok) return discovered;\n return ok(discovered.value.map((m) => createOpenAICompatAdapter(m.id, config)));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA8BA,SAAS,oBAAoB;AAI7B,IAAM,SAAS,aAAa,EAAE,WAAW,kBAAkB,CAAC;AAYrD,SAAS,oBAAoB,MAA4C;AAC9E,QAAM,MAAM,eAAe,IAAI;AAC/B,MAAI,QAAQ,KAAM,QAAO;AAEzB,QAAM,SAAS,gBAAgB,KAAK,IAAI;AACxC,MAAI,WAAW,KAAM,QAAO;AAE5B,QAAM,UAAU,2BAA2B,MAAM;AACjD,MAAI,YAAY,MAAM;AACpB,WAAO,MAAM,8DAA8D,EAAE,KAAK,CAAC;AACnF,WAAO;AAAA,EACT;AAEA,QAAM,UAAU,OAAO,QAAQ,YAAY,WAAW,QAAQ,QAAQ,KAAK,IAAI;AAC/E,QAAM,YAAY,OAAO,QAAQ,WAAW,WAAW,QAAQ,OAAO,KAAK,IAAI;AAC/E,MAAI,YAAY,MAAM,cAAc,IAAI;AACtC,WAAO,KAAK,mEAAmE,EAAE,KAAK,CAAC;AACvF,WAAO;AAAA,EACT;AAEA,QAAM,SAAS,wBAAwB,SAAS;AAChD,MAAI,WAAW,MAAM;AACnB,WAAO;AAAA,MACL;AAAA,MACA,EAAE,KAAK;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAEA,SAAO,KAAK,6CAA6C,EAAE,SAAS,KAAK,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W;AACxB,UAAQ,aAAa,MAAyC,KAAK;AACrE;AAYA,eAAsB,4BAGZ;AACR,QAAM,SAAS,oBAAoB;AACnC,MAAI,WAAW,KAAM,QAAO;AAC5B,QAAM,aAAa,MAAM,eAAe,MAAM;AAC9C,MAAI,CAAC,WAAW,GAAI,QAAO;AAC3B,SAAO,GAAG,WAAW,MAAM,IAAI,CAAC,MAAM,0BAA0B,EAAE,IAAI,MAAM,CAAC,CAAC;AAChF;","names":["err"]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getErrorMessage,
|
|
5
5
|
getTimeProvider,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
8
8
|
|
|
9
9
|
// src/context/session-memory.ts
|
|
10
10
|
import * as fs from "fs";
|
|
@@ -352,4 +352,4 @@ export {
|
|
|
352
352
|
SessionMemory,
|
|
353
353
|
createSessionMemory
|
|
354
354
|
};
|
|
355
|
-
//# sourceMappingURL=chunk-
|
|
355
|
+
//# sourceMappingURL=chunk-DSUFV2ZN.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
TASK_CATEGORIES,
|
|
3
3
|
getAdaptiveBonus,
|
|
4
4
|
getOutcomeStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
6
6
|
|
|
7
7
|
// src/cli/doctor-deep.ts
|
|
8
8
|
var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
|
|
@@ -106,4 +106,4 @@ export {
|
|
|
106
106
|
runDeepDiagnostics,
|
|
107
107
|
formatDeepDiagnostics
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-FWW5GCEH.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-6T3EPABN.js";
|
|
6
6
|
import {
|
|
7
7
|
SessionMemory
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DSUFV2ZN.js";
|
|
9
9
|
import {
|
|
10
10
|
StatsOnlyAdapter,
|
|
11
11
|
ensureSharedMemoryRegistry
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-KSQSWEFH.js";
|
|
16
16
|
import {
|
|
17
17
|
generateId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-U5KSLUZ6.js";
|
|
19
19
|
import {
|
|
20
20
|
ErrorCode,
|
|
21
21
|
NexusError,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
getTimeProvider,
|
|
29
29
|
ok,
|
|
30
30
|
setSharedMobiMemDbPathResolver
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
32
32
|
import {
|
|
33
33
|
nexusDataPath
|
|
34
34
|
} from "./chunk-DHVMSIT5.js";
|
|
@@ -5552,4 +5552,4 @@ export {
|
|
|
5552
5552
|
reinitializeMemoryBackends,
|
|
5553
5553
|
ToolMemoryManager
|
|
5554
5554
|
};
|
|
5555
|
-
//# sourceMappingURL=chunk-
|
|
5555
|
+
//# sourceMappingURL=chunk-GG7MGRQ6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSecurityPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6MCSD37T.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzeGitHubRepo
|
|
6
6
|
} from "./chunk-HFOQKCD2.js";
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
DEFAULT_TASK_TTL_MS,
|
|
19
19
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
20
20
|
clampTaskTtl
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5CMDYYNC.js";
|
|
22
22
|
import {
|
|
23
23
|
executeExpert
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LSWGHIJK.js";
|
|
25
25
|
import {
|
|
26
26
|
JobStatusSchema,
|
|
27
27
|
abortJob,
|
|
@@ -42,21 +42,21 @@ import {
|
|
|
42
42
|
simulationDeniedResult,
|
|
43
43
|
toJobSummary,
|
|
44
44
|
writeJobCancelled
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-Q7TALELN.js";
|
|
46
46
|
import {
|
|
47
47
|
normalizeTopicToCanonical,
|
|
48
48
|
synthesizeResearch
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-OOGGQ2NA.js";
|
|
50
50
|
import {
|
|
51
51
|
IssueTriage
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-6B5VQ2SY.js";
|
|
53
53
|
import {
|
|
54
54
|
resolveEnvMode,
|
|
55
55
|
sanitizeInput
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-S3H4VWN5.js";
|
|
57
57
|
import {
|
|
58
58
|
withPrerequisite
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-K6HJLOPA.js";
|
|
60
60
|
import {
|
|
61
61
|
NOOP_NOTIFIER,
|
|
62
62
|
RateLimiter,
|
|
@@ -79,12 +79,12 @@ import {
|
|
|
79
79
|
withAuditTrail,
|
|
80
80
|
withProgressHeartbeat,
|
|
81
81
|
wrapToolWithTimeout
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-2O63LDYB.js";
|
|
83
83
|
import {
|
|
84
84
|
createAuditTrail,
|
|
85
85
|
createGraphAuditBridge,
|
|
86
86
|
emitPipelinePolicyEvent
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-42ZSRIEX.js";
|
|
88
88
|
import {
|
|
89
89
|
addResearchPaper,
|
|
90
90
|
addSourceToRegistry,
|
|
@@ -112,15 +112,15 @@ import {
|
|
|
112
112
|
parseRegistry,
|
|
113
113
|
sourceExistsInRegistry,
|
|
114
114
|
summarizeContextForPrompt
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-R76LLKT2.js";
|
|
116
116
|
import {
|
|
117
117
|
getTokenEnvVars,
|
|
118
118
|
resolveToken
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-XLJCXM7L.js";
|
|
120
120
|
import {
|
|
121
121
|
loadPapersRegistry,
|
|
122
122
|
loadTechniquesRegistry
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-YH5U3XCP.js";
|
|
124
124
|
import {
|
|
125
125
|
resolveInsideRoot
|
|
126
126
|
} from "./chunk-NUBSJGQZ.js";
|
|
@@ -129,14 +129,14 @@ import {
|
|
|
129
129
|
MemoryImportance,
|
|
130
130
|
calculateTextJaccardSimilarity,
|
|
131
131
|
getToolMemory
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-GG7MGRQ6.js";
|
|
133
133
|
import {
|
|
134
134
|
STOPWORDS,
|
|
135
135
|
truncateWithInfo
|
|
136
136
|
} from "./chunk-6T3EPABN.js";
|
|
137
137
|
import {
|
|
138
138
|
createSessionMemory
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-DSUFV2ZN.js";
|
|
140
140
|
import {
|
|
141
141
|
BUILT_IN_EXPERTS,
|
|
142
142
|
BuiltInExpertTypeSchema,
|
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
createEvent,
|
|
152
152
|
getGlobalEventBus,
|
|
153
153
|
getGlobalRegistry
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-VKVJSPHJ.js";
|
|
155
155
|
import {
|
|
156
156
|
CliDetectionCache,
|
|
157
157
|
asRecord,
|
|
@@ -159,19 +159,19 @@ import {
|
|
|
159
159
|
getAvailableClis,
|
|
160
160
|
sleep,
|
|
161
161
|
withTimeout
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-S7PFS6PX.js";
|
|
163
163
|
import {
|
|
164
164
|
DEFAULTS
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-I32MYAT5.js";
|
|
166
166
|
import {
|
|
167
167
|
getAvailabilityCache,
|
|
168
168
|
getCliForModelId,
|
|
169
169
|
resolveFallback
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-RI3BFANI.js";
|
|
171
171
|
import {
|
|
172
172
|
generateHyphenId,
|
|
173
173
|
generateUUID
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-U5KSLUZ6.js";
|
|
175
175
|
import {
|
|
176
176
|
AGENT_ROUTER_TIMEOUTS,
|
|
177
177
|
API_TIMEOUTS,
|
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
selectStrategyByManifest,
|
|
264
264
|
toExpertTaskAnalysisResult,
|
|
265
265
|
withStep
|
|
266
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
267
267
|
import {
|
|
268
268
|
ensureLearningDir,
|
|
269
269
|
getMetaOutcomesFile,
|
|
@@ -26298,7 +26298,7 @@ function execIdFields(executionId) {
|
|
|
26298
26298
|
async function populateUnifiedContextOnState(state, options) {
|
|
26299
26299
|
const taskCandidate = state["task"];
|
|
26300
26300
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
26301
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
26301
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-MPZ7T4VA.js");
|
|
26302
26302
|
const category = inferTaskCategory2(taskCandidate);
|
|
26303
26303
|
const executionId = options?.executionId;
|
|
26304
26304
|
const execFields = execIdFields(executionId);
|
|
@@ -41572,7 +41572,7 @@ async function tryIssueTriage(task) {
|
|
|
41572
41572
|
try {
|
|
41573
41573
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
41574
41574
|
if (issueMatch === null) return null;
|
|
41575
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
41575
|
+
const { createIssueTriage } = await import("./issue-triage-7TWTN6LI.js");
|
|
41576
41576
|
const triage = createIssueTriage();
|
|
41577
41577
|
const owner = issueMatch[1] ?? "";
|
|
41578
41578
|
const num = issueMatch[2] ?? "";
|
|
@@ -41600,7 +41600,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
41600
41600
|
]);
|
|
41601
41601
|
async function classifyWithLLM(task) {
|
|
41602
41602
|
try {
|
|
41603
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
41603
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-EK362QGQ.js");
|
|
41604
41604
|
const prompt = [
|
|
41605
41605
|
"Classify this task into exactly one pipeline template.",
|
|
41606
41606
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -43241,7 +43241,7 @@ var memoryInitPromise = null;
|
|
|
43241
43241
|
async function initPipelineMemory() {
|
|
43242
43242
|
if (cachedMemory !== null) return cachedMemory;
|
|
43243
43243
|
try {
|
|
43244
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
43244
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-TVV2IOGB.js");
|
|
43245
43245
|
const { getLearningDir } = await import("./learning-persistence-M3OTCCNI.js");
|
|
43246
43246
|
const mem = createSessionMemory2(getLearningDir());
|
|
43247
43247
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
@@ -43303,7 +43303,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
43303
43303
|
callRecord(routingMemoryCache);
|
|
43304
43304
|
return;
|
|
43305
43305
|
}
|
|
43306
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
43306
|
+
routingMemoryInitPromise ??= import("./routing-memory-PP4UJVH4.js").then(({ createRoutingMemory }) => {
|
|
43307
43307
|
routingMemoryCache ??= createRoutingMemory();
|
|
43308
43308
|
return routingMemoryCache;
|
|
43309
43309
|
}).catch((error) => {
|
|
@@ -43337,7 +43337,7 @@ ${text}` : "";
|
|
|
43337
43337
|
}
|
|
43338
43338
|
async function getWeatherContext() {
|
|
43339
43339
|
try {
|
|
43340
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
43340
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-XPDW6LGI.js");
|
|
43341
43341
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
43342
43342
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
43343
43343
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -43355,7 +43355,7 @@ ${lines}
|
|
|
43355
43355
|
}
|
|
43356
43356
|
async function getMemoryContext(task) {
|
|
43357
43357
|
try {
|
|
43358
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
43358
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-TVV2IOGB.js");
|
|
43359
43359
|
const { getLearningDir } = await import("./learning-persistence-M3OTCCNI.js");
|
|
43360
43360
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
43361
43361
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
@@ -43467,7 +43467,7 @@ ${contextBlock}`;
|
|
|
43467
43467
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
43468
43468
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
43469
43469
|
try {
|
|
43470
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
43470
|
+
const { executeVoting } = await import("./consensus-vote-MMZTCPL7.js");
|
|
43471
43471
|
const votingResult = await executeVoting(
|
|
43472
43472
|
{
|
|
43473
43473
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -43904,7 +43904,7 @@ async function searchCodebaseForTask(task) {
|
|
|
43904
43904
|
}
|
|
43905
43905
|
async function queryResearchRegistry(task) {
|
|
43906
43906
|
try {
|
|
43907
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
43907
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-VCUOMHPD.js");
|
|
43908
43908
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
43909
43909
|
if (topic === void 0) return null;
|
|
43910
43910
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -43975,7 +43975,7 @@ function createScanStageWrapper() {
|
|
|
43975
43975
|
try {
|
|
43976
43976
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
43977
43977
|
if (slug !== void 0) {
|
|
43978
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
43978
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-VSQWMONM.js");
|
|
43979
43979
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
43980
43980
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
43981
43981
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -46935,7 +46935,7 @@ var GitHubTaskTracker = class {
|
|
|
46935
46935
|
cachedProvider = null;
|
|
46936
46936
|
async getProvider() {
|
|
46937
46937
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
46938
|
-
const { createScmProvider } = await import("./factory-
|
|
46938
|
+
const { createScmProvider } = await import("./factory-XBUQP3UB.js");
|
|
46939
46939
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
46940
46940
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
46941
46941
|
this.cachedProvider = result.value;
|
|
@@ -47742,7 +47742,7 @@ async function probeSource(source, includeModelIds) {
|
|
|
47742
47742
|
}
|
|
47743
47743
|
}
|
|
47744
47744
|
async function defaultSources(includeOpenRouter) {
|
|
47745
|
-
const { createAllAdapters: createAllAdapters2 } = await import("./factory-
|
|
47745
|
+
const { createAllAdapters: createAllAdapters2 } = await import("./factory-GOO7MH5G.js");
|
|
47746
47746
|
const adapters = createAllAdapters2();
|
|
47747
47747
|
return buildDefaultModelSources(adapters, { includeOpenRouter });
|
|
47748
47748
|
}
|
|
@@ -51809,4 +51809,4 @@ export {
|
|
|
51809
51809
|
shutdownFeedbackSubscriber,
|
|
51810
51810
|
createEventBusBridge
|
|
51811
51811
|
};
|
|
51812
|
-
//# sourceMappingURL=chunk-
|
|
51812
|
+
//# sourceMappingURL=chunk-HANP6FHM.js.map
|