@yixiaoermail/cli 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/bin/ensure-executable.js +25 -0
  2. package/bin/postinstall.js +18 -0
  3. package/bin/resolve-binary.js +36 -0
  4. package/bin/yxer.js +8 -17
  5. package/dist/yxer-darwin-amd64 +0 -0
  6. package/dist/yxer-darwin-arm64 +0 -0
  7. package/dist/yxer-linux-amd64 +0 -0
  8. package/dist/yxer-linux-arm64 +0 -0
  9. package/dist/yxer-windows-amd64.exe +0 -0
  10. package/dist/yxer-windows-arm64.exe +0 -0
  11. package/package.json +7 -1
  12. package/references/cli/command-reference.md +234 -0
  13. package/references/cli/skill-install.md +76 -0
  14. package/references/legacy/capabilities.md +32 -0
  15. package/references/platforms/index.md +20 -0
  16. package/references/workflows/account-selection.md +38 -0
  17. package/references/workflows/common-rules.md +257 -0
  18. package/references/workflows/draft-workflow.md +44 -0
  19. package/references/workflows/local-vs-cloud.md +50 -0
  20. package/references/workflows/material-workflow.md +43 -0
  21. package/references/workflows/payload-sourcing.md +70 -0
  22. package/references/workflows/publish-article.md +66 -0
  23. package/references/workflows/publish-imageText.md +62 -0
  24. package/references/workflows/publish-troubleshooting.md +50 -0
  25. package/references/workflows/publish-video.md +63 -0
  26. package/schemas/account.schema.json +19 -0
  27. package/schemas/platforms/acfun.article.schema.json +117 -0
  28. package/schemas/platforms/acfun.video.schema.json +139 -0
  29. package/schemas/platforms/aiqiyi.article.schema.json +29 -0
  30. package/schemas/platforms/aiqiyi.video.schema.json +154 -0
  31. package/schemas/platforms/baijiahao.article.schema.json +160 -0
  32. package/schemas/platforms/baijiahao.imageText.schema.json +110 -0
  33. package/schemas/platforms/baijiahao.video.schema.json +179 -0
  34. package/schemas/platforms/bilibili.article.schema.json +109 -0
  35. package/schemas/platforms/bilibili.video.schema.json +175 -0
  36. package/schemas/platforms/chejiahao.article.schema.json +108 -0
  37. package/schemas/platforms/chejiahao.video.schema.json +111 -0
  38. package/schemas/platforms/csdn.article.schema.json +106 -0
  39. package/schemas/platforms/dayuhao.article.schema.json +106 -0
  40. package/schemas/platforms/dayuhao.video.schema.json +153 -0
  41. package/schemas/platforms/dewu.video.schema.json +134 -0
  42. package/schemas/platforms/douban.article.schema.json +48 -0
  43. package/schemas/platforms/douyin.article.schema.json +318 -0
  44. package/schemas/platforms/douyin.imageText.schema.json +217 -0
  45. package/schemas/platforms/douyin.video.schema.json +744 -0
  46. package/schemas/platforms/duoduoshipin.video.schema.json +108 -0
  47. package/schemas/platforms/fengwang.video.schema.json +135 -0
  48. package/schemas/platforms/jianshu.article.schema.json +33 -0
  49. package/schemas/platforms/kuaichuanhao.article.schema.json +83 -0
  50. package/schemas/platforms/kuaishou.imageText.schema.json +170 -0
  51. package/schemas/platforms/kuaishou.video.schema.json +240 -0
  52. package/schemas/platforms/meipai.video.schema.json +123 -0
  53. package/schemas/platforms/meiyou.video.schema.json +96 -0
  54. package/schemas/platforms/pipixia.video.schema.json +94 -0
  55. package/schemas/platforms/qiehao.article.schema.json +89 -0
  56. package/schemas/platforms/qiehao.video.schema.json +147 -0
  57. package/schemas/platforms/shipinhao.imageText.schema.json +138 -0
  58. package/schemas/platforms/shipinhao.video.schema.json +236 -0
  59. package/schemas/platforms/souhuhao.article.schema.json +73 -0
  60. package/schemas/platforms/souhuhao.video.schema.json +171 -0
  61. package/schemas/platforms/souhushipin.video.schema.json +115 -0
  62. package/schemas/platforms/tengxunshipin.video.schema.json +114 -0
  63. package/schemas/platforms/toutiaohao.article.schema.json +165 -0
  64. package/schemas/platforms/toutiaohao.imageText.schema.json +83 -0
  65. package/schemas/platforms/toutiaohao.video.schema.json +134 -0
  66. package/schemas/platforms/wangyihao.article.schema.json +85 -0
  67. package/schemas/platforms/wangyihao.video.schema.json +151 -0
  68. package/schemas/platforms/weishi.video.schema.json +101 -0
  69. package/schemas/platforms/weixin.account.article.schema.json +148 -0
  70. package/schemas/platforms/xhs.imageText.schema.json +119 -0
  71. package/schemas/platforms/xiaohongshu.video.schema.json +224 -0
  72. package/schemas/platforms/xiaohongshushop.video.schema.json +141 -0
  73. package/schemas/platforms/xinlang.article.schema.json +69 -0
  74. package/schemas/platforms/xinlang.imageText.schema.json +85 -0
  75. package/schemas/platforms/xinlang.video.schema.json +151 -0
  76. package/schemas/platforms/xueqiuhao.article.schema.json +84 -0
  77. package/schemas/platforms/yichehao.article.schema.json +140 -0
  78. package/schemas/platforms/yichehao.video.schema.json +101 -0
  79. package/schemas/platforms/yidianhao.article.schema.json +77 -0
  80. package/schemas/platforms/yidianhao.video.schema.json +152 -0
  81. package/schemas/platforms/zhihu.article.schema.json +104 -0
  82. package/schemas/platforms/zhihu.imageText.schema.json +61 -0
  83. package/schemas/platforms/zhihu.video.schema.json +144 -0
  84. package/schemas/publish.schema.json +26 -0
  85. package/skills/yixiaoer/SKILL.md +1 -1
  86. package/skills/yixiaoer/plugin.json +1 -1
