@yixiaoermail/cli 3.2.4 → 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.
- package/checksums.txt +6 -6
- package/package.json +1 -1
- package/references/cli/command-design.md +1 -1
- package/references/cli/command-reference.md +30 -39
- package/references/cli/publish-channels.md +77 -0
- package/references/create-account-group.md +27 -0
- package/references/delete-account-group.md +20 -0
- package/references/domains/accounts-and-env.md +43 -0
- package/references/domains/draft-and-material.md +34 -0
- package/references/domains/install-and-sync.md +63 -0
- package/references/domains/publish.md +84 -0
- package/references/domains/troubleshooting.md +34 -0
- package/references/execution-standard.md +144 -0
- package/references/get-account-groups.md +15 -0
- package/references/get-account-overviews.md +56 -0
- package/references/get-challenges.md +14 -0
- package/references/get-collections.md +34 -0
- package/references/get-content-overviews.md +59 -0
- package/references/get-friends.md +9 -0
- package/references/get-games.md +39 -0
- package/references/get-goods.md +42 -0
- package/references/get-groups.md +35 -0
- package/references/get-hot-events.md +14 -0
- package/references/get-locations.md +48 -0
- package/references/get-members.md +28 -0
- package/references/get-miniapps.md +38 -0
- package/references/get-music-categories.md +41 -0
- package/references/get-music.md +67 -0
- package/references/get-publish-activities.md +40 -0
- package/references/get-publish-categories.md +62 -0
- package/references/get-sync-apps.md +14 -0
- package/references/get-topics.md +13 -0
- package/references/go-live-process.md +160 -0
- package/references/keyword-reference.md +114 -0
- package/references/legacy/capabilities.md +1 -1
- package/references/material-resource.md +88 -0
- package/references/platform-doc-maintenance.md +33 -0
- package/references/platform.md +62 -0
- package/references/platforms/article/acfun.md +90 -0
- package/references/platforms/article/aiqiyi.md +56 -0
- package/references/platforms/article/baijiahao.md +94 -0
- package/references/platforms/article/bilibili.md +88 -0
- package/references/platforms/article/chejiahao.md +81 -0
- package/references/platforms/article/csdn.md +86 -0
- package/references/platforms/article/dayuhao.md +78 -0
- package/references/platforms/article/douban.md +62 -0
- package/references/platforms/article/douyin.md +106 -0
- package/references/platforms/article/index.md +157 -0
- package/references/platforms/article/jianshu.md +58 -0
- package/references/platforms/article/kuaichuanhao.md +78 -0
- package/references/platforms/article/qiehao.md +78 -0
- package/references/platforms/article/souhuhao.md +75 -0
- package/references/platforms/article/toutiaohao.md +78 -0
- package/references/platforms/article/wangyihao.md +79 -0
- package/references/platforms/article/weixingongzhonghao.md +135 -0
- package/references/platforms/article/xinlangweibo.md +75 -0
- package/references/platforms/article/xueqiuhao.md +73 -0
- package/references/platforms/article/yichehao.md +92 -0
- package/references/platforms/article/yidianhao.md +76 -0
- package/references/platforms/article/zhihu.md +75 -0
- package/references/platforms/imageText/baijiahao.md +102 -0
- package/references/platforms/imageText/douyin.md +111 -0
- package/references/platforms/imageText/index.md +113 -0
- package/references/platforms/imageText/kuaishou.md +106 -0
- package/references/platforms/imageText/shipinhao.md +112 -0
- package/references/platforms/imageText/toutiaohao.md +76 -0
- package/references/platforms/imageText/xiaohongshu.md +85 -0
- package/references/platforms/imageText/xinlangweibo.md +77 -0
- package/references/platforms/imageText/zhihu.md +92 -0
- package/references/platforms/index.md +6 -6
- package/references/platforms/video/acfun.md +82 -0
- package/references/platforms/video/aiqiyi.md +89 -0
- package/references/platforms/video/baijiahao.md +89 -0
- package/references/platforms/video/bilibili-open.md +59 -0
- package/references/platforms/video/bilibili.md +80 -0
- package/references/platforms/video/chejiahao.md +63 -0
- package/references/platforms/video/dayuhao.md +91 -0
- package/references/platforms/video/dewu.md +80 -0
- package/references/platforms/video/douyin.md +173 -0
- package/references/platforms/video/duoduoshipin.md +64 -0
- package/references/platforms/video/facebook.md +37 -0
- package/references/platforms/video/fengwang.md +81 -0
- package/references/platforms/video/index.md +173 -0
- package/references/platforms/video/instagram.md +40 -0
- package/references/platforms/video/kuaishou-open.md +44 -0
- package/references/platforms/video/kuaishou.md +77 -0
- package/references/platforms/video/meipai.md +79 -0
- package/references/platforms/video/meiyou.md +59 -0
- package/references/platforms/video/pipixia.md +58 -0
- package/references/platforms/video/qiehao.md +91 -0
- package/references/platforms/video/shipinhao.md +100 -0
- package/references/platforms/video/souhuhao.md +91 -0
- package/references/platforms/video/souhushipin.md +64 -0
- package/references/platforms/video/tengxunshipin.md +63 -0
- package/references/platforms/video/tiktok.md +50 -0
- package/references/platforms/video/toutiaohao.md +66 -0
- package/references/platforms/video/wangyihao.md +93 -0
- package/references/platforms/video/weishi.md +61 -0
- package/references/platforms/video/xiaohongshu.md +133 -0
- package/references/platforms/video/xiaohongshushop.md +92 -0
- package/references/platforms/video/xinlangweibo.md +79 -0
- package/references/platforms/video/yichehao.md +61 -0
- package/references/platforms/video/yidianhao.md +85 -0
- package/references/platforms/video/youtube.md +53 -0
- package/references/platforms/video/zhihu.md +85 -0
- package/references/protocols/confirmation.md +62 -0
- package/references/protocols/error-recovery.md +50 -0
- package/references/protocols/execution.md +65 -0
- package/references/protocols/provenance.md +61 -0
- package/references/proxy-management.md +69 -0
- package/references/query-accounts.md +85 -0
- package/references/save-draft.md +75 -0
- package/references/topic-tags.md +140 -0
- package/references/troubleshooting-guide.md +105 -0
- package/references/update-account-group.md +28 -0
- package/references/upload-resource.md +70 -0
- package/references/usage-workflow.md +207 -0
- package/references/workflows/common-rules.md +57 -27
- package/references/workflows/data-accuracy.md +83 -0
- package/references/workflows/local-vs-cloud.md +12 -5
- package/references/workflows/payload-sourcing.md +3 -0
- package/references/workflows/publish-article.md +5 -3
- package/references/workflows/publish-imageText.md +5 -3
- package/references/workflows/publish-troubleshooting.md +1 -1
- package/references/workflows/publish-video.md +6 -4
- package/references/yixiaoer-shared.md +106 -0
- package/schemas/platforms/acfun.article.schema.json +9 -9
- package/schemas/platforms/baijiahao.article.schema.json +8 -0
- package/schemas/platforms/baijiahao.video.schema.json +19 -2
- package/schemas/platforms/bilibili-open.video.schema.json +188 -0
- package/schemas/platforms/chejiahao.article.schema.json +7 -7
- package/schemas/platforms/dayuhao.video.schema.json +26 -0
- package/schemas/platforms/douyin.article.schema.json +8 -0
- package/schemas/platforms/douyin.imageText.schema.json +16 -2
- package/schemas/platforms/douyin.video.schema.json +88 -6
- package/schemas/platforms/kuaichuanhao.article.schema.json +20 -8
- package/schemas/platforms/kuaishou-open.video.schema.json +102 -0
- package/schemas/platforms/kuaishou.imageText.schema.json +12 -2
- package/schemas/platforms/kuaishou.video.schema.json +31 -0
- package/schemas/platforms/shipinhao.imageText.schema.json +13 -1
- package/schemas/platforms/shipinhao.video.schema.json +31 -0
- package/schemas/platforms/souhushipin.video.schema.json +3 -3
- package/schemas/platforms/tengxunshipin.video.schema.json +1 -0
- package/schemas/platforms/toutiaohao.imageText.schema.json +2 -1
- package/schemas/platforms/toutiaohao.video.schema.json +2 -1
- package/schemas/platforms/wangyihao.article.schema.json +6 -5
- package/schemas/platforms/wangyihao.video.schema.json +1 -0
- package/schemas/platforms/xhs.imageText.schema.json +27 -25
- package/schemas/platforms/xiaohongshu.video.schema.json +2 -1
- package/schemas/platforms/xinlang.imageText.schema.json +23 -2
- package/schemas/platforms/xinlang.video.schema.json +40 -10
- package/schemas/platforms/yidianhao.article.schema.json +1 -0
- package/schemas/platforms/yidianhao.video.schema.json +9 -8
- package/skills/yixiaoer/SKILL.md +30 -4
- package/skills/yixiaoer/references/cli/command-design.md +305 -0
- package/skills/yixiaoer/references/cli/command-reference.md +19 -6
- package/skills/yixiaoer/references/cli/publish-channels.md +77 -0
- package/skills/yixiaoer/references/domains/accounts-and-env.md +6 -2
- package/skills/yixiaoer/references/domains/draft-and-material.md +8 -3
- package/skills/yixiaoer/references/domains/publish.md +17 -10
- package/skills/yixiaoer/references/domains/troubleshooting.md +6 -2
- package/skills/yixiaoer/references/get-account-groups.md +2 -1
- package/skills/yixiaoer/references/go-live-process.md +2 -2
- package/skills/yixiaoer/references/keyword-reference.md +3 -2
- package/skills/yixiaoer/references/legacy/capabilities.md +37 -0
- package/skills/yixiaoer/references/platform.md +2 -1
- package/skills/yixiaoer/references/platforms/article/acfun.md +1 -1
- package/skills/yixiaoer/references/platforms/article/aiqiyi.md +1 -1
- package/skills/yixiaoer/references/platforms/article/baijiahao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/bilibili.md +1 -1
- package/skills/yixiaoer/references/platforms/article/chejiahao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/csdn.md +1 -1
- package/skills/yixiaoer/references/platforms/article/dayuhao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/douban.md +1 -1
- package/skills/yixiaoer/references/platforms/article/douyin.md +1 -1
- package/skills/yixiaoer/references/platforms/article/index.md +2 -2
- package/skills/yixiaoer/references/platforms/article/jianshu.md +1 -1
- package/skills/yixiaoer/references/platforms/article/kuaichuanhao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/qiehao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/souhuhao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/toutiaohao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/wangyihao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/weixingongzhonghao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/xinlangweibo.md +1 -1
- package/skills/yixiaoer/references/platforms/article/xueqiuhao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/yichehao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/yidianhao.md +1 -1
- package/skills/yixiaoer/references/platforms/article/zhihu.md +1 -1
- package/skills/yixiaoer/references/platforms/imageText/baijiahao.md +1 -1
- package/skills/yixiaoer/references/platforms/imageText/douyin.md +1 -1
- package/skills/yixiaoer/references/platforms/imageText/index.md +5 -8
- package/skills/yixiaoer/references/platforms/imageText/kuaishou.md +1 -1
- package/skills/yixiaoer/references/platforms/imageText/shipinhao.md +4 -17
- package/skills/yixiaoer/references/platforms/imageText/toutiaohao.md +1 -1
- package/skills/yixiaoer/references/platforms/imageText/xiaohongshu.md +4 -7
- package/skills/yixiaoer/references/platforms/imageText/xinlangweibo.md +1 -1
- package/skills/yixiaoer/references/platforms/imageText/zhihu.md +1 -1
- package/skills/yixiaoer/references/platforms/video/acfun.md +1 -1
- package/skills/yixiaoer/references/platforms/video/aiqiyi.md +1 -1
- package/skills/yixiaoer/references/platforms/video/baijiahao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/bilibili-open.md +33 -61
- package/skills/yixiaoer/references/platforms/video/bilibili.md +1 -1
- package/skills/yixiaoer/references/platforms/video/chejiahao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/dayuhao.md +3 -1
- package/skills/yixiaoer/references/platforms/video/dewu.md +1 -1
- package/skills/yixiaoer/references/platforms/video/douyin.md +41 -11
- package/skills/yixiaoer/references/platforms/video/duoduoshipin.md +1 -1
- package/skills/yixiaoer/references/platforms/video/fengwang.md +1 -1
- package/skills/yixiaoer/references/platforms/video/index.md +6 -2
- package/skills/yixiaoer/references/platforms/video/kuaishou-open.md +20 -39
- package/skills/yixiaoer/references/platforms/video/kuaishou.md +1 -1
- package/skills/yixiaoer/references/platforms/video/meipai.md +1 -1
- package/skills/yixiaoer/references/platforms/video/meiyou.md +1 -1
- package/skills/yixiaoer/references/platforms/video/pipixia.md +1 -1
- package/skills/yixiaoer/references/platforms/video/qiehao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/shipinhao.md +7 -2
- package/skills/yixiaoer/references/platforms/video/souhuhao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/souhushipin.md +1 -1
- package/skills/yixiaoer/references/platforms/video/tengxunshipin.md +1 -1
- package/skills/yixiaoer/references/platforms/video/toutiaohao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/wangyihao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/weishi.md +1 -1
- package/skills/yixiaoer/references/platforms/video/xiaohongshu.md +1 -1
- package/skills/yixiaoer/references/platforms/video/xiaohongshushop.md +1 -1
- package/skills/yixiaoer/references/platforms/video/xinlangweibo.md +1 -1
- package/skills/yixiaoer/references/platforms/video/yichehao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/yidianhao.md +1 -1
- package/skills/yixiaoer/references/platforms/video/zhihu.md +1 -1
- package/skills/yixiaoer/references/protocols/confirmation.md +62 -0
- package/skills/yixiaoer/references/protocols/error-recovery.md +50 -0
- package/skills/yixiaoer/references/protocols/execution.md +65 -0
- package/skills/yixiaoer/references/protocols/provenance.md +61 -0
- package/skills/yixiaoer/references/upload-resource.md +7 -0
- package/skills/yixiaoer/references/usage-workflow.md +1 -1
- package/skills/yixiaoer/references/workflows/common-rules.md +37 -16
- package/skills/yixiaoer/references/workflows/local-vs-cloud.md +12 -5
- package/skills/yixiaoer/references/workflows/publish-troubleshooting.md +1 -1
- package/skills/yixiaoer/references/workflows/publish-video.md +1 -1
- package/skills/yixiaoer/references/yixiaoer-shared.md +18 -7
- package/skills/yixiaoer/references/platforms/get-locations.md +0 -5
- package/skills/yixiaoer/references/platforms/imageText/weixinshipinhao.md +0 -7
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 更新账号分组
|
|
2
|
+
|
|
3
|
+
用于更新账号分组,对应接口 `PATCH /groups/{groupId}`。
|
|
4
|
+
|
|
5
|
+
## 推荐命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yxer account-group update group_1 新版核心账号组 --dry-run
|
|
9
|
+
yxer account-group update group_1 新版核心账号组
|
|
10
|
+
yxer account-group update group_1 新版核心账号组 --visible-scope all --dry-run
|
|
11
|
+
yxer account-group update group_1 新版核心账号组 --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
|
+
- 路径参数 `groupId` 使用命令第一个位置参数传入。
|
|
21
|
+
- `--visible-scope specific` 时,必须至少传入一个 `--visible-user <userId>`。
|
|
22
|
+
- 当涉及“指定成员可见”时,应先执行 [`yxer query members`](./get-members.md) 获取真实成员 ID,再回填到 `--visible-user`。
|
|
23
|
+
- 写操作先执行 `--dry-run`,确认请求体后再正式提交。
|
|
24
|
+
|
|
25
|
+
## 输出说明
|
|
26
|
+
|
|
27
|
+
- `--dry-run` 返回预览请求,不产生实际副作用。
|
|
28
|
+
- 正式执行返回远端更新结果,字段以 CLI 实际 JSON 输出为准。
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# 上传资源 (Upload Resource)
|
|
2
|
+
|
|
3
|
+
将图片、视频或其它素材上传至蚁小二云端存储 (OSS),并获取用于发布的资源 Key。这是自动化发布的前置步骤。
|
|
4
|
+
|
|
5
|
+
## 触发场景 (Trigger)
|
|
6
|
+
- **意图辨析**:当用户提供原始 URL 或本地路径,并准备进行发布 (publish) 或存入素材库 (material) 之前,必须先将资源“物理上传”以获得系统可识别的 Key。
|
|
7
|
+
- **典型提示词**:
|
|
8
|
+
- “把这个视频传上去”
|
|
9
|
+
- “准备发布,上传封面图”
|
|
10
|
+
- “获取这个短剧资源的 Key”
|
|
11
|
+
|
|
12
|
+
> [!IMPORTANT]
|
|
13
|
+
> **素材库上传特殊说明**: 当用户明确要求“上传到素材库”时,这只是第一步 (`upload`),完成后**必须**紧接着执行第二步 (`material`) 登记入库,否则上传仅停留在临时 OSS 空间。
|
|
14
|
+
|
|
15
|
+
## 参数定义 (Parameters)
|
|
16
|
+
|
|
17
|
+
### 参数列表 (Payload Properties)
|
|
18
|
+
|
|
19
|
+
| 字段名 | 类型 | 是否必填 | 描述 |
|
|
20
|
+
| :--- | :--- | :--- | :--- |
|
|
21
|
+
| `action` | `string` | **是** | 固定值:`upload` |
|
|
22
|
+
| `url` | `string` | **是** | 资源的远程 URL 或本地绝对路径 |
|
|
23
|
+
| `bucket` | `string` | **否** | OSS 存储桶。默认 `cloud-publish`;若后续要调用素材库 `action: "material"`,必须使用 `material-library` |
|
|
24
|
+
| `contentType` | `string` | **是** | 资源的 MIME 类型 (如 `video/mp4`, `image/png`)。**严格要求**: 请求预签名 URL 时声明的 `contentType` 必须与执行 PUT 上传时 Header 中的 `Content-Type` **完全一致**。 |
|
|
25
|
+
| `size` | `number` | 否 | 资源大小 (字节)。 |
|
|
26
|
+
|
|
27
|
+
## 执行逻辑 (Logic Flow)
|
|
28
|
+
1. **源检测**:识别 URL 是远程地址还是本地物理路径。
|
|
29
|
+
2. **目标桶确认**:根据用户是否提到“素材库”决定 `bucket`(`cloud-publish` vs `material-library`)。
|
|
30
|
+
3. **类型嗅探**:尝试根据后缀名自动推断 `contentType`,若失败则提示用户或使用通用流类型。
|
|
31
|
+
4. **指令执行**:调用 `yxer upload <file_path_or_url> [--bucket cloud-publish|material-library]`。
|
|
32
|
+
5. **Key 提取**:获取返回的 `key`,并作为后续发布 Payload 的输入(如 `coverKey`, `video.key`)。
|
|
33
|
+
|
|
34
|
+
> [!IMPORTANT]
|
|
35
|
+
> **视频号 512KB 图片限制**:
|
|
36
|
+
> 上传视频号视频封面或视频号图文图片时,必须带平台用途参数:
|
|
37
|
+
> `yxer upload <图片路径或URL> --platform 视频号 --usage cover` 或 `--usage image`。
|
|
38
|
+
> 当图片超过 512KB 时,CLI 会在内部压缩后再上传,并在 JSON 返回中标记 `compressed: true`、`originalSize` 和压缩后的 `size`;后续 payload 必须使用这次上传返回的完整对象。
|
|
39
|
+
|
|
40
|
+
> [!IMPORTANT]
|
|
41
|
+
> **Instagram / Meta 兼容性**:
|
|
42
|
+
> 若后续要发 Instagram 视频,原视频文件名不要使用中文、空格或其它非 ASCII 字符。Meta 会主动回拉蚁小二返回的媒体 URL;若 URL 路径中带中文,Meta 下载器可能直接返回 HTTP 400,导致“创建发布容器失败 / The media could not be fetched from the provided URI”。
|
|
43
|
+
|
|
44
|
+
## 输出结果 (Output)
|
|
45
|
+
|
|
46
|
+
输出生成的资源标识,供发布脚本引用:
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"key": "cloud-publish/2026/03/26/66b2xxx/xxx.jpg",
|
|
50
|
+
"name": "xxx.jpg",
|
|
51
|
+
"bucket": "cloud-publish"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
**注意**: 在发布文章或视频时,请直接传入返回的 `key` 字符串作为封面或图片地址。
|
|
55
|
+
|
|
56
|
+
## 调用指令 (Command)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
yxer upload https://example.com/image.jpg --bucket cloud-publish
|
|
60
|
+
yxer upload ./cover.png --platform 视频号 --usage cover
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
> [!IMPORTANT]
|
|
64
|
+
> **发布合规性提醒**:
|
|
65
|
+
> 所有的封面图、图文图片、视频文件均**严禁直接使用外部网络 URL**,必须通过本项目提供的上传接口进行处理并获取 `key` 后进行发布。不遵守此规范将直接导致任务失败。
|
|
66
|
+
|
|
67
|
+
> [!CAUTION]
|
|
68
|
+
> **ContentType 签名一致性**:
|
|
69
|
+
> 在上传资源时,必须确保获取上传地址所传入的 `contentType` 参数与 PUT 请求实际发送的 `Content-Type` Header **完全一致**。
|
|
70
|
+
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# yxer 使用流程文档
|
|
2
|
+
|
|
3
|
+
本文档面向实施、运营和使用同学,说明从首次安装到正式发布的标准使用流程。
|
|
4
|
+
|
|
5
|
+
## 1. 首次使用流程
|
|
6
|
+
|
|
7
|
+
### 步骤 1:安装 CLI
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @yixiaoermail/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### 步骤 2:初始化配置
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yxer --version
|
|
17
|
+
yxer config init --api-key <apiKey>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 步骤 3:安装 Skill
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
yxer skill sync
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 步骤 4:检查环境
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
yxer doctor
|
|
30
|
+
yxer config get
|
|
31
|
+
yxer skill show
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 2. 日常发布标准流程
|
|
35
|
+
|
|
36
|
+
所有发布任务建议固定按以下顺序执行。
|
|
37
|
+
|
|
38
|
+
### 步骤 1:检查环境
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
yxer doctor
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 步骤 2:查询目标账号
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
yxer accounts list 抖音 --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
确认目标账号可用,通常需要 `status=1`。
|
|
51
|
+
|
|
52
|
+
### 步骤 3:获取表单和 Schema
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
yxer prepare 抖音 video
|
|
56
|
+
yxer schema get 抖音 video
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
这一步用于确认必填字段、字段结构和枚举值。
|
|
60
|
+
|
|
61
|
+
### 步骤 4:上传资源
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
yxer upload --file .\video.mp4
|
|
65
|
+
yxer upload --file .\cover.jpg
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
说明:
|
|
69
|
+
|
|
70
|
+
- 图片、视频等资源必须先上传
|
|
71
|
+
- 不能直接在 payload 里手填外部 URL 冒充上传结果
|
|
72
|
+
|
|
73
|
+
### 步骤 5:查询复杂对象
|
|
74
|
+
|
|
75
|
+
按平台需要查询分类、位置、音乐、商品、合集或话题:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
yxer query categories <account_id> --type video
|
|
79
|
+
yxer query locations <account_id> --query 上海
|
|
80
|
+
yxer query music <account_id> --query 热门
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 步骤 6:填写 payload
|
|
84
|
+
|
|
85
|
+
标准结构示例:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"action": "publish",
|
|
90
|
+
"publishType": "video",
|
|
91
|
+
"platforms": ["抖音"],
|
|
92
|
+
"publishChannel": "cloud",
|
|
93
|
+
"publishArgs": {
|
|
94
|
+
"accountForms": [
|
|
95
|
+
{
|
|
96
|
+
"platformAccountId": "<platformAccountId>",
|
|
97
|
+
"contentPublishForm": {
|
|
98
|
+
"formType": "task"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 步骤 7:校验
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
yxer validate 抖音 video .\payload.json
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 步骤 8:预演发布
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
yxer publish video 抖音 .\payload.json --dry-run
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 步骤 9:正式发布
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
yxer publish video 抖音 .\payload.json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## 3. 本机发布流程
|
|
125
|
+
|
|
126
|
+
当用户明确要求本机发布、本地发布或客户端发布时,必须使用 `local` 通道。
|
|
127
|
+
|
|
128
|
+
### 步骤 1:配置 `clientId`
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
yxer config set-local-client-id <clientId>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 步骤 2:按本机模式校验
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
yxer validate 抖音 video .\payload.json --publish-channel local --client-id <clientId>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 步骤 3:本机模式预演
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId> --dry-run
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### 步骤 4:本机正式发布
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## 4. AI Skill 使用流程
|
|
153
|
+
|
|
154
|
+
如果是 AI agent 调用本项目,推荐顺序如下:
|
|
155
|
+
|
|
156
|
+
1. 读取 `skills/yixiaoer/SKILL.md`
|
|
157
|
+
2. 读取 `skills/yixiaoer/references/workflows/common-rules.md`
|
|
158
|
+
3. 根据内容类型读取对应 workflow
|
|
159
|
+
4. 调用 `yxer doctor`
|
|
160
|
+
5. 调用 `yxer prepare` 和 `yxer schema get`
|
|
161
|
+
6. 生成 payload 后先 `validate`
|
|
162
|
+
7. 最后执行 `publish`
|
|
163
|
+
|
|
164
|
+
## 5. 常见故障处理
|
|
165
|
+
|
|
166
|
+
### `doctor` 提示 skill 未同步
|
|
167
|
+
|
|
168
|
+
执行:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
yxer skill sync
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 云发布失败,提示代理问题
|
|
175
|
+
|
|
176
|
+
处理建议:
|
|
177
|
+
|
|
178
|
+
- 检查账号代理配置
|
|
179
|
+
- 必要时改为本机发布
|
|
180
|
+
|
|
181
|
+
### 本机发布失败,提示客户端不在线
|
|
182
|
+
|
|
183
|
+
处理建议:
|
|
184
|
+
|
|
185
|
+
- 启动并登录蚁小二客户端
|
|
186
|
+
- 重新执行本机发布
|
|
187
|
+
|
|
188
|
+
### 校验失败
|
|
189
|
+
|
|
190
|
+
处理建议:
|
|
191
|
+
|
|
192
|
+
- 回到 `prepare` 和 `schema get` 重新核对字段
|
|
193
|
+
- 不要猜字段,不要手写未经确认的复杂对象
|
|
194
|
+
|
|
195
|
+
## 6. 最小可用命令集
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
yxer doctor
|
|
199
|
+
yxer config get
|
|
200
|
+
yxer accounts list
|
|
201
|
+
yxer prepare <platform> <type>
|
|
202
|
+
yxer schema get <platform> <type>
|
|
203
|
+
yxer upload --file <file>
|
|
204
|
+
yxer validate <platform> <type> <payload.json>
|
|
205
|
+
yxer publish <type> <platform> <payload.json> --dry-run
|
|
206
|
+
yxer publish <type> <platform> <payload.json>
|
|
207
|
+
```
|
|
@@ -10,28 +10,46 @@
|
|
|
10
10
|
|
|
11
11
|
## 强制门禁
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
发布类任务分为两条路径。已有完整标准 `payload.json` 时走快速路径;缺账号、字段、资源或动态字段时走组装路径。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### 快速路径
|
|
16
|
+
|
|
17
|
+
1. 读取 `../../SKILL.md`
|
|
18
|
+
2. 读取当前文件和对应类型 workflow
|
|
19
|
+
3. 确认 payload 是标准结构且不含占位符
|
|
20
|
+
4. 执行 `yxer validate`
|
|
21
|
+
5. 执行 `yxer publish --dry-run`
|
|
22
|
+
6. 用户授权后执行正式 `yxer publish`
|
|
23
|
+
|
|
24
|
+
### 组装路径
|
|
25
|
+
|
|
26
|
+
当 payload 尚未完整,必须满足以下顺序;任意一步未完成,都不允许继续到下一步:
|
|
27
|
+
|
|
28
|
+
1. 读取 `../../SKILL.md`
|
|
16
29
|
2. 读取当前文件
|
|
17
|
-
3. 读取 `account-selection.md`、`local-vs-cloud.md`、`payload-sourcing.md`
|
|
18
|
-
4.
|
|
19
|
-
5.
|
|
20
|
-
6. 执行 `yxer
|
|
21
|
-
7. 执行 `yxer
|
|
22
|
-
8.
|
|
23
|
-
9.
|
|
24
|
-
10.
|
|
25
|
-
11.
|
|
26
|
-
12.
|
|
27
|
-
13.
|
|
30
|
+
3. 读取 `data-accuracy.md`、`account-selection.md`、`local-vs-cloud.md`、`payload-sourcing.md`
|
|
31
|
+
4. 如涉及话题/标签,读取 `../topic-tags.md`
|
|
32
|
+
5. 读取对应类型 workflow
|
|
33
|
+
6. 执行 `yxer doctor`
|
|
34
|
+
7. 执行 `yxer accounts list`
|
|
35
|
+
8. 执行 `yxer prepare <platform> <type>` 或 `yxer publish form start/inspect`
|
|
36
|
+
9. 优先执行 `yxer schema fields <platform> <type>`;需要 payload 骨架时再执行 `yxer schema get <platform> <type>`
|
|
37
|
+
10. 执行 `yxer upload`
|
|
38
|
+
11. 执行动态字段查询命令
|
|
39
|
+
12. 多候选或歧义数据按 `data-accuracy.md` 展示给用户确认
|
|
40
|
+
13. 组装 payload
|
|
41
|
+
14. 执行 `yxer validate`
|
|
42
|
+
15. 执行 `yxer publish --dry-run`
|
|
43
|
+
16. 用户授权后执行正式 `yxer publish`
|
|
28
44
|
|
|
29
45
|
禁止行为:
|
|
30
46
|
|
|
31
|
-
-
|
|
47
|
+
- 缺字段来源时跳过 `prepare` / `publish form` / `schema fields` / `schema get` 直接手写 payload
|
|
32
48
|
- 先执行 `publish`,失败后再补 `validate`
|
|
33
49
|
- 从空白 JSON 文件开始猜字段、猜层级、猜顺序
|
|
34
50
|
- 未读取 workflow 就按历史记忆填平台字段
|
|
51
|
+
- 动态查询返回多个候选时,未让用户确认就直接选择第一项
|
|
52
|
+
- 跳过 `publish --dry-run` 直接正式发布
|
|
35
53
|
|
|
36
54
|
## 发布前自检清单
|
|
37
55
|
|
|
@@ -39,15 +57,18 @@
|
|
|
39
57
|
|
|
40
58
|
- `[ ]` 已读技能入口
|
|
41
59
|
- `[ ]` 已读通用规则
|
|
60
|
+
- `[ ]` 已读数据准确性工作流
|
|
42
61
|
- `[ ]` 已读类型 workflow
|
|
43
62
|
- `[ ]` 已完成环境检查
|
|
44
63
|
- `[ ]` 已确认账号有效
|
|
45
|
-
- `[ ]`
|
|
46
|
-
- `[ ]`
|
|
64
|
+
- `[ ]` 新建或补字段时已拿到最新 `prepare` / `publish form` 结果
|
|
65
|
+
- `[ ]` 新建或补字段时已拿到最新 `schema fields` 结果;如需骨架再补 `schema get`
|
|
47
66
|
- `[ ]` 已完成上传,不存在外部 URL 直填
|
|
48
67
|
- `[ ]` 已查询动态字段,不存在手写 `raw`
|
|
68
|
+
- `[ ]` 多候选账号、分类、位置、音乐、商品、合集、活动等已由用户确认
|
|
49
69
|
- `[ ]` 当前 payload 不含模板占位符
|
|
50
70
|
- `[ ]` 当前 payload 已先通过 `validate`
|
|
71
|
+
- `[ ]` 当前 payload 已先通过 `publish --dry-run`
|
|
51
72
|
|
|
52
73
|
## 数据真实性原则
|
|
53
74
|
|
|
@@ -55,6 +76,7 @@
|
|
|
55
76
|
- 严禁自行猜测字段名、层级、枚举、默认值、示例值、`raw` 对象内容或资源元数据。
|
|
56
77
|
- 文档未定义、schema 未声明、CLI 未返回的字段,不得写入 payload。
|
|
57
78
|
- 动态字段和复杂对象必须先查询后填写;查不到时继续查询或向用户确认,不能凭经验编造。
|
|
79
|
+
- 话题/标签字段必须按 `../topic-tags.md` 的最终格式直接写入 payload。CLI 只兜底归一化 `description` 中的普通 `#话题`,不处理 `content`,也不改变 `tags` / `topics` / `challenge` 字段结构。
|
|
58
80
|
|
|
59
81
|
---
|
|
60
82
|
|
|
@@ -77,13 +99,14 @@ Agent 在任何 `publish` 之前,都要先读取 [`local-vs-cloud.md`](./local
|
|
|
77
99
|
### 本机发布执行规则
|
|
78
100
|
|
|
79
101
|
- 必须显式使用 `publishChannel=local`
|
|
80
|
-
-
|
|
102
|
+
- 必须通过 `--client-id` 或 `yxer config set-local-client-id` 提供 `clientId`
|
|
81
103
|
- `validate`、`publish --dry-run`、正式 `publish` 必须使用同一套发布通道参数,避免“校验通过但执行模式不一致”
|
|
82
|
-
- `clientId`
|
|
83
|
-
1.
|
|
84
|
-
2.
|
|
85
|
-
3.
|
|
86
|
-
|
|
104
|
+
- 推荐的 `clientId` 来源:
|
|
105
|
+
1. 命令 flags:`--client-id <clientId>`
|
|
106
|
+
2. 本地配置:`yxer config set-local-client-id <clientId>` 后由 CLI 自动读取
|
|
107
|
+
3. payload 中已有 `clientId` 时可沿用
|
|
108
|
+
|
|
109
|
+
第四个位置参数属于旧版兼容,不再作为 Agent 推荐入口。
|
|
87
110
|
|
|
88
111
|
推荐命令形态:
|
|
89
112
|
|
|
@@ -103,6 +126,13 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
103
126
|
- 云发布报“账号代理不存在”:
|
|
104
127
|
- 提示检查账号代理配置
|
|
105
128
|
- 若用户希望立即绕过代理限制,可改用本机发布
|
|
129
|
+
- 不默认使用 `--auto-fallback-local`;只有用户明确授权“一失败就切本机”时才可使用
|
|
130
|
+
|
|
131
|
+
### dry-run 语义
|
|
132
|
+
|
|
133
|
+
- `yxer publish --dry-run` 只预览最终请求,不创建发布任务。
|
|
134
|
+
- 云发布且已配置 API key 时,dry-run 会做账号/代理 preflight;local dry-run 不检测客户端在线状态。
|
|
135
|
+
- dry-run 输出中的 `meta.remoteChecks` 表示本次是否实际执行了远端 preflight。
|
|
106
136
|
|
|
107
137
|
---
|
|
108
138
|
|
|
@@ -155,10 +185,10 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
155
185
|
|
|
156
186
|
在自动填值之前,Agent 必须先读取平台前置数据和 schema:
|
|
157
187
|
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
- 只有在 `prepare` / `schema fields` / `schema get` 已确认后,才开始填写或补齐 `payload.json`
|
|
161
|
-
- Agent 不允许从空白 JSON 手工拼接 payload
|
|
188
|
+
- 新建或补字段时,先执行 `yxer prepare <platform> <type>` 或使用 `yxer publish form start/inspect` 获取表单契约
|
|
189
|
+
- 新建或补字段时,先执行 `yxer schema fields <platform> <type>`,确认字段名、类型和必填项;需要根层级骨架时再执行 `yxer schema get <platform> <type>`
|
|
190
|
+
- 只有在 `prepare` / `publish form` / `schema fields` / `schema get` 已确认后,才开始填写或补齐 `payload.json`
|
|
191
|
+
- Agent 不允许从空白 JSON 手工拼接 payload;必须先基于标准结构、publish form 会话或 CLI 模板生成骨架,再按返回结果填值
|
|
162
192
|
|
|
163
193
|
以下字段应先向用户确认,再填入:
|
|
164
194
|
|
|
@@ -248,7 +278,7 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
248
278
|
|
|
249
279
|
- 未确认账号 `status=1` 就构造 payload
|
|
250
280
|
- 用户明确要求本机发布时,仍然默认走云发布
|
|
251
|
-
-
|
|
281
|
+
- 使用本机发布却没有通过 flag、配置或 payload 提供 `clientId`
|
|
252
282
|
- 手动编造 `key` / `size` / `width` / `height` / `duration`
|
|
253
283
|
- 手动构造 `location` / `music` / `collection` / `challenge` 的 `raw`
|
|
254
284
|
- 跳过 `yxer validate` 直接执行 `yxer publish`
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# 数据准确性工作流
|
|
2
|
+
|
|
3
|
+
> 适用范围:任何会创建、修改、发布、保存草稿、登记素材或更新账号配置的任务。
|
|
4
|
+
|
|
5
|
+
本文档定义 Agent 在写操作前如何确保数据来自真实查询结果,而不是凭自然语言、记忆或示例 JSON 猜测。
|
|
6
|
+
|
|
7
|
+
## 核心原则
|
|
8
|
+
|
|
9
|
+
- 写接口只接收已解析、已校验、有来源的数据。
|
|
10
|
+
- 自然语言只能用于触发查询、筛选候选和生成用户可确认的业务文案,不能直接作为动态对象写入 payload。
|
|
11
|
+
- `yxer` CLI 输出是唯一事实来源;字段名、枚举、账号、资源 key、分类、位置、音乐、商品、合集、活动等动态数据不得手写。
|
|
12
|
+
- CLI stdout 外层 `data` 只是机器可读结果容器;Agent 取得其中候选后,必须按目标 schema / `dynamicFieldExamples` 装配成发布字段结构,再请求接口。
|
|
13
|
+
- 只要候选结果不唯一,且下一步会产生写入、副作用或发布,必须先展示候选并等待用户明确选择。
|
|
14
|
+
- `validate`、`publish --dry-run`、正式 `publish` 必须使用同一份 payload 和同一套发布通道参数。
|
|
15
|
+
|
|
16
|
+
## 固定执行链
|
|
17
|
+
|
|
18
|
+
发布类写操作必须按以下链路执行:
|
|
19
|
+
|
|
20
|
+
1. 读取 `SKILL.md` 和相关 domain/workflow。
|
|
21
|
+
2. 执行 `yxer doctor`,确认环境可用。
|
|
22
|
+
3. 执行 `yxer accounts list <platform> --status 1`,只从有效账号中选择。
|
|
23
|
+
4. 执行 `yxer prepare <platform> <type>`,获取账号能力、前置数据和平台要求。
|
|
24
|
+
5. 执行 `yxer schema fields <platform> <type>`,确认字段名、类型、必填项;需要骨架时再执行 `yxer schema get`。
|
|
25
|
+
6. 对资源执行 `yxer upload`,只使用上传结果中的 key、size、width、height、duration、format 等字段。
|
|
26
|
+
7. 对动态字段执行对应 `yxer query ...` 命令,保留 CLI 返回对象,不自行精简为 ID 或名称。
|
|
27
|
+
8. 从 CLI 输出 `data` 中选中候选后,按 schema / `dynamicFieldExamples` 转成目标字段结构;不要把查询响应 envelope 或候选对象直接当成完整发布请求。
|
|
28
|
+
9. 如果账号、动态对象、时间、发布通道或其他关键选项存在多个候选,先展示候选并等待用户确认。
|
|
29
|
+
10. 组装或修订 payload,只写入前面步骤已经确认的数据。
|
|
30
|
+
11. 执行 `yxer validate <platform> <type> <payload.json>`。
|
|
31
|
+
12. 执行 `yxer publish <type> <platform> <payload.json> --dry-run`。
|
|
32
|
+
13. 用户已授权正式发布时,才执行不带 `--dry-run` 的 `yxer publish`。
|
|
33
|
+
|
|
34
|
+
## 候选确认规则
|
|
35
|
+
|
|
36
|
+
以下情况必须等待用户确认,不能自动选择第一项:
|
|
37
|
+
|
|
38
|
+
- `accounts list` 返回多个可用账号,且用户没有指定账号。
|
|
39
|
+
- 用户按关键词选择分类、位置、音乐、商品、合集、活动、挑战、群组等,查询结果有多个合理候选。
|
|
40
|
+
- 用户给出的发布时间、发布通道、草稿类型或平台目标存在歧义。
|
|
41
|
+
- 本机发布需要 `clientId`,但当前 payload、flag 和配置中没有确定值。
|
|
42
|
+
- 查询结果与用户描述不完全匹配,但 Agent 认为可能可用。
|
|
43
|
+
|
|
44
|
+
可以自动选择的情况:
|
|
45
|
+
|
|
46
|
+
- 只有一个 `status=1` 的账号,且用户没有指定其他账号。
|
|
47
|
+
- 用户明确给出唯一账号 ID、资源 key、分类对象或查询命令返回项的稳定标识。
|
|
48
|
+
- 字段默认值已被 workflow 明确规定,例如 `formType=task`、默认云发布、封面默认使用首图或已上传封面。
|
|
49
|
+
|
|
50
|
+
自动选择时必须在面向用户的说明中告知选择依据,但 stdout 仍只输出 JSON。
|
|
51
|
+
|
|
52
|
+
## 动态对象来源表
|
|
53
|
+
|
|
54
|
+
| 数据类型 | 必须来源 | 写入规则 |
|
|
55
|
+
| --- | --- | --- |
|
|
56
|
+
| 账号 | `yxer accounts list` | 只使用 `status=1` 的账号;多个候选需确认 |
|
|
57
|
+
| 资源 | `yxer upload` | 使用 CLI 返回的完整资源字段,禁止外部 URL 直填 |
|
|
58
|
+
| 分类 | `yxer query categories` | 使用返回的完整对象;多级分类选择叶子节点或完整路径 |
|
|
59
|
+
| 位置 | `yxer query locations` | 使用返回对象,不手写 POI/raw |
|
|
60
|
+
| 音乐 | `yxer query music` / `music-categories` | 保留 playUrl/url 等查询元数据 |
|
|
61
|
+
| 商品 | `yxer query goods` | 使用完整商品对象 |
|
|
62
|
+
| 合集 | `yxer query collections` | 使用完整合集对象 |
|
|
63
|
+
| 话题/挑战 | `yxer query challenges` 或平台文档规定格式 | 不凭热门词手写 raw |
|
|
64
|
+
| 活动/热点 | `yxer query activities` / `hot-events` | 使用完整返回对象 |
|
|
65
|
+
| 小程序/同步应用/游戏/群组 | 对应 `yxer query miniapps/syncapps/games/groups` | 使用 CLI 返回对象 |
|
|
66
|
+
|
|
67
|
+
## 禁止行为
|
|
68
|
+
|
|
69
|
+
- 从空白 JSON 猜字段、猜层级、猜枚举。
|
|
70
|
+
- 直接把用户自然语言中的名称写成动态对象。
|
|
71
|
+
- 查询结果为空时编造兜底对象。
|
|
72
|
+
- 只复制查询结果中的 ID,丢弃 CLI 返回的 raw 或配套字段。
|
|
73
|
+
- 修改 payload 后跳过 `validate` 或 `publish --dry-run`。
|
|
74
|
+
- `validate` 使用云发布参数,而 `publish` 改成本机发布参数,或反过来。
|
|
75
|
+
- 在用户只要求 dry-run、预览、修 payload 时执行正式写操作。
|
|
76
|
+
|
|
77
|
+
## 错误恢复
|
|
78
|
+
|
|
79
|
+
- `validate` 失败:只修正报错字段,重新按本工作流校验,不重写整份 payload。
|
|
80
|
+
- 动态字段校验失败:回到对应 `yxer query ...`,重新获取合法对象。
|
|
81
|
+
- 资源字段校验失败:回到 `yxer upload`,不要手写 key 或尺寸。
|
|
82
|
+
- 账号失效:重新执行 `accounts list --status 1`,让用户确认新的账号。
|
|
83
|
+
- 发布通道失败:读取 `local-vs-cloud.md`,保持 validate、dry-run、publish 参数一致后重试。
|
|
@@ -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.
|
|
28
|
-
2.
|
|
29
|
-
3.
|
|
30
|
-
|
|
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.
|
|
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
|
-
-
|
|
66
|
-
-
|
|
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.
|
|
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
|
-
-
|
|
62
|
-
-
|
|
63
|
+
- 索引:`../platforms/imageText/index.md`
|
|
64
|
+
- 平台细节:`../platforms/imageText/*.md`
|