@yixiaoermail/cli 3.2.4 → 3.2.7
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 +56 -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 +13 -1
- package/schemas/platforms/baijiahao.imageText.schema.json +4 -4
- package/schemas/platforms/baijiahao.video.schema.json +23 -6
- 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/dewu.video.schema.json +4 -4
- 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/fengwang.video.schema.json +4 -4
- 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 +16 -6
- package/schemas/platforms/kuaishou.video.schema.json +35 -4
- package/schemas/platforms/meipai.video.schema.json +4 -4
- package/schemas/platforms/shipinhao.imageText.schema.json +17 -5
- package/schemas/platforms/shipinhao.video.schema.json +35 -4
- package/schemas/platforms/souhuhao.video.schema.json +9 -9
- package/schemas/platforms/souhushipin.video.schema.json +3 -3
- package/schemas/platforms/tengxunshipin.video.schema.json +1 -0
- package/schemas/platforms/toutiaohao.article.schema.json +4 -4
- 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 +29 -27
- package/schemas/platforms/xiaohongshu.video.schema.json +6 -5
- package/schemas/platforms/xiaohongshushop.video.schema.json +4 -4
- package/schemas/platforms/xinlang.imageText.schema.json +27 -6
- package/schemas/platforms/xinlang.video.schema.json +45 -14
- package/schemas/platforms/yidianhao.article.schema.json +1 -0
- package/schemas/platforms/yidianhao.video.schema.json +13 -12
- 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 +3 -5
- 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,65 @@
|
|
|
1
|
+
# AI 执行协议
|
|
2
|
+
|
|
3
|
+
> 适用范围:任何通过 `yxer` CLI 查询、组装 payload、保存草稿、登记素材或发布内容的 Agent 任务。
|
|
4
|
+
|
|
5
|
+
本文档定义 AI Agent 的稳定执行协议。业务 workflow 负责说明做什么,本协议负责说明每一步做到什么状态才允许继续。
|
|
6
|
+
|
|
7
|
+
## 最高优先级规则
|
|
8
|
+
|
|
9
|
+
- 所有真实操作只能通过 `yxer` CLI 执行。
|
|
10
|
+
- 不得凭记忆、示例 JSON 或用户自然语言直接拼动态字段、账号、资源 key、枚举或平台私有结构。
|
|
11
|
+
- 任何正式写操作前,必须先完成对应 domain/workflow 读取、真实数据查询、候选确认、`validate` 和 `dry-run`。
|
|
12
|
+
- 用户只要求查看、修 payload、预览、dry-run 或排查时,禁止执行正式写操作。
|
|
13
|
+
- 用户中途改变目标平台、账号、发布通道、资源或发布时间时,必须回退到受影响的状态重新确认。
|
|
14
|
+
|
|
15
|
+
## 发布状态机
|
|
16
|
+
|
|
17
|
+
| State | 进入条件 | 下一步允许动作 | 禁止动作 |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `intent_detected` | 已识别用户意图和业务域 | 读取 domain/workflow | 执行写操作 |
|
|
20
|
+
| `workflow_loaded` | 已读取业务域和必要 workflow | `yxer doctor` | 拼 payload、publish |
|
|
21
|
+
| `env_checked` | `yxer doctor` 成功或问题已解释 | 查询账号、判断发布通道 | publish |
|
|
22
|
+
| `account_selected` | 已从真实账号列表选中有效账号 | `prepare`、`schema fields` | 使用未确认账号发布 |
|
|
23
|
+
| `contract_loaded` | 已获取 `prepare` 和 `schema fields`,必要时已获取 `schema get` | upload、query、组装 payload | 写 schema 未声明字段 |
|
|
24
|
+
| `sources_collected` | 资源、动态字段、用户业务内容都已确认来源 | 组装或修订 payload | 编造动态对象 |
|
|
25
|
+
| `payload_ready` | payload 无占位符,字段来源清晰 | `yxer validate` | publish |
|
|
26
|
+
| `validated` | `yxer validate` 成功 | `yxer publish --dry-run` | 正式 publish |
|
|
27
|
+
| `dry_run_passed` | dry-run 成功,且通道参数与 validate 一致;云发布有 API key 时已完成账号/代理 preflight | 等待用户授权正式发布 | 未授权 publish |
|
|
28
|
+
| `published` | 正式 publish 成功 | 返回结果、记录后续排查方式 | 重复 publish |
|
|
29
|
+
|
|
30
|
+
## 状态回退规则
|
|
31
|
+
|
|
32
|
+
| 变化或错误 | 回退到 |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| 用户更换平台或发布类型 | `workflow_loaded` |
|
|
35
|
+
| 用户更换账号 | `account_selected` 之前,重新 `accounts list` |
|
|
36
|
+
| 用户更换发布通道或 `clientId` | `env_checked`,重新 validate/dry-run |
|
|
37
|
+
| 用户更换资源文件或 URL | `contract_loaded`,重新 upload |
|
|
38
|
+
| 动态字段候选不唯一或为空 | `contract_loaded`,重新 query 或等待用户确认 |
|
|
39
|
+
| 修改 payload 任意字段 | `payload_ready`,重新 validate/dry-run |
|
|
40
|
+
| validate 失败 | `contract_loaded` 或 `sources_collected`,只修报错字段 |
|
|
41
|
+
| dry-run 失败 | `payload_ready`,按错误恢复协议修复后重新 validate |
|
|
42
|
+
|
|
43
|
+
## 写操作门禁
|
|
44
|
+
|
|
45
|
+
执行正式 `yxer publish`、`yxer draft save`、素材登记、账号配置更新等写操作前,Agent 必须确认:
|
|
46
|
+
|
|
47
|
+
- 已读取 `SKILL.md` 和当前业务 domain。
|
|
48
|
+
- 已读取当前任务所需 workflow。
|
|
49
|
+
- 当前数据来自 `yxer` CLI、用户明确输入或平台文档,不来自猜测。
|
|
50
|
+
- 多候选关键数据已按确认协议由用户选择。
|
|
51
|
+
- payload 或写入参数不含 `<placeholder>`、示例值或未解析模板。
|
|
52
|
+
- 对发布任务,`validate` 和 `dry-run` 已通过,且正式发布使用同一份 payload 与同一套发布通道参数。
|
|
53
|
+
|
|
54
|
+
## 命令执行纪律
|
|
55
|
+
|
|
56
|
+
- 优先使用带 `--json` 的命令,便于稳定解析;命令不支持时再解析普通输出。
|
|
57
|
+
- 每次 CLI 返回候选列表后,先提取稳定 ID、名称、状态和平台,不要只看显示文本。
|
|
58
|
+
- CLI stdout 外层 `data` 是结果容器,不等于发布字段结构;写入 payload 前必须按 schema 或 workflow 重新装配。
|
|
59
|
+
- 命令失败时先读取错误信息和 hint/nextCommand,再决定是否重试;不要无差别重复执行正式写命令。
|
|
60
|
+
|
|
61
|
+
## 面向用户说明
|
|
62
|
+
|
|
63
|
+
- 自动选择唯一候选时,应说明选择依据。
|
|
64
|
+
- 需要用户选择时,按确认协议展示候选,不要让用户从原始 JSON 中猜。
|
|
65
|
+
- 正式发布前,必须明确说明已通过 dry-run,并等待用户授权,除非用户最初已经明确授权“校验通过后直接发布”。
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# 字段来源追踪协议
|
|
2
|
+
|
|
3
|
+
> 适用范围:任何创建、修改、解释或提交 `payload.json` 的任务。
|
|
4
|
+
|
|
5
|
+
本文档定义 Agent 如何记录字段来源,避免 payload 看似正确但无法追溯。
|
|
6
|
+
|
|
7
|
+
## 来源优先级
|
|
8
|
+
|
|
9
|
+
字段来源优先级从高到低:
|
|
10
|
+
|
|
11
|
+
1. `yxer prepare <platform> <type>` 返回的表单契约、账号能力和前置数据。
|
|
12
|
+
2. `yxer schema fields <platform> <type>` / `yxer schema get <platform> <type>` 返回的字段定义、类型、必填项和示例结构。
|
|
13
|
+
3. `yxer query ...` 返回的动态候选对象。
|
|
14
|
+
4. `yxer upload` 返回的资源 key、尺寸、时长、格式等元数据。
|
|
15
|
+
5. 用户明确提供的业务内容,例如标题、正文、描述、发布时间。
|
|
16
|
+
6. 平台文档中明确声明的差异规则。
|
|
17
|
+
|
|
18
|
+
## 建议记录结构
|
|
19
|
+
|
|
20
|
+
当 CLI 或 payload 支持 meta 时,Agent 应记录字段来源。若当前命令不支持写入 meta,也应在 dry-run 或最终说明中保留关键来源摘要。
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"field": "publishArgs.accountForms[0].platformAccountId",
|
|
25
|
+
"sourceType": "cli.accounts",
|
|
26
|
+
"sourceCommand": "yxer accounts list 抖音 --status 1 --json",
|
|
27
|
+
"sourceId": "acc_001",
|
|
28
|
+
"confirmedByUser": true
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 必须追踪的字段
|
|
33
|
+
|
|
34
|
+
| 字段类型 | 必须记录 |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| 账号 | 来源命令、`platformAccountId`、是否用户确认 |
|
|
37
|
+
| 资源 | 上传命令、原始文件或 URL、返回 key、size、width、height、duration、format |
|
|
38
|
+
| 分类 | 查询命令、分类 ID、分类路径、是否叶子节点 |
|
|
39
|
+
| 位置 | 查询命令、位置 ID、名称、raw 来源 |
|
|
40
|
+
| 音乐 | 查询命令、音乐 ID、名称、playUrl/url 是否保留 |
|
|
41
|
+
| 商品 | 查询命令、商品 ID、名称、raw 来源 |
|
|
42
|
+
| 合集/活动/话题/群组 | 查询命令、稳定 ID、名称、平台限制 |
|
|
43
|
+
| 发布通道 | `cloud` / `local` 决策依据、`clientId` 来源 |
|
|
44
|
+
| 发布时间 | 用户输入、解析后的 13 位毫秒时间戳 |
|
|
45
|
+
|
|
46
|
+
## 禁止来源
|
|
47
|
+
|
|
48
|
+
以下来源不得直接写入 payload:
|
|
49
|
+
|
|
50
|
+
- 用户自然语言中的动态对象名称。
|
|
51
|
+
- 示例 JSON 中的 ID、key、raw、尺寸或枚举。
|
|
52
|
+
- 历史成功 payload 中的账号、分类、位置、音乐、商品、资源 key。
|
|
53
|
+
- 未经当前 CLI 查询确认的本地缓存。
|
|
54
|
+
- CLI stdout 外层 envelope,例如直接把整个 `{ "data": ... }` 当作字段值。
|
|
55
|
+
|
|
56
|
+
## 修改 payload 时的追踪规则
|
|
57
|
+
|
|
58
|
+
- 只修复报错字段,不重写整份 payload。
|
|
59
|
+
- 修改字段后,更新该字段来源说明。
|
|
60
|
+
- 任意字段修改后,必须重新执行 `validate`;发布任务还必须重新执行 `publish --dry-run`。
|
|
61
|
+
- 如果无法确认字段来源,停止写操作并回到对应查询、上传或用户确认步骤。
|
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
4. **指令执行**:调用 `yxer upload <file_path_or_url> [--bucket cloud-publish|material-library]`。
|
|
32
32
|
5. **Key 提取**:获取返回的 `key`,并作为后续发布 Payload 的输入(如 `coverKey`, `video.key`)。
|
|
33
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
|
+
|
|
34
40
|
> [!IMPORTANT]
|
|
35
41
|
> **Instagram / Meta 兼容性**:
|
|
36
42
|
> 若后续要发 Instagram 视频,原视频文件名不要使用中文、空格或其它非 ASCII 字符。Meta 会主动回拉蚁小二返回的媒体 URL;若 URL 路径中带中文,Meta 下载器可能直接返回 HTTP 400,导致“创建发布容器失败 / The media could not be fetched from the provided URI”。
|
|
@@ -51,6 +57,7 @@
|
|
|
51
57
|
|
|
52
58
|
```bash
|
|
53
59
|
yxer upload https://example.com/image.jpg --bucket cloud-publish
|
|
60
|
+
yxer upload ./cover.png --platform 视频号 --usage cover
|
|
54
61
|
```
|
|
55
62
|
|
|
56
63
|
> [!IMPORTANT]
|
|
@@ -154,7 +154,7 @@ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <cl
|
|
|
154
154
|
如果是 AI agent 调用本项目,推荐顺序如下:
|
|
155
155
|
|
|
156
156
|
1. 读取 `skills/yixiaoer/SKILL.md`
|
|
157
|
-
2. 读取 `references/workflows/common-rules.md`
|
|
157
|
+
2. 读取 `skills/yixiaoer/references/workflows/common-rules.md`
|
|
158
158
|
3. 根据内容类型读取对应 workflow
|
|
159
159
|
4. 调用 `yxer doctor`
|
|
160
160
|
5. 调用 `yxer prepare` 和 `yxer schema get`
|
|
@@ -10,7 +10,20 @@
|
|
|
10
10
|
|
|
11
11
|
## 强制门禁
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
发布类任务分为两条路径。已有完整标准 `payload.json` 时走快速路径;缺账号、字段、资源或动态字段时走组装路径。
|
|
14
|
+
|
|
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 尚未完整,必须满足以下顺序;任意一步未完成,都不允许继续到下一步:
|
|
14
27
|
|
|
15
28
|
1. 读取 `../../SKILL.md`
|
|
16
29
|
2. 读取当前文件
|
|
@@ -19,7 +32,7 @@
|
|
|
19
32
|
5. 读取对应类型 workflow
|
|
20
33
|
6. 执行 `yxer doctor`
|
|
21
34
|
7. 执行 `yxer accounts list`
|
|
22
|
-
8. 执行 `yxer prepare <platform> <type>`
|
|
35
|
+
8. 执行 `yxer prepare <platform> <type>` 或 `yxer publish form start/inspect`
|
|
23
36
|
9. 优先执行 `yxer schema fields <platform> <type>`;需要 payload 骨架时再执行 `yxer schema get <platform> <type>`
|
|
24
37
|
10. 执行 `yxer upload`
|
|
25
38
|
11. 执行动态字段查询命令
|
|
@@ -31,7 +44,7 @@
|
|
|
31
44
|
|
|
32
45
|
禁止行为:
|
|
33
46
|
|
|
34
|
-
-
|
|
47
|
+
- 缺字段来源时跳过 `prepare` / `publish form` / `schema fields` / `schema get` 直接手写 payload
|
|
35
48
|
- 先执行 `publish`,失败后再补 `validate`
|
|
36
49
|
- 从空白 JSON 文件开始猜字段、猜层级、猜顺序
|
|
37
50
|
- 未读取 workflow 就按历史记忆填平台字段
|
|
@@ -48,8 +61,8 @@
|
|
|
48
61
|
- `[ ]` 已读类型 workflow
|
|
49
62
|
- `[ ]` 已完成环境检查
|
|
50
63
|
- `[ ]` 已确认账号有效
|
|
51
|
-
- `[ ]`
|
|
52
|
-
- `[ ]`
|
|
64
|
+
- `[ ]` 新建或补字段时已拿到最新 `prepare` / `publish form` 结果
|
|
65
|
+
- `[ ]` 新建或补字段时已拿到最新 `schema fields` 结果;如需骨架再补 `schema get`
|
|
53
66
|
- `[ ]` 已完成上传,不存在外部 URL 直填
|
|
54
67
|
- `[ ]` 已查询动态字段,不存在手写 `raw`
|
|
55
68
|
- `[ ]` 多候选账号、分类、位置、音乐、商品、合集、活动等已由用户确认
|
|
@@ -86,13 +99,14 @@ Agent 在任何 `publish` 之前,都要先读取 [`local-vs-cloud.md`](./local
|
|
|
86
99
|
### 本机发布执行规则
|
|
87
100
|
|
|
88
101
|
- 必须显式使用 `publishChannel=local`
|
|
89
|
-
-
|
|
102
|
+
- 必须通过 `--client-id` 或 `yxer config set-local-client-id` 提供 `clientId`
|
|
90
103
|
- `validate`、`publish --dry-run`、正式 `publish` 必须使用同一套发布通道参数,避免“校验通过但执行模式不一致”
|
|
91
|
-
- `clientId`
|
|
92
|
-
1.
|
|
93
|
-
2.
|
|
94
|
-
3.
|
|
95
|
-
|
|
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 推荐入口。
|
|
96
110
|
|
|
97
111
|
推荐命令形态:
|
|
98
112
|
|
|
@@ -112,6 +126,13 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
112
126
|
- 云发布报“账号代理不存在”:
|
|
113
127
|
- 提示检查账号代理配置
|
|
114
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。
|
|
115
136
|
|
|
116
137
|
---
|
|
117
138
|
|
|
@@ -164,10 +185,10 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
164
185
|
|
|
165
186
|
在自动填值之前,Agent 必须先读取平台前置数据和 schema:
|
|
166
187
|
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
- 只有在 `prepare` / `schema fields` / `schema get` 已确认后,才开始填写或补齐 `payload.json`
|
|
170
|
-
- 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 模板生成骨架,再按返回结果填值
|
|
171
192
|
|
|
172
193
|
以下字段应先向用户确认,再填入:
|
|
173
194
|
|
|
@@ -257,7 +278,7 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
257
278
|
|
|
258
279
|
- 未确认账号 `status=1` 就构造 payload
|
|
259
280
|
- 用户明确要求本机发布时,仍然默认走云发布
|
|
260
|
-
-
|
|
281
|
+
- 使用本机发布却没有通过 flag、配置或 payload 提供 `clientId`
|
|
261
282
|
- 手动编造 `key` / `size` / `width` / `height` / `duration`
|
|
262
283
|
- 手动构造 `location` / `music` / `collection` / `challenge` 的 `raw`
|
|
263
284
|
- 跳过 `yxer validate` 直接执行 `yxer 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
|
|
|
@@ -28,7 +28,7 @@ yxer schema get <platform> video
|
|
|
28
28
|
2. 获取前置数据:`yxer prepare <platform> video`
|
|
29
29
|
3. 先获取字段视图:`yxer schema fields <platform> video`;需要 payload 骨架时再执行 `yxer schema get <platform> video`
|
|
30
30
|
4. 上传视频:`yxer upload <视频路径或URL>`
|
|
31
|
-
5. 上传封面:`yxer upload <封面路径或URL
|
|
31
|
+
5. 上传封面:`yxer upload <封面路径或URL>`;视频号封面必须使用 `yxer upload <封面路径或URL> --platform 视频号 --usage cover`,超 512KB 时由 CLI 内部压缩
|
|
32
32
|
6. 按需查询分类、位置、音乐、合集、话题、商品
|
|
33
33
|
7. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
|
|
34
34
|
8. 查阅对应平台文档:`../platforms/video/`
|
|
@@ -75,6 +75,14 @@ yxer update --global
|
|
|
75
75
|
- `publish --dry-run` 成功时,再进入正式发布
|
|
76
76
|
- 不要跳过 `validate` 或 `publish --dry-run`
|
|
77
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
|
+
|
|
78
86
|
### 发布结果
|
|
79
87
|
|
|
80
88
|
- 成功时给出平台、类型、通道和关键结果
|
|
@@ -82,14 +90,17 @@ yxer update --global
|
|
|
82
90
|
|
|
83
91
|
## 危险动作协议
|
|
84
92
|
|
|
85
|
-
-
|
|
93
|
+
- 真正发布前,最小固定门禁是:
|
|
94
|
+
1. 已有或已导出标准 `payload.json`
|
|
95
|
+
2. `yxer validate`
|
|
96
|
+
3. `yxer publish --dry-run`
|
|
97
|
+
4. 用户授权后 `yxer publish`
|
|
98
|
+
- 当 payload 尚未完整、账号未确认、资源未上传或动态字段未查询时,先补完整组装路径:
|
|
86
99
|
1. `yxer doctor`
|
|
87
100
|
2. `yxer accounts list`
|
|
88
|
-
3. `yxer prepare`
|
|
89
|
-
4. `yxer schema fields`
|
|
90
|
-
5.
|
|
91
|
-
6.
|
|
92
|
-
7. `yxer publish --dry-run`
|
|
93
|
-
8. `yxer publish`
|
|
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`
|
|
94
105
|
- 不允许跳过 `validate`
|
|
95
106
|
- 不允许把正式 `publish` 当成试错手段
|