@yixiaoermail/cli 3.2.3 → 3.2.6

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 (244) hide show
  1. package/bin/install.js +46 -2
  2. package/bin/yxer.js +31 -2
  3. package/checksums.txt +6 -6
  4. package/package.json +1 -1
  5. package/references/cli/command-design.md +1 -1
  6. package/references/cli/command-reference.md +30 -39
  7. package/references/cli/publish-channels.md +77 -0
  8. package/references/create-account-group.md +27 -0
  9. package/references/delete-account-group.md +20 -0
  10. package/references/domains/accounts-and-env.md +43 -0
  11. package/references/domains/draft-and-material.md +34 -0
  12. package/references/domains/install-and-sync.md +63 -0
  13. package/references/domains/publish.md +84 -0
  14. package/references/domains/troubleshooting.md +34 -0
  15. package/references/execution-standard.md +144 -0
  16. package/references/get-account-groups.md +15 -0
  17. package/references/get-account-overviews.md +56 -0
  18. package/references/get-challenges.md +14 -0
  19. package/references/get-collections.md +34 -0
  20. package/references/get-content-overviews.md +59 -0
  21. package/references/get-friends.md +9 -0
  22. package/references/get-games.md +39 -0
  23. package/references/get-goods.md +42 -0
  24. package/references/get-groups.md +35 -0
  25. package/references/get-hot-events.md +14 -0
  26. package/references/get-locations.md +48 -0
  27. package/references/get-members.md +28 -0
  28. package/references/get-miniapps.md +38 -0
  29. package/references/get-music-categories.md +41 -0
  30. package/references/get-music.md +67 -0
  31. package/references/get-publish-activities.md +40 -0
  32. package/references/get-publish-categories.md +62 -0
  33. package/references/get-sync-apps.md +14 -0
  34. package/references/get-topics.md +13 -0
  35. package/references/go-live-process.md +160 -0
  36. package/references/keyword-reference.md +114 -0
  37. package/references/legacy/capabilities.md +1 -1
  38. package/references/material-resource.md +88 -0
  39. package/references/platform-doc-maintenance.md +33 -0
  40. package/references/platform.md +62 -0
  41. package/references/platforms/article/acfun.md +90 -0
  42. package/references/platforms/article/aiqiyi.md +56 -0
  43. package/references/platforms/article/baijiahao.md +94 -0
  44. package/references/platforms/article/bilibili.md +88 -0
  45. package/references/platforms/article/chejiahao.md +81 -0
  46. package/references/platforms/article/csdn.md +86 -0
  47. package/references/platforms/article/dayuhao.md +78 -0
  48. package/references/platforms/article/douban.md +62 -0
  49. package/references/platforms/article/douyin.md +106 -0
  50. package/references/platforms/article/index.md +157 -0
  51. package/references/platforms/article/jianshu.md +58 -0
  52. package/references/platforms/article/kuaichuanhao.md +78 -0
  53. package/references/platforms/article/qiehao.md +78 -0
  54. package/references/platforms/article/souhuhao.md +75 -0
  55. package/references/platforms/article/toutiaohao.md +78 -0
  56. package/references/platforms/article/wangyihao.md +79 -0
  57. package/references/platforms/article/weixingongzhonghao.md +135 -0
  58. package/references/platforms/article/xinlangweibo.md +75 -0
  59. package/references/platforms/article/xueqiuhao.md +73 -0
  60. package/references/platforms/article/yichehao.md +92 -0
  61. package/references/platforms/article/yidianhao.md +76 -0
  62. package/references/platforms/article/zhihu.md +75 -0
  63. package/references/platforms/imageText/baijiahao.md +102 -0
  64. package/references/platforms/imageText/douyin.md +111 -0
  65. package/references/platforms/imageText/index.md +113 -0
  66. package/references/platforms/imageText/kuaishou.md +106 -0
  67. package/references/platforms/imageText/shipinhao.md +112 -0
  68. package/references/platforms/imageText/toutiaohao.md +76 -0
  69. package/references/platforms/imageText/xiaohongshu.md +85 -0
  70. package/references/platforms/imageText/xinlangweibo.md +77 -0
  71. package/references/platforms/imageText/zhihu.md +92 -0
  72. package/references/platforms/index.md +6 -6
  73. package/references/platforms/video/acfun.md +82 -0
  74. package/references/platforms/video/aiqiyi.md +89 -0
  75. package/references/platforms/video/baijiahao.md +89 -0
  76. package/references/platforms/video/bilibili-open.md +59 -0
  77. package/references/platforms/video/bilibili.md +80 -0
  78. package/references/platforms/video/chejiahao.md +63 -0
  79. package/references/platforms/video/dayuhao.md +91 -0
  80. package/references/platforms/video/dewu.md +80 -0
  81. package/references/platforms/video/douyin.md +173 -0
  82. package/references/platforms/video/duoduoshipin.md +64 -0
  83. package/references/platforms/video/facebook.md +37 -0
  84. package/references/platforms/video/fengwang.md +81 -0
  85. package/references/platforms/video/index.md +173 -0
  86. package/references/platforms/video/instagram.md +40 -0
  87. package/references/platforms/video/kuaishou-open.md +44 -0
  88. package/references/platforms/video/kuaishou.md +77 -0
  89. package/references/platforms/video/meipai.md +79 -0
  90. package/references/platforms/video/meiyou.md +59 -0
  91. package/references/platforms/video/pipixia.md +58 -0
  92. package/references/platforms/video/qiehao.md +91 -0
  93. package/references/platforms/video/shipinhao.md +100 -0
  94. package/references/platforms/video/souhuhao.md +91 -0
  95. package/references/platforms/video/souhushipin.md +64 -0
  96. package/references/platforms/video/tengxunshipin.md +63 -0
  97. package/references/platforms/video/tiktok.md +50 -0
  98. package/references/platforms/video/toutiaohao.md +66 -0
  99. package/references/platforms/video/wangyihao.md +93 -0
  100. package/references/platforms/video/weishi.md +61 -0
  101. package/references/platforms/video/xiaohongshu.md +133 -0
  102. package/references/platforms/video/xiaohongshushop.md +92 -0
  103. package/references/platforms/video/xinlangweibo.md +79 -0
  104. package/references/platforms/video/yichehao.md +61 -0
  105. package/references/platforms/video/yidianhao.md +85 -0
  106. package/references/platforms/video/youtube.md +53 -0
  107. package/references/platforms/video/zhihu.md +85 -0
  108. package/references/protocols/confirmation.md +62 -0
  109. package/references/protocols/error-recovery.md +50 -0
  110. package/references/protocols/execution.md +65 -0
  111. package/references/protocols/provenance.md +61 -0
  112. package/references/proxy-management.md +69 -0
  113. package/references/query-accounts.md +85 -0
  114. package/references/save-draft.md +75 -0
  115. package/references/topic-tags.md +140 -0
  116. package/references/troubleshooting-guide.md +105 -0
  117. package/references/update-account-group.md +28 -0
  118. package/references/upload-resource.md +70 -0
  119. package/references/usage-workflow.md +207 -0
  120. package/references/workflows/common-rules.md +57 -27
  121. package/references/workflows/data-accuracy.md +83 -0
  122. package/references/workflows/local-vs-cloud.md +12 -5
  123. package/references/workflows/payload-sourcing.md +3 -0
  124. package/references/workflows/publish-article.md +5 -3
  125. package/references/workflows/publish-imageText.md +5 -3
  126. package/references/workflows/publish-troubleshooting.md +1 -1
  127. package/references/workflows/publish-video.md +6 -4
  128. package/references/yixiaoer-shared.md +106 -0
  129. package/schemas/platforms/acfun.article.schema.json +9 -9
  130. package/schemas/platforms/baijiahao.article.schema.json +8 -0
  131. package/schemas/platforms/baijiahao.video.schema.json +19 -2
  132. package/schemas/platforms/bilibili-open.video.schema.json +188 -0
  133. package/schemas/platforms/chejiahao.article.schema.json +7 -7
  134. package/schemas/platforms/dayuhao.video.schema.json +26 -0
  135. package/schemas/platforms/douyin.article.schema.json +8 -0
  136. package/schemas/platforms/douyin.imageText.schema.json +16 -2
  137. package/schemas/platforms/douyin.video.schema.json +88 -6
  138. package/schemas/platforms/kuaichuanhao.article.schema.json +20 -8
  139. package/schemas/platforms/kuaishou-open.video.schema.json +102 -0
  140. package/schemas/platforms/kuaishou.imageText.schema.json +12 -2
  141. package/schemas/platforms/kuaishou.video.schema.json +31 -0
  142. package/schemas/platforms/shipinhao.imageText.schema.json +13 -1
  143. package/schemas/platforms/shipinhao.video.schema.json +31 -0
  144. package/schemas/platforms/souhushipin.video.schema.json +3 -3
  145. package/schemas/platforms/tengxunshipin.video.schema.json +1 -0
  146. package/schemas/platforms/toutiaohao.imageText.schema.json +2 -1
  147. package/schemas/platforms/toutiaohao.video.schema.json +2 -1
  148. package/schemas/platforms/wangyihao.article.schema.json +6 -5
  149. package/schemas/platforms/wangyihao.video.schema.json +1 -0
  150. package/schemas/platforms/xhs.imageText.schema.json +27 -25
  151. package/schemas/platforms/xiaohongshu.video.schema.json +2 -1
  152. package/schemas/platforms/xinlang.imageText.schema.json +23 -2
  153. package/schemas/platforms/xinlang.video.schema.json +40 -10
  154. package/schemas/platforms/yidianhao.article.schema.json +1 -0
  155. package/schemas/platforms/yidianhao.video.schema.json +9 -8
  156. package/skills/yixiaoer/SKILL.md +30 -4
  157. package/skills/yixiaoer/references/cli/command-design.md +305 -0
  158. package/skills/yixiaoer/references/cli/command-reference.md +21 -8
  159. package/skills/yixiaoer/references/cli/publish-channels.md +77 -0
  160. package/skills/yixiaoer/references/domains/accounts-and-env.md +6 -2
  161. package/skills/yixiaoer/references/domains/draft-and-material.md +8 -3
  162. package/skills/yixiaoer/references/domains/install-and-sync.md +5 -7
  163. package/skills/yixiaoer/references/domains/publish.md +17 -10
  164. package/skills/yixiaoer/references/domains/troubleshooting.md +6 -2
  165. package/skills/yixiaoer/references/get-account-groups.md +2 -1
  166. package/skills/yixiaoer/references/go-live-process.md +2 -2
  167. package/skills/yixiaoer/references/keyword-reference.md +3 -2
  168. package/skills/yixiaoer/references/legacy/capabilities.md +37 -0
  169. package/skills/yixiaoer/references/platform.md +2 -1
  170. package/skills/yixiaoer/references/platforms/article/acfun.md +1 -1
  171. package/skills/yixiaoer/references/platforms/article/aiqiyi.md +1 -1
  172. package/skills/yixiaoer/references/platforms/article/baijiahao.md +1 -1
  173. package/skills/yixiaoer/references/platforms/article/bilibili.md +1 -1
  174. package/skills/yixiaoer/references/platforms/article/chejiahao.md +1 -1
  175. package/skills/yixiaoer/references/platforms/article/csdn.md +1 -1
  176. package/skills/yixiaoer/references/platforms/article/dayuhao.md +1 -1
  177. package/skills/yixiaoer/references/platforms/article/douban.md +1 -1
  178. package/skills/yixiaoer/references/platforms/article/douyin.md +1 -1
  179. package/skills/yixiaoer/references/platforms/article/index.md +2 -2
  180. package/skills/yixiaoer/references/platforms/article/jianshu.md +1 -1
  181. package/skills/yixiaoer/references/platforms/article/kuaichuanhao.md +1 -1
  182. package/skills/yixiaoer/references/platforms/article/qiehao.md +1 -1
  183. package/skills/yixiaoer/references/platforms/article/souhuhao.md +1 -1
  184. package/skills/yixiaoer/references/platforms/article/toutiaohao.md +1 -1
  185. package/skills/yixiaoer/references/platforms/article/wangyihao.md +1 -1
  186. package/skills/yixiaoer/references/platforms/article/weixingongzhonghao.md +1 -1
  187. package/skills/yixiaoer/references/platforms/article/xinlangweibo.md +1 -1
  188. package/skills/yixiaoer/references/platforms/article/xueqiuhao.md +1 -1
  189. package/skills/yixiaoer/references/platforms/article/yichehao.md +1 -1
  190. package/skills/yixiaoer/references/platforms/article/yidianhao.md +1 -1
  191. package/skills/yixiaoer/references/platforms/article/zhihu.md +1 -1
  192. package/skills/yixiaoer/references/platforms/imageText/baijiahao.md +1 -1
  193. package/skills/yixiaoer/references/platforms/imageText/douyin.md +1 -1
  194. package/skills/yixiaoer/references/platforms/imageText/index.md +5 -8
  195. package/skills/yixiaoer/references/platforms/imageText/kuaishou.md +1 -1
  196. package/skills/yixiaoer/references/platforms/imageText/shipinhao.md +4 -17
  197. package/skills/yixiaoer/references/platforms/imageText/toutiaohao.md +1 -1
  198. package/skills/yixiaoer/references/platforms/imageText/xiaohongshu.md +4 -7
  199. package/skills/yixiaoer/references/platforms/imageText/xinlangweibo.md +1 -1
  200. package/skills/yixiaoer/references/platforms/imageText/zhihu.md +1 -1
  201. package/skills/yixiaoer/references/platforms/video/acfun.md +1 -1
  202. package/skills/yixiaoer/references/platforms/video/aiqiyi.md +1 -1
  203. package/skills/yixiaoer/references/platforms/video/baijiahao.md +1 -1
  204. package/skills/yixiaoer/references/platforms/video/bilibili-open.md +33 -61
  205. package/skills/yixiaoer/references/platforms/video/bilibili.md +1 -1
  206. package/skills/yixiaoer/references/platforms/video/chejiahao.md +1 -1
  207. package/skills/yixiaoer/references/platforms/video/dayuhao.md +3 -1
  208. package/skills/yixiaoer/references/platforms/video/dewu.md +1 -1
  209. package/skills/yixiaoer/references/platforms/video/douyin.md +41 -11
  210. package/skills/yixiaoer/references/platforms/video/duoduoshipin.md +1 -1
  211. package/skills/yixiaoer/references/platforms/video/fengwang.md +1 -1
  212. package/skills/yixiaoer/references/platforms/video/index.md +6 -2
  213. package/skills/yixiaoer/references/platforms/video/kuaishou-open.md +20 -39
  214. package/skills/yixiaoer/references/platforms/video/kuaishou.md +1 -1
  215. package/skills/yixiaoer/references/platforms/video/meipai.md +1 -1
  216. package/skills/yixiaoer/references/platforms/video/meiyou.md +1 -1
  217. package/skills/yixiaoer/references/platforms/video/pipixia.md +1 -1
  218. package/skills/yixiaoer/references/platforms/video/qiehao.md +1 -1
  219. package/skills/yixiaoer/references/platforms/video/shipinhao.md +7 -2
  220. package/skills/yixiaoer/references/platforms/video/souhuhao.md +1 -1
  221. package/skills/yixiaoer/references/platforms/video/souhushipin.md +1 -1
  222. package/skills/yixiaoer/references/platforms/video/tengxunshipin.md +1 -1
  223. package/skills/yixiaoer/references/platforms/video/toutiaohao.md +1 -1
  224. package/skills/yixiaoer/references/platforms/video/wangyihao.md +1 -1
  225. package/skills/yixiaoer/references/platforms/video/weishi.md +1 -1
  226. package/skills/yixiaoer/references/platforms/video/xiaohongshu.md +1 -1
  227. package/skills/yixiaoer/references/platforms/video/xiaohongshushop.md +1 -1
  228. package/skills/yixiaoer/references/platforms/video/xinlangweibo.md +1 -1
  229. package/skills/yixiaoer/references/platforms/video/yichehao.md +1 -1
  230. package/skills/yixiaoer/references/platforms/video/yidianhao.md +1 -1
  231. package/skills/yixiaoer/references/platforms/video/zhihu.md +1 -1
  232. package/skills/yixiaoer/references/protocols/confirmation.md +62 -0
  233. package/skills/yixiaoer/references/protocols/error-recovery.md +50 -0
  234. package/skills/yixiaoer/references/protocols/execution.md +65 -0
  235. package/skills/yixiaoer/references/protocols/provenance.md +61 -0
  236. package/skills/yixiaoer/references/upload-resource.md +7 -0
  237. package/skills/yixiaoer/references/usage-workflow.md +1 -1
  238. package/skills/yixiaoer/references/workflows/common-rules.md +37 -16
  239. package/skills/yixiaoer/references/workflows/local-vs-cloud.md +12 -5
  240. package/skills/yixiaoer/references/workflows/publish-troubleshooting.md +1 -1
  241. package/skills/yixiaoer/references/workflows/publish-video.md +1 -1
  242. package/skills/yixiaoer/references/yixiaoer-shared.md +20 -9
  243. package/skills/yixiaoer/references/platforms/get-locations.md +0 -5
  244. package/skills/yixiaoer/references/platforms/imageText/weixinshipinhao.md +0 -7
