@zltquant/zlt-mcp 0.7.5 → 0.7.6
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/config.json +2 -2
- package/package.json +1 -1
- package/zlt-mcp-proxy.bundle.cjs +10 -1
package/config.json
CHANGED
|
@@ -1153,9 +1153,9 @@
|
|
|
1153
1153
|
"pageSize": {
|
|
1154
1154
|
"type": "integer",
|
|
1155
1155
|
"minimum": 1,
|
|
1156
|
-
"maximum":
|
|
1156
|
+
"maximum": 50,
|
|
1157
1157
|
"default": 20,
|
|
1158
|
-
"description": "每页数量,传 20;最大
|
|
1158
|
+
"description": "每页数量,传 20;最大 50,超出按 50 处理。必须显式传入,不要依赖 default 自动补值。"
|
|
1159
1159
|
},
|
|
1160
1160
|
"runType": {
|
|
1161
1161
|
"type": "integer",
|
package/package.json
CHANGED
package/zlt-mcp-proxy.bundle.cjs
CHANGED
|
@@ -10687,6 +10687,7 @@ var CliEvidence = class {
|
|
|
10687
10687
|
teeWrite;
|
|
10688
10688
|
constructor(directory, provenance, command) {
|
|
10689
10689
|
const root2 = path.resolve(directory);
|
|
10690
|
+
fs.mkdirSync(path.dirname(root2), { recursive: true });
|
|
10690
10691
|
fs.mkdirSync(root2);
|
|
10691
10692
|
this.resultFile = path.join(root2, "result.json");
|
|
10692
10693
|
this.readableFile = path.join(root2, "result.readable.txt");
|
|
@@ -24671,6 +24672,7 @@ function shapeFieldProjection(tool, args, result) {
|
|
|
24671
24672
|
const fullPage = pageSize > 0 && envelope.Data.length === pageSize;
|
|
24672
24673
|
const disclosure = {
|
|
24673
24674
|
pageNum,
|
|
24675
|
+
pageSize,
|
|
24674
24676
|
returned: envelope.Data.length,
|
|
24675
24677
|
possiblyMore: fullPage,
|
|
24676
24678
|
nextPageNum: fullPage ? pageNum + 1 : null,
|
|
@@ -27429,7 +27431,7 @@ function prepareToolArgs(tool, args, contexts) {
|
|
|
27429
27431
|
const oversizedWindow = refuseOversizedBacktestPreloadWindow(tool, dated);
|
|
27430
27432
|
if (oversizedWindow) return oversizedWindow;
|
|
27431
27433
|
const named = normalizeBacktestRunName(tool, dated);
|
|
27432
|
-
const prepared = stripEmptyLegacyUserId(tool, named);
|
|
27434
|
+
const prepared = clampBacktestListPageSize(tool, stripEmptyLegacyUserId(tool, named));
|
|
27433
27435
|
const refused = refuseMaskedFuturesBacktest(tool, prepared);
|
|
27434
27436
|
if (refused) return refused;
|
|
27435
27437
|
capturePendingBacktestAttempt(tool, prepared, contexts);
|
|
@@ -27763,6 +27765,13 @@ function subtractMonthsClamped(value, months) {
|
|
|
27763
27765
|
target.setDate(Math.min(day, lastDay));
|
|
27764
27766
|
return target;
|
|
27765
27767
|
}
|
|
27768
|
+
var MAX_BACKTEST_LIST_PAGE_SIZE = 50;
|
|
27769
|
+
function clampBacktestListPageSize(tool, args) {
|
|
27770
|
+
if (tool.name !== "mcp-get-backtest-list") return args;
|
|
27771
|
+
const pageSize = args.pageSize;
|
|
27772
|
+
if (typeof pageSize !== "number" || !Number.isFinite(pageSize) || pageSize <= MAX_BACKTEST_LIST_PAGE_SIZE) return args;
|
|
27773
|
+
return { ...args, pageSize: MAX_BACKTEST_LIST_PAGE_SIZE };
|
|
27774
|
+
}
|
|
27766
27775
|
function stripEmptyLegacyUserId(tool, args) {
|
|
27767
27776
|
if (!toolHasUserIdField(tool)) return args;
|
|
27768
27777
|
if (!Object.prototype.hasOwnProperty.call(args, "userId")) return args;
|