easyclaw-link 1.9.0 → 1.9.1

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 +12 -2
  2. package/package.json +2 -2
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyclaw-link",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "EasyClaw Link CLI - Publish and manage skills on easyclaw.link",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -31,4 +31,4 @@
31
31
  "esbuild": "^0.20.0",
32
32
  "typescript": "^5.3.0"
33
33
  }
34
- }
34
+ }