nexus-agents 11.1.4 → 11.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ast-rule-runner-DV7BPCPY.js → ast-rule-runner-UEWL3YQZ.js} +10 -4
- package/dist/{child-mcp-config-VF2A6G5A.js → child-mcp-config-K6JDLQLF.js} +11 -5
- package/dist/{child-mcp-config-VF2A6G5A.js.map → child-mcp-config-K6JDLQLF.js.map} +1 -1
- package/dist/{chunk-SDGAFACO.js → chunk-25F2TZ7W.js} +81 -69
- package/dist/{chunk-SDGAFACO.js.map → chunk-25F2TZ7W.js.map} +1 -1
- package/dist/{chunk-ZT7YVYHN.js → chunk-3JGDITTW.js} +13 -9
- package/dist/{chunk-ZT7YVYHN.js.map → chunk-3JGDITTW.js.map} +1 -1
- package/dist/{chunk-EDMDLLIW.js → chunk-3ZRZPYDN.js} +5 -3
- package/dist/{chunk-EDMDLLIW.js.map → chunk-3ZRZPYDN.js.map} +1 -1
- package/dist/{chunk-NLFCAEEK.js → chunk-4S77S56F.js} +2 -2
- package/dist/{chunk-2VS5BGTI.js → chunk-5KBOQWCM.js} +6 -4
- package/dist/{chunk-2VS5BGTI.js.map → chunk-5KBOQWCM.js.map} +1 -1
- package/dist/{chunk-TZXLHU47.js → chunk-5S5YPIET.js} +14 -10
- package/dist/{chunk-TZXLHU47.js.map → chunk-5S5YPIET.js.map} +1 -1
- package/dist/{chunk-4PN3UVZV.js → chunk-6TBRXZY7.js} +1 -193
- package/dist/chunk-6TBRXZY7.js.map +1 -0
- package/dist/{chunk-M2DCIFPW.js → chunk-6ZTMMN2N.js} +2 -2
- package/dist/{chunk-SJGCOT6H.js → chunk-7LKX7AUQ.js} +2 -2
- package/dist/chunk-BLJIQS7C.js +1677 -0
- package/dist/chunk-BLJIQS7C.js.map +1 -0
- package/dist/{chunk-GFRLZTUB.js → chunk-DSGNECCD.js} +6 -4
- package/dist/{chunk-GFRLZTUB.js.map → chunk-DSGNECCD.js.map} +1 -1
- package/dist/{chunk-Q5Y3LGXK.js → chunk-FGR5X76Q.js} +32 -22
- package/dist/{chunk-Q5Y3LGXK.js.map → chunk-FGR5X76Q.js.map} +1 -1
- package/dist/chunk-GR6WCJWY.js +301 -0
- package/dist/chunk-GR6WCJWY.js.map +1 -0
- package/dist/{chunk-BZJ7SXRH.js → chunk-HQ2SMW4Y.js} +3 -3
- package/dist/{chunk-WPALBPDO.js → chunk-HT5UAK7E.js} +36 -28
- package/dist/{chunk-WPALBPDO.js.map → chunk-HT5UAK7E.js.map} +1 -1
- package/dist/{chunk-4IN7IFMK.js → chunk-IRH7QS4M.js} +2 -2
- package/dist/{chunk-CK2LRTUB.js → chunk-JFW3CQS5.js} +23 -17
- package/dist/{chunk-CK2LRTUB.js.map → chunk-JFW3CQS5.js.map} +1 -1
- package/dist/{chunk-C73VZSC5.js → chunk-JZYTBKAP.js} +2 -2
- package/dist/{chunk-ICXSPHHI.js → chunk-KHRUUX22.js} +9 -7
- package/dist/{chunk-ICXSPHHI.js.map → chunk-KHRUUX22.js.map} +1 -1
- package/dist/{chunk-7TP54NKY.js → chunk-KUT24IWT.js} +5 -3
- package/dist/{chunk-7TP54NKY.js.map → chunk-KUT24IWT.js.map} +1 -1
- package/dist/{chunk-GOKCPKDZ.js → chunk-LGRJPOE6.js} +10 -8
- package/dist/{chunk-GOKCPKDZ.js.map → chunk-LGRJPOE6.js.map} +1 -1
- package/dist/{chunk-ASNHIU5S.js → chunk-LQWRLK7U.js} +5 -3
- package/dist/{chunk-ASNHIU5S.js.map → chunk-LQWRLK7U.js.map} +1 -1
- package/dist/chunk-MTN5VMBX.js +163 -0
- package/dist/chunk-MTN5VMBX.js.map +1 -0
- package/dist/{chunk-IP6QYHQQ.js → chunk-NNYNYXMV.js} +3 -3
- package/dist/{chunk-GMP3RR57.js → chunk-NXLIVP3F.js} +8 -6
- package/dist/{chunk-GMP3RR57.js.map → chunk-NXLIVP3F.js.map} +1 -1
- package/dist/{chunk-AMO3NPWK.js → chunk-PRZN65FY.js} +7 -5
- package/dist/{chunk-AMO3NPWK.js.map → chunk-PRZN65FY.js.map} +1 -1
- package/dist/{chunk-TVY7RO3N.js → chunk-PX6N32YZ.js} +8 -6
- package/dist/{chunk-TVY7RO3N.js.map → chunk-PX6N32YZ.js.map} +1 -1
- package/dist/{chunk-DXXYDYAC.js → chunk-QOAIAAT5.js} +34 -22
- package/dist/{chunk-DXXYDYAC.js.map → chunk-QOAIAAT5.js.map} +1 -1
- package/dist/{chunk-MX5TGEKS.js → chunk-QUKC5T4A.js} +10 -6
- package/dist/{chunk-MX5TGEKS.js.map → chunk-QUKC5T4A.js.map} +1 -1
- package/dist/{chunk-6GRCHU72.js → chunk-R4TXJKS3.js} +6 -4
- package/dist/{chunk-6GRCHU72.js.map → chunk-R4TXJKS3.js.map} +1 -1
- package/dist/{chunk-Y256EPFV.js → chunk-R7L2IEJR.js} +5 -3
- package/dist/{chunk-Y256EPFV.js.map → chunk-R7L2IEJR.js.map} +1 -1
- package/dist/{chunk-UO6AQXTT.js → chunk-S4SQYXVK.js} +6032 -8684
- package/dist/chunk-S4SQYXVK.js.map +1 -0
- package/dist/{chunk-U5VVV5FM.js → chunk-S7M3QHO6.js} +5 -3
- package/dist/{chunk-U5VVV5FM.js.map → chunk-S7M3QHO6.js.map} +1 -1
- package/dist/{chunk-57WNH6BV.js → chunk-SBXLWHYC.js} +10 -6
- package/dist/{chunk-57WNH6BV.js.map → chunk-SBXLWHYC.js.map} +1 -1
- package/dist/chunk-SYTFRVWX.js +39 -0
- package/dist/chunk-SYTFRVWX.js.map +1 -0
- package/dist/{chunk-LJQPCRYR.js → chunk-TDVR4XDT.js} +15 -9
- package/dist/{chunk-LJQPCRYR.js.map → chunk-TDVR4XDT.js.map} +1 -1
- package/dist/{chunk-UORGBYIM.js → chunk-TE4HHEXW.js} +8 -6
- package/dist/{chunk-UORGBYIM.js.map → chunk-TE4HHEXW.js.map} +1 -1
- package/dist/chunk-UFAK5UGH.js +423 -0
- package/dist/chunk-UFAK5UGH.js.map +1 -0
- package/dist/chunk-VJZRLJYD.js +346 -0
- package/dist/chunk-VJZRLJYD.js.map +1 -0
- package/dist/{chunk-WLCMCFPX.js → chunk-VQSV72I6.js} +7 -5
- package/dist/{chunk-WLCMCFPX.js.map → chunk-VQSV72I6.js.map} +1 -1
- package/dist/{chunk-FITWRS42.js → chunk-WSRFLAXD.js} +3 -3
- package/dist/{chunk-3L4U5MPY.js → chunk-XOEDAVAF.js} +11 -9
- package/dist/{chunk-3L4U5MPY.js.map → chunk-XOEDAVAF.js.map} +1 -1
- package/dist/{chunk-EH2J65CZ.js → chunk-ZHWZSN3F.js} +4 -4
- package/dist/cli-auth-probe-HCN5ROQK.js +13 -0
- package/dist/{cli-circuit-breaker-YPSYABCT.js → cli-circuit-breaker-USQTW7LC.js} +10 -4
- package/dist/{cli-readiness-2XJO4JRX.js → cli-readiness-UKJTOC7G.js} +14 -8
- package/dist/cli-server-gateway-K5AS6NL5.js +40 -0
- package/dist/cli.js +86 -74
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-Q4RX6TW7.js → composite-router-Z5JNNAHK.js} +9 -3
- package/dist/{consensus-vote-V3CNOCVD.js → consensus-vote-ZRBGPE2N.js} +24 -18
- package/dist/{context-retriever-BSMYABVH.js → context-retriever-SE4FED6S.js} +15 -9
- package/dist/doctor-deep-FYF4SQGL.js +22 -0
- package/dist/doctor-gateway-report-TEBJ5XN5.js +26 -0
- package/dist/{doctor-live-NA5US5LN.js → doctor-live-GTJVAOK7.js} +22 -15
- package/dist/{doctor-live-NA5US5LN.js.map → doctor-live-GTJVAOK7.js.map} +1 -1
- package/dist/expert-bridge-KUAWX2ZC.js +26 -0
- package/dist/factory-3TYQRDEB.js +23 -0
- package/dist/factory-NEFQHS47.js +37 -0
- package/dist/{improvement-review-IPNG3PDM.js → improvement-review-67WG4TGA.js} +13 -7
- package/dist/index.js +61 -51
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-WNJ46SLH.js → init-opencode-725YQUBT.js} +14 -7
- package/dist/{init-opencode-WNJ46SLH.js.map → init-opencode-725YQUBT.js.map} +1 -1
- package/dist/issue-triage-KCY7KNJX.js +26 -0
- package/dist/{model-config-helpers-XZ6UCR4T.js → model-config-helpers-EIQOUL2O.js} +5 -5
- package/dist/{openai-compat-adapter-QIZKYV3M.js → openai-compat-adapter-5XRY7CAO.js} +12 -6
- package/dist/{outcome-store-adapter-WR2JZ25G.js → outcome-store-adapter-LAJVBCNK.js} +5 -6
- package/dist/{outcome-store-adapter-WR2JZ25G.js.map → outcome-store-adapter-LAJVBCNK.js.map} +1 -1
- package/dist/{pr-reviewer-helpers-ACMJYKXP.js → pr-reviewer-helpers-AK65YGB6.js} +11 -5
- package/dist/{registry-command-J6O6G76E.js → registry-command-X4LJU23O.js} +6 -5
- package/dist/{registry-command-J6O6G76E.js.map → registry-command-X4LJU23O.js.map} +1 -1
- package/dist/{repo-security-plan-TBK63H22.js → repo-security-plan-UDATQA3H.js} +10 -4
- package/dist/research-helpers-synthesize-TCBKMTRH.js +22 -0
- package/dist/routing-memory-BK2ZSPIT.js +22 -0
- package/dist/{session-memory-C5K2QR3W.js → session-memory-S33AHGTC.js} +10 -4
- package/dist/setup-config-KTPO3TW6.js +19 -0
- package/dist/{setup-custom-api-QUBIDWGI.js → setup-custom-api-67QIOFMI.js} +11 -5
- package/dist/{setup-custom-api-QUBIDWGI.js.map → setup-custom-api-67QIOFMI.js.map} +1 -1
- package/dist/setup-data-dir-3EGE3GS3.js +40 -0
- package/dist/{tool-memory-AUYEY7EZ.js → tool-memory-DGQJ27XB.js} +12 -6
- package/dist/unified-registry-C4LY2FPT.js +41 -0
- package/dist/{weather-report-ETPVDBDS.js → weather-report-6SRJJPFL.js} +9 -3
- package/package.json +1 -1
- package/dist/chunk-4PN3UVZV.js.map +0 -1
- package/dist/chunk-UO6AQXTT.js.map +0 -1
- package/dist/cli-auth-probe-GUK3NXW3.js +0 -11
- package/dist/cli-server-gateway-W3CVRKE4.js +0 -34
- package/dist/doctor-deep-JA2FN4GG.js +0 -16
- package/dist/doctor-gateway-report-TIUOGXDM.js +0 -20
- package/dist/expert-bridge-ZQFBHLCD.js +0 -20
- package/dist/factory-USTPCUWD.js +0 -31
- package/dist/factory-Z5NBVADZ.js +0 -17
- package/dist/issue-triage-JSLR4JTR.js +0 -20
- package/dist/research-helpers-synthesize-33F7T37I.js +0 -16
- package/dist/routing-memory-5JPC5QKO.js +0 -16
- package/dist/setup-config-QM6S2GEN.js +0 -13
- package/dist/setup-data-dir-42KQZWUJ.js +0 -34
- package/dist/unified-registry-P5NUQD75.js +0 -35
- /package/dist/{ast-rule-runner-DV7BPCPY.js.map → ast-rule-runner-UEWL3YQZ.js.map} +0 -0
- /package/dist/{chunk-NLFCAEEK.js.map → chunk-4S77S56F.js.map} +0 -0
- /package/dist/{chunk-M2DCIFPW.js.map → chunk-6ZTMMN2N.js.map} +0 -0
- /package/dist/{chunk-SJGCOT6H.js.map → chunk-7LKX7AUQ.js.map} +0 -0
- /package/dist/{chunk-BZJ7SXRH.js.map → chunk-HQ2SMW4Y.js.map} +0 -0
- /package/dist/{chunk-4IN7IFMK.js.map → chunk-IRH7QS4M.js.map} +0 -0
- /package/dist/{chunk-C73VZSC5.js.map → chunk-JZYTBKAP.js.map} +0 -0
- /package/dist/{chunk-IP6QYHQQ.js.map → chunk-NNYNYXMV.js.map} +0 -0
- /package/dist/{chunk-FITWRS42.js.map → chunk-WSRFLAXD.js.map} +0 -0
- /package/dist/{chunk-EH2J65CZ.js.map → chunk-ZHWZSN3F.js.map} +0 -0
- /package/dist/{cli-auth-probe-GUK3NXW3.js.map → cli-auth-probe-HCN5ROQK.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-YPSYABCT.js.map → cli-circuit-breaker-USQTW7LC.js.map} +0 -0
- /package/dist/{cli-readiness-2XJO4JRX.js.map → cli-readiness-UKJTOC7G.js.map} +0 -0
- /package/dist/{cli-server-gateway-W3CVRKE4.js.map → cli-server-gateway-K5AS6NL5.js.map} +0 -0
- /package/dist/{composite-router-Q4RX6TW7.js.map → composite-router-Z5JNNAHK.js.map} +0 -0
- /package/dist/{consensus-vote-V3CNOCVD.js.map → consensus-vote-ZRBGPE2N.js.map} +0 -0
- /package/dist/{context-retriever-BSMYABVH.js.map → context-retriever-SE4FED6S.js.map} +0 -0
- /package/dist/{doctor-deep-JA2FN4GG.js.map → doctor-deep-FYF4SQGL.js.map} +0 -0
- /package/dist/{doctor-gateway-report-TIUOGXDM.js.map → doctor-gateway-report-TEBJ5XN5.js.map} +0 -0
- /package/dist/{expert-bridge-ZQFBHLCD.js.map → expert-bridge-KUAWX2ZC.js.map} +0 -0
- /package/dist/{factory-USTPCUWD.js.map → factory-3TYQRDEB.js.map} +0 -0
- /package/dist/{factory-Z5NBVADZ.js.map → factory-NEFQHS47.js.map} +0 -0
- /package/dist/{improvement-review-IPNG3PDM.js.map → improvement-review-67WG4TGA.js.map} +0 -0
- /package/dist/{issue-triage-JSLR4JTR.js.map → issue-triage-KCY7KNJX.js.map} +0 -0
- /package/dist/{model-config-helpers-XZ6UCR4T.js.map → model-config-helpers-EIQOUL2O.js.map} +0 -0
- /package/dist/{openai-compat-adapter-QIZKYV3M.js.map → openai-compat-adapter-5XRY7CAO.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-ACMJYKXP.js.map → pr-reviewer-helpers-AK65YGB6.js.map} +0 -0
- /package/dist/{repo-security-plan-TBK63H22.js.map → repo-security-plan-UDATQA3H.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-33F7T37I.js.map → research-helpers-synthesize-TCBKMTRH.js.map} +0 -0
- /package/dist/{routing-memory-5JPC5QKO.js.map → routing-memory-BK2ZSPIT.js.map} +0 -0
- /package/dist/{session-memory-C5K2QR3W.js.map → session-memory-S33AHGTC.js.map} +0 -0
- /package/dist/{setup-config-QM6S2GEN.js.map → setup-config-KTPO3TW6.js.map} +0 -0
- /package/dist/{setup-data-dir-42KQZWUJ.js.map → setup-data-dir-3EGE3GS3.js.map} +0 -0
- /package/dist/{tool-memory-AUYEY7EZ.js.map → tool-memory-DGQJ27XB.js.map} +0 -0
- /package/dist/{unified-registry-P5NUQD75.js.map → unified-registry-C4LY2FPT.js.map} +0 -0
- /package/dist/{weather-report-ETPVDBDS.js.map → weather-report-6SRJJPFL.js.map} +0 -0
|
@@ -9,12 +9,18 @@ import {
|
|
|
9
9
|
getBuiltInAstRulesPath,
|
|
10
10
|
loadRules,
|
|
11
11
|
runAstQaRules
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-KUT24IWT.js";
|
|
13
|
+
import "./chunk-S4SQYXVK.js";
|
|
14
14
|
import "./chunk-XBEKMUTO.js";
|
|
15
|
+
import "./chunk-VJZRLJYD.js";
|
|
16
|
+
import "./chunk-BLJIQS7C.js";
|
|
15
17
|
import "./chunk-RUHKJC3X.js";
|
|
18
|
+
import "./chunk-UFAK5UGH.js";
|
|
19
|
+
import "./chunk-GR6WCJWY.js";
|
|
16
20
|
import "./chunk-CH6IBWXH.js";
|
|
17
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-6TBRXZY7.js";
|
|
22
|
+
import "./chunk-SYTFRVWX.js";
|
|
23
|
+
import "./chunk-MTN5VMBX.js";
|
|
18
24
|
import "./chunk-PX6F3LHL.js";
|
|
19
25
|
export {
|
|
20
26
|
AST_RULE_LANGUAGES,
|
|
@@ -28,4 +34,4 @@ export {
|
|
|
28
34
|
loadRules,
|
|
29
35
|
runAstQaRules
|
|
30
36
|
};
|
|
31
|
-
//# sourceMappingURL=ast-rule-runner-
|
|
37
|
+
//# sourceMappingURL=ast-rule-runner-UEWL3YQZ.js.map
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nexusMkdtempSync
|
|
3
3
|
} from "./chunk-U7HL7FGS.js";
|
|
4
|
-
import
|
|
5
|
-
createLogger
|
|
6
|
-
} from "./chunk-UO6AQXTT.js";
|
|
4
|
+
import "./chunk-S4SQYXVK.js";
|
|
7
5
|
import "./chunk-XBEKMUTO.js";
|
|
6
|
+
import "./chunk-VJZRLJYD.js";
|
|
7
|
+
import "./chunk-BLJIQS7C.js";
|
|
8
8
|
import "./chunk-RUHKJC3X.js";
|
|
9
|
+
import "./chunk-UFAK5UGH.js";
|
|
10
|
+
import {
|
|
11
|
+
createLogger
|
|
12
|
+
} from "./chunk-GR6WCJWY.js";
|
|
9
13
|
import "./chunk-CH6IBWXH.js";
|
|
10
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-6TBRXZY7.js";
|
|
15
|
+
import "./chunk-SYTFRVWX.js";
|
|
16
|
+
import "./chunk-MTN5VMBX.js";
|
|
11
17
|
import "./chunk-PX6F3LHL.js";
|
|
12
18
|
|
|
13
19
|
// src/cli-adapters/child-mcp-config.ts
|
|
@@ -75,4 +81,4 @@ async function generateMcpConfig(options) {
|
|
|
75
81
|
export {
|
|
76
82
|
generateMcpConfig
|
|
77
83
|
};
|
|
78
|
-
//# sourceMappingURL=child-mcp-config-
|
|
84
|
+
//# sourceMappingURL=child-mcp-config-K6JDLQLF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli-adapters/child-mcp-config.ts"],"sourcesContent":["/**\n * nexus-agents/cli-adapters - Child CLI MCP Config Generator\n *\n * Generates MCP server configuration for child Claude CLI sessions so\n * spawned agents can call back into nexus-agents' MCP tools (memory,\n * research, etc.). Used by `pipeline/expert-bridge.ts` to give expert\n * agents tool access. Originally lived under `swe-bench/` (#1413);\n * relocated here in #2515 — the helper is generic CLI-spawn\n * infrastructure, not benchmark-specific.\n *\n * The generated config grants NO tool approvals. It only tells the child\n * where the nexus-agents MCP server is; whether an expert may actually call\n * one of its tools follows the host's Claude permission settings (for\n * example `defaultMode`). Measured 2026-09-24: in auto mode the calls run,\n * in default mode they are refused (#6784). An unused `allowedTools` list\n * that read like a guard but was never passed to the CLI was removed then.\n *\n * @module cli-adapters/child-mcp-config\n */\n\nimport { rm } from 'node:fs/promises';\nimport { rmSync, writeFileSync } from 'node:fs';\nimport { nexusMkdtempSync } from '../config/nexus-tmp-dir.js';\nimport { join } from 'node:path';\nimport { createLogger } from '../core/index.js';\n\nconst logger = createLogger({ component: 'swe-bench-mcp-config' });\n\n// Async finally blocks cannot run after process.exit (#4631). One listener\n// covers concurrent configs; SIGKILL cannot execute any in-process cleanup.\nconst activeMcpDirs = new Set<string>();\n\nfunction cleanupOnExit(): void {\n for (const dir of activeMcpDirs) {\n try {\n rmSync(dir, { recursive: true, force: true });\n } catch (error: unknown) {\n logger.debug('MCP-config exit cleanup failed', {\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n}\n\n/**\n * MCP server entry in Claude CLI config format.\n */\ninterface McpServerEntry {\n readonly command: string;\n readonly args: readonly string[];\n readonly env?: Readonly<Record<string, string>>;\n}\n\n/**\n * MCP config file format for Claude CLI (--mcp-config).\n */\ninterface McpConfigFile {\n readonly mcpServers: Readonly<Record<string, McpServerEntry>>;\n}\n\n/**\n * Options for generating MCP config.\n */\nexport interface McpConfigOptions {\n /** Path to nexus-agents CLI entry point. */\n readonly cliPath?: string;\n /** Additional environment variables for the MCP server. */\n readonly env?: Readonly<Record<string, string>>;\n}\n\n/**\n * Resolves the nexus-agents CLI path.\n * Uses the built dist/cli.js relative to this package.\n */\nfunction resolveCliPath(override?: string): string {\n if (override !== undefined) return override;\n // Resolve relative to this file: src/swe-bench/ → dist/cli.js\n // At runtime we're in dist/swe-bench/, so go up one level\n const distDir = join(__dirname, '..');\n return join(distDir, 'cli.js');\n}\n\n/**\n * Env marker naming a child server (#6795). The child's stdio caller is an\n * expert CLI driven by a model, not the operator, so the child must not\n * measure it at tier 1; `connectTransport` reads this and records the caller\n * as unmeasured.\n */\nconst MCP_CHILD_ENV = 'NEXUS_MCP_CHILD';\n\n/**\n * Builds the MCP config object for a nexus-agents server.\n */\nfunction buildConfig(options?: McpConfigOptions): McpConfigFile {\n const cliPath = resolveCliPath(options?.cliPath);\n\n const entry: McpServerEntry = {\n command: 'node',\n args: [cliPath, '--mode=server'],\n // The child marker is applied LAST so caller-supplied env cannot unset it.\n env: { ...options?.env, [MCP_CHILD_ENV]: '1' },\n };\n\n return {\n mcpServers: {\n 'nexus-agents': entry,\n },\n };\n}\n\n/**\n * Generated MCP config with path and cleanup function.\n */\nexport interface GeneratedMcpConfig {\n /** Path to the generated config file. */\n readonly configPath: string;\n /** Cleanup function to remove temp files. */\n readonly cleanup: () => Promise<void>;\n}\n\n/**\n * Generates an MCP config file for Claude CLI child sessions.\n *\n * Creates a temporary JSON file that can be passed to `claude --mcp-config`.\n * Returns the file path and a cleanup function.\n */\nexport async function generateMcpConfig(options?: McpConfigOptions): Promise<GeneratedMcpConfig> {\n const config = buildConfig(options);\n\n // Creation and exit registration must occur in one turn: async mkdtemp\n // can finish in its worker before JS can register cleanup (#4631).\n const tempDir = nexusMkdtempSync('nexus-mcp-');\n const configPath = join(tempDir, 'mcp-config.json');\n\n if (activeMcpDirs.size === 0) process.on('exit', cleanupOnExit);\n activeMcpDirs.add(tempDir);\n\n const cleanup = async (): Promise<void> => {\n try {\n await rm(tempDir, { recursive: true, force: true });\n activeMcpDirs.delete(tempDir);\n if (activeMcpDirs.size === 0) process.removeListener('exit', cleanupOnExit);\n } catch (e: unknown) {\n logger.debug('Best-effort cleanup failed', {\n error: e instanceof Error ? e.message : String(e),\n });\n }\n };\n\n try {\n // An async open can create the file after exit cleanup lists an empty\n // directory, making its rmdir fail with ENOTEMPTY (#7121).\n writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8');\n return { configPath, cleanup };\n } catch (error: unknown) {\n await cleanup();\n throw error;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/cli-adapters/child-mcp-config.ts"],"sourcesContent":["/**\n * nexus-agents/cli-adapters - Child CLI MCP Config Generator\n *\n * Generates MCP server configuration for child Claude CLI sessions so\n * spawned agents can call back into nexus-agents' MCP tools (memory,\n * research, etc.). Used by `pipeline/expert-bridge.ts` to give expert\n * agents tool access. Originally lived under `swe-bench/` (#1413);\n * relocated here in #2515 — the helper is generic CLI-spawn\n * infrastructure, not benchmark-specific.\n *\n * The generated config grants NO tool approvals. It only tells the child\n * where the nexus-agents MCP server is; whether an expert may actually call\n * one of its tools follows the host's Claude permission settings (for\n * example `defaultMode`). Measured 2026-09-24: in auto mode the calls run,\n * in default mode they are refused (#6784). An unused `allowedTools` list\n * that read like a guard but was never passed to the CLI was removed then.\n *\n * @module cli-adapters/child-mcp-config\n */\n\nimport { rm } from 'node:fs/promises';\nimport { rmSync, writeFileSync } from 'node:fs';\nimport { nexusMkdtempSync } from '../config/nexus-tmp-dir.js';\nimport { join } from 'node:path';\nimport { createLogger } from '../core/index.js';\n\nconst logger = createLogger({ component: 'swe-bench-mcp-config' });\n\n// Async finally blocks cannot run after process.exit (#4631). One listener\n// covers concurrent configs; SIGKILL cannot execute any in-process cleanup.\nconst activeMcpDirs = new Set<string>();\n\nfunction cleanupOnExit(): void {\n for (const dir of activeMcpDirs) {\n try {\n rmSync(dir, { recursive: true, force: true });\n } catch (error: unknown) {\n logger.debug('MCP-config exit cleanup failed', {\n error: error instanceof Error ? error.message : String(error),\n });\n }\n }\n}\n\n/**\n * MCP server entry in Claude CLI config format.\n */\ninterface McpServerEntry {\n readonly command: string;\n readonly args: readonly string[];\n readonly env?: Readonly<Record<string, string>>;\n}\n\n/**\n * MCP config file format for Claude CLI (--mcp-config).\n */\ninterface McpConfigFile {\n readonly mcpServers: Readonly<Record<string, McpServerEntry>>;\n}\n\n/**\n * Options for generating MCP config.\n */\nexport interface McpConfigOptions {\n /** Path to nexus-agents CLI entry point. */\n readonly cliPath?: string;\n /** Additional environment variables for the MCP server. */\n readonly env?: Readonly<Record<string, string>>;\n}\n\n/**\n * Resolves the nexus-agents CLI path.\n * Uses the built dist/cli.js relative to this package.\n */\nfunction resolveCliPath(override?: string): string {\n if (override !== undefined) return override;\n // Resolve relative to this file: src/swe-bench/ → dist/cli.js\n // At runtime we're in dist/swe-bench/, so go up one level\n const distDir = join(__dirname, '..');\n return join(distDir, 'cli.js');\n}\n\n/**\n * Env marker naming a child server (#6795). The child's stdio caller is an\n * expert CLI driven by a model, not the operator, so the child must not\n * measure it at tier 1; `connectTransport` reads this and records the caller\n * as unmeasured.\n */\nconst MCP_CHILD_ENV = 'NEXUS_MCP_CHILD';\n\n/**\n * Builds the MCP config object for a nexus-agents server.\n */\nfunction buildConfig(options?: McpConfigOptions): McpConfigFile {\n const cliPath = resolveCliPath(options?.cliPath);\n\n const entry: McpServerEntry = {\n command: 'node',\n args: [cliPath, '--mode=server'],\n // The child marker is applied LAST so caller-supplied env cannot unset it.\n env: { ...options?.env, [MCP_CHILD_ENV]: '1' },\n };\n\n return {\n mcpServers: {\n 'nexus-agents': entry,\n },\n };\n}\n\n/**\n * Generated MCP config with path and cleanup function.\n */\nexport interface GeneratedMcpConfig {\n /** Path to the generated config file. */\n readonly configPath: string;\n /** Cleanup function to remove temp files. */\n readonly cleanup: () => Promise<void>;\n}\n\n/**\n * Generates an MCP config file for Claude CLI child sessions.\n *\n * Creates a temporary JSON file that can be passed to `claude --mcp-config`.\n * Returns the file path and a cleanup function.\n */\nexport async function generateMcpConfig(options?: McpConfigOptions): Promise<GeneratedMcpConfig> {\n const config = buildConfig(options);\n\n // Creation and exit registration must occur in one turn: async mkdtemp\n // can finish in its worker before JS can register cleanup (#4631).\n const tempDir = nexusMkdtempSync('nexus-mcp-');\n const configPath = join(tempDir, 'mcp-config.json');\n\n if (activeMcpDirs.size === 0) process.on('exit', cleanupOnExit);\n activeMcpDirs.add(tempDir);\n\n const cleanup = async (): Promise<void> => {\n try {\n await rm(tempDir, { recursive: true, force: true });\n activeMcpDirs.delete(tempDir);\n if (activeMcpDirs.size === 0) process.removeListener('exit', cleanupOnExit);\n } catch (e: unknown) {\n logger.debug('Best-effort cleanup failed', {\n error: e instanceof Error ? e.message : String(e),\n });\n }\n };\n\n try {\n // An async open can create the file after exit cleanup lists an empty\n // directory, making its rmdir fail with ENOTEMPTY (#7121).\n writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf-8');\n return { configPath, cleanup };\n } catch (error: unknown) {\n await cleanup();\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,SAAS,UAAU;AACnB,SAAS,QAAQ,qBAAqB;AAEtC,SAAS,YAAY;AAGrB,IAAM,SAAS,aAAa,EAAE,WAAW,uBAAuB,CAAC;AAIjE,IAAM,gBAAgB,oBAAI,IAAY;AAEtC,SAAS,gBAAsB;AAC7B,aAAW,OAAO,eAAe;AAC/B,QAAI;AACF,aAAO,KAAK,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC;AAAA,IAC9C,SAAS,OAAgB;AACvB,aAAO,MAAM,kCAAkC;AAAA,QAC7C,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAAA,MAC9D,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAgCA,SAAS,eAAe,UAA2B;AACjD,MAAI,aAAa,OAAW,QAAO;AAGnC,QAAM,UAAU,KAAK,WAAW,IAAI;AACpC,SAAO,KAAK,SAAS,QAAQ;AAC/B;AAQA,IAAM,gBAAgB;AAKtB,SAAS,YAAY,SAA2C;AAC9D,QAAM,UAAU,eAAe,SAAS,OAAO;AAE/C,QAAM,QAAwB;AAAA,IAC5B,SAAS;AAAA,IACT,MAAM,CAAC,SAAS,eAAe;AAAA;AAAA,IAE/B,KAAK,EAAE,GAAG,SAAS,KAAK,CAAC,aAAa,GAAG,IAAI;AAAA,EAC/C;AAEA,SAAO;AAAA,IACL,YAAY;AAAA,MACV,gBAAgB;AAAA,IAClB;AAAA,EACF;AACF;AAkBA,eAAsB,kBAAkB,SAAyD;AAC/F,QAAM,SAAS,YAAY,OAAO;AAIlC,QAAM,UAAU,iBAAiB,YAAY;AAC7C,QAAM,aAAa,KAAK,SAAS,iBAAiB;AAElD,MAAI,cAAc,SAAS,EAAG,SAAQ,GAAG,QAAQ,aAAa;AAC9D,gBAAc,IAAI,OAAO;AAEzB,QAAM,UAAU,YAA2B;AACzC,QAAI;AACF,YAAM,GAAG,SAAS,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC;AAClD,oBAAc,OAAO,OAAO;AAC5B,UAAI,cAAc,SAAS,EAAG,SAAQ,eAAe,QAAQ,aAAa;AAAA,IAC5E,SAAS,GAAY;AACnB,aAAO,MAAM,8BAA8B;AAAA,QACzC,OAAO,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC;AAAA,MAClD,CAAC;AAAA,IACH;AAAA,EACF;AAEA,MAAI;AAGF,kBAAc,YAAY,KAAK,UAAU,QAAQ,MAAM,CAAC,GAAG,OAAO;AAClE,WAAO,EAAE,YAAY,QAAQ;AAAA,EAC/B,SAAS,OAAgB;AACvB,UAAM,QAAQ;AACd,UAAM;AAAA,EACR;AACF;","names":[]}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-WDAND5YU.js";
|
|
6
6
|
import {
|
|
7
7
|
executeExpert
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5S5YPIET.js";
|
|
9
9
|
import {
|
|
10
10
|
JobStatusSchema,
|
|
11
11
|
RawFindingSchema,
|
|
@@ -58,11 +58,11 @@ import {
|
|
|
58
58
|
updateStage,
|
|
59
59
|
withFileLock,
|
|
60
60
|
writeJobCancelled
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-FGR5X76Q.js";
|
|
62
62
|
import {
|
|
63
63
|
normalizeTopicToCanonical,
|
|
64
64
|
synthesizeResearch
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-WSRFLAXD.js";
|
|
66
66
|
import {
|
|
67
67
|
IssueTriage,
|
|
68
68
|
createAuditTrail,
|
|
@@ -71,13 +71,13 @@ import {
|
|
|
71
71
|
createGraphAuditBridge,
|
|
72
72
|
emitPipelinePolicyEvent,
|
|
73
73
|
readActionRefusal
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-LGRJPOE6.js";
|
|
75
75
|
import {
|
|
76
76
|
sanitizeInput
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-HQ2SMW4Y.js";
|
|
78
78
|
import {
|
|
79
79
|
withPrerequisite
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-QUKC5T4A.js";
|
|
81
81
|
import {
|
|
82
82
|
NOOP_NOTIFIER,
|
|
83
83
|
RateLimiter,
|
|
@@ -105,10 +105,10 @@ import {
|
|
|
105
105
|
toolSuccess,
|
|
106
106
|
withProgressHeartbeat,
|
|
107
107
|
wrapToolWithTimeout
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-KHRUUX22.js";
|
|
109
109
|
import {
|
|
110
110
|
generateSecurityPlan
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-6ZTMMN2N.js";
|
|
112
112
|
import {
|
|
113
113
|
analyzeGitHubRepo
|
|
114
114
|
} from "./chunk-4GDMHCKX.js";
|
|
@@ -152,18 +152,18 @@ import {
|
|
|
152
152
|
parseRegistry,
|
|
153
153
|
sourceExistsInRegistry,
|
|
154
154
|
summarizeContextForPrompt
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-3JGDITTW.js";
|
|
156
156
|
import {
|
|
157
157
|
REGISTRY_PATH,
|
|
158
158
|
getProjectRoot,
|
|
159
159
|
loadPapersRegistry,
|
|
160
160
|
loadTechniquesRegistry,
|
|
161
161
|
resolveRegistryRoot
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-3ZRZPYDN.js";
|
|
163
163
|
import {
|
|
164
164
|
getTokenEnvVars,
|
|
165
165
|
resolveToken
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-R7L2IEJR.js";
|
|
167
167
|
import {
|
|
168
168
|
DEFAULT_RELEVANCE_CONFIG,
|
|
169
169
|
MemoryImportance,
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
calculateTextJaccardSimilarity,
|
|
172
172
|
getToolMemory,
|
|
173
173
|
memoryTrustTierTag
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-TE4HHEXW.js";
|
|
175
175
|
import {
|
|
176
176
|
EXTERNAL_CONTENT_TRUST_TIER,
|
|
177
177
|
resolveContentTrustProvenance,
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
import {
|
|
188
188
|
DEFAULT_TASK_TTL_MS,
|
|
189
189
|
clampTaskTtl
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-QOAIAAT5.js";
|
|
191
191
|
import {
|
|
192
192
|
allOf,
|
|
193
193
|
anyOf
|
|
@@ -196,7 +196,7 @@ import {
|
|
|
196
196
|
VERSION,
|
|
197
197
|
createRequestContext,
|
|
198
198
|
measuredTrustTier
|
|
199
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-NNYNYXMV.js";
|
|
200
200
|
import {
|
|
201
201
|
BWRAP_READ_ONLY_ARGS,
|
|
202
202
|
CliDetectionCache,
|
|
@@ -208,16 +208,16 @@ import {
|
|
|
208
208
|
getGlobalEventBus,
|
|
209
209
|
getGlobalRegistry,
|
|
210
210
|
isAbsentSeat
|
|
211
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-HT5UAK7E.js";
|
|
212
212
|
import {
|
|
213
213
|
ensureGatewayDiscovered,
|
|
214
214
|
getAvailabilityCache,
|
|
215
215
|
getCliForModelId,
|
|
216
216
|
resolveFallback
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-SBXLWHYC.js";
|
|
218
218
|
import {
|
|
219
219
|
DEFAULTS
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-4S77S56F.js";
|
|
221
221
|
import {
|
|
222
222
|
DEFAULT_EXECUTION_MODE,
|
|
223
223
|
DEFAULT_TOOL_RATE_LIMITS
|
|
@@ -232,10 +232,10 @@ import {
|
|
|
232
232
|
parseGatewayExtraHeaders,
|
|
233
233
|
requireApiKey,
|
|
234
234
|
validateApiKeyPresence
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-TDVR4XDT.js";
|
|
236
236
|
import {
|
|
237
237
|
createSessionMemory
|
|
238
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-5KBOQWCM.js";
|
|
239
239
|
import {
|
|
240
240
|
TrustTierSchema
|
|
241
241
|
} from "./chunk-CJKHQ6MV.js";
|
|
@@ -249,17 +249,17 @@ import {
|
|
|
249
249
|
terminateProcessTree,
|
|
250
250
|
trackProcessTree,
|
|
251
251
|
withTimeout
|
|
252
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-JFW3CQS5.js";
|
|
253
253
|
import {
|
|
254
254
|
generateHyphenId,
|
|
255
255
|
generateUUID
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-S7M3QHO6.js";
|
|
257
257
|
import {
|
|
258
258
|
getDefaultCliCircuitBreakerRegistry
|
|
259
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-R4TXJKS3.js";
|
|
260
260
|
import {
|
|
261
261
|
sanitizeErrorDetails
|
|
262
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-7LKX7AUQ.js";
|
|
263
263
|
import {
|
|
264
264
|
ARCHITECTURE_KEYWORDS,
|
|
265
265
|
AUTHORITY_TIERS,
|
|
@@ -274,7 +274,6 @@ import {
|
|
|
274
274
|
DEFAULT_ZERO_ROUTER_CONFIG,
|
|
275
275
|
DecisionGateSchema,
|
|
276
276
|
ErrorCode,
|
|
277
|
-
FALLBACK_CONTEXT_WINDOW,
|
|
278
277
|
LinUCBBandit,
|
|
279
278
|
ModelCapability,
|
|
280
279
|
NEUTRAL_BANDIT_FEATURE,
|
|
@@ -290,29 +289,22 @@ import {
|
|
|
290
289
|
SharedTaskAnalyzer,
|
|
291
290
|
StrategyNameSchema,
|
|
292
291
|
TOOL_MANIFEST,
|
|
293
|
-
TRACE_ID_MAX_LENGTH,
|
|
294
292
|
TimeoutError,
|
|
295
293
|
UNRESOLVED_MODEL_ID,
|
|
296
294
|
ValidationError,
|
|
297
295
|
WeatherReportInputSchema,
|
|
298
296
|
WorkflowError,
|
|
299
|
-
accessModeSignal,
|
|
300
297
|
asRecord,
|
|
301
298
|
assertNotSourceCheckoutWrite,
|
|
302
299
|
breakerKeys,
|
|
303
|
-
buildCapabilityProfiles,
|
|
304
300
|
buildDefaultModelSources,
|
|
305
301
|
buildResearchContext,
|
|
306
|
-
categorizeOutcomeError,
|
|
307
|
-
categorizeOutcomeErrorMessage,
|
|
308
302
|
clamp,
|
|
309
303
|
clamp01,
|
|
310
304
|
classifyRequestTier,
|
|
311
305
|
classifyStallTick,
|
|
312
306
|
computeTokenCost,
|
|
313
|
-
createLogger,
|
|
314
307
|
createSharedTaskAnalyzer,
|
|
315
|
-
deriveEntry,
|
|
316
308
|
deriveResearchMaturity,
|
|
317
309
|
detectCapabilityGaps,
|
|
318
310
|
detectTrend,
|
|
@@ -320,7 +312,6 @@ import {
|
|
|
320
312
|
err,
|
|
321
313
|
extractJsonArray,
|
|
322
314
|
extractNumberField,
|
|
323
|
-
findCanonicalModel,
|
|
324
315
|
findMatchingKeyword,
|
|
325
316
|
formatBanditFeatureLabel,
|
|
326
317
|
formatPercentage,
|
|
@@ -328,36 +319,25 @@ import {
|
|
|
328
319
|
gatewayEndpointRejection,
|
|
329
320
|
generateWeatherReport,
|
|
330
321
|
getAdaptiveBonus,
|
|
331
|
-
getCliModelName,
|
|
332
322
|
getDefaultAvailableModelsCache,
|
|
333
|
-
getDefaultModelForCli,
|
|
334
|
-
getDefaultRegistry,
|
|
335
323
|
getErrorMessage,
|
|
336
324
|
getFallbackChainForCategory,
|
|
337
325
|
getGapLedger,
|
|
338
326
|
getHeartbeatMonitor,
|
|
339
|
-
getInTreeCapabilitiesMatrix,
|
|
340
|
-
getModelContextWindow,
|
|
341
327
|
getOutcomeStore,
|
|
342
328
|
getOutcomeSummaryText,
|
|
343
329
|
getPipelineEventBus,
|
|
344
330
|
getRandomProvider,
|
|
345
331
|
getStrategyManifest,
|
|
346
|
-
getTimeProvider,
|
|
347
332
|
getTokenEstimator,
|
|
348
333
|
hasGatewaySlotCatalog,
|
|
349
334
|
isBanditInterceptFeature,
|
|
350
|
-
isCliName,
|
|
351
335
|
isDisabledSlotUnserved,
|
|
352
|
-
isEndpointArmId,
|
|
353
336
|
isErr,
|
|
354
337
|
isRateLimitLikeError,
|
|
355
338
|
isTimeoutAbortReason,
|
|
356
|
-
lookupInTreeCapability,
|
|
357
339
|
matchesAnyKeyword,
|
|
358
|
-
modelSupportsAll,
|
|
359
340
|
ok,
|
|
360
|
-
outcomeFailureFields,
|
|
361
341
|
parseGatewayCostEnv,
|
|
362
342
|
pipelineRunId,
|
|
363
343
|
raceAbort,
|
|
@@ -366,11 +346,6 @@ import {
|
|
|
366
346
|
recordToolRefusal,
|
|
367
347
|
researchContextFromText,
|
|
368
348
|
resolveInsideRoot,
|
|
369
|
-
resolveModelIdentity,
|
|
370
|
-
resolveModelIdentitySync,
|
|
371
|
-
resolveOutcomeCategory,
|
|
372
|
-
resolveOwnerCli,
|
|
373
|
-
routingArmCliSlot,
|
|
374
349
|
runInHeartbeatSession,
|
|
375
350
|
selectStrategyByManifest,
|
|
376
351
|
serializeValidatedRecord,
|
|
@@ -379,15 +354,48 @@ import {
|
|
|
379
354
|
toExpertTaskAnalysisResult,
|
|
380
355
|
truncateWithInfo,
|
|
381
356
|
withStep
|
|
382
|
-
} from "./chunk-
|
|
357
|
+
} from "./chunk-S4SQYXVK.js";
|
|
383
358
|
import {
|
|
384
359
|
SUPPORTED_EXTENSIONS
|
|
385
360
|
} from "./chunk-XBEKMUTO.js";
|
|
361
|
+
import {
|
|
362
|
+
FALLBACK_CONTEXT_WINDOW,
|
|
363
|
+
buildCapabilityProfiles,
|
|
364
|
+
findCanonicalModel,
|
|
365
|
+
getCliModelName,
|
|
366
|
+
getDefaultModelForCli,
|
|
367
|
+
getInTreeCapabilitiesMatrix,
|
|
368
|
+
getModelContextWindow,
|
|
369
|
+
lookupInTreeCapability,
|
|
370
|
+
modelSupportsAll,
|
|
371
|
+
resolveOwnerCli
|
|
372
|
+
} from "./chunk-VJZRLJYD.js";
|
|
373
|
+
import {
|
|
374
|
+
deriveEntry,
|
|
375
|
+
getDefaultRegistry,
|
|
376
|
+
resolveModelIdentity,
|
|
377
|
+
resolveModelIdentitySync
|
|
378
|
+
} from "./chunk-BLJIQS7C.js";
|
|
386
379
|
import {
|
|
387
380
|
ensureLearningDir,
|
|
388
381
|
getMetaOutcomesFile,
|
|
389
382
|
isPersistenceEnabled
|
|
390
383
|
} from "./chunk-RUHKJC3X.js";
|
|
384
|
+
import {
|
|
385
|
+
TRACE_ID_MAX_LENGTH,
|
|
386
|
+
accessModeSignal,
|
|
387
|
+
categorizeOutcomeError,
|
|
388
|
+
categorizeOutcomeErrorMessage,
|
|
389
|
+
isCliName,
|
|
390
|
+
isEndpointArmId,
|
|
391
|
+
outcomeFailureFields,
|
|
392
|
+
resolveOutcomeCategory,
|
|
393
|
+
routingArmCliSlot
|
|
394
|
+
} from "./chunk-UFAK5UGH.js";
|
|
395
|
+
import {
|
|
396
|
+
createLogger,
|
|
397
|
+
getTimeProvider
|
|
398
|
+
} from "./chunk-GR6WCJWY.js";
|
|
391
399
|
import {
|
|
392
400
|
findRepoRoot,
|
|
393
401
|
getActiveWorkspaceRoot,
|
|
@@ -401,10 +409,7 @@ import {
|
|
|
401
409
|
import {
|
|
402
410
|
AGENT_ROUTER_TIMEOUTS,
|
|
403
411
|
API_TIMEOUTS,
|
|
404
|
-
CLI_NAMES,
|
|
405
412
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
406
|
-
CliNameSchema,
|
|
407
|
-
DEFAULT_CLI,
|
|
408
413
|
EXPERT_TIMEOUTS,
|
|
409
414
|
GRAPH_TIMEOUTS,
|
|
410
415
|
HEARTBEAT_TIMEOUTS,
|
|
@@ -416,7 +421,6 @@ import {
|
|
|
416
421
|
SEARCH_TREE_MAX_TIME_MS,
|
|
417
422
|
SINGLE_LLM_EVAL_TIMEOUT_MS,
|
|
418
423
|
STEP_EXECUTOR_TIMEOUTS,
|
|
419
|
-
TASK_CATEGORIES,
|
|
420
424
|
TIMEOUT_MULTIPLIER_ENV_VAR,
|
|
421
425
|
WORKER_TIMEOUTS,
|
|
422
426
|
WORKFLOW_TIMEOUTS,
|
|
@@ -425,7 +429,15 @@ import {
|
|
|
425
429
|
getExpertTaskTimeout,
|
|
426
430
|
getMcpSafeDeadlineMs,
|
|
427
431
|
resolveClassGuardMs
|
|
428
|
-
} from "./chunk-
|
|
432
|
+
} from "./chunk-6TBRXZY7.js";
|
|
433
|
+
import {
|
|
434
|
+
TASK_CATEGORIES
|
|
435
|
+
} from "./chunk-SYTFRVWX.js";
|
|
436
|
+
import {
|
|
437
|
+
CLI_NAMES,
|
|
438
|
+
CliNameSchema,
|
|
439
|
+
DEFAULT_CLI
|
|
440
|
+
} from "./chunk-MTN5VMBX.js";
|
|
429
441
|
|
|
430
442
|
// src/config/env-schema.ts
|
|
431
443
|
import { z } from "zod";
|
|
@@ -29751,7 +29763,7 @@ function execIdFields(executionId) {
|
|
|
29751
29763
|
async function populateUnifiedContextOnState(state, options) {
|
|
29752
29764
|
const taskCandidate = state["task"];
|
|
29753
29765
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
29754
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
29766
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-SE4FED6S.js");
|
|
29755
29767
|
const category = inferTaskCategory2(taskCandidate);
|
|
29756
29768
|
const executionId = options?.executionId;
|
|
29757
29769
|
const execFields = execIdFields(executionId);
|
|
@@ -46260,7 +46272,7 @@ async function tryIssueTriage(task) {
|
|
|
46260
46272
|
try {
|
|
46261
46273
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
46262
46274
|
if (issueMatch === null) return null;
|
|
46263
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
46275
|
+
const { createIssueTriage } = await import("./issue-triage-KCY7KNJX.js");
|
|
46264
46276
|
const triage = createIssueTriage();
|
|
46265
46277
|
const owner = issueMatch[1] ?? "";
|
|
46266
46278
|
const num2 = issueMatch[2] ?? "";
|
|
@@ -46288,7 +46300,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
46288
46300
|
]);
|
|
46289
46301
|
async function classifyWithLLM(task) {
|
|
46290
46302
|
try {
|
|
46291
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
46303
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-KUAWX2ZC.js");
|
|
46292
46304
|
const prompt = [
|
|
46293
46305
|
"Classify this task into exactly one pipeline template.",
|
|
46294
46306
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -46657,7 +46669,7 @@ function buildVotingInput(plan, config) {
|
|
|
46657
46669
|
}
|
|
46658
46670
|
async function executeSingleVote(plan, config, log) {
|
|
46659
46671
|
try {
|
|
46660
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
46672
|
+
const { executeVoting } = await import("./consensus-vote-ZRBGPE2N.js");
|
|
46661
46673
|
const input = buildVotingInput(plan, config);
|
|
46662
46674
|
const result = await executeVoting(input, log);
|
|
46663
46675
|
return parseVotingResult(result);
|
|
@@ -48201,7 +48213,7 @@ var memoryInitPromise = null;
|
|
|
48201
48213
|
async function initPipelineMemory() {
|
|
48202
48214
|
if (cachedMemory !== null) return cachedMemory;
|
|
48203
48215
|
try {
|
|
48204
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
48216
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-S33AHGTC.js");
|
|
48205
48217
|
const { getLearningDir } = await import("./learning-persistence-X24OOBYY.js");
|
|
48206
48218
|
const mem = createSessionMemory2(getLearningDir());
|
|
48207
48219
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
@@ -48263,7 +48275,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
48263
48275
|
callRecord(routingMemoryCache);
|
|
48264
48276
|
return;
|
|
48265
48277
|
}
|
|
48266
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
48278
|
+
routingMemoryInitPromise ??= import("./routing-memory-BK2ZSPIT.js").then(({ createRoutingMemory }) => {
|
|
48267
48279
|
routingMemoryCache ??= createRoutingMemory();
|
|
48268
48280
|
return routingMemoryCache;
|
|
48269
48281
|
}).catch((error) => {
|
|
@@ -48489,7 +48501,7 @@ function createVoteStage({ config, startStage }) {
|
|
|
48489
48501
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
48490
48502
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
48491
48503
|
try {
|
|
48492
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
48504
|
+
const { executeVoting } = await import("./consensus-vote-ZRBGPE2N.js");
|
|
48493
48505
|
const proposal = buildVoteProposal(plan, research);
|
|
48494
48506
|
const votingResult = await executeVoting(
|
|
48495
48507
|
{
|
|
@@ -49299,7 +49311,7 @@ ${text}` : "";
|
|
|
49299
49311
|
}
|
|
49300
49312
|
async function getWeatherContext() {
|
|
49301
49313
|
try {
|
|
49302
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
49314
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-6SRJJPFL.js");
|
|
49303
49315
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
49304
49316
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
49305
49317
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -49317,7 +49329,7 @@ ${lines}
|
|
|
49317
49329
|
}
|
|
49318
49330
|
async function getMemoryContext(task) {
|
|
49319
49331
|
try {
|
|
49320
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
49332
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-S33AHGTC.js");
|
|
49321
49333
|
const { getLearningDir } = await import("./learning-persistence-X24OOBYY.js");
|
|
49322
49334
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
49323
49335
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
@@ -50034,7 +50046,7 @@ async function searchCodebaseForTask(task) {
|
|
|
50034
50046
|
}
|
|
50035
50047
|
async function queryResearchRegistry(task) {
|
|
50036
50048
|
try {
|
|
50037
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
50049
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-TCBKMTRH.js");
|
|
50038
50050
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
50039
50051
|
if (topic === void 0) return null;
|
|
50040
50052
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -50105,7 +50117,7 @@ function createScanStageWrapper() {
|
|
|
50105
50117
|
try {
|
|
50106
50118
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
50107
50119
|
if (slug !== void 0) {
|
|
50108
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
50120
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-UDATQA3H.js");
|
|
50109
50121
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
50110
50122
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
50111
50123
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -54049,7 +54061,7 @@ var GitHubTaskTracker = class {
|
|
|
54049
54061
|
cachedProvider = null;
|
|
54050
54062
|
async getProvider() {
|
|
54051
54063
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
54052
|
-
const { createScmProvider } = await import("./factory-
|
|
54064
|
+
const { createScmProvider } = await import("./factory-3TYQRDEB.js");
|
|
54053
54065
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
54054
54066
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
54055
54067
|
this.cachedProvider = result.value;
|
|
@@ -55097,7 +55109,7 @@ function withCatalogueCaveat(report) {
|
|
|
55097
55109
|
var GATEWAY_TRANSPORT = "gateway";
|
|
55098
55110
|
var GATEWAY_API_ARM = "api:custom-openai";
|
|
55099
55111
|
async function gatewaySource(apiArm) {
|
|
55100
|
-
const { discoverModels, readOpenAICompatEnv } = await import("./openai-compat-adapter-
|
|
55112
|
+
const { discoverModels, readOpenAICompatEnv } = await import("./openai-compat-adapter-5XRY7CAO.js");
|
|
55101
55113
|
const config = readOpenAICompatEnv();
|
|
55102
55114
|
if (config !== null) {
|
|
55103
55115
|
return {
|
|
@@ -55116,7 +55128,7 @@ async function gatewaySource(apiArm) {
|
|
|
55116
55128
|
}
|
|
55117
55129
|
async function defaultSources(includeOpenRouter, adaptersFactory) {
|
|
55118
55130
|
const adapters = new Map(
|
|
55119
|
-
adaptersFactory !== void 0 ? adaptersFactory() : (await import("./factory-
|
|
55131
|
+
adaptersFactory !== void 0 ? adaptersFactory() : (await import("./factory-NEFQHS47.js")).createAllAdapters()
|
|
55120
55132
|
);
|
|
55121
55133
|
const apiArm = adapters.get(GATEWAY_API_ARM);
|
|
55122
55134
|
adapters.delete(GATEWAY_API_ARM);
|
|
@@ -58473,4 +58485,4 @@ export {
|
|
|
58473
58485
|
initializeSandbox,
|
|
58474
58486
|
getSandboxMode
|
|
58475
58487
|
};
|
|
58476
|
-
//# sourceMappingURL=chunk-
|
|
58488
|
+
//# sourceMappingURL=chunk-25F2TZ7W.js.map
|