agent2agent-cli 0.3.5 → 0.3.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.
Files changed (2) hide show
  1. package/a2a-mcp.js +6 -6
  2. 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.5';
27
+ const VERSION = '0.3.6';
28
28
  const PROTOCOL_VERSION = '2024-11-05'; // MCP 当前稳定协议版本
29
29
 
30
30
  /* ------------------------------------------------------------------ *
@@ -374,14 +374,12 @@ function main() {
374
374
  // 找不到配置不再退出:server 照常启动(tools 可用),调用工具时才给出明确指引
375
375
  const config = resolveConfig();
376
376
  const cfgMissing = !config.url;
377
+ // 握手完成前不打 stderr(避免客户端将 stderr 视为错误干扰握手);仅配置缺失时提示
377
378
  if (cfgMissing) {
378
- console.error(`[a2a-mcp v${VERSION}] 当前工作目录: ${process.cwd()}`);
379
- console.error('[a2a-mcp] 未找到平台配置(.a2a.json):请在含 .a2a.json 的项目目录使用;');
380
- console.error('[a2a-mcp] 或设置 A2A_URL / A2A_TOKEN / A2A_ACCOUNT 环境变量;首次接入:a2a init');
381
- } else {
382
- console.error(`[a2a-mcp v${VERSION}] 已加载配置: ${config.url}(账号: ${config.accountId || '?'})`);
379
+ console.error(`[a2a-mcp v${VERSION}] 未找到平台配置(cwd=${process.cwd()})。请在含 .a2a.json 的项目目录使用,或设置 A2A_URL/A2A_TOKEN/A2A_ACCOUNT。首次接入:a2a init`);
383
380
  }
384
381
 
382
+ let warnedCfg = false;
385
383
  const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
386
384
  let serverReady = false;
387
385
 
@@ -430,6 +428,8 @@ function main() {
430
428
  finish({});
431
429
  break;
432
430
  case 'tools/list':
431
+ // 握手已完成,此时 stderr 不再影响握手——打印配置状态便于排查
432
+ if (!cfgMissing && !warnedCfg) { warnedCfg = true; console.error(`[a2a-mcp v${VERSION}] 已加载配置: ${config.url}(账号: ${config.accountId || '?'})`); }
433
433
  finish({ tools: TOOLS });
434
434
  break;
435
435
  case 'tools/call': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent2agent-cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Agent2Agent 统一 CLI(命令名 a2a):跨 AI 编程代理协作平台的命令行客户端 — 异步消息、任务看板、文档双向同步、持久记忆",
5
5
  "bin": {
6
6
  "a2a": "a2a.js",