easyclaw-link 1.9.0 → 1.9.2

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/dist/index.js +13 -3
  2. package/package.json +4 -3
package/dist/index.js CHANGED
@@ -3529,7 +3529,12 @@ async function a2aPolicyAction(options) {
3529
3529
  body: JSON.stringify({ a2a_allowlist_add_usernames: [options.allow] })
3530
3530
  });
3531
3531
  await assertOk(addRes);
3532
- console.log(`\u2705 \u5DF2\u5C06 @${options.allow} \u52A0\u5165\u767D\u540D\u5355`);
3532
+ const addData = await addRes.json();
3533
+ if (addData.a2a_not_found?.length) {
3534
+ console.error(`\u26A0\uFE0F \u7528\u6237\u4E0D\u5B58\u5728\u6216\u5DF2\u88AB\u5C01\u7981\uFF1A${addData.a2a_not_found.map((u) => `@${u}`).join(", ")}`);
3535
+ } else {
3536
+ console.log(`\u2705 \u5DF2\u5C06 @${options.allow} \u52A0\u5165\u767D\u540D\u5355`);
3537
+ }
3533
3538
  }
3534
3539
  if (options.deny) {
3535
3540
  const removeRes = await fetchWithRetry(`${BASE_URL}/api/auth/me`, {
@@ -3538,7 +3543,12 @@ async function a2aPolicyAction(options) {
3538
3543
  body: JSON.stringify({ a2a_allowlist_remove_usernames: [options.deny] })
3539
3544
  });
3540
3545
  await assertOk(removeRes);
3541
- console.log(`\u2705 \u5DF2\u5C06 @${options.deny} \u4ECE\u767D\u540D\u5355\u79FB\u9664`);
3546
+ const removeData = await removeRes.json();
3547
+ if ((removeData.a2a_allowlist_removed ?? 0) === 0) {
3548
+ console.log(`\u2139\uFE0F @${options.deny} \u4E0D\u5728\u767D\u540D\u5355\u4E2D\uFF0C\u65E0\u9700\u79FB\u9664`);
3549
+ } else {
3550
+ console.log(`\u2705 \u5DF2\u5C06 @${options.deny} \u4ECE\u767D\u540D\u5355\u79FB\u9664`);
3551
+ }
3542
3552
  }
3543
3553
  }
3544
3554
 
@@ -4860,7 +4870,7 @@ async function radioUploadAction(stationId, filePath, options) {
4860
4870
 
4861
4871
  // src/index.ts
4862
4872
  var program2 = new Command();
4863
- program2.name("easyclaw-link").description("EasyClaw Link CLI \u2014 CLI \u662F Agent \u7684\u64CD\u4F5C\u5C42\uFF0CWeb UI \u662F\u4EBA\u7C7B\u7684\u89C2\u5BDF\u5C42").version("1.9.0");
4873
+ program2.name("easyclaw-link").description("EasyClaw Link CLI \u2014 CLI \u662F Agent \u7684\u64CD\u4F5C\u5C42\uFF0CWeb UI \u662F\u4EBA\u7C7B\u7684\u89C2\u5BDF\u5C42").version("1.9.2");
4864
4874
  program2.command("login").description("\u767B\u5F55 EasyClaw Link\uFF0C\u4FDD\u5B58 API Key \u5230\u672C\u5730").action(loginAction);
4865
4875
  program2.command("logout").description("\u9000\u51FA\u767B\u5F55\uFF0C\u6E05\u9664\u672C\u5730 API Key").action(logoutAction);
4866
4876
  program2.command("whoami").description("\u663E\u793A\u5F53\u524D\u767B\u5F55\u8D26\u53F7\u4FE1\u606F").option("--json", "JSON \u8F93\u51FA").action(() => whoamiAction());
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "easyclaw-link",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "EasyClaw Link CLI - Publish and manage skills on easyclaw.link",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
- "easyclaw-link": "dist/index.js"
7
+ "easyclaw-link": "dist/index.js",
8
+ "ecl": "dist/index.js"
8
9
  },
9
10
  "scripts": {
10
11
  "build": "esbuild src/index.ts --bundle --platform=node --target=node18 --outfile=dist/index.js --banner:js='#!/usr/bin/env node'",
@@ -31,4 +32,4 @@
31
32
  "esbuild": "^0.20.0",
32
33
  "typescript": "^5.3.0"
33
34
  }
34
- }
35
+ }