@xiashe/cli 0.1.27 → 0.1.29
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 +2 -2
- package/bin/xiashe.mjs +32 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,8 +26,8 @@ xiashe skills publish submit "<submission-id>"
|
|
|
26
26
|
# This checks only that the bridge CLI is present; it does not query a wallet.
|
|
27
27
|
xiashe payment bridge-info
|
|
28
28
|
# After the Agent shows the Skill and purpose and the user explicitly agrees:
|
|
29
|
-
xiashe payment pay --resource-url "https://<
|
|
30
|
-
xiashe payment status --resource-url "https://<
|
|
29
|
+
xiashe payment pay --resource-url "https://<payment-resource-site>/payment/alipay-ai-collect/skills/<skillCatalogId>?orderId=<id>" --intent-summary "使用付费 Skill:<name>" --confirm
|
|
30
|
+
xiashe payment status --resource-url "https://<payment-resource-site>/payment/alipay-ai-collect/skills/<skillCatalogId>?orderId=<id>"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Local state is stored in `~/.xiashe/config.json`.
|
package/bin/xiashe.mjs
CHANGED
|
@@ -58,7 +58,8 @@ function usage() {
|
|
|
58
58
|
|
|
59
59
|
Usage:
|
|
60
60
|
${c} login --email <email> --password <password> --convex-url <url>
|
|
61
|
-
${c} signup --email <email> --password <password> --name <name>
|
|
61
|
+
${c} signup --email <email> --password <password> --name <name> --verification-code <code>
|
|
62
|
+
${c} auth request-code --email <email> --mode signup
|
|
62
63
|
${c} whoami
|
|
63
64
|
|
|
64
65
|
${c} config path|get|set <key> <value>|use <profile>
|
|
@@ -69,6 +70,7 @@ Usage:
|
|
|
69
70
|
${c} claw check --connection <id-or-name>
|
|
70
71
|
|
|
71
72
|
${c} skills list [query]
|
|
73
|
+
${c} skills code [--label <label>]
|
|
72
74
|
${c} skills detail <skill>
|
|
73
75
|
${c} skills install <skill> --connection <id-or-name> [--watch]
|
|
74
76
|
${c} skills jobs --connection <id-or-name>
|
|
@@ -387,8 +389,9 @@ async function cmdSignup(args, global) {
|
|
|
387
389
|
const email = requireArg(flags.email, '--email');
|
|
388
390
|
const password = requireArg(flags.password, '--password');
|
|
389
391
|
const name = requireArg(flags.name || flags['display-name'], '--name');
|
|
392
|
+
const verificationCode = requireArg(flags['verification-code'] || flags.code, '--verification-code');
|
|
390
393
|
const { client, profileName } = await makeClient(global);
|
|
391
|
-
const auth = await client.registerWithPassword(email, password, name);
|
|
394
|
+
const auth = await client.registerWithPassword(email, password, name, verificationCode);
|
|
392
395
|
await persistGlobalOverrides(profileName, global);
|
|
393
396
|
await saveLoginSession(profileName, auth);
|
|
394
397
|
print(global.json ? { ok: true, profile: profileName, userId: auth.userId, email: auth.email } : `Signed up as ${auth.email}.`, global);
|
|
@@ -511,6 +514,33 @@ async function probeConnection(connection, token, timeoutMs) {
|
|
|
511
514
|
async function cmdSkills(sub, args, global) {
|
|
512
515
|
const flags = parseFlags(args);
|
|
513
516
|
const { client } = await makeClient(global);
|
|
517
|
+
if (sub === 'code' || sub === 'registry-code') {
|
|
518
|
+
const result = await client.issueCreatorSkillClaimCode({ label: flags.label });
|
|
519
|
+
if (global.json) {
|
|
520
|
+
print(
|
|
521
|
+
{
|
|
522
|
+
ok: true,
|
|
523
|
+
code: result.code,
|
|
524
|
+
claimUrl: result.claimUrl,
|
|
525
|
+
expiresAt: result.expiresAt
|
|
526
|
+
},
|
|
527
|
+
global
|
|
528
|
+
);
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
print(
|
|
532
|
+
[
|
|
533
|
+
'A short-lived Skill connection code was created.',
|
|
534
|
+
`Code: ${result.code}`,
|
|
535
|
+
`Expires: ${nowIso(result.expiresAt)}`,
|
|
536
|
+
`Claim URL: ${result.claimUrl}`,
|
|
537
|
+
'',
|
|
538
|
+
'Use it for one first-time publish before it expires. It is scoped to your signed-in creator account.'
|
|
539
|
+
].join('\n'),
|
|
540
|
+
global
|
|
541
|
+
);
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
514
544
|
if (sub === 'list' || sub === 'search' || !sub) {
|
|
515
545
|
const search = flags._.join(' ') || flags.search || '';
|
|
516
546
|
const connection = flags.connection ? await client.resolveConnection(flags.connection) : null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiashe/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xiashe": "bin/xiashe.mjs"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xiashe/sdk": "0.1.
|
|
13
|
+
"@xiashe/sdk": "0.1.29"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=20"
|