@yixiaoermail/cli 3.2.34 → 3.2.36

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 (31) hide show
  1. package/checksums.txt +6 -6
  2. package/package.json +1 -1
  3. package/references/cli/command-reference.md +3 -2
  4. package/references/domains/install-and-sync.md +0 -6
  5. package/references/domains/publish.md +1 -0
  6. package/references/get-goods.md +6 -3
  7. package/references/get-locations.md +3 -3
  8. package/references/get-publish-categories.md +1 -0
  9. package/references/platforms/article/zhihu.md +6 -2
  10. package/references/platforms/imageText/douyin.md +15 -0
  11. package/references/platforms/imageText/shipinhao.md +18 -0
  12. package/references/platforms/video/baijiahao.md +6 -0
  13. package/references/platforms/video/qiehao.md +3 -2
  14. package/references/yixiaoer-shared.md +0 -1
  15. package/schemas/platforms/baijiahao.video.schema.json +18 -0
  16. package/schemas/platforms/douyin.imageText.schema.json +44 -1
  17. package/schemas/platforms/shipinhao.imageText.schema.json +42 -0
  18. package/schemas/platforms/zhihu.article.schema.json +15 -1
  19. package/skills/yixiaoer/SKILL.md +4 -3
  20. package/skills/yixiaoer/references/cli/command-reference.md +3 -2
  21. package/skills/yixiaoer/references/domains/install-and-sync.md +0 -6
  22. package/skills/yixiaoer/references/domains/publish.md +1 -0
  23. package/skills/yixiaoer/references/get-goods.md +6 -3
  24. package/skills/yixiaoer/references/get-locations.md +3 -3
  25. package/skills/yixiaoer/references/get-publish-categories.md +1 -0
  26. package/skills/yixiaoer/references/platforms/article/zhihu.md +6 -2
  27. package/skills/yixiaoer/references/platforms/imageText/douyin.md +15 -0
  28. package/skills/yixiaoer/references/platforms/imageText/shipinhao.md +18 -0
  29. package/skills/yixiaoer/references/platforms/video/baijiahao.md +6 -0
  30. package/skills/yixiaoer/references/platforms/video/qiehao.md +3 -2
  31. package/skills/yixiaoer/references/yixiaoer-shared.md +0 -1
package/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- d0accb5242ad3715757c652323fbe791dd58d9464da7f444df672a2183309a06 yxer-cli-3.2.34-windows-amd64.zip
2
- 27816d6fb02ba1991a97ee27e17dd979591d56e0b5c92dc5372355612c70a060 yxer-cli-3.2.34-windows-arm64.zip
3
- 923db70b6a5f5ae9cffcf2ae9cf04501fc06fa163038d2315cd0660bbc2acf03 yxer-cli-3.2.34-darwin-amd64.tar.gz
4
- 573af95491f651d1778dda216bd3d43bfdf533b657403946b607db7cc0c8bb44 yxer-cli-3.2.34-darwin-arm64.tar.gz
5
- 484c18f866440072e70b83284440a2644ad123af67da272165a1afb242dc45f2 yxer-cli-3.2.34-linux-amd64.tar.gz
6
- b38fb3abcba0ab4c00c159a47b2401f74ad4a3096fd1dc533287d83344a966c4 yxer-cli-3.2.34-linux-arm64.tar.gz
1
+ c06abc86fd1e66f1b64b93cd6cdcfa56b1d4ee721dc41c0c189c6ee1c7231db7 yxer-cli-3.2.36-windows-amd64.zip
2
+ 8c67ed2c9a4b636f4092c11afed59301ad3b184affe5672b5251feede9ad9e10 yxer-cli-3.2.36-windows-arm64.zip
3
+ 391313debb3f8f0a5dd8c7649e537ed97c6a7d9413787aea5a154837e8747ba6 yxer-cli-3.2.36-darwin-amd64.tar.gz
4
+ 7a90168dac62e8ba98f5b1d41c889ae70593dd82bd20ed6df99159b50727452e yxer-cli-3.2.36-darwin-arm64.tar.gz
5
+ 5d327e10200061c39599e0fe09a64ea65cbe04c90d4b0d77012690a78df1c778 yxer-cli-3.2.36-linux-amd64.tar.gz
6
+ 9873f771bfe3aaa761661e4123feb00856d82438910db5184a7dcee95020c20e yxer-cli-3.2.36-linux-arm64.tar.gz
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yixiaoermail/cli",
3
- "version": "3.2.34",
3
+ "version": "3.2.36",
4
4
  "yxerDownloadRootUrl": "https://yixiaoer-lite-asserts.tos-cn-shanghai.volces.com/yxer/releases",
5
5
  "description": "Yixiaoer CLI packaged for npm global installation",
