@yixiaoermail/cli 3.2.1 → 3.2.3

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 (113) hide show
  1. package/README.md +19 -1
  2. package/bin/install.js +256 -0
  3. package/bin/postinstall.js +4 -8
  4. package/bin/resolve-binary.js +5 -19
  5. package/bin/yxer.js +18 -12
  6. package/checksums.txt +6 -0
  7. package/package.json +29 -28
  8. package/references/cli/command-design.md +305 -305
  9. package/references/cli/command-reference.md +35 -35
  10. package/references/legacy/capabilities.md +13 -13
  11. package/references/workflows/payload-sourcing.md +17 -17
  12. package/references/workflows/publish-troubleshooting.md +10 -10
  13. package/schemas/platforms/acfun.article.schema.json +117 -117
  14. package/schemas/platforms/acfun.video.schema.json +139 -139
  15. package/schemas/platforms/aiqiyi.article.schema.json +29 -29
  16. package/schemas/platforms/aiqiyi.video.schema.json +154 -154
  17. package/schemas/platforms/baijiahao.article.schema.json +160 -160
  18. package/schemas/platforms/baijiahao.imageText.schema.json +111 -111
  19. package/schemas/platforms/baijiahao.video.schema.json +180 -180
  20. package/schemas/platforms/bilibili.article.schema.json +109 -109
  21. package/schemas/platforms/bilibili.video.schema.json +175 -175
  22. package/schemas/platforms/chejiahao.article.schema.json +108 -108
  23. package/schemas/platforms/chejiahao.video.schema.json +111 -111
  24. package/schemas/platforms/csdn.article.schema.json +106 -106
  25. package/schemas/platforms/dayuhao.article.schema.json +106 -106
  26. package/schemas/platforms/dayuhao.video.schema.json +153 -153
  27. package/schemas/platforms/dewu.video.schema.json +134 -134
  28. package/schemas/platforms/douban.article.schema.json +48 -48
  29. package/schemas/platforms/douyin.article.schema.json +318 -318
  30. package/schemas/platforms/douyin.imageText.schema.json +287 -287
  31. package/schemas/platforms/douyin.video.schema.json +852 -852
  32. package/schemas/platforms/duoduoshipin.video.schema.json +108 -108
  33. package/schemas/platforms/facebook.video.schema.json +28 -28
  34. package/schemas/platforms/fengwang.video.schema.json +135 -135
  35. package/schemas/platforms/instagram.video.schema.json +28 -28
  36. package/schemas/platforms/jianshu.article.schema.json +33 -33
  37. package/schemas/platforms/kuaichuanhao.article.schema.json +83 -83
  38. package/schemas/platforms/kuaishou.imageText.schema.json +171 -171
  39. package/schemas/platforms/kuaishou.video.schema.json +243 -243
  40. package/schemas/platforms/meipai.video.schema.json +123 -123
  41. package/schemas/platforms/meiyou.video.schema.json +96 -96
  42. package/schemas/platforms/pipixia.video.schema.json +94 -94
  43. package/schemas/platforms/qiehao.article.schema.json +89 -89
  44. package/schemas/platforms/qiehao.video.schema.json +147 -147
  45. package/schemas/platforms/shipinhao.imageText.schema.json +139 -139
  46. package/schemas/platforms/shipinhao.video.schema.json +237 -237
  47. package/schemas/platforms/souhuhao.article.schema.json +73 -73
  48. package/schemas/platforms/souhuhao.video.schema.json +171 -171
  49. package/schemas/platforms/souhushipin.video.schema.json +115 -115
  50. package/schemas/platforms/tengxunshipin.video.schema.json +114 -114
  51. package/schemas/platforms/tiktok.video.schema.json +72 -72
  52. package/schemas/platforms/toutiaohao.article.schema.json +166 -166
  53. package/schemas/platforms/toutiaohao.imageText.schema.json +83 -83
  54. package/schemas/platforms/toutiaohao.video.schema.json +134 -134
  55. package/schemas/platforms/wangyihao.article.schema.json +85 -85
  56. package/schemas/platforms/wangyihao.video.schema.json +151 -151
  57. package/schemas/platforms/weishi.video.schema.json +101 -101
  58. package/schemas/platforms/weixin.account.article.schema.json +148 -148
  59. package/schemas/platforms/xhs.imageText.schema.json +131 -131
  60. package/schemas/platforms/xiaohongshu.video.schema.json +225 -225
  61. package/schemas/platforms/xiaohongshushop.video.schema.json +142 -142
  62. package/schemas/platforms/xinlang.article.schema.json +69 -69
  63. package/schemas/platforms/xinlang.imageText.schema.json +86 -86
  64. package/schemas/platforms/xinlang.video.schema.json +152 -152
  65. package/schemas/platforms/xueqiuhao.article.schema.json +84 -84
  66. package/schemas/platforms/yichehao.article.schema.json +140 -140
  67. package/schemas/platforms/yichehao.video.schema.json +101 -101
  68. package/schemas/platforms/yidianhao.article.schema.json +77 -77
  69. package/schemas/platforms/yidianhao.video.schema.json +152 -152
  70. package/schemas/platforms/youtube.video.schema.json +92 -92
  71. package/schemas/platforms/zhihu.article.schema.json +104 -104
  72. package/schemas/platforms/zhihu.imageText.schema.json +61 -61
  73. package/schemas/platforms/zhihu.video.schema.json +144 -144
  74. package/skills/yixiaoer/QUICKSTART.md +4 -4
  75. package/skills/yixiaoer/SKILL.md +1 -1
  76. package/skills/yixiaoer/references/cli/command-reference.md +30 -30
  77. package/skills/yixiaoer/references/create-account-group.md +27 -27
  78. package/skills/yixiaoer/references/delete-account-group.md +20 -20
  79. package/skills/yixiaoer/references/domains/accounts-and-env.md +17 -17
  80. package/skills/yixiaoer/references/domains/install-and-sync.md +41 -13
  81. package/skills/yixiaoer/references/domains/publish.md +11 -11
  82. package/skills/yixiaoer/references/execution-standard.md +18 -18
  83. package/skills/yixiaoer/references/get-account-groups.md +14 -14
  84. package/skills/yixiaoer/references/get-members.md +28 -28
  85. package/skills/yixiaoer/references/go-live-process.md +11 -19
  86. package/skills/yixiaoer/references/keyword-reference.md +4 -4
  87. package/skills/yixiaoer/references/material-resource.md +8 -8
  88. package/skills/yixiaoer/references/platforms/article/toutiaohao.md +28 -28
  89. package/skills/yixiaoer/references/platforms/video/facebook.md +37 -37
  90. package/skills/yixiaoer/references/platforms/video/index.md +7 -7
  91. package/skills/yixiaoer/references/platforms/video/instagram.md +40 -40
  92. package/skills/yixiaoer/references/platforms/video/tiktok.md +50 -50
  93. package/skills/yixiaoer/references/platforms/video/youtube.md +53 -53
  94. package/skills/yixiaoer/references/proxy-management.md +9 -9
  95. package/skills/yixiaoer/references/topic-tags.md +31 -31
  96. package/skills/yixiaoer/references/troubleshooting-guide.md +2 -2
  97. package/skills/yixiaoer/references/update-account-group.md +28 -28
  98. package/skills/yixiaoer/references/upload-resource.md +6 -6
  99. package/skills/yixiaoer/references/usage-workflow.md +3 -5
  100. package/skills/yixiaoer/references/workflows/common-rules.md +29 -29
  101. package/skills/yixiaoer/references/workflows/data-accuracy.md +83 -83
  102. package/skills/yixiaoer/references/workflows/payload-sourcing.md +24 -24
  103. package/skills/yixiaoer/references/workflows/publish-troubleshooting.md +10 -10
  104. package/dist/yxer-darwin-amd64 +0 -0
  105. package/dist/yxer-darwin-arm64 +0 -0
  106. package/dist/yxer-linux-amd64 +0 -0
  107. package/dist/yxer-linux-arm64 +0 -0
  108. package/dist/yxer-windows-amd64.exe +0 -0
  109. package/dist/yxer-windows-arm64.exe +0 -0
  110. package/references/cli/skill-install.md +0 -76
  111. package/skills/yixiaoer/plugin.json +0 -21
  112. package/skills/yixiaoer/references/cli/skill-install.md +0 -65
  113. package/skills/yixiaoer/references/cli-install-uninstall.md +0 -196
