nexus-agents 8.79.0 → 8.80.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/{ast-rule-runner-WLKU5YHB.js → ast-rule-runner-QYUO4JKS.js} +3 -3
- package/dist/{child-mcp-config-4SKZNE7O.js → child-mcp-config-2I3ZP5UI.js} +3 -7
- package/dist/{child-mcp-config-4SKZNE7O.js.map → child-mcp-config-2I3ZP5UI.js.map} +1 -1
- package/dist/{chunk-43SBVXRB.js → chunk-2A3CC5SZ.js} +2 -2
- package/dist/{chunk-J63N4QQ6.js → chunk-2DTLUKLA.js} +3 -3
- package/dist/{chunk-YZWG3Q7Q.js → chunk-34YOAV3B.js} +4 -4
- package/dist/{chunk-JYZAWVET.js → chunk-3N4XSJPY.js} +5 -5
- package/dist/{chunk-FPDJQYZF.js → chunk-5GMAK2H5.js} +2 -2
- package/dist/{chunk-FYJ22FK4.js → chunk-6NXLVWML.js} +2 -2
- package/dist/{chunk-HIPXSLH6.js → chunk-6YB3F2HP.js} +2 -2
- package/dist/{chunk-JXHGQZHZ.js → chunk-7WKMF5VE.js} +2 -2
- package/dist/{chunk-VXL4B5FG.js → chunk-BSCTEWWP.js} +2 -2
- package/dist/{chunk-54KBJTS5.js → chunk-CNBXEHTN.js} +2 -2
- package/dist/{chunk-FIJ6IGBP.js → chunk-D22SPEEU.js} +2 -2
- package/dist/{chunk-DYADW74K.js → chunk-D6MOQULW.js} +8 -8
- package/dist/{chunk-VEDRL7RF.js → chunk-HLHCNG7B.js} +2 -2
- package/dist/{chunk-N3CM6SD3.js → chunk-ITMG2I6K.js} +2 -2
- package/dist/{chunk-J2UPT4QH.js → chunk-JSR6RFWB.js} +3 -3
- package/dist/{chunk-QAE6CXFB.js → chunk-L7KWTUF7.js} +10 -10
- package/dist/{chunk-JJEKTXCT.js → chunk-LZXMWS5C.js} +61 -24
- package/dist/chunk-LZXMWS5C.js.map +1 -0
- package/dist/{chunk-BHNNGFEQ.js → chunk-OM62MDMA.js} +4 -4
- package/dist/{chunk-RHHQJLZ4.js → chunk-Q2HCR2IW.js} +36 -54
- package/dist/{chunk-RHHQJLZ4.js.map → chunk-Q2HCR2IW.js.map} +1 -1
- package/dist/{chunk-LUABUQOK.js → chunk-QBTNUCQB.js} +7 -7
- package/dist/{chunk-S5VINCRF.js → chunk-RIKQ4FZF.js} +2 -2
- package/dist/{chunk-ZP632JYM.js → chunk-RIYFOUW4.js} +216 -266
- package/dist/chunk-RIYFOUW4.js.map +1 -0
- package/dist/{chunk-4MCXZPL5.js → chunk-TQHQMEWO.js} +2 -2
- package/dist/{chunk-K4PX2QXZ.js → chunk-TRIUZ45L.js} +3 -3
- package/dist/{chunk-AYYETRVT.js → chunk-UABEPFK5.js} +2 -2
- package/dist/{chunk-KM7ZZH63.js → chunk-VXXD6VQI.js} +2 -2
- package/dist/{chunk-AAW6JINR.js → chunk-X5CLL6FQ.js} +4 -58
- package/dist/chunk-X5CLL6FQ.js.map +1 -0
- package/dist/{chunk-IMUIPM5L.js → chunk-X7ZAI75Z.js} +4 -4
- package/dist/{chunk-A5GEH5FM.js → chunk-XSWKTCGW.js} +2 -2
- package/dist/{chunk-DBCP2TA7.js → chunk-Y2RY4K3I.js} +2 -2
- package/dist/{chunk-4PWLJG2X.js → chunk-YWTC3XY5.js} +2 -2
- package/dist/{chunk-56IPR3SB.js → chunk-Z2XU45MC.js} +5 -5
- package/dist/{chunk-E3O3HWO5.js → chunk-Z63NLSGK.js} +3 -3
- package/dist/{cli-circuit-breaker-SYPADEG3.js → cli-circuit-breaker-33PVKG37.js} +3 -3
- package/dist/cli.js +42 -42
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-6JVEOVSL.js → composite-router-KTEJHOMM.js} +2 -2
- package/dist/{consensus-vote-NH3Y6KQU.js → consensus-vote-O2PNH5LI.js} +16 -16
- package/dist/{context-retriever-FCQPM3MD.js → context-retriever-NP32AMUI.js} +8 -8
- package/dist/{doctor-deep-N3X7ZICY.js → doctor-deep-NE5NQ7JS.js} +3 -3
- package/dist/{doctor-live-BRZKNVSO.js → doctor-live-HP7OI6RY.js} +10 -10
- package/dist/{expert-bridge-2YX2YOJO.js → expert-bridge-7C7JYDQK.js} +4 -4
- package/dist/{factory-NS2BW5MI.js → factory-7UBWG5DM.js} +9 -9
- package/dist/{factory-URK2XJZF.js → factory-MXLVVYCL.js} +5 -5
- package/dist/{improvement-review-JXN3E7AF.js → improvement-review-ZPMPWUMO.js} +5 -5
- package/dist/index.d.ts +6 -1
- package/dist/index.js +30 -30
- package/dist/{init-opencode-4U6KRPWB.js → init-opencode-ZKRXMYKO.js} +5 -5
- package/dist/issue-triage-GNFG3HMH.js +16 -0
- package/dist/{pr-reviewer-helpers-K6MEHUKV.js → pr-reviewer-helpers-DEXQAVKI.js} +4 -4
- package/dist/{registry-command-NJRVZ5TW.js → registry-command-ZWSTB7PN.js} +2 -2
- package/dist/{repo-security-plan-7CB2SWNV.js → repo-security-plan-3TMT3MRL.js} +3 -3
- package/dist/{research-helpers-synthesize-S2OAZRC3.js → research-helpers-synthesize-3S27D2MH.js} +4 -4
- package/dist/{routing-memory-N63ETQ5N.js → routing-memory-POVUTBL2.js} +2 -2
- package/dist/{session-memory-RZLMTQRF.js → session-memory-44C2EEPJ.js} +3 -3
- package/dist/{setup-config-5K67D6CO.js → setup-config-FTKTKSHZ.js} +3 -3
- package/dist/{setup-custom-api-RU4SKJ6O.js → setup-custom-api-M752UDNC.js} +4 -4
- package/dist/setup-data-dir-YMU6OBUA.js +30 -0
- package/dist/{tool-memory-XBJU5EST.js → tool-memory-A73LJT5T.js} +5 -7
- package/dist/{unified-registry-YVGARTAA.js → unified-registry-GRYB3ALS.js} +10 -10
- package/dist/{weather-report-5JWGIEFQ.js → weather-report-UCQC62SV.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-AAW6JINR.js.map +0 -1
- package/dist/chunk-JJEKTXCT.js.map +0 -1
- package/dist/chunk-ZP632JYM.js.map +0 -1
- package/dist/issue-triage-NOETX2XW.js +0 -16
- package/dist/setup-data-dir-YPQVED6C.js +0 -30
- /package/dist/{ast-rule-runner-WLKU5YHB.js.map → ast-rule-runner-QYUO4JKS.js.map} +0 -0
- /package/dist/{chunk-43SBVXRB.js.map → chunk-2A3CC5SZ.js.map} +0 -0
- /package/dist/{chunk-J63N4QQ6.js.map → chunk-2DTLUKLA.js.map} +0 -0
- /package/dist/{chunk-YZWG3Q7Q.js.map → chunk-34YOAV3B.js.map} +0 -0
- /package/dist/{chunk-JYZAWVET.js.map → chunk-3N4XSJPY.js.map} +0 -0
- /package/dist/{chunk-FPDJQYZF.js.map → chunk-5GMAK2H5.js.map} +0 -0
- /package/dist/{chunk-FYJ22FK4.js.map → chunk-6NXLVWML.js.map} +0 -0
- /package/dist/{chunk-HIPXSLH6.js.map → chunk-6YB3F2HP.js.map} +0 -0
- /package/dist/{chunk-JXHGQZHZ.js.map → chunk-7WKMF5VE.js.map} +0 -0
- /package/dist/{chunk-VXL4B5FG.js.map → chunk-BSCTEWWP.js.map} +0 -0
- /package/dist/{chunk-54KBJTS5.js.map → chunk-CNBXEHTN.js.map} +0 -0
- /package/dist/{chunk-FIJ6IGBP.js.map → chunk-D22SPEEU.js.map} +0 -0
- /package/dist/{chunk-DYADW74K.js.map → chunk-D6MOQULW.js.map} +0 -0
- /package/dist/{chunk-VEDRL7RF.js.map → chunk-HLHCNG7B.js.map} +0 -0
- /package/dist/{chunk-N3CM6SD3.js.map → chunk-ITMG2I6K.js.map} +0 -0
- /package/dist/{chunk-J2UPT4QH.js.map → chunk-JSR6RFWB.js.map} +0 -0
- /package/dist/{chunk-QAE6CXFB.js.map → chunk-L7KWTUF7.js.map} +0 -0
- /package/dist/{chunk-BHNNGFEQ.js.map → chunk-OM62MDMA.js.map} +0 -0
- /package/dist/{chunk-LUABUQOK.js.map → chunk-QBTNUCQB.js.map} +0 -0
- /package/dist/{chunk-S5VINCRF.js.map → chunk-RIKQ4FZF.js.map} +0 -0
- /package/dist/{chunk-4MCXZPL5.js.map → chunk-TQHQMEWO.js.map} +0 -0
- /package/dist/{chunk-K4PX2QXZ.js.map → chunk-TRIUZ45L.js.map} +0 -0
- /package/dist/{chunk-AYYETRVT.js.map → chunk-UABEPFK5.js.map} +0 -0
- /package/dist/{chunk-KM7ZZH63.js.map → chunk-VXXD6VQI.js.map} +0 -0
- /package/dist/{chunk-IMUIPM5L.js.map → chunk-X7ZAI75Z.js.map} +0 -0
- /package/dist/{chunk-A5GEH5FM.js.map → chunk-XSWKTCGW.js.map} +0 -0
- /package/dist/{chunk-DBCP2TA7.js.map → chunk-Y2RY4K3I.js.map} +0 -0
- /package/dist/{chunk-4PWLJG2X.js.map → chunk-YWTC3XY5.js.map} +0 -0
- /package/dist/{chunk-56IPR3SB.js.map → chunk-Z2XU45MC.js.map} +0 -0
- /package/dist/{chunk-E3O3HWO5.js.map → chunk-Z63NLSGK.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-SYPADEG3.js.map → cli-circuit-breaker-33PVKG37.js.map} +0 -0
- /package/dist/{composite-router-6JVEOVSL.js.map → composite-router-KTEJHOMM.js.map} +0 -0
- /package/dist/{consensus-vote-NH3Y6KQU.js.map → consensus-vote-O2PNH5LI.js.map} +0 -0
- /package/dist/{context-retriever-FCQPM3MD.js.map → context-retriever-NP32AMUI.js.map} +0 -0
- /package/dist/{doctor-deep-N3X7ZICY.js.map → doctor-deep-NE5NQ7JS.js.map} +0 -0
- /package/dist/{doctor-live-BRZKNVSO.js.map → doctor-live-HP7OI6RY.js.map} +0 -0
- /package/dist/{expert-bridge-2YX2YOJO.js.map → expert-bridge-7C7JYDQK.js.map} +0 -0
- /package/dist/{factory-NS2BW5MI.js.map → factory-7UBWG5DM.js.map} +0 -0
- /package/dist/{factory-URK2XJZF.js.map → factory-MXLVVYCL.js.map} +0 -0
- /package/dist/{improvement-review-JXN3E7AF.js.map → improvement-review-ZPMPWUMO.js.map} +0 -0
- /package/dist/{init-opencode-4U6KRPWB.js.map → init-opencode-ZKRXMYKO.js.map} +0 -0
- /package/dist/{issue-triage-NOETX2XW.js.map → issue-triage-GNFG3HMH.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-K6MEHUKV.js.map → pr-reviewer-helpers-DEXQAVKI.js.map} +0 -0
- /package/dist/{registry-command-NJRVZ5TW.js.map → registry-command-ZWSTB7PN.js.map} +0 -0
- /package/dist/{repo-security-plan-7CB2SWNV.js.map → repo-security-plan-3TMT3MRL.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-S2OAZRC3.js.map → research-helpers-synthesize-3S27D2MH.js.map} +0 -0
- /package/dist/{routing-memory-N63ETQ5N.js.map → routing-memory-POVUTBL2.js.map} +0 -0
- /package/dist/{session-memory-RZLMTQRF.js.map → session-memory-44C2EEPJ.js.map} +0 -0
- /package/dist/{setup-config-5K67D6CO.js.map → setup-config-FTKTKSHZ.js.map} +0 -0
- /package/dist/{setup-custom-api-RU4SKJ6O.js.map → setup-custom-api-M752UDNC.js.map} +0 -0
- /package/dist/{setup-data-dir-YPQVED6C.js.map → setup-data-dir-YMU6OBUA.js.map} +0 -0
- /package/dist/{tool-memory-XBJU5EST.js.map → tool-memory-A73LJT5T.js.map} +0 -0
- /package/dist/{unified-registry-YVGARTAA.js.map → unified-registry-GRYB3ALS.js.map} +0 -0
- /package/dist/{weather-report-5JWGIEFQ.js.map → weather-report-UCQC62SV.js.map} +0 -0
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
getBuiltInAstRulesPath,
|
|
10
10
|
loadRules,
|
|
11
11
|
runAstQaRules
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-RIKQ4FZF.js";
|
|
13
|
+
import "./chunk-RIYFOUW4.js";
|
|
14
14
|
import "./chunk-4UHDDCRB.js";
|
|
15
15
|
import "./chunk-RNDHNRSX.js";
|
|
16
16
|
import "./chunk-PX6F3LHL.js";
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
loadRules,
|
|
27
27
|
runAstQaRules
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=ast-rule-runner-
|
|
29
|
+
//# sourceMappingURL=ast-rule-runner-QYUO4JKS.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-HERI7LXN.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RIYFOUW4.js";
|
|
7
7
|
import "./chunk-4UHDDCRB.js";
|
|
8
8
|
import "./chunk-RNDHNRSX.js";
|
|
9
9
|
import "./chunk-PX6F3LHL.js";
|
|
@@ -53,11 +53,7 @@ async function generateMcpConfig(options) {
|
|
|
53
53
|
};
|
|
54
54
|
return { configPath, cleanup, allowedTools: tools };
|
|
55
55
|
}
|
|
56
|
-
function getDefaultAllowedTools() {
|
|
57
|
-
return DEFAULT_ALLOWED_TOOLS;
|
|
58
|
-
}
|
|
59
56
|
export {
|
|
60
|
-
generateMcpConfig
|
|
61
|
-
getDefaultAllowedTools
|
|
57
|
+
generateMcpConfig
|
|
62
58
|
};
|
|
63
|
-
//# sourceMappingURL=child-mcp-config-
|
|
59
|
+
//# sourceMappingURL=child-mcp-config-2I3ZP5UI.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 * @module cli-adapters/child-mcp-config\n */\n\nimport { writeFile, rm } from 'node:fs/promises';\nimport { nexusMkdtemp } 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/**\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 /** Custom allowed tools (default: read-only subset). */\n readonly allowedTools?: readonly string[];\n}\n\n/** Default read-only tools available to SWE-bench child sessions. */\nconst DEFAULT_ALLOWED_TOOLS: readonly string[] = [\n 'memory_query',\n 'memory_stats',\n 'research_query',\n 'research_discover',\n 'weather_report',\n 'delegate_to_model',\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 * 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 ...(options?.env !== undefined ? { env: options.env } : {}),\n };\n\n return {\n mcpServers: {\n 'nexus-agents': entry,\n },\n };\n\n // Tool allowlisting is handled by Claude CLI's --allowedTools flag, not in\n // the MCP config itself; the caller passes tools separately. Nothing here\n // needs the resolved list, so it is no longer computed.\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 /** Allowed tools list for --allowedTools flag. */\n readonly allowedTools: readonly string[];\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 const tools = options?.allowedTools ?? DEFAULT_ALLOWED_TOOLS;\n\n const tempDir = await nexusMkdtemp('nexus-mcp-');\n const configPath = join(tempDir, 'mcp-config.json');\n\n await writeFile(configPath, JSON.stringify(config, null, 2), 'utf-8');\n\n const cleanup = async (): Promise<void> => {\n await rm(tempDir, { recursive: true, force: true }).catch((e: unknown) => {\n logger.debug('Best-effort cleanup failed', {\n error: e instanceof Error ? e.message : String(e),\n });\n });\n };\n\n return { configPath, cleanup, allowedTools: tools };\n}\n
|
|
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 * @module cli-adapters/child-mcp-config\n */\n\nimport { writeFile, rm } from 'node:fs/promises';\nimport { nexusMkdtemp } 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/**\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 /** Custom allowed tools (default: read-only subset). */\n readonly allowedTools?: readonly string[];\n}\n\n/** Default read-only tools available to SWE-bench child sessions. */\nconst DEFAULT_ALLOWED_TOOLS: readonly string[] = [\n 'memory_query',\n 'memory_stats',\n 'research_query',\n 'research_discover',\n 'weather_report',\n 'delegate_to_model',\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 * 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 ...(options?.env !== undefined ? { env: options.env } : {}),\n };\n\n return {\n mcpServers: {\n 'nexus-agents': entry,\n },\n };\n\n // Tool allowlisting is handled by Claude CLI's --allowedTools flag, not in\n // the MCP config itself; the caller passes tools separately. Nothing here\n // needs the resolved list, so it is no longer computed.\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 /** Allowed tools list for --allowedTools flag. */\n readonly allowedTools: readonly string[];\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 const tools = options?.allowedTools ?? DEFAULT_ALLOWED_TOOLS;\n\n const tempDir = await nexusMkdtemp('nexus-mcp-');\n const configPath = join(tempDir, 'mcp-config.json');\n\n await writeFile(configPath, JSON.stringify(config, null, 2), 'utf-8');\n\n const cleanup = async (): Promise<void> => {\n await rm(tempDir, { recursive: true, force: true }).catch((e: unknown) => {\n logger.debug('Best-effort cleanup failed', {\n error: e instanceof Error ? e.message : String(e),\n });\n });\n };\n\n return { configPath, cleanup, allowedTools: tools };\n}\n"],"mappings":";;;;;;;;;;;AAaA,SAAS,WAAW,UAAU;AAE9B,SAAS,YAAY;AAGrB,IAAM,SAAS,aAAa,EAAE,WAAW,uBAAuB,CAAC;AA+BjE,IAAM,wBAA2C;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAMA,SAAS,eAAe,UAA2B;AACjD,MAAI,aAAa,OAAW,QAAO;AAGnC,QAAM,UAAU,KAAK,WAAW,IAAI;AACpC,SAAO,KAAK,SAAS,QAAQ;AAC/B;AAKA,SAAS,YAAY,SAA2C;AAC9D,QAAM,UAAU,eAAe,SAAS,OAAO;AAE/C,QAAM,QAAwB;AAAA,IAC5B,SAAS;AAAA,IACT,MAAM,CAAC,SAAS,eAAe;AAAA,IAC/B,GAAI,SAAS,QAAQ,SAAY,EAAE,KAAK,QAAQ,IAAI,IAAI,CAAC;AAAA,EAC3D;AAEA,SAAO;AAAA,IACL,YAAY;AAAA,MACV,gBAAgB;AAAA,IAClB;AAAA,EACF;AAKF;AAoBA,eAAsB,kBAAkB,SAAyD;AAC/F,QAAM,SAAS,YAAY,OAAO;AAClC,QAAM,QAAQ,SAAS,gBAAgB;AAEvC,QAAM,UAAU,MAAM,aAAa,YAAY;AAC/C,QAAM,aAAa,KAAK,SAAS,iBAAiB;AAElD,QAAM,UAAU,YAAY,KAAK,UAAU,QAAQ,MAAM,CAAC,GAAG,OAAO;AAEpE,QAAM,UAAU,YAA2B;AACzC,UAAM,GAAG,SAAS,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC,EAAE,MAAM,CAAC,MAAe;AACxE,aAAO,MAAM,8BAA8B;AAAA,QACzC,OAAO,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC;AAAA,MAClD,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,YAAY,SAAS,cAAc,MAAM;AACpD;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
2
|
import semver from "semver";
|
|
3
|
-
var VERSION = true ? "8.
|
|
3
|
+
var VERSION = true ? "8.80.1" : "dev";
|
|
4
4
|
var NODE_ENGINE_RANGE = ">=22.5.0";
|
|
5
5
|
function isNodeVersionSupported(version) {
|
|
6
6
|
return semver.satisfies(version, NODE_ENGINE_RANGE);
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
NODE_ENGINE_RANGE,
|
|
12
12
|
isNodeVersionSupported
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-2A3CC5SZ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadPapersRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YWTC3XY5.js";
|
|
4
4
|
import {
|
|
5
5
|
getErrorMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RIYFOUW4.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/research-helpers-synthesize.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -876,4 +876,4 @@ export {
|
|
|
876
876
|
AttributedInsightSchema,
|
|
877
877
|
synthesizeResearch
|
|
878
878
|
};
|
|
879
|
-
//# sourceMappingURL=chunk-
|
|
879
|
+
//# sourceMappingURL=chunk-2DTLUKLA.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GitHubProvider,
|
|
3
3
|
ScmError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6YB3F2HP.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y2RY4K3I.js";
|
|
8
8
|
import {
|
|
9
9
|
err,
|
|
10
10
|
ok
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RIYFOUW4.js";
|
|
12
12
|
|
|
13
13
|
// src/scm/factory.ts
|
|
14
14
|
async function createScmProvider(config) {
|
|
@@ -41,4 +41,4 @@ export {
|
|
|
41
41
|
createScmProvider,
|
|
42
42
|
createGitHubProvider
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-34YOAV3B.js.map
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
loadTechniquesRegistry,
|
|
9
9
|
resolveInsideRoot,
|
|
10
10
|
savePapersRegistry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YWTC3XY5.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Y2RY4K3I.js";
|
|
15
15
|
import {
|
|
16
16
|
getToolMemory
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-X5CLL6FQ.js";
|
|
18
18
|
import {
|
|
19
19
|
capitalizeWords,
|
|
20
20
|
tokenizeFiltered,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
ok,
|
|
44
44
|
registerPersistentDistillerFactory,
|
|
45
45
|
sigmoidConfidence
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-RIYFOUW4.js";
|
|
47
47
|
import {
|
|
48
48
|
ensureLearningDir,
|
|
49
49
|
getRulesFile
|
|
@@ -4241,4 +4241,4 @@ export {
|
|
|
4241
4241
|
DEFAULT_CONTEXT_BUDGET_TOKENS,
|
|
4242
4242
|
getContextPromptPrefix
|
|
4243
4243
|
};
|
|
4244
|
-
//# sourceMappingURL=chunk-
|
|
4244
|
+
//# sourceMappingURL=chunk-3N4XSJPY.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
createLogger,
|
|
8
8
|
err,
|
|
9
9
|
ok
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RIYFOUW4.js";
|
|
11
11
|
|
|
12
12
|
// src/adapters/sdk/gateway-env.ts
|
|
13
13
|
function readTrimmed(env, name) {
|
|
@@ -315,4 +315,4 @@ export {
|
|
|
315
315
|
validateCustomApiBaseUrl,
|
|
316
316
|
assertCustomApiHostResolvesPublic
|
|
317
317
|
};
|
|
318
|
-
//# sourceMappingURL=chunk-
|
|
318
|
+
//# sourceMappingURL=chunk-5GMAK2H5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RIYFOUW4.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/setup-config.ts
|
|
6
6
|
import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
@@ -77,4 +77,4 @@ function ensureBackup(outputPath) {
|
|
|
77
77
|
export {
|
|
78
78
|
runConfigInitSync
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
80
|
+
//# sourceMappingURL=chunk-6NXLVWML.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
err,
|
|
5
5
|
getErrorMessage,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RIYFOUW4.js";
|
|
8
8
|
|
|
9
9
|
// src/scm/types.ts
|
|
10
10
|
var ScmError = class extends Error {
|
|
@@ -281,4 +281,4 @@ export {
|
|
|
281
281
|
ScmError,
|
|
282
282
|
GitHubProvider
|
|
283
283
|
};
|
|
284
|
-
//# sourceMappingURL=chunk-
|
|
284
|
+
//# sourceMappingURL=chunk-6YB3F2HP.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
getTimeProvider
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RIYFOUW4.js";
|
|
8
8
|
|
|
9
9
|
// src/mcp/tools/scanner-registry-fetcher.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -740,4 +740,4 @@ export {
|
|
|
740
740
|
generateSecurityPlan,
|
|
741
741
|
buildPlanFromAnalysis
|
|
742
742
|
};
|
|
743
|
-
//# sourceMappingURL=chunk-
|
|
743
|
+
//# sourceMappingURL=chunk-7WKMF5VE.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
TASK_CATEGORIES,
|
|
3
3
|
getAdaptiveBonus,
|
|
4
4
|
getOutcomeStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RIYFOUW4.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-BSCTEWWP.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
lookupInTreeCapability,
|
|
14
14
|
ok,
|
|
15
15
|
resolveRetryAfterMs
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RIYFOUW4.js";
|
|
17
17
|
|
|
18
18
|
// src/config/model-parameter-support.ts
|
|
19
19
|
function parseClaudeMajorMinor(bareId) {
|
|
@@ -834,4 +834,4 @@ export {
|
|
|
834
834
|
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
835
835
|
collectStream
|
|
836
836
|
};
|
|
837
|
-
//# sourceMappingURL=chunk-
|
|
837
|
+
//# sourceMappingURL=chunk-CNBXEHTN.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CACHE_TIMEOUTS,
|
|
3
3
|
createLogger,
|
|
4
4
|
getTimeProvider
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RIYFOUW4.js";
|
|
6
6
|
|
|
7
7
|
// src/security/trust-types.ts
|
|
8
8
|
import { z } from "zod";
|
|
@@ -610,4 +610,4 @@ export {
|
|
|
610
610
|
resolveReputationGatingMode,
|
|
611
611
|
gateWithReputation
|
|
612
612
|
};
|
|
613
|
-
//# sourceMappingURL=chunk-
|
|
613
|
+
//# sourceMappingURL=chunk-D22SPEEU.js.map
|
|
@@ -5,35 +5,35 @@ import {
|
|
|
5
5
|
planOptionalParams,
|
|
6
6
|
requireApiKey,
|
|
7
7
|
validateApiKeyPresence
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CNBXEHTN.js";
|
|
9
9
|
import {
|
|
10
10
|
CUSTOM_API_DEFAULT_MODEL
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ITMG2I6K.js";
|
|
12
12
|
import {
|
|
13
13
|
assertCustomApiHostResolvesPublic,
|
|
14
14
|
hostnameOf,
|
|
15
15
|
readGatewayEnv,
|
|
16
16
|
redactApiKey,
|
|
17
17
|
validateCustomApiBaseUrl
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5GMAK2H5.js";
|
|
19
19
|
import {
|
|
20
20
|
nexusMkdtempSync
|
|
21
21
|
} from "./chunk-HERI7LXN.js";
|
|
22
22
|
import {
|
|
23
23
|
getAvailabilityCache
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HLHCNG7B.js";
|
|
25
25
|
import {
|
|
26
26
|
extractSystemPrompt
|
|
27
27
|
} from "./chunk-QZUG667L.js";
|
|
28
28
|
import {
|
|
29
29
|
generateHyphenId
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VXXD6VQI.js";
|
|
31
31
|
import {
|
|
32
32
|
CliCircuitBreaker,
|
|
33
33
|
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
34
34
|
getCliCircuitBreakerSnapshot,
|
|
35
35
|
getDefaultCliCircuitBreakerRegistry
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TQHQMEWO.js";
|
|
37
37
|
import {
|
|
38
38
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
39
39
|
CLI_TIMEOUTS,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
resolveRetryAfterMs,
|
|
79
79
|
retryAfterMsFromContext,
|
|
80
80
|
warnIfGatewayCostUndeclared
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-RIYFOUW4.js";
|
|
82
82
|
import {
|
|
83
83
|
parseBoolValue
|
|
84
84
|
} from "./chunk-RNDHNRSX.js";
|
|
@@ -5282,4 +5282,4 @@ export {
|
|
|
5282
5282
|
SdkAdapter,
|
|
5283
5283
|
createAutoAdapter
|
|
5284
5284
|
};
|
|
5285
|
-
//# sourceMappingURL=chunk-
|
|
5285
|
+
//# sourceMappingURL=chunk-D6MOQULW.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
MODEL_IDS,
|
|
4
4
|
getTimeProvider,
|
|
5
5
|
resolveModelIdentitySync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RIYFOUW4.js";
|
|
7
7
|
|
|
8
8
|
// src/config/model-availability.ts
|
|
9
9
|
var DEFAULT_TTL_MS = 6e4;
|
|
@@ -150,4 +150,4 @@ export {
|
|
|
150
150
|
resetAvailabilityCache,
|
|
151
151
|
filterAvailableModels
|
|
152
152
|
};
|
|
153
|
-
//# sourceMappingURL=chunk-
|
|
153
|
+
//# sourceMappingURL=chunk-HLHCNG7B.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
MCP_TIMEOUTS,
|
|
6
6
|
TEST_TIMEOUTS,
|
|
7
7
|
WORKFLOW_TIMEOUTS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RIYFOUW4.js";
|
|
9
9
|
import {
|
|
10
10
|
createGetToolRateLimit
|
|
11
11
|
} from "./chunk-RNDHNRSX.js";
|
|
@@ -220,4 +220,4 @@ export {
|
|
|
220
220
|
CUSTOM_API_DEFAULT_MODEL,
|
|
221
221
|
DEFAULTS
|
|
222
222
|
};
|
|
223
|
-
//# sourceMappingURL=chunk-
|
|
223
|
+
//# sourceMappingURL=chunk-ITMG2I6K.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2A3CC5SZ.js";
|
|
4
4
|
import {
|
|
5
5
|
CACHE_TIMEOUTS,
|
|
6
6
|
MCP_TIMEOUTS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
getTimeProvider,
|
|
18
18
|
ok,
|
|
19
19
|
resolveToolClassGuardMs
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RIYFOUW4.js";
|
|
21
21
|
import {
|
|
22
22
|
getNexusDataDir
|
|
23
23
|
} from "./chunk-RNDHNRSX.js";
|
|
@@ -2186,4 +2186,4 @@ export {
|
|
|
2186
2186
|
DEFAULT_CONSENSUS_CONFIG,
|
|
2187
2187
|
ConsensusMetricsSchema
|
|
2188
2188
|
};
|
|
2189
|
-
//# sourceMappingURL=chunk-
|
|
2189
|
+
//# sourceMappingURL=chunk-JSR6RFWB.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SERVES_PROBE_PROMPT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XSWKTCGW.js";
|
|
4
4
|
import {
|
|
5
5
|
readOpenAICompatEndpoint,
|
|
6
6
|
readOpenAICompatEnv
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X7ZAI75Z.js";
|
|
8
8
|
import {
|
|
9
9
|
allOf
|
|
10
10
|
} from "./chunk-OQB3XC5O.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
NODE_ENGINE_RANGE,
|
|
13
13
|
VERSION,
|
|
14
14
|
isNodeVersionSupported
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2A3CC5SZ.js";
|
|
16
16
|
import {
|
|
17
17
|
claimGlobalRegistry
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OM62MDMA.js";
|
|
19
19
|
import {
|
|
20
20
|
capitalize
|
|
21
21
|
} from "./chunk-7LP6VJRP.js";
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
codexMcpServerAvailable,
|
|
27
27
|
createAllAdapters,
|
|
28
28
|
probeCli
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-D6MOQULW.js";
|
|
30
30
|
import {
|
|
31
31
|
resolveGatewayEnv
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5GMAK2H5.js";
|
|
33
33
|
import {
|
|
34
34
|
getNexusTmpDir
|
|
35
35
|
} from "./chunk-HERI7LXN.js";
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
resolveGatewayCostDeclaration,
|
|
58
58
|
symbols,
|
|
59
59
|
writeLine
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-RIYFOUW4.js";
|
|
61
61
|
import {
|
|
62
62
|
getLearningDir,
|
|
63
63
|
getOutcomesFile,
|
|
@@ -1372,13 +1372,13 @@ async function runDoctorFix(result) {
|
|
|
1372
1372
|
writeLine2("\u2500".repeat(40));
|
|
1373
1373
|
let fixCount = 0;
|
|
1374
1374
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1375
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1375
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-YMU6OBUA.js");
|
|
1376
1376
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1377
1377
|
writeLine2(outcome.line);
|
|
1378
1378
|
if (outcome.counted) fixCount++;
|
|
1379
1379
|
}
|
|
1380
1380
|
if (!result.configFile.found) {
|
|
1381
|
-
const { runConfigInitSync } = await import("./setup-config-
|
|
1381
|
+
const { runConfigInitSync } = await import("./setup-config-FTKTKSHZ.js");
|
|
1382
1382
|
const configResult = runConfigInitSync(process.cwd(), false, false);
|
|
1383
1383
|
if (configResult.success && configResult.created) {
|
|
1384
1384
|
writeLine2(`\u2713 Generated config: ${configResult.path}`);
|
|
@@ -1474,4 +1474,4 @@ export {
|
|
|
1474
1474
|
startStdioServer,
|
|
1475
1475
|
closeServer
|
|
1476
1476
|
};
|
|
1477
|
-
//# sourceMappingURL=chunk-
|
|
1477
|
+
//# sourceMappingURL=chunk-L7KWTUF7.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isGatewayModelAdapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X7ZAI75Z.js";
|
|
4
4
|
import {
|
|
5
5
|
allOf
|
|
6
6
|
} from "./chunk-OQB3XC5O.js";
|
|
@@ -24,20 +24,20 @@ import {
|
|
|
24
24
|
toolSuccessStructured,
|
|
25
25
|
withProgressHeartbeat,
|
|
26
26
|
wrapToolWithTimeout
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JSR6RFWB.js";
|
|
28
28
|
import {
|
|
29
29
|
VERSION
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-2A3CC5SZ.js";
|
|
31
31
|
import {
|
|
32
32
|
UNRESOLVED_MODEL_ID,
|
|
33
33
|
assessPanelIndependence,
|
|
34
34
|
countDistinctModels,
|
|
35
35
|
createEvent,
|
|
36
36
|
getGlobalRegistry
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-OM62MDMA.js";
|
|
38
38
|
import {
|
|
39
39
|
getToolMemory
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-X5CLL6FQ.js";
|
|
41
41
|
import {
|
|
42
42
|
authRemediation,
|
|
43
43
|
classifyExtractedError,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
sanitizeOutput,
|
|
49
49
|
sleep,
|
|
50
50
|
withTimeout
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-D6MOQULW.js";
|
|
52
52
|
import {
|
|
53
53
|
AgentError,
|
|
54
54
|
CLI_NAMES,
|
|
@@ -57,6 +57,7 @@ import {
|
|
|
57
57
|
OPERATION_CLASSES,
|
|
58
58
|
OutcomeStore,
|
|
59
59
|
TaskOutcomeSchema,
|
|
60
|
+
UNDECLARED_OPTIONS_EXCERPT_CHARS,
|
|
60
61
|
VOTE_TIMEOUTS,
|
|
61
62
|
categorizeOutcomeErrorMessage,
|
|
62
63
|
clamp01,
|
|
@@ -81,7 +82,7 @@ import {
|
|
|
81
82
|
registerPersistentOutcomeStoreFactory,
|
|
82
83
|
resolveClassGuardMs,
|
|
83
84
|
resolveVoteTimeout
|
|
84
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-RIYFOUW4.js";
|
|
85
86
|
import {
|
|
86
87
|
ensureLearningDir,
|
|
87
88
|
getOutcomesFile
|
|
@@ -6032,7 +6033,7 @@ function singleModelPanelWarning(votes) {
|
|
|
6032
6033
|
}
|
|
6033
6034
|
|
|
6034
6035
|
// src/mcp/tools/consensus-vote-option-detection.ts
|
|
6035
|
-
var
|
|
6036
|
+
var UNDECLARED_OPTION_PATTERNS = Object.freeze([
|
|
6036
6037
|
// `Option A` and `OPTION A`, but NOT `option a` — the lowercase form appears
|
|
6037
6038
|
// in ordinary prose ("there is no option a caller can set"), the capitalised
|
|
6038
6039
|
// form is a heading. The motivating proposal used `Option A`; an
|
|
@@ -6043,10 +6044,32 @@ var MULTI_OPTION_PATTERNS = Object.freeze([
|
|
|
6043
6044
|
/\bpick exactly one\b/i,
|
|
6044
6045
|
/\bvote for exactly one\b/i
|
|
6045
6046
|
]);
|
|
6047
|
+
function excerptAround(text, start, end) {
|
|
6048
|
+
const width = UNDECLARED_OPTIONS_EXCERPT_CHARS;
|
|
6049
|
+
if (text.length <= width) return text;
|
|
6050
|
+
const slack = Math.max(0, width - (end - start));
|
|
6051
|
+
let from = Math.max(0, start - Math.floor(slack / 2));
|
|
6052
|
+
const to = Math.min(text.length, from + width);
|
|
6053
|
+
from = Math.max(0, to - width);
|
|
6054
|
+
return text.slice(from, to);
|
|
6055
|
+
}
|
|
6056
|
+
function detectUndeclaredOptions(proposal, declaredOptions) {
|
|
6057
|
+
if (declaredOptions !== void 0 && declaredOptions.length > 0) return { fired: false };
|
|
6058
|
+
if (proposal === "") return { fired: false };
|
|
6059
|
+
for (const pattern of UNDECLARED_OPTION_PATTERNS) {
|
|
6060
|
+
const match = pattern.exec(proposal);
|
|
6061
|
+
if (match === null) continue;
|
|
6062
|
+
const start = match.index;
|
|
6063
|
+
return {
|
|
6064
|
+
fired: true,
|
|
6065
|
+
pattern: String(pattern),
|
|
6066
|
+
excerpt: excerptAround(proposal, start, start + match[0].length)
|
|
6067
|
+
};
|
|
6068
|
+
}
|
|
6069
|
+
return { fired: false };
|
|
6070
|
+
}
|
|
6046
6071
|
function checkUndeclaredOptions(proposal, declaredOptions, allEngagedApproved) {
|
|
6047
|
-
if (
|
|
6048
|
-
if (proposal === "") return { flagged: false };
|
|
6049
|
-
if (!MULTI_OPTION_PATTERNS.some((p) => p.test(proposal))) return { flagged: false };
|
|
6072
|
+
if (!detectUndeclaredOptions(proposal, declaredOptions).fired) return { flagged: false };
|
|
6050
6073
|
const base = "This proposal appears to name alternatives, but `options` was not declared, so the tally records approve/reject only and cannot say WHICH alternative won (#4452, #5360). Re-run with `options` to record the option tally.";
|
|
6051
6074
|
return {
|
|
6052
6075
|
flagged: true,
|
|
@@ -6410,7 +6433,7 @@ function logPartialProposal(bounded, log) {
|
|
|
6410
6433
|
}
|
|
6411
6434
|
async function runContrarianCheck(proposal, log, opts) {
|
|
6412
6435
|
try {
|
|
6413
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
6436
|
+
const { executeExpert } = await import("./expert-bridge-7C7JYDQK.js");
|
|
6414
6437
|
const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
|
|
6415
6438
|
logPartialProposal(bounded, log);
|
|
6416
6439
|
const result = await executeExpert("architecture", buildContrarianPrompt(bounded, opts), {
|
|
@@ -6785,7 +6808,7 @@ function parseVoteRecordsText(text) {
|
|
|
6785
6808
|
}
|
|
6786
6809
|
|
|
6787
6810
|
// src/orchestration/outcomes/outcome-store-persistence.ts
|
|
6788
|
-
import { appendFileSync as appendFileSync3, readFileSync as readFileSync4, writeFileSync
|
|
6811
|
+
import { appendFileSync as appendFileSync3, readFileSync as readFileSync4, writeFileSync, existsSync as existsSync3 } from "node:fs";
|
|
6789
6812
|
var PersistentOutcomeStore = class extends OutcomeStore {
|
|
6790
6813
|
filePath;
|
|
6791
6814
|
logger;
|
|
@@ -6884,7 +6907,7 @@ var PersistentOutcomeStore = class extends OutcomeStore {
|
|
|
6884
6907
|
try {
|
|
6885
6908
|
const entries = this.query();
|
|
6886
6909
|
const content = entries.map((e) => JSON.stringify(e)).join("\n") + "\n";
|
|
6887
|
-
|
|
6910
|
+
writeFileSync(this.filePath, content, "utf-8");
|
|
6888
6911
|
} catch (error) {
|
|
6889
6912
|
const msg = getErrorMessage(error);
|
|
6890
6913
|
this.logger.warn("Failed to rewrite outcomes file after reclassification", {
|
|
@@ -7111,7 +7134,8 @@ function recordDecisionCost(options) {
|
|
|
7111
7134
|
gate: options.gate,
|
|
7112
7135
|
voters,
|
|
7113
7136
|
billingMode,
|
|
7114
|
-
timestamp
|
|
7137
|
+
timestamp,
|
|
7138
|
+
...options.undeclaredOptionsDetector !== void 0 ? { undeclaredOptionsDetector: options.undeclaredOptionsDetector } : {}
|
|
7115
7139
|
});
|
|
7116
7140
|
if (!persisted) {
|
|
7117
7141
|
droppedCostRecordCount += 1;
|
|
@@ -7194,15 +7218,15 @@ import {
|
|
|
7194
7218
|
existsSync as existsSync5,
|
|
7195
7219
|
readFileSync as readFileSync6,
|
|
7196
7220
|
readdirSync,
|
|
7197
|
-
unlinkSync
|
|
7198
|
-
writeFileSync as
|
|
7221
|
+
unlinkSync,
|
|
7222
|
+
writeFileSync as writeFileSync3,
|
|
7199
7223
|
chmodSync
|
|
7200
7224
|
} from "node:fs";
|
|
7201
7225
|
import { z as z13 } from "zod";
|
|
7202
7226
|
|
|
7203
7227
|
// src/mcp/jobs/job-idempotency.ts
|
|
7204
7228
|
import { createHash as createHash3, randomUUID } from "node:crypto";
|
|
7205
|
-
import { existsSync as existsSync4, readFileSync as readFileSync5, writeFileSync as
|
|
7229
|
+
import { existsSync as existsSync4, readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "node:fs";
|
|
7206
7230
|
import { z as z12 } from "zod";
|
|
7207
7231
|
var logger7 = createLogger({ component: "job-idempotency" });
|
|
7208
7232
|
var IdempotencyIndexEntrySchema = z12.object({
|
|
@@ -7279,7 +7303,7 @@ function registerIdempotentJob(params) {
|
|
|
7279
7303
|
jobId: params.jobId,
|
|
7280
7304
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7281
7305
|
};
|
|
7282
|
-
|
|
7306
|
+
writeFileSync2(path2, JSON.stringify(entry, null, 2));
|
|
7283
7307
|
logger7.debug("Wrote idempotency index entry", { tool: params.tool, jobId: params.jobId });
|
|
7284
7308
|
}
|
|
7285
7309
|
function shortCircuitOrFreshJobId(params) {
|
|
@@ -7407,7 +7431,7 @@ function jobResultPath(jobId) {
|
|
|
7407
7431
|
return nexusDataPathEnsure("jobs", `result-${jobId}.json`);
|
|
7408
7432
|
}
|
|
7409
7433
|
function persistJobRecord(path2, record) {
|
|
7410
|
-
|
|
7434
|
+
writeFileSync3(path2, JSON.stringify(record, null, 2), { mode: 384 });
|
|
7411
7435
|
chmodSync(path2, 384);
|
|
7412
7436
|
}
|
|
7413
7437
|
function writeJobPending(jobId, toolName, signalAccepted, producerVersion = VERSION) {
|
|
@@ -7594,7 +7618,7 @@ function sweepRecord(jobId, entry, sweep) {
|
|
|
7594
7618
|
}
|
|
7595
7619
|
const settledAt = record.completedAt ?? record.createdAt;
|
|
7596
7620
|
if (!isOlderThan(settledAt, sweep.nowMs, sweep.retentionMs)) return "kept";
|
|
7597
|
-
if (!sweep.dryRun)
|
|
7621
|
+
if (!sweep.dryRun) unlinkSync(path2);
|
|
7598
7622
|
return "deleted";
|
|
7599
7623
|
}
|
|
7600
7624
|
function sweepKeyEntry(entry, removedJobIds, sweep) {
|
|
@@ -7604,7 +7628,7 @@ function sweepKeyEntry(entry, removedJobIds, sweep) {
|
|
|
7604
7628
|
if (!isOlderThan(indexEntry.createdAt, sweep.nowMs, sweep.retentionMs)) return null;
|
|
7605
7629
|
const recordGone = removedJobIds.has(indexEntry.jobId) || !existsSync5(nexusDataPath("jobs", `result-${indexEntry.jobId}.json`));
|
|
7606
7630
|
if (!recordGone) return null;
|
|
7607
|
-
if (!sweep.dryRun)
|
|
7631
|
+
if (!sweep.dryRun) unlinkSync(path2);
|
|
7608
7632
|
return "deletedKeys";
|
|
7609
7633
|
}
|
|
7610
7634
|
function isOlderThan(isoTimestamp, nowMs, windowMs) {
|
|
@@ -8750,7 +8774,20 @@ function recordVoteSideEffects(proposal, strategy, result, logger11, declared) {
|
|
|
8750
8774
|
});
|
|
8751
8775
|
let costSummary;
|
|
8752
8776
|
try {
|
|
8753
|
-
costSummary = recordDecisionCost({
|
|
8777
|
+
costSummary = recordDecisionCost({
|
|
8778
|
+
decisionId,
|
|
8779
|
+
gate: "consensus_vote",
|
|
8780
|
+
votes: result.votes,
|
|
8781
|
+
// #5422: the detector's verdict, recorded on EVERY vote so the not-fired
|
|
8782
|
+
// rows are the denominator. Computed here, where the FULL proposal is in
|
|
8783
|
+
// hand — the ledger keeps a 503-char preview, which is why precision
|
|
8784
|
+
// cannot be measured there. Same patterns as the `panelWarning` in
|
|
8785
|
+
// `buildResponse`, so the measured precision is the warning's precision.
|
|
8786
|
+
undeclaredOptionsDetector: {
|
|
8787
|
+
...detectUndeclaredOptions(proposal, declared.options),
|
|
8788
|
+
declaredOptionCount: declared.options?.length ?? 0
|
|
8789
|
+
}
|
|
8790
|
+
});
|
|
8754
8791
|
} catch (costError) {
|
|
8755
8792
|
logger11.warn("Per-decision cost rollup failed (non-fatal)", {
|
|
8756
8793
|
error: getErrorMessage(costError)
|
|
@@ -9188,4 +9225,4 @@ export {
|
|
|
9188
9225
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
9189
9226
|
registerConsensusVoteTool
|
|
9190
9227
|
};
|
|
9191
|
-
//# sourceMappingURL=chunk-
|
|
9228
|
+
//# sourceMappingURL=chunk-LZXMWS5C.js.map
|