6
6
  "bin": {
@@ -27,8 +27,6 @@ yxer doctor
27
27
  yxer update [--check] [--global]
28
28
  ```
29
29
 
30
- `yxer update --check` 会查询 npm latest 并返回当前版本、最新版本及是否有更新;普通命令可能在成功响应的 `_notice.update` 中提示升级。首次检查或超过 24 小时后,CLI 会启动一次性后台进程刷新缓存;缓存刷新后,后续普通命令会显示提示。该提示不自动安装,执行 `yxer update` 才会升级 CLI。
31
-
32
30
  ### 本地配置
33
31
 
34
32
  ```bash
@@ -62,6 +60,7 @@ yxer upload --url <resource_url> [--bucket cloud-publish|material-library] [--dr
62
60
  ```bash
63
61
  yxer validate <platform> <type> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>] [--content-file <article.md>]
64
62
  yxer publish <type> <platform> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>] [--content-file <article.md>] [--dry-run]
63
+ yxer publish video 抖音 <payload.json> --preview-credential <token> --confirm-preview
65
64
  yxer publish delete preview <task_set_id>
66
65
  yxer publish delete from-record <task_set_id> --index N [--dry-run]
67
66
  yxer publish delete <task_id> [--dry-run]
@@ -104,6 +103,7 @@ yxer query drama-tasks <account_id> [--query 关键词] [--keyword 关键词]
104
103
  yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
105
104
  yxer query friends <account_id> [--red-id 小红书号] [--query 关键词]
106
105
  yxer query challenges <account_id> [--query 关键词] [--type video]
106
+ yxer query games <account_id> [--query 关键词]
107
107
  yxer query records [--platform P] [--limit N] [--status S] [--json]
108
108
  yxer query account-increments --start-date YYYY-MM-DD --end-date YYYY-MM-DD [--group-id GROUP_ID]
109
109
  yxer prepare <platform> <type>
@@ -136,6 +136,7 @@ yxer schema get <platform> <type>
136
136
  - 本机发布时必须提供 `clientId`
137
137
  - `yxer validate`、`yxer publish --dry-run`、`yxer publish` 使用同一套发布通道解析逻辑
138
138
  - `yxer publish --dry-run` 不创建发布任务,也不会上传正文图片;它返回渲染后的正文和图片处理计划,并在有 API key 的云发布场景执行账号/代理 preflight。最终图片 URL 只有正式 `publish` 上传后才能确定。local dry-run 不检测客户端在线状态。
139
+ - 云端 MCP 试点 dry-run 的 `data.meta.previewCredential` 是绑定预览内容、当前用户和团队的 15 分钟凭证。展示预览并取得用户明确确认后,复用相同 payload 并传入 `--preview-credential <token> --confirm-preview`;payload 改动或凭证过期时重新预览。
139
140
  - 本机发布推荐通过两种方式提供 `clientId`:
140
141
  - flags:`yxer publish <type> <platform> <payload.json> --publish-channel local --client-id <clientId>`
141
142
  - 预设默认值:`yxer config set-local-client-id <clientId>` 后,再执行 `--publish-channel local`
@@ -21,12 +21,6 @@ yxer update
21
21
  yxer doctor
22
22
  ```
23
23
 
24
- ## 自动检测更新
25
-
26
- 每次运行普通 CLI 命令时,yxer 会先读取 `%USERPROFILE%\.yxer\update-state.json` 缓存。缓存缺失或超过 24 小时后,会启动一次性后台进程查询 npm 最新版本并写入缓存;缓存刷新后,后续普通命令会在成功 JSON 响应的 `_notice.update` 中提示运行 `yxer update`。检查不会自动安装,也不会启动常驻服务。
27
-
28
- `yxer update --check` 会实时查询 npm 最新版本并返回 `currentVersion`、`latestVersion` 和 `updateAvailable`,不安装 CLI、不同步 skill。CI 默认跳过启动检查;设置 `YIXIAOER_CLI_NO_UPDATE_NOTIFIER=1` 可关闭本机提示。
29
-
30
24
  ## 标准安装流程
31
25
 
32
26
  ```bash
@@ -53,6 +53,7 @@
53
53
  - 需要组装或补字段时,未执行 `prepare` / `publish form` / `schema fields` 不组装 payload;只有需要 payload 骨架时再补 `schema get`
54
54
  - 未按 `data-accuracy.md` 完成需要查询的动态字段和多候选确认,不继续写 payload 或发布;多多视频 `shopping_cart.goods_id` 按平台规则使用用户明确输入
55
55
  - 未先 `validate` 与 `publish --dry-run` 不执行正式 `publish`
56
+ - 云端 MCP 试点的 `publish --dry-run` 会返回短时 `previewCredential`;只有展示预览并取得明确确认后,才对相同 payload 传入 `--preview-credential <token> --confirm-preview`。请求内容变化或凭证过期时重新预览。
56
57
 
57
58
  ## 常用命令
58
59
 
@@ -1,6 +1,6 @@
1
1
  # 获取商品列表 (Get Goods)
2
2
 
3
- 此接口用于获取指定媒体账号在平台上关联的商品、团购或小店商品列表,以便在发布视频时进行商业推广。
3
+ 此接口用于获取指定媒体账号在平台上关联的商品、团购或小店商品列表,以便在支持的平台发布视频或图文时关联商品。
4
4
 
5
5
  若需要从一个商品链接生成可挂购物车的完整商品对象,使用 `goods-detail`。它解析单个链接,不查询账号的选品车或商品列表。
6
6
 
@@ -28,7 +28,7 @@ yxer query goods-detail YOUR_ACCOUNT_ID --url "商品链接" --json
28
28
 
29
29
  ## 3. 返回数据结构
30
30
 
31
- 返回商品对象数组及分页信息。发布时按目标平台 schema 使用查询结果要求的结构,并完整保留所选商品对象;不要只保留 ID/name 等局部字段。不同平台的挂车结构不同,例如视频号使用单个商品对象,抖音等平台可能要求额外的外层结构。
31
+ 返回商品对象数组及分页信息。发布时按目标平台 schema 使用查询结果要求的结构,并完整保留所选商品对象;不要只保留 ID/name 等局部字段。不同平台的挂车结构不同,例如视频号视频和图文均使用单个商品对象,抖音等平台可能要求额外的外层结构。
32
32
 
33
33
  `yxer query goods-detail` 返回相同的完整商品对象结构,可将其结果中的商品对象用于抖音 `shopping_cart`;该命令只解析链接,不执行发布。
34
34
 
@@ -48,5 +48,8 @@ yxer query goods-detail YOUR_ACCOUNT_ID --url "商品链接" --json
48
48
  | `count` | `number` | 剩余库存 |
49
49
  | `yixiaoerDesc` | `string` | 商品规格说明 |
50
50
  | `yixiaoerImageUrl` | `string` | 商品图片 URL |
51
- | `raw` | `object` | 某些接口或平台可能返回的原始对象;若查询结果包含该字段,按平台 schema 要求完整透传。视频号 GoodListItemResponse 不要求此字段。 |
51
+ | `stockText` | `string` | 平台库存说明文字 |
52
+ | `productEncryptKey` | `string` | 微信小店商品插入草稿所需凭证 |
53
+ | `productType` | `number` | 商品类型 |
54
+ | `raw` | platform-specific | 某些接口或平台可能返回原始数据;若目标平台类型定义了该字段,完整透传。视频号 `GoodListItemResponse` 不包含 `raw`。 |
52
55
 
@@ -5,7 +5,7 @@
5
5
  ## 调用指令 (Command)
6
6
 
7
7
  ```bash
8
- yxer query locations XXX --query 深圳 --type 1 --json
8
+ yxer query locations XXX --query 深圳 --json
9
9
  ```
10
10
 
11
11
  ## 参数列表 (Payload Properties)
@@ -14,7 +14,7 @@ yxer query locations XXX --query 深圳 --type 1 --json
14
14
  | :--- | :--- | :--- | :--- |
15
15
  | `account_id` | `string` | **是** | 蚁小二账号 ID (32位十六进制) |
16
16
  | `keyword` | `string` | 否 | 搜索关键词 |
17
- | `type` | `number` | 否 | 地址权限/搜索类型:`0`: 全部, `1`: 本地 (默认), `2`: 国内, `3`: 海外 |
17
+ | `type` | `number` | 否 | 地址权限/搜索类型:`0`: 全部, `1`: 本地, `2`: 国内, `3`: 海外。省略时不发送 `locationType`,由平台接口决定默认范围 |
18
18
  | `nextPage` | `string` | 否 | 分页标识,在返回结果中获取 |
19
19
 
20
20
  ## 返回结果 (Response)
@@ -44,5 +44,5 @@ yxer query locations XXX --query 深圳 --type 1 --json
44
44
 
45
45
  - **CLI 命令**: `yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3] [--json]`
46
46
  - **功能**: 封装蚁小二标准地理位置查询接口 (`GET /platform-accounts/{platformAccountId}/location`)。
47
- - **参数映射**: 将 `account_id` 映射为路径变量,将 `keyWord`, `locationType`, `nextPage` 映射为查询参数。
47
+ - **参数映射**: 将 `account_id` 映射为路径变量,将 `keyWord`, `nextPage` 映射为查询参数;仅显式传入 `--type` 时才发送 `locationType`。视频号桌面端位置搜索不传 `locationType`,省略 `--type` 可与桌面端保持一致。桌面端会在存在缓存客户端 ID 时发送 `x-local-client`;CLI 在配置 `localPublishClientId` 时也会转发该请求头。
48
48
 
@@ -36,6 +36,7 @@
36
36
  - 搜狐号视频必须使用最新查询结果中从父分类到末级分类的完整 `category` 路径,不能只提交末级分类。
37
37
  - 大鱼号视频必须选择至少一个分类;使用目标账号的 `yxer query categories <account_id> --type video --json` 结果,保留完整分类对象。
38
38
  - 大鱼号视频分类按蚁小二 Web 端固定目录提供。CLI 内置并嵌入这份目录,确认账号属于大鱼号后直接返回,不请求不支持大鱼号的账号分类接口;返回的对象包含 `yixiaoerId`、`yixiaoerName` 和 `raw`。
39
+ - 企鹅号视频分类按蚁小二客户端固定目录提供,来源为客户端 `videoCategories/qi-e-hao.json`。CLI 内置并嵌入相同目录,确认账号属于企鹅号后直接返回,不请求账号分类接口;返回的对象保留 `yixiaoerId`、`yixiaoerName`、原始分类 `raw` 和级联 `child`。
39
40
  - **Agent 手动铺平 (Flattening)**:若返回的数据包含嵌套的 `children` 数组,Agent **必须自行递归遍历**,以便在组装发布表单时能够获取任何层级的分类。
40
41
  - **层级路径组装 (Cascading Path)**:
41
42
  - 对于要求多级分类的平台 (如 Bilibili),Agent 在组装表单时,不能只填入最终选中的子分类。
@@ -30,7 +30,10 @@
30
30
  | `topics` | `Array` | 否 | 话题列表 (`Category[]`, 最多3个) | - |
31
31
  | `declaration` | `number` | 否 | 创作申明: 0-无申明, 1-剧透, 2-医疗建议, 3-虚构创作, 4-理财内容, 5-AI辅助 | 0 |
32
32
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
33
- | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
33
+ | `prePubTime` | `number` | 否 | 定时发布时间;13 位 Unix 毫秒时间戳,须在当前时间后 30 分钟至 48 小时内。省略或传 `0` 表示立即发布 | - |
34
+ | `scheduledTime` | `number` | 否 | `prePubTime` 的兼容旧字段;新 payload 请使用 `prePubTime` | - |
35
+
36
+ 定时发布时使用 `pubType: 1` 并传入 JSON 数字 `prePubTime`。不要传日期字符串、秒级时间戳或知乎接口字段 `schedule.publishAt` / `publish_at`;平台服务会负责转换和组装知乎请求。`pubType: 0` 仅保存草稿,不会提交定时发布请求。
34
37
 
35
38
  ## 2. Payload 完整示例
36
39
 
@@ -51,7 +54,8 @@
51
54
  { "yixiaoerId": "cat_001", "yixiaoerName": "人工智能", "raw": {} }
52
55
  ],
53
56
  "declaration": 5,
54
- "pubType": 1
57
+ "pubType": 1,
58
+ "prePubTime": 1795069380000
55
59
  }
56
60
  }
57
61
  ]
@@ -33,6 +33,8 @@
33
33
  | `images` | `Array` | **是** | 图片数组 (`OldImage[]`) | - |
34
34
  | `location` | `Object` | 否 | 地址信息 (`PlatformDataItem`) | - |
35
35
  | `music` | `Object` | 否 | 音乐信息 (`MusicItem`) | - |
36
+ | `game` | `Object` | 否 | “游戏手柄”标签关联的游戏对象,必须来自目标账号的 `yxer query games` 结果 | - |
37
+ | `tagType` | `string` | 否 | 标签类型;使用游戏组件时设为 `游戏手柄` | - |
36
38
  | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
37
39
  | `collection` | `Object` | 否 | 合集信息 (`Category`) | - |
38
40
  | `sub_collection` | `Object` | 否 | 合集选集信息 (`Category`) | - |
@@ -72,6 +74,19 @@
72
74
  | `yixiaoerName` | `string` | 是 | 显示名称 |
73
75
  | `raw` | `object` | 是 | 平台原始数据。如果在获取时该字段存在,发布表单中必须携带并完整透传 |
74
76
 
77
+ ### 游戏手柄
78
+
79
+ 先按目标账号查询游戏,再使用 `game` 动态字段选择查询结果中的完整对象;同时设置 `tagType` 为 `游戏手柄`。不要手写游戏 ID 或裁剪查询对象:
80
+
81
+ ```bash
82
+ yxer query games <account_id> [--query 关键词] --json
83
+ yxer publish form choose publish-form.json game --value-file games.json --id <yixiaoerId> --source-command "yxer query games <account_id> --json"
84
+ yxer publish form set publish-form.json publishArgs.accountForms[0].contentPublishForm.tagType --value '"游戏手柄"'
85
+ ```
86
+
87
+ `choose` 写入的游戏对象必须保留查询结果中的 `yixiaoerId`、`yixiaoerName`、`yixiaoerImageUrl` 及其他字段。客户端 `GameResponseItem.raw` 是可选字符串;查询结果包含时原样透传,不要转换成对象。`tagType=游戏手柄` 时必须提供 `game`;设置 `game` 时也必须设置 `tagType`。
88
+ 如果查询命令带了 `--query`,`--source-command` 中也要逐字写入实际使用的关键词参数。
89
+
75
90
 
76
91
 
77
92
  ## 3. Payload 完整示例
@@ -30,6 +30,7 @@
30
30
  | `images` | `Array` | **是** | 图片数组 (`OldImage[]`),1-18 张 | - |
31
31
  | `location` | `Object` | 否 | 位置对象 (`PlatformDataItem`) | - |
32
32
  | `music` | `Object` | 否 | 音乐对象 (`MusicItem`) | - |
33
+ | `shopping_cart` | `object` | 否 | 关联单个商品:使用 `yxer query goods` 返回的完整 `GoodListItemResponse`,不包装为数组 | - |
33
34
  | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
34
35
  | `collection` | `Object` | 否 | 合集信息,使用 `Collection` 结构 | - |
35
36
  | `declaration` | `number` | 否 | 创作声明:0-无需标注,1-含AI生成内容,2-营销广告,3-虚构剧情,7-转载,8-个人观点 | 0 |
@@ -37,6 +38,17 @@
37
38
 
38
39
  含 AI 生成内容时,请设置 `contentPublishForm.declaration` 为 `1`。
39
40
 
41
+ ### 商品关联
42
+
43
+ 客户端图文契约包含可选的 `shopping_cart?: GoodListItemResponse`,CLI 现已接受相同字段。先查询目标账号的商品,再通过 `publish form choose` 选择一个完整商品对象;不要包装成数组或裁剪查询字段:
44
+
45
+ ```bash
46
+ yxer query goods <account_id> --json
47
+ yxer publish form choose <session.json> shopping_cart --value-file <query.json> --id <商品yixiaoerId> --source-command "yxer query goods <account_id> --json"
48
+ ```
49
+
50
+ `shopping_cart` 路径为 `publishArgs.accountForms[].contentPublishForm.shopping_cart`。选择商品时,查询账号必须与表单中的目标账号一致。
51
+
40
52
  ## 1.1 封面派生规则
41
53
 
42
54
  视频号图文没有单独的外部封面参数。只需提供 `contentPublishForm.images`;CLI 会在内部默认使用 `images[0]` 派生 `cover` / `coverKey`,不要在 payload 中额外手写封面字段。
@@ -93,6 +105,11 @@
93
105
  "formType": "task",
94
106
  "title": "视频号动态标题",
95
107
  "description": "<p>视频号图文内容 <topic text='微信' raw='{\"id\":\"xxx\",\"name\":\"微信\"}'>#微信</topic></p>",
108
+ "shopping_cart": {
109
+ "yixiaoerId": "goods_001",
110
+ "yixiaoerName": "示例商品",
111
+ "price": 1990
112
+ },
96
113
  "declaration": 1,
97
114
  "pubType": 0,
98
115
  "images": [
@@ -112,5 +129,6 @@
112
129
  | `location` | `locations` | [获取位置信息](../../get-locations.md) |
113
130
  | `collection` | `collections` | [获取合集列表](../../get-collections.md) |
114
131
  | `music` | `music` | [获取背景音乐](../../get-music.md) |
132
+ | `shopping_cart` | `goods` | [获取商品列表](../../get-goods.md) |
115
133
  | `tags` | `challenges` | [获取话题/挑战](../../get-challenges.md) |
116
134
  | `images.key` | `upload` | [资源上传](../../upload-resource.md) |
@@ -36,6 +36,7 @@
36
36
  | `tags` | `string[]` | 否 | 视频标签 (1-6 个) | - |
37
37
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
38
38
  | `statement` | `object` | 否 | 内容声明对象;未声明时可省略 | - |
39
+ | `first_exclusive_publish_v2` | 字符串或整数 | 否 | 高权益账号原创声明:`first_24h`/`first_48h`/`first_72h` 表示 24/48/72 小时首发,`2` 表示独家,`3` 表示不声明 | - |
39
40
  | `location` | `Object` | 否 | 位置信息,使用 `PlatformDataItem` 结构 | - |
40
41
  | `scheduledTime` | `number` | 否 | 定时发布时间戳 (13 位 Unix 时间戳,单位: 毫秒) | - |
41
42
  | `collection` | `Object` | 否 | 合集信息 (`yixiaoerId`, `yixiaoerName`, `raw`) | - |
@@ -52,6 +53,10 @@
52
53
 
53
54
  客户端会把 `statement.type` 和 `statement.subType` 转换为百家号请求字段 `publish_statement` 和 `publish_statement_sub`,并根据主声明派生 `activity_list.aigc_bjh_status`;CLI 只接收 `statement` 对象,不要直接填写这些平台请求字段。
54
55
 
56
+ ### 1.2 高权益原创声明
57
+
58
+ `first_exclusive_publish_v2` 与 `statement` 是两个独立字段。设置 `first_24h`、`first_48h`、`first_72h` 或整数 `2` 时,CLI 会在 `validate`、`publish --dry-run` 和正式发布前按目标账号查询 `account-info`,并要求 `ability.first_exclusive_v2_all` 与 `ability.can_edit_first_exclusive_v2` 都严格等于 `1`。缺少权益、查询失败或返回状态未确认时会拒绝继续。普通账号使用不声明(整数 `3`)或省略此字段。
59
+
55
60
  ## 2. Payload 完整示例
56
61
 
57
62
  ```json
@@ -100,6 +105,7 @@
100
105
  "type": 1,
101
106
  "subType": 4
102
107
  },