@@ -21,13 +21,17 @@
21
21
  - 必须显式带 `--publish-channel local`
22
22
  - 必须确认 `clientId`
23
23
  - `validate`、`publish --dry-run`、正式 `publish` 必须保持同一套通道参数
24
+ - 通道只在当前命令执行时解析一次;最终以 CLI 返回的 `publishChannel` 为准,不要根据服务端默认值猜测
24
25
 
25
- ## clientId 获取顺序
26
+ ## clientId 获取方式
26
27
 
27
- 1. payload 中已有 `clientId`
28
- 2. 显式 flags:`--client-id <clientId>`
29
- 3. 第四个位置参数:`yxer publish <type> <platform> <payload.json> <clientId>`
30
- 4. 本地默认配置:`yxer config set-local-client-id <clientId>`
28
+ 1. 显式 flags:`--client-id <clientId>`
29
+ 2. 本地默认配置:`yxer config set-local-client-id <clientId>`
30
+ 3. payload 中已有 `clientId`
31
+
32
+ 第四个位置参数 `yxer publish <type> <platform> <payload.json> <clientId>` 只用于旧版兼容,不再推荐 Agent 使用。
33
+
34
+ 通道和 clientId 的优先级为:显式 flag > 旧版第四位置参数 > payload > 本地配置(仅 local 的 clientId)> 默认 cloud。cloud 发布会主动移除 clientId,避免把本机连接信息误带到云端。
31
35
 