@@ -28,16 +28,16 @@ yxer skill sync [--global]
28
28
 
29
29
  ### 账号与资源
30
30
 
31
- ```bash
32
- yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
33
- yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
34
- yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID]
35
- yxer account-group list
36
- yxer account-group create <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
37
- yxer account-group update <group_id> <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
38
- yxer account-group delete <group_id> [--dry-run]
39
- yxer upload --file <file_path> [--bucket cloud-publish|material-library] [--dry-run]
40
- yxer upload --url <resource_url> [--bucket cloud-publish|material-library] [--dry-run]
31
+ ```bash
32
+ yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
33
+ yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
34
+ yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID]
35
+ yxer account-group list
36
+ yxer account-group create <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
37
+ yxer account-group update <group_id> <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
38
+ yxer account-group delete <group_id> [--dry-run]
39
+ yxer upload --file <file_path> [--bucket cloud-publish|material-library] [--dry-run]
40
+ yxer upload --url <resource_url> [--bucket cloud-publish|material-library] [--dry-run]
41
41
  ```
42
42
 
43
43
  ### 发布与校验
@@ -60,22 +60,22 @@ yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>]
60
60
  ```bash
61
61
  yxer query categories <account_id> [--type video|article]
62
62
  yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3]
63
- yxer query music <account_id> [--query 关键词]
64
- yxer query goods <account_id> [--query 关键词]
65
- yxer query collections <account_id> [--type video|article]
66
- yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
67
- yxer query challenges <account_id> [--query 关键词] [--type video]
68
- yxer query records [--platform P] [--limit N] [--status S] [--json]
69
- yxer prepare <platform> <type>
70
- yxer schema fields <platform> <type>
71
- yxer schema get <platform> <type>
72
- ```
73
-
74
- 入口说明:
75
-
76
- - 推荐分组入口:`yxer account-group {list|create|update|delete}`
77
- - 查询类能力统一使用:`yxer query ...`
78
- - 旧的一层查询入口(如 `yxer categories ...`、`yxer records list ...`)已移除。
63
+ yxer query music <account_id> [--query 关键词]
64
+ yxer query goods <account_id> [--query 关键词]
65
+ yxer query collections <account_id> [--type video|article]
66
+ yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
67
+ yxer query challenges <account_id> [--query 关键词] [--type video]
68
+ yxer query records [--platform P] [--limit N] [--status S] [--json]
69
+ yxer prepare <platform> <type>
70
+ yxer schema fields <platform> <type>
71
+ yxer schema get <platform> <type>
72
+ ```
73
+
74
+ 入口说明:
75
+
76
+ - 推荐分组入口:`yxer account-group {list|create|update|delete}`
77
+ - 查询类能力统一使用:`yxer query ...`
78
+ - 旧的一层查询入口(如 `yxer categories ...`、`yxer records list ...`)已移除。
79
79
 
