@zltquant/zlt-mcp 0.6.1-beta.7 → 0.6.1-beta.8
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 +1 -1
- package/package.json +1 -1
- package/zlt-mcp-proxy.bundle.cjs +22 -10
package/config.json
CHANGED
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
"name": "mcp-get-cache-diff",
|
|
419
|
-
"description": "比对云端与本地缓存,直接回答「还差哪些区间、多少个文件、多大」。只读,不创建任务,不改本地缓存。Data 返回 series、nextAction、assessment、evidence 和 resultKind=cache-diff(结果类型标记,向用户转述时可忽略):series 每项含 missing(本地没有的区间)与 changed(已覆盖但元数据对不上的区间),两者都已按序列合并相邻与交叠段。\n\n**changed
|
|
419
|
+
"description": "比对云端与本地缓存,直接回答「还差哪些区间、多少个文件、多大」。只读,不创建任务,不改本地缓存。Data 返回 series、nextAction、assessment、evidence 和 resultKind=cache-diff(结果类型标记,向用户转述时可忽略):series 每项含 missing(本地没有的区间)与 changed(已覆盖但元数据对不上的区间),两者都已按序列合并相邻与交叠段。\n\n**changed 的文件同样要整份重下,所以补齐已返回缺口的下载量是 missingBytes 与 changedBytes 两者之和**;向用户报体量时必须相加,只报 missingBytes 会少算。nextAction=plan-download 只表示返回的有效 series 中发现缺口;cachediff 是差异结果,不是云端目录,未返回的 series 状态未知。evidence.requestCoverage=unverified 表示上游没有证明响应覆盖调用方的完整请求范围。report-unknown 时停止作请求级结论;不要靠扩大日期、无界重试或承诺重新下载即可一致来补造覆盖证据。本工具需要云端枚举,开销相当于一次下载的列举阶段,不要在轮询循环里反复调用。",
|
|
420
420
|
"inputSchema": {
|
|
421
421
|
"type": "object",
|
|
422
422
|
"properties": {
|
package/package.json
CHANGED
package/zlt-mcp-proxy.bundle.cjs
CHANGED
|
@@ -26176,7 +26176,16 @@ function hasInvalidCacheDiffWindow(value) {
|
|
|
26176
26176
|
}
|
|
26177
26177
|
function formatCacheDiffResult(rawResult) {
|
|
26178
26178
|
if (!isRecord2(rawResult)) return rawResult;
|
|
26179
|
-
if (isRecord2(rawResult.Data) && rawResult.Data.resultKind === CACHE_DIFF_RESULT_KIND && typeof rawResult.Data.assessment === "string" && isRecord2(rawResult.Data.evidence))
|
|
26179
|
+
if (isRecord2(rawResult.Data) && rawResult.Data.resultKind === CACHE_DIFF_RESULT_KIND && typeof rawResult.Data.assessment === "string" && isRecord2(rawResult.Data.evidence)) {
|
|
26180
|
+
if (rawResult.Data.evidence.requestCoverage === "unverified") return rawResult;
|
|
26181
|
+
return {
|
|
26182
|
+
...rawResult,
|
|
26183
|
+
Data: {
|
|
26184
|
+
...rawResult.Data,
|
|
26185
|
+
evidence: { ...rawResult.Data.evidence, requestCoverage: "unverified" }
|
|
26186
|
+
}
|
|
26187
|
+
};
|
|
26188
|
+
}
|
|
26180
26189
|
const { Data: upstream, ...envelope } = rawResult;
|
|
26181
26190
|
const payload = isRecord2(upstream) ? upstream : {};
|
|
26182
26191
|
const hasResultsField = Object.prototype.hasOwnProperty.call(payload, "results");
|
|
@@ -26235,6 +26244,7 @@ function formatCacheDiffResult(rawResult) {
|
|
|
26235
26244
|
nextAction,
|
|
26236
26245
|
assessment,
|
|
26237
26246
|
evidence: {
|
|
26247
|
+
requestCoverage: "unverified",
|
|
26238
26248
|
resultsShape,
|
|
26239
26249
|
resultCount: results.length,
|
|
26240
26250
|
interpretedSeries: series.length,
|
|
@@ -27711,6 +27721,15 @@ function runtimeRecoveryStopData(message, extra = {}, handler = "runtimeStart")
|
|
|
27711
27721
|
var CLI_NAME = "zlt-mcp";
|
|
27712
27722
|
var CLI_FALLBACK_PACKAGE_NAME = "@zltquant/zlt-mcp";
|
|
27713
27723
|
var CLI_FALLBACK_VERSION = "0.5.0-beta.0";
|
|
27724
|
+
function writeCliArgumentError(message, write2) {
|
|
27725
|
+
write2(message);
|
|
27726
|
+
if (!message.includes("unknown option")) return;
|
|
27727
|
+
if (message.includes("--registry")) {
|
|
27728
|
+
write2("CLI argument error: toolExecution=not_started; no tool was called. --registry is an npm/npx option, not a zlt-mcp or tool option. Put it before the package name: npx --yes --registry=https://registry.npmjs.org @zltquant/zlt-mcp@<version> <command>. The override applies to one invocation; repeat it on every npx command before claiming that command used the official registry.\n");
|
|
27729
|
+
return;
|
|
27730
|
+
}
|
|
27731
|
+
write2("CLI argument error: toolExecution=not_started; no tool was called. Tool fields belong inside one JSON object passed to --args-json (or --args-file), not --flags or key=value arguments. Use call --help and list --tool <tool-name> --json, correct the arguments, then retry.\n");
|
|
27732
|
+
}
|
|
27714
27733
|
if (process.argv.length <= 2) {
|
|
27715
27734
|
startMcpServer();
|
|
27716
27735
|
} else {
|
|
@@ -27728,15 +27747,8 @@ if (process.argv.length <= 2) {
|
|
|
27728
27747
|
startRuntime: false
|
|
27729
27748
|
}));
|
|
27730
27749
|
});
|
|
27731
|
-
program2.name(CLI_NAME).description("MCP proxy for ZLTHost IPC service").version(resolveCliVersion()).addHelpText("after", "\nDiscovery: list for names; list --tool <name> --json for one complete input schema.\nUse call --help for input, output and diagnostic handling.");
|
|
27732
|
-
program2.command("call <tool>").description("Call any MCP tool through the bundled MCP server").configureOutput({
|
|
27733
|
-
outputError: (message, write2) => {
|
|
27734
|
-
write2(message);
|
|
27735
|
-
if (message.includes("unknown option")) {
|
|
27736
|
-
write2("CLI argument error: toolExecution=not_started; no tool was called. Tool fields belong inside one JSON object passed to --args-json (or --args-file), not --flags or key=value arguments. Use call --help and list --tool <tool-name> --json, correct the arguments, then retry.\n");
|
|
27737
|
-
}
|
|
27738
|
-
}
|
|
27739
|
-
}).option("--args-json <json>", "JSON object containing tool arguments").option("--args-file <path>", "Read the JSON argument object from a file").option("--output-json <path>", "Save the complete result to a new JSON file and print a compact receipt").option("--timeout-ms <ms>", "MCP request inactivity timeout in milliseconds").option("--max-total-timeout-ms <ms>", "Optional hard upper bound for the call, including install/backtest wait").option("--no-progress", "Suppress progress diagnostics on stderr").addHelpText("after", `
|
|
27750
|
+
program2.name(CLI_NAME).description("MCP proxy for ZLTHost IPC service").version(resolveCliVersion()).configureOutput({ outputError: writeCliArgumentError }).addHelpText("after", "\nDiscovery: list for names; list --tool <name> --json for one complete input schema.\nUse call --help for input, output and diagnostic handling.\nFor npx registry selection, put --registry before the package name; it is not a zlt-mcp option.");
|
|
27751
|
+
program2.command("call <tool>").description("Call any MCP tool through the bundled MCP server").configureOutput({ outputError: writeCliArgumentError }).option("--args-json <json>", "JSON object containing tool arguments").option("--args-file <path>", "Read the JSON argument object from a file").option("--output-json <path>", "Save the complete result to a new JSON file and print a compact receipt").option("--timeout-ms <ms>", "MCP request inactivity timeout in milliseconds").option("--max-total-timeout-ms <ms>", "Optional hard upper bound for the call, including install/backtest wait").option("--no-progress", "Suppress progress diagnostics on stderr").addHelpText("after", `
|
|
27740
27752
|
Input: omitted arguments mean {}; use --args-json for small objects and --args-file
|
|
27741
27753
|
for nested configuration or shell-sensitive text. Follow the selected tool schema
|
|
27742
27754
|
from list --tool <name> --json. Windows paths must be native paths (C:/...), not /c/....
|