nexus-agents 2.166.3 → 2.167.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/{child-mcp-config-AUA4TFBG.js → child-mcp-config-X4YLQKGK.js} +2 -2
- package/dist/{chunk-P54BDACX.js → chunk-2NU774CB.js} +2 -2
- package/dist/{chunk-ORRKK563.js → chunk-7K5LSUEU.js} +3 -3
- package/dist/{chunk-GS3UPAUE.js → chunk-7USEQLMS.js} +2 -2
- package/dist/{chunk-K2IX6BEK.js → chunk-7YD3TRDX.js} +4 -4
- package/dist/{chunk-IF46G2LM.js → chunk-BB7KSLNA.js} +2 -2
- package/dist/{chunk-NEQJSYJH.js → chunk-COIZLMGV.js} +3 -3
- package/dist/{chunk-Z66EEQ4A.js → chunk-CURHM4TH.js} +3 -3
- package/dist/{chunk-FZV4YAYT.js → chunk-DFCC7FN4.js} +3 -3
- package/dist/{chunk-BZFF3YWU.js → chunk-GGYQTV2Y.js} +4 -4
- package/dist/{chunk-HNAFWKJG.js → chunk-GRWHPG72.js} +7 -7
- package/dist/{chunk-AWPSFL5C.js → chunk-GVNY4ZB6.js} +2 -2
- package/dist/{chunk-YKTVN2TF.js → chunk-IFSIKGHI.js} +2 -2
- package/dist/{chunk-LRBEUBZ3.js → chunk-JKUX73VD.js} +3 -3
- package/dist/{chunk-I7OZP6FS.js → chunk-KM3YEIEN.js} +4 -4
- package/dist/{chunk-THI3VWHO.js → chunk-O6VL6LA4.js} +2 -2
- package/dist/{chunk-6LXTT6AK.js → chunk-PC4Y4VPX.js} +2 -2
- package/dist/{chunk-PXTZ6RPP.js → chunk-QLZDOEO4.js} +7 -7
- package/dist/{chunk-DMFMJFRY.js → chunk-QPSYBHK6.js} +2 -2
- package/dist/{chunk-BFDVV3Q3.js → chunk-QV52AXTF.js} +2 -2
- package/dist/chunk-QZUG667L.js +56 -0
- package/dist/chunk-QZUG667L.js.map +1 -0
- package/dist/{chunk-JYVPM37A.js → chunk-RKIPSMCN.js} +5 -5
- package/dist/{chunk-ZI4PO2A3.js → chunk-S6HCREYY.js} +12 -62
- package/dist/chunk-S6HCREYY.js.map +1 -0
- package/dist/{chunk-F2YZ3U6O.js → chunk-SRNAXDOT.js} +2 -2
- package/dist/{chunk-V5RPW2ZX.js → chunk-STMW5BSR.js} +3 -3
- package/dist/{chunk-FQNG6ZIW.js → chunk-TGAVZ2ZL.js} +8 -8
- package/dist/{chunk-UWRDWX6L.js → chunk-UNIDAVVR.js} +2 -2
- package/dist/{chunk-UO6C5J5D.js → chunk-USBKBGT3.js} +5 -5
- package/dist/{chunk-OI6H3DL6.js → chunk-VGEVDF44.js} +4 -4
- package/dist/{chunk-76Q6GTPU.js → chunk-VNVGGM73.js} +2 -2
- package/dist/{chunk-FKHQWC2L.js → chunk-XUMLVCFL.js} +2 -2
- package/dist/{chunk-WL4SGKAW.js → chunk-ZAPCPHGZ.js} +2 -2
- package/dist/{chunk-PRSGZQNB.js → chunk-ZIC6ZZFU.js} +3 -3
- package/dist/{chunk-WOY6TQCH.js → chunk-ZSUN7BHE.js} +439 -12
- package/dist/chunk-ZSUN7BHE.js.map +1 -0
- package/dist/{chunk-3LVB5OE2.js → chunk-ZTTUXPBQ.js} +2 -2
- package/dist/{chunk-JBH4CU46.js → chunk-ZTWKSN5K.js} +34 -34
- package/dist/{cli-circuit-breaker-FSUDU7BV.js → cli-circuit-breaker-2AAHSCHR.js} +4 -4
- package/dist/cli.js +42 -41
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-HC4YLG5W.js → composite-router-WOVGICBS.js} +2 -2
- package/dist/{consensus-vote-KWPS6WNH.js → consensus-vote-322S65GQ.js} +16 -15
- package/dist/{context-retriever-YCKTCDGM.js → context-retriever-YMJY6YBJ.js} +9 -8
- package/dist/{doctor-deep-4UARVVSD.js → doctor-deep-DALT3OXC.js} +3 -3
- package/dist/{expert-bridge-EAR6XZJA.js → expert-bridge-WNV3ST2T.js} +4 -4
- package/dist/factory-33HQYVCK.js +23 -0
- package/dist/{factory-7SVW7XMV.js → factory-TLSTFONW.js} +5 -5
- package/dist/{improvement-review-AHSY5ZXD.js → improvement-review-2W6LKP74.js} +5 -5
- package/dist/index.js +38 -312
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-5BKE7UEB.js → init-opencode-I4FY4OGP.js} +6 -6
- package/dist/{issue-triage-TNV4R33I.js → issue-triage-CVMVZ3IV.js} +6 -6
- package/dist/{pr-reviewer-helpers-ZC2I5ZYD.js → pr-reviewer-helpers-SAMOVLNJ.js} +4 -4
- package/dist/{registry-command-O2GLHG3G.js → registry-command-5D2DJT53.js} +2 -2
- package/dist/{repo-security-plan-CFRLHIMY.js → repo-security-plan-F7V5SHAQ.js} +3 -3
- package/dist/{research-helpers-synthesize-ONWBGXHO.js → research-helpers-synthesize-F4PV4B4B.js} +4 -4
- package/dist/{routing-memory-XHZKEPUH.js → routing-memory-G6YBK4WI.js} +2 -2
- package/dist/{session-memory-5QVKDE4U.js → session-memory-DAJHLPOY.js} +3 -3
- package/dist/{setup-command-G7OB4QQG.js → setup-command-S4AOTSY5.js} +12 -11
- package/dist/{setup-config-MMBOL5CW.js → setup-config-HKUWFV5N.js} +3 -3
- package/dist/{setup-custom-api-RQ3BUMJC.js → setup-custom-api-XRUPWEPF.js} +3 -3
- package/dist/{tool-memory-VK4IZLPN.js → tool-memory-XJ5VRMNQ.js} +5 -5
- package/dist/{unified-registry-ZOTGM4EY.js → unified-registry-ETKPTZBU.js} +10 -9
- package/dist/{weather-report-MPD66LKP.js → weather-report-TWBLIHPZ.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-WOY6TQCH.js.map +0 -1
- package/dist/chunk-ZI4PO2A3.js.map +0 -1
- package/dist/factory-JYAUOFEN.js +0 -22
- /package/dist/{child-mcp-config-AUA4TFBG.js.map → child-mcp-config-X4YLQKGK.js.map} +0 -0
- /package/dist/{chunk-P54BDACX.js.map → chunk-2NU774CB.js.map} +0 -0
- /package/dist/{chunk-ORRKK563.js.map → chunk-7K5LSUEU.js.map} +0 -0
- /package/dist/{chunk-GS3UPAUE.js.map → chunk-7USEQLMS.js.map} +0 -0
- /package/dist/{chunk-K2IX6BEK.js.map → chunk-7YD3TRDX.js.map} +0 -0
- /package/dist/{chunk-IF46G2LM.js.map → chunk-BB7KSLNA.js.map} +0 -0
- /package/dist/{chunk-NEQJSYJH.js.map → chunk-COIZLMGV.js.map} +0 -0
- /package/dist/{chunk-Z66EEQ4A.js.map → chunk-CURHM4TH.js.map} +0 -0
- /package/dist/{chunk-FZV4YAYT.js.map → chunk-DFCC7FN4.js.map} +0 -0
- /package/dist/{chunk-BZFF3YWU.js.map → chunk-GGYQTV2Y.js.map} +0 -0
- /package/dist/{chunk-HNAFWKJG.js.map → chunk-GRWHPG72.js.map} +0 -0
- /package/dist/{chunk-AWPSFL5C.js.map → chunk-GVNY4ZB6.js.map} +0 -0
- /package/dist/{chunk-YKTVN2TF.js.map → chunk-IFSIKGHI.js.map} +0 -0
- /package/dist/{chunk-LRBEUBZ3.js.map → chunk-JKUX73VD.js.map} +0 -0
- /package/dist/{chunk-I7OZP6FS.js.map → chunk-KM3YEIEN.js.map} +0 -0
- /package/dist/{chunk-THI3VWHO.js.map → chunk-O6VL6LA4.js.map} +0 -0
- /package/dist/{chunk-6LXTT6AK.js.map → chunk-PC4Y4VPX.js.map} +0 -0
- /package/dist/{chunk-PXTZ6RPP.js.map → chunk-QLZDOEO4.js.map} +0 -0
- /package/dist/{chunk-DMFMJFRY.js.map → chunk-QPSYBHK6.js.map} +0 -0
- /package/dist/{chunk-BFDVV3Q3.js.map → chunk-QV52AXTF.js.map} +0 -0
- /package/dist/{chunk-JYVPM37A.js.map → chunk-RKIPSMCN.js.map} +0 -0
- /package/dist/{chunk-F2YZ3U6O.js.map → chunk-SRNAXDOT.js.map} +0 -0
- /package/dist/{chunk-V5RPW2ZX.js.map → chunk-STMW5BSR.js.map} +0 -0
- /package/dist/{chunk-FQNG6ZIW.js.map → chunk-TGAVZ2ZL.js.map} +0 -0
- /package/dist/{chunk-UWRDWX6L.js.map → chunk-UNIDAVVR.js.map} +0 -0
- /package/dist/{chunk-UO6C5J5D.js.map → chunk-USBKBGT3.js.map} +0 -0
- /package/dist/{chunk-OI6H3DL6.js.map → chunk-VGEVDF44.js.map} +0 -0
- /package/dist/{chunk-76Q6GTPU.js.map → chunk-VNVGGM73.js.map} +0 -0
- /package/dist/{chunk-FKHQWC2L.js.map → chunk-XUMLVCFL.js.map} +0 -0
- /package/dist/{chunk-WL4SGKAW.js.map → chunk-ZAPCPHGZ.js.map} +0 -0
- /package/dist/{chunk-PRSGZQNB.js.map → chunk-ZIC6ZZFU.js.map} +0 -0
- /package/dist/{chunk-3LVB5OE2.js.map → chunk-ZTTUXPBQ.js.map} +0 -0
- /package/dist/{chunk-JBH4CU46.js.map → chunk-ZTWKSN5K.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-FSUDU7BV.js.map → cli-circuit-breaker-2AAHSCHR.js.map} +0 -0
- /package/dist/{composite-router-HC4YLG5W.js.map → composite-router-WOVGICBS.js.map} +0 -0
- /package/dist/{consensus-vote-KWPS6WNH.js.map → consensus-vote-322S65GQ.js.map} +0 -0
- /package/dist/{context-retriever-YCKTCDGM.js.map → context-retriever-YMJY6YBJ.js.map} +0 -0
- /package/dist/{doctor-deep-4UARVVSD.js.map → doctor-deep-DALT3OXC.js.map} +0 -0
- /package/dist/{expert-bridge-EAR6XZJA.js.map → expert-bridge-WNV3ST2T.js.map} +0 -0
- /package/dist/{factory-7SVW7XMV.js.map → factory-33HQYVCK.js.map} +0 -0
- /package/dist/{factory-JYAUOFEN.js.map → factory-TLSTFONW.js.map} +0 -0
- /package/dist/{improvement-review-AHSY5ZXD.js.map → improvement-review-2W6LKP74.js.map} +0 -0
- /package/dist/{init-opencode-5BKE7UEB.js.map → init-opencode-I4FY4OGP.js.map} +0 -0
- /package/dist/{issue-triage-TNV4R33I.js.map → issue-triage-CVMVZ3IV.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-ZC2I5ZYD.js.map → pr-reviewer-helpers-SAMOVLNJ.js.map} +0 -0
- /package/dist/{registry-command-O2GLHG3G.js.map → registry-command-5D2DJT53.js.map} +0 -0
- /package/dist/{repo-security-plan-CFRLHIMY.js.map → repo-security-plan-F7V5SHAQ.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-ONWBGXHO.js.map → research-helpers-synthesize-F4PV4B4B.js.map} +0 -0
- /package/dist/{routing-memory-XHZKEPUH.js.map → routing-memory-G6YBK4WI.js.map} +0 -0
- /package/dist/{session-memory-5QVKDE4U.js.map → session-memory-DAJHLPOY.js.map} +0 -0
- /package/dist/{setup-command-G7OB4QQG.js.map → setup-command-S4AOTSY5.js.map} +0 -0
- /package/dist/{setup-config-MMBOL5CW.js.map → setup-config-HKUWFV5N.js.map} +0 -0
- /package/dist/{setup-custom-api-RQ3BUMJC.js.map → setup-custom-api-XRUPWEPF.js.map} +0 -0
- /package/dist/{tool-memory-VK4IZLPN.js.map → tool-memory-XJ5VRMNQ.js.map} +0 -0
- /package/dist/{unified-registry-ZOTGM4EY.js.map → unified-registry-ETKPTZBU.js.map} +0 -0
- /package/dist/{weather-report-MPD66LKP.js.map → weather-report-TWBLIHPZ.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
CompositeRoutingError,
|
|
5
5
|
DEFAULT_COMPOSITE_CONFIG,
|
|
6
6
|
createCompositeRouter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CURHM4TH.js";
|
|
8
8
|
import "./chunk-AXTD4TFK.js";
|
|
9
9
|
import "./chunk-DHVMSIT5.js";
|
|
10
10
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
DEFAULT_COMPOSITE_CONFIG,
|
|
16
16
|
createCompositeRouter
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=composite-router-
|
|
18
|
+
//# sourceMappingURL=composite-router-WOVGICBS.js.map
|
|
@@ -8,23 +8,24 @@ import {
|
|
|
8
8
|
registerConsensusVoteTool,
|
|
9
9
|
resetCorrelationTracker,
|
|
10
10
|
runConsensusForGoal
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-TGAVZ2ZL.js";
|
|
12
|
+
import "./chunk-ZAPCPHGZ.js";
|
|
13
|
+
import "./chunk-STMW5BSR.js";
|
|
14
|
+
import "./chunk-QV52AXTF.js";
|
|
15
|
+
import "./chunk-KM3YEIEN.js";
|
|
16
16
|
import "./chunk-6T3EPABN.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-QPSYBHK6.js";
|
|
18
18
|
import "./chunk-PINS44XA.js";
|
|
19
19
|
import "./chunk-KSQSWEFH.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-GGYQTV2Y.js";
|
|
21
|
+
import "./chunk-S6HCREYY.js";
|
|
22
|
+
import "./chunk-IFSIKGHI.js";
|
|
23
|
+
import "./chunk-2NU774CB.js";
|
|
24
|
+
import "./chunk-GVNY4ZB6.js";
|
|
25
|
+
import "./chunk-ZTTUXPBQ.js";
|
|
26
|
+
import "./chunk-QZUG667L.js";
|
|
27
|
+
import "./chunk-7USEQLMS.js";
|
|
28
|
+
import "./chunk-CURHM4TH.js";
|
|
28
29
|
import "./chunk-AXTD4TFK.js";
|
|
29
30
|
import "./chunk-DHVMSIT5.js";
|
|
30
31
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -39,4 +40,4 @@ export {
|
|
|
39
40
|
resetCorrelationTracker,
|
|
40
41
|
runConsensusForGoal
|
|
41
42
|
};
|
|
42
|
-
//# sourceMappingURL=consensus-vote-
|
|
43
|
+
//# sourceMappingURL=consensus-vote-322S65GQ.js.map
|
|
@@ -6,17 +6,18 @@ import {
|
|
|
6
6
|
inferTaskCategory,
|
|
7
7
|
selectRelevantResearch,
|
|
8
8
|
summarizeContextForPrompt
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-ZSUN7BHE.js";
|
|
10
|
+
import "./chunk-UNIDAVVR.js";
|
|
11
|
+
import "./chunk-PC4Y4VPX.js";
|
|
12
12
|
import "./chunk-NUBSJGQZ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-KM3YEIEN.js";
|
|
14
14
|
import "./chunk-6T3EPABN.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-QPSYBHK6.js";
|
|
16
16
|
import "./chunk-PINS44XA.js";
|
|
17
17
|
import "./chunk-KSQSWEFH.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-QZUG667L.js";
|
|
19
|
+
import "./chunk-7USEQLMS.js";
|
|
20
|
+
import "./chunk-CURHM4TH.js";
|
|
20
21
|
import "./chunk-AXTD4TFK.js";
|
|
21
22
|
import "./chunk-DHVMSIT5.js";
|
|
22
23
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -29,4 +30,4 @@ export {
|
|
|
29
30
|
selectRelevantResearch,
|
|
30
31
|
summarizeContextForPrompt
|
|
31
32
|
};
|
|
32
|
-
//# sourceMappingURL=context-retriever-
|
|
33
|
+
//# sourceMappingURL=context-retriever-YMJY6YBJ.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatDeepDiagnostics,
|
|
3
3
|
runDeepDiagnostics
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-O6VL6LA4.js";
|
|
5
|
+
import "./chunk-CURHM4TH.js";
|
|
6
6
|
import "./chunk-AXTD4TFK.js";
|
|
7
7
|
import "./chunk-DHVMSIT5.js";
|
|
8
8
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -10,4 +10,4 @@ export {
|
|
|
10
10
|
formatDeepDiagnostics,
|
|
11
11
|
runDeepDiagnostics
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=doctor-deep-
|
|
13
|
+
//# sourceMappingURL=doctor-deep-DALT3OXC.js.map
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
shutdownExpertBridge,
|
|
4
4
|
tokenSplitFromUsage,
|
|
5
5
|
totalTokensFromUsage
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-GRWHPG72.js";
|
|
7
|
+
import "./chunk-ZTTUXPBQ.js";
|
|
8
|
+
import "./chunk-CURHM4TH.js";
|
|
9
9
|
import "./chunk-AXTD4TFK.js";
|
|
10
10
|
import "./chunk-DHVMSIT5.js";
|
|
11
11
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
tokenSplitFromUsage,
|
|
16
16
|
totalTokensFromUsage
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=expert-bridge-
|
|
18
|
+
//# sourceMappingURL=expert-bridge-WNV3ST2T.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAllAdapters,
|
|
3
|
+
createCliAdapter,
|
|
4
|
+
getAvailableClis,
|
|
5
|
+
isCliAvailable
|
|
6
|
+
} from "./chunk-S6HCREYY.js";
|
|
7
|
+
import "./chunk-IFSIKGHI.js";
|
|
8
|
+
import "./chunk-2NU774CB.js";
|
|
9
|
+
import "./chunk-GVNY4ZB6.js";
|
|
10
|
+
import "./chunk-ZTTUXPBQ.js";
|
|
11
|
+
import "./chunk-QZUG667L.js";
|
|
12
|
+
import "./chunk-7USEQLMS.js";
|
|
13
|
+
import "./chunk-CURHM4TH.js";
|
|
14
|
+
import "./chunk-AXTD4TFK.js";
|
|
15
|
+
import "./chunk-DHVMSIT5.js";
|
|
16
|
+
import "./chunk-ZPWHCABL.js";
|
|
17
|
+
export {
|
|
18
|
+
createAllAdapters,
|
|
19
|
+
createCliAdapter,
|
|
20
|
+
getAvailableClis,
|
|
21
|
+
isCliAvailable
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=factory-33HQYVCK.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-7YD3TRDX.js";
|
|
5
|
+
import "./chunk-BB7KSLNA.js";
|
|
6
|
+
import "./chunk-UNIDAVVR.js";
|
|
7
|
+
import "./chunk-CURHM4TH.js";
|
|
8
8
|
import "./chunk-AXTD4TFK.js";
|
|
9
9
|
import "./chunk-DHVMSIT5.js";
|
|
10
10
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
createGitHubProvider,
|
|
13
13
|
createScmProvider
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=factory-
|
|
15
|
+
//# sourceMappingURL=factory-TLSTFONW.js.map
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
loadSelfEvalSignals,
|
|
12
12
|
registerImprovementReviewTool,
|
|
13
13
|
runImprovementReview
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-ZIC6ZZFU.js";
|
|
15
|
+
import "./chunk-STMW5BSR.js";
|
|
16
|
+
import "./chunk-QV52AXTF.js";
|
|
17
|
+
import "./chunk-CURHM4TH.js";
|
|
18
18
|
import "./chunk-AXTD4TFK.js";
|
|
19
19
|
import "./chunk-DHVMSIT5.js";
|
|
20
20
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
registerImprovementReviewTool,
|
|
33
33
|
runImprovementReview
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=improvement-review-
|
|
35
|
+
//# sourceMappingURL=improvement-review-2W6LKP74.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7YD3TRDX.js";
|
|
5
5
|
import {
|
|
6
6
|
ALLOWED_COMMANDS,
|
|
7
7
|
ARTIFACT_TYPES,
|
|
@@ -520,13 +520,13 @@ import {
|
|
|
520
520
|
validateWorkflow,
|
|
521
521
|
validateWorkflowDependencies,
|
|
522
522
|
withLogging
|
|
523
|
-
} from "./chunk-
|
|
523
|
+
} from "./chunk-ZTWKSN5K.js";
|
|
524
524
|
import {
|
|
525
525
|
OPENAI_MODELS,
|
|
526
526
|
OPENAI_MODEL_ALIASES,
|
|
527
527
|
OpenAIAdapter,
|
|
528
528
|
createOpenAIAdapter
|
|
529
|
-
} from "./chunk-
|
|
529
|
+
} from "./chunk-DFCC7FN4.js";
|
|
530
530
|
import {
|
|
531
531
|
FALLBACK_SCANNER_DATA,
|
|
532
532
|
buildPlanFromAnalysis,
|
|
@@ -534,7 +534,7 @@ import {
|
|
|
534
534
|
generateSecurityPlan,
|
|
535
535
|
getRegistryManifest,
|
|
536
536
|
resolveScannerData
|
|
537
|
-
} from "./chunk-
|
|
537
|
+
} from "./chunk-VNVGGM73.js";
|
|
538
538
|
import {
|
|
539
539
|
analyzeGitHubRepo,
|
|
540
540
|
analyzeRepo,
|
|
@@ -560,14 +560,14 @@ import {
|
|
|
560
560
|
getKnownNexusVarNames,
|
|
561
561
|
startStdioServer,
|
|
562
562
|
validateNexusEnv
|
|
563
|
-
} from "./chunk-
|
|
563
|
+
} from "./chunk-QLZDOEO4.js";
|
|
564
564
|
import {
|
|
565
565
|
CliCircuitBreakerIntegration,
|
|
566
566
|
createCliCircuitBreakerIntegration
|
|
567
|
-
} from "./chunk-
|
|
567
|
+
} from "./chunk-COIZLMGV.js";
|
|
568
568
|
import {
|
|
569
569
|
executeExpert
|
|
570
|
-
} from "./chunk-
|
|
570
|
+
} from "./chunk-GRWHPG72.js";
|
|
571
571
|
import {
|
|
572
572
|
AgentFindingSchema,
|
|
573
573
|
ConsensusEngine,
|
|
@@ -616,9 +616,9 @@ import {
|
|
|
616
616
|
generateProposalId,
|
|
617
617
|
parseAgentPairKey,
|
|
618
618
|
registerConsensusVoteTool
|
|
619
|
-
} from "./chunk-
|
|
620
|
-
import "./chunk-
|
|
621
|
-
import "./chunk-
|
|
619
|
+
} from "./chunk-TGAVZ2ZL.js";
|
|
620
|
+
import "./chunk-ZAPCPHGZ.js";
|
|
621
|
+
import "./chunk-7K5LSUEU.js";
|
|
622
622
|
import {
|
|
623
623
|
AgentActionSchema,
|
|
624
624
|
GitHubReviewer,
|
|
@@ -640,11 +640,11 @@ import {
|
|
|
640
640
|
requiresCorroboration,
|
|
641
641
|
validateAgentAction,
|
|
642
642
|
validateCorroboration
|
|
643
|
-
} from "./chunk-
|
|
643
|
+
} from "./chunk-RKIPSMCN.js";
|
|
644
644
|
import {
|
|
645
645
|
GitHubProvider,
|
|
646
646
|
ScmError
|
|
647
|
-
} from "./chunk-
|
|
647
|
+
} from "./chunk-BB7KSLNA.js";
|
|
648
648
|
import {
|
|
649
649
|
GitHubUserRoleSchema,
|
|
650
650
|
InjectionFlagSchema,
|
|
@@ -659,11 +659,11 @@ import {
|
|
|
659
659
|
assessReputation,
|
|
660
660
|
reconcileTrustTier,
|
|
661
661
|
sanitizeInput
|
|
662
|
-
} from "./chunk-
|
|
662
|
+
} from "./chunk-SRNAXDOT.js";
|
|
663
663
|
import {
|
|
664
664
|
ImprovementReviewInputSchema,
|
|
665
665
|
registerImprovementReviewTool
|
|
666
|
-
} from "./chunk-
|
|
666
|
+
} from "./chunk-ZIC6ZZFU.js";
|
|
667
667
|
import {
|
|
668
668
|
AgentPerformanceSchema,
|
|
669
669
|
ConsensusAlgorithmSchema,
|
|
@@ -699,7 +699,7 @@ import {
|
|
|
699
699
|
toolSuccess,
|
|
700
700
|
toolSuccessStructured,
|
|
701
701
|
validateToolInput
|
|
702
|
-
} from "./chunk-
|
|
702
|
+
} from "./chunk-STMW5BSR.js";
|
|
703
703
|
import {
|
|
704
704
|
AuditTrail,
|
|
705
705
|
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
@@ -711,23 +711,27 @@ import {
|
|
|
711
711
|
emitReputationEvent,
|
|
712
712
|
emitSanitizationEvent,
|
|
713
713
|
emitTrustEvent
|
|
714
|
-
} from "./chunk-
|
|
714
|
+
} from "./chunk-QV52AXTF.js";
|
|
715
715
|
import {
|
|
716
716
|
PersistentStrategyDistiller,
|
|
717
|
-
RulesSnapshotSchema
|
|
718
|
-
|
|
717
|
+
RulesSnapshotSchema,
|
|
718
|
+
TokenCountError,
|
|
719
|
+
TokenCounter,
|
|
720
|
+
TokenCounterProvider,
|
|
721
|
+
createTokenCounter
|
|
722
|
+
} from "./chunk-ZSUN7BHE.js";
|
|
719
723
|
import {
|
|
720
724
|
getTokenEnvVars,
|
|
721
725
|
hasToken,
|
|
722
726
|
resolveToken
|
|
723
|
-
} from "./chunk-
|
|
724
|
-
import "./chunk-
|
|
727
|
+
} from "./chunk-UNIDAVVR.js";
|
|
728
|
+
import "./chunk-PC4Y4VPX.js";
|
|
725
729
|
import "./chunk-NUBSJGQZ.js";
|
|
726
730
|
import {
|
|
727
731
|
MemoryError
|
|
728
|
-
} from "./chunk-
|
|
732
|
+
} from "./chunk-KM3YEIEN.js";
|
|
729
733
|
import "./chunk-6T3EPABN.js";
|
|
730
|
-
import "./chunk-
|
|
734
|
+
import "./chunk-QPSYBHK6.js";
|
|
731
735
|
import {
|
|
732
736
|
BUILT_IN_EXPERTS,
|
|
733
737
|
BuiltInExpertTypeSchema,
|
|
@@ -746,7 +750,7 @@ import {
|
|
|
746
750
|
resetGlobalRegistry,
|
|
747
751
|
withModelNotFoundFallback,
|
|
748
752
|
wrapResilientWithFallback
|
|
749
|
-
} from "./chunk-
|
|
753
|
+
} from "./chunk-GGYQTV2Y.js";
|
|
750
754
|
import {
|
|
751
755
|
BaseCliAdapter,
|
|
752
756
|
CLAUDE_MODELS,
|
|
@@ -775,16 +779,13 @@ import {
|
|
|
775
779
|
estimateTaskComplexity,
|
|
776
780
|
executeCliRetryLoop,
|
|
777
781
|
extractRequestSystemPrompt,
|
|
778
|
-
extractSystemPrompt,
|
|
779
|
-
generateCacheKey,
|
|
780
782
|
getAvailableClis,
|
|
781
783
|
getTimeoutForTask,
|
|
782
784
|
getTimeoutForTaskAuto,
|
|
783
785
|
isCliAvailable,
|
|
784
786
|
isRetryableError,
|
|
785
|
-
messagesToAnthropicFormat,
|
|
786
787
|
sleep
|
|
787
|
-
} from "./chunk-
|
|
788
|
+
} from "./chunk-S6HCREYY.js";
|
|
788
789
|
import {
|
|
789
790
|
AdapterModelError,
|
|
790
791
|
BaseAdapter,
|
|
@@ -808,12 +809,12 @@ import {
|
|
|
808
809
|
transformStream,
|
|
809
810
|
validateApiKeyPresence,
|
|
810
811
|
withTimeout
|
|
811
|
-
} from "./chunk-
|
|
812
|
+
} from "./chunk-IFSIKGHI.js";
|
|
812
813
|
import {
|
|
813
814
|
DEFAULTS,
|
|
814
815
|
PROVIDER_ENV_KEYS
|
|
815
|
-
} from "./chunk-
|
|
816
|
-
import "./chunk-
|
|
816
|
+
} from "./chunk-2NU774CB.js";
|
|
817
|
+
import "./chunk-GVNY4ZB6.js";
|
|
817
818
|
import {
|
|
818
819
|
AvailabilityCache,
|
|
819
820
|
filterAvailableModels,
|
|
@@ -822,8 +823,9 @@ import {
|
|
|
822
823
|
getFallbackChain,
|
|
823
824
|
resetAvailabilityCache,
|
|
824
825
|
resolveFallback
|
|
825
|
-
} from "./chunk-
|
|
826
|
-
import "./chunk-
|
|
826
|
+
} from "./chunk-ZTTUXPBQ.js";
|
|
827
|
+
import "./chunk-QZUG667L.js";
|
|
828
|
+
import "./chunk-7USEQLMS.js";
|
|
827
829
|
import {
|
|
828
830
|
AgentCapability,
|
|
829
831
|
AgentError,
|
|
@@ -901,7 +903,7 @@ import {
|
|
|
901
903
|
toError,
|
|
902
904
|
unwrap,
|
|
903
905
|
unwrapOr
|
|
904
|
-
} from "./chunk-
|
|
906
|
+
} from "./chunk-CURHM4TH.js";
|
|
905
907
|
import "./chunk-AXTD4TFK.js";
|
|
906
908
|
import "./chunk-DHVMSIT5.js";
|
|
907
909
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -2142,282 +2144,6 @@ function createGeminiAdapter(config) {
|
|
|
2142
2144
|
return new GeminiAdapter(config);
|
|
2143
2145
|
}
|
|
2144
2146
|
|
|
2145
|
-
// src/context/token-counter.ts
|
|
2146
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
2147
|
-
import { GoogleGenAI as GoogleGenAI2 } from "@google/genai";
|
|
2148
|
-
import { encoding_for_model } from "tiktoken";
|
|
2149
|
-
|
|
2150
|
-
// src/context/token-counter-types.ts
|
|
2151
|
-
var TokenCounterProvider = {
|
|
2152
|
-
ANTHROPIC: "anthropic",
|
|
2153
|
-
GEMINI: "gemini",
|
|
2154
|
-
OPENAI: "openai"
|
|
2155
|
-
};
|
|
2156
|
-
var TokenCountError = class extends NexusError {
|
|
2157
|
-
constructor(message, options) {
|
|
2158
|
-
super(message, { code: ErrorCode.MODEL_ERROR, ...options });
|
|
2159
|
-
this.name = "TokenCountError";
|
|
2160
|
-
}
|
|
2161
|
-
};
|
|
2162
|
-
var CHARS_PER_TOKEN = {
|
|
2163
|
-
anthropic: 3.5,
|
|
2164
|
-
// Claude models
|
|
2165
|
-
gemini: 4,
|
|
2166
|
-
// Gemini models
|
|
2167
|
-
openai: 4,
|
|
2168
|
-
// GPT models
|
|
2169
|
-
default: 4
|
|
2170
|
-
// Generic fallback
|
|
2171
|
-
};
|
|
2172
|
-
var DEFAULT_MAX_CACHE_SIZE = 1e3;
|
|
2173
|
-
var DEFAULT_CACHE_TTL_MS = 5 * 60 * 1e3;
|
|
2174
|
-
var DEFAULT_TIKTOKEN_MODEL = "gpt-4o";
|
|
2175
|
-
var TIKTOKEN_MODEL_MAP = {
|
|
2176
|
-
"gpt-4o": "gpt-4o",
|
|
2177
|
-
"gpt-4o-mini": "gpt-4o",
|
|
2178
|
-
"gpt-4-turbo": "gpt-4-turbo",
|
|
2179
|
-
"gpt-4": "gpt-4",
|
|
2180
|
-
"gpt-3.5-turbo": "gpt-3.5-turbo",
|
|
2181
|
-
o1: "o1",
|
|
2182
|
-
"o1-mini": "o1",
|
|
2183
|
-
"o1-preview": "o1"
|
|
2184
|
-
};
|
|
2185
|
-
|
|
2186
|
-
// src/context/token-counter.ts
|
|
2187
|
-
var TokenCounter = class {
|
|
2188
|
-
anthropicClient;
|
|
2189
|
-
geminiClient;
|
|
2190
|
-
cache;
|
|
2191
|
-
maxCacheSize;
|
|
2192
|
-
cacheTtlMs;
|
|
2193
|
-
tiktokenEncoder;
|
|
2194
|
-
currentTiktokenModel;
|
|
2195
|
-
/**
|
|
2196
|
-
* Creates a new TokenCounter instance.
|
|
2197
|
-
*
|
|
2198
|
-
* @param config - Token counter configuration
|
|
2199
|
-
*/
|
|
2200
|
-
constructor(config = {}) {
|
|
2201
|
-
this.maxCacheSize = config.maxCacheSize ?? DEFAULT_MAX_CACHE_SIZE;
|
|
2202
|
-
this.cacheTtlMs = config.cacheTtlMs ?? DEFAULT_CACHE_TTL_MS;
|
|
2203
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
2204
|
-
if (config.anthropicApiKey !== void 0 && config.anthropicApiKey !== "") {
|
|
2205
|
-
this.anthropicClient = new Anthropic({ apiKey: config.anthropicApiKey });
|
|
2206
|
-
}
|
|
2207
|
-
if (config.googleApiKey !== void 0 && config.googleApiKey !== "") {
|
|
2208
|
-
this.geminiClient = new GoogleGenAI2({ apiKey: config.googleApiKey });
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
/**
|
|
2212
|
-
* Count tokens for Anthropic/Claude models via API.
|
|
2213
|
-
*/
|
|
2214
|
-
async countAnthropic(messages, model) {
|
|
2215
|
-
const cacheKey = generateCacheKey(messages, TokenCounterProvider.ANTHROPIC, model);
|
|
2216
|
-
const cached = this.getCached(cacheKey);
|
|
2217
|
-
if (cached !== void 0) {
|
|
2218
|
-
return ok({ count: cached.count, cached: true, provider: cached.provider, model });
|
|
2219
|
-
}
|
|
2220
|
-
if (this.anthropicClient === void 0) {
|
|
2221
|
-
return err(
|
|
2222
|
-
new TokenCountError("Anthropic API key not configured", {
|
|
2223
|
-
context: { provider: "anthropic", model }
|
|
2224
|
-
})
|
|
2225
|
-
);
|
|
2226
|
-
}
|
|
2227
|
-
try {
|
|
2228
|
-
const anthropicMessages = messagesToAnthropicFormat(messages);
|
|
2229
|
-
const systemPrompt = extractSystemPrompt(messages);
|
|
2230
|
-
const params = {
|
|
2231
|
-
model,
|
|
2232
|
-
messages: anthropicMessages
|
|
2233
|
-
};
|
|
2234
|
-
if (systemPrompt !== void 0) {
|
|
2235
|
-
params.system = systemPrompt;
|
|
2236
|
-
}
|
|
2237
|
-
const response = await this.anthropicClient.messages.countTokens(params);
|
|
2238
|
-
const count = response.input_tokens;
|
|
2239
|
-
this.setCache(cacheKey, {
|
|
2240
|
-
count,
|
|
2241
|
-
provider: TokenCounterProvider.ANTHROPIC,
|
|
2242
|
-
model,
|
|
2243
|
-
timestamp: getTimeProvider().now()
|
|
2244
|
-
});
|
|
2245
|
-
return ok({ count, cached: false, provider: TokenCounterProvider.ANTHROPIC, model });
|
|
2246
|
-
} catch (error) {
|
|
2247
|
-
const cause = error instanceof Error ? error : new Error(String(error));
|
|
2248
|
-
return err(
|
|
2249
|
-
new TokenCountError(`Anthropic token counting failed: ${cause.message}`, {
|
|
2250
|
-
cause,
|
|
2251
|
-
context: { provider: "anthropic", model }
|
|
2252
|
-
})
|
|
2253
|
-
);
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
/**
|
|
2257
|
-
* Count tokens for Gemini models via API.
|
|
2258
|
-
*/
|
|
2259
|
-
async countGemini(content, model) {
|
|
2260
|
-
const cacheKey = generateCacheKey(content, TokenCounterProvider.GEMINI, model);
|
|
2261
|
-
const cached = this.getCached(cacheKey);
|
|
2262
|
-
if (cached !== void 0) {
|
|
2263
|
-
return ok({ count: cached.count, cached: true, provider: cached.provider, model });
|
|
2264
|
-
}
|
|
2265
|
-
if (this.geminiClient === void 0) {
|
|
2266
|
-
return err(
|
|
2267
|
-
new TokenCountError("Google API key not configured", {
|
|
2268
|
-
context: { provider: "gemini", model }
|
|
2269
|
-
})
|
|
2270
|
-
);
|
|
2271
|
-
}
|
|
2272
|
-
try {
|
|
2273
|
-
const response = await this.geminiClient.models.countTokens({
|
|
2274
|
-
model,
|
|
2275
|
-
contents: content
|
|
2276
|
-
});
|
|
2277
|
-
const count = response.totalTokens ?? 0;
|
|
2278
|
-
this.setCache(cacheKey, {
|
|
2279
|
-
count,
|
|
2280
|
-
provider: TokenCounterProvider.GEMINI,
|
|
2281
|
-
model,
|
|
2282
|
-
timestamp: getTimeProvider().now()
|
|
2283
|
-
});
|
|
2284
|
-
return ok({ count, cached: false, provider: TokenCounterProvider.GEMINI, model });
|
|
2285
|
-
} catch (error) {
|
|
2286
|
-
const cause = error instanceof Error ? error : new Error(String(error));
|
|
2287
|
-
return err(
|
|
2288
|
-
new TokenCountError(`Gemini token counting failed: ${cause.message}`, {
|
|
2289
|
-
cause,
|
|
2290
|
-
context: { provider: "gemini", model }
|
|
2291
|
-
})
|
|
2292
|
-
);
|
|
2293
|
-
}
|
|
2294
|
-
}
|
|
2295
|
-
/**
|
|
2296
|
-
* Count tokens for OpenAI models using local tiktoken.
|
|
2297
|
-
*/
|
|
2298
|
-
countOpenAI(text, model = DEFAULT_TIKTOKEN_MODEL) {
|
|
2299
|
-
const cacheKey = generateCacheKey(text, TokenCounterProvider.OPENAI, model);
|
|
2300
|
-
const cached = this.getCached(cacheKey);
|
|
2301
|
-
if (cached !== void 0) {
|
|
2302
|
-
return ok({ count: cached.count, cached: true, provider: cached.provider, model });
|
|
2303
|
-
}
|
|
2304
|
-
try {
|
|
2305
|
-
const encoder = this.getOrCreateTiktokenEncoder(model);
|
|
2306
|
-
const tokens = encoder.encode(text);
|
|
2307
|
-
const count = tokens.length;
|
|
2308
|
-
this.setCache(cacheKey, {
|
|
2309
|
-
count,
|
|
2310
|
-
provider: TokenCounterProvider.OPENAI,
|
|
2311
|
-
model,
|
|
2312
|
-
timestamp: getTimeProvider().now()
|
|
2313
|
-
});
|
|
2314
|
-
return ok({ count, cached: false, provider: TokenCounterProvider.OPENAI, model });
|
|
2315
|
-
} catch (error) {
|
|
2316
|
-
const cause = error instanceof Error ? error : new Error(String(error));
|
|
2317
|
-
return err(
|
|
2318
|
-
new TokenCountError(`OpenAI token counting failed: ${cause.message}`, {
|
|
2319
|
-
cause,
|
|
2320
|
-
context: { provider: "openai", model }
|
|
2321
|
-
})
|
|
2322
|
-
);
|
|
2323
|
-
}
|
|
2324
|
-
}
|
|
2325
|
-
/**
|
|
2326
|
-
* Estimate tokens offline using character-based heuristic.
|
|
2327
|
-
* Uses ~4 characters per token as a general approximation.
|
|
2328
|
-
*/
|
|
2329
|
-
estimate(text) {
|
|
2330
|
-
if (text.length === 0) {
|
|
2331
|
-
return 0;
|
|
2332
|
-
}
|
|
2333
|
-
return Math.ceil(text.length / CHARS_PER_TOKEN.default);
|
|
2334
|
-
}
|
|
2335
|
-
/**
|
|
2336
|
-
* Estimate tokens for a specific provider.
|
|
2337
|
-
*/
|
|
2338
|
-
estimateForProvider(text, provider) {
|
|
2339
|
-
if (text.length === 0) {
|
|
2340
|
-
return 0;
|
|
2341
|
-
}
|
|
2342
|
-
const charsPerToken = CHARS_PER_TOKEN[provider];
|
|
2343
|
-
return Math.ceil(text.length / charsPerToken);
|
|
2344
|
-
}
|
|
2345
|
-
/**
|
|
2346
|
-
* Clear the token count cache.
|
|
2347
|
-
*/
|
|
2348
|
-
clearCache() {
|
|
2349
|
-
this.cache.clear();
|
|
2350
|
-
}
|
|
2351
|
-
/**
|
|
2352
|
-
* Get current cache statistics.
|
|
2353
|
-
*/
|
|
2354
|
-
getCacheStats() {
|
|
2355
|
-
return {
|
|
2356
|
-
size: this.cache.size,
|
|
2357
|
-
maxSize: this.maxCacheSize,
|
|
2358
|
-
ttlMs: this.cacheTtlMs
|
|
2359
|
-
};
|
|
2360
|
-
}
|
|
2361
|
-
/**
|
|
2362
|
-
* Gets or creates a tiktoken encoder for the specified model.
|
|
2363
|
-
*/
|
|
2364
|
-
getOrCreateTiktokenEncoder(model) {
|
|
2365
|
-
const tiktokenModel = TIKTOKEN_MODEL_MAP[model] ?? DEFAULT_TIKTOKEN_MODEL;
|
|
2366
|
-
if (this.tiktokenEncoder !== void 0 && this.currentTiktokenModel === tiktokenModel) {
|
|
2367
|
-
return this.tiktokenEncoder;
|
|
2368
|
-
}
|
|
2369
|
-
if (this.tiktokenEncoder !== void 0) {
|
|
2370
|
-
this.tiktokenEncoder.free();
|
|
2371
|
-
}
|
|
2372
|
-
this.tiktokenEncoder = encoding_for_model(
|
|
2373
|
-
tiktokenModel
|
|
2374
|
-
);
|
|
2375
|
-
this.currentTiktokenModel = tiktokenModel;
|
|
2376
|
-
return this.tiktokenEncoder;
|
|
2377
|
-
}
|
|
2378
|
-
/**
|
|
2379
|
-
* Gets a cached entry if valid.
|
|
2380
|
-
*/
|
|
2381
|
-
getCached(key) {
|
|
2382
|
-
const entry = this.cache.get(key);
|
|
2383
|
-
if (entry === void 0) {
|
|
2384
|
-
return void 0;
|
|
2385
|
-
}
|
|
2386
|
-
if (getTimeProvider().now() - entry.timestamp > this.cacheTtlMs) {
|
|
2387
|
-
this.cache.delete(key);
|
|
2388
|
-
return void 0;
|
|
2389
|
-
}
|
|
2390
|
-
return entry;
|
|
2391
|
-
}
|
|
2392
|
-
/**
|
|
2393
|
-
* Sets a cache entry, evicting oldest if at capacity.
|
|
2394
|
-
*/
|
|
2395
|
-
setCache(key, entry) {
|
|
2396
|
-
if (this.cache.size >= this.maxCacheSize) {
|
|
2397
|
-
const firstKey = this.cache.keys().next();
|
|
2398
|
-
if (firstKey.done !== true) {
|
|
2399
|
-
this.cache.delete(firstKey.value);
|
|
2400
|
-
}
|
|
2401
|
-
}
|
|
2402
|
-
this.cache.set(key, entry);
|
|
2403
|
-
}
|
|
2404
|
-
/**
|
|
2405
|
-
* Frees resources (tiktoken encoder).
|
|
2406
|
-
* Call this when done with the counter.
|
|
2407
|
-
*/
|
|
2408
|
-
dispose() {
|
|
2409
|
-
if (this.tiktokenEncoder !== void 0) {
|
|
2410
|
-
this.tiktokenEncoder.free();
|
|
2411
|
-
this.tiktokenEncoder = void 0;
|
|
2412
|
-
this.currentTiktokenModel = void 0;
|
|
2413
|
-
}
|
|
2414
|
-
this.cache.clear();
|
|
2415
|
-
}
|
|
2416
|
-
};
|
|
2417
|
-
function createTokenCounter(config = {}) {
|
|
2418
|
-
return new TokenCounter(config);
|
|
2419
|
-
}
|
|
2420
|
-
|
|
2421
2147
|
// src/context/work-balancer.ts
|
|
2422
2148
|
var logger2 = createLogger({ module: "work-balancer" });
|
|
2423
2149
|
|
|
@@ -5236,9 +4962,9 @@ function compareBenchmarks(baseline, current) {
|
|
|
5236
4962
|
|
|
5237
4963
|
// src/benchmarks/token-benchmark.ts
|
|
5238
4964
|
var logger7 = createLogger({ component: "token-benchmark" });
|
|
5239
|
-
var
|
|
4965
|
+
var CHARS_PER_TOKEN = 4;
|
|
5240
4966
|
function estimateTokens2(text) {
|
|
5241
|
-
return Math.ceil(text.length /
|
|
4967
|
+
return Math.ceil(text.length / CHARS_PER_TOKEN);
|
|
5242
4968
|
}
|
|
5243
4969
|
function calculateTokenMetrics(entries, queryCount) {
|
|
5244
4970
|
const totalTokens = estimateTokens2(entries.map((e) => e.content).join("\n"));
|
|
@@ -5987,7 +5713,7 @@ function buildVotingInput(plan, config) {
|
|
|
5987
5713
|
}
|
|
5988
5714
|
async function executeSingleVote(plan, config, log) {
|
|
5989
5715
|
try {
|
|
5990
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
5716
|
+
const { executeVoting } = await import("./consensus-vote-322S65GQ.js");
|
|
5991
5717
|
const input = buildVotingInput(plan, config);
|
|
5992
5718
|
const result = await executeVoting(input, log);
|
|
5993
5719
|
return parseVotingResult(result);
|