80
80
  ## 基本约束
81
81
 
@@ -95,7 +95,7 @@ yxer schema get <platform> <type>
95
95
  - 本机发布校验时,推荐在 `validate` 阶段就显式传入 `--publish-channel local`;若未显式传入但 payload 中已写 `publishChannel=local`,CLI 也会尝试从默认配置读取 `clientId`
96
96
  - `yxer draft save` 只处理蚁小二内部草稿,不等同于平台草稿箱
97
97
  - `yxer material create` 只做素材登记,前提是资源已经通过 `yxer upload --bucket material-library` 上传
98
- - `yxer material add --file ...` 会自动完成上传和素材登记
98
+ - `yxer material add --file ...` 会自动完成上传和素材登记
99
99
  - 查询类操作可以直接执行
100
100
  - 发布类操作必须遵守“查账号 -> prepare/schema -> 上传资源 -> 查询复杂对象 -> 填 payload -> validate -> publish”顺序
101
101
  - 所有请求字段都必须来自 schema、平台文档或 CLI 返回结果;严禁虚构字段、乱猜枚举、手写 `raw` 对象或编造资源元数据
@@ -206,9 +206,9 @@ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <cl
206
206
 
207
207
  ## 输出约定
208
208
 
209
- - stdout 始终输出 JSON 数据
210
- - stderr 只输出诊断、警告、提示和结构化错误
211
- - 成功输出格式:`ok/action/version/data`
209
+ - stdout 始终输出 JSON 数据
210
+ - stderr 只输出诊断、警告、提示和结构化错误
211
+ - 成功输出格式:`ok/action/version/data`
212
212
  - 失败输出格式:`ok/version/error`
213
213
  - 错误通过统一错误 envelope 输出
214
214
  - `yxer doctor` 可能返回 `_notice.skills`,提示当前 AI skill 与 CLI 版本不同步
@@ -1,27 +1,27 @@
1
- # 创建账号分组
2
-
3
- 用于创建账号分组,对应接口 `POST /groups`。
4
-
5
- ## 推荐命令
6
-
7
- ```bash
8
- yxer account-group create 核心账号组 --dry-run
9
- yxer account-group create 核心账号组
10
- yxer account-group create 核心账号组 --visible-scope all --dry-run
11
- yxer account-group create 核心账号组 --visible-scope specific --visible-user user_1 --visible-user user_2 --dry-run
12
- ```
13
-
14
- ## 请求说明
15
-
16
- - CLI 请求体支持以下字段:
17
- - `name`: 分组名
18
- - `visibleScope`: 可见范围,支持 `all` / `specific`
19
- - `visibleUsers`: 当 `visibleScope=specific` 时必填,表示可见用户 ID 列表
20
- - `--visible-scope specific` 时,必须至少传入一个 `--visible-user <userId>`。
21
- - 当涉及“指定成员可见”时,应先执行 [`yxer query members`](./get-members.md) 获取真实成员 ID,再回填到 `--visible-user`。
22
- - 写操作先执行 `--dry-run`,确认请求体后再正式提交。
23
-
24
- ## 输出说明
25
-
26
- - `--dry-run` 返回预览请求,不产生实际副作用。
27
- - 正式执行返回远端创建结果,字段以 CLI 实际 JSON 输出为准。
1
+ # 创建账号分组
2
+
3
+ 用于创建账号分组,对应接口 `POST /groups`。
4
+
5
+ ## 推荐命令
6
+
7
+ ```bash
8
+ yxer account-group create 核心账号组 --dry-run
9
+ yxer account-group create 核心账号组
10
+ yxer account-group create 核心账号组 --visible-scope all --dry-run
11
+ yxer account-group create 核心账号组 --visible-scope specific --visible-user user_1 --visible-user user_2 --dry-run
12
+ ```
13
+
14
+ ## 请求说明
15
+
16
+ - CLI 请求体支持以下字段:
17
+ - `name`: 分组名
18
+ - `visibleScope`: 可见范围,支持 `all` / `specific`
19
+ - `visibleUsers`: 当 `visibleScope=specific` 时必填,表示可见用户 ID 列表
20
+ - `--visible-scope specific` 时,必须至少传入一个 `--visible-user <userId>`。
21
+ - 当涉及“指定成员可见”时,应先执行 [`yxer query members`](./get-members.md) 获取真实成员 ID,再回填到 `--visible-user`。
22
+ - 写操作先执行 `--dry-run`,确认请求体后再正式提交。
23
+
24
+ ## 输出说明
25
+
26
+ - `--dry-run` 返回预览请求,不产生实际副作用。
27
+ - 正式执行返回远端创建结果,字段以 CLI 实际 JSON 输出为准。
@@ -1,20 +1,20 @@
1
- # 删除账号分组
2
-
3
- 用于删除账号分组,对应接口 `DELETE /groups/{groupId}`。
4
-
5
- ## 推荐命令
6
-
7
- ```bash
8
- yxer account-group delete group_1 --dry-run
9
- yxer account-group delete group_1
10
- ```
11
-
12
- ## 请求说明
13
-
14
- - 路径参数 `groupId` 使用命令第一个位置参数传入。
15
- - 删除前先执行 `--dry-run`,确认目标分组 ID 后再正式提交。
16
-
17
- ## 输出说明
18
-
19
- - `--dry-run` 返回预览请求,不产生实际副作用。
20
- - 正式执行返回远端删除结果;若接口返回空响应,CLI 成功 envelope 中的 `data` 可能为 `null`。
1
+ # 删除账号分组
2
+
3
+ 用于删除账号分组,对应接口 `DELETE /groups/{groupId}`。
4
+
5
+ ## 推荐命令
6
+
7
+ ```bash
8
+ yxer account-group delete group_1 --dry-run
9
+ yxer account-group delete group_1
10
+ ```
11
+
12
+ ## 请求说明
13
+
14
+ - 路径参数 `groupId` 使用命令第一个位置参数传入。
15
+ - 删除前先执行 `--dry-run`,确认目标分组 ID 后再正式提交。
16
+
17
+ ## 输出说明
18
+
19
+ - `--dry-run` 返回预览请求,不产生实际副作用。
20
+ - 正式执行返回远端删除结果;若接口返回空响应,CLI 成功 envelope 中的 `data` 可能为 `null`。
@@ -14,26 +14,26 @@
14
14
  ```bash
15
15
  yxer doctor
16
16
  yxer config get
17
- yxer config init --api-key <apiKey>
18
- yxer config set-local-client-id <clientId>
19
- yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
20
- yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
21
- yxer query account-overviews --platform P [--name 关键词] [--group 分组] [--login-status 1] [--member-id ID] [--page 1] [--size 10]
22
- yxer query content-overviews [--platform P] [--account-id ID] [--publish-user-id ID] [--type video|article|miniVideo|dynamic] [--title 关键词] [--publish-start-time 毫秒] [--publish-end-time 毫秒]
23
- yxer query proxies [--size 9999]
24
- yxer query proxy-areas
25
- yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
26
- yxer skill show
27
- yxer skill sync [--global]
17
+ yxer config init --api-key <apiKey>
18
+ yxer config set-local-client-id <clientId>
19
+ yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
20
+ yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
21
+ yxer query account-overviews --platform P [--name 关键词] [--group 分组] [--login-status 1] [--member-id ID] [--page 1] [--size 10]
22
+ yxer query content-overviews [--platform P] [--account-id ID] [--publish-user-id ID] [--type video|article|miniVideo|dynamic] [--title 关键词] [--publish-start-time 毫秒] [--publish-end-time 毫秒]
23
+ yxer query proxies [--size 9999]
24
+ yxer query proxy-areas
25
+ yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
26
+ yxer skill show
27
+ yxer skill sync [--global]
28
28
  ```
