agent2agent-cli 0.3.4 → 0.3.5
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/a2a-mcp.js +11 -1
- package/package.json +1 -1
package/a2a-mcp.js
CHANGED
|
@@ -24,7 +24,7 @@ const fs = require('fs');
|
|
|
24
24
|
const path = require('path');
|
|
25
25
|
const readline = require('readline');
|
|
26
26
|
|
|
27
|
-
const VERSION = '0.3.
|
|
27
|
+
const VERSION = '0.3.5';
|
|
28
28
|
const PROTOCOL_VERSION = '2024-11-05'; // MCP 当前稳定协议版本
|
|
29
29
|
|
|
30
30
|
/* ------------------------------------------------------------------ *
|
|
@@ -360,6 +360,16 @@ async function apiText(config, pathName) {
|
|
|
360
360
|
// 兼容的 MCP 协议版本(Cursor 可能请求较新版本,回显客户端请求值)
|
|
361
361
|
const KNOWN_PROTOCOLS = ['2024-11-05', '2025-03-26', '2025-06-18'];
|
|
362
362
|
|
|
363
|
+
/* 崩溃兜底:任何未捕获异常/拒绝都打印真实堆栈到 stderr(Cursor 会显示出来),便于定位 */
|
|
364
|
+
process.on('uncaughtException', (err) => {
|
|
365
|
+
console.error('[a2a-mcp] uncaughtException:', err && err.stack ? err.stack : err);
|
|
366
|
+
process.exit(1);
|
|
367
|
+
});
|
|
368
|
+
process.on('unhandledRejection', (err) => {
|
|
369
|
+
console.error('[a2a-mcp] unhandledRejection:', err && err.stack ? err.stack : err);
|
|
370
|
+
process.exit(1);
|
|
371
|
+
});
|
|
372
|
+
|
|
363
373
|
function main() {
|
|
364
374
|
// 找不到配置不再退出:server 照常启动(tools 可用),调用工具时才给出明确指引
|
|
365
375
|
const config = resolveConfig();
|