@zltquant/zlt-mcp 0.7.0-beta.0 → 0.7.0-beta.1
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/package.json +1 -1
- package/zlt-mcp-proxy.bundle.cjs +11 -2
package/package.json
CHANGED
package/zlt-mcp-proxy.bundle.cjs
CHANGED
|
@@ -27224,8 +27224,15 @@ async function startMcpServer() {
|
|
|
27224
27224
|
const text = result.content?.map((item) => item.type === "text" ? item.text : "").join("\n") ?? "";
|
|
27225
27225
|
const match = text.match(/"uuid"\s*:\s*"([^"]+)"/);
|
|
27226
27226
|
if (!match) return;
|
|
27227
|
-
leaseStateUpdate = leaseStateUpdate.then(() => updateRuntimeLeaseActiveJob(runtimeLease, `download:${match[1]}`, true)).catch((error2) => {
|
|
27227
|
+
leaseStateUpdate = leaseStateUpdate.then(() => updateRuntimeLeaseActiveJob(runtimeLease, "runtime:explicit-start", false)).then(() => updateRuntimeLeaseActiveJob(runtimeLease, `download:${match[1]}`, true)).catch((error2) => {
|
|
27228
27228
|
process.stderr.write(`[zlt-mcp-proxy] runtime download lease update failed: ${error2 instanceof Error ? error2.message : String(error2)}
|
|
27229
|
+
`);
|
|
27230
|
+
});
|
|
27231
|
+
};
|
|
27232
|
+
const recordRuntimeKeepalive = (active2) => {
|
|
27233
|
+
if (!runtimeLease) return;
|
|
27234
|
+
leaseStateUpdate = leaseStateUpdate.then(() => updateRuntimeLeaseActiveJob(runtimeLease, "runtime:explicit-start", active2)).catch((error2) => {
|
|
27235
|
+
process.stderr.write(`[zlt-mcp-proxy] runtime keepalive update failed: ${error2 instanceof Error ? error2.message : String(error2)}
|
|
27229
27236
|
`);
|
|
27230
27237
|
});
|
|
27231
27238
|
};
|
|
@@ -27341,7 +27348,9 @@ async function startMcpServer() {
|
|
|
27341
27348
|
return handleBacktestProfitTool(toolArgs, backtestRunContexts);
|
|
27342
27349
|
}
|
|
27343
27350
|
if (tool.localHandler) {
|
|
27344
|
-
|
|
27351
|
+
const result = await handleRuntimeTool(tool.localHandler, toolArgs, runtimeConfig, ensureRuntimeLease, runRuntimeDoctor);
|
|
27352
|
+
if (tool.localHandler === "runtimeStart" && !result.isError) recordRuntimeKeepalive(true);
|
|
27353
|
+
return result;
|
|
27345
27354
|
}
|
|
27346
27355
|
const dangerousToolGuard = guardDangerousTool(tool, toolArgs);
|
|
27347
27356
|
if (dangerousToolGuard) {
|