29
29
 
30
30
  ## 规则
31
31
 
32
32
  - 首次使用、环境不明、或失败排查后,先 `yxer doctor`
33
33
  - `doctor` 失败时先修环境,不继续业务流程
34
- - 涉及本机发布前的 `clientId` 判断时,先查询现有配置和账号列表
35
- - `yxer accounts list` 默认查第 `1` 页、每页 `20` 条;传 `--page`、`--size` 可控制单页范围,传 `--all` 时才继续翻页
36
- - `yxer accounts update` 是写操作,正式执行前必须先用同一参数执行 `--dry-run`
37
- - 涉及账号分组的 `visibleUsers`、指定成员可见、按成员挑选负责人时,先执行 `yxer query members` 获取真实成员 ID
38
- - 命中多个账号时,结构化列出候选并让用户确认;只有一个可用账号时可自动选中并说明
39
- - 用户明确说“先不要发布,只查环境/账号”时,完成本域后直接停下,不擅自继续发布流程
34
+ - 涉及本机发布前的 `clientId` 判断时,先查询现有配置和账号列表
35
+ - `yxer accounts list` 默认查第 `1` 页、每页 `20` 条;传 `--page`、`--size` 可控制单页范围,传 `--all` 时才继续翻页
36
+ - `yxer accounts update` 是写操作,正式执行前必须先用同一参数执行 `--dry-run`
37
+ - 涉及账号分组的 `visibleUsers`、指定成员可见、按成员挑选负责人时,先执行 `yxer query members` 获取真实成员 ID
38
+ - 命中多个账号时,结构化列出候选并让用户确认;只有一个可用账号时可自动选中并说明
39
+ - 用户明确说“先不要发布,只查环境/账号”时,完成本域后直接停下,不擅自继续发布流程
@@ -1,37 +1,65 @@
1
1
  # 安装、升级与同步
2
2
 
3
- 适用范围:用户要安装 skill、重新同步、升级 CLI、查看宿主如何接入该技能。
3
+ 适用范围:用户要安装、升级或卸载 CLI / skill,重新同步 skill,或查看宿主如何接入该技能。
4
4
 
5
5
  **CRITICAL - 用户意图是安装、升级或同步时,先完成本域动作,不要跳到发布流程里“顺手再发一次”验证。**
6
6
 
7
- ## 优先读取
7
+ ## 标准安装流程
8
8
 
