nexus-agents 8.104.2 → 8.104.4
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-FPQQQLBT.js → ast-rule-runner-RDUGQF2T.js} +3 -3
- package/dist/{child-mcp-config-OU674OG4.js → child-mcp-config-UA3R4INF.js} +2 -2
- package/dist/{chunk-LFGUXWV4.js → chunk-3CAYUVSE.js} +5 -5
- package/dist/{chunk-JWOBCZOI.js → chunk-4BC6HM2G.js} +5 -5
- package/dist/{chunk-CVOJYSBP.js → chunk-5255FSWF.js} +3 -3
- package/dist/{chunk-HGZ2EVGZ.js → chunk-5O3KZ4SQ.js} +4 -4
- package/dist/{chunk-VBOI5NLK.js → chunk-6IDKVAZ6.js} +2 -2
- package/dist/{chunk-HA762GRI.js → chunk-6JCLZ5YS.js} +4 -4
- package/dist/{chunk-Z2WHITKG.js → chunk-6XGZZCLV.js} +2 -2
- package/dist/{chunk-AI44QZEQ.js → chunk-A3BBWT6J.js} +3 -3
- package/dist/{chunk-DOCQDEP6.js → chunk-BAIQLM5D.js} +2 -2
- package/dist/{chunk-I6B4SVW2.js → chunk-DN2N7I6D.js} +2 -2
- package/dist/{chunk-J5KHI3AJ.js → chunk-DNJSJZHV.js} +2 -2
- package/dist/{chunk-NYMBXK57.js → chunk-DRB64KKE.js} +175 -32
- package/dist/chunk-DRB64KKE.js.map +1 -0
- package/dist/{chunk-JZYJ2TK6.js → chunk-EX5EXEWL.js} +13 -13
- package/dist/{chunk-O6CKXSGL.js → chunk-FCB2OKVG.js} +2 -2
- package/dist/{chunk-GZ2UXPJK.js → chunk-H75NFDVH.js} +2 -2
- package/dist/{chunk-XUB5CR3M.js → chunk-IVLNHSKI.js} +5 -5
- package/dist/{chunk-BBUGUS2S.js → chunk-L7BHYU7J.js} +2 -2
- package/dist/{chunk-GHH3F26W.js → chunk-MBDREAWV.js} +15 -9
- package/dist/chunk-MBDREAWV.js.map +1 -0
- package/dist/{chunk-XMAZUKN4.js → chunk-MJM25KL2.js} +2 -2
- package/dist/{chunk-NZ7F62NM.js → chunk-MKNJZXPH.js} +2 -2
- package/dist/{chunk-4ECDFPNG.js → chunk-N3E5NZH5.js} +16 -7
- package/dist/chunk-N3E5NZH5.js.map +1 -0
- package/dist/{chunk-QUM4VDSH.js → chunk-NJVE656K.js} +3 -3
- package/dist/{chunk-2R4ECLKX.js → chunk-Q2JDPB7U.js} +4 -4
- package/dist/{chunk-LDSA37E6.js → chunk-QZKX4TIJ.js} +11 -11
- package/dist/{chunk-VL5GXFCD.js → chunk-RCRGKSPP.js} +3 -3
- package/dist/{chunk-RY4IIRQ6.js → chunk-RG4LWSCV.js} +2 -2
- package/dist/{chunk-ZOGXBT7D.js → chunk-S74JTO6K.js} +2 -2
- package/dist/{chunk-TSC6QE5D.js → chunk-S7A6OFUF.js} +2 -2
- package/dist/{chunk-7LP6VJRP.js → chunk-SX5DB6UR.js} +1 -1
- package/dist/chunk-SX5DB6UR.js.map +1 -0
- package/dist/{chunk-7ZQ52O5I.js → chunk-TTSGRUYH.js} +2 -2
- package/dist/{chunk-7ZLAAEQF.js → chunk-UHQ3A3XD.js} +2 -2
- package/dist/{chunk-4KLMOYGR.js → chunk-UWDIGO6Q.js} +992 -952
- package/dist/chunk-UWDIGO6Q.js.map +1 -0
- package/dist/{chunk-4237N3VG.js → chunk-UWKJVCAW.js} +2 -2
- package/dist/{chunk-3IBRN6HM.js → chunk-WQFODDSA.js} +2 -2
- package/dist/{chunk-PTL3Y3GG.js → chunk-XWAYOEIZ.js} +98 -107
- package/dist/chunk-XWAYOEIZ.js.map +1 -0
- package/dist/{chunk-R5W64CM3.js → chunk-ZHXYBIHG.js} +8 -8
- package/dist/{cli-circuit-breaker-YDYCPUJ2.js → cli-circuit-breaker-DI6HYQLX.js} +3 -3
- package/dist/cli.js +57 -58
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-KP54ERD7.js → composite-router-YCYSHC2H.js} +2 -2
- package/dist/{consensus-vote-S7EAOO7P.js → consensus-vote-LDYFXJ6E.js} +18 -18
- package/dist/{context-retriever-CRMH7I27.js → context-retriever-BVZ7TGH5.js} +9 -9
- package/dist/{doctor-deep-Z22ZTRGC.js → doctor-deep-ZJO7VB4C.js} +3 -3
- package/dist/{doctor-gateway-report-YGIL2DWB.js → doctor-gateway-report-5AKZEICY.js} +6 -6
- package/dist/{doctor-live-BMLHJHIZ.js → doctor-live-F6HHITYZ.js} +10 -10
- package/dist/{expert-bridge-PLEGYZ2B.js → expert-bridge-P2GWWMDE.js} +5 -5
- package/dist/{factory-LJZLK6X4.js → factory-P3TXEEOA.js} +5 -5
- package/dist/{factory-CDUIWBFU.js → factory-S3NLWBJU.js} +9 -9
- package/dist/{improvement-review-MVOI7ZGA.js → improvement-review-7F7YAQHV.js} +5 -5
- package/dist/index.d.ts +13 -13
- package/dist/index.js +33 -33
- package/dist/{init-opencode-SCWAFC6T.js → init-opencode-CJURYGYI.js} +5 -5
- package/dist/issue-triage-NBHXVTON.js +16 -0
- package/dist/{openai-compat-adapter-QEHGEW63.js → openai-compat-adapter-UED42CVS.js} +5 -5
- package/dist/{pr-reviewer-helpers-BIVIR3YX.js → pr-reviewer-helpers-XYMBGVXN.js} +4 -4
- package/dist/{registry-command-GL4ERQX6.js → registry-command-IFJF6DHO.js} +2 -2
- package/dist/{repo-security-plan-AAGM25JY.js → repo-security-plan-V5JRLKVX.js} +3 -3
- package/dist/{research-helpers-synthesize-Q2TQWBRU.js → research-helpers-synthesize-RSZYXQWS.js} +4 -4
- package/dist/{routing-memory-BZ23YC3G.js → routing-memory-XERNDUWT.js} +2 -2
- package/dist/{session-memory-RBY5WOOX.js → session-memory-2SWQKTK5.js} +3 -3
- package/dist/{setup-config-CE2PXLIT.js → setup-config-PTSTDDWH.js} +3 -3
- package/dist/{setup-custom-api-IZW3EOE6.js → setup-custom-api-CP46OS7A.js} +4 -4
- package/dist/setup-data-dir-OVSA7KTZ.js +34 -0
- package/dist/{tool-memory-YGKN6C7W.js → tool-memory-IQUH2VNB.js} +6 -6
- package/dist/{unified-registry-EPPMS473.js → unified-registry-4C3T4SNP.js} +11 -11
- package/dist/{weather-report-N5DXGX5F.js → weather-report-GJBEE2H6.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4ECDFPNG.js.map +0 -1
- package/dist/chunk-4KLMOYGR.js.map +0 -1
- package/dist/chunk-7LP6VJRP.js.map +0 -1
- package/dist/chunk-GHH3F26W.js.map +0 -1
- package/dist/chunk-NYMBXK57.js.map +0 -1
- package/dist/chunk-PTL3Y3GG.js.map +0 -1
- package/dist/issue-triage-5Q4LZ6N5.js +0 -16
- package/dist/setup-data-dir-HTGH3VXZ.js +0 -34
- /package/dist/{ast-rule-runner-FPQQQLBT.js.map → ast-rule-runner-RDUGQF2T.js.map} +0 -0
- /package/dist/{child-mcp-config-OU674OG4.js.map → child-mcp-config-UA3R4INF.js.map} +0 -0
- /package/dist/{chunk-LFGUXWV4.js.map → chunk-3CAYUVSE.js.map} +0 -0
- /package/dist/{chunk-JWOBCZOI.js.map → chunk-4BC6HM2G.js.map} +0 -0
- /package/dist/{chunk-CVOJYSBP.js.map → chunk-5255FSWF.js.map} +0 -0
- /package/dist/{chunk-HGZ2EVGZ.js.map → chunk-5O3KZ4SQ.js.map} +0 -0
- /package/dist/{chunk-VBOI5NLK.js.map → chunk-6IDKVAZ6.js.map} +0 -0
- /package/dist/{chunk-HA762GRI.js.map → chunk-6JCLZ5YS.js.map} +0 -0
- /package/dist/{chunk-Z2WHITKG.js.map → chunk-6XGZZCLV.js.map} +0 -0
- /package/dist/{chunk-AI44QZEQ.js.map → chunk-A3BBWT6J.js.map} +0 -0
- /package/dist/{chunk-DOCQDEP6.js.map → chunk-BAIQLM5D.js.map} +0 -0
- /package/dist/{chunk-I6B4SVW2.js.map → chunk-DN2N7I6D.js.map} +0 -0
- /package/dist/{chunk-J5KHI3AJ.js.map → chunk-DNJSJZHV.js.map} +0 -0
- /package/dist/{chunk-JZYJ2TK6.js.map → chunk-EX5EXEWL.js.map} +0 -0
- /package/dist/{chunk-O6CKXSGL.js.map → chunk-FCB2OKVG.js.map} +0 -0
- /package/dist/{chunk-GZ2UXPJK.js.map → chunk-H75NFDVH.js.map} +0 -0
- /package/dist/{chunk-XUB5CR3M.js.map → chunk-IVLNHSKI.js.map} +0 -0
- /package/dist/{chunk-BBUGUS2S.js.map → chunk-L7BHYU7J.js.map} +0 -0
- /package/dist/{chunk-XMAZUKN4.js.map → chunk-MJM25KL2.js.map} +0 -0
- /package/dist/{chunk-NZ7F62NM.js.map → chunk-MKNJZXPH.js.map} +0 -0
- /package/dist/{chunk-QUM4VDSH.js.map → chunk-NJVE656K.js.map} +0 -0
- /package/dist/{chunk-2R4ECLKX.js.map → chunk-Q2JDPB7U.js.map} +0 -0
- /package/dist/{chunk-LDSA37E6.js.map → chunk-QZKX4TIJ.js.map} +0 -0
- /package/dist/{chunk-VL5GXFCD.js.map → chunk-RCRGKSPP.js.map} +0 -0
- /package/dist/{chunk-RY4IIRQ6.js.map → chunk-RG4LWSCV.js.map} +0 -0
- /package/dist/{chunk-ZOGXBT7D.js.map → chunk-S74JTO6K.js.map} +0 -0
- /package/dist/{chunk-TSC6QE5D.js.map → chunk-S7A6OFUF.js.map} +0 -0
- /package/dist/{chunk-7ZQ52O5I.js.map → chunk-TTSGRUYH.js.map} +0 -0
- /package/dist/{chunk-7ZLAAEQF.js.map → chunk-UHQ3A3XD.js.map} +0 -0
- /package/dist/{chunk-4237N3VG.js.map → chunk-UWKJVCAW.js.map} +0 -0
- /package/dist/{chunk-3IBRN6HM.js.map → chunk-WQFODDSA.js.map} +0 -0
- /package/dist/{chunk-R5W64CM3.js.map → chunk-ZHXYBIHG.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-YDYCPUJ2.js.map → cli-circuit-breaker-DI6HYQLX.js.map} +0 -0
- /package/dist/{composite-router-KP54ERD7.js.map → composite-router-YCYSHC2H.js.map} +0 -0
- /package/dist/{consensus-vote-S7EAOO7P.js.map → consensus-vote-LDYFXJ6E.js.map} +0 -0
- /package/dist/{context-retriever-CRMH7I27.js.map → context-retriever-BVZ7TGH5.js.map} +0 -0
- /package/dist/{doctor-deep-Z22ZTRGC.js.map → doctor-deep-ZJO7VB4C.js.map} +0 -0
- /package/dist/{doctor-gateway-report-YGIL2DWB.js.map → doctor-gateway-report-5AKZEICY.js.map} +0 -0
- /package/dist/{doctor-live-BMLHJHIZ.js.map → doctor-live-F6HHITYZ.js.map} +0 -0
- /package/dist/{expert-bridge-PLEGYZ2B.js.map → expert-bridge-P2GWWMDE.js.map} +0 -0
- /package/dist/{factory-CDUIWBFU.js.map → factory-P3TXEEOA.js.map} +0 -0
- /package/dist/{factory-LJZLK6X4.js.map → factory-S3NLWBJU.js.map} +0 -0
- /package/dist/{improvement-review-MVOI7ZGA.js.map → improvement-review-7F7YAQHV.js.map} +0 -0
- /package/dist/{init-opencode-SCWAFC6T.js.map → init-opencode-CJURYGYI.js.map} +0 -0
- /package/dist/{issue-triage-5Q4LZ6N5.js.map → issue-triage-NBHXVTON.js.map} +0 -0
- /package/dist/{openai-compat-adapter-QEHGEW63.js.map → openai-compat-adapter-UED42CVS.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-BIVIR3YX.js.map → pr-reviewer-helpers-XYMBGVXN.js.map} +0 -0
- /package/dist/{registry-command-GL4ERQX6.js.map → registry-command-IFJF6DHO.js.map} +0 -0
- /package/dist/{repo-security-plan-AAGM25JY.js.map → repo-security-plan-V5JRLKVX.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-Q2TQWBRU.js.map → research-helpers-synthesize-RSZYXQWS.js.map} +0 -0
- /package/dist/{routing-memory-BZ23YC3G.js.map → routing-memory-XERNDUWT.js.map} +0 -0
- /package/dist/{session-memory-RBY5WOOX.js.map → session-memory-2SWQKTK5.js.map} +0 -0
- /package/dist/{setup-config-CE2PXLIT.js.map → setup-config-PTSTDDWH.js.map} +0 -0
- /package/dist/{setup-custom-api-IZW3EOE6.js.map → setup-custom-api-CP46OS7A.js.map} +0 -0
- /package/dist/{setup-data-dir-HTGH3VXZ.js.map → setup-data-dir-OVSA7KTZ.js.map} +0 -0
- /package/dist/{tool-memory-YGKN6C7W.js.map → tool-memory-IQUH2VNB.js.map} +0 -0
- /package/dist/{unified-registry-EPPMS473.js.map → unified-registry-4C3T4SNP.js.map} +0 -0
- /package/dist/{weather-report-N5DXGX5F.js.map → weather-report-GJBEE2H6.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-TTSGRUYH.js";
|
|
13
|
+
import "./chunk-5255FSWF.js";
|
|
14
14
|
import "./chunk-UE7A2XHM.js";
|
|
15
15
|
import "./chunk-LWOX65CP.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-RDUGQF2T.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-OITVVSWO.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5255FSWF.js";
|
|
7
7
|
import "./chunk-UE7A2XHM.js";
|
|
8
8
|
import "./chunk-LWOX65CP.js";
|
|
9
9
|
import "./chunk-PX6F3LHL.js";
|
|
@@ -56,4 +56,4 @@ async function generateMcpConfig(options) {
|
|
|
56
56
|
export {
|
|
57
57
|
generateMcpConfig
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=child-mcp-config-
|
|
59
|
+
//# sourceMappingURL=child-mcp-config-UA3R4INF.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureGatewayDiscovered,
|
|
3
3
|
gatewayDiscoveryGeneration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-S74JTO6K.js";
|
|
5
5
|
import {
|
|
6
6
|
createAutoAdapter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DRB64KKE.js";
|
|
8
8
|
import {
|
|
9
9
|
getDefaultCliCircuitBreakerRegistry,
|
|
10
10
|
mapModelErrorToCategory
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MKNJZXPH.js";
|
|
12
12
|
import {
|
|
13
13
|
CircularBuffer,
|
|
14
14
|
ConfigError,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
resolveModelIdentitySync,
|
|
35
35
|
toRateLimitError,
|
|
36
36
|
warnIfGatewayCostUndeclared
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-5255FSWF.js";
|
|
38
38
|
|
|
39
39
|
// src/config/model-equivalence.ts
|
|
40
40
|
var VARIANT_QUIRKS = /* @__PURE__ */ new Set(["small", "image"]);
|
|
@@ -1068,4 +1068,4 @@ export {
|
|
|
1068
1068
|
getGlobalRegistry,
|
|
1069
1069
|
resetGlobalRegistry
|
|
1070
1070
|
};
|
|
1071
|
-
//# sourceMappingURL=chunk-
|
|
1071
|
+
//# sourceMappingURL=chunk-3CAYUVSE.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
stringifyValue,
|
|
3
3
|
tokenize,
|
|
4
4
|
tokenizeFiltered
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SX5DB6UR.js";
|
|
6
6
|
import {
|
|
7
7
|
SessionMemory
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6XGZZCLV.js";
|
|
9
9
|
import {
|
|
10
10
|
StatsOnlyAdapter,
|
|
11
11
|
ensureSharedMemoryRegistry
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-MUJCGBZW.js";
|
|
16
16
|
import {
|
|
17
17
|
generateId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L7BHYU7J.js";
|
|
19
19
|
import {
|
|
20
20
|
ErrorCode,
|
|
21
21
|
NexusError,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
ok,
|
|
30
30
|
openSqliteDatabase,
|
|
31
31
|
setSharedMobiMemDbPathResolver
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5255FSWF.js";
|
|
33
33
|
import {
|
|
34
34
|
nexusDataPath
|
|
35
35
|
} from "./chunk-LWOX65CP.js";
|
|
@@ -5768,4 +5768,4 @@ export {
|
|
|
5768
5768
|
shutdownToolMemory,
|
|
5769
5769
|
ToolMemoryManager
|
|
5770
5770
|
};
|
|
5771
|
-
//# sourceMappingURL=chunk-
|
|
5771
|
+
//# sourceMappingURL=chunk-4BC6HM2G.js.map
|
|
@@ -2729,7 +2729,7 @@ function setDefaultRegistry(registry) {
|
|
|
2729
2729
|
}
|
|
2730
2730
|
async function reloadDefaultRegistry() {
|
|
2731
2731
|
globalRegistry = buildDefaultRegistry();
|
|
2732
|
-
const { resetGlobalRegistry } = await import("./unified-registry-
|
|
2732
|
+
const { resetGlobalRegistry } = await import("./unified-registry-4C3T4SNP.js");
|
|
2733
2733
|
resetGlobalRegistry();
|
|
2734
2734
|
return globalRegistry;
|
|
2735
2735
|
}
|
|
@@ -17358,7 +17358,7 @@ var CompositeRouter = class _CompositeRouter {
|
|
|
17358
17358
|
*/
|
|
17359
17359
|
async consultUnifiedContext(task) {
|
|
17360
17360
|
try {
|
|
17361
|
-
const { getContextForTask, inferTaskCategory } = await import("./context-retriever-
|
|
17361
|
+
const { getContextForTask, inferTaskCategory } = await import("./context-retriever-BVZ7TGH5.js");
|
|
17362
17362
|
const ctx = await getContextForTask({
|
|
17363
17363
|
task: task.content,
|
|
17364
17364
|
category: inferTaskCategory(task.content),
|
|
@@ -19043,4 +19043,4 @@ export {
|
|
|
19043
19043
|
AgentCapability,
|
|
19044
19044
|
OrchestratorError
|
|
19045
19045
|
};
|
|
19046
|
-
//# sourceMappingURL=chunk-
|
|
19046
|
+
//# sourceMappingURL=chunk-5255FSWF.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
createOpenAICompatAdapter,
|
|
5
5
|
discoverGatewayCatalog,
|
|
6
6
|
readOpenAICompatEnv
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6JCLZ5YS.js";
|
|
8
8
|
import {
|
|
9
9
|
gatewayProxyUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XWAYOEIZ.js";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_OPENAI_COMPAT_ENDPOINT,
|
|
13
13
|
GATEWAY_COST_ENV,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
getTimeProvider,
|
|
24
24
|
symbols,
|
|
25
25
|
writeLine
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5255FSWF.js";
|
|
27
27
|
|
|
28
28
|
// src/cli/doctor-gateway.ts
|
|
29
29
|
var PROBE_FAMILIES = ["anthropic", "openai", "google"];
|
|
@@ -333,4 +333,4 @@ export {
|
|
|
333
333
|
formatGatewayReport,
|
|
334
334
|
formatGatewaySlotWarnings
|
|
335
335
|
};
|
|
336
|
-
//# sourceMappingURL=chunk-
|
|
336
|
+
//# sourceMappingURL=chunk-5O3KZ4SQ.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
err,
|
|
6
6
|
getErrorMessage,
|
|
7
7
|
ok
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5255FSWF.js";
|
|
9
9
|
import {
|
|
10
10
|
findRepoRoot,
|
|
11
11
|
getActiveWorkspaceRoot,
|
|
@@ -290,4 +290,4 @@ export {
|
|
|
290
290
|
loadPapersRegistry,
|
|
291
291
|
savePapersRegistry
|
|
292
292
|
};
|
|
293
|
-
//# sourceMappingURL=chunk-
|
|
293
|
+
//# sourceMappingURL=chunk-6IDKVAZ6.js.map
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
readGatewayTransport,
|
|
8
8
|
requireApiKey,
|
|
9
9
|
validateApiKeyPresence
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XWAYOEIZ.js";
|
|
11
11
|
import {
|
|
12
12
|
assertCustomApiHostResolvesPublic,
|
|
13
13
|
hostnameOf,
|
|
14
14
|
redactApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WQFODDSA.js";
|
|
16
16
|
import {
|
|
17
17
|
sanitizeErrorDetails
|
|
18
18
|
} from "./chunk-2NDA4DHW.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
readModelAllowlist,
|
|
41
41
|
recordUsageEvent,
|
|
42
42
|
refineGatewayCatalog
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-5255FSWF.js";
|
|
44
44
|
|
|
45
45
|
// src/adapters/openai-compat-adapter.ts
|
|
46
46
|
import OpenAI2 from "openai";
|
|
@@ -1038,4 +1038,4 @@ export {
|
|
|
1038
1038
|
createOpenAICompatAdapter,
|
|
1039
1039
|
buildOpenAICompatAdapters
|
|
1040
1040
|
};
|
|
1041
|
-
//# sourceMappingURL=chunk-
|
|
1041
|
+
//# sourceMappingURL=chunk-6JCLZ5YS.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getErrorMessage,
|
|
5
5
|
getTimeProvider,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5255FSWF.js";
|
|
8
8
|
|
|
9
9
|
// src/context/session-memory.ts
|
|
10
10
|
import * as fs from "node:fs";
|
|
@@ -370,4 +370,4 @@ export {
|
|
|
370
370
|
SessionMemory,
|
|
371
371
|
createSessionMemory
|
|
372
372
|
};
|
|
373
|
-
//# sourceMappingURL=chunk-
|
|
373
|
+
//# sourceMappingURL=chunk-6XGZZCLV.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
assessReputation,
|
|
6
6
|
sanitizeInput
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UWKJVCAW.js";
|
|
8
8
|
import {
|
|
9
9
|
allOf
|
|
10
10
|
} from "./chunk-EZNIYU5T.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
err,
|
|
14
14
|
getTimeProvider,
|
|
15
15
|
ok
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5255FSWF.js";
|
|
17
17
|
|
|
18
18
|
// src/dogfooding/pr-reviewer-helpers.ts
|
|
19
19
|
import { randomUUID } from "node:crypto";
|
|
@@ -477,4 +477,4 @@ export {
|
|
|
477
477
|
createFailedReview,
|
|
478
478
|
reviewPostingBlock
|
|
479
479
|
};
|
|
480
|
-
//# sourceMappingURL=chunk-
|
|
480
|
+
//# sourceMappingURL=chunk-A3BBWT6J.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
err,
|
|
5
5
|
getErrorMessage,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5255FSWF.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-BAIQLM5D.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createLogger,
|
|
6
6
|
getTimeProvider
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5255FSWF.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-DN2N7I6D.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveClassGuardMs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5255FSWF.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/cli-readiness.ts
|
|
6
6
|
var READINESS_LEVELS = ["installed", "authenticated", "serves"];
|
|
@@ -90,4 +90,4 @@ export {
|
|
|
90
90
|
SERVES_PROBE_PROMPT,
|
|
91
91
|
probeServes
|
|
92
92
|
};
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-DNJSJZHV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CUSTOM_API_DEFAULT_MODEL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S7A6OFUF.js";
|
|
4
4
|
import {
|
|
5
5
|
AdapterModelError,
|
|
6
6
|
BaseAdapter,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
readGatewayTransport,
|
|
11
11
|
requireApiKey,
|
|
12
12
|
validateApiKeyPresence
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XWAYOEIZ.js";
|
|
14
14
|
import {
|
|
15
15
|
assertCustomApiHostResolvesPublic,
|
|
16
16
|
hostnameOf,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
readGatewayEnv,
|
|
20
20
|
redactApiKey,
|
|
21
21
|
validateCustomApiBaseUrl
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WQFODDSA.js";
|
|
23
23
|
import {
|
|
24
24
|
sanitizeOutput
|
|
25
25
|
} from "./chunk-2NDA4DHW.js";
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
} from "./chunk-OITVVSWO.js";
|
|
29
29
|
import {
|
|
30
30
|
getAvailabilityCache
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FCB2OKVG.js";
|
|
32
32
|
import {
|
|
33
33
|
extractSystemPrompt
|
|
34
34
|
} from "./chunk-QZUG667L.js";
|
|
35
35
|
import {
|
|
36
36
|
generateHyphenId
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-L7BHYU7J.js";
|
|
38
38
|
import {
|
|
39
39
|
CliCircuitBreaker,
|
|
40
40
|
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
getDefaultCliCircuitBreakerRegistry,
|
|
46
46
|
isCallerInputCliError,
|
|
47
47
|
isTimeoutText
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-MKNJZXPH.js";
|
|
49
49
|
import {
|
|
50
50
|
CLI_NAMES,
|
|
51
51
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
resolveRetryAfterMs,
|
|
102
102
|
toModelTokenUsage,
|
|
103
103
|
warnIfGatewayCostUndeclared
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-5255FSWF.js";
|
|
105
105
|
import {
|
|
106
106
|
parseBoolValue
|
|
107
107
|
} from "./chunk-LWOX65CP.js";
|
|
@@ -262,7 +262,10 @@ var CliToModelAdapter = class {
|
|
|
262
262
|
async complete(request) {
|
|
263
263
|
const task = this.toCliTask(request);
|
|
264
264
|
const effectiveTimeoutMs = request.timeoutMs ?? this.defaultTimeoutMs;
|
|
265
|
-
const opts = effectiveTimeoutMs !== void 0
|
|
265
|
+
const opts = effectiveTimeoutMs !== void 0 || request.signal !== void 0 ? {
|
|
266
|
+
...effectiveTimeoutMs !== void 0 ? { timeoutMs: effectiveTimeoutMs } : {},
|
|
267
|
+
...request.signal !== void 0 ? { signal: request.signal } : {}
|
|
268
|
+
} : void 0;
|
|
266
269
|
const result = await this.cliAdapter.execute(task, opts);
|
|
267
270
|
if (!result.ok) {
|
|
268
271
|
return err(this.toModelError(result.error));
|
|
@@ -2179,6 +2182,7 @@ function buildChildEnv(cliName) {
|
|
|
2179
2182
|
if (value !== void 0 && key !== "CLAUDECODE") childEnv[key] = value;
|
|
2180
2183
|
}
|
|
2181
2184
|
childEnv[NEXUS_SUBPROCESS_DEPTH_ENV] = nextDepth;
|
|
2185
|
+
stampNoRelaunch(cliName, childEnv);
|
|
2182
2186
|
return childEnv;
|
|
2183
2187
|
}
|
|
2184
2188
|
const vendorKeys = CLI_VENDOR_KEYS[cliName];
|
|
@@ -2189,8 +2193,123 @@ function buildChildEnv(cliName) {
|
|
|
2189
2193
|
if (isAllowed(key, vendorKeys, extraEnv)) childEnv[key] = value;
|
|
2190
2194
|
}
|
|
2191
2195
|
childEnv[NEXUS_SUBPROCESS_DEPTH_ENV] = nextDepth;
|
|
2196
|
+
stampNoRelaunch(cliName, childEnv);
|
|
2192
2197
|
return childEnv;
|
|
2193
2198
|
}
|
|
2199
|
+
function stampNoRelaunch(cliName, childEnv) {
|
|
2200
|
+
if (cliName === "gemini") childEnv["GEMINI_CLI_NO_RELAUNCH"] = "true";
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
// src/cli-adapters/process-tree-kill.ts
|
|
2204
|
+
import { execFileSync } from "node:child_process";
|
|
2205
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
2206
|
+
var MAX_DESCENDANTS = 1e3;
|
|
2207
|
+
function isSpawnedProcess(child) {
|
|
2208
|
+
return typeof child.pid === "number" && typeof child.spawnfile === "string" && Array.isArray(child.spawnargs);
|
|
2209
|
+
}
|
|
2210
|
+
function procChildren(pid) {
|
|
2211
|
+
try {
|
|
2212
|
+
const tasks = readdirSync(`/proc/${String(pid)}/task`);
|
|
2213
|
+
const kids = [];
|
|
2214
|
+
for (const tid of tasks) {
|
|
2215
|
+
const raw = readFileSync(`/proc/${String(pid)}/task/${tid}/children`, "utf8");
|
|
2216
|
+
for (const token of raw.split(/\s+/)) {
|
|
2217
|
+
const kid = Number(token);
|
|
2218
|
+
if (token !== "" && Number.isInteger(kid)) kids.push(kid);
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
return kids;
|
|
2222
|
+
} catch {
|
|
2223
|
+
return void 0;
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
function psChildMap() {
|
|
2227
|
+
if (process.platform === "win32") return void 0;
|
|
2228
|
+
try {
|
|
2229
|
+
const out = execFileSync("ps", ["-A", "-o", "pid=,ppid="], {
|
|
2230
|
+
encoding: "utf8",
|
|
2231
|
+
timeout: 2e3
|
|
2232
|
+
});
|
|
2233
|
+
const map = /* @__PURE__ */ new Map();
|
|
2234
|
+
for (const line of out.split("\n")) {
|
|
2235
|
+
const [pidText, ppidText] = line.trim().split(/\s+/);
|
|
2236
|
+
const pid = Number(pidText);
|
|
2237
|
+
const ppid = Number(ppidText);
|
|
2238
|
+
if (!Number.isInteger(pid) || !Number.isInteger(ppid)) continue;
|
|
2239
|
+
map.set(ppid, [...map.get(ppid) ?? [], pid]);
|
|
2240
|
+
}
|
|
2241
|
+
return map;
|
|
2242
|
+
} catch {
|
|
2243
|
+
return void 0;
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
function collectDescendants(root) {
|
|
2247
|
+
const useProc = process.platform === "linux" && procChildren(root) !== void 0;
|
|
2248
|
+
const psMap = useProc ? void 0 : psChildMap();
|
|
2249
|
+
const childrenOf = (pid) => (useProc ? procChildren(pid) : psMap?.get(pid)) ?? [];
|
|
2250
|
+
const seen = /* @__PURE__ */ new Set([root]);
|
|
2251
|
+
const out = [];
|
|
2252
|
+
const queue = [root];
|
|
2253
|
+
while (queue.length > 0 && out.length < MAX_DESCENDANTS) {
|
|
2254
|
+
const pid = queue.shift();
|
|
2255
|
+
for (const kid of childrenOf(pid)) {
|
|
2256
|
+
if (seen.has(kid)) continue;
|
|
2257
|
+
seen.add(kid);
|
|
2258
|
+
out.push(kid);
|
|
2259
|
+
queue.push(kid);
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
return out;
|
|
2263
|
+
}
|
|
2264
|
+
function isPidAlive(pid) {
|
|
2265
|
+
try {
|
|
2266
|
+
process.kill(pid, 0);
|
|
2267
|
+
return true;
|
|
2268
|
+
} catch (error) {
|
|
2269
|
+
return error.code !== "ESRCH";
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
function signalProcessTree(child, signal, known = []) {
|
|
2273
|
+
const pid = child.pid;
|
|
2274
|
+
const fresh = isSpawnedProcess(child) && pid !== void 0 ? collectDescendants(pid) : [];
|
|
2275
|
+
const tree = [.../* @__PURE__ */ new Set([...known, ...fresh])];
|
|
2276
|
+
child.kill(signal);
|
|
2277
|
+
for (const descendant of tree) {
|
|
2278
|
+
try {
|
|
2279
|
+
process.kill(descendant, signal);
|
|
2280
|
+
} catch {
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
return tree;
|
|
2284
|
+
}
|
|
2285
|
+
function isProcessTreeAlive(child, tree = []) {
|
|
2286
|
+
if (child.exitCode === null && child.signalCode === null) return true;
|
|
2287
|
+
return tree.some(isPidAlive);
|
|
2288
|
+
}
|
|
2289
|
+
var liveTrees = /* @__PURE__ */ new Map();
|
|
2290
|
+
var exitHookInstalled = false;
|
|
2291
|
+
function trackProcessTree(child) {
|
|
2292
|
+
if (!isSpawnedProcess(child)) return child;
|
|
2293
|
+
liveTrees.set(child, []);
|
|
2294
|
+
child.once("close", () => {
|
|
2295
|
+
liveTrees.delete(child);
|
|
2296
|
+
});
|
|
2297
|
+
if (!exitHookInstalled) {
|
|
2298
|
+
exitHookInstalled = true;
|
|
2299
|
+
process.on("exit", () => {
|
|
2300
|
+
signalTrackedProcessTrees("SIGKILL");
|
|
2301
|
+
});
|
|
2302
|
+
}
|
|
2303
|
+
return child;
|
|
2304
|
+
}
|
|
2305
|
+
function signalTrackedProcessTrees(signal) {
|
|
2306
|
+
let count = 0;
|
|
2307
|
+
for (const [child, known] of liveTrees) {
|
|
2308
|
+
liveTrees.set(child, signalProcessTree(child, signal, known));
|
|
2309
|
+
count++;
|
|
2310
|
+
}
|
|
2311
|
+
return count;
|
|
2312
|
+
}
|
|
2194
2313
|
|
|
2195
2314
|
// src/cli-adapters/subprocess-adapter.ts
|
|
2196
2315
|
var PLAINTEXT_FALLBACK_MIN_LENGTH = 30;
|
|
@@ -2265,7 +2384,18 @@ var SIGKILL_GRACE_MS = 5e3;
|
|
|
2265
2384
|
function isTransientError(code) {
|
|
2266
2385
|
return TRANSIENT_ERROR_CODES.has(code);
|
|
2267
2386
|
}
|
|
2268
|
-
function
|
|
2387
|
+
function spawnCliChild(cliName, cmdConfig, workDir) {
|
|
2388
|
+
const childEnv = buildChildEnv(cliName);
|
|
2389
|
+
return trackProcessTree(
|
|
2390
|
+
spawn(cmdConfig.command, cmdConfig.args, {
|
|
2391
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
2392
|
+
env: childEnv,
|
|
2393
|
+
...typeof workDir === "string" && workDir.trim().length > 0 ? { cwd: workDir } : {}
|
|
2394
|
+
})
|
|
2395
|
+
);
|
|
2396
|
+
}
|
|
2397
|
+
function shouldRetryInPlace(error, signal) {
|
|
2398
|
+
if (signal?.aborted === true) return false;
|
|
2269
2399
|
return isTransientError(error.code) && !isDurableCapacityText(error.message);
|
|
2270
2400
|
}
|
|
2271
2401
|
var TRANSIENT_EXIT_CODES = /* @__PURE__ */ new Set([137, 143]);
|
|
@@ -2335,7 +2465,22 @@ var SubprocessCliAdapter = class extends BaseCliAdapter {
|
|
|
2335
2465
|
attachAbortSignal(child, signal, resolve) {
|
|
2336
2466
|
const onAbort = () => {
|
|
2337
2467
|
if (child.exitCode === null && child.signalCode === null) {
|
|
2338
|
-
child
|
|
2468
|
+
const tree = signalProcessTree(child, "SIGTERM");
|
|
2469
|
+
const sigkillTimer = setTimeout(() => {
|
|
2470
|
+
if (isProcessTreeAlive(child, tree)) {
|
|
2471
|
+
this.logger.warn("Child ignored SIGTERM after abort, escalating to SIGKILL", {
|
|
2472
|
+
cli: this.name,
|
|
2473
|
+
sigkillGraceMs: SIGKILL_GRACE_MS
|
|
2474
|
+
});
|
|
2475
|
+
signalProcessTree(child, "SIGKILL", tree);
|
|
2476
|
+
}
|
|
2477
|
+
}, SIGKILL_GRACE_MS);
|
|
2478
|
+
sigkillTimer.unref();
|
|
2479
|
+
if (tree.length === 0) {
|
|
2480
|
+
child.once("close", () => {
|
|
2481
|
+
clearTimeout(sigkillTimer);
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2339
2484
|
}
|
|
2340
2485
|
resolve(err(this.createError("TIMEOUT", "Aborted by caller signal")));
|
|
2341
2486
|
};
|
|
@@ -2354,7 +2499,7 @@ var SubprocessCliAdapter = class extends BaseCliAdapter {
|
|
|
2354
2499
|
const requestId = generateHyphenId("cli-req", 8);
|
|
2355
2500
|
const result = await this.spawnSubprocess(task, options, requestId);
|
|
2356
2501
|
if (result.ok || !this.transientRetry.enabled) return result;
|
|
2357
|
-
if (!shouldRetryInPlace(result.error)) return result;
|
|
2502
|
+
if (!shouldRetryInPlace(result.error, options.signal)) return result;
|
|
2358
2503
|
return this.retryTransient(task, options, result, 0, requestId);
|
|
2359
2504
|
}
|
|
2360
2505
|
/**
|
|
@@ -2377,7 +2522,7 @@ var SubprocessCliAdapter = class extends BaseCliAdapter {
|
|
|
2377
2522
|
const retryOptions = isTimeout ? { ...options, timeoutMs: Math.round(options.timeoutMs * TIMEOUT_RETRY_MULTIPLIER) } : options;
|
|
2378
2523
|
const result = await this.spawnSubprocess(task, retryOptions, requestId);
|
|
2379
2524
|
if (result.ok) return result;
|
|
2380
|
-
if (!shouldRetryInPlace(result.error)) return result;
|
|
2525
|
+
if (!shouldRetryInPlace(result.error, options.signal)) return result;
|
|
2381
2526
|
return this.retryTransient(task, retryOptions, result, attempt + 1, requestId);
|
|
2382
2527
|
}
|
|
2383
2528
|
/**
|
|
@@ -2423,14 +2568,14 @@ var SubprocessCliAdapter = class extends BaseCliAdapter {
|
|
|
2423
2568
|
};
|
|
2424
2569
|
}
|
|
2425
2570
|
spawnSubprocess(task, options, requestId) {
|
|
2426
|
-
const cmdConfig = this.getCommand(
|
|
2427
|
-
task.timeoutMs === void 0 ? { ...task, timeoutMs: options.timeoutMs } : task
|
|
2428
|
-
);
|
|
2429
|
-
const startTime = getTimeProvider().now();
|
|
2430
2571
|
const signal = options.signal;
|
|
2431
2572
|
if (signal?.aborted === true) {
|
|
2432
2573
|
return Promise.resolve(err(this.createError("TIMEOUT", "Aborted before spawn")));
|
|
2433
2574
|
}
|
|
2575
|
+
const cmdConfig = this.getCommand(
|
|
2576
|
+
task.timeoutMs === void 0 ? { ...task, timeoutMs: options.timeoutMs } : task
|
|
2577
|
+
);
|
|
2578
|
+
const startTime = getTimeProvider().now();
|
|
2434
2579
|
return new Promise((resolveOuter) => {
|
|
2435
2580
|
const runCleanupOnce = this.onceCleanup(cmdConfig.cleanup);
|
|
2436
2581
|
const resolve = (r) => {
|
|
@@ -2438,13 +2583,7 @@ var SubprocessCliAdapter = class extends BaseCliAdapter {
|
|
|
2438
2583
|
resolveOuter(r);
|
|
2439
2584
|
};
|
|
2440
2585
|
try {
|
|
2441
|
-
const
|
|
2442
|
-
const workDir = task.options?.["workDir"];
|
|
2443
|
-
const child = spawn(cmdConfig.command, cmdConfig.args, {
|
|
2444
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
2445
|
-
env: childEnv,
|
|
2446
|
-
...typeof workDir === "string" && workDir.trim().length > 0 ? { cwd: workDir } : {}
|
|
2447
|
-
});
|
|
2586
|
+
const child = spawnCliChild(this.name, cmdConfig, task.options?.["workDir"]);
|
|
2448
2587
|
const onProgress = options.onProgress;
|
|
2449
2588
|
this.setupChildProcessHandlers({
|
|
2450
2589
|
child,
|
|
@@ -2500,7 +2639,9 @@ var SubprocessCliAdapter = class extends BaseCliAdapter {
|
|
|
2500
2639
|
});
|
|
2501
2640
|
child.on("close", (code) => {
|
|
2502
2641
|
clearTimeout(timers.timeoutId);
|
|
2503
|
-
if (timers.sigkillTimerId !== void 0
|
|
2642
|
+
if (timers.sigkillTimerId !== void 0 && timers.tree.length === 0) {
|
|
2643
|
+
clearTimeout(timers.sigkillTimerId);
|
|
2644
|
+
}
|
|
2504
2645
|
this.logTimingBreakdown(state, startTime, code, requestId);
|
|
2505
2646
|
resolveOnce(this.classifyCloseResult(code, state, startTime));
|
|
2506
2647
|
});
|
|
@@ -2522,17 +2663,18 @@ var SubprocessCliAdapter = class extends BaseCliAdapter {
|
|
|
2522
2663
|
scheduleTimeoutWithSigkillEscalation(opts) {
|
|
2523
2664
|
const { child, timeoutMs, requestId, resolveOnce } = opts;
|
|
2524
2665
|
const timers = {
|
|
2666
|
+
tree: [],
|
|
2525
2667
|
timeoutId: setTimeout(() => {
|
|
2526
|
-
|
|
2668
|
+
timers.tree = signalProcessTree(child, "SIGTERM");
|
|
2527
2669
|
resolveOnce(err(this.createError("TIMEOUT", "Execution timed out")));
|
|
2528
2670
|
timers.sigkillTimerId = setTimeout(() => {
|
|
2529
|
-
if (child
|
|
2671
|
+
if (isProcessTreeAlive(child, timers.tree)) {
|
|
2530
2672
|
this.logger.warn("Child ignored SIGTERM, escalating to SIGKILL", {
|
|
2531
2673
|
cli: this.name,
|
|
2532
2674
|
requestId,
|
|
2533
2675
|
sigkillGraceMs: SIGKILL_GRACE_MS
|
|
2534
2676
|
});
|
|
2535
|
-
child
|
|
2677
|
+
signalProcessTree(child, "SIGKILL", timers.tree);
|
|
2536
2678
|
}
|
|
2537
2679
|
}, SIGKILL_GRACE_MS);
|
|
2538
2680
|
timers.sigkillTimerId.unref();
|
|
@@ -4612,7 +4754,7 @@ ${task.content}` : task.content;
|
|
|
4612
4754
|
// src/cli/cli-auth-probe.ts
|
|
4613
4755
|
import { execFile as execFile2 } from "node:child_process";
|
|
4614
4756
|
import { promisify as promisify2 } from "node:util";
|
|
4615
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
4757
|
+
import { existsSync, readFileSync as readFileSync2 } from "node:fs";
|
|
4616
4758
|
import { homedir } from "node:os";
|
|
4617
4759
|
import { join as join2 } from "node:path";
|
|
4618
4760
|
var execFileAsync = promisify2(execFile2);
|
|
@@ -4638,7 +4780,7 @@ function probeClaude() {
|
|
|
4638
4780
|
);
|
|
4639
4781
|
}
|
|
4640
4782
|
try {
|
|
4641
|
-
const parsed = JSON.parse(
|
|
4783
|
+
const parsed = JSON.parse(readFileSync2(credPath, "utf-8"));
|
|
4642
4784
|
if (!isClaudeCredsShape(parsed)) {
|
|
4643
4785
|
return claudeNeedsLogin(
|
|
4644
4786
|
"Credentials file present but not in expected shape (missing claudeAiOauth.accessToken)"
|
|
@@ -4765,7 +4907,7 @@ async function probeAllClis() {
|
|
|
4765
4907
|
}
|
|
4766
4908
|
|
|
4767
4909
|
// src/cli-adapters/codex-mcp-server-probe.ts
|
|
4768
|
-
import { execFileSync } from "node:child_process";
|
|
4910
|
+
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
4769
4911
|
var CODEX_MCP_SERVER_UNAVAILABLE_REASON = "codex-cli \u22650.154 has no mcp-server subcommand";
|
|
4770
4912
|
var CodexMcpServerUnavailableError = class extends Error {
|
|
4771
4913
|
constructor() {
|
|
@@ -4779,7 +4921,7 @@ var PROBE_ARGS = ["mcp-server", "--help"];
|
|
|
4779
4921
|
var SUBCOMMAND_PATTERN = /\bmcp-server\b/;
|
|
4780
4922
|
var defaultExec = (command, args) => {
|
|
4781
4923
|
try {
|
|
4782
|
-
const stdout =
|
|
4924
|
+
const stdout = execFileSync2(command, [...args], {
|
|
4783
4925
|
encoding: "utf8",
|
|
4784
4926
|
stdio: ["ignore", "pipe", "pipe"],
|
|
4785
4927
|
timeout: CLI_SUBPROCESS_TIMEOUTS.statusProbeMs
|
|
@@ -4959,6 +5101,7 @@ export {
|
|
|
4959
5101
|
BaseCliAdapter,
|
|
4960
5102
|
NEXUS_SUBPROCESS_DEPTH_ENV,
|
|
4961
5103
|
readSubprocessDepth,
|
|
5104
|
+
signalTrackedProcessTrees,
|
|
4962
5105
|
SubprocessCliAdapter,
|
|
4963
5106
|
asRecord,
|
|
4964
5107
|
isRecord,
|
|
@@ -4993,4 +5136,4 @@ export {
|
|
|
4993
5136
|
SdkAdapter,
|
|
4994
5137
|
createAutoAdapter
|
|
4995
5138
|
};
|
|
4996
|
-
//# sourceMappingURL=chunk-
|
|
5139
|
+
//# sourceMappingURL=chunk-DRB64KKE.js.map
|