108
+ "first_exclusive_publish_v2": "first_48h",
103
109
  "location": {
104
110
  "yixiaoerId": "loc_001",
105
111
  "yixiaoerName": "北京市",
@@ -14,7 +14,8 @@
14
14
  ## 执行逻辑 (Logic Flow)
15
15
  1. **意图确认**:确认目标平台为Qiehao。
16
16
  2. **参数装配**:识别并填充标题、描述等平台特定字段至 `contentPublishForm`。
17
- 3. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
17
+ 3. **分类查询**:视频发布前执行 `yxer query categories <account_id> --type video --json`。企鹅号视频分类遵循客户端内置目录 `apps/web-root/shared/lib/http/services/web/platform/videoCategories/qi-e-hao.json`;CLI 随程序嵌入同一份分类树,不请求账号分类接口。
18
+ 4. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
18
19
 
19
20
 
20
21
  ## 1. contentPublishForm 数据结构
@@ -36,7 +37,7 @@
36
37
 
37
38
  > [!IMPORTANT]
38
39
  > **规则 (Rule)**:
39
- > 所有的 `raw` 数据必须透传通过分类接口获取的原始对象。
40
+ > 所有的 `raw` 数据必须透传 `yxer query categories` 返回的原始对象。企鹅号视频分类来自客户端固定目录,CLI 返回的每个分类项仍包含对应的原始 `raw` 对象。
40
41
 
41
42
  | 字段名 | 类型 | 必填 | 说明 |
42
43
  | :--- | :--- | :--- | :--- |
@@ -60,7 +60,6 @@ yxer update --global
60
60
  - 当前 skill 包中的 `SKILL.md` 更新后
61
61
  - `skills/yixiaoer/references/` 中影响 Agent 行为的文档更新后
62
62
  - `yxer doctor` 返回 `_notice.skills`
63
- - 成功输出包含 `_notice.update` 时,完成当前请求后提示用户运行 `yxer update`;该提示不会自动安装。首次检查可能要等后台缓存刷新后,在后续命令输出中出现。
64
63
 
65
64
  ## 输出协议
66
65
 
@@ -38,6 +38,24 @@
38
38
  ],