9
- 1. [`../cli/skill-install.md`](../cli/skill-install.md)
10
- 2. [`../cli-install-uninstall.md`](../cli-install-uninstall.md)
9
+ ```bash
10
+ npm install -g @yixiaoermail/cli
11
+ yxer --version
12
+ yxer config init --api-key <apiKey>
13
+ yxer skill sync
14
+ yxer doctor
15
+ ```
11
16
 
12
- ## 常用命令
17
+ 如果是 SkillHub / skills 市场接入,建议先安装 `skills/yixiaoer-bootstrap`,由它负责:
13
18
 
14
19
  ```bash
15
- yxer skill show
16
- yxer skill sync
20
+ npm install -g @yixiaoermail/cli@latest
17
21
  yxer skill sync --global
18
- yxer --version
22
+ yxer config init --api-key <apiKey>
19
23
  yxer doctor
20
24
  ```
21
25
 
22
- ## 安装命令
26
+ ## 升级流程
23
27
 
24
28
  ```bash
29
+ npm install -g @yixiaoermail/cli
30
+ yxer --version
25
31
  yxer skill sync
26
- yxer skill sync --global
27
- npx skills add "<repo>\\skills\\yixiaoer" -y
28
- npx skills add "<repo>\\skills\\yixiaoer" -g -y
32
+ yxer doctor
33
+ ```
34
+
35
+ ## 卸载流程
36
+
37
+ 优先先卸载 skill,再卸载 CLI。
38
+
39
+ ```bash
40
+ npx skills --help
41
+ npm uninstall -g @yixiaoermail/cli
42
+ ```
43
+
44
+ 如果需要彻底清理本地配置,可按需删除:
45
+
46
+ ```text
47
+ %USERPROFILE%\.yxer\config.json
48
+ %USERPROFILE%\.yxer\skills.stamp
49
+ ```
50
+
51
+ 如果不确定 skill 安装位置,先执行:
52
+
53
+ ```bash
54
+ yxer skill show
29
55
  ```
30
56
 
31
57
  ## 规则
32
58
 
33
- - 如果 CLI 来自 npm 成品包,优先使用 `yxer skill sync`,让本地随包 skill 直接同步到宿主
59
+ - 安装 CLI 时优先使用 `npm install -g @yixiaoermail/cli`
60
+ - CLI 安装后优先使用 `yxer skill sync`,让本地随包 skill 直接同步到宿主
34
61
  - `yxer --version` 升级后,应提示重新同步 skill
35
62
  - `SKILL.md` 或 `references/` 中影响 Agent 行为的文档更新后,应提示重新同步
36
63
  - `yxer doctor` 返回 `_notice.skills` 时,优先执行 `yxer skill sync`
37
64
  - 用户明确说“只想同步 skill / 看安装方法”时,完成本域说明后直接停下
65
+ - 不要引导普通用户从源码构建或手动放置 `yxer.exe`;源码构建只用于研发、测试或 npm 成品包制作
@@ -7,12 +7,12 @@
7
7
 
8
8
  ## 读取顺序
9
9
 
10
- 1. [`../workflows/common-rules.md`](../workflows/common-rules.md)
11
- 2. [`../workflows/data-accuracy.md`](../workflows/data-accuracy.md)
12
- 3. [`../workflows/account-selection.md`](../workflows/account-selection.md)
13
- 4. [`../workflows/local-vs-cloud.md`](../workflows/local-vs-cloud.md)
14
- 5. [`../workflows/payload-sourcing.md`](../workflows/payload-sourcing.md)
15
- 6. 按类型继续读取:
10
+ 1. [`../workflows/common-rules.md`](../workflows/common-rules.md)
11
+ 2. [`../workflows/data-accuracy.md`](../workflows/data-accuracy.md)
12
+ 3. [`../workflows/account-selection.md`](../workflows/account-selection.md)
13
+ 4. [`../workflows/local-vs-cloud.md`](../workflows/local-vs-cloud.md)
14
+ 5. [`../workflows/payload-sourcing.md`](../workflows/payload-sourcing.md)
15
+ 6. 按类型继续读取:
16
16
  - 图文:[`../workflows/publish-imageText.md`](../workflows/publish-imageText.md)
17
17
  - 视频:[`../workflows/publish-video.md`](../workflows/publish-video.md)
18
18
  - 文章:[`../workflows/publish-article.md`](../workflows/publish-article.md)
@@ -35,11 +35,11 @@
35
35
 
36
36
  ## 强制门禁
37
37
 
38
- - 未执行 `yxer doctor` 不进入发布流程
39
- - 未确认 `accounts list` 中账号 `status=1` 不继续
40
- - 未执行 `prepare` / `schema fields` 不组装 payload;只有需要 payload 骨架时再补 `schema get`
41
- - 未按 `data-accuracy.md` 完成动态字段查询和多候选确认,不继续写 payload 或发布
42
- - 未先 `validate` 与 `publish --dry-run` 不执行正式 `publish`
38
+ - 未执行 `yxer doctor` 不进入发布流程
39
+ - 未确认 `accounts list` 中账号 `status=1` 不继续
40
+ - 未执行 `prepare` / `schema fields` 不组装 payload;只有需要 payload 骨架时再补 `schema get`
41
+ - 未按 `data-accuracy.md` 完成动态字段查询和多候选确认,不继续写 payload 或发布
42
+ - 未先 `validate` 与 `publish --dry-run` 不执行正式 `publish`
43
43
 
44
44
  ## 常用命令
45
45
 
@@ -14,9 +14,9 @@
14
14
 
15
15
  ## 2. 错误分类与标准码 (Standardized Error Codes)