@@ -0,0 +1,63 @@
1
+ # 视频发布工作流
2
+
3
+ > 适用范围:抖音视频、快手视频、B 站视频、视频号视频、微博视频等。
4
+ > 阅读本文档前,请先阅读 [common-rules.md](./common-rules.md)。
5
+
6
+ ---
7
+
8
+ ## 推荐入口
9
+
10
+ 仅支持 `payload.json` 模式。发布前先获取表单字段和 schema:
11
+
12
+ ```bash
13
+ yxer prepare <platform> video
14
+ yxer schema fields <platform> video
15
+ yxer schema get <platform> video
16
+ ```
17
+
18
+ 开始前,先补读:
19
+
20
+ - [`account-selection.md`](./account-selection.md)
21
+ - [`local-vs-cloud.md`](./local-vs-cloud.md)
22
+ - [`payload-sourcing.md`](./payload-sourcing.md)
23
+
24
+ ## 执行顺序
25
+
26
+ 1. 查询账号:`yxer accounts list [platform] [--status 1] [--json]`
27
+ 2. 获取前置数据:`yxer prepare <platform> video`
28
+ 3. 先获取字段视图:`yxer schema fields <platform> video`;需要 payload 骨架时再执行 `yxer schema get <platform> video`
29
+ 4. 上传视频:`yxer upload <视频路径或URL>`
30
+ 5. 上传封面:`yxer upload <封面路径或URL>`
31
+ 6. 按需查询分类、位置、音乐、合集、话题、商品
32
+ 7. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
33
+ 8. 查阅对应平台文档:`skills/yixiaoer/references/platforms/video/`
34
+ 9. 执行校验:`yxer validate <platform> video <payload.json>`
35
+ 10. 正式发布:`yxer publish video <platform> <payload.json>`
36
+
37
+ ## 关键规则
38
+
39
+ - 发布前必须确认目标账号 `status=1`
40
+ - 视频只能有一个,封面必须单独上传
41
+ - 用户未提供封面时,必须补问,不要自动截帧
42
+ - 可选复杂对象必须通过查询命令取得完整对象后再填入
43
+ - 发布前先看 `prepare` 和 `schema fields` 返回的字段;只有要确认完整骨架时再看 `schema get`
44
+ - `payload.json` 必须使用统一标准结构:顶层 `publishArgs`,业务字段放在 `publishArgs.accountForms[].contentPublishForm`
45
+ - 用户明确要求本机发布时,必须显式传 `--publish-channel local` 和 `--client-id`
46
+
47
+ ## 发布示例
48
+
49
+ ```bash
50
+ yxer validate 抖音 video .\payload.json
51
+ yxer publish video 抖音 .\payload.json
52
+ ```
53
+
54
+ ## 本机发布示例
55
+
56
+ ```bash
57
+ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <clientId>
58
+ ```
59
+
60
+ ## 平台文档入口
61
+
62
+ - 索引:`skills/yixiaoer/references/platforms/video/index.md`
63
+ - 平台细节:`skills/yixiaoer/references/platforms/video/*.md`
@@ -0,0 +1,19 @@
1
+ {
2
+ "title": "YiXiaoEr Account Schema Root",
3
+ "type": "object",
4
+ "required": [
5
+ "platformAccountId"
6
+ ],
7
+ "properties": {
8
+ "platformAccountId": {
9
+ "type": "string"
10
+ },
11
+ "status": {
12
+ "type": "number"
13
+ },
14
+ "nickname": {
15
+ "type": "string"
16
+ }
17
+ },
18
+ "additionalProperties": true
19
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "title": "AcFun 文章发布表单 (AcFun Article)",
3
+ "type": "object",
4
+ "required": [
5
+ "formType",
6
+ "title",
7
+ "content",
8
+ "covers",
9
+ "category",
10
+ "type"
11
+ ],
12
+ "properties": {
13
+ "formType": {
14
+ "type": "string",
15
+ "const": "task"
16
+ },
17
+ "title": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 50
21
+ },
22
+ "content": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "maxLength": 50000
26
+ },
27
+ "covers": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "items": {
31
+ "type": "object",
32
+ "required": [
33
+ "key",
34
+ "size",
35
+ "width",
36
+ "height"
37
+ ],
38
+ "properties": {
39
+ "key": {
40
+ "type": "string"
41
+ },
42
+ "size": {
43
+ "type": "integer",
44
+ "minimum": 1
45
+ },
46
+ "width": {
47
+ "type": "integer",
48
+ "minimum": 1
49
+ },
50
+ "height": {
51
+ "type": "integer",
52
+ "minimum": 1
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "category": {
58
+ "type": "array",
59
+ "minItems": 1,
60
+ "items": {
61
+ "type": "object",
62
+ "required": [
63
+ "yixiaoerId",
64
+ "yixiaoerName",
65
+ "raw"
66
+ ],
67
+ "properties": {
68
+ "yixiaoerId": {
69
+ "type": "string"
70
+ },
71
+ "yixiaoerName": {
72
+ "type": "string"
73
+ },
74
+ "raw": {
75
+ "type": "object"
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "type": {
81
+ "type": "number",
82
+ "enum": [
83
+ 0,
84
+ 1
85
+ ],
86
+ "default": 0
87
+ },
88
+ "desc": {
89
+ "type": "string",
90
+ "maxLength": 200
91
+ },
92
+ "tags": {
93
+ "type": "array",
94
+ "maxItems": 1,
95
+ "items": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "contentSourceUrl": {
100
+ "type": "string",
101
+ "format": "uri"
102
+ },
103
+ "pubType": {
104
+ "type": "number",
105
+ "enum": [
106
+ 0,
107
+ 1
108
+ ],
109
+ "default": 1
110
+ },
111
+ "scheduledTime": {
112
+ "type": "number",
113
+ "minimum": 0
114
+ }
115
+ },
116
+ "additionalProperties": false
117
+ }
@@ -0,0 +1,139 @@
1
+ {
2
+ "title": "AcFun 视频发布表单 (AcFun Video)",
3
+ "type": "object",
4
+ "required": [
5
+ "formType",
6
+ "title",
7
+ "category",
8
+ "type"
9
+ ],
10
+ "properties": {
11
+ "formType": {
12
+ "type": "string",
13
+ "const": "task"
14
+ },
15
+ "title": {
16
+ "type": "string",
17
+ "minLength": 1
18
+ },
19
+ "category": {
20
+ "type": "array",
21
+ "minItems": 1,
22
+ "items": {
23
+ "type": "object",
24
+ "required": [
25
+ "yixiaoerId",
26
+ "yixiaoerName",
27
+ "raw"
28
+ ],
29
+ "properties": {
30
+ "yixiaoerId": {
31
+ "type": "string"
32
+ },
33
+ "yixiaoerName": {
34
+ "type": "string"
35
+ },
36
+ "raw": {
37
+ "type": "object"
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "type": {
43
+ "type": "number",
44
+ "enum": [
45
+ 0,
46
+ 1
47
+ ],
48
+ "default": 0
49
+ },
50
+ "description": {
51
+ "type": "string"
52
+ },
53
+ "tags": {
54
+ "type": "array",
55
+ "maxItems": 6,
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "video": {
61
+ "type": "object",
62
+ "required": [
63
+ "key",
64
+ "size",
65
+ "width",
66
+ "height"
67
+ ],
68
+ "properties": {
69
+ "key": {
70
+ "type": "string"
71
+ },
72
+ "size": {
73
+ "type": "integer",
74
+ "minimum": 1
75
+ },
76
+ "width": {
77
+ "type": "integer",
78
+ "minimum": 1
79
+ },
80
+ "height": {
81
+ "type": "integer",
82
+ "minimum": 1
83
+ },
84
+ "duration": {
85
+ "type": "number",
86
+ "minimum": 1
87
+ },
88
+ "format": {
89
+ "type": "string",
90
+ "enum": [
91
+ "mp4",
92
+ "mov",
93
+ "flv",
94
+ "avi"
95
+ ]
96
+ }
97
+ }
98
+ },
99
+ "cover": {
100
+ "type": "object",
101
+ "required": [
102
+ "key",
103
+ "size",
104
+ "width",
105
+ "height"
106
+ ],
107
+ "properties": {
108
+ "key": {
109
+ "type": "string"
110
+ },
111
+ "size": {
112
+ "type": "integer"
113
+ },
114
+ "width": {
115
+ "type": "integer"
116
+ },
117
+ "height": {
118
+ "type": "integer"
119
+ }
120
+ }
121
+ },
122
+ "coverKey": {
123
+ "type": "string"
124
+ },
125
+ "scheduledTime": {
126
+ "type": "number",
127
+ "minimum": 0
128
+ },
129
+ "pubType": {
130
+ "type": "number",
131
+ "enum": [
132
+ 0,
133
+ 1
134
+ ],
135
+ "default": 1
136
+ }
137
+ },
138
+ "additionalProperties": false
139
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "title": "爱奇艺文章发布表单 (AiQiYi Article)",
3
+ "type": "object",
4
+ "required": [
5
+ "formType",
6
+ "title",
7
+ "pubType"
8
+ ],
9
+ "properties": {
10
+ "formType": {
11
+ "type": "string",
12
+ "const": "task"
13
+ },
14
+ "title": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "maxLength": 50
18
+ },
19
+ "pubType": {
20
+ "type": "number",
21
+ "enum": [
22
+ 0,
23
+ 1
24
+ ],
25
+ "default": 1
26
+ }
27
+ },
28
+ "additionalProperties": false
29
+ }
@@ -0,0 +1,154 @@
1
+ {
2
+ "title": "爱奇艺视频发布表单 (AiQiYi Video)",
3
+ "type": "object",
4
+ "required": [
5
+ "formType",
6
+ "title",
7
+ "description",
8
+ "category",
9
+ "createType",
10
+ "pubType"
11
+ ],
12
+ "properties": {
13
+ "formType": {
14
+ "type": "string",
15
+ "const": "task"
16
+ },
17
+ "title": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 50
21
+ },
22
+ "description": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "maxLength": 500
26
+ },
27
+ "category": {
28
+ "type": "array",
29
+ "minItems": 1,
30
+ "items": {
31
+ "type": "object",
32
+ "required": [
33
+ "yixiaoerId",
34
+ "yixiaoerName",
35
+ "raw"
36
+ ],
37
+ "properties": {
38
+ "yixiaoerId": {
39
+ "type": "string"
40
+ },
41
+ "yixiaoerName": {
42
+ "type": "string"
43
+ },
44
+ "raw": {
45
+ "type": "object"
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "createType": {
51
+ "type": "number",
52
+ "enum": [
53
+ 1,
54
+ 2
55
+ ],
56
+ "default": 1
57
+ },
58
+ "pubType": {
59
+ "type": "number",
60
+ "enum": [
61
+ 0,
62
+ 1
63
+ ],
64
+ "default": 1
65
+ },
66
+ "tags": {
67
+ "type": "array",
68
+ "maxItems": 10,
69
+ "items": {
70
+ "type": "string",
71
+ "maxLength": 20
72
+ }
73
+ },
74
+ "declaration": {
75
+ "type": "number",
76
+ "enum": [
77
+ 0,
78
+ 1,
79
+ 2,
80
+ 3
81
+ ]
82
+ },
83
+ "video": {
84
+ "type": "object",
85
+ "required": [
86
+ "key",
87
+ "size",
88
+ "width",
89
+ "height"
90
+ ],
91
+ "properties": {
92
+ "key": {
93
+ "type": "string"
94
+ },
95
+ "size": {
96
+ "type": "integer",
97
+ "minimum": 1
98
+ },
99
+ "width": {
100
+ "type": "integer",
101
+ "minimum": 1
102
+ },
103
+ "height": {
104
+ "type": "integer",
105
+ "minimum": 1
106
+ },
107
+ "duration": {
108
+ "type": "number",
109
+ "minimum": 1
110
+ },
111
+ "format": {
112
+ "type": "string",
113
+ "enum": [
114
+ "mp4",
115
+ "mov",
116
+ "flv",
117
+ "mkv"
118
+ ]
119
+ }
120
+ }
121
+ },
122
+ "cover": {
123
+ "type": "object",
124
+ "required": [
125
+ "key",
126
+ "size",
127
+ "width",
128
+ "height"
129
+ ],
130
+ "properties": {
131
+ "key": {
132
+ "type": "string"
133
+ },
134
+ "size": {
135
+ "type": "integer"
136
+ },
137
+ "width": {
138
+ "type": "integer"
139
+ },
140
+ "height": {
141
+ "type": "integer"
142
+ }
143
+ }
144
+ },
145
+ "coverKey": {
146
+ "type": "string"
147
+ },
148
+ "scheduledTime": {
149
+ "type": "number",
150
+ "minimum": 0
151
+ }
152
+ },
153
+ "additionalProperties": false
154
+ }
@@ -0,0 +1,160 @@
1
+ {
2
+ "title": "百家号文章发布表单 (BaijiaHao Article)",
3
+ "type": "object",
4
+ "required": [
5
+ "formType",
6
+ "title",
7
+ "content",
8
+ "covers",
9
+ "pubType"
10
+ ],
11
+ "properties": {
12
+ "formType": {
13
+ "type": "string",
14
+ "const": "task"
15
+ },
16
+ "title": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 64
20
+ },
21
+ "content": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 50000
25
+ },
26
+ "covers": {
27
+ "type": "array",
28
+ "minItems": 1,
29
+ "maxItems": 3,
30
+ "items": {
31
+ "type": "object",
32
+ "required": [
33
+ "key",
34
+ "size",
35
+ "width",
36
+ "height"
37
+ ],
38
+ "properties": {
39
+ "key": {
40
+ "type": "string"
41
+ },
42
+ "size": {
43
+ "type": "integer",
44
+ "minimum": 1
45
+ },
46
+ "width": {
47
+ "type": "integer",
48
+ "minimum": 1
49
+ },
50
+ "height": {
51
+ "type": "integer",
52
+ "minimum": 1
53
+ }
54
+ }
55
+ }
56
+ },
57
+ "coverKey": {
58
+ "type": "string"
59
+ },
60
+ "thumbMediaId": {
61
+ "type": "string"
62
+ },
63
+ "category": {
64
+ "type": "array",
65
+ "minItems": 2,
66
+ "maxItems": 2,
67
+ "items": {
68
+ "type": "object",
69
+ "required": [
70
+ "yixiaoerId",
71
+ "yixiaoerName"
72
+ ],
73
+ "properties": {
74
+ "yixiaoerId": {
75
+ "type": "string"
76
+ },
77
+ "yixiaoerName": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "additionalProperties": false
82
+ }
83
+ },
84
+ "original": {
85
+ "type": "boolean",
86
+ "default": false
87
+ },
88
+ "originalType": {
89
+ "type": "number",
90
+ "enum": [
91
+ 0,
92
+ 1,
93
+ 2
94
+ ]
95
+ },
96
+ "originalUrl": {
97
+ "type": "string",
98
+ "format": "uri"
99
+ },
100
+ "reprintType": {
101
+ "type": "number",
102
+ "enum": [
103
+ 0,
104
+ 1
105
+ ]
106
+ },
107
+ "declaration": {
108
+ "type": "number",
109
+ "enum": [
110
+ 0,
111
+ 1
112
+ ],
113
+ "default": 0
114
+ },
115
+ "activity": {
116
+ "type": "object",
117
+ "required": [
118
+ "yixiaoerId",
119
+ "yixiaoerName",
120
+ "raw"
121
+ ],
122
+ "properties": {
123
+ "yixiaoerId": {
124
+ "type": "string"
125
+ },
126
+ "yixiaoerName": {
127
+ "type": "string"
128
+ },
129
+ "raw": {
130
+ "type": "object"
131
+ }
132
+ }
133
+ },
134
+ "pubType": {
135
+ "type": "number",
136
+ "enum": [
137
+ 0,
138
+ 1
139
+ ],
140
+ "default": 1
141
+ },
142
+ "scheduledTime": {
143
+ "type": "number",
144
+ "minimum": 0
145
+ },
146
+ "publishTime": {
147
+ "type": "string",
148
+ "format": "date-time"
149
+ },
150
+ "statement": {
151
+ "type": "number",
152
+ "enum": [
153
+ 1,
154
+ 2,
155
+ 3
156
+ ]
157
+ }
158
+ },
159
+ "additionalProperties": false
160
+ }