@t2000/cli 0.22.2 → 0.22.4
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.
|
@@ -21790,26 +21790,24 @@ Common examples:
|
|
|
21790
21790
|
const result = await mutex.run(
|
|
21791
21791
|
() => agent.pay({ url, method, body, headers, maxPrice })
|
|
21792
21792
|
);
|
|
21793
|
-
|
|
21794
|
-
{ type: "text", text: JSON.stringify(result) }
|
|
21795
|
-
];
|
|
21793
|
+
let text = JSON.stringify(result);
|
|
21796
21794
|
try {
|
|
21797
21795
|
const data = typeof result === "string" ? JSON.parse(result) : result;
|
|
21798
21796
|
const imageUrls = extractImageUrls(data);
|
|
21799
|
-
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
|
|
21803
|
-
|
|
21804
|
-
|
|
21805
|
-
content.push({ type: "image", data: buf.toString("base64"), mimeType: mime });
|
|
21806
|
-
}
|
|
21807
|
-
} catch {
|
|
21808
|
-
}
|
|
21797
|
+
if (imageUrls.length > 0) {
|
|
21798
|
+
const urlList = imageUrls.slice(0, 4).map((u) => `- ${u}`).join("\n");
|
|
21799
|
+
text = `Generated images:
|
|
21800
|
+
${urlList}
|
|
21801
|
+
|
|
21802
|
+
${text}`;
|
|
21809
21803
|
}
|
|
21810
21804
|
} catch {
|
|
21811
21805
|
}
|
|
21812
|
-
|
|
21806
|
+
const MAX_BYTES = 8e5;
|
|
21807
|
+
if (text.length > MAX_BYTES) {
|
|
21808
|
+
text = text.slice(0, MAX_BYTES) + "\n\n[Response truncated \u2014 exceeded size limit]";
|
|
21809
|
+
}
|
|
21810
|
+
return { content: [{ type: "text", text }] };
|
|
21813
21811
|
} catch (err) {
|
|
21814
21812
|
return errorResult(err);
|
|
21815
21813
|
}
|
|
@@ -22798,7 +22796,7 @@ async function startMcpServer(opts) {
|
|
|
22798
22796
|
);
|
|
22799
22797
|
process.exit(1);
|
|
22800
22798
|
}
|
|
22801
|
-
const server = new McpServer({ name: "t2000", version: "0.22.
|
|
22799
|
+
const server = new McpServer({ name: "t2000", version: "0.22.4" });
|
|
22802
22800
|
registerReadTools(server, agent);
|
|
22803
22801
|
registerWriteTools(server, agent);
|
|
22804
22802
|
registerSafetyTools(server, agent);
|
|
@@ -22809,4 +22807,4 @@ async function startMcpServer(opts) {
|
|
|
22809
22807
|
export {
|
|
22810
22808
|
startMcpServer
|
|
22811
22809
|
};
|
|
22812
|
-
//# sourceMappingURL=dist-
|
|
22810
|
+
//# sourceMappingURL=dist-72NNY4EV.js.map
|