16
16
 
17
- 为了准确区分“Agent 使用错误”与“后端系统错误”,所有错误 envelope 必须包含 `error.code` 字段:
18
-
19
- | 错误代码 (`error.code`) | 分类 | 触发场景 |
17
+ 为了准确区分“Agent 使用错误”与“后端系统错误”,所有错误 envelope 必须包含 `error.code` 字段:
18
+
19
+ | 错误代码 (`error.code`) | 分类 | 触发场景 |
20
20
  | :--- | :--- | :--- |
21
21
  | `YIXIAOER_USAGE_ERR` | Agent 侧错误 | 参数缺失、JSON 格式错误、平台枚举值非法、资源未上传即发布。 |
22
22
  | `YIXIAOER_REMOTE_ERR` | 远端 API 错误 | 蚁小二后端返回 4xx/5xx、API Key 失效、配额超限。 |
@@ -67,18 +67,18 @@ Agent 在执行任务时必须遵循以下“分级检索”逻辑:
67
67
  ### 成功响应示例
68
68
  ```json
69
69
  {
70
- "ok": true,
71
- "action": "publish",
72
- "version": "3.1.3",
73
- "data": {
74
- "task_set_id": "TS12345678"
75
- }
76
- }
77
- ```
78
-
79
- ## 6. 错误处理与自检流程 (Error Handling & Self-Diagnosis)
80
-
81
- 当 CLI 执行失败并返回 `ok: false` 时,Agent 或开发者**必须**按照以下顺序进行自检:
70
+ "ok": true,
71
+ "action": "publish",
72
+ "version": "3.1.3",
73
+ "data": {
74
+ "task_set_id": "TS12345678"
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## 6. 错误处理与自检流程 (Error Handling & Self-Diagnosis)
80
+
81
+ 当 CLI 执行失败并返回 `ok: false` 时,Agent 或开发者**必须**按照以下顺序进行自检:
82
82
 
83
83
  ### 第零步:优先匹配避坑指南 (Step 0: Check Troubleshooting Guide)
84
84
  - 在进行任何深度调试前,**必须首先查阅**:[🛡️ 蚁小二 Skill 避坑与故障排查手册](./troubleshooting-guide.md)。
@@ -107,9 +107,9 @@ Agent 在执行任务时必须遵循以下“分级检索”逻辑:
107
107
  - **资源上传专项排查**:在上传阶段如果出现 `SignatureDoesNotMatch` 错误,优先检查 `contentType` 定义是否与上传时的 Header **完全对齐**。Agent 在调用 `action: "upload-resource"` 时传入的 `contentType` 必须与后续 PUT 请求中的 `Content-Type` 字节级一致。
108
108
  - **发布通道与代理校验**:
109
109
  - 若执行发布任务返回“获取在线设备列表失败”或提示“客户端不在线”,原因为选择了 **本机发布 (publishChannel: 'local')** 但环境中未运行蚁小二客户端。建议保持客户端在线,或修改为 **云发布 (publishChannel: 'cloud')**。
110
- - 若**云发布**返回“账号代理不存在”,原因为账号绑定的独立代理 (proxyId) 失效或该平台强制需要代理配置。Agent 应先检查账号的 `proxyId` 或 `kuaidailiArea` 是否设置,并提示用户通过 `yxer accounts update` 绑定新的代理。
110
+ - 若**云发布**返回“账号代理不存在”,原因为账号绑定的独立代理 (proxyId) 失效或该平台强制需要代理配置。Agent 应先检查账号的 `proxyId` 或 `kuaidailiArea` 是否设置,并提示用户通过 `yxer accounts update` 绑定新的代理。
111
111
  - **执行逻辑**:如果怀疑使用了缓存导致的异常,必须清理相关临时文件并严格按照最新技能定义的流程重新执行(如重新执行 `upload` 流程)。
112
- - **草稿处理逻辑 (Draft Selection)**:当涉及“草稿”时,Agent 必须通过语义判断用户是指 **“蚁小二内部草稿”** (`yxer draft save`) 还是 **“发布到平台草稿箱”** (`yxer publish` + `pubType: 0`)。**若语义不明确,Agent 必须询问用户以确认,严禁在未明确用户意图时随意选取一种或默认执行。**
112
+ - **草稿处理逻辑 (Draft Selection)**:当涉及“草稿”时,Agent 必须通过语义判断用户是指 **“蚁小二内部草稿”** (`yxer draft save`) 还是 **“发布到平台草稿箱”** (`yxer publish` + `pubType: 0`)。**若语义不明确,Agent 必须询问用户以确认,严禁在未明确用户意图时随意选取一种或默认执行。**
113
113
  - **平台草稿兼容性补丁**:若用户指定“发布到平台草稿箱”,Agent 遵循以下执行链:
114
114
  1. **pubType 优先**:若平台定义了 `pubType`,使用 `pubType: 0`。
115
115
  2. **visibleType 次之**:若无 `pubType` 但有 `visibleType` (或 `status`/`privacy`),将其设为 **`1` (私密)**。对应的,`0` 表示公开。
@@ -137,7 +137,7 @@ Agent 在执行任务时必须遵循以下“分级检索”逻辑:
137
137
  | **任务卡在发布中/待发布** | 虽然 API 接收了请求,但表单内容不合规导致引擎挂起。 | **规则校验**:检查表单是否严格按照文档规则填入,特别是 `raw` 数据透传。 |
138
138
  | **发布失败:必填项缺失** | 忽略了平台要求的必填核心字段(如标题、分类)。 | **必填项自检**:检查文档中标记为“必填”的字段是否已全部填入。 |
139
139
  | **上传失败/签名不匹配** | `contentType` 在获取上传地址与执行 PUT 时不一致。 | **一致性校验**:必须确保 `action: "upload-resource"` 时传入的 `contentType` 与实际上传一致。 |
140
- | **云发布报错:账号代理不存在** | 账号绑定的独立代理 (`proxyId`) 已失效,或云发布环境未配置代理。 | **修复建议**:通过 `yxer accounts update` 为账号设置 `kuaidailiArea`(内置代理)或有效的 `proxyId`(独立代理)。 |
140
+ | **云发布报错:账号代理不存在** | 账号绑定的独立代理 (`proxyId`) 已失效,或云发布环境未配置代理。 | **修复建议**:通过 `yxer accounts update` 为账号设置 `kuaidailiArea`(内置代理)或有效的 `proxyId`(独立代理)。 |
141
141
 
142
142
  ---
143
143
 
@@ -1,14 +1,14 @@
1
- # 获取账号分组列表
2
-
3
- 用于查询账号分组列表,对应接口 `GET /groups`。
4
-
5
- ## 推荐命令
6
-
7
- ```bash
8
- yxer account-group list
9
- ```
10
-
11
- ## 输出说明
12
-
13
- - 返回账号分组列表。
14
- - 具体字段以 CLI 实际 JSON 输出为准,Agent 应直接消费返回结果,不要手写分组对象。
1
+ # 获取账号分组列表
2
+
3
+ 用于查询账号分组列表,对应接口 `GET /groups`。
4
+
5
+ ## 推荐命令
6
+
7
+ ```bash
8
+ yxer account-group list
9
+ ```
10
+
11
+ ## 输出说明
12
+
13
+ - 返回账号分组列表。
14
+ - 具体字段以 CLI 实际 JSON 输出为准,Agent 应直接消费返回结果,不要手写分组对象。
@@ -1,28 +1,28 @@
1
- # 获取成员列表
2
-
3
- 用于查询团队成员列表,对应接口 `GET /members`。
4
-
5
- ## 推荐命令
6
-
7
- ```bash
8
- yxer query members
9
- yxer query members --status joined --query 张三
10
- yxer query members --role member --page 1 --size 10
11
- ```
12
-
13
- ## 请求说明
14
-
15
- - 支持分页参数:`--page`、`--size`
16
- - 支持成员状态过滤:`--status notJoined|pending|joined`
17
- - 支持成员角色过滤:`--role master|admin|member`
18
- - 支持按成员名称或手机号搜索:`--query`(`--keyword` 为别名)
19
-
20
- ## 使用建议
21
-
22
- - 当账号分组需要填写 `visibleUsers`、或用户说“指定成员可见”时,应先执行 `yxer query members` 获取真实成员 ID。
23
- - `visibleUsers` 必须直接使用 CLI 返回结果中的真实用户 ID,不要手写或猜测。
24
-
25
- ## 输出说明
26
-
27
- - 返回成员列表。
28
- - 具体字段以 CLI 实际 JSON 输出为准,Agent 应直接消费返回结果,不要手写成员对象。
1
+ # 获取成员列表
2
+
3
+ 用于查询团队成员列表,对应接口 `GET /members`。
4
+
5
+ ## 推荐命令
6
+
7
+ ```bash
8
+ yxer query members
9
+ yxer query members --status joined --query 张三
10
+ yxer query members --role member --page 1 --size 10
11
+ ```
12
+
13
+ ## 请求说明
14
+
15
+ - 支持分页参数:`--page`、`--size`
16
+ - 支持成员状态过滤:`--status notJoined|pending|joined`
17
+ - 支持成员角色过滤:`--role master|admin|member`
18
+ - 支持按成员名称或手机号搜索:`--query`(`--keyword` 为别名)
19
+
20
+ ## 使用建议
21
+
22
+ - 当账号分组需要填写 `visibleUsers`、或用户说“指定成员可见”时,应先执行 `yxer query members` 获取真实成员 ID。
23
+ - `visibleUsers` 必须直接使用 CLI 返回结果中的真实用户 ID,不要手写或猜测。
24
+
25
+ ## 输出说明
26
+
27
+ - 返回成员列表。
28
+ - 具体字段以 CLI 实际 JSON 输出为准,Agent 应直接消费返回结果,不要手写成员对象。
@@ -56,7 +56,7 @@ go build -o bin/yxer.exe .
56
56
 
57
57
  ```text
58
58
  release/
59
- yxer-windows-amd64/
59
+ yxer-cli-<version>-windows-amd64/
60
60
  yxer.exe
61
61
  README.md
62
62
  skills/yixiaoer/references/
@@ -110,7 +110,6 @@ bin\yxer.exe skill sync --global
110
110
  - `yxer.exe`
111
111
  - `README.md`
112
112
  - `skills/yixiaoer/references/go-live-process.md`
113
- - `skills/yixiaoer/references/cli-install-uninstall.md`
114
113
  - `skills/yixiaoer/references/usage-workflow.md`
115
114
  - `skills/yixiaoer/references/keyword-reference.md`
116
115
  - `skills/yixiaoer/SKILL.md`
@@ -120,24 +119,17 @@ bin\yxer.exe skill sync --global
120
119
 
121
120
  ## 4. 建议交付方式
122
121
 
123
- 当前仓库尚未提供自动下载新版 CLI 二进制的能力,因此推荐以下两种方式之一:
122
+ 用户侧统一通过 npm 成品包安装 CLI:
124
123
 
125
- ### 方式 A:源码构建交付
126
-
127
- 适用于研发或内测环境:
128
-
129
- 1. 拉取指定版本代码
130
- 2. 执行 `go build -o bin/yxer.exe .`
131
- 3. 按文档安装 skill
132
-
133
- ### 方式 B:制品包交付
134
-
135
- 适用于正式上线或给业务同学分发:
124
+ ```bash
125
+ npm install -g @yixiaoermail/cli
126
+ yxer --version
127
+ yxer config init --api-key <apiKey>
128
+ yxer skill sync
129
+ yxer doctor
130
+ ```
136
131
 
137
- 1. 由发布人员构建 `yxer.exe`
138
- 2. 打包 `yxer.exe + skills/yixiaoer + references + docs + schemas`
139
- 3. 上传到内部制品库、网盘或发布平台
140
- 4. 给使用方发固定版本下载地址
132
+ 源码构建仅用于研发、测试或 npm 成品包制作,不作为普通用户安装入口。
141
133
 
142
134
  ## 5. 回滚流程
143
135
 
@@ -163,6 +155,6 @@ bin\yxer.exe skill sync --global
163
155
 
164
156
  ## 7. 风险提示
165
157
 
166
- - 当前项目没有“自动下载最新 CLI”的能力,版本升级仍以源码构建或制品分发为主
158
+ - 用户环境依赖 npm 全局安装 `@yixiaoermail/cli`
167
159
  - Skill 的实际执行依赖外部 `npx skills add` 工具,目标环境必须具备 Node.js 和 `npx`
168
160
  - 若只替换 `yxer.exe` 但未同步 skill,AI agent 可能继续使用旧规则
@@ -16,12 +16,12 @@
16
16
 
17
17
  | 关键词 | 推荐理解 |
18
18
  | --- | --- |
19
- | 下载 CLI | 获取 `yxer.exe`,来源可以是源码构建或制品包 |
20
- | 安装 CLI | 放置 `yxer.exe` 到本地目录并加入 `PATH` |
19
+ | 下载 CLI | 通过 `npm install -g @yixiaoermail/cli` 安装 npm 成品包 |
20
+ | 安装 CLI | 执行 `npm install -g @yixiaoermail/cli` 并验证 `yxer --version` |
21
21
  | 安装 skill | 执行 `npx skills add "<repo>\\skills\\yixiaoer" -y` |
22
22
  | 同步 skill | 执行 `yxer skill sync`,让 skill 版本与 CLI 对齐 |
23
- | 升级 CLI | 重新构建或替换新版 `yxer.exe` |
24
- | 卸载 CLI | 删除 `yxer.exe`、移除 `PATH`、按需清理 `.yxer` 配置 |
23
+ | 升级 CLI | 重新执行 `npm install -g @yixiaoermail/cli` |
24
+ | 卸载 CLI | 执行 `npm uninstall -g @yixiaoermail/cli`,按需清理 `.yxer` 配置 |
25
25
  | 卸载 skill | 删除 AI 宿主中的 `yixiaoer` 技能安装,并清理 `skills.stamp` |
26
26
 
27
27
  ## 3. 发布能力关键词
@@ -9,8 +9,8 @@
9
9
  - “我的宣传片已经传好了,帮我入库”
10
10
  - “将这个 Key 对应的图片登记到素材管理中”
11
11
 
12
- > [!TIP]
13
- > 当用户意图是“把文件放进素材库”,直接使用:
12
+ > [!TIP]
13
+ > 当用户意图是“把文件放进素材库”,直接使用:
14
14
  >
15
15
  > ```bash
16
16
  > yxer material add --file ./demo.mp4
@@ -38,12 +38,12 @@
38
38
  1. **链路检查**:确认资源是否已通过 `upload` 动作上传(建议使用 `bucket: "material-library"`)。
39
39
  2. **元数据提取**:识别文件的真实名称、宽高及类型。
40
40
  3. **参数装配**:构造 `action: "material"` 及完整元数据。
41
- 4. **指令执行**:调用 `yxer material add --file ...`;只有高级定制时再拆分成 `upload + material create`。
41
+ 4. **指令执行**:调用 `yxer material add --file ...`;只有高级定制时再拆分成 `upload + material create`。
42
42
  5. **入库反馈**:向用户确认素材 ID 及入库成功状态。
43
43
 
44
- ## 执行链路
45
-
46
- 1. 直接使用:
44
+ ## 执行链路
45
+
46
+ 1. 直接使用:
47
47
 
48
48
  ```bash
49
49
  yxer material add --file ./demo.mp4
@@ -59,13 +59,13 @@ yxer material add --file ./demo.mp4
59
59
  yxer material create material-payload.json
60
60
  ```
61
61
 
62
- 也可直接上传并登记:
62
+ 也可直接上传并登记:
63
63
 
64
64
  ```bash
65
65
  yxer material add --file ./demo.mp4
66
66
  ```
67
67
 
68
- 如需手工控制资源 key 或缩略图,先执行:
68
+ 如需手工控制资源 key 或缩略图,先执行:
69
69
 
70
70
  ```bash
71
71
  yxer upload ./demo.mp4 --bucket material-library