evolclaw 2.5.9 → 2.5.10

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/dist/cli.js CHANGED
@@ -1287,6 +1287,11 @@ function getArgValue(args, flag) {
1287
1287
  }
1288
1288
  export async function main(args) {
1289
1289
  const cmd = args[0] || 'start';
1290
+ if (cmd === '--version' || cmd === '-v' || cmd === '-V') {
1291
+ const pkg = JSON.parse(fs.readFileSync(path.join(getPackageRoot(), 'package.json'), 'utf-8'));
1292
+ console.log(pkg.version);
1293
+ return;
1294
+ }
1290
1295
  switch (cmd) {
1291
1296
  case 'init':
1292
1297
  if (args[1] === 'wechat') {
@@ -768,13 +768,15 @@ export async function setupAunAid(rl, _config) {
768
768
  const caDownloaded = await downloadCaRoot(aunPath, result.gateway || '', ' ');
769
769
  // 关键:SDK 默认 rootCaPath=null,只读取包内 bundled certs。
770
770
  // 必须显式传 root_ca_path 指向刚下载的 root.crt,uploadAgentMd 才能验证 server cert。
771
+ // 同时传 aid,否则新 client 不知道该加载哪个身份,uploadAgentMd 会报
772
+ // "no local identity found, call auth.createAid() first"。
771
773
  const caCertPath = path.join(aunPath, 'CA', 'root', 'root.crt');
772
774
  if (caDownloaded && fs.existsSync(caCertPath)) {
773
775
  try {
774
776
  await client.close();
775
777
  }
776
778
  catch { /* ignore */ }
777
- client = new AUNClient({ aun_path: aunPath, root_ca_path: caCertPath });
779
+ client = new AUNClient({ aun_path: aunPath, root_ca_path: caCertPath, aid });
778
780
  if (gatewayPort) {
779
781
  const domain = aid.split('.').slice(1).join('.');
780
782
  client._gatewayUrl = `wss://gateway.${domain}:${gatewayPort}/aun`;
@@ -423,13 +423,15 @@ export async function cmdInit(options) {
423
423
  const caDownloaded = await downloadCaRoot(aunPath, result.gateway || '');
424
424
  // 关键:SDK 默认 rootCaPath=null,只读取包内 bundled certs。
425
425
  // 必须显式传 root_ca_path 指向刚下载的 root.crt,uploadAgentMd 才能验证 server cert。
426
+ // 同时传 aid,否则新 client 不知道该加载哪个身份,uploadAgentMd 会报
427
+ // "no local identity found, call auth.createAid() first"。
426
428
  const caCertPath = path.join(aunPath, 'CA', 'root', 'root.crt');
427
429
  if (caDownloaded && fs.existsSync(caCertPath)) {
428
430
  try {
429
431
  await client.close();
430
432
  }
431
433
  catch { }
432
- client = new AUNClient({ aun_path: aunPath, root_ca_path: caCertPath });
434
+ client = new AUNClient({ aun_path: aunPath, root_ca_path: caCertPath, aid: options.aunAid });
433
435
  }
434
436
  // 写入初始 agent.md(initialized: false)
435
437
  const agentName = options.aunAid.split('.')[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evolclaw",
3
- "version": "2.5.9",
3
+ "version": "2.5.10",
4
4
  "description": "Lightweight AI Agent gateway connecting Claude Agent SDK to messaging channels (Feishu, ACP) with multi-project session management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",