39
39
  "default": 1
40
40
  },
41
+ "first_exclusive_publish_v2": {
42
+ "title": "百家号高权益原创声明(字符串或整数)",
43
+ "description": "百家号高权益账号原创声明;使用字符串 first_24h/first_48h/first_72h 表示首发时长,整数 2 表示独家,整数 3 表示不声明。字符串值或整数值以外类型不接受。",
44
+ "enum": [
45
+ "first_24h",
46
+ "first_48h",
47
+ "first_72h",
48
+ 2,
49
+ 3
50
+ ],
51
+ "x-enum-labels": {
52
+ "first_24h": "24小时首发",
53
+ "first_48h": "48小时首发",
54
+ "first_72h": "72小时首发",
55
+ "2": "独家",
56
+ "3": "不声明"
57
+ }
58
+ },
41
59
  "statement": {
42
60
  "type": "object",
43
61
  "required": [
@@ -1,5 +1,22 @@
1
1
  {
2
2
  "title": "抖音图文发布表单 (Douyin Image-Text)",
3
+ "x-conditional-required": [
4
+ {
5
+ "if": { "field": "tagType", "op": "equals", "value": "游戏手柄" },
6
+ "required": ["game"],
7
+ "message": "抖音图文选择游戏手柄标签时必须提供 game 游戏对象"
8
+ },
9
+ {
10
+ "if": { "field": "game", "op": "exists" },
11
+ "required": ["tagType"],
12
+ "message": "抖音图文设置 game 时必须同时设置 tagType"
13
+ },
14
+ {
15
+ "if": { "field": "tagType", "op": "notEquals", "value": "游戏手柄" },
16
+ "forbidNonEmpty": ["game"],
17
+ "message": "只有 tagType=游戏手柄 时才能设置 game"
18
+ }
19
+ ],
3
20
  "type": "object",
4
21
  "required": [
5
22
  "formType",
@@ -285,12 +302,38 @@
285
302
  "additionalProperties": false
286
303
  }
287
304
  },
305
+ "game": {
306
+ "type": "object",
307
+ "description": "游戏手柄关联游戏,必须使用目标账号 games 查询结果中的完整对象",
308
+ "required": [
309
+ "yixiaoerId",
310
+ "yixiaoerName",
311
+ "yixiaoerImageUrl"
312
+ ],
313
+ "properties": {
314
+ "yixiaoerId": {
315
+ "type": "string"
316
+ },
317
+ "yixiaoerName": {
318
+ "type": "string"
319
+ },
320
+ "yixiaoerImageUrl": {
321
+ "type": "string"
322
+ },
323
+ "raw": {
324
+ "type": "string",
325
+ "description": "客户端 GameResponseItem 的原始数据(若查询结果有返回则原样保留)"
326
+ }
327
+ },
328
+ "additionalProperties": true
329
+ },
288
330
  "tagType": {
289
331
  "type": "string",
290
332
  "enum": [
291
333
  "位置",
292
334
  "团购",
293
- "购物车"
335
+ "购物车",
336
+ "游戏手柄"
294
337
  ]
295
338
  },
296
339
  "group_shopping": {
@@ -103,6 +103,48 @@
103
103
  }
104
104
  }
105
105
  },