32
36
  ## 推荐命令
33
37
 
@@ -38,10 +42,13 @@ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <cl
38
42
  yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId>
39
43
  ```
40
44
 
45
+ `publish --dry-run` 的 `data.meta` 会返回 `effectivePublishChannel`、`publishChannelSource`、`clientIdSource` 和 `requestHash`。正式发布前应确认这些值与授权意图一致;`requestHash` 用于确认 validate、dry-run 和最终 payload 没有被中途替换。
46
+
41
47
  ## 回退策略
42
48
 
43
49
  - 云发布报“账号代理不存在”:提示检查代理配置,或改走本机发布
44
50
  - 本机发布报“客户端不在线”或“获取在线设备列表失败”:提示用户启动并登录客户端,或改回云发布
51
+ - 不默认使用 `--auto-fallback-local`;该参数只在用户明确授权自动切换通道时使用
45
52
 
46
53
  ## 严禁行为
47
54
 
@@ -11,6 +11,8 @@
11
11
 
12
12
  ## 字段来源优先级
13
13
 
14
+ 字段选择、候选确认和写入门禁必须同时遵守 [`data-accuracy.md`](./data-accuracy.md)。
15
+
14
16
  1. `yxer prepare <platform> <type>`:确认表单项、前置数据、账号能力
15
17
  2. 优先执行 `yxer schema fields <platform> <type>`:确认字段名、类型、必填项;需要完整层级骨架时再执行 `yxer schema get <platform> <type>`
16
18
  3. 查询命令:补充动态对象,如 `category`、`location`、`music`、`collection`、`challenge`、`goods`
@@ -75,3 +77,4 @@
75
77
  - 直接把平台表单字段写到顶层
76
78
  - 动态字段只填 ID 或名称、不填合法对象
77
79
  - 手工伪造上传资源元数据
80
+ - 查询结果存在多个候选时,不经用户确认直接采用第一项
@@ -20,6 +20,7 @@ yxer schema get <platform> article
20
20
  - [`account-selection.md`](./account-selection.md)
21
21
  - [`local-vs-cloud.md`](./local-vs-cloud.md)
22
22
  - [`payload-sourcing.md`](./payload-sourcing.md)
23
+ - 涉及话题/标签时:[`../topic-tags.md`](../topic-tags.md)
23
24
 
24
25
  ## 执行顺序
25
26
 
@@ -30,7 +31,7 @@ yxer schema get <platform> article
30
31
  5. 如正文含图片,先逐张上传并替换引用
31
32
  6. 按需查询分类、位置、话题
32
33
  7. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
33
- 8. 查阅对应平台文档:`skills/yixiaoer/references/platforms/article/`
34
+ 8. 查阅对应平台文档:`../platforms/article/`
34
35
  9. 执行校验:`yxer validate <platform> article <payload.json>`
35
36
  10. 正式发布:`yxer publish article <platform> <payload.json>`
36
37
 
@@ -39,6 +40,7 @@ yxer schema get <platform> article
39
40
  - 发布前必须确认目标账号 `status=1`
40
41
  - 文章必须有封面,未提供时必须补问
41
42
  - 文章正文中的图片不能直接引用外部 URL,必须先上传
43
+ - 话题/标签必须直接按 `../topic-tags.md` 的目标格式传入;有 `topics` 就直接传结构化对象,不要依赖 CLI 改写正文
42
44
  - 文章分类通常必须选到叶子节点
43
45
  - 发布前先看 `prepare` 和 `schema fields` 返回的字段;只有要确认完整骨架时再看 `schema get`
44
46
  - `payload.json` 必须使用统一标准结构:顶层 `publishArgs`
@@ -62,5 +64,5 @@ yxer publish article 百家号 .\payload.json --publish-channel local --client-i
62
64
 
63
65
  ## 平台文档入口
64
66
 
65
- - 索引:`skills/yixiaoer/references/platforms/article/index.md`
66
- - 平台细节:`skills/yixiaoer/references/platforms/article/*.md`
67
+ - 索引:`../platforms/article/index.md`
68
+ - 平台细节:`../platforms/article/*.md`
@@ -20,6 +20,7 @@ yxer schema get <platform> imageText
20
20
  - [`account-selection.md`](./account-selection.md)
21
21
  - [`local-vs-cloud.md`](./local-vs-cloud.md)
22
22
  - [`payload-sourcing.md`](./payload-sourcing.md)
23
+ - 涉及话题/标签时:[`../topic-tags.md`](../topic-tags.md)
23
24
 
24
25
  ## 执行顺序
25
26
 
@@ -29,7 +30,7 @@ yxer schema get <platform> imageText
29
30
  4. 逐张上传图片:`yxer upload <文件路径或URL>`
30
31
  5. 按需查询分类、位置、音乐、合集、话题、商品
31
32
  6. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
32
- 7. 查阅对应平台文档:`skills/yixiaoer/references/platforms/imageText/`
33
+ 7. 查阅对应平台文档:`../platforms/imageText/`
33
34
  8. 执行校验:`yxer validate <platform> imageText <payload.json>`
34
35
  9. 正式发布:`yxer publish imageText <platform> <payload.json>`
35
36
 
@@ -38,6 +39,7 @@ yxer schema get <platform> imageText
38
39
  - 发布前必须确认目标账号 `status=1`
39
40
  - 每张图片都要单独上传,封面默认取第一张图
40
41
  - 复杂对象必须通过查询命令获取完整对象,不要手写 `raw`
42
+ - 话题/标签必须直接按 `../topic-tags.md` 的目标格式传入;需要 `<topic>` HTML 时由 Agent 直接写最终内容
41
43
  - 发布前先看 `prepare` 和 `schema fields` 返回的字段;只有要确认完整骨架时再看 `schema get`
42
44
  - `payload.json` 必须使用统一标准结构:顶层 `publishArgs`,业务字段放在 `publishArgs.accountForms[].contentPublishForm`
43
45
  - 多平台发布时,必须逐个平台分别执行完整流程
@@ -58,5 +60,5 @@ yxer publish imageText 抖音 .\payload.json --publish-channel local --client-id
58
60
 
59
61
  ## 平台文档入口
60
62
 
61
- - 索引:`skills/yixiaoer/references/platforms/imageText/index.md`
62
- - 平台细节:`skills/yixiaoer/references/platforms/imageText/*.md`
63
+ - 索引:`../platforms/imageText/index.md`
64
+ - 平台细节:`../platforms/imageText/*.md`
@@ -47,7 +47,7 @@ yxer validate 抖音 video .\payload.json
47
47
 
48
48
  - 排查优先读错误信息和记录,不要先重写 payload
49
49
  - 若错误发生在 `validate`,不要跳过它直接重试 `publish`
50
- - 若用户给的是历史任务,先看 `records list`,不要立刻重新发布
50
+ - 若用户给的是历史任务,先看 `yxer query records`,不要立刻重新发布
51
51
 
52
52
  ## 严禁行为
53
53
 
@@ -20,6 +20,7 @@ yxer schema get <platform> video
20
20
  - [`account-selection.md`](./account-selection.md)
21
21
  - [`local-vs-cloud.md`](./local-vs-cloud.md)
22
22
  - [`payload-sourcing.md`](./payload-sourcing.md)
23
+ - 涉及话题/标签时:[`../topic-tags.md`](../topic-tags.md)
23
24
 
24
25
  ## 执行顺序
25
26
 
@@ -27,10 +28,10 @@ yxer schema get <platform> video
27
28
  2. 获取前置数据:`yxer prepare <platform> video`
28
29
  3. 先获取字段视图:`yxer schema fields <platform> video`;需要 payload 骨架时再执行 `yxer schema get <platform> video`
29
30
  4. 上传视频:`yxer upload <视频路径或URL>`
30
- 5. 上传封面:`yxer upload <封面路径或URL>`
31
+ 5. 上传封面:`yxer upload <封面路径或URL>`;视频号封面必须使用 `yxer upload <封面路径或URL> --platform 视频号 --usage cover`,超 512KB 时由 CLI 内部压缩
31
32
  6. 按需查询分类、位置、音乐、合集、话题、商品
32
33
  7. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
33
- 8. 查阅对应平台文档:`skills/yixiaoer/references/platforms/video/`
34
+ 8. 查阅对应平台文档:`../platforms/video/`
34
35
  9. 执行校验:`yxer validate <platform> video <payload.json>`
35
36
  10. 正式发布:`yxer publish video <platform> <payload.json>`
36
37
 
@@ -40,6 +41,7 @@ yxer schema get <platform> video
40
41
  - 视频只能有一个,封面必须单独上传
41
42
  - 用户未提供封面时,必须补问,不要自动截帧
42
43
  - 可选复杂对象必须通过查询命令取得完整对象后再填入
44
+ - 话题/标签必须直接按 `../topic-tags.md` 的目标格式传入;不要依赖 CLI 从 `description` 自动改写
43
45
  - 发布前先看 `prepare` 和 `schema fields` 返回的字段;只有要确认完整骨架时再看 `schema get`
44
46
  - `payload.json` 必须使用统一标准结构:顶层 `publishArgs`,业务字段放在 `publishArgs.accountForms[].contentPublishForm`
45
47
  - 用户明确要求本机发布时,必须显式传 `--publish-channel local` 和 `--client-id`
@@ -59,5 +61,5 @@ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <cl
59
61
 
60
62
  ## 平台文档入口
61
63
 
62
- - 索引:`skills/yixiaoer/references/platforms/video/index.md`
63
- - 平台细节:`skills/yixiaoer/references/platforms/video/*.md`
64
+ - 索引:`../platforms/video/index.md`
65
+ - 平台细节:`../platforms/video/*.md`
@@ -0,0 +1,106 @@
1
+ # yxer 共享规则
2
+
3
+ 本文件是 `yxer` skill 的共享前置规则。只要任务涉及发布、草稿、素材、账号、排查、payload 修订,就应先读取本文件。
4
+
5
+ **CRITICAL - 本文档是共享规则唯一真源。若 QUICKSTART、domain 文档、workflow 文档和本文存在表述差异,以本文和对应 workflow 为准。**
6
+
7
+ ## 唯一执行入口
8
+
9
+ - 真正执行一律走 `yxer` CLI
10
+ - 不要假设存在旧 Node 脚本入口
11
+ - 不要绕过 CLI 直连隐式 API
12
+
13
+ ## 初始化与环境检查
14
+
15
+ 首次使用、环境不明、或刚完成一次失败排查后,优先执行:
16
+
17
+ ```bash
18
+ yxer doctor
19
+ yxer config get
20
+ ```
21
+
22
+ 如果当前环境尚未完成配置,再执行:
23
+
24
+ ```bash
25
+ yxer config init --api-key <apiKey>
26
+ ```
27
+
28
+ 规则:
29
+
30
+ - `doctor` 失败时,先修环境,再继续业务流程
31
+ - 不要在环境异常时继续组装 payload
32
+
33
+ ## 云发布与本机发布
34
+
35
+ - 用户未明确指定时,默认云发布
36
+ - 用户明确说“本机发布”“本地发布”“客户端发布”时,必须切到本机发布
37
+ - 本机发布前,应优先确认默认 `clientId` 是否已配置:
38
+
39
+ ```bash
40
+ yxer config set-local-client-id <clientId>
41
+ ```
42
+
43
+ 规则:
44
+
45
+ - `validate`、`publish --dry-run`、正式 `publish` 必须使用同一套发布通道参数
46
+ - 云发布返回代理相关错误时,可建议切到本机发布
47
+ - 本机发布提示客户端不在线时,应提示用户启动并登录蚁小二客户端,或改回云发布
48
+
49
+ ## 技能同步
50
+
51
+ ```bash
52
+ yxer skill show
53
+ yxer update
54
+ yxer update --global
55
+ ```
56
+
57
+ 以下情况应提示重新同步:
58
+
59
+ - `yxer --version` 升级后
60
+ - 当前 skill 包中的 `SKILL.md` 更新后
61
+ - `skills/yixiaoer/references/` 中影响 Agent 行为的文档更新后
62
+ - `yxer doctor` 返回 `_notice.skills`
63
+
64
+ ## 输出协议
65
+
66
+ ### 账号候选
67
+
68
+ - 如果只有一个可用账号,可自动选择并明确告知用户
69
+ - 如果命中多个账号,必须结构化列出候选项,再让用户确认
70
+ - 如果没有 `status=1` 的账号,不要继续发布流程
71
+
72
+ ### 校验与 dry-run
73
+
74
+ - `validate` 失败时,先展示错误要点,再回到 `prepare` / `schema get` / 查询结果修字段
75
+ - `publish --dry-run` 成功时,再进入正式发布
76
+ - 不要跳过 `validate` 或 `publish --dry-run`
77
+
78
+ ### 表单会话来源校验
79
+
80
+ - 使用 `publish form choose` 写动态字段时,必须带 `--source-command` 记录产生候选的 `yxer query ... --json` 命令
81
+ - `publish form set` 只能写 form contract 声明过的路径;不要用未知路径试错
82
+ - `publish form choose` 只用于 `dynamicFieldExamples` 声明的动态字段;普通文本、枚举和值字段使用 `publish form set`
83
+ - 导出前应先执行 `yxer publish form verify <session.json>`;`review` 和 `export` 也会校验来源记录和当前 payload 是否一致
84
+ - 如果 `verify` 报来源缺失、账号不一致或 hash 不匹配,回到对应字段重新执行 `set` / `choose`,不要手改 session 或 payload 绕过
85
+
86
+ ### 发布结果
87
+
88
+ - 成功时给出平台、类型、通道和关键结果
89
+ - 失败时给出错误摘要、当前阶段和下一步处理建议
90
+
91
+ ## 危险动作协议
92
+
93
+ - 真正发布前,最小固定门禁是:
94
+ 1. 已有或已导出标准 `payload.json`
95
+ 2. `yxer validate`
96
+ 3. `yxer publish --dry-run`
97
+ 4. 用户授权后 `yxer publish`
98
+ - 当 payload 尚未完整、账号未确认、资源未上传或动态字段未查询时,先补完整组装路径:
99
+ 1. `yxer doctor`
100
+ 2. `yxer accounts list`
101
+ 3. `yxer prepare` 或 `yxer publish form start/inspect`
102
+ 4. `yxer schema fields`;只有需要完整骨架时再补 `yxer schema get`
103
+ 5. `yxer upload` / `yxer query ...`
104
+ 6. 组装或导出 `payload.json`
105
+ - 不允许跳过 `validate`
106
+ - 不允许把正式 `publish` 当成试错手段
@@ -77,21 +77,13 @@
77
77
  }
78
78
  }
79
79
  },
80
- "type": {
81
- "type": "number",
82
- "enum": [
83
- 0,
84
- 1
85
- ],
86
- "default": 0
87
- },
88
80
  "desc": {
89
81
  "type": "string",
90
82
  "maxLength": 200
91
83
  },
92
84
  "tags": {
93
85
  "type": "array",
94
- "maxItems": 1,
86
+ "maxItems": 6,
95
87
  "items": {
96
88
  "type": "string"
97
89
  }
@@ -111,6 +103,14 @@
111
103
  "scheduledTime": {
112
104
  "type": "number",
113
105
  "minimum": 0
106
+ },
107
+ "createType": {
108
+ "type": "number",
109
+ "enum": [
110
+ 1,
111
+ 2
112
+ ],
113
+ "default": 1
114
114
  }
115
115
  },
116
116
  "additionalProperties": false
@@ -54,6 +54,14 @@
54
54
  }
55
55
  }
56
56
  },
57
+ "coverType": {
58
+ "type": "string",
59
+ "enum": [
60
+ "single",
61
+ "triple"
62
+ ],
63
+ "default": "single"
64
+ },
57
65
  "coverKey": {
58
66
  "type": "string"
59
67
  },
@@ -3,9 +3,7 @@
3
3
  "type": "object",
4
4
  "required": [
5
5
  "formType",
6
- "title",
7
6
  "description",
8
- "tags",
9
7
  "pubType"
10
8
  ],
11
9
  "properties": {
@@ -48,6 +46,25 @@
48
46
  ],
49
47
  "default": 0
50
48
  },
49
+ "statement": {
50
+ "type": "object",
51
+ "required": [
52
+ "type"
53
+ ],
54
+ "properties": {
55
+ "type": {
56
+ "type": "number",
57
+ "enum": [
58
+ 0,
59
+ 1
60
+ ]
61
+ },
62
+ "subType": {
63
+ "type": "number"
64
+ }
65
+ },
66
+ "additionalProperties": true
67
+ },
51
68
  "location": {
52
69
  "type": "object",
53
70
  "required": [
@@ -0,0 +1,188 @@
1
+ {
2
+ "title": "哔哩哔哩-Open视频发布表单 (Bilibili Open Video)",
3
+ "type": "object",
4
+ "required": [
5
+ "contentPublishForm",
6
+ "platformAccountId",
7
+ "video",
8
+ "cover",
9
+ "coverKey"
10
+ ],
11
+ "properties": {
12
+ "contentPublishForm": {
13
+ "type": "object",
14
+ "required": [
15
+ "formType",
16
+ "title",
17
+ "tags",
18
+ "category"
19
+ ],
20
+ "properties": {
21
+ "formType": {
22
+ "type": "string",
23
+ "const": "task"
24
+ },
25
+ "title": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "description": {
30
+ "type": "string",
31
+ "minLength": 0
32
+ },
33
+ "tags": {
34
+ "type": "array",
35
+ "minItems": 1,
36
+ "maxItems": 12,
37
+ "items": {
38
+ "type": "string",
39
+ "maxLength": 20
40
+ }
41
+ },
42
+ "category": {
43
+ "type": "array",
44
+ "minItems": 1,
45
+ "items": {
46
+ "type": "object",
47
+ "required": [
48
+ "yixiaoerId",
49
+ "yixiaoerName",
50
+ "raw"
51
+ ],
52
+ "properties": {
53
+ "yixiaoerId": {
54
+ "type": "string"
55
+ },
56
+ "yixiaoerName": {
57
+ "type": "string"
58
+ },
59
+ "raw": {
60
+ "type": "object"
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "allowReprint": {
66
+ "type": "number",
67
+ "enum": [
68
+ 0,
69
+ 1
70
+ ],
71
+ "default": 0
72
+ },
73
+ "createType": {
74
+ "type": "number",
75
+ "enum": [
76
+ 1,
77
+ 2
78
+ ],
79
+ "default": 1
80
+ },
81
+ "type": {
82
+ "type": "number",
83
+ "enum": [
84
+ 1,
85
+ 2
86
+ ],
87
+ "default": 1
88
+ },
89
+ "reprintSource": {
90
+ "type": "string"
91
+ },
92
+ "visibleType": {
93
+ "type": "number",
94
+ "enum": [
95
+ 0,
96
+ 1
97
+ ],
98
+ "default": 0
99
+ },
100
+ "pubType": {
101
+ "type": "number",
102
+ "enum": [
103
+ 0,
104
+ 1
105
+ ],
106
+ "default": 1
107
+ },
108
+ "scheduledTime": {
109
+ "type": "number",
110
+ "minimum": 0
111
+ }
112
+ },
113
+ "additionalProperties": false
114
+ },
115
+ "video": {
116
+ "type": "object",
117
+ "required": [
118
+ "key",
119
+ "size",
120
+ "width",
121
+ "height",
122
+ "duration"
123
+ ],
124
+ "properties": {
125
+ "key": {
126
+ "type": "string"
127
+ },
128
+ "size": {
129
+ "type": "integer",
130
+ "minimum": 1
131
+ },
132
+ "width": {
133
+ "type": "integer",
134
+ "minimum": 1
135
+ },
136
+ "height": {
137
+ "type": "integer",
138
+ "minimum": 1
139
+ },
140
+ "duration": {
141
+ "type": "number",
142
+ "minimum": 1
143
+ },
144
+ "format": {
145
+ "type": "string",
146
+ "enum": [
147
+ "mp4",
148
+ "mov",
149
+ "flv"
150
+ ]
151
+ }
152
+ }
153
+ },
154
+ "cover": {
155
+ "type": "object",
156
+ "required": [
157
+ "key",
158
+ "size",
159
+ "width",
160
+ "height"
161
+ ],
162
+ "properties": {
163
+ "key": {
164
+ "type": "string"
165
+ },
166
+ "size": {
167
+ "type": "integer"
168
+ },
169
+ "width": {
170
+ "type": "integer"
171
+ },
172
+ "height": {
173
+ "type": "integer"
174
+ },
175
+ "format": {
176
+ "type": "string"
177
+ }
178
+ }
179
+ },
180
+ "coverKey": {
181
+ "type": "string"
182
+ },
183
+ "platformAccountId": {
184
+ "type": "string"
185
+ }
186
+ },
187
+ "additionalProperties": false
188
+ }
@@ -90,18 +90,18 @@
90
90
  ],
91
91
  "default": 1
92
92
  },
93
- "type": {
93
+ "scheduledTime": {
94
+ "type": "number",
95
+ "minimum": 0
96
+ },
97
+ "createType": {
94
98
  "type": "number",
95
99
  "enum": [
96
100
  1,
97
- 3,
98
- 13
101
+ 2,
102
+ 3
99
103
  ],
100
104
  "default": 1
101
- },
102
- "scheduledTime": {
103
- "type": "number",
104
- "minimum": 0
105
105
  }
106
106
  },
107
107
  "additionalProperties": false
@@ -144,6 +144,32 @@
144
144
  "coverKey": {
145
145
  "type": "string"
146
146
  },
147
+ "horizontalCover": {
148
+ "type": "object",
149
+ "required": [
150
+ "key",
151
+ "size",
152
+ "width",
153
+ "height"
154
+ ],
155
+ "properties": {
156
+ "key": {
157
+ "type": "string"
158
+ },
159
+ "size": {
160
+ "type": "integer",
161
+ "minimum": 1
162
+ },
163
+ "width": {
164
+ "type": "integer",
165
+ "minimum": 1
166
+ },
167
+ "height": {
168
+ "type": "integer",
169
+ "minimum": 1
170
+ }
171
+ }
172
+ },
147
173
  "scheduledTime": {
148
174
  "type": "number",
149
175
  "minimum": 0
@@ -58,6 +58,10 @@
58
58
  "type": "string",
59
59
  "maxLength": 30
60
60
  },
61
+ "description": {
62
+ "type": "string",
63
+ "maxLength": 30
64
+ },
61
65
  "headImage": {
62
66
  "type": "object",
63
67
  "required": [
@@ -218,6 +222,10 @@
218
222
  "type": "string",
219
223
  "maxLength": 30
220
224
  },
225
+ "description": {
226
+ "type": "string",
227
+ "maxLength": 30
228
+ },
221
229
  "headImage": {
222
230
  "type": "object",
223
231
  "required": [
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "description": {
20
20
  "type": "string",
21
- "maxLength": 5000
21
+ "maxLength": 1000
22
22
  },
23
23
  "tags": {
24
24
  "type": "array",
@@ -217,6 +217,15 @@
217
217
  "type": "number",
218
218
  "minimum": 0
219
219
  },
220
+ "visibleType": {
221
+ "type": "number",
222
+ "enum": [
223
+ 0,
224
+ 1,
225
+ 2
226
+ ],
227
+ "default": 0
228
+ },
220
229
  "declaration": {
221
230
  "type": "number",
222
231
  "enum": [
@@ -224,7 +233,9 @@
224
233
  3,
225
234
  4,
226
235
  5,
227
- 6
236
+ 6,
237
+ 7,
238
+ 8
228
239
  ],
229
240
  "default": 0
230
241
  },
@@ -281,6 +292,9 @@
281
292
  "团购",
282
293
  "购物车"
283
294
  ]
295
+ },
296
+ "group_shopping": {
297
+ "type": "object"
284
298
  }
285
299
  },
286
300
  "additionalProperties": false