@crabcloud/cli 0.1.4 → 0.1.5

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/crab.js CHANGED
@@ -5723,6 +5723,7 @@ function superRefine(fn, params) {
5723
5723
  // ../../packages/contracts/src/index.ts
5724
5724
  var accountDomain = "crabcloud.cc";
5725
5725
  var adminDomain = `admin.${accountDomain}`;
5726
+ var storageDomain = `storage.${accountDomain}`;
5726
5727
  var clientTypes = ["web", "agent", "miniapp", "native"];
5727
5728
  var scopes = [
5728
5729
  "account.read",
@@ -5731,9 +5732,9 @@ var scopes = [
5731
5732
  "mail.send",
5732
5733
  "mail.search",
5733
5734
  "mail.delete",
5734
- "files.read",
5735
- "files.write",
5736
- "files.delete",
5735
+ "storage.read",
5736
+ "storage.write",
5737
+ "storage.delete",
5737
5738
  "contacts.read",
5738
5739
  "contacts.write",
5739
5740
  "collab.read",
@@ -5742,7 +5743,7 @@ var scopes = [
5742
5743
  var scopeGroups = [
5743
5744
  { id: "account", scopes: ["account.read", "credits.read"] },
5744
5745
  { id: "mail", scopes: ["mail.read", "mail.send", "mail.search", "mail.delete"] },
5745
- { id: "files", scopes: ["files.read", "files.write", "files.delete"] },
5746
+ { id: "storage", scopes: ["storage.read", "storage.write", "storage.delete"] },
5746
5747
  { id: "collab", scopes: ["collab.read", "collab.write"] },
5747
5748
  { id: "contacts", scopes: ["contacts.read", "contacts.write"] }
5748
5749
  ];
@@ -5789,7 +5790,8 @@ var registerInput = object({
5789
5790
  backupEmail: backupEmailSchema,
5790
5791
  code: string2().trim().regex(/^\d{6}$/),
5791
5792
  displayName: string2().trim().min(1).max(80),
5792
- password: string2().min(8).max(256)
5793
+ password: string2().min(8).max(256),
5794
+ invite: string2().trim().min(16).max(128).optional()
5793
5795
  });
5794
5796
  var loginInput = object({
5795
5797
  username: string2().trim().toLowerCase().min(3).max(254),
@@ -1,15 +1,16 @@
1
1
  ---
2
2
  name: crabcloud
3
- description: Manage the user's Crab Cloud personal cloud account and agent tokens through the `crab` CLI — check identity/subscription/credits, list and revoke authorized agent tokens, and re-authorize with specific scopes. Use this skill whenever the user asks about their Crab Cloud account ("我的账号信息", "who am I on crabcloud"), wants to see or clean up authorized agents/tokens ("看看我授权了哪些 agent", "revoke that old token", "撤销那个旧令牌"), or asks how to connect their coding agent to Crab Cloud — even if they never say "crab" or "Crab Cloud" explicitly. Email lives in the crabcloud-mail skill (crab mail …); files and projects ship in later phases.
3
+ description: Manage the user's Crab Cloud personal cloud account and agent tokens through the `crab` CLI — check identity/subscription/credits, list and revoke authorized agent tokens, and re-authorize with specific scopes or scope groups. Use this skill whenever the user asks about their Crab Cloud account ("我的账号信息", "who am I on crabcloud"), wants to see or clean up authorized agents/tokens ("看看我授权了哪些 agent", "revoke that old token", "撤销那个旧令牌"), or asks how to connect their coding agent to Crab Cloud — even if they never say "crab" or "Crab Cloud" explicitly. Email lives in the crabcloud-mail skill (crab mail …); the Drive web app is live but has no CLI commands yet; collab and contacts ship in later phases.
4
4
  ---
5
5
 
6
6
  # Crab Cloud(平台 / 账号域)
7
7
 
8
- Crab Cloud 是用户的个人云底座:账号、订阅与积分是平台层,邮箱 / 云文件 / 协作项目
9
- 是独立应用。`crab` CLI 是 Agent 的稳定接口:凭证在用户本机
8
+ Crab Cloud 是用户的个人云底座:账号、订阅与积分是平台层,邮箱 / 云盘 / 协作 /
9
+ 联系人是独立应用。`crab` CLI 是 Agent 的稳定接口:凭证在用户本机
10
10
  (`~/.config/crabcloud/credentials.json`,0600),服务端只存令牌哈希、全程审计。
11
11
  本 skill 覆盖**平台与账号域**;邮箱已上线,见 `crabcloud-mail` skill(`crab mail …`);
12
- 云文件、协作项目仍随后续阶段提供——用户问到这些时如实说明尚未开放,**不要猜命令**。
12
+ 云盘已在网页上线但 **agent 通道(CLI 命令)尚未开放**,协作、联系人随后续阶段
13
+ 提供——用户问到这些时如实说明,**不要猜命令**。
13
14
 
14
15
  ## 第一步:确认 CLI 可用
15
16
 
@@ -28,7 +29,7 @@ Crab Cloud 是用户的个人云底座:账号、订阅与积分是平台层,
28
29
  | 程序化读取身份 | `crab whoami --json` |
29
30
  | 列出已授权的 Agent 令牌 | `crab tokens list`(脚本消费加 `--json`) |
30
31
  | 撤销某个令牌(高危,先确认) | `crab tokens revoke <id>` |
31
- | 重新授权 / 调整 scope | `crab login --scopes mail.read`(浏览器确认,你只发起) |
32
+ | 重新授权 / 调整 scope | `crab login --scopes mail`(组名整组授权;也可单 scope 如 `mail.read`。浏览器确认,你只发起) |
32
33
  | 登出并吊销当前令牌 | `crab logout` |
33
34
  | 管理登录设备 / 会话、修改密码 | 网页个人中心(crabcloud.cc/account)——CLI 有意不开放 |
34
35
 
@@ -58,9 +59,12 @@ Crab Cloud 是用户的个人云底座:账号、订阅与积分是平台层,
58
59
  - **撤销令牌是高危操作**:先向用户复述目标令牌的名称与 scope,得到确认后再
59
60
  执行 `crab tokens revoke`;撤销立即生效,不可恢复(重新授权即可再建)。
60
61
  - **scope 最小化**:建议按需授权(只读场景 `crab login --scopes account.read`),
61
- 不要怂恿用户一次性给全量 scope。
62
- - 如实转述能力边界:云文件 / 协作项目尚未上线,相关请求引导用户关注
63
- 后续版本,不要编造命令或输出;邮箱请求转交 `crabcloud-mail` skill。
62
+ 不要怂恿用户一次性给全量 scope。`--scopes` 支持组名(`mail` = 读写搜删四项
63
+ 整组)与单个 scope 混用;组目录见 `crab help`,可用组:account / mail /
64
+ files / collab / contacts。
65
+ - 如实转述能力边界:云盘已在网页上线但 agent 通道尚未开放(没有
66
+ `crab files` 等命令),协作、联系人尚未上线——相关请求如实说明,引导用户
67
+ 用网页(crabcloud.cc),不要编造命令或输出;邮箱请求转交 `crabcloud-mail` skill。
64
68
  - 账号安全操作(修改密码、登录设备/会话的查看与吊销)**有意不开放给 agent
65
69
  通道**:改密对令牌持有者是账号接管面,会话属于"人的浏览器会话"。用户让
66
70
  agent 做这些时,如实说明并引导到网页个人中心(crabcloud.cc/account)操作,
@@ -6,15 +6,16 @@ description: Read, search and send the user's Crab Cloud platform email (usernam
6
6
  # Crab Cloud 邮箱(crab mail)
7
7
 
8
8
  用户的 Crab Cloud 账号自带平台邮箱 `username@crabcloud.cc`(用户名即地址本地部分)。
9
- 本 skill 覆盖邮箱域的 agent 通道;账号/令牌管理见 `crabcloud` skill,云文件、协作
10
- 项目尚未开放——用户问到时如实说明,**不要猜命令**。
9
+ 本 skill 覆盖邮箱域的 agent 通道;账号/令牌管理见 `crabcloud` skill。云盘已在网页
10
+ 上线(agent 通道未开放),协作尚未上线——用户问到时如实说明,**不要猜命令**。
11
11
 
12
12
  ## 第一步:确认可用
13
13
 
14
14
  - `crab --version` 确认已安装;未登录(退出码 3)引导用户 `crab login`。
15
15
  - 邮箱动作需要对应 scope:读 `mail.read`、搜索 `mail.search`、发信 `mail.send`、
16
16
  删除 `mail.delete`。退出码 4 = scope 不足:如实转述缺哪个,引导用户
17
- `crab login --scopes mail.read,...` 按需最小化重新授权(你只发起,不代批)。
17
+ `crab login --scopes mail`(组名 = 四项整组)或单列所需 scope 按需最小化
18
+ 重新授权(你只发起,不代批)。
18
19
 
19
20
  ## 意图 → 命令映射
20
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crabcloud/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "Crab Cloud CLI (crab) — agent-first entry to your personal cloud, with skills bundled for Claude Code / Codex / ZCode.",
6
6
  "bin": {