106
+ "shopping_cart": {
107
+ "description": "单个视频号图文关联商品,直接使用 goods 查询返回的 GoodListItemResponse,不包装成数组。",
108
+ "type": "object",
109
+ "required": [
110
+ "yixiaoerId",
111
+ "yixiaoerName",
112
+ "price"
113
+ ],
114
+ "properties": {
115
+ "count": {
116
+ "type": "number"
117
+ },
118
+ "stockText": {
119
+ "type": "string"
120
+ },
121
+ "earnPrice": {
122
+ "type": "number"
123
+ },
124
+ "productEncryptKey": {
125
+ "type": "string"
126
+ },
127
+ "productType": {
128
+ "type": "number"
129
+ },
130
+ "price": {
131
+ "type": "number"
132
+ },
133
+ "yixiaoerDesc": {
134
+ "type": "string"
135
+ },
136
+ "yixiaoerId": {
137
+ "type": "string"
138
+ },
139
+ "yixiaoerImageUrl": {
140
+ "type": "string"
141
+ },
142
+ "yixiaoerName": {
143
+ "type": "string"
144
+ }
145
+ },
146
+ "additionalProperties": true
147
+ },
106
148
  "collection": {
107
149
  "type": "object",
108
150
  "required": [
@@ -96,9 +96,23 @@
96
96
  ],
97
97
  "default": 1
98
98
  },
99
+ "prePubTime": {
100
+ "anyOf": [
101
+ {
102
+ "const": 0
103
+ },
104
+ {
105
+ "type": "integer",
106
+ "minimum": 1000000000000,
107
+ "maximum": 9999999999999
108
+ }
109
+ ],
110
+ "description": "定时发布时间,13 位 Unix 毫秒时间戳;须在当前时间后 30 分钟至 48 小时内。只在定时发布时传入,0 表示立即发布。"
111
+ },
99
112
  "scheduledTime": {
100
113
  "type": "number",
101
- "minimum": 0
114
+ "minimum": 0,
115
+ "description": "兼容旧字段;新任务请使用 prePubTime。"
102
116
  }
103
117
  },
104
118
  "additionalProperties": false
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yixiaoer
3
- version: 3.2.34
3
+ version: 3.2.36
4
4
  description: "通过 yxer CLI 操作蚁小二多平台内容分发:账号查询、资源上传、发布前准备、payload 校验、云发布/本机发布、草稿保存、素材登记、发布记录排查与技能同步。"
5
5
  metadata:
6
6
  category: "productivity"
@@ -75,13 +75,14 @@ yxer schema get <platform> <type>
75
75
  - 发布、草稿、素材、排查都只允许通过 `yxer` CLI 执行。
76
76
  - 任何涉及查询、候选选择、payload 修订或写操作的任务,必须先遵循 AI 执行协议中的状态机、确认协议和错误恢复协议。
77
77
  - 涉及写操作或 payload 修订时,必须遵守 [`./references/workflows/data-accuracy.md`](./references/workflows/data-accuracy.md):先查询真实数据,再确认候选,最后 validate / dry-run / 写入。
78
- - BLOCKING REQUIREMENT: 正式发布前确认字段来源,必须以同一份 payload 和同一套通道参数完成 `validate -> publish --dry-run -> publish`。
78
+ - BLOCKING REQUIREMENT: 正式发布前确认字段来源,必须以同一份 payload 和同一套通道参数完成 `validate -> publish --dry-run -> publish`。云端 MCP 试点预览会返回短时 `previewCredential`;只有展示预览并取得用户明确确认后,才使用同一份 payload,并传入 `--preview-credential <token> --confirm-preview` 正式提交。
79
79
  - `prepare`/`publish form`、`schema fields` / `schema get`、workflow、平台文档和 CLI 实际输出,是组装 payload 的唯一依据。
80
80
  - `prepare` 返回的 `data.form` 是可恢复的页面式表单契约;新建发布任务使用 `publish form` 维护字段与来源,不要自行发明字段或路径。通过 `export` 导出标准 payload,再执行校验、预览和发布。
81
81
  - 图片、视频、封面等资源必须先上传,且只能复用 `yxer upload` 返回的真实字段。
82
- - `category`、`location`、`music`、`collection`、`challenge`、`goods`、`drama` 等动态字段必须先通过 `yxer query ...` 查询,不能手写对象;视频号 `drama` 只保留查询结果中的 `yixiaoerId`、`yixiaoerImageUrl`、`yixiaoerName`,不添加 `raw`。多多视频例外:`shopping_cart.goods_id` 是用户手工提供的业务商品 ID,CLI 固定补充 `source=pdd`,不得从 `yxer query goods` 的 `yixiaoerId` 映射。
82
+ - `category`、`location`、`music`、`collection`、`challenge`、`game`、`goods`、`drama` 等动态字段必须先通过 `yxer query ...` 查询,不能手写对象;抖音图文“游戏手柄”使用目标账号 `yxer query games` 结果中的完整 `game` 对象,并设置 `tagType=游戏手柄`;视频号 `drama` 只保留查询结果中的 `yixiaoerId`、`yixiaoerImageUrl`、`yixiaoerName`,不添加 `raw`。多多视频例外:`shopping_cart.goods_id` 是用户手工提供的业务商品 ID,CLI 固定补充 `source=pdd`,不得从 `yxer query goods` 的 `yixiaoerId` 映射。
83
83
  - 淘宝光合 `shopping_cart` 必须先通过目标账号、相同发布类型的 `taobao-guanghe-goods-tabs` 查询可用来源,再使用显式 `--source` 执行 `yxer query taobao-guanghe-goods`;完整保留商品对象和 `raw`,每个账号最多 6 件;不得依赖省略来源时的服务端默认商品池。
84
84
  - CRITICAL: `validate`、`publish --dry-run`、正式 `publish` 必须使用同一套发布通道参数。
85
+ - 云端 MCP 试点的预览凭证有效期为 15 分钟且绑定请求内容、用户和团队;内容变化或凭证过期时重新预览。不得把确认参数当成用户授权的替代品。
85
86
 
86
87
  ## 页面式表单会话
87
88
 
@@ -27,8 +27,6 @@ yxer doctor
27
27
  yxer update [--check] [--global]
