nexus-agents 9.2.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ast-rule-runner-DFEUIC2E.js → ast-rule-runner-YFDXXHJU.js} +3 -3
- package/dist/{child-mcp-config-ALJL5I7K.js → child-mcp-config-44M5EAYD.js} +2 -2
- package/dist/{chunk-PSZQ657B.js → chunk-4CTDO2Z2.js} +3 -3
- package/dist/{chunk-A5D7666X.js → chunk-4HUCHMSX.js} +2 -2
- package/dist/{chunk-SU47CN4Q.js → chunk-4IJII2WG.js} +19 -10
- package/dist/chunk-4IJII2WG.js.map +1 -0
- package/dist/{chunk-ZC6QDPMA.js → chunk-5O4NXKPR.js} +4 -4
- package/dist/{chunk-ETW6QNVI.js → chunk-5T33FILA.js} +3 -3
- package/dist/{chunk-AWF35M67.js → chunk-65XXRWUH.js} +4 -4
- package/dist/{chunk-M43A5MDJ.js → chunk-6JLDPMMU.js} +4 -4
- package/dist/{chunk-TJ4VWR32.js → chunk-A34ANV7R.js} +5 -5
- package/dist/{chunk-42TS2JOS.js → chunk-AQ5KQTXW.js} +5 -5
- package/dist/{chunk-DJ7QTY5J.js → chunk-B3LT4L5R.js} +5 -5
- package/dist/{chunk-JZSKEIQF.js → chunk-BH6J6WCC.js} +2 -2
- package/dist/{chunk-DYVYV7NZ.js → chunk-BO46P4XJ.js} +5 -5
- package/dist/{chunk-XBWG4BJU.js → chunk-CUWTKYFP.js} +2 -2
- package/dist/{chunk-WDYK7OAI.js → chunk-EUKJXKXD.js} +3 -3
- package/dist/{chunk-625YPLMG.js → chunk-FDHT3TG7.js} +2 -2
- package/dist/{chunk-VOJCSOVL.js → chunk-FWZVZME3.js} +2 -2
- package/dist/{chunk-ZVSJPKEZ.js → chunk-GYMILOWC.js} +2 -2
- package/dist/{chunk-GNGKWFC3.js → chunk-HM37AAFX.js} +2 -2
- package/dist/{chunk-UNIRQWHT.js → chunk-IZS66Q5F.js} +2 -2
- package/dist/{chunk-3JRQWWBD.js → chunk-KQJ2GAER.js} +2 -2
- package/dist/{chunk-GAJRBRED.js → chunk-L54COYAN.js} +2 -2
- package/dist/{chunk-MXYKMQ53.js → chunk-LHOB5YF3.js} +250 -92
- package/dist/chunk-LHOB5YF3.js.map +1 -0
- package/dist/{chunk-PDT6QYKY.js → chunk-NM7YEKQM.js} +6 -5
- package/dist/{chunk-PDT6QYKY.js.map → chunk-NM7YEKQM.js.map} +1 -1
- package/dist/{chunk-4ROIBRK5.js → chunk-OQNKPJPJ.js} +3 -3
- package/dist/chunk-OQNKPJPJ.js.map +1 -0
- package/dist/{chunk-5IMXQQQX.js → chunk-P2LYE2KA.js} +4 -4
- package/dist/{chunk-GNGIZJAC.js → chunk-Q4L5XROB.js} +3 -3
- package/dist/{chunk-KWQ5IR2A.js → chunk-QCNZMRJ7.js} +2 -2
- package/dist/{chunk-GTWTVDLP.js → chunk-QLUGDQUK.js} +13 -13
- package/dist/{chunk-ZNXWR6V6.js → chunk-R67NA3Q5.js} +7 -7
- package/dist/{chunk-VS3C3L63.js → chunk-RKSJ26NV.js} +14 -13
- package/dist/{chunk-TGOZLRO7.js → chunk-RQ3C6QEH.js} +2 -2
- package/dist/{chunk-XPQ2RDMV.js → chunk-TCKP5S3P.js} +5 -5
- package/dist/{chunk-WDSRUC3H.js → chunk-WJDNQVQF.js} +3 -3
- package/dist/{chunk-KLDUWDNU.js → chunk-Y3OBX752.js} +8 -8
- package/dist/{chunk-KJ46Q24G.js → chunk-ZGSQFG4D.js} +2 -2
- package/dist/{cli-circuit-breaker-OTFWY5A5.js → cli-circuit-breaker-6V7RJMMF.js} +3 -3
- package/dist/{cli-readiness-WFUMPJCU.js → cli-readiness-XNJQCKIH.js} +7 -7
- package/dist/cli.js +44 -44
- package/dist/{composite-router-LE4SNM2X.js → composite-router-43L52IUP.js} +2 -2
- package/dist/{consensus-vote-2BEOCYGU.js → consensus-vote-6HBLVWTW.js} +17 -17
- package/dist/{context-retriever-NKP73OSE.js → context-retriever-WPSI4STY.js} +8 -8
- package/dist/{doctor-deep-FQPLASUY.js → doctor-deep-6D6FG3SZ.js} +3 -3
- package/dist/{doctor-gateway-report-3I7KQVU3.js → doctor-gateway-report-2JOSIARQ.js} +7 -7
- package/dist/{doctor-live-ZAMCNQGM.js → doctor-live-BVXUT36N.js} +11 -11
- package/dist/{expert-bridge-3WL6X37T.js → expert-bridge-E6HHFKGF.js} +4 -4
- package/dist/{factory-IAH3XPHY.js → factory-WCUQHBSG.js} +5 -5
- package/dist/{factory-X7XECZ3D.js → factory-ZPOHG4M7.js} +10 -10
- package/dist/{improvement-review-4VHBKOME.js → improvement-review-33VU5DAX.js} +6 -6
- package/dist/index.d.ts +27 -17
- package/dist/index.js +32 -32
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-YLKVZJJA.js → init-opencode-NQW7NG5Z.js} +6 -6
- package/dist/{issue-triage-UUD53JH3.js → issue-triage-RFV3YR66.js} +6 -6
- package/dist/{model-config-helpers-KRTQLJF4.js → model-config-helpers-KTLFA734.js} +2 -2
- package/dist/{openai-compat-adapter-YTSKOE4F.js → openai-compat-adapter-7CITWSBH.js} +6 -6
- package/dist/{outcome-store-adapter-PSVE6YAJ.js → outcome-store-adapter-WCY3FBQM.js} +2 -2
- package/dist/{pr-reviewer-helpers-VP4P23TI.js → pr-reviewer-helpers-KJFNRS6R.js} +4 -4
- package/dist/{registry-command-S4GXEMQR.js → registry-command-OZLB3KYN.js} +2 -2
- package/dist/{repo-security-plan-66VLAFUR.js → repo-security-plan-MOHGBKLA.js} +3 -3
- package/dist/{research-helpers-synthesize-RFOFNS5W.js → research-helpers-synthesize-CKC67RSM.js} +4 -4
- package/dist/{routing-memory-KKBKCISC.js → routing-memory-FOMKUKKF.js} +2 -2
- package/dist/{session-memory-6FGTXRCN.js → session-memory-KRK2HQUF.js} +3 -3
- package/dist/{setup-config-4NLQBTZH.js → setup-config-A7MFKDN7.js} +3 -3
- package/dist/{setup-custom-api-FLGYMLGG.js → setup-custom-api-YJ4DICAK.js} +3 -3
- package/dist/setup-data-dir-VNGT3GM4.js +36 -0
- package/dist/{tool-memory-5DOAHII2.js → tool-memory-ZUQSBR3O.js} +5 -5
- package/dist/{unified-registry-I2BUGW6I.js → unified-registry-JG3QCJ5O.js} +11 -11
- package/dist/{weather-report-CTT5O7MR.js → weather-report-2MBDI7G2.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-4ROIBRK5.js.map +0 -1
- package/dist/chunk-MXYKMQ53.js.map +0 -1
- package/dist/chunk-SU47CN4Q.js.map +0 -1
- package/dist/setup-data-dir-VBMDTRCF.js +0 -36
- /package/dist/{ast-rule-runner-DFEUIC2E.js.map → ast-rule-runner-YFDXXHJU.js.map} +0 -0
- /package/dist/{child-mcp-config-ALJL5I7K.js.map → child-mcp-config-44M5EAYD.js.map} +0 -0
- /package/dist/{chunk-PSZQ657B.js.map → chunk-4CTDO2Z2.js.map} +0 -0
- /package/dist/{chunk-A5D7666X.js.map → chunk-4HUCHMSX.js.map} +0 -0
- /package/dist/{chunk-ZC6QDPMA.js.map → chunk-5O4NXKPR.js.map} +0 -0
- /package/dist/{chunk-ETW6QNVI.js.map → chunk-5T33FILA.js.map} +0 -0
- /package/dist/{chunk-AWF35M67.js.map → chunk-65XXRWUH.js.map} +0 -0
- /package/dist/{chunk-M43A5MDJ.js.map → chunk-6JLDPMMU.js.map} +0 -0
- /package/dist/{chunk-TJ4VWR32.js.map → chunk-A34ANV7R.js.map} +0 -0
- /package/dist/{chunk-42TS2JOS.js.map → chunk-AQ5KQTXW.js.map} +0 -0
- /package/dist/{chunk-DJ7QTY5J.js.map → chunk-B3LT4L5R.js.map} +0 -0
- /package/dist/{chunk-JZSKEIQF.js.map → chunk-BH6J6WCC.js.map} +0 -0
- /package/dist/{chunk-DYVYV7NZ.js.map → chunk-BO46P4XJ.js.map} +0 -0
- /package/dist/{chunk-XBWG4BJU.js.map → chunk-CUWTKYFP.js.map} +0 -0
- /package/dist/{chunk-WDYK7OAI.js.map → chunk-EUKJXKXD.js.map} +0 -0
- /package/dist/{chunk-625YPLMG.js.map → chunk-FDHT3TG7.js.map} +0 -0
- /package/dist/{chunk-VOJCSOVL.js.map → chunk-FWZVZME3.js.map} +0 -0
- /package/dist/{chunk-ZVSJPKEZ.js.map → chunk-GYMILOWC.js.map} +0 -0
- /package/dist/{chunk-GNGKWFC3.js.map → chunk-HM37AAFX.js.map} +0 -0
- /package/dist/{chunk-UNIRQWHT.js.map → chunk-IZS66Q5F.js.map} +0 -0
- /package/dist/{chunk-3JRQWWBD.js.map → chunk-KQJ2GAER.js.map} +0 -0
- /package/dist/{chunk-GAJRBRED.js.map → chunk-L54COYAN.js.map} +0 -0
- /package/dist/{chunk-5IMXQQQX.js.map → chunk-P2LYE2KA.js.map} +0 -0
- /package/dist/{chunk-GNGIZJAC.js.map → chunk-Q4L5XROB.js.map} +0 -0
- /package/dist/{chunk-KWQ5IR2A.js.map → chunk-QCNZMRJ7.js.map} +0 -0
- /package/dist/{chunk-GTWTVDLP.js.map → chunk-QLUGDQUK.js.map} +0 -0
- /package/dist/{chunk-ZNXWR6V6.js.map → chunk-R67NA3Q5.js.map} +0 -0
- /package/dist/{chunk-VS3C3L63.js.map → chunk-RKSJ26NV.js.map} +0 -0
- /package/dist/{chunk-TGOZLRO7.js.map → chunk-RQ3C6QEH.js.map} +0 -0
- /package/dist/{chunk-XPQ2RDMV.js.map → chunk-TCKP5S3P.js.map} +0 -0
- /package/dist/{chunk-WDSRUC3H.js.map → chunk-WJDNQVQF.js.map} +0 -0
- /package/dist/{chunk-KLDUWDNU.js.map → chunk-Y3OBX752.js.map} +0 -0
- /package/dist/{chunk-KJ46Q24G.js.map → chunk-ZGSQFG4D.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-OTFWY5A5.js.map → cli-circuit-breaker-6V7RJMMF.js.map} +0 -0
- /package/dist/{cli-readiness-WFUMPJCU.js.map → cli-readiness-XNJQCKIH.js.map} +0 -0
- /package/dist/{composite-router-LE4SNM2X.js.map → composite-router-43L52IUP.js.map} +0 -0
- /package/dist/{consensus-vote-2BEOCYGU.js.map → consensus-vote-6HBLVWTW.js.map} +0 -0
- /package/dist/{context-retriever-NKP73OSE.js.map → context-retriever-WPSI4STY.js.map} +0 -0
- /package/dist/{doctor-deep-FQPLASUY.js.map → doctor-deep-6D6FG3SZ.js.map} +0 -0
- /package/dist/{doctor-gateway-report-3I7KQVU3.js.map → doctor-gateway-report-2JOSIARQ.js.map} +0 -0
- /package/dist/{doctor-live-ZAMCNQGM.js.map → doctor-live-BVXUT36N.js.map} +0 -0
- /package/dist/{expert-bridge-3WL6X37T.js.map → expert-bridge-E6HHFKGF.js.map} +0 -0
- /package/dist/{factory-IAH3XPHY.js.map → factory-WCUQHBSG.js.map} +0 -0
- /package/dist/{factory-X7XECZ3D.js.map → factory-ZPOHG4M7.js.map} +0 -0
- /package/dist/{improvement-review-4VHBKOME.js.map → improvement-review-33VU5DAX.js.map} +0 -0
- /package/dist/{init-opencode-YLKVZJJA.js.map → init-opencode-NQW7NG5Z.js.map} +0 -0
- /package/dist/{issue-triage-UUD53JH3.js.map → issue-triage-RFV3YR66.js.map} +0 -0
- /package/dist/{model-config-helpers-KRTQLJF4.js.map → model-config-helpers-KTLFA734.js.map} +0 -0
- /package/dist/{openai-compat-adapter-YTSKOE4F.js.map → openai-compat-adapter-7CITWSBH.js.map} +0 -0
- /package/dist/{outcome-store-adapter-PSVE6YAJ.js.map → outcome-store-adapter-WCY3FBQM.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-VP4P23TI.js.map → pr-reviewer-helpers-KJFNRS6R.js.map} +0 -0
- /package/dist/{registry-command-S4GXEMQR.js.map → registry-command-OZLB3KYN.js.map} +0 -0
- /package/dist/{repo-security-plan-66VLAFUR.js.map → repo-security-plan-MOHGBKLA.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-RFOFNS5W.js.map → research-helpers-synthesize-CKC67RSM.js.map} +0 -0
- /package/dist/{routing-memory-KKBKCISC.js.map → routing-memory-FOMKUKKF.js.map} +0 -0
- /package/dist/{session-memory-6FGTXRCN.js.map → session-memory-KRK2HQUF.js.map} +0 -0
- /package/dist/{setup-config-4NLQBTZH.js.map → setup-config-A7MFKDN7.js.map} +0 -0
- /package/dist/{setup-custom-api-FLGYMLGG.js.map → setup-custom-api-YJ4DICAK.js.map} +0 -0
- /package/dist/{setup-data-dir-VBMDTRCF.js.map → setup-data-dir-VNGT3GM4.js.map} +0 -0
- /package/dist/{tool-memory-5DOAHII2.js.map → tool-memory-ZUQSBR3O.js.map} +0 -0
- /package/dist/{unified-registry-I2BUGW6I.js.map → unified-registry-JG3QCJ5O.js.map} +0 -0
- /package/dist/{weather-report-CTT5O7MR.js.map → weather-report-2MBDI7G2.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
discoverModels,
|
|
3
3
|
readOpencodeGateway
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-B3LT4L5R.js";
|
|
5
|
+
import "./chunk-L54COYAN.js";
|
|
6
|
+
import "./chunk-GYMILOWC.js";
|
|
7
|
+
import "./chunk-4HUCHMSX.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger,
|
|
10
10
|
readModelAllowlist
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4IJII2WG.js";
|
|
12
12
|
import "./chunk-XBEKMUTO.js";
|
|
13
13
|
import "./chunk-UE7A2XHM.js";
|
|
14
14
|
import "./chunk-LWOX65CP.js";
|
|
@@ -184,4 +184,4 @@ export {
|
|
|
184
184
|
runInitOpencode,
|
|
185
185
|
runOpencodeValidate
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=init-opencode-
|
|
187
|
+
//# sourceMappingURL=init-opencode-NQW7NG5Z.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IssueTriage,
|
|
3
3
|
createIssueTriage
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-BO46P4XJ.js";
|
|
5
|
+
import "./chunk-FWZVZME3.js";
|
|
6
|
+
import "./chunk-KQJ2GAER.js";
|
|
7
|
+
import "./chunk-IZS66Q5F.js";
|
|
8
8
|
import "./chunk-ZO6ZKR7L.js";
|
|
9
9
|
import "./chunk-CJKHQ6MV.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-4IJII2WG.js";
|
|
11
11
|
import "./chunk-XBEKMUTO.js";
|
|
12
12
|
import "./chunk-UE7A2XHM.js";
|
|
13
13
|
import "./chunk-LWOX65CP.js";
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
IssueTriage,
|
|
18
18
|
createIssueTriage
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=issue-triage-
|
|
20
|
+
//# sourceMappingURL=issue-triage-RFV3YR66.js.map
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveCliCostPer1M,
|
|
29
29
|
resolveCliModelName,
|
|
30
30
|
resolveModelCostPer1M
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4IJII2WG.js";
|
|
32
32
|
import "./chunk-XBEKMUTO.js";
|
|
33
33
|
import "./chunk-UE7A2XHM.js";
|
|
34
34
|
import "./chunk-LWOX65CP.js";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
resolveCliModelName,
|
|
66
66
|
resolveModelCostPer1M
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=model-config-helpers-
|
|
68
|
+
//# sourceMappingURL=model-config-helpers-KTLFA734.js.map
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
isGatewayModelAdapter,
|
|
7
7
|
readOpenAICompatEndpoint,
|
|
8
8
|
readOpenAICompatEnv
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-B3LT4L5R.js";
|
|
10
|
+
import "./chunk-L54COYAN.js";
|
|
11
|
+
import "./chunk-GYMILOWC.js";
|
|
12
|
+
import "./chunk-4HUCHMSX.js";
|
|
13
|
+
import "./chunk-4IJII2WG.js";
|
|
14
14
|
import "./chunk-XBEKMUTO.js";
|
|
15
15
|
import "./chunk-UE7A2XHM.js";
|
|
16
16
|
import "./chunk-LWOX65CP.js";
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
readOpenAICompatEndpoint,
|
|
26
26
|
readOpenAICompatEnv
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=openai-compat-adapter-
|
|
28
|
+
//# sourceMappingURL=openai-compat-adapter-7CITWSBH.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-ROYGBFVE.js";
|
|
7
7
|
import {
|
|
8
8
|
OutcomeQuerySchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4IJII2WG.js";
|
|
10
10
|
import "./chunk-XBEKMUTO.js";
|
|
11
11
|
import "./chunk-UE7A2XHM.js";
|
|
12
12
|
import "./chunk-LWOX65CP.js";
|
|
@@ -75,4 +75,4 @@ var OutcomeStoreAdapter = class {
|
|
|
75
75
|
export {
|
|
76
76
|
OutcomeStoreAdapter
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=outcome-store-adapter-
|
|
78
|
+
//# sourceMappingURL=outcome-store-adapter-WCY3FBQM.js.map
|
|
@@ -20,12 +20,12 @@ import {
|
|
|
20
20
|
parseSeverity,
|
|
21
21
|
reviewPostingBlock,
|
|
22
22
|
sumFindings
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EUKJXKXD.js";
|
|
24
24
|
import "./chunk-WDAND5YU.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-KQJ2GAER.js";
|
|
26
26
|
import "./chunk-EZNIYU5T.js";
|
|
27
27
|
import "./chunk-CJKHQ6MV.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-4IJII2WG.js";
|
|
29
29
|
import "./chunk-XBEKMUTO.js";
|
|
30
30
|
import "./chunk-UE7A2XHM.js";
|
|
31
31
|
import "./chunk-LWOX65CP.js";
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
reviewPostingBlock,
|
|
55
55
|
sumFindings
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=pr-reviewer-helpers-
|
|
57
|
+
//# sourceMappingURL=pr-reviewer-helpers-KJFNRS6R.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
loadGeneratedRegistryEntries,
|
|
7
7
|
loadUserManifestOverlay,
|
|
8
8
|
reloadDefaultRegistry
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4IJII2WG.js";
|
|
10
10
|
import "./chunk-XBEKMUTO.js";
|
|
11
11
|
import "./chunk-UE7A2XHM.js";
|
|
12
12
|
import {
|
|
@@ -252,4 +252,4 @@ export {
|
|
|
252
252
|
isValidRegistrySubcommand,
|
|
253
253
|
registryCommand
|
|
254
254
|
};
|
|
255
|
-
//# sourceMappingURL=registry-command-
|
|
255
|
+
//# sourceMappingURL=registry-command-OZLB3KYN.js.map
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
buildPlanFromAnalysis,
|
|
4
4
|
generateSecurityPlan,
|
|
5
5
|
resolveScannerData
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BH6J6WCC.js";
|
|
7
7
|
import "./chunk-4GDMHCKX.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-4IJII2WG.js";
|
|
9
9
|
import "./chunk-XBEKMUTO.js";
|
|
10
10
|
import "./chunk-UE7A2XHM.js";
|
|
11
11
|
import "./chunk-LWOX65CP.js";
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
generateSecurityPlan,
|
|
18
18
|
resolveScannerData
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=repo-security-plan-
|
|
20
|
+
//# sourceMappingURL=repo-security-plan-MOHGBKLA.js.map
|
package/dist/{research-helpers-synthesize-RFOFNS5W.js → research-helpers-synthesize-CKC67RSM.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttributedInsightSchema,
|
|
3
3
|
synthesizeResearch
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4CTDO2Z2.js";
|
|
5
|
+
import "./chunk-HM37AAFX.js";
|
|
6
|
+
import "./chunk-4IJII2WG.js";
|
|
7
7
|
import "./chunk-XBEKMUTO.js";
|
|
8
8
|
import "./chunk-UE7A2XHM.js";
|
|
9
9
|
import "./chunk-LWOX65CP.js";
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
AttributedInsightSchema,
|
|
14
14
|
synthesizeResearch
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=research-helpers-synthesize-
|
|
16
|
+
//# sourceMappingURL=research-helpers-synthesize-CKC67RSM.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DEFAULT_ROUTING_MEMORY_CONFIG,
|
|
3
3
|
RoutingMemory,
|
|
4
4
|
createRoutingMemory
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4IJII2WG.js";
|
|
6
6
|
import "./chunk-XBEKMUTO.js";
|
|
7
7
|
import "./chunk-UE7A2XHM.js";
|
|
8
8
|
import "./chunk-LWOX65CP.js";
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
RoutingMemory,
|
|
14
14
|
createRoutingMemory
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=routing-memory-
|
|
16
|
+
//# sourceMappingURL=routing-memory-FOMKUKKF.js.map
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
SessionMemory,
|
|
7
7
|
SessionMemoryError,
|
|
8
8
|
createSessionMemory
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QCNZMRJ7.js";
|
|
10
10
|
import "./chunk-CJKHQ6MV.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-4IJII2WG.js";
|
|
12
12
|
import "./chunk-XBEKMUTO.js";
|
|
13
13
|
import "./chunk-UE7A2XHM.js";
|
|
14
14
|
import "./chunk-LWOX65CP.js";
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
SessionMemoryError,
|
|
24
24
|
createSessionMemory
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=session-memory-
|
|
26
|
+
//# sourceMappingURL=session-memory-KRK2HQUF.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runConfigInitSync
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RQ3C6QEH.js";
|
|
4
|
+
import "./chunk-4IJII2WG.js";
|
|
5
5
|
import "./chunk-XBEKMUTO.js";
|
|
6
6
|
import "./chunk-UE7A2XHM.js";
|
|
7
7
|
import "./chunk-LWOX65CP.js";
|
|
@@ -10,4 +10,4 @@ import "./chunk-PX6F3LHL.js";
|
|
|
10
10
|
export {
|
|
11
11
|
runConfigInitSync
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=setup-config-
|
|
13
|
+
//# sourceMappingURL=setup-config-A7MFKDN7.js.map
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
hostnameOf,
|
|
7
7
|
readGatewayEnv,
|
|
8
8
|
validateCustomApiBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GYMILOWC.js";
|
|
10
10
|
import {
|
|
11
11
|
CUSTOM_API_ALLOW_PRIVATE_ENV,
|
|
12
12
|
OPENAI_COMPAT_KEY_ENV,
|
|
13
13
|
OPENAI_COMPAT_URL_ENV,
|
|
14
14
|
err,
|
|
15
15
|
ok
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4IJII2WG.js";
|
|
17
17
|
import "./chunk-XBEKMUTO.js";
|
|
18
18
|
import "./chunk-UE7A2XHM.js";
|
|
19
19
|
import "./chunk-LWOX65CP.js";
|
|
@@ -113,4 +113,4 @@ function buildShellFragment(params) {
|
|
|
113
113
|
export {
|
|
114
114
|
configureCustomApi
|
|
115
115
|
};
|
|
116
|
-
//# sourceMappingURL=setup-custom-api-
|
|
116
|
+
//# sourceMappingURL=setup-custom-api-YJ4DICAK.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NEXUS_DATA_DIR,
|
|
3
|
+
describeDataDirFix,
|
|
4
|
+
initDataDirectories
|
|
5
|
+
} from "./chunk-QLUGDQUK.js";
|
|
6
|
+
import "./chunk-EZNIYU5T.js";
|
|
7
|
+
import "./chunk-Q4L5XROB.js";
|
|
8
|
+
import "./chunk-AQ5KQTXW.js";
|
|
9
|
+
import "./chunk-B3LT4L5R.js";
|
|
10
|
+
import "./chunk-NM7YEKQM.js";
|
|
11
|
+
import "./chunk-Y3OBX752.js";
|
|
12
|
+
import "./chunk-5T33FILA.js";
|
|
13
|
+
import "./chunk-QZUG667L.js";
|
|
14
|
+
import "./chunk-PRX4ERTK.js";
|
|
15
|
+
import "./chunk-ECJ52NSK.js";
|
|
16
|
+
import "./chunk-JPFRRNRR.js";
|
|
17
|
+
import "./chunk-L54COYAN.js";
|
|
18
|
+
import "./chunk-GYMILOWC.js";
|
|
19
|
+
import "./chunk-TW6PJYTP.js";
|
|
20
|
+
import "./chunk-5O4NXKPR.js";
|
|
21
|
+
import "./chunk-A34ANV7R.js";
|
|
22
|
+
import "./chunk-ZGSQFG4D.js";
|
|
23
|
+
import "./chunk-OQNKPJPJ.js";
|
|
24
|
+
import "./chunk-4HUCHMSX.js";
|
|
25
|
+
import "./chunk-4IJII2WG.js";
|
|
26
|
+
import "./chunk-XBEKMUTO.js";
|
|
27
|
+
import "./chunk-UE7A2XHM.js";
|
|
28
|
+
import "./chunk-LWOX65CP.js";
|
|
29
|
+
import "./chunk-4PN3UVZV.js";
|
|
30
|
+
import "./chunk-PX6F3LHL.js";
|
|
31
|
+
export {
|
|
32
|
+
NEXUS_DATA_DIR,
|
|
33
|
+
describeDataDirFix,
|
|
34
|
+
initDataDirectories
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=setup-data-dir-VNGT3GM4.js.map
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
configureToolMemory,
|
|
4
4
|
getToolMemory,
|
|
5
5
|
shutdownToolMemory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6JLDPMMU.js";
|
|
7
7
|
import "./chunk-ZO6ZKR7L.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-QCNZMRJ7.js";
|
|
9
9
|
import "./chunk-CJKHQ6MV.js";
|
|
10
10
|
import "./chunk-RIYFVDYN.js";
|
|
11
11
|
import "./chunk-RARMDUSM.js";
|
|
12
12
|
import "./chunk-ROYGBFVE.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZGSQFG4D.js";
|
|
14
|
+
import "./chunk-4IJII2WG.js";
|
|
15
15
|
import "./chunk-XBEKMUTO.js";
|
|
16
16
|
import "./chunk-UE7A2XHM.js";
|
|
17
17
|
import "./chunk-LWOX65CP.js";
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
getToolMemory,
|
|
24
24
|
shutdownToolMemory
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=tool-memory-
|
|
26
|
+
//# sourceMappingURL=tool-memory-ZUQSBR3O.js.map
|
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
createUnifiedRegistry,
|
|
6
6
|
getGlobalRegistry,
|
|
7
7
|
resetGlobalRegistry
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-NM7YEKQM.js";
|
|
9
|
+
import "./chunk-Y3OBX752.js";
|
|
10
|
+
import "./chunk-5T33FILA.js";
|
|
11
11
|
import "./chunk-QZUG667L.js";
|
|
12
12
|
import "./chunk-PRX4ERTK.js";
|
|
13
13
|
import "./chunk-ECJ52NSK.js";
|
|
14
14
|
import "./chunk-JPFRRNRR.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-L54COYAN.js";
|
|
16
|
+
import "./chunk-GYMILOWC.js";
|
|
17
17
|
import "./chunk-TW6PJYTP.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-A34ANV7R.js";
|
|
19
|
+
import "./chunk-ZGSQFG4D.js";
|
|
20
|
+
import "./chunk-OQNKPJPJ.js";
|
|
21
|
+
import "./chunk-4HUCHMSX.js";
|
|
22
|
+
import "./chunk-4IJII2WG.js";
|
|
23
23
|
import "./chunk-XBEKMUTO.js";
|
|
24
24
|
import "./chunk-UE7A2XHM.js";
|
|
25
25
|
import "./chunk-LWOX65CP.js";
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
getGlobalRegistry,
|
|
34
34
|
resetGlobalRegistry
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=unified-registry-
|
|
36
|
+
//# sourceMappingURL=unified-registry-JG3QCJ5O.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getAdaptiveBonus,
|
|
4
4
|
queryWithLookback,
|
|
5
5
|
shouldExplore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4IJII2WG.js";
|
|
7
7
|
import "./chunk-XBEKMUTO.js";
|
|
8
8
|
import "./chunk-UE7A2XHM.js";
|
|
9
9
|
import "./chunk-LWOX65CP.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
queryWithLookback,
|
|
16
16
|
shouldExplore
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=weather-report-
|
|
18
|
+
//# sourceMappingURL=weather-report-2MBDI7G2.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexus-agents",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Governance substrate for AI coding agents — adversarial PR review, drift-detected rules, tamper-evident audit, and closed-loop outcome routing for Claude, Codex, Gemini, and OpenCode",
|
|
5
5
|
"mcpName": "io.github.nexus-substrate/nexus-agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli-adapters/cli-circuit-breaker.ts"],"sourcesContent":["/**\n * nexus-agents/cli-adapters - CLI Circuit Breaker Integration\n *\n * Wraps CLI adapter calls with circuit breaker pattern for resilient\n * multi-CLI execution with automatic fallback on failures.\n *\n * (Source: Issue #359 - Integrate circuit breaker with CLI adapters)\n */\n\nimport type { Result, ILogger } from '../core/index.js';\nimport { ok, err, createLogger, getTimeProvider, getErrorMessage } from '../core/index.js';\nimport type { TaskCategory } from '../config/task-specialization-types.js';\nimport type { FallbackTaskType } from './task-classifier.js';\nimport { getFallbackChainForCategory } from './fallback-chains.js';\nimport type {\n ICliAdapter,\n CliName,\n CliTask,\n CliResponse,\n CliError,\n ObservedArmId,\n} from './types.js';\nimport { breakerKeys } from './breaker-key.js';\nimport { gatewayServedSlotOf, resolveGatewayServedSlot } from './gateway-slot-arm.js';\nimport {\n CircuitBreakerRegistry,\n CircuitError,\n CircuitErrorCode,\n mapCliErrorToCategory,\n type CliCircuitBreaker,\n type CircuitBreakerConfig,\n type CircuitBreakerSnapshot,\n type CircuitStateChangeListener,\n} from './circuit-breaker.js';\nimport { isCallerInputCliError } from './cli-error-helpers.js';\nimport { isCallerCancelled } from '../adapters/abort-utils.js';\nimport { unenforcedAccessModeRefusal } from './access-mode.js';\n\n/** Maps canonical TaskCategory (10 types) to FallbackTaskType (5 types). */\nconst CATEGORY_TO_FALLBACK: Record<TaskCategory, FallbackTaskType> = {\n code_generation: 'code',\n code_review: 'code',\n testing: 'code',\n research: 'research',\n exploration: 'research',\n documentation: 'documentation',\n architecture: 'analysis',\n security_review: 'analysis',\n planning: 'analysis',\n devops: 'general',\n};\n\n/** Configuration for CLI circuit breaker integration. */\nexport interface CliCircuitBreakerConfig {\n readonly perCliConfig?: Partial<Record<CliName, Partial<CircuitBreakerConfig>>>;\n readonly fallbackChain?: ReadonlyArray<CliName>;\n readonly enableFallback?: boolean;\n readonly maxFallbackAttempts?: number;\n}\n\n/** Result of a circuit-protected execution with fallback info. */\nexport interface CircuitProtectedResult {\n readonly response: CliResponse;\n readonly executedBy: CliName;\n readonly usedFallback: boolean;\n readonly fallbackAttempts?: ReadonlyArray<CliName>;\n}\n\n/** Health status for all CLIs with circuit state. */\nexport interface CliCircuitHealthStatus {\n readonly clis: ReadonlyArray<{\n readonly name: CliName;\n readonly healthy: boolean;\n readonly circuitState: 'closed' | 'open' | 'half-open';\n readonly failureCount: number;\n readonly lastFailureTime: number | null;\n }>;\n readonly systemHealthy: boolean;\n readonly healthyCount: number;\n readonly timestamp: number;\n}\n\n/** Interface for CLI circuit breaker integration. */\nexport interface ICliCircuitBreakerIntegration {\n execute(\n adapter: ICliAdapter,\n task: CliTask,\n taskCategory?: TaskCategory\n ): Promise<Result<CircuitProtectedResult, CircuitError | CliError>>;\n getHealthStatus(): CliCircuitHealthStatus;\n getCircuitSnapshots(): Map<CliName, CircuitBreakerSnapshot>;\n resetCircuit(cliName: CliName): void;\n resetAllCircuits(): void;\n addStateChangeListener(listener: CircuitStateChangeListener): void;\n}\n\nconst DEFAULT_FALLBACK_CHAIN: ReadonlyArray<CliName> = ['claude', 'gemini', 'codex', 'opencode'];\nconst DEFAULT_CONFIG: Required<CliCircuitBreakerConfig> = {\n perCliConfig: {},\n fallbackChain: DEFAULT_FALLBACK_CHAIN,\n enableFallback: true,\n maxFallbackAttempts: 2,\n};\nconst defaultCliCircuitBreakerRegistry = new CircuitBreakerRegistry();\n\n// #4330: the shared registry now gates voter-panel availability, so a CLI can\n// vanish from a panel roster because its circuit opened. Log every transition —\n// otherwise the next person debugging a \"missing voter\" has no trail, and a\n// misclassified transient error silently costs the panel its diversity.\nconst registryLogger = createLogger({ component: 'cli-circuit-breaker' });\ndefaultCliCircuitBreakerRegistry.addGlobalStateChangeListener((event) => {\n registryLogger.warn('CLI circuit state changed', {\n cli: event.cliName,\n previousState: event.previousState,\n newState: event.newState,\n failureCount: event.failureCount,\n reason: event.reason,\n });\n});\n\n/** Returns the shared CLI circuit-breaker registry used by default integrations. */\nexport function getDefaultCliCircuitBreakerRegistry(): CircuitBreakerRegistry {\n return defaultCliCircuitBreakerRegistry;\n}\n\n/**\n * Reads the current snapshot for a CLI without creating a new breaker.\n *\n * `undefined` means no circuit state is known yet, so callers should fail open.\n */\nexport function getCliCircuitBreakerSnapshot(cliName: CliName): CircuitBreakerSnapshot | undefined {\n return defaultCliCircuitBreakerRegistry.getAllSnapshots().get(cliName);\n}\n\n/**\n * Integrates circuit breaker pattern with CLI adapters.\n * Provides automatic fallback when a CLI's circuit opens.\n */\nexport class CliCircuitBreakerIntegration implements ICliCircuitBreakerIntegration {\n private readonly registry: CircuitBreakerRegistry;\n private readonly adapters: Map<CliName, ICliAdapter> = new Map();\n private readonly config: Required<CliCircuitBreakerConfig>;\n private readonly logger: ILogger;\n\n constructor(\n adapters: ReadonlyArray<ICliAdapter>,\n config?: CliCircuitBreakerConfig,\n logger?: ILogger\n ) {\n this.config = { ...DEFAULT_CONFIG, ...config };\n this.logger = logger ?? createLogger({ component: 'cli-circuit-breaker-integration' });\n this.registry =\n config === undefined ? defaultCliCircuitBreakerRegistry : new CircuitBreakerRegistry();\n for (const adapter of adapters) {\n this.adapters.set(adapter.name, adapter);\n this.breakerFor(adapter);\n }\n }\n\n async execute(\n adapter: ICliAdapter,\n task: CliTask,\n taskCategory?: TaskCategory\n ): Promise<Result<CircuitProtectedResult, CircuitError | CliError>> {\n const primaryCli = adapter.name;\n const fallbackAttempts: CliName[] = [];\n let lastError: CircuitError | CliError | undefined;\n\n const primaryResult = await this.executeWithBreaker(adapter, task);\n if (primaryResult.ok) {\n return ok({ response: primaryResult.value, executedBy: primaryCli, usedFallback: false });\n }\n lastError = primaryResult.error;\n\n if (!this.config.enableFallback || !(lastError instanceof CircuitError)) {\n return err(lastError);\n }\n\n for (const cli of this.getFallbackClis(primaryCli, taskCategory, task).slice(\n 0,\n this.config.maxFallbackAttempts\n )) {\n const fallbackAdapter = this.adapters.get(cli);\n if (!fallbackAdapter) continue;\n fallbackAttempts.push(cli);\n this.logger.info('Attempting fallback', { from: primaryCli, to: cli });\n const result = await this.executeWithBreaker(fallbackAdapter, task);\n if (result.ok) {\n return ok({\n response: result.value,\n executedBy: cli,\n usedFallback: true,\n fallbackAttempts,\n });\n }\n lastError = result.error;\n }\n\n this.logger.warn('All fallback attempts failed', { primaryCli, fallbackAttempts });\n return err(lastError);\n }\n\n getHealthStatus(): CliCircuitHealthStatus {\n const clis: CliCircuitHealthStatus['clis'][number][] = [];\n let healthyCount = 0;\n for (const [name, adapter] of this.adapters) {\n const snapshot = this.breakerFor(adapter).breaker.getSnapshot();\n const healthy = snapshot.state === 'closed';\n if (healthy) healthyCount++;\n clis.push({\n name,\n healthy,\n circuitState: snapshot.state,\n failureCount: snapshot.failureCount,\n lastFailureTime: snapshot.lastFailureTime,\n });\n }\n return {\n clis,\n systemHealthy: healthyCount > 0,\n healthyCount,\n timestamp: getTimeProvider().now(),\n };\n }\n\n getCircuitSnapshots(): Map<CliName, CircuitBreakerSnapshot> {\n const snapshots = new Map<CliName, CircuitBreakerSnapshot>();\n for (const [name, adapter] of this.adapters) {\n snapshots.set(name, this.breakerFor(adapter).breaker.getSnapshot());\n }\n return snapshots;\n }\n\n resetCircuit(cliName: CliName): void {\n const adapter = this.adapters.get(cliName);\n this.registry.resetArm(adapter === undefined ? cliName : this.breakerFor(adapter).key);\n this.logger.info('Circuit reset', { cliName });\n }\n\n resetAllCircuits(): void {\n this.registry.resetAll();\n this.logger.info('All circuits reset');\n }\n\n addStateChangeListener(listener: CircuitStateChangeListener): void {\n this.registry.addGlobalStateChangeListener(listener);\n }\n\n private async executeWithBreaker(\n adapter: ICliAdapter,\n task: CliTask\n ): Promise<Result<CliResponse, CircuitError | CliError>> {\n let { key, breaker } = this.breakerFor(adapter, task);\n let execResult: Result<CliResponse, CliError>;\n let targetResolved = false;\n try {\n await resolveGatewayServedSlot(adapter);\n const refusal = await this.prepareImplicitRoute(adapter, task);\n if (refusal !== undefined) return err(refusal);\n targetResolved = true;\n ({ key, breaker } = this.breakerFor(adapter, task));\n const canRun = breaker.canExecute();\n if (!canRun.ok) return canRun;\n execResult = await adapter.execute(task);\n } catch (error) {\n // A rejected availability probe has not selected a failure domain.\n // Never charge the provisional plain CLI breaker for that probe.\n if (targetResolved) breaker.recordFailure('unknown');\n return err(\n new CircuitError(`CLI execution threw unexpectedly: ${getErrorMessage(error)}`, {\n circuitErrorCode: CircuitErrorCode.EXECUTION_FAILED,\n cliName: adapter.name,\n armId: key,\n circuitState: breaker.getState(),\n cause: error instanceof Error ? error : new Error(String(error)),\n })\n );\n }\n\n return this.recordOutcome(adapter, breaker, execResult);\n }\n\n /** Resolve an implicit OpenCode route before gating, preserving access refusals. */\n private async prepareImplicitRoute(\n adapter: ICliAdapter,\n task: CliTask\n ): Promise<CliError | undefined> {\n if (adapter.name !== 'opencode' || task.model !== undefined) return undefined;\n const refusal = unenforcedAccessModeRefusal(adapter, task);\n if (refusal !== undefined) return refusal;\n // A missing/cooled configured model omits --model and runs the default.\n await adapter.initialize();\n return undefined;\n }\n\n private recordOutcome(\n adapter: ICliAdapter,\n breaker: CliCircuitBreaker,\n execResult: Result<CliResponse, CliError>\n ): Result<CliResponse, CliError> {\n const recordsOutcome = this.ownsBreakerOutcome(adapter);\n if (!execResult.ok) {\n // #6613: caller-input errors (e.g. invalid model requested) must not count\n // against the breaker or exhaust half-open probe capacity. #6691: nor\n // must a call its caller cancelled.\n if (isCallerInputCliError(execResult.error) || isCallerCancelled(execResult.error)) {\n breaker.releaseHalfOpenProbe();\n return err(execResult.error);\n }\n if (recordsOutcome) breaker.recordFailure(mapCliErrorToCategory(execResult.error.code));\n return err(execResult.error);\n }\n\n if (recordsOutcome) breaker.recordSuccess();\n return ok(execResult.value);\n }\n\n private breakerFor(\n adapter: Pick<ICliAdapter, 'name'> & Partial<Pick<ICliAdapter, 'getModelInfo'>>,\n task?: CliTask\n ): {\n key: ObservedArmId;\n breaker: CliCircuitBreaker;\n } {\n const key = breakerKeys.forArm({\n name: adapter.name,\n model: task?.model ?? adapter.getModelInfo?.().id,\n gatewayArm: gatewayServedSlotOf(adapter)?.arm,\n });\n return {\n key,\n breaker: this.registry.getArmBreaker(key, this.config.perCliConfig[adapter.name]),\n };\n }\n\n /** Marked gateway slots record in the shared registry; private registries own their records. */\n private ownsBreakerOutcome(adapter: ICliAdapter): boolean {\n return (\n this.registry !== defaultCliCircuitBreakerRegistry ||\n gatewayServedSlotOf(adapter)?.arm === undefined\n );\n }\n\n private getFallbackClis(\n excludeCli: CliName,\n taskCategory?: TaskCategory,\n task?: CliTask\n ): CliName[] {\n const chain =\n taskCategory !== undefined\n ? getFallbackChainForCategory(taskCategory, CATEGORY_TO_FALLBACK[taskCategory])\n : this.config.fallbackChain;\n return [...chain].filter((cli) => {\n const adapter = this.adapters.get(cli);\n return (\n cli !== excludeCli &&\n adapter !== undefined &&\n !this.registry.isArmOpen(this.breakerFor(adapter, task).key)\n );\n });\n }\n}\n\n/** Creates a CLI circuit breaker integration with the specified adapters. */\nexport function createCliCircuitBreakerIntegration(\n adapters: ReadonlyArray<ICliAdapter>,\n config?: CliCircuitBreakerConfig,\n logger?: ILogger\n): CliCircuitBreakerIntegration {\n return new CliCircuitBreakerIntegration(adapters, config, logger);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCA,IAAM,uBAA+D;AAAA,EACnE,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,SAAS;AAAA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,eAAe;AAAA,EACf,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,QAAQ;AACV;AA8CA,IAAM,yBAAiD,CAAC,UAAU,UAAU,SAAS,UAAU;AAC/F,IAAM,iBAAoD;AAAA,EACxD,cAAc,CAAC;AAAA,EACf,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,qBAAqB;AACvB;AACA,IAAM,mCAAmC,IAAI,uBAAuB;AAMpE,IAAM,iBAAiB,aAAa,EAAE,WAAW,sBAAsB,CAAC;AACxE,iCAAiC,6BAA6B,CAAC,UAAU;AACvE,iBAAe,KAAK,6BAA6B;AAAA,IAC/C,KAAK,MAAM;AAAA,IACX,eAAe,MAAM;AAAA,IACrB,UAAU,MAAM;AAAA,IAChB,cAAc,MAAM;AAAA,IACpB,QAAQ,MAAM;AAAA,EAChB,CAAC;AACH,CAAC;AAGM,SAAS,sCAA8D;AAC5E,SAAO;AACT;AAOO,SAAS,6BAA6B,SAAsD;AACjG,SAAO,iCAAiC,gBAAgB,EAAE,IAAI,OAAO;AACvE;AAMO,IAAM,+BAAN,MAA4E;AAAA,EAChE;AAAA,EACA,WAAsC,oBAAI,IAAI;AAAA,EAC9C;AAAA,EACA;AAAA,EAEjB,YACE,UACA,QACA,QACA;AACA,SAAK,SAAS,EAAE,GAAG,gBAAgB,GAAG,OAAO;AAC7C,SAAK,SAAS,UAAU,aAAa,EAAE,WAAW,kCAAkC,CAAC;AACrF,SAAK,WACH,WAAW,SAA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