@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,305 @@
|
|
|
1
|
+
# yxer 命令树设计标准
|
|
2
|
+
|
|
3
|
+
本文定义 `yxer` CLI 的命令树设计标准、输出约束,以及当前架构缺陷和后续优化方向。
|
|
4
|
+
|
|
5
|
+
## 目标
|
|
6
|
+
|
|
7
|
+
- 保持命令语义稳定,便于人类和 AI agent 共同使用。
|
|
8
|
+
- 保持 `stdout` JSON 输出稳定,避免命令名、action 名和返回结构长期漂移。
|
|
9
|
+
- 让“资源类能力”和“工作流类能力”在命令树上有明确边界。
|
|
10
|
+
|
|
11
|
+
## 顶层命令分层
|
|
12
|
+
|
|
13
|
+
当前建议把命令分为 4 类:
|
|
14
|
+
|
|
15
|
+
1. 系统类命令
|
|
16
|
+
- `doctor`
|
|
17
|
+
- `config`
|
|
18
|
+
- `skill`
|
|
19
|
+
- `update`
|
|
20
|
+
|
|
21
|
+
2. 资源类命令
|
|
22
|
+
- `accounts`
|
|
23
|
+
- `account-group`
|
|
24
|
+
- `material`
|
|
25
|
+
- `draft`
|
|
26
|
+
|
|
27
|
+
3. 工作流类命令
|
|
28
|
+
- `prepare`
|
|
29
|
+
- `validate`
|
|
30
|
+
- `publish`
|
|
31
|
+
- `upload`
|
|
32
|
+
|
|
33
|
+
4. 查询类命令
|
|
34
|
+
- `query`
|
|
35
|
+
|
|
36
|
+
## 命令树标准
|
|
37
|
+
|
|
38
|
+
### 1. 资源类能力优先使用资源命令
|
|
39
|
+
|
|
40
|
+
资源自身的 CRUD 能力优先设计成:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yxer <resource> list
|
|
44
|
+
yxer <resource> create ...
|
|
45
|
+
yxer <resource> update ...
|
|
46
|
+
yxer <resource> delete ...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
例如:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
yxer account-group list
|
|
53
|
+
yxer account-group create <name> --dry-run
|
|
54
|
+
yxer account-group update <group_id> <name> --dry-run
|
|
55
|
+
yxer account-group delete <group_id> --dry-run
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
规则:
|
|
59
|
+
|
|
60
|
+
- 资源名统一使用单数,如 `account-group`
|
|
61
|
+
- 子命令统一使用 `list/create/update/delete`
|
|
62
|
+
- `list` 可提供 `ls` alias;其余写操作默认不提供别名
|
|
63
|
+
|
|
64
|
+
### 2. `query` 只保留“跨资源查询”或“发布前置查询”
|
|
65
|
+
|
|
66
|
+
`query` 不是资源 CRUD 的兜底入口,而是保留给:
|
|
67
|
+
|
|
68
|
+
- 发布前置对象查询,如 `locations`、`music`、`groups`
|
|
69
|
+
- 远端聚合视图查询,如 `records`、`details`
|
|
70
|
+
- 非标准资源树、但仍然明确只读的接口
|
|
71
|
+
|
|
72
|
+
规则:
|
|
73
|
+
|
|
74
|
+
- `query` 下只放只读能力
|
|
75
|
+
- 新增资源型查询时,优先判断是否应该归入某个资源命令,而不是默认塞进 `query`
|
|
76
|
+
|
|
77
|
+
### 3. 写操作必须支持 `--dry-run`
|
|
78
|
+
|
|
79
|
+
所有会产生副作用的命令应优先支持:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
yxer <command> ... --dry-run
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
规则:
|
|
86
|
+
|
|
87
|
+
- `--dry-run` 返回实际请求预览,不执行远端写操作
|
|
88
|
+
- dry-run 输出中的字段必须来自 CLI 真实会发送的请求体,不允许编造
|
|
89
|
+
- 若命令没有可预览的 body,也应至少返回关键路径参数,如 `groupId`
|
|
90
|
+
|
|
91
|
+
### 4. action 命名要和命令树一致
|
|
92
|
+
|
|
93
|
+
成功 envelope 里的 `action` 字段统一按命令树命名:
|
|
94
|
+
|
|
95
|
+
- 读操作:`resource.list`
|
|
96
|
+
- 写操作:`resource.create` / `resource.update` / `resource.delete`
|
|
97
|
+
- dry-run:追加 `.dry-run`
|
|
98
|
+
|
|
99
|
+
例如:
|
|
100
|
+
|
|
101
|
+
- `account-group.list`
|
|
102
|
+
- `account-group.create`
|
|
103
|
+
- `account-group.create.dry-run`
|
|
104
|
+
|
|
105
|
+
不要继续混用这两类风格:
|
|
106
|
+
|
|
107
|
+
- `create-account-group`
|
|
108
|
+
- `account-group.create`
|
|
109
|
+
|
|
110
|
+
应统一保留后一种。
|
|
111
|
+
|
|
112
|
+
### 5. 命令命名统一使用 kebab-case
|
|
113
|
+
|
|
114
|
+
规则:
|
|
115
|
+
|
|
116
|
+
- 多单词资源名统一 kebab-case,如 `account-group`
|
|
117
|
+
- 多单词 flag 统一 kebab-case,如 `--publish-start-time`
|
|
118
|
+
- 路径参数占位名统一 `<group_id>`、`<account_id>` 这种 snake_case 风格
|
|
119
|
+
|
|
120
|
+
### 6. 帮助文案不再强调“兼容入口”
|
|
121
|
+
|
|
122
|
+
既然标准入口已经明确,后续帮助文案应直接描述职责,不再长期保留:
|
|
123
|
+
|
|
124
|
+
- “兼容入口”
|
|
125
|
+
- “推荐使用 xxx”
|
|
126
|
+
|
|
127
|
+
这些文案只适合迁移期,不适合作为长期帮助文本。
|
|
128
|
+
|
|
129
|
+
## 实现标准
|
|
130
|
+
|
|
131
|
+
### 1. 每个资源/领域一个命令文件
|
|
132
|
+
|
|
133
|
+
建议保持:
|
|
134
|
+
|
|
135
|
+
- `cmd/account_groups.go`
|
|
136
|
+
- `cmd/accounts.go`
|
|
137
|
+
- `cmd/material.go`
|
|
138
|
+
- `cmd/query.go`
|
|
139
|
+
|
|
140
|
+
不要让单个文件无限膨胀。
|
|
141
|
+
|
|
142
|
+
### 2. 优先使用 `newXxxCmd()` 构造函数
|
|
143
|
+
|
|
144
|
+
建议统一使用构造函数返回 `*cobra.Command`,而不是长期混用:
|
|
145
|
+
|
|
146
|
+
- `var xxxCmd = &cobra.Command{}`
|
|
147
|
+
- `func newXxxCmd() *cobra.Command`
|
|
148
|
+
|
|
149
|
+
构造函数模式更适合:
|
|
150
|
+
|
|
151
|
+
- 测试隔离
|
|
152
|
+
- 子命令复用
|
|
153
|
+
- 避免全局命令对象互相污染
|
|
154
|
+
|
|
155
|
+
### 3. 共享逻辑下沉到独立 helper
|
|
156
|
+
|
|
157
|
+
例如:
|
|
158
|
+
|
|
159
|
+
- body 构造:`buildAccountGroupBody`
|
|
160
|
+
- 读操作包装:`runQuery`
|
|
161
|
+
|
|
162
|
+
后续还可以继续抽象:
|
|
163
|
+
|
|
164
|
+
- `runWrite`
|
|
165
|
+
- `runDryRun`
|
|
166
|
+
- `requireNonEmptyID`
|
|
167
|
+
|
|
168
|
+
避免每个写命令都重复拼相同的 dry-run 和 runtime 加载逻辑。
|
|
169
|
+
|
|
170
|
+
## 当前架构缺陷
|
|
171
|
+
|
|
172
|
+
### 1. `cmd/query.go` 过大,职责过重
|
|
173
|
+
|
|
174
|
+
当前 `cmd/query.go` 同时承担:
|
|
175
|
+
|
|
176
|
+
- 查询命令注册
|
|
177
|
+
- 兼容根命令注册
|
|
178
|
+
- `update-account` 写操作
|
|
179
|
+
- `prepare` 工作流入口
|
|
180
|
+
|
|
181
|
+
问题:
|
|
182
|
+
|
|
183
|
+
- 文件过长,维护成本高
|
|
184
|
+
- `query` 与非 `query` 能力耦合
|
|
185
|
+
- 写操作 `update-account` 放在 `query.go` 里,职责不清晰
|
|
186
|
+
|
|
187
|
+
建议:
|
|
188
|
+
|
|
189
|
+
- 把 `update-account` 拆到 `cmd/accounts.go` 或新建 `cmd/account_update.go`
|
|
190
|
+
- 把 `prepare` 拆到单独文件
|
|
191
|
+
- `query.go` 只保留 query 域相关内容
|
|
192
|
+
|
|
193
|
+
### 2. 命令注册方式不统一
|
|
194
|
+
|
|
195
|
+
目前同时存在两种风格:
|
|
196
|
+
|
|
197
|
+
- 包级变量命令对象
|
|
198
|
+
- `newXxxCmd()` 工厂函数
|
|
199
|
+
|
|
200
|
+
问题:
|
|
201
|
+
|
|
202
|
+
- 测试时容易共享全局状态
|
|
203
|
+
- dry-run flag 等变量容易互相污染
|
|
204
|
+
- 不利于后续做命令树生成或重构
|
|
205
|
+
|
|
206
|
+
建议:
|
|
207
|
+
|
|
208
|
+
- 新代码统一走 `newXxxCmd()`
|
|
209
|
+
- 旧命令逐步迁移
|
|
210
|
+
|
|
211
|
+
### 3. 全局 flag 状态过多
|
|
212
|
+
|
|
213
|
+
当前很多命令使用包级变量存 flag 值,例如 `cmd/query.go` 中的大量全局变量。
|
|
214
|
+
|
|
215
|
+
问题:
|
|
216
|
+
|
|
217
|
+
- 测试需要手动清理状态
|
|
218
|
+
- 多命令复用时容易串值
|
|
219
|
+
- 命令实例不是完全自包含
|
|
220
|
+
|
|
221
|
+
建议:
|
|
222
|
+
|
|
223
|
+
- 优先把 flag 绑定到局部变量或 option struct
|
|
224
|
+
- 复杂命令引入 `Options` 结构,执行前从 `cmd.Flags()` 读取
|
|
225
|
+
|
|
226
|
+
### 4. action 命名历史包袱较重
|
|
227
|
+
|
|
228
|
+
当前仓库里既有:
|
|
229
|
+
|
|
230
|
+
- `records.list`
|
|
231
|
+
- `update-account`
|
|
232
|
+
- `publish.dry-run`
|
|
233
|
+
|
|
234
|
+
问题:
|
|
235
|
+
|
|
236
|
+
- 同一类动作命名风格不统一
|
|
237
|
+
- agent 侧很难基于 action 做稳定分类
|
|
238
|
+
|
|
239
|
+
建议:
|
|
240
|
+
|
|
241
|
+
- 逐步统一为 `resource.verb`
|
|
242
|
+
- 工作流类命令统一为 `workflow.verb` 或保持单命令名,但要明确约定
|
|
243
|
+
|
|
244
|
+
### 5. 文档存在重复源
|
|
245
|
+
|
|
246
|
+
当前命令文档分散在:
|
|
247
|
+
|
|
248
|
+
- `README.md`
|
|
249
|
+
- `README.md`
|
|
250
|
+
- `skills/yixiaoer/references/cli/command-reference.md`
|
|
251
|
+
|
|
252
|
+
问题:
|
|
253
|
+
|
|
254
|
+
- 容易改一处漏两处
|
|
255
|
+
- 标准变更时容易产生冲突文案
|
|
256
|
+
|
|
257
|
+
建议:
|
|
258
|
+
|
|
259
|
+
- 选一个主文档源
|
|
260
|
+
- 其余文档尽量引用或做自动同步
|
|
261
|
+
- 至少建立“命令变更时必须同步哪些文档”的 checklist
|
|
262
|
+
|
|
263
|
+
### 6. 测试覆盖偏重“命令存在”,缺少“命令树一致性”抽象
|
|
264
|
+
|
|
265
|
+
当前测试大量手动枚举命令名。
|
|
266
|
+
|
|
267
|
+
问题:
|
|
268
|
+
|
|
269
|
+
- 增删命令时测试改动分散
|
|
270
|
+
- 无法快速看出命令树整体是否符合标准
|
|
271
|
+
|
|
272
|
+
建议:
|
|
273
|
+
|
|
274
|
+
- 增加一类“命令树快照测试”或“结构断言 helper”
|
|
275
|
+
- 例如统一断言某个资源必须具备 `list/create/update/delete`
|
|
276
|
+
|
|
277
|
+
## 推荐优化顺序
|
|
278
|
+
|
|
279
|
+
### 第一阶段
|
|
280
|
+
|
|
281
|
+
- 固化资源类命令标准:`resource {list|create|update|delete}`
|
|
282
|
+
- 新增命令一律不再添加兼容入口
|
|
283
|
+
- 新增写命令一律支持 `--dry-run`
|
|
284
|
+
|
|
285
|
+
### 第二阶段
|
|
286
|
+
|
|
287
|
+
- 拆分 `cmd/query.go`
|
|
288
|
+
- 把包级 flag 变量逐步迁移到局部 options
|
|
289
|
+
- 统一 action 命名规范
|
|
290
|
+
|
|
291
|
+
### 第三阶段
|
|
292
|
+
|
|
293
|
+
- 建立命令树测试 helper
|
|
294
|
+
- 收敛命令文档单一来源
|
|
295
|
+
- 评估是否把 query 域拆成更细的资源树
|
|
296
|
+
|
|
297
|
+
## 当前建议
|
|
298
|
+
|
|
299
|
+
后续新增能力时,优先按下面顺序判断:
|
|
300
|
+
|
|
301
|
+
1. 这是系统命令、资源命令、工作流命令,还是只读查询命令?
|
|
302
|
+
2. 如果是资源能力,能否直接挂到已有资源树下?
|
|
303
|
+
3. 如果是写操作,`--dry-run` 输出应该长什么样?
|
|
304
|
+
4. 成功 envelope 的 `action` 是否和命令路径一致?
|
|
305
|
+
5. 文档是否同步到了命令参考和 skill 参考?
|
|
@@ -32,7 +32,7 @@ yxer skill sync [--global]
|
|
|
32
32
|
yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
|
|
33
33
|
yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
|
|
34
34
|
yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID]
|
|
35
|
-
yxer account-group list
|
|
35
|
+
yxer account-group list [--page 1] [--size 10]
|
|
36
36
|
yxer account-group create <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
|
|
37
37
|
yxer account-group update <group_id> <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
|
|
38
38
|
yxer account-group delete <group_id> [--dry-run]
|
|
@@ -44,7 +44,14 @@ yxer upload --url <resource_url> [--bucket cloud-publish|material-library] [--dr
|
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
yxer validate <platform> <type> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>]
|
|
47
|
-
yxer publish <type> <platform> <payload.json> [clientId] [--dry-run]
|
|
47
|
+
yxer publish <type> <platform> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>] [--dry-run]
|
|
48
|
+
yxer publish form start <platform> <type> [--output publish-form.json] [--dry-run]
|
|
49
|
+
yxer publish form inspect <session.json>
|
|
50
|
+
yxer publish form set <session.json> <payload.path> --value '<json-value-or-text>' [--index N] [--source-command <cmd>] [--dry-run]
|
|
51
|
+
yxer publish form choose <session.json> <field> --value-file <query.json> [--id <candidate_id>|--index N] [--account-id <id>] --source-command "yxer query ... --json" [--dry-run]
|
|
52
|
+
yxer publish form verify <session.json>
|
|
53
|
+
yxer publish form review <session.json> [--dry-run]
|
|
54
|
+
yxer publish form export <session.json> [--output payload.json] [--dry-run]
|
|
48
55
|
```
|
|
49
56
|
|
|
50
57
|
### 草稿与素材库
|
|
@@ -82,22 +89,27 @@ yxer schema get <platform> <type>
|
|
|
82
89
|
- 发布类型统一使用:`video`、`imageText`、`article`
|
|
83
90
|
- 单次 `yxer publish` 只处理一个平台
|
|
84
91
|
- `publish` 仅支持 `payload.json` 模式
|
|
85
|
-
-
|
|
92
|
+
- 新建或补字段时,先执行 `yxer prepare <platform> <type>` / `yxer publish form start` 和 `yxer schema fields <platform> <type>`;`schema fields` 默认返回扁平路径清单,只有需要完整 payload 骨架时再执行 `yxer schema get <platform> <type>`
|
|
86
93
|
- `payload.json` 只支持标准 `publishArgs` 结构,所有平台统一
|
|
87
94
|
- CLI 会根据 `publishArgs` 自动补齐最外层 `cover`、`coverKey`、`desc`、`isDraft`、`isAppContent`
|
|
88
95
|
- 云发布是默认模式
|
|
89
96
|
- 本机发布时必须提供 `clientId`
|
|
90
97
|
- `yxer validate`、`yxer publish --dry-run`、`yxer publish` 使用同一套发布通道解析逻辑
|
|
91
|
-
-
|
|
92
|
-
|
|
98
|
+
- `yxer publish --dry-run` 不创建发布任务;它返回最终请求预览,并在有 API key 的云发布场景执行账号/代理 preflight。local dry-run 不检测客户端在线状态。
|
|
99
|
+
- 本机发布推荐通过两种方式提供 `clientId`:
|
|
93
100
|
- flags:`yxer publish <type> <platform> <payload.json> --publish-channel local --client-id <clientId>`
|
|
94
101
|
- 预设默认值:`yxer config set-local-client-id <clientId>` 后,再执行 `--publish-channel local`
|
|
102
|
+
- 第四个位置参数属于旧版兼容,不再作为 Agent 推荐入口。
|
|
95
103
|
- 本机发布校验时,推荐在 `validate` 阶段就显式传入 `--publish-channel local`;若未显式传入但 payload 中已写 `publishChannel=local`,CLI 也会尝试从默认配置读取 `clientId`
|
|
96
104
|
- `yxer draft save` 只处理蚁小二内部草稿,不等同于平台草稿箱
|
|
97
105
|
- `yxer material create` 只做素材登记,前提是资源已经通过 `yxer upload --bucket material-library` 上传
|
|
98
106
|
- `yxer material add --file ...` 会自动完成上传和素材登记
|
|
99
107
|
- 查询类操作可以直接执行
|
|
100
|
-
-
|
|
108
|
+
- 已有完整标准 payload 时,发布类操作遵守“validate -> publish --dry-run -> 用户授权 -> publish”顺序;缺账号、字段、资源或动态对象时,先补“查账号 -> prepare/form/schema -> 上传资源 -> 查询复杂对象 -> 填 payload”。
|
|
109
|
+
- 页面式逐步填写可使用 `publish form` 会话;会话只负责本地状态,正式发布路径固定为 `publish form verify -> publish form export -> validate payload.json -> publish payload.json --dry-run -> publish payload.json`
|
|
110
|
+
- `publish form set` 只能写 `prepare` / `schema fields` / `fieldPlacements` 声明过的路径,不能用拼写不确定的路径试错。
|
|
111
|
+
- `publish form choose` 只用于 `dynamicFieldExamples` 声明的动态字段,必须带 `--source-command` 记录产生候选的 `yxer query ... --json` 命令;若 query 账号和目标账号不一致会被拒绝。
|
|
112
|
+
- `publish form verify`、`review`、`export` 会校验会话来源记录和当前 payload 是否一致;如果候选值被手工改写,需要重新执行 `set` 或 `choose`。
|
|
101
113
|
- 所有请求字段都必须来自 schema、平台文档或 CLI 返回结果;严禁虚构字段、乱猜枚举、手写 `raw` 对象或编造资源元数据
|
|
102
114
|
|
|
103
115
|
## 快速示例
|
|
@@ -202,6 +214,7 @@ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <cl
|
|
|
202
214
|
- 用户未指定“本机发布 / 本地发布 / 客户端发布”时,Agent 应默认使用云发布。
|
|
203
215
|
- 用户明确要求本机发布,或说明要走本机客户端/本机网络时,Agent 必须显式传 `--publish-channel local`,不要只在说明文字里表达。
|
|
204
216
|
- 若云发布返回“账号代理不存在”等代理相关错误,可建议切换到本机发布。
|
|
217
|
+
- CLI 默认只返回本机发布 `nextCommand`,不会自动切换通道;`--auto-fallback-local` 属于用户明确授权后的高级选项,不作为 Agent 默认路径。
|
|
205
218
|
- 若本机发布返回“客户端不在线”或“获取在线设备列表失败”,可建议用户启动蚁小二客户端,或改回云发布。
|
|
206
219
|
|
|
207
220
|
## 输出约定
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# 发布通道说明
|
|
2
|
+
|
|
3
|
+
`yxer publish` 支持两种发布通道:云发布 `cloud` 和本机发布 `local`。通道会影响任务由云端代理执行,还是由用户本机客户端执行。
|
|
4
|
+
|
|
5
|
+
## 通道定义
|
|
6
|
+
|
|
7
|
+
| 通道 | 值 | 执行位置 | 默认 |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| 云发布 | `cloud` | 蚁小二云端服务 | 是 |
|
|
10
|
+
| 本机发布 | `local` | 用户本机蚁小二客户端 | 否 |
|
|
11
|
+
|
|
12
|
+
用户未明确指定时,CLI 默认使用 `cloud`。本机发布必须显式使用 `--publish-channel local`,并提供可用的 `clientId`。
|
|
13
|
+
|
|
14
|
+
## 参数来源优先级
|
|
15
|
+
|
|
16
|
+
发布通道只在当前命令执行时解析一次,优先级如下:
|
|
17
|
+
|
|
18
|
+
1. 显式 flag:`--publish-channel cloud|local`
|
|
19
|
+
2. 旧版第四位置参数:仅在已明确为 `local` 时兼容读取 `clientId`
|
|
20
|
+
3. payload 字段:`publishChannel` / `clientId`
|
|
21
|
+
4. 本地配置:`yxer config set-local-client-id <clientId>`,仅用于本机发布的 `clientId`
|
|
22
|
+
5. 默认值:`cloud`
|
|
23
|
+
|
|
24
|
+
云发布会移除 `clientId`,避免把本机连接信息带入云端请求。第四位置参数只为旧版兼容保留,新流程应使用 `--publish-channel local --client-id <clientId>`。
|
|
25
|
+
|
|
26
|
+
## 推荐命令
|
|
27
|
+
|
|
28
|
+
云发布:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
yxer validate 抖音 video .\payload.json
|
|
32
|
+
yxer publish video 抖音 .\payload.json --dry-run
|
|
33
|
+
yxer publish video 抖音 .\payload.json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
本机发布:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
yxer validate 抖音 video .\payload.json --publish-channel local --client-id <clientId>
|
|
40
|
+
yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId> --dry-run
|
|
41
|
+
yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
如果已经配置默认本机客户端:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
yxer config set-local-client-id <clientId>
|
|
48
|
+
yxer validate 抖音 video .\payload.json --publish-channel local
|
|
49
|
+
yxer publish video 抖音 .\payload.json --publish-channel local --dry-run
|
|
50
|
+
yxer publish video 抖音 .\payload.json --publish-channel local
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Dry-run 元数据
|
|
54
|
+
|
|
55
|
+
`yxer publish --dry-run` 会返回最终请求和通道解析结果。发布前应检查:
|
|
56
|
+
|
|
57
|
+
| 字段 | 含义 |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `data.meta.effectivePublishChannel` | 最终生效通道 |
|
|
60
|
+
| `data.meta.publishChannelSource` | 通道来源:`flag`、`payload`、`positional`、`default` |
|
|
61
|
+
| `data.meta.clientIdSource` | `clientId` 来源:`flag`、`payload`、`positional`、`config`、`none` |
|
|
62
|
+
| `data.meta.requestHash` | 最终请求指纹,用于确认 dry-run 和正式发布使用同一份请求 |
|
|
63
|
+
|
|
64
|
+
`validate`、`publish --dry-run` 和正式 `publish` 必须使用同一份 `payload.json` 和同一套通道参数。
|
|
65
|
+
|
|
66
|
+
## 失败与回退
|
|
67
|
+
|
|
68
|
+
- 云发布报账号代理、云端代理或代理不存在问题时,可以提示用户检查代理配置,或在用户确认后改为本机发布。
|
|
69
|
+
- 本机发布报客户端不在线、获取在线设备失败时,应提示用户启动并登录蚁小二客户端,或在用户确认后改回云发布。
|
|
70
|
+
- `--auto-fallback-local` 不作为默认路径,只能在用户明确授权自动切换到本机发布时使用。
|
|
71
|
+
|
|
72
|
+
## 禁止行为
|
|
73
|
+
|
|
74
|
+
- 用户明确要求本机发布时仍默认走 `cloud`
|
|
75
|
+
- 本机发布缺少 `clientId`
|
|
76
|
+
- `validate`、`publish --dry-run`、正式 `publish` 使用不同通道参数
|
|
77
|
+
- 根据服务端默认值猜测通道,而不是以 CLI 解析结果为准
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
## 优先读取
|
|
8
8
|
|
|
9
|
-
1. [`../
|
|
10
|
-
2. [`../
|
|
9
|
+
1. [`../protocols/execution.md`](../protocols/execution.md)
|
|
10
|
+
2. [`../protocols/confirmation.md`](../protocols/confirmation.md)
|
|
11
|
+
3. [`../protocols/error-recovery.md`](../protocols/error-recovery.md)
|
|
12
|
+
4. [`../yixiaoer-shared.md`](../yixiaoer-shared.md)
|
|
13
|
+
5. [`../workflows/account-selection.md`](../workflows/account-selection.md)
|
|
11
14
|
|
|
12
15
|
## 常用命令
|
|
13
16
|
|
|
@@ -36,4 +39,5 @@ yxer skill sync [--global]
|
|
|
36
39
|
- `yxer accounts update` 是写操作,正式执行前必须先用同一参数执行 `--dry-run`
|
|
37
40
|
- 涉及账号分组的 `visibleUsers`、指定成员可见、按成员挑选负责人时,先执行 `yxer query members` 获取真实成员 ID
|
|
38
41
|
- 命中多个账号时,结构化列出候选并让用户确认;只有一个可用账号时可自动选中并说明
|
|
42
|
+
- 查询或更新账号配置时,按执行协议记录当前状态;任何写操作失败后按错误恢复协议处理,不直接重复执行
|
|
39
43
|
- 用户明确说“先不要发布,只查环境/账号”时,完成本域后直接停下,不擅自继续发布流程
|
|
@@ -6,9 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
## 读取顺序
|
|
8
8
|
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
3.
|
|
9
|
+
1. [`../protocols/execution.md`](../protocols/execution.md)
|
|
10
|
+
2. [`../protocols/confirmation.md`](../protocols/confirmation.md)
|
|
11
|
+
3. [`../protocols/provenance.md`](../protocols/provenance.md)
|
|
12
|
+
4. [`../protocols/error-recovery.md`](../protocols/error-recovery.md)
|
|
13
|
+
5. 草稿任务:[`../workflows/draft-workflow.md`](../workflows/draft-workflow.md)
|
|
14
|
+
6. 素材任务:[`../workflows/material-workflow.md`](../workflows/material-workflow.md)
|
|
15
|
+
7. 若随后要直接发布,再切回 [`./publish.md`](./publish.md)
|
|
12
16
|
|
|
13
17
|
## 常用命令
|
|
14
18
|
|
|
@@ -25,5 +29,6 @@ yxer material create <payload.json> [--dry-run]
|
|
|
25
29
|
- 用户只说“保存草稿”时,先区分蚁小二草稿和平台草稿,不要自行猜测
|
|
26
30
|
- 用户只想把资源放进素材库时,优先 `material add`
|
|
27
31
|
- 用户已有上传结果,只差登记素材时,再用 `material create`
|
|
32
|
+
- 草稿和素材写操作必须先 dry-run;资源字段必须保留上传来源,不能手写 key、尺寸或格式
|
|
28
33
|
- 素材任务不自动进入发布主流程;只有用户明确要“上传后马上发布”时,再切回发布域
|
|
29
34
|
- 用户明确说“先存一下,别发”时,停在本域,不擅自回切发布域
|
|
@@ -3,16 +3,21 @@
|
|
|
3
3
|
适用范围:用户要发布视频、图文、文章,或要修订发布 payload、解释字段归属、确认发布通道。
|
|
4
4
|
|
|
5
5
|
**CRITICAL - 只要用户意图落在本域,MUST 先读取下方 workflow,再决定是否执行任何 `prepare`、字段查询、`validate` 或 `publish`。**
|
|
6
|
-
**BLOCKING REQUIREMENT -
|
|
6
|
+
**BLOCKING REQUIREMENT - 未使用同一份 `payload.json` 和同一套发布通道参数完成 `validate`、`publish --dry-run` 前,绝对禁止正式 `publish`。缺账号、字段、资源或动态对象时,必须先完成 `doctor`、账号确认、`prepare/form`、`schema fields`、上传和查询。**
|
|
7
|
+
**AI EXECUTION PROTOCOL - 发布域任务必须先按协议状态机推进,不允许越过 `validated` / `dry_run_passed` 状态直接发布。**
|
|
7
8
|
|
|
8
9
|
## 读取顺序
|
|
9
10
|
|
|
10
|
-
1. [`../
|
|
11
|
-
2. [`../
|
|
12
|
-
3. [`../
|
|
13
|
-
4. [`../
|
|
14
|
-
5. [`../workflows/
|
|
15
|
-
6.
|
|
11
|
+
1. [`../protocols/execution.md`](../protocols/execution.md)
|
|
12
|
+
2. [`../protocols/confirmation.md`](../protocols/confirmation.md)
|
|
13
|
+
3. [`../protocols/provenance.md`](../protocols/provenance.md)
|
|
14
|
+
4. [`../protocols/error-recovery.md`](../protocols/error-recovery.md)
|
|
15
|
+
5. [`../workflows/common-rules.md`](../workflows/common-rules.md)
|
|
16
|
+
6. [`../workflows/data-accuracy.md`](../workflows/data-accuracy.md)
|
|
17
|
+
7. [`../workflows/account-selection.md`](../workflows/account-selection.md)
|
|
18
|
+
8. [`../workflows/local-vs-cloud.md`](../workflows/local-vs-cloud.md)
|
|
19
|
+
9. [`../workflows/payload-sourcing.md`](../workflows/payload-sourcing.md)
|
|
20
|
+
10. 按类型继续读取:
|
|
16
21
|
- 图文:[`../workflows/publish-imageText.md`](../workflows/publish-imageText.md)
|
|
17
22
|
- 视频:[`../workflows/publish-video.md`](../workflows/publish-video.md)
|
|
18
23
|
- 文章:[`../workflows/publish-article.md`](../workflows/publish-article.md)
|
|
@@ -35,9 +40,11 @@
|
|
|
35
40
|
|
|
36
41
|
## 强制门禁
|
|
37
42
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
43
|
+
- 未进入协议状态机的 `workflow_loaded` 状态不执行 CLI 写操作
|
|
44
|
+
- 已有完整 payload 时,可直接进入 `validate -> publish --dry-run`;但不得跳过正式发布前用户授权
|
|
45
|
+
- 缺账号、字段、资源或动态对象时,未执行 `yxer doctor` 不进入组装流程
|
|
46
|
+
- 缺账号或账号不确定时,未确认 `accounts list` 中账号 `status=1` 不继续
|
|
47
|
+
- 需要组装或补字段时,未执行 `prepare` / `publish form` / `schema fields` 不组装 payload;只有需要 payload 骨架时再补 `schema get`
|
|
41
48
|
- 未按 `data-accuracy.md` 完成动态字段查询和多候选确认,不继续写 payload 或发布
|
|
42
49
|
- 未先 `validate` 与 `publish --dry-run` 不执行正式 `publish`
|
|
43
50
|
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
## 优先读取
|
|
8
8
|
|
|
9
|
-
1. [`../
|
|
10
|
-
2.
|
|
9
|
+
1. [`../protocols/execution.md`](../protocols/execution.md)
|
|
10
|
+
2. [`../protocols/error-recovery.md`](../protocols/error-recovery.md)
|
|
11
|
+
3. [`../protocols/provenance.md`](../protocols/provenance.md)
|
|
12
|
+
4. [`../workflows/publish-troubleshooting.md`](../workflows/publish-troubleshooting.md)
|
|
13
|
+
5. 必要时回读:
|
|
11
14
|
- [`../workflows/common-rules.md`](../workflows/common-rules.md)
|
|
12
15
|
- [`../workflows/local-vs-cloud.md`](../workflows/local-vs-cloud.md)
|
|
13
16
|
- [`./publish.md`](./publish.md)
|
|
@@ -27,4 +30,5 @@ yxer doctor
|
|
|
27
30
|
- `validate` 失败时,优先回查 `prepare`、`schema get` 和字段来源
|
|
28
31
|
- 云发布报代理问题时,可建议改本机发布
|
|
29
32
|
- 本机发布报客户端不在线时,提示用户启动并登录客户端,或改回云发布
|
|
33
|
+
- 正式发布失败后,先按错误恢复协议判断是否已产生副作用;未确认前不要重复执行正式 `publish`
|
|
30
34
|
- 用户只说“解释下这条报错”时,可先停留在本域做解释和修复建议,不擅自触发新的发布写操作
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
- `README.md` 是否已更新
|
|
27
27
|
- `skills/yixiaoer/SKILL.md` 是否已同步当前版本说明
|
|
28
|
-
- `references/cli/`、`references/workflows/` 是否与本次功能一致
|
|
28
|
+
- `skills/yixiaoer/references/cli/`、`skills/yixiaoer/references/workflows/` 是否与本次功能一致
|
|
29
29
|
- `schemas/` 是否覆盖本次变更涉及的平台字段
|
|
30
30
|
|
|
31
31
|
## 3. 标准上线步骤
|
|
@@ -114,7 +114,7 @@ bin\yxer.exe skill sync --global
|
|
|
114
114
|
- `skills/yixiaoer/references/keyword-reference.md`
|
|
115
115
|
- `skills/yixiaoer/SKILL.md`
|
|
116
116
|
- `references/cli/`
|
|
117
|
-
- `references/workflows/`
|
|
117
|
+
- `skills/yixiaoer/references/workflows/`
|
|
118
118
|
- `schemas/`
|
|
119
119
|
|
|
120
120
|
## 4. 建议交付方式
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
| `goods` | 查询商品 |
|
|
89
89
|
| `collections` | 查询合集 |
|
|
90
90
|
| `challenges` | 查询话题 |
|
|
91
|
-
| `records
|
|
91
|
+
| `query records` | 查询发布记录 |
|
|
92
92
|
|
|
93
93
|
## 8. 使用场景关键词
|
|
94
94
|
|
|
@@ -109,5 +109,6 @@
|
|
|
109
109
|
|
|
110
110
|
- `yxer` 是实际执行工具
|
|
111
111
|
- `yixiaoer skill` 是给 AI 读的规则包
|
|
112
|
-
-
|
|
112
|
+
- 已有完整 payload 时,发布前必须先 `validate`、`publish --dry-run`
|
|
113
|
+
- 缺字段或资源时,先用 `prepare` / `schema fields` / `publish form` 补齐 payload
|
|
113
114
|
- 资源必须先上传,不能直接在 payload 里乱填外链
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# 未 CLI 化能力索引
|
|
2
|
+
|
|
3
|
+
本页用于标记当前 `yxer` CLI 尚未覆盖、或仅部分覆盖的能力。它不是兼容入口说明,也不代表仓库内存在其他可执行主流程。
|
|
4
|
+
|
|
5
|
+
## 使用规则
|
|
6
|
+
|
|
7
|
+
1. 如果能力已经有正式 `yxer` 命令,优先直接调用现有命令。
|
|
8
|
+
2. 如果能力只有“部分覆盖”,优先使用现有命令完成已支持部分,剩余字段仅把对应文档当参考。
|
|
9
|
+
3. 如果能力仍“未覆盖”,应优先补成新的 `yxer` 子命令,而不是寻找旧脚本或新增脚本入口。
|
|
10
|
+
|
|
11
|
+
## 能力状态表
|
|
12
|
+
|
|
13
|
+
| 能力 | 当前状态 | 推荐/现有命令 | 参考文档 |
|
|
14
|
+
| --- | --- | --- | --- |
|
|
15
|
+
| 蚁小二内部草稿保存 | 已覆盖 | `yxer draft save <payload.json>` | `skills/yixiaoer/references/save-draft.md` |
|
|
16
|
+
| 平台草稿发布 | 部分覆盖 | `yxer publish <type> <platform> <payload.json>` | `skills/yixiaoer/references/save-draft.md` |
|
|
17
|
+
| 素材库登记 | 已覆盖 | `yxer material create <payload.json>` | `skills/yixiaoer/references/material-resource.md` |
|
|
18
|
+
| 素材上传并登记一体化 | 已覆盖 | `yxer material add --file <文件路径或URL>` | `skills/yixiaoer/references/material-resource.md` |
|
|
19
|
+
| 账号数据概览 | 已覆盖 | `yxer query account-overviews --platform P [--name 关键词] [--group 分组] [--login-status 1] [--member-id ID]` | `skills/yixiaoer/references/get-account-overviews.md` |
|
|
20
|
+
| 成员列表 | 已覆盖 | `yxer query members [--page 1] [--size 10] [--status joined] [--query 关键词] [--role master|admin|member]` | `skills/yixiaoer/references/get-members.md` |
|
|
21
|
+
| 作品数据概览 | 已覆盖 | `yxer query content-overviews [--platform P] [--account-id ID] [--type video|article|miniVideo|dynamic]` | `skills/yixiaoer/references/get-content-overviews.md` |
|
|
22
|
+
| 征文活动 | 已覆盖 | `yxer query activities <account_id> [--type video|article] [--category-id ID] [--query 关键词]` | `skills/yixiaoer/references/get-publish-activities.md` |
|
|
23
|
+
| 小程序列表 | 已覆盖 | `yxer query miniapps <account_id> [--query 关键词]` | `skills/yixiaoer/references/get-miniapps.md` |
|
|
24
|
+
| 同步发布应用 | 已覆盖 | `yxer query syncapps <account_id>` | `skills/yixiaoer/references/get-sync-apps.md` |
|
|
25
|
+
| 热点列表 | 已覆盖 | `yxer query hot-events <account_id>` | `skills/yixiaoer/references/get-hot-events.md` |
|
|
26
|
+
| 群聊列表 | 已覆盖 | `yxer query groups <account_id>` | `skills/yixiaoer/references/get-groups.md` |
|
|
27
|
+
| 账号分组列表 | 已覆盖 | `yxer account-group list [--page 1] [--size 10]` | `skills/yixiaoer/references/get-account-groups.md` |
|
|
28
|
+
| 创建账号分组 | 已覆盖 | `yxer account-group create <name> [--dry-run]` | `skills/yixiaoer/references/create-account-group.md` |
|
|
29
|
+
| 更新账号分组 | 已覆盖 | `yxer account-group update <group_id> <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]` | `skills/yixiaoer/references/update-account-group.md` |
|
|
30
|
+
| 删除账号分组 | 已覆盖 | `yxer account-group delete <group_id> [--dry-run]` | `skills/yixiaoer/references/delete-account-group.md` |
|
|
31
|
+
| 音乐分类 | 已覆盖 | `yxer query music-categories <account_id>` | `skills/yixiaoer/references/get-music-categories.md` |
|
|
32
|
+
| 游戏挂载 | 已覆盖 | `yxer query games <account_id> [--query 关键词]` | `skills/yixiaoer/references/get-games.md` |
|
|
33
|
+
| 代理管理 | 已覆盖 | `yxer query proxies` / `yxer query proxy-areas` / `yxer update-account <account_id> ... --dry-run` | `skills/yixiaoer/references/proxy-management.md` |
|
|
34
|
+
|
|
35
|
+
## 推荐迁移顺序
|
|
36
|
+
|
|
37
|
+
当前遗留表中的 CLI 化项目均已覆盖;后续若旧 skill 文档新增能力,应继续按本表补充状态。
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
| :--- | :--- |
|
|
10
10
|
| `DouYin` | `抖音` |
|
|
11
11
|
| `KuaiShou` | `快手` |
|
|
12
|
+
| `KuaiShou-Open` | `快手-Open` |
|
|
12
13
|
| `ShiPinHao` | `视频号` |
|
|
13
14
|
| `BiLiBiLi` | `哔哩哔哩` |
|
|
15
|
+
| `BiLiBiLi-Open` | `哔哩哔哩-Open` |
|
|
14
16
|
| `XiaoHongShu` | `小红书` |
|
|
15
17
|
| `BaiJiaHao` | `百家号` |
|
|
16
18
|
| `TouTiaoHao` | `头条号` |
|
|
@@ -50,7 +52,6 @@
|
|
|
50
52
|
| `JianShu` | `简书` |
|
|
51
53
|
| `MeiYou` | `美柚` |
|
|
52
54
|
| `WeiXinGongZhongHao-Open` | `微信公众号-Open` |
|
|
53
|
-
| `BiLiBiLi-Open` | `哔哩哔哩-Open` |
|
|
54
55
|
|
|
55
56
|
## 平台类型枚举 (PlatformType)
|
|
56
57
|
|