28
28
  ```
29
29
 
30
- `yxer update --check` 会查询 npm latest 并返回当前版本、最新版本及是否有更新;普通命令可能在成功响应的 `_notice.update` 中提示升级。首次检查或超过 24 小时后,CLI 会启动一次性后台进程刷新缓存;缓存刷新后,后续普通命令会显示提示。该提示不自动安装,执行 `yxer update` 才会升级 CLI。
31
-
32
30
  ### 本地配置
33
31
 
34
32
  ```bash
@@ -62,6 +60,7 @@ yxer upload --url <resource_url> [--bucket cloud-publish|material-library] [--dr
62
60
  ```bash
63
61
  yxer validate <platform> <type> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>] [--content-file <article.md>]
64
62
  yxer publish <type> <platform> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>] [--content-file <article.md>] [--dry-run]
63
+ yxer publish video 抖音 <payload.json> --preview-credential <token> --confirm-preview
65
64
  yxer publish delete preview <task_set_id>
66
65
  yxer publish delete from-record <task_set_id> --index N [--dry-run]
67
66
  yxer publish delete <task_id> [--dry-run]
@@ -104,6 +103,7 @@ yxer query drama-tasks <account_id> [--query 关键词] [--keyword 关键词]
104
103
  yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
105
104
  yxer query friends <account_id> [--red-id 小红书号] [--query 关键词]
106
105
  yxer query challenges <account_id> [--query 关键词] [--type video]
106
+ yxer query games <account_id> [--query 关键词]
107
107
  yxer query records [--platform P] [--limit N] [--status S] [--json]
108
108
  yxer query account-increments --start-date YYYY-MM-DD --end-date YYYY-MM-DD [--group-id GROUP_ID]
109
109
  yxer prepare <platform> <type>
@@ -136,6 +136,7 @@ yxer schema get <platform> <type>
136
136
  - 本机发布时必须提供 `clientId`
137
137
  - `yxer validate`、`yxer publish --dry-run`、`yxer publish` 使用同一套发布通道解析逻辑
138
138
  - `yxer publish --dry-run` 不创建发布任务,也不会上传正文图片;它返回渲染后的正文和图片处理计划,并在有 API key 的云发布场景执行账号/代理 preflight。最终图片 URL 只有正式 `publish` 上传后才能确定。local dry-run 不检测客户端在线状态。
139
+ - 云端 MCP 试点 dry-run 的 `data.meta.previewCredential` 是绑定预览内容、当前用户和团队的 15 分钟凭证。展示预览并取得用户明确确认后,复用相同 payload 并传入 `--preview-credential <token> --confirm-preview`;payload 改动或凭证过期时重新预览。
139
140
  - 本机发布推荐通过两种方式提供 `clientId`:
140
141
  - flags:`yxer publish <type> <platform> <payload.json> --publish-channel local --client-id <clientId>`
141
142
  - 预设默认值:`yxer config set-local-client-id <clientId>` 后,再执行 `--publish-channel local`
@@ -21,12 +21,6 @@ yxer update
21
21
  yxer doctor
22
22
  ```
23
23
 
24
- ## 自动检测更新
25
-
26
- 每次运行普通 CLI 命令时,yxer 会先读取 `%USERPROFILE%\.yxer\update-state.json` 缓存。缓存缺失或超过 24 小时后,会启动一次性后台进程查询 npm 最新版本并写入缓存;缓存刷新后,后续普通命令会在成功 JSON 响应的 `_notice.update` 中提示运行 `yxer update`。检查不会自动安装,也不会启动常驻服务。
27
-
28
- `yxer update --check` 会实时查询 npm 最新版本并返回 `currentVersion`、`latestVersion` 和 `updateAvailable`,不安装 CLI、不同步 skill。CI 默认跳过启动检查;设置 `YIXIAOER_CLI_NO_UPDATE_NOTIFIER=1` 可关闭本机提示。
29
-
30
24
  ## 标准安装流程
31
25
 
32
26
  ```bash
@@ -53,6 +53,7 @@
53
53
  - 需要组装或补字段时,未执行 `prepare` / `publish form` / `schema fields` 不组装 payload;只有需要 payload 骨架时再补 `schema get`
54
54
  - 未按 `data-accuracy.md` 完成需要查询的动态字段和多候选确认,不继续写 payload 或发布;多多视频 `shopping_cart.goods_id` 按平台规则使用用户明确输入
55
55
  - 未先 `validate` 与 `publish --dry-run` 不执行正式 `publish`
56
+ - 云端 MCP 试点的 `publish --dry-run` 会返回短时 `previewCredential`;只有展示预览并取得明确确认后,才对相同 payload 传入 `--preview-credential <token> --confirm-preview`。请求内容变化或凭证过期时重新预览。
56
57
 
57
58
  ## 常用命令
58
59
 
@@ -1,6 +1,6 @@
1
1
  # 获取商品列表 (Get Goods)
2
2
 
3
- 此接口用于获取指定媒体账号在平台上关联的商品、团购或小店商品列表,以便在发布视频时进行商业推广。
3
+ 此接口用于获取指定媒体账号在平台上关联的商品、团购或小店商品列表,以便在支持的平台发布视频或图文时关联商品。
4
4
 
5
5
  若需要从一个商品链接生成可挂购物车的完整商品对象,使用 `goods-detail`。它解析单个链接,不查询账号的选品车或商品列表。
6
6
 
@@ -28,7 +28,7 @@ yxer query goods-detail YOUR_ACCOUNT_ID --url "商品链接" --json
28
28
 
29
29
  ## 3. 返回数据结构
30
30
 
31
- 返回商品对象数组及分页信息。发布时按目标平台 schema 使用查询结果要求的结构,并完整保留所选商品对象;不要只保留 ID/name 等局部字段。不同平台的挂车结构不同,例如视频号使用单个商品对象,抖音等平台可能要求额外的外层结构。
31
+ 返回商品对象数组及分页信息。发布时按目标平台 schema 使用查询结果要求的结构,并完整保留所选商品对象;不要只保留 ID/name 等局部字段。不同平台的挂车结构不同,例如视频号视频和图文均使用单个商品对象,抖音等平台可能要求额外的外层结构。
32
32
 
33
33
  `yxer query goods-detail` 返回相同的完整商品对象结构,可将其结果中的商品对象用于抖音 `shopping_cart`;该命令只解析链接,不执行发布。
34
34
 
@@ -48,5 +48,8 @@ yxer query goods-detail YOUR_ACCOUNT_ID --url "商品链接" --json
48
48
  | `count` | `number` | 剩余库存 |
49
49
  | `yixiaoerDesc` | `string` | 商品规格说明 |
50
50
  | `yixiaoerImageUrl` | `string` | 商品图片 URL |
51
- | `raw` | `object` | 某些接口或平台可能返回的原始对象;若查询结果包含该字段,按平台 schema 要求完整透传。视频号 GoodListItemResponse 不要求此字段。 |
51
+ | `stockText` | `string` | 平台库存说明文字 |
52
+ | `productEncryptKey` | `string` | 微信小店商品插入草稿所需凭证 |
53
+ | `productType` | `number` | 商品类型 |
54
+ | `raw` | platform-specific | 某些接口或平台可能返回原始数据;若目标平台类型定义了该字段,完整透传。视频号 `GoodListItemResponse` 不包含 `raw`。 |
52
55
 
@@ -5,7 +5,7 @@
5
5
  ## 调用指令 (Command)
6
6
 
7
7
  ```bash
8
- yxer query locations XXX --query 深圳 --type 1 --json
8
+ yxer query locations XXX --query 深圳 --json
9
9
  ```
10
10
 
11
11
  ## 参数列表 (Payload Properties)
@@ -14,7 +14,7 @@ yxer query locations XXX --query 深圳 --type 1 --json
14
14
  | :--- | :--- | :--- | :--- |
15
15
  | `account_id` | `string` | **是** | 蚁小二账号 ID (32位十六进制) |
16
16
  | `keyword` | `string` | 否 | 搜索关键词 |
17
- | `type` | `number` | 否 | 地址权限/搜索类型:`0`: 全部, `1`: 本地 (默认), `2`: 国内, `3`: 海外 |
17
+ | `type` | `number` | 否 | 地址权限/搜索类型:`0`: 全部, `1`: 本地, `2`: 国内, `3`: 海外。省略时不发送 `locationType`,由平台接口决定默认范围 |
18
18
  | `nextPage` | `string` | 否 | 分页标识,在返回结果中获取 |
19
19
 
20
20
  ## 返回结果 (Response)
@@ -44,5 +44,5 @@ yxer query locations XXX --query 深圳 --type 1 --json
44
44
 
45
45
  - **CLI 命令**: `yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3] [--json]`
46
46
  - **功能**: 封装蚁小二标准地理位置查询接口 (`GET /platform-accounts/{platformAccountId}/location`)。
47
- - **参数映射**: 将 `account_id` 映射为路径变量,将 `keyWord`, `locationType`, `nextPage` 映射为查询参数。
47
+ - **参数映射**: 将 `account_id` 映射为路径变量,将 `keyWord`, `nextPage` 映射为查询参数;仅显式传入 `--type` 时才发送 `locationType`。视频号桌面端位置搜索不传 `locationType`,省略 `--type` 可与桌面端保持一致。桌面端会在存在缓存客户端 ID 时发送 `x-local-client`;CLI 在配置 `localPublishClientId` 时也会转发该请求头。
48
48
 
@@ -36,6 +36,7 @@
36
36
  - 搜狐号视频必须使用最新查询结果中从父分类到末级分类的完整 `category` 路径,不能只提交末级分类。
37
37
  - 大鱼号视频必须选择至少一个分类;使用目标账号的 `yxer query categories <account_id> --type video --json` 结果,保留完整分类对象。
38
38
  - 大鱼号视频分类按蚁小二 Web 端固定目录提供。CLI 内置并嵌入这份目录,确认账号属于大鱼号后直接返回,不请求不支持大鱼号的账号分类接口;返回的对象包含 `yixiaoerId`、`yixiaoerName` 和 `raw`。
39
+ - 企鹅号视频分类按蚁小二客户端固定目录提供,来源为客户端 `videoCategories/qi-e-hao.json`。CLI 内置并嵌入相同目录,确认账号属于企鹅号后直接返回,不请求账号分类接口;返回的对象保留 `yixiaoerId`、`yixiaoerName`、原始分类 `raw` 和级联 `child`。
39
40
  - **Agent 手动铺平 (Flattening)**:若返回的数据包含嵌套的 `children` 数组,Agent **必须自行递归遍历**,以便在组装发布表单时能够获取任何层级的分类。
40
41
  - **层级路径组装 (Cascading Path)**:
41
42
  - 对于要求多级分类的平台 (如 Bilibili),Agent 在组装表单时,不能只填入最终选中的子分类。
@@ -30,7 +30,10 @@
30
30
  | `topics` | `Array` | 否 | 话题列表 (`Category[]`, 最多3个) | - |
31
31
  | `declaration` | `number` | 否 | 创作申明: 0-无申明, 1-剧透, 2-医疗建议, 3-虚构创作, 4-理财内容, 5-AI辅助 | 0 |
32
32
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
33
- | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
33
+ | `prePubTime` | `number` | 否 | 定时发布时间;13 位 Unix 毫秒时间戳,须在当前时间后 30 分钟至 48 小时内。省略或传 `0` 表示立即发布 | - |
34
+ | `scheduledTime` | `number` | 否 | `prePubTime` 的兼容旧字段;新 payload 请使用 `prePubTime` | - |
35
+
36
+ 定时发布时使用 `pubType: 1` 并传入 JSON 数字 `prePubTime`。不要传日期字符串、秒级时间戳或知乎接口字段 `schedule.publishAt` / `publish_at`;平台服务会负责转换和组装知乎请求。`pubType: 0` 仅保存草稿,不会提交定时发布请求。
34
37
 
35
38
  ## 2. Payload 完整示例
36
39
 
@@ -51,7 +54,8 @@
51
54
  { "yixiaoerId": "cat_001", "yixiaoerName": "人工智能", "raw": {} }
52
55
  ],
53
56
  "declaration": 5,
54
- "pubType": 1
57
+ "pubType": 1,
58
+ "prePubTime": 1795069380000
55
59
  }
56
60
  }
57
61
  ]
@@ -33,6 +33,8 @@
33
33
  | `images` | `Array` | **是** | 图片数组 (`OldImage[]`) | - |
34
34
  | `location` | `Object` | 否 | 地址信息 (`PlatformDataItem`) | - |
35
35
  | `music` | `Object` | 否 | 音乐信息 (`MusicItem`) | - |
36
+ | `game` | `Object` | 否 | “游戏手柄”标签关联的游戏对象,必须来自目标账号的 `yxer query games` 结果 | - |
37
+ | `tagType` | `string` | 否 | 标签类型;使用游戏组件时设为 `游戏手柄` | - |
36
38
  | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
37
39
  | `collection` | `Object` | 否 | 合集信息 (`Category`) | - |
38
40
  | `sub_collection` | `Object` | 否 | 合集选集信息 (`Category`) | - |
@@ -72,6 +74,19 @@
72
74
  | `yixiaoerName` | `string` | 是 | 显示名称 |
73
75
  | `raw` | `object` | 是 | 平台原始数据。如果在获取时该字段存在,发布表单中必须携带并完整透传 |
74
76
 
77
+ ### 游戏手柄
78
+
79
+ 先按目标账号查询游戏,再使用 `game` 动态字段选择查询结果中的完整对象;同时设置 `tagType` 为 `游戏手柄`。不要手写游戏 ID 或裁剪查询对象:
80
+
81
+ ```bash
82
+ yxer query games <account_id> [--query 关键词] --json
83
+ yxer publish form choose publish-form.json game --value-file games.json --id <yixiaoerId> --source-command "yxer query games <account_id> --json"
84
+ yxer publish form set publish-form.json publishArgs.accountForms[0].contentPublishForm.tagType --value '"游戏手柄"'
85
+ ```
86
+
87
+ `choose` 写入的游戏对象必须保留查询结果中的 `yixiaoerId`、`yixiaoerName`、`yixiaoerImageUrl` 及其他字段。客户端 `GameResponseItem.raw` 是可选字符串;查询结果包含时原样透传,不要转换成对象。`tagType=游戏手柄` 时必须提供 `game`;设置 `game` 时也必须设置 `tagType`。
88
+ 如果查询命令带了 `--query`,`--source-command` 中也要逐字写入实际使用的关键词参数。
89
+
75
90
 
76
91
 
77
92
  ## 3. Payload 完整示例
@@ -30,6 +30,7 @@
30
30
  | `images` | `Array` | **是** | 图片数组 (`OldImage[]`),1-18 张 | - |
31
31
  | `location` | `Object` | 否 | 位置对象 (`PlatformDataItem`) | - |
32
32
  | `music` | `Object` | 否 | 音乐对象 (`MusicItem`) | - |
33
+ | `shopping_cart` | `object` | 否 | 关联单个商品:使用 `yxer query goods` 返回的完整 `GoodListItemResponse`,不包装为数组 | - |
33
34
  | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
34
35
  | `collection` | `Object` | 否 | 合集信息,使用 `Collection` 结构 | - |
35
36
  | `declaration` | `number` | 否 | 创作声明:0-无需标注,1-含AI生成内容,2-营销广告,3-虚构剧情,7-转载,8-个人观点 | 0 |
@@ -37,6 +38,17 @@
37
38
 
38
39
  含 AI 生成内容时,请设置 `contentPublishForm.declaration` 为 `1`。
39
40
 
41
+ ### 商品关联
42
+
43
+ 客户端图文契约包含可选的 `shopping_cart?: GoodListItemResponse`,CLI 现已接受相同字段。先查询目标账号的商品,再通过 `publish form choose` 选择一个完整商品对象;不要包装成数组或裁剪查询字段:
44
+
45
+ ```bash
46
+ yxer query goods <account_id> --json
47
+ yxer publish form choose <session.json> shopping_cart --value-file <query.json> --id <商品yixiaoerId> --source-command "yxer query goods <account_id> --json"
48
+ ```
49
+
50
+ `shopping_cart` 路径为 `publishArgs.accountForms[].contentPublishForm.shopping_cart`。选择商品时,查询账号必须与表单中的目标账号一致。
51
+
40
52
  ## 1.1 封面派生规则
41
53
 
42
54
  视频号图文没有单独的外部封面参数。只需提供 `contentPublishForm.images`;CLI 会在内部默认使用 `images[0]` 派生 `cover` / `coverKey`,不要在 payload 中额外手写封面字段。
@@ -93,6 +105,11 @@
93
105
  "formType": "task",
94
106
  "title": "视频号动态标题",
95
107
  "description": "<p>视频号图文内容 <topic text='微信' raw='{\"id\":\"xxx\",\"name\":\"微信\"}'>#微信</topic></p>",
108
+ "shopping_cart": {
109
+ "yixiaoerId": "goods_001",
110
+ "yixiaoerName": "示例商品",
111
+ "price": 1990
112
+ },
96
113
  "declaration": 1,
97
114
  "pubType": 0,
98
115
  "images": [
@@ -112,5 +129,6 @@
112
129
  | `location` | `locations` | [获取位置信息](../../get-locations.md) |
113
130
  | `collection` | `collections` | [获取合集列表](../../get-collections.md) |
114
131
  | `music` | `music` | [获取背景音乐](../../get-music.md) |
132
+ | `shopping_cart` | `goods` | [获取商品列表](../../get-goods.md) |
115
133
  | `tags` | `challenges` | [获取话题/挑战](../../get-challenges.md) |
116
134
  | `images.key` | `upload` | [资源上传](../../upload-resource.md) |
@@ -36,6 +36,7 @@
36
36
  | `tags` | `string[]` | 否 | 视频标签 (1-6 个) | - |
37
37
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
38
38
  | `statement` | `object` | 否 | 内容声明对象;未声明时可省略 | - |
39
+ | `first_exclusive_publish_v2` | 字符串或整数 | 否 | 高权益账号原创声明:`first_24h`/`first_48h`/`first_72h` 表示 24/48/72 小时首发,`2` 表示独家,`3` 表示不声明 | - |
39
40
  | `location` | `Object` | 否 | 位置信息,使用 `PlatformDataItem` 结构 | - |
40
41
  | `scheduledTime` | `number` | 否 | 定时发布时间戳 (13 位 Unix 时间戳,单位: 毫秒) | - |
41
42
  | `collection` | `Object` | 否 | 合集信息 (`yixiaoerId`, `yixiaoerName`, `raw`) | - |
@@ -52,6 +53,10 @@
52
53
 
53
54
  客户端会把 `statement.type` 和 `statement.subType` 转换为百家号请求字段 `publish_statement` 和 `publish_statement_sub`,并根据主声明派生 `activity_list.aigc_bjh_status`;CLI 只接收 `statement` 对象,不要直接填写这些平台请求字段。
54
55
 
56
+ ### 1.2 高权益原创声明
57
+
58
+ `first_exclusive_publish_v2` 与 `statement` 是两个独立字段。设置 `first_24h`、`first_48h`、`first_72h` 或整数 `2` 时,CLI 会在 `validate`、`publish --dry-run` 和正式发布前按目标账号查询 `account-info`,并要求 `ability.first_exclusive_v2_all` 与 `ability.can_edit_first_exclusive_v2` 都严格等于 `1`。缺少权益、查询失败或返回状态未确认时会拒绝继续。普通账号使用不声明(整数 `3`)或省略此字段。
59
+
55
60
  ## 2. Payload 完整示例
56
61
 
57
62
  ```json
