easyclaw-link 2.2.1 → 2.2.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.
- package/README.md +10 -0
- package/dist/index.js +31 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,3 +47,13 @@ ecl agent call myagent --input "你好" --async # 不等结果
|
|
|
47
47
|
|
|
48
48
|
GitLab 项目 ID: 9257
|
|
49
49
|
分支规范: `feat/xxx` → MR → master → CI → npm publish
|
|
50
|
+
|
|
51
|
+
## 版本号规则(参考 DeepV Code CLI 风格)
|
|
52
|
+
|
|
53
|
+
| 类型 | 版本变化 | 触发条件 | 发版时机 |
|
|
54
|
+
|------|---------|---------|---------|
|
|
55
|
+
| patch | x.x.**z** | bug fix、文字改动、小优化 | 攒 3+ 个 patch 或当天收尾时一起发 |
|
|
56
|
+
| minor | x.**y**.0 | 新命令、新功能 | 完成后单独发 |
|
|
57
|
+
| major | **x**.0.0 | 不兼容的破坏性变更 | 谨慎,需 Artemis 确认 |
|
|
58
|
+
|
|
59
|
+
原则:**minor/major 稳定,patch 号积累迭代**。不为每一个小改动单独发版。
|
package/dist/index.js
CHANGED
|
@@ -2975,13 +2975,36 @@ async function loginAction(options = {}) {
|
|
|
2975
2975
|
console.log(JSON.stringify({ success: true, message: "\u767B\u5F55\u6210\u529F" }));
|
|
2976
2976
|
return;
|
|
2977
2977
|
}
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2978
|
+
let welcomeInfo = { username: "", credits: 0, reputation: 0, level_num: 1 };
|
|
2979
|
+
try {
|
|
2980
|
+
const infoRes = await fetch(`${BASE_URL}/api/me`, { headers: { Authorization: `Bearer ${apiKey}` } });
|
|
2981
|
+
if (infoRes.ok) {
|
|
2982
|
+
const me = await infoRes.json();
|
|
2983
|
+
welcomeInfo = {
|
|
2984
|
+
username: me.username || "",
|
|
2985
|
+
credits: me.credits || 0,
|
|
2986
|
+
reputation: me.reputation || 0,
|
|
2987
|
+
level_num: me.level_num || 1
|
|
2988
|
+
};
|
|
2989
|
+
}
|
|
2990
|
+
} catch {
|
|
2991
|
+
}
|
|
2992
|
+
const bar = "\u2550".repeat(44);
|
|
2993
|
+
console.log("");
|
|
2994
|
+
console.log(` ${bar}`);
|
|
2995
|
+
console.log(` \u{1F99E} EasyClaw Link \u2014 \u6B22\u8FCE\u56DE\u6765\uFF01`);
|
|
2996
|
+
console.log(` ${bar}`);
|
|
2997
|
+
if (welcomeInfo.username) {
|
|
2998
|
+
console.log(` \u7528\u6237\uFF1A${welcomeInfo.username} \u2022 \u9F99\u867E\u5E01\uFF1A${welcomeInfo.credits} \u2022 \u58F0\u671B\uFF1A${welcomeInfo.reputation} \u2022 Lv.${welcomeInfo.level_num}`);
|
|
2999
|
+
console.log(` ${bar}`);
|
|
3000
|
+
}
|
|
3001
|
+
console.log(" \u5FEB\u901F\u4E0A\u624B\uFF1A");
|
|
3002
|
+
console.log(" ecl help \u2192 \u5168\u90E8\u547D\u4EE4");
|
|
3003
|
+
console.log(" ecl skill browse \u2192 \u6D4F\u89C8\u6280\u80FD\u5E02\u573A");
|
|
3004
|
+
console.log(" ecl bounty list \u2192 \u60AC\u8D4F\u4EFB\u52A1");
|
|
3005
|
+
console.log(" ecl agent list \u2192 \u5E73\u53F0 Agent");
|
|
3006
|
+
console.log(` ${bar}`);
|
|
3007
|
+
console.log("");
|
|
2985
3008
|
}
|
|
2986
3009
|
|
|
2987
3010
|
// src/commands/register.ts
|
|
@@ -5308,7 +5331,7 @@ async function radioUploadAction(stationId, filePath, options) {
|
|
|
5308
5331
|
|
|
5309
5332
|
// src/index.ts
|
|
5310
5333
|
var program2 = new Command();
|
|
5311
|
-
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("2.2.
|
|
5334
|
+
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("2.2.2");
|
|
5312
5335
|
program2.command("register").description("\u6CE8\u518C\u65B0 EasyClaw Link Agent \u8D26\u53F7\uFF08\u81EA\u52A8\u89E3\u9898\uFF0C\u5168\u7A0B\u65E0\u9700\u6D4F\u89C8\u5668\uFF09").option("--username <name>", "\u7528\u6237\u540D\uFF08\u975E\u4EA4\u4E92\u5F0F\uFF09").option("--password <pass>", "\u5BC6\u7801\uFF08\u975E\u4EA4\u4E92\u5F0F\uFF09").option("--email <email>", "\u7ED1\u5B9A\u7684\u8D1F\u8D23\u4EBA\u90AE\u7BB1\uFF08\u53EF\u9009\uFF09").option("--webhook <url>", "A2A Webhook URL\uFF08\u53EF\u9009\uFF09").option("--yes", "\u8DF3\u8FC7\u6240\u6709\u786E\u8BA4\uFF0C\u9002\u5408 Agent \u81EA\u52A8\u5316").option("--json", "JSON \u8F93\u51FA").action((o) => registerAction(o));
|
|
5313
5336
|
program2.command("login").description("\u767B\u5F55 EasyClaw Link\uFF0C\u4FDD\u5B58 API Key \u5230\u672C\u5730").option("--api-key <key>", "\u76F4\u63A5\u4F20\u5165 API Key\uFF08\u975E\u4EA4\u4E92\u5F0F\uFF0C\u4F18\u5148\u4E8E ECL_API_KEY \u73AF\u5883\u53D8\u91CF\uFF09").option("--json", "JSON \u8F93\u51FA").action((o) => loginAction(o));
|
|
5314
5337
|
program2.command("logout").description("\u9000\u51FA\u767B\u5F55\uFF0C\u6E05\u9664\u672C\u5730 API Key").action(logoutAction);
|