@@ -100,6 +105,7 @@
100
105
  "type": 1,
101
106
  "subType": 4
102
107
  },
108
+ "first_exclusive_publish_v2": "first_48h",
103
109
  "location": {
104
110
  "yixiaoerId": "loc_001",
105
111
  "yixiaoerName": "北京市",
@@ -14,7 +14,8 @@
14
14
  ## 执行逻辑 (Logic Flow)
15
15
  1. **意图确认**:确认目标平台为Qiehao。
16
16
  2. **参数装配**:识别并填充标题、描述等平台特定字段至 `contentPublishForm`。
17
- 3. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
17
+ 3. **分类查询**:视频发布前执行 `yxer query categories <account_id> --type video --json`。企鹅号视频分类遵循客户端内置目录 `apps/web-root/shared/lib/http/services/web/platform/videoCategories/qi-e-hao.json`;CLI 随程序嵌入同一份分类树,不请求账号分类接口。
18
+ 4. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
18
19
 
19
20
 
20
21
  ## 1. contentPublishForm 数据结构
@@ -36,7 +37,7 @@
36
37
 
37
38
  > [!IMPORTANT]
38
39
  > **规则 (Rule)**:
39
- > 所有的 `raw` 数据必须透传通过分类接口获取的原始对象。
40
+ > 所有的 `raw` 数据必须透传 `yxer query categories` 返回的原始对象。企鹅号视频分类来自客户端固定目录,CLI 返回的每个分类项仍包含对应的原始 `raw` 对象。
40
41
 
41
42
  | 字段名 | 类型 | 必填 | 说明 |
42
43
  | :--- | :--- | :--- | :--- |
@@ -60,7 +60,6 @@ yxer update --global
60
60
  - 当前 skill 包中的 `SKILL.md` 更新后
61
61
  - `skills/yixiaoer/references/` 中影响 Agent 行为的文档更新后
62
62
  - `yxer doctor` 返回 `_notice.skills`
63
- - 成功输出包含 `_notice.update` 时,完成当前请求后提示用户运行 `yxer update`;该提示不会自动安装。首次检查可能要等后台缓存刷新后,在后续命令输出中出现。
64
63
 
65
64
  ## 输出协议
66
65