@yixiaoermail/cli 3.2.26 → 3.2.28
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/README.md +12 -1
- package/checksums.txt +6 -6
- package/package.json +30 -30
- package/references/cli/command-reference.md +1 -1
- package/references/domains/publish.md +1 -1
- package/references/get-collections.md +19 -12
- package/references/platforms/article/index.md +2 -1
- package/references/platforms/article/weixingongzhonghao-open.md +86 -0
- package/references/platforms/video/shipinhao.md +1 -0
- package/references/upload-resource.md +2 -0
- package/references/workflows/common-rules.md +4 -2
- package/references/workflows/publish-imageText.md +6 -6
- package/schemas/platforms/weixin.account-open.article.schema.json +106 -0
- package/skills/yixiaoer/SKILL.md +98 -98
- package/skills/yixiaoer/references/cli/command-reference.md +1 -1
- package/skills/yixiaoer/references/domains/publish.md +1 -1
- package/skills/yixiaoer/references/get-collections.md +19 -12
- package/skills/yixiaoer/references/platforms/article/index.md +2 -1
- package/skills/yixiaoer/references/platforms/article/weixingongzhonghao-open.md +86 -0
- package/skills/yixiaoer/references/platforms/video/shipinhao.md +1 -0
- package/skills/yixiaoer/references/upload-resource.md +2 -0
- package/skills/yixiaoer/references/workflows/common-rules.md +4 -2
- package/skills/yixiaoer/references/workflows/publish-imageText.md +6 -6
package/README.md
CHANGED
|
@@ -40,4 +40,15 @@ checksums.txt
|
|
|
40
40
|
|
|
41
41
|
To override the versioned download directory, set `YXER_DOWNLOAD_BASE_URL` before installation.
|
|
42
42
|
|
|
43
|
-
Release builds and
|
|
43
|
+
Release builds and publication run locally. GitLab tags mark the source version and do not trigger CLI build or publication jobs. The package name and download root remain tracked in `npm/package.json`.
|
|
44
|
+
|
|
45
|
+
For local releases, use `scripts/publish-release.ps1` from the `yixiaoer-skill` directory. The script previews by default; pass `-Execute` only after reviewing the TOS and npm dry-run output.
|
|
46
|
+
|
|
47
|
+
From the `yixiaoer-universal` repository root, use these package scripts:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run release:cli:dryrun
|
|
51
|
+
npm run release:cli
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
These commands require Go, Node.js/npm, AWS CLI, and curl on `PATH`. The Node.js launcher prefers PowerShell 7 (`pwsh`), also checks its standard installation directory on Windows, and falls back to built-in Windows PowerShell when PowerShell 7 is unavailable. macOS/Linux require `pwsh` on `PATH`. Keep the version in `internal/domain/response.go` consistent with `skills/yixiaoer/SKILL.md` and use an unpublished version. Fill the three credential files in `yixiaoer-skill/.local-release`: `TOS_ACCESS_KEY_ID.txt`, `TOS_SECRET_ACCESS_KEY.txt`, and `NPM_TOKEN.txt`, each with a single raw value. Environment variables take precedence over these files. The release command runs tests, builds all six platform archives and the npm package, verifies artifacts, uploads to TOS, verifies downloads, and publishes npm automatically. Outputs are written to `yixiaoer-skill/out/release` and `yixiaoer-skill/out/npm`.
|
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
55cc652e29147fb4c2a4c39e3eac21530193feabe7ac4c0ea518b882e82cc42b yxer-cli-3.2.28-windows-amd64.zip
|
|
2
|
+
f1bfdd35b58d45a210e6eb71eb69c719aabad4822c2f2b40f1b6601448792d2a yxer-cli-3.2.28-windows-arm64.zip
|
|
3
|
+
c508603863ad47fd60be20d155cbab8951387ac83ecb7899ccc83284aa42a58c yxer-cli-3.2.28-darwin-amd64.tar.gz
|
|
4
|
+
820f83f4392527adc04b67a258fb17bbffa8989f4d0b5595b3e21929983752e9 yxer-cli-3.2.28-darwin-arm64.tar.gz
|
|
5
|
+
1bd86a28e9b2458f281ed6a22d0d35fe1f3051ebdfd31a90bf31d0e1752baa07 yxer-cli-3.2.28-linux-amd64.tar.gz
|
|
6
|
+
e6a7b1e6347378aca168bfad61b7142b8356e0cd5326b0fa21d0673050372b1e yxer-cli-3.2.28-linux-arm64.tar.gz
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
2
|
+
"name": "@yixiaoermail/cli",
|
|
3
|
+
"version": "3.2.28",
|
|
4
|
+
"yxerDownloadRootUrl": "https://yixiaoer-lite-asserts.tos-cn-shanghai.volces.com/yxer/releases",
|
|
5
|
+
"description": "Yixiaoer CLI packaged for npm global installation",
|
|
6
|
+
"bin": {
|
|
7
|
+
"yxer": "bin/yxer.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"postinstall": "node bin/postinstall.js",
|
|
11
|
+
"test": "node --test ../test/npm/*.test.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin",
|
|
15
|
+
"bin-native",
|
|
16
|
+
"checksums.txt",
|
|
17
|
+
"references",
|
|
18
|
+
"schemas",
|
|
19
|
+
"skills",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"yixiaoer",
|
|
24
|
+
"yxer",
|
|
25
|
+
"cli"
|
|
26
|
+
],
|
|
27
|
+
"license": "UNLICENSED",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": "\u003e=18"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -82,7 +82,7 @@ yxer query taobao-guanghe-goods-tabs <account_id> --type video|imageText
|
|
|
82
82
|
yxer query taobao-guanghe-goods <account_id> --type video|imageText --source SOURCE [--filter-value VALUE] [--second-filter-value VALUE] [--query 关键词] [--next-page TOKEN]
|
|
83
83
|
yxer query goods-detail <account_id> --url <product_url>
|
|
84
84
|
yxer query entitlements <account_id>
|
|
85
|
-
yxer query collections <account_id> [--type video|article]
|
|
85
|
+
yxer query collections <account_id> [--type video|article] [--next-page TOKEN]
|
|
86
86
|
yxer query drama-tasks <account_id> [--query 关键词] [--keyword 关键词]
|
|
87
87
|
yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
|
|
88
88
|
yxer query friends <account_id> [--red-id 小红书号] [--query 关键词]
|
|
@@ -61,7 +61,7 @@ yxer query locations <account_id> [--query 关键词] [--next-page TOKEN]
|
|
|
61
61
|
yxer query music <account_id> [--query 关键词] [--category-id ID] [--category-name 名称] [--next-page TOKEN]
|
|
62
62
|
yxer query music-categories <account_id>
|
|
63
63
|
yxer query goods <account_id> [--query 关键词] [--next-page TOKEN]
|
|
64
|
-
yxer query collections <account_id> [--type video|article]
|
|
64
|
+
yxer query collections <account_id> [--type video|article] [--next-page TOKEN]
|
|
65
65
|
yxer query drama-tasks <account_id> [--query 关键词]
|
|
66
66
|
yxer query miniapps <account_id> [--query 关键词]
|
|
67
67
|
yxer query syncapps <account_id>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# 获取合集列表 (Get Collections)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
获取账号已创建的合集列表。主要用于抖音、小红书、视频号、今日头条等支持合集的平台。
|
|
4
4
|
|
|
5
5
|
## 调用指令 (Command)
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
yxer query collections ACCOUNT_ID --json
|
|
8
|
+
yxer query collections ACCOUNT_ID [--type video|article] [--next-page TOKEN] --json
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## 参数列表 (Payload Properties)
|
|
@@ -13,22 +13,29 @@ yxer query collections ACCOUNT_ID --json
|
|
|
13
13
|
| 字段名 | 类型 | 是否必填 | 说明 |
|
|
14
14
|
| :--- | :--- | :--- | :--- |
|
|
15
15
|
| `account_id` | `string` | **是** | 蚁小二账号 ID (32位十六进制) |
|
|
16
|
+
| `--type` | `string` | 否 | 发布类型,默认 `video` |
|
|
17
|
+
| `--next-page` | `string` | 否 | 上一页响应中的不透明分页游标 |
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
返回分页对象。发布时必须直接使用 `list` 中查询返回的完整合集对象作为视频表单的 `contentPublishForm.collection` 参数传递给发布流程,不能只保留 ID、名称或 `raw` 的局部字段。存在 `nextPage` 时,将它原样传给下一次查询。
|
|
20
|
+
|
|
21
|
+
当接口省略 `raw` 时,CLI 会将该合集的完整原始查询项保存在 `raw` 中;接口已有的 `raw` 会原样保留,分页游标和其他返回字段也会保留。
|
|
18
22
|
|
|
19
23
|
```json
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
{
|
|
25
|
+
"list": [
|
|
26
|
+
{
|
|
27
|
+
"yixiaoerId": "col_123",
|
|
28
|
+
"yixiaoerName": "美食系列",
|
|
29
|
+
"raw": { ... }
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"nextPage": "opaque-cursor"
|
|
33
|
+
}
|
|
27
34
|
```
|
|
28
35
|
|
|
29
36
|
## CLI / 后端逻辑
|
|
30
37
|
|
|
31
|
-
- **CLI 命令**: `yxer query collections <account_id> [--type video|article] [--json]`
|
|
38
|
+
- **CLI 命令**: `yxer query collections <account_id> [--type video|article] [--next-page TOKEN] [--json]`
|
|
32
39
|
- **功能**: 封装蚁小二标准化合集查询接口 (`GET /platform-accounts/{platformAccountId}/collections`)。
|
|
33
|
-
- **参数映射**: 将 `account_id` 映射为 URL 路径变量,将 `type` 映射为 `publishType` 查询参数。
|
|
40
|
+
- **参数映射**: 将 `account_id` 映射为 URL 路径变量,将 `type` 映射为 `publishType`、`next-page` 映射为 `nextPage` 查询参数。
|
|
34
41
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- 正文内嵌图片也建议先行上传获取 Key(视频号卡片、公众号卡片同理)。
|
|
20
20
|
3. **平台策略分配**:
|
|
21
21
|
- **微信公众号**:必须单独发布,推荐使用 `platformForms` 结构。
|
|
22
|
+
- **微信公众号-Open**:必须使用 Open 专用 `platformForms` 结构;CLI 会在发布时转换为蚁小二 wx/publish 请求,不走通用 /taskSets/v2。
|
|
22
23
|
- **通用平台**(知乎、简书等):使用 `accountForms` 结构进行分发。
|
|
23
24
|
4. **参数装配**:注入 `action: "publish"` 及其余 DTO 字段。
|
|
24
25
|
5. **指令执行**:先执行 `yxer validate <platform> article <payload.json>`,再执行 `yxer publish article <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
> [!IMPORTANT]
|
|
75
76
|
> **配置架构约束**:
|
|
76
77
|
> - **微信公众号专用性**: **微信公众号必须单独发布**。在一个发布请求中,如果包含微信公众号,则不能包含其他任何平台;反之亦然。
|
|
77
|
-
> - **platformForms**:
|
|
78
|
+
> - **platformForms**: **仅限微信公众号及微信公众号-Open 使用**。
|
|
78
79
|
> - **优先级**: 后端将优先尝试从 `platformForms` 中获取对应平台的配置,若不存在则回退至账号级的 `contentPublishForm`。
|
|
79
80
|
|
|
80
81
|
> [!TIP]
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# 微信公众号-Open 文章发布参数 (WeiXinGongZhongHao-Open Article)
|
|
2
|
+
|
|
3
|
+
> [!IMPORTANT]
|
|
4
|
+
> **这是微信公众号 Open 的独立发布契约。** CLI 使用 POST /wx/publish,不使用普通微信公众号文章的 /taskSets/v2 请求体。
|
|
5
|
+
|
|
6
|
+
## 1. 执行约束
|
|
7
|
+
|
|
8
|
+
- 发布类型仅支持 article。
|
|
9
|
+
- 目标平台使用 微信公众号-Open,必须单平台执行。
|
|
10
|
+
- 只支持直接发布;不支持 isDraft=true、平台草稿、定时发布和 --publish-channel local。
|
|
11
|
+
- Open 请求支持多个 platformAccountIds,所有账号共用同一组 articles。
|
|
12
|
+
- 发布前封面必须是通过 yxer upload 得到的资源对象。CLI 会优先使用封面对象中的 url/pathOrUrl,只有存在 key 时才调用 stable-url 查询,并将最终 URL 写入 articles[].thumbUrl。
|
|
13
|
+
|
|
14
|
+
## 2. 标准 CLI Payload
|
|
15
|
+
|
|
16
|
+
业务字段放在 publishArgs.platformForms["微信公众号-Open"],账号只放在 publishArgs.accountForms[]:
|
|
17
|
+
|
|
18
|
+
~~~
|
|
19
|
+
{
|
|
20
|
+
"action": "publish",
|
|
21
|
+
"publishType": "article",
|
|
22
|
+
"platforms": ["微信公众号-Open"],
|
|
23
|
+
"publishChannel": "cloud",
|
|
24
|
+
"publishArgs": {
|
|
25
|
+
"accountForms": [
|
|
26
|
+
{ "platformAccountId": "wx-open-account-001" }
|
|
27
|
+
],
|
|
28
|
+
"platformForms": {
|
|
29
|
+
"微信公众号-Open": {
|
|
30
|
+
"sendAll": 0,
|
|
31
|
+
"sendIgnoreReprint": 0,
|
|
32
|
+
"articles": [
|
|
33
|
+
{
|
|
34
|
+
"title": "文章标题",
|
|
35
|
+
"author": "作者",
|
|
36
|
+
"digest": "文章摘要",
|
|
37
|
+
"content": "<p>HTML 正文</p>",
|
|
38
|
+
"contentSourceUrl": "https://example.com/source",
|
|
39
|
+
"cover": {
|
|
40
|
+
"key": "uploaded-cover-key",
|
|
41
|
+
"pathOrUrl": "https://oss-v2.yixiaoer.cn/cover.jpg",
|
|
42
|
+
"raw": {}
|
|
43
|
+
},
|
|
44
|
+
"needOpenComment": 1,
|
|
45
|
+
"onlyFansCanComment": 0
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
~~~
|
|
53
|
+
|
|
54
|
+
sendAll 和 sendIgnoreReprint 省略时均默认为 0。cover 必须包含 key 和 raw;若没有蚁小二稳定 URL,CLI 会根据 cover.bucket(省略时使用 cloud-publish)查询稳定地址。
|
|
55
|
+
|
|
56
|
+
## 3. 与蚁小二 Open 请求的映射
|
|
57
|
+
|
|
58
|
+
CLI 发布时生成以下官方请求:
|
|
59
|
+
|
|
60
|
+
| CLI 字段 | POST /wx/publish 字段 |
|
|
61
|
+
| :--- | :--- |
|
|
62
|
+
| 根级 publishChannel(固定为 cloud) | publishChannel |
|
|
63
|
+
| accountForms[].platformAccountId | platformAccountIds[] |
|
|
64
|
+
| platformForms.sendAll | sendAll |
|
|
65
|
+
| platformForms.sendIgnoreReprint | sendIgnoreReprint |
|
|
66
|
+
| 首篇 cover.key 或根级 coverKey | coverKey |
|
|
67
|
+
| 根级 desc、首篇标题或摘要 | desc |
|
|
68
|
+
| articles[].title | articles[].title |
|
|
69
|
+
| articles[].author | articles[].author |
|
|
70
|
+
| articles[].digest | articles[].digest |
|
|
71
|
+
| articles[].content | articles[].content |
|
|
72
|
+
| articles[].contentSourceUrl | articles[].contentSourceUrl |
|
|
73
|
+
| articles[].cover 的稳定 URL | articles[].thumbUrl |
|
|
74
|
+
| articles[].needOpenComment | articles[].needOpenComment |
|
|
75
|
+
| articles[].onlyFansCanComment | articles[].onlyFansCanComment |
|
|
76
|
+
|
|
77
|
+
正文中的外链图片仍按文章发布通用规则先转存到稳定地址;Open 后端会继续使用 thumbUrl 和正文资源创建草稿并提交发布。
|
|
78
|
+
|
|
79
|
+
## 4. 推荐命令
|
|
80
|
+
|
|
81
|
+
~~~
|
|
82
|
+
yxer upload <cover-path> --bucket cloud-publish
|
|
83
|
+
yxer validate 微信公众号-Open article <payload.json>
|
|
84
|
+
yxer publish article 微信公众号-Open <payload.json> --dry-run
|
|
85
|
+
yxer publish article 微信公众号-Open <payload.json>
|
|
86
|
+
~~~
|
|
@@ -126,6 +126,7 @@ yxer publish form account publish-form.json --id <online_account_id>
|
|
|
126
126
|
| 目标数据 | 对应 Action | 文档参考 |
|
|
127
127
|
| :--- | :--- | :--- |
|
|
128
128
|
| `location` | `locations` | [获取位置信息](../../get-locations.md) |
|
|
129
|
+
| `collection` | `collections` | [获取合集列表](../../get-collections.md) |
|
|
129
130
|
| `activity` | `activities` | [获取活动列表](../../get-publish-activities.md) |
|
|
130
131
|
| `shopping_cart`| `goods` | [获取商品列表](../../get-goods.md) |
|
|
131
132
|
| `drama` | `drama-tasks` | [获取视频号剧集列表](../../get-drama-tasks.md) |
|
|
@@ -31,6 +31,8 @@
|
|
|
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
|
+
视频在上传前会由 CLI 使用 FFmpeg 完整解码视频和音频帧;本地文件在读取期间发生变化、远程地址只返回部分内容、文件损坏或截断时,CLI 会返回结构化错误并停止上传。请确保 `ffmpeg` 可从 `PATH` 找到;如需自动提取视频宽高和时长,再传 `--auto-meta` 并确保 `ffprobe` 可用。
|
|
35
|
+
|
|
34
36
|
> [!IMPORTANT]
|
|
35
37
|
> **视频号 512KB 图片限制**:
|
|
36
38
|
> 上传视频号视频封面或视频号图文图片时,必须带平台用途参数:
|
|
@@ -216,7 +216,9 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
216
216
|
|
|
217
217
|
- 支持格式:`mp4` / `mov`
|
|
218
218
|
- 调用 `yxer upload <视频路径>` 获取 key
|
|
219
|
-
-
|
|
219
|
+
- CLI 会在请求上传地址前用 FFmpeg 完整解码视频和音频帧;损坏、截断或远程只返回部分内容的文件会被拒绝
|
|
220
|
+
- 运行环境必须能从 `PATH` 找到 `ffmpeg`;使用 `--auto-meta` 回填视频宽高和时长时还需要 `ffprobe`
|
|
221
|
+
- 需要将视频宽高和时长写入发布 payload 时,使用 `yxer upload <视频路径> --auto-meta`,并保留返回的 `duration`
|
|
220
222
|
- 视频封面必须单独上传,不能用视频文件本身代替封面
|
|
221
223
|
|
|
222
224
|
### URL 资源
|
|
@@ -236,7 +238,7 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
236
238
|
| --- | --- | --- |
|
|
237
239
|
| `location` | `yxer query locations <account_id> [--query 关键词]` | 整个 `yxer query locations` 返回对象 |
|
|
238
240
|
| `music` | `yxer query music <account_id> [--query 关键词]` | 整个 `yxer query music` 返回对象 |
|
|
239
|
-
| `collection` / `sub_collection` | `yxer query collections <account_id> [--type video]` | 整个 `yxer query collections` 返回对象 |
|
|
241
|
+
| `collection` / `sub_collection` | `yxer query collections <account_id> [--type video] [--next-page TOKEN]` | 整个 `yxer query collections` 返回对象 |
|
|
240
242
|
| 视频号 `drama` | `yxer query drama-tasks <account_id> [--query 关键词]` | 只保留 `yixiaoerId`、`yixiaoerImageUrl`、`yixiaoerName`,不使用 `raw` |
|
|
241
243
|
| `challenge` | `yxer query challenges <account_id> [--query 关键词]` | 整个 `yxer query challenges` 返回对象 |
|
|
242
244
|
| 小红书 `description` 中的 `<friend>` | `yxer query friends <account_id> --red-id <小红书号>` | 将整个用户对象 JSON 序列化到标签 `raw`,支持陌生人,标签正文使用查询结果名称 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 图文发布工作流
|
|
2
2
|
|
|
3
|
-
> 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
|
|
3
|
+
> 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
|
|
4
4
|
> 阅读本文档前,请先阅读 [common-rules.md](./common-rules.md)。
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -32,8 +32,8 @@ yxer schema get <platform> imageText
|
|
|
32
32
|
6. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
|
|
33
33
|
7. 查阅对应平台文档:`../platforms/imageText/`
|
|
34
34
|
8. 执行校验:`yxer validate <platform> imageText <payload.json>`
|
|
35
|
-
9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
|
|
36
|
-
10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
|
|
35
|
+
9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
|
|
36
|
+
10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
|
|
37
37
|
|
|
38
38
|
## 关键规则
|
|
39
39
|
|
|
@@ -62,6 +62,6 @@ yxer publish imageText 抖音 .\payload.json --publish-channel local --client-id
|
|
|
62
62
|
## 平台文档入口
|
|
63
63
|
|
|
64
64
|
- 索引:`../platforms/imageText/index.md`
|
|
65
|
-
- 平台细节:`../platforms/imageText/*.md`
|
|
66
|
-
|
|
67
|
-
微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。
|
|
65
|
+
- 平台细节:`../platforms/imageText/*.md`
|
|
66
|
+
|
|
67
|
+
微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "微信公众号 Open 文章平台表单 (Weixin Gongzhonghao Open Article Platform Form)",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"required": [
|
|
5
|
+
"articles",
|
|
6
|
+
"sendAll",
|
|
7
|
+
"sendIgnoreReprint"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"articles": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"minItems": 1,
|
|
13
|
+
"maxItems": 8,
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": [
|
|
17
|
+
"title",
|
|
18
|
+
"content",
|
|
19
|
+
"cover"
|
|
20
|
+
],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"title": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"author": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"digest": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"content": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 20000
|
|
37
|
+
},
|
|
38
|
+
"contentSourceUrl": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "uri"
|
|
41
|
+
},
|
|
42
|
+
"thumbUrl": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "uri"
|
|
45
|
+
},
|
|
46
|
+
"cover": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": [
|
|
49
|
+
"key",
|
|
50
|
+
"raw"
|
|
51
|
+
],
|
|
52
|
+
"properties": {
|
|
53
|
+
"key": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1
|
|
56
|
+
},
|
|
57
|
+
"pathOrUrl": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"raw": {
|
|
61
|
+
"type": "object"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"needOpenComment": {
|
|
66
|
+
"type": "number",
|
|
67
|
+
"enum": [
|
|
68
|
+
0,
|
|
69
|
+
1
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"onlyFansCanComment": {
|
|
73
|
+
"type": "number",
|
|
74
|
+
"enum": [
|
|
75
|
+
0,
|
|
76
|
+
1
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"picCrop235": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
},
|
|
82
|
+
"picCrop1": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"sendAll": {
|
|
89
|
+
"type": "number",
|
|
90
|
+
"enum": [
|
|
91
|
+
0,
|
|
92
|
+
1
|
|
93
|
+
],
|
|
94
|
+
"default": 0
|
|
95
|
+
},
|
|
96
|
+
"sendIgnoreReprint": {
|
|
97
|
+
"type": "number",
|
|
98
|
+
"enum": [
|
|
99
|
+
0,
|
|
100
|
+
1
|
|
101
|
+
],
|
|
102
|
+
"default": 0
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
}
|
package/skills/yixiaoer/SKILL.md
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: yixiaoer
|
|
3
|
-
version: 3.2.
|
|
4
|
-
description: "通过 yxer CLI 操作蚁小二多平台内容分发:账号查询、资源上传、发布前准备、payload 校验、云发布/本机发布、草稿保存、素材登记、发布记录排查与技能同步。"
|
|
5
|
-
metadata:
|
|
6
|
-
category: "productivity"
|
|
7
|
-
requires:
|
|
8
|
-
bins: ["yxer"]
|
|
9
|
-
cliHelp: "yxer --help; yxer doctor; yxer accounts list --help; yxer publish --help; yxer validate --help"
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# 蚁小二 Skill
|
|
13
|
-
|
|
14
|
-
你是 AI Agent,通过 `yxer` CLI 操作蚁小二资源。真正执行一律走 CLI,不要假设存在旧 Node 脚本入口、隐式 API 或手工脚本。
|
|
15
|
-
|
|
16
|
-
**🚀 首次使用?先读 [`./QUICKSTART.md`](./QUICKSTART.md) - 5 分钟完成首次发布**
|
|
17
|
-
|
|
18
|
-
**CRITICAL - 开始前 MUST 先读取 [`./references/yixiaoer-shared.md`](./references/yixiaoer-shared.md),其中包含环境检查、发布通道、同步和输出协议。**
|
|
19
|
-
**AI EXECUTION PROTOCOL - 涉及查询、payload 修订、草稿、素材或发布时,MUST 先读取 [`./references/protocols/execution.md`](./references/protocols/execution.md),并按状态机推进。**
|
|
20
|
-
**BLOCKING REQUIREMENT - 涉及正式写操作时,禁止凭记忆拼 payload、禁止跳过 workflow、禁止绕过 `yxer` CLI 直接执行旧脚本或隐式 API。**
|
|
21
|
-
|
|
22
|
-
## 能力索引
|
|
23
|
-
|
|
24
|
-
根据用户需求,必须先读取对应业务域文档,再进入具体 workflow 或 reference。不要直接凭记忆拼 payload 或执行正式发布。
|
|
25
|
-
|
|
26
|
-
- AI 执行协议
|
|
27
|
-
- 入口:[`./references/protocols/execution.md`](./references/protocols/execution.md)
|
|
28
|
-
- 候选确认:[`./references/protocols/confirmation.md`](./references/protocols/confirmation.md)
|
|
29
|
-
- 字段来源追踪:[`./references/protocols/provenance.md`](./references/protocols/provenance.md)
|
|
30
|
-
- 错误恢复:[`./references/protocols/error-recovery.md`](./references/protocols/error-recovery.md)
|
|
31
|
-
- 覆盖状态机、写操作门禁、多候选确认、payload 来源追踪和失败后的最小修复策略。
|
|
32
|
-
|
|
33
|
-
- 发布与 payload 修订
|
|
34
|
-
- 入口:[`./references/domains/publish.md`](./references/domains/publish.md)
|
|
35
|
-
- 覆盖视频、图文、文章发布,账号选择,云/本机通道判断,payload 来源纪律,动态字段查询,平台差异文档入口。
|
|
36
|
-
- 账号、环境与 skill 同步
|
|
37
|
-
- 入口:[`./references/domains/accounts-and-env.md`](./references/domains/accounts-and-env.md)
|
|
38
|
-
- 覆盖 `doctor`、`config`、账号查询与技能同步。
|
|
39
|
-
- 草稿与素材库
|
|
40
|
-
- 入口:[`./references/domains/draft-and-material.md`](./references/domains/draft-and-material.md)
|
|
41
|
-
- 覆盖蚁小二草稿、平台草稿判断、素材上传、素材登记与“上传后立即发布”的切换路径。
|
|
42
|
-
- 发布记录与失败排查
|
|
43
|
-
- 入口:[`./references/domains/troubleshooting.md`](./references/domains/troubleshooting.md)
|
|
44
|
-
- 覆盖 `query records`、按作品信息删除已发布内容、校验失败修复、本机/云发布错误分流与回退策略。
|
|
45
|
-
- 安装、升级与分发
|
|
46
|
-
- 入口:[`./references/domains/install-and-sync.md`](./references/domains/install-and-sync.md)
|
|
47
|
-
- 覆盖 skill 安装、同步、升级和宿主侧接入说明。
|
|
48
|
-
|
|
49
|
-
## 意图分流
|
|
50
|
-
|
|
51
|
-
| 用户意图 / 说法 | 先读入口 | 后续动作 |
|
|
52
|
-
| --- | --- | --- |
|
|
53
|
-
| “帮我发一下”“发个抖音/小红书”“发布视频/图文/文章” | [`./references/domains/publish.md`](./references/domains/publish.md) | 再按类型进入对应 workflow;已有完整 payload 时走 `validate -> publish --dry-run -> publish`,缺账号/字段/资源时先补 `doctor -> accounts list -> prepare/form -> upload/query` |
|
|
54
|
-
| “先别发,只生成/修一下 payload” | [`./references/domains/publish.md`](./references/domains/publish.md) | 强制读取 payload 来源和类型 workflow,只做字段修订,不擅自正式发布 |
|
|
55
|
-
| “查下账号/环境”“怎么配置 clientId”“看看 skill 要不要同步” | [`./references/domains/accounts-and-env.md`](./references/domains/accounts-and-env.md) | 先做环境检查,再决定是否继续业务流程 |
|
|
56
|
-
| “存草稿”“传素材”“放到素材库里” | [`./references/domains/draft-and-material.md`](./references/domains/draft-and-material.md) | 先区分草稿和素材,再判断是否需要回切发布域 |
|
|
57
|
-
| “为什么失败了”“查发布记录”“删除已发布作品”“解释 validate / publish 报错” | [`./references/domains/troubleshooting.md`](./references/domains/troubleshooting.md) | 先定位失败阶段;删除时预览作品信息、按序号 dry-run,再执行 |
|
|
58
|
-
| “安装 skill”“升级后怎么同步”“怎么接入这个技能” | [`./references/domains/install-and-sync.md`](./references/domains/install-and-sync.md) | 优先走 skill 展示、同步和安装说明 |
|
|
59
|
-
|
|
60
|
-
## 命令探索
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
yxer --help
|
|
64
|
-
yxer doctor
|
|
65
|
-
yxer <command> --help
|
|
66
|
-
yxer prepare <platform> <type>
|
|
67
|
-
yxer schema fields <platform> <type>
|
|
68
|
-
yxer schema get <platform> <type>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## 全局规则
|
|
72
|
-
|
|
73
|
-
- 发布、草稿、素材、排查都只允许通过 `yxer` CLI 执行。
|
|
74
|
-
- 任何涉及查询、候选选择、payload 修订或写操作的任务,必须先遵循 AI 执行协议中的状态机、确认协议和错误恢复协议。
|
|
75
|
-
- 涉及写操作或 payload 修订时,必须遵守 [`./references/workflows/data-accuracy.md`](./references/workflows/data-accuracy.md):先查询真实数据,再确认候选,最后 validate / dry-run / 写入。
|
|
76
|
-
- BLOCKING REQUIREMENT: 正式发布前必须先用同一份 `payload.json`、同一套发布通道参数完成 `yxer validate -> yxer publish --dry-run`;缺账号、字段、资源或动态对象时,先补 `doctor -> accounts list -> prepare/form -> upload/query`。
|
|
77
|
-
- `prepare`/`publish form`、`schema fields` / `schema get`、workflow、平台文档和 CLI 实际输出,是组装 payload 的唯一依据。
|
|
78
|
-
- `prepare` 返回的 `data.form` 是可恢复的页面式表单契约;新建复杂 payload 时优先使用 `yxer publish form start/inspect/set/choose/verify/review/export`,不要自行发明字段或路径。form 会话不能直接发布,必须先 verify 并 export 成标准 `payload.json`。
|
|
79
|
-
- 图片、视频、封面等资源必须先上传,且只能复用 `yxer upload` 返回的真实字段。
|
|
80
|
-
- `category`、`location`、`music`、`collection`、`challenge`、`goods`、`drama` 等动态字段必须先通过 `yxer query ...` 查询,不能手写对象;视频号 `drama` 只保留查询结果中的 `yixiaoerId`、`yixiaoerImageUrl`、`yixiaoerName`,不添加 `raw`。多多视频例外:`shopping_cart.goods_id` 是用户手工提供的业务商品 ID,CLI 固定补充 `source=pdd`,不得从 `yxer query goods` 的 `yixiaoerId` 映射。
|
|
81
|
-
- 淘宝光合 `shopping_cart` 必须先通过目标账号、相同发布类型的 `taobao-guanghe-goods-tabs` 查询可用来源,再使用显式 `--source` 执行 `yxer query taobao-guanghe-goods`;完整保留商品对象和 `raw`,每个账号最多 6 件;不得依赖省略来源时的服务端默认商品池。
|
|
82
|
-
- CRITICAL: `validate`、`publish --dry-run`、正式 `publish` 必须使用同一套发布通道参数。
|
|
83
|
-
|
|
84
|
-
## 页面式表单会话
|
|
85
|
-
|
|
86
|
-
当一次性编辑 `payload.json` 无法表达页面中的完整流程时,使用本地会话逐步推进:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
yxer publish form start <platform> <type> --output publish-form.json
|
|
90
|
-
yxer publish form inspect publish-form.json
|
|
91
|
-
yxer publish form set publish-form.json <payload.path> --value '<json-value>'
|
|
92
|
-
yxer publish form choose publish-form.json <field> --value-file query-result.json --id <candidate_id> --source-command "yxer query ... --json"
|
|
93
|
-
yxer publish form verify publish-form.json
|
|
94
|
-
yxer publish form review publish-form.json
|
|
95
|
-
yxer publish form export publish-form.json --output payload.json
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
`set` / `choose` / `verify` / `review` 只更新或检查本地会话,不会触发发布;动态字段必须用 `choose` 从 `query` 返回候选中选择,并用 `--source-command` 记录实际执行的 `yxer query ... --json` 命令。多多视频 `shopping_cart.goods_id` 不属于动态查询字段,使用 `set` 手工填写,CLI 固定 `source=pdd`。`set` 只能写 form contract 声明过的路径;`choose` 只写 `dynamicFieldExamples` 声明的字段,且 query 账号必须匹配目标账号。资源应直接使用 `upload` 返回的完整对象。文本字段可直接传文本,复杂对象使用 JSON。导出前 `verify` / `review` / `export` 会校验来源记录和当前 payload 是否一致;导出后仍必须按同一份 payload 和同一套发布通道参数执行 `validate payload.json -> publish payload.json --dry-run -> 用户授权 -> publish payload.json`。所有写本地文件的会话命令都支持 `--dry-run`。
|
|
1
|
+
---
|
|
2
|
+
name: yixiaoer
|
|
3
|
+
version: 3.2.28
|
|
4
|
+
description: "通过 yxer CLI 操作蚁小二多平台内容分发:账号查询、资源上传、发布前准备、payload 校验、云发布/本机发布、草稿保存、素材登记、发布记录排查与技能同步。"
|
|
5
|
+
metadata:
|
|
6
|
+
category: "productivity"
|
|
7
|
+
requires:
|
|
8
|
+
bins: ["yxer"]
|
|
9
|
+
cliHelp: "yxer --help; yxer doctor; yxer accounts list --help; yxer publish --help; yxer validate --help"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# 蚁小二 Skill
|
|
13
|
+
|
|
14
|
+
你是 AI Agent,通过 `yxer` CLI 操作蚁小二资源。真正执行一律走 CLI,不要假设存在旧 Node 脚本入口、隐式 API 或手工脚本。
|
|
15
|
+
|
|
16
|
+
**🚀 首次使用?先读 [`./QUICKSTART.md`](./QUICKSTART.md) - 5 分钟完成首次发布**
|
|
17
|
+
|
|
18
|
+
**CRITICAL - 开始前 MUST 先读取 [`./references/yixiaoer-shared.md`](./references/yixiaoer-shared.md),其中包含环境检查、发布通道、同步和输出协议。**
|
|
19
|
+
**AI EXECUTION PROTOCOL - 涉及查询、payload 修订、草稿、素材或发布时,MUST 先读取 [`./references/protocols/execution.md`](./references/protocols/execution.md),并按状态机推进。**
|
|
20
|
+
**BLOCKING REQUIREMENT - 涉及正式写操作时,禁止凭记忆拼 payload、禁止跳过 workflow、禁止绕过 `yxer` CLI 直接执行旧脚本或隐式 API。**
|
|
21
|
+
|
|
22
|
+
## 能力索引
|
|
23
|
+
|
|
24
|
+
根据用户需求,必须先读取对应业务域文档,再进入具体 workflow 或 reference。不要直接凭记忆拼 payload 或执行正式发布。
|
|
25
|
+
|
|
26
|
+
- AI 执行协议
|
|
27
|
+
- 入口:[`./references/protocols/execution.md`](./references/protocols/execution.md)
|
|
28
|
+
- 候选确认:[`./references/protocols/confirmation.md`](./references/protocols/confirmation.md)
|
|
29
|
+
- 字段来源追踪:[`./references/protocols/provenance.md`](./references/protocols/provenance.md)
|
|
30
|
+
- 错误恢复:[`./references/protocols/error-recovery.md`](./references/protocols/error-recovery.md)
|
|
31
|
+
- 覆盖状态机、写操作门禁、多候选确认、payload 来源追踪和失败后的最小修复策略。
|
|
32
|
+
|
|
33
|
+
- 发布与 payload 修订
|
|
34
|
+
- 入口:[`./references/domains/publish.md`](./references/domains/publish.md)
|
|
35
|
+
- 覆盖视频、图文、文章发布,账号选择,云/本机通道判断,payload 来源纪律,动态字段查询,平台差异文档入口。
|
|
36
|
+
- 账号、环境与 skill 同步
|
|
37
|
+
- 入口:[`./references/domains/accounts-and-env.md`](./references/domains/accounts-and-env.md)
|
|
38
|
+
- 覆盖 `doctor`、`config`、账号查询与技能同步。
|
|
39
|
+
- 草稿与素材库
|
|
40
|
+
- 入口:[`./references/domains/draft-and-material.md`](./references/domains/draft-and-material.md)
|
|
41
|
+
- 覆盖蚁小二草稿、平台草稿判断、素材上传、素材登记与“上传后立即发布”的切换路径。
|
|
42
|
+
- 发布记录与失败排查
|
|
43
|
+
- 入口:[`./references/domains/troubleshooting.md`](./references/domains/troubleshooting.md)
|
|
44
|
+
- 覆盖 `query records`、按作品信息删除已发布内容、校验失败修复、本机/云发布错误分流与回退策略。
|
|
45
|
+
- 安装、升级与分发
|
|
46
|
+
- 入口:[`./references/domains/install-and-sync.md`](./references/domains/install-and-sync.md)
|
|
47
|
+
- 覆盖 skill 安装、同步、升级和宿主侧接入说明。
|
|
48
|
+
|
|
49
|
+
## 意图分流
|
|
50
|
+
|
|
51
|
+
| 用户意图 / 说法 | 先读入口 | 后续动作 |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| “帮我发一下”“发个抖音/小红书”“发布视频/图文/文章” | [`./references/domains/publish.md`](./references/domains/publish.md) | 再按类型进入对应 workflow;已有完整 payload 时走 `validate -> publish --dry-run -> publish`,缺账号/字段/资源时先补 `doctor -> accounts list -> prepare/form -> upload/query` |
|
|
54
|
+
| “先别发,只生成/修一下 payload” | [`./references/domains/publish.md`](./references/domains/publish.md) | 强制读取 payload 来源和类型 workflow,只做字段修订,不擅自正式发布 |
|
|
55
|
+
| “查下账号/环境”“怎么配置 clientId”“看看 skill 要不要同步” | [`./references/domains/accounts-and-env.md`](./references/domains/accounts-and-env.md) | 先做环境检查,再决定是否继续业务流程 |
|
|
56
|
+
| “存草稿”“传素材”“放到素材库里” | [`./references/domains/draft-and-material.md`](./references/domains/draft-and-material.md) | 先区分草稿和素材,再判断是否需要回切发布域 |
|
|
57
|
+
| “为什么失败了”“查发布记录”“删除已发布作品”“解释 validate / publish 报错” | [`./references/domains/troubleshooting.md`](./references/domains/troubleshooting.md) | 先定位失败阶段;删除时预览作品信息、按序号 dry-run,再执行 |
|
|
58
|
+
| “安装 skill”“升级后怎么同步”“怎么接入这个技能” | [`./references/domains/install-and-sync.md`](./references/domains/install-and-sync.md) | 优先走 skill 展示、同步和安装说明 |
|
|
59
|
+
|
|
60
|
+
## 命令探索
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
yxer --help
|
|
64
|
+
yxer doctor
|
|
65
|
+
yxer <command> --help
|
|
66
|
+
yxer prepare <platform> <type>
|
|
67
|
+
yxer schema fields <platform> <type>
|
|
68
|
+
yxer schema get <platform> <type>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 全局规则
|
|
72
|
+
|
|
73
|
+
- 发布、草稿、素材、排查都只允许通过 `yxer` CLI 执行。
|
|
74
|
+
- 任何涉及查询、候选选择、payload 修订或写操作的任务,必须先遵循 AI 执行协议中的状态机、确认协议和错误恢复协议。
|
|
75
|
+
- 涉及写操作或 payload 修订时,必须遵守 [`./references/workflows/data-accuracy.md`](./references/workflows/data-accuracy.md):先查询真实数据,再确认候选,最后 validate / dry-run / 写入。
|
|
76
|
+
- BLOCKING REQUIREMENT: 正式发布前必须先用同一份 `payload.json`、同一套发布通道参数完成 `yxer validate -> yxer publish --dry-run`;缺账号、字段、资源或动态对象时,先补 `doctor -> accounts list -> prepare/form -> upload/query`。
|
|
77
|
+
- `prepare`/`publish form`、`schema fields` / `schema get`、workflow、平台文档和 CLI 实际输出,是组装 payload 的唯一依据。
|
|
78
|
+
- `prepare` 返回的 `data.form` 是可恢复的页面式表单契约;新建复杂 payload 时优先使用 `yxer publish form start/inspect/set/choose/verify/review/export`,不要自行发明字段或路径。form 会话不能直接发布,必须先 verify 并 export 成标准 `payload.json`。
|
|
79
|
+
- 图片、视频、封面等资源必须先上传,且只能复用 `yxer upload` 返回的真实字段。
|
|
80
|
+
- `category`、`location`、`music`、`collection`、`challenge`、`goods`、`drama` 等动态字段必须先通过 `yxer query ...` 查询,不能手写对象;视频号 `drama` 只保留查询结果中的 `yixiaoerId`、`yixiaoerImageUrl`、`yixiaoerName`,不添加 `raw`。多多视频例外:`shopping_cart.goods_id` 是用户手工提供的业务商品 ID,CLI 固定补充 `source=pdd`,不得从 `yxer query goods` 的 `yixiaoerId` 映射。
|
|
81
|
+
- 淘宝光合 `shopping_cart` 必须先通过目标账号、相同发布类型的 `taobao-guanghe-goods-tabs` 查询可用来源,再使用显式 `--source` 执行 `yxer query taobao-guanghe-goods`;完整保留商品对象和 `raw`,每个账号最多 6 件;不得依赖省略来源时的服务端默认商品池。
|
|
82
|
+
- CRITICAL: `validate`、`publish --dry-run`、正式 `publish` 必须使用同一套发布通道参数。
|
|
83
|
+
|
|
84
|
+
## 页面式表单会话
|
|
85
|
+
|
|
86
|
+
当一次性编辑 `payload.json` 无法表达页面中的完整流程时,使用本地会话逐步推进:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
yxer publish form start <platform> <type> --output publish-form.json
|
|
90
|
+
yxer publish form inspect publish-form.json
|
|
91
|
+
yxer publish form set publish-form.json <payload.path> --value '<json-value>'
|
|
92
|
+
yxer publish form choose publish-form.json <field> --value-file query-result.json --id <candidate_id> --source-command "yxer query ... --json"
|
|
93
|
+
yxer publish form verify publish-form.json
|
|
94
|
+
yxer publish form review publish-form.json
|
|
95
|
+
yxer publish form export publish-form.json --output payload.json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`set` / `choose` / `verify` / `review` 只更新或检查本地会话,不会触发发布;动态字段必须用 `choose` 从 `query` 返回候选中选择,并用 `--source-command` 记录实际执行的 `yxer query ... --json` 命令。多多视频 `shopping_cart.goods_id` 不属于动态查询字段,使用 `set` 手工填写,CLI 固定 `source=pdd`。`set` 只能写 form contract 声明过的路径;`choose` 只写 `dynamicFieldExamples` 声明的字段,且 query 账号必须匹配目标账号。资源应直接使用 `upload` 返回的完整对象。文本字段可直接传文本,复杂对象使用 JSON。导出前 `verify` / `review` / `export` 会校验来源记录和当前 payload 是否一致;导出后仍必须按同一份 payload 和同一套发布通道参数执行 `validate payload.json -> publish payload.json --dry-run -> 用户授权 -> publish payload.json`。所有写本地文件的会话命令都支持 `--dry-run`。
|
|
@@ -82,7 +82,7 @@ yxer query taobao-guanghe-goods-tabs <account_id> --type video|imageText
|
|
|
82
82
|
yxer query taobao-guanghe-goods <account_id> --type video|imageText --source SOURCE [--filter-value VALUE] [--second-filter-value VALUE] [--query 关键词] [--next-page TOKEN]
|
|
83
83
|
yxer query goods-detail <account_id> --url <product_url>
|
|
84
84
|
yxer query entitlements <account_id>
|
|
85
|
-
yxer query collections <account_id> [--type video|article]
|
|
85
|
+
yxer query collections <account_id> [--type video|article] [--next-page TOKEN]
|
|
86
86
|
yxer query drama-tasks <account_id> [--query 关键词] [--keyword 关键词]
|
|
87
87
|
yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
|
|
88
88
|
yxer query friends <account_id> [--red-id 小红书号] [--query 关键词]
|
|
@@ -61,7 +61,7 @@ yxer query locations <account_id> [--query 关键词] [--next-page TOKEN]
|
|
|
61
61
|
yxer query music <account_id> [--query 关键词] [--category-id ID] [--category-name 名称] [--next-page TOKEN]
|
|
62
62
|
yxer query music-categories <account_id>
|
|
63
63
|
yxer query goods <account_id> [--query 关键词] [--next-page TOKEN]
|
|
64
|
-
yxer query collections <account_id> [--type video|article]
|
|
64
|
+
yxer query collections <account_id> [--type video|article] [--next-page TOKEN]
|
|
65
65
|
yxer query drama-tasks <account_id> [--query 关键词]
|
|
66
66
|
yxer query miniapps <account_id> [--query 关键词]
|
|
67
67
|
yxer query syncapps <account_id>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# 获取合集列表 (Get Collections)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
获取账号已创建的合集列表。主要用于抖音、小红书、视频号、今日头条等支持合集的平台。
|
|
4
4
|
|
|
5
5
|
## 调用指令 (Command)
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
yxer query collections ACCOUNT_ID --json
|
|
8
|
+
yxer query collections ACCOUNT_ID [--type video|article] [--next-page TOKEN] --json
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## 参数列表 (Payload Properties)
|
|
@@ -13,22 +13,29 @@ yxer query collections ACCOUNT_ID --json
|
|
|
13
13
|
| 字段名 | 类型 | 是否必填 | 说明 |
|
|
14
14
|
| :--- | :--- | :--- | :--- |
|
|
15
15
|
| `account_id` | `string` | **是** | 蚁小二账号 ID (32位十六进制) |
|
|
16
|
+
| `--type` | `string` | 否 | 发布类型,默认 `video` |
|
|
17
|
+
| `--next-page` | `string` | 否 | 上一页响应中的不透明分页游标 |
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
返回分页对象。发布时必须直接使用 `list` 中查询返回的完整合集对象作为视频表单的 `contentPublishForm.collection` 参数传递给发布流程,不能只保留 ID、名称或 `raw` 的局部字段。存在 `nextPage` 时,将它原样传给下一次查询。
|
|
20
|
+
|
|
21
|
+
当接口省略 `raw` 时,CLI 会将该合集的完整原始查询项保存在 `raw` 中;接口已有的 `raw` 会原样保留,分页游标和其他返回字段也会保留。
|
|
18
22
|
|
|
19
23
|
```json
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
{
|
|
25
|
+
"list": [
|
|
26
|
+
{
|
|
27
|
+
"yixiaoerId": "col_123",
|
|
28
|
+
"yixiaoerName": "美食系列",
|
|
29
|
+
"raw": { ... }
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"nextPage": "opaque-cursor"
|
|
33
|
+
}
|
|
27
34
|
```
|
|
28
35
|
|
|
29
36
|
## CLI / 后端逻辑
|
|
30
37
|
|
|
31
|
-
- **CLI 命令**: `yxer query collections <account_id> [--type video|article] [--json]`
|
|
38
|
+
- **CLI 命令**: `yxer query collections <account_id> [--type video|article] [--next-page TOKEN] [--json]`
|
|
32
39
|
- **功能**: 封装蚁小二标准化合集查询接口 (`GET /platform-accounts/{platformAccountId}/collections`)。
|
|
33
|
-
- **参数映射**: 将 `account_id` 映射为 URL 路径变量,将 `type` 映射为 `publishType` 查询参数。
|
|
40
|
+
- **参数映射**: 将 `account_id` 映射为 URL 路径变量,将 `type` 映射为 `publishType`、`next-page` 映射为 `nextPage` 查询参数。
|
|
34
41
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- 正文内嵌图片也建议先行上传获取 Key(视频号卡片、公众号卡片同理)。
|
|
20
20
|
3. **平台策略分配**:
|
|
21
21
|
- **微信公众号**:必须单独发布,推荐使用 `platformForms` 结构。
|
|
22
|
+
- **微信公众号-Open**:必须使用 Open 专用 `platformForms` 结构;CLI 会在发布时转换为蚁小二 wx/publish 请求,不走通用 /taskSets/v2。
|
|
22
23
|
- **通用平台**(知乎、简书等):使用 `accountForms` 结构进行分发。
|
|
23
24
|
4. **参数装配**:注入 `action: "publish"` 及其余 DTO 字段。
|
|
24
25
|
5. **指令执行**:先执行 `yxer validate <platform> article <payload.json>`,再执行 `yxer publish article <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
> [!IMPORTANT]
|
|
75
76
|
> **配置架构约束**:
|
|
76
77
|
> - **微信公众号专用性**: **微信公众号必须单独发布**。在一个发布请求中,如果包含微信公众号,则不能包含其他任何平台;反之亦然。
|
|
77
|
-
> - **platformForms**:
|
|
78
|
+
> - **platformForms**: **仅限微信公众号及微信公众号-Open 使用**。
|
|
78
79
|
> - **优先级**: 后端将优先尝试从 `platformForms` 中获取对应平台的配置,若不存在则回退至账号级的 `contentPublishForm`。
|
|
79
80
|
|
|
80
81
|
> [!TIP]
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# 微信公众号-Open 文章发布参数 (WeiXinGongZhongHao-Open Article)
|
|
2
|
+
|
|
3
|
+
> [!IMPORTANT]
|
|
4
|
+
> **这是微信公众号 Open 的独立发布契约。** CLI 使用 POST /wx/publish,不使用普通微信公众号文章的 /taskSets/v2 请求体。
|
|
5
|
+
|
|
6
|
+
## 1. 执行约束
|
|
7
|
+
|
|
8
|
+
- 发布类型仅支持 article。
|
|
9
|
+
- 目标平台使用 微信公众号-Open,必须单平台执行。
|
|
10
|
+
- 只支持直接发布;不支持 isDraft=true、平台草稿、定时发布和 --publish-channel local。
|
|
11
|
+
- Open 请求支持多个 platformAccountIds,所有账号共用同一组 articles。
|
|
12
|
+
- 发布前封面必须是通过 yxer upload 得到的资源对象。CLI 会优先使用封面对象中的 url/pathOrUrl,只有存在 key 时才调用 stable-url 查询,并将最终 URL 写入 articles[].thumbUrl。
|
|
13
|
+
|
|
14
|
+
## 2. 标准 CLI Payload
|
|
15
|
+
|
|
16
|
+
业务字段放在 publishArgs.platformForms["微信公众号-Open"],账号只放在 publishArgs.accountForms[]:
|
|
17
|
+
|
|
18
|
+
~~~
|
|
19
|
+
{
|
|
20
|
+
"action": "publish",
|
|
21
|
+
"publishType": "article",
|
|
22
|
+
"platforms": ["微信公众号-Open"],
|
|
23
|
+
"publishChannel": "cloud",
|
|
24
|
+
"publishArgs": {
|
|
25
|
+
"accountForms": [
|
|
26
|
+
{ "platformAccountId": "wx-open-account-001" }
|
|
27
|
+
],
|
|
28
|
+
"platformForms": {
|
|
29
|
+
"微信公众号-Open": {
|
|
30
|
+
"sendAll": 0,
|
|
31
|
+
"sendIgnoreReprint": 0,
|
|
32
|
+
"articles": [
|
|
33
|
+
{
|
|
34
|
+
"title": "文章标题",
|
|
35
|
+
"author": "作者",
|
|
36
|
+
"digest": "文章摘要",
|
|
37
|
+
"content": "<p>HTML 正文</p>",
|
|
38
|
+
"contentSourceUrl": "https://example.com/source",
|
|
39
|
+
"cover": {
|
|
40
|
+
"key": "uploaded-cover-key",
|
|
41
|
+
"pathOrUrl": "https://oss-v2.yixiaoer.cn/cover.jpg",
|
|
42
|
+
"raw": {}
|
|
43
|
+
},
|
|
44
|
+
"needOpenComment": 1,
|
|
45
|
+
"onlyFansCanComment": 0
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
~~~
|
|
53
|
+
|
|
54
|
+
sendAll 和 sendIgnoreReprint 省略时均默认为 0。cover 必须包含 key 和 raw;若没有蚁小二稳定 URL,CLI 会根据 cover.bucket(省略时使用 cloud-publish)查询稳定地址。
|
|
55
|
+
|
|
56
|
+
## 3. 与蚁小二 Open 请求的映射
|
|
57
|
+
|
|
58
|
+
CLI 发布时生成以下官方请求:
|
|
59
|
+
|
|
60
|
+
| CLI 字段 | POST /wx/publish 字段 |
|
|
61
|
+
| :--- | :--- |
|
|
62
|
+
| 根级 publishChannel(固定为 cloud) | publishChannel |
|
|
63
|
+
| accountForms[].platformAccountId | platformAccountIds[] |
|
|
64
|
+
| platformForms.sendAll | sendAll |
|
|
65
|
+
| platformForms.sendIgnoreReprint | sendIgnoreReprint |
|
|
66
|
+
| 首篇 cover.key 或根级 coverKey | coverKey |
|
|
67
|
+
| 根级 desc、首篇标题或摘要 | desc |
|
|
68
|
+
| articles[].title | articles[].title |
|
|
69
|
+
| articles[].author | articles[].author |
|
|
70
|
+
| articles[].digest | articles[].digest |
|
|
71
|
+
| articles[].content | articles[].content |
|
|
72
|
+
| articles[].contentSourceUrl | articles[].contentSourceUrl |
|
|
73
|
+
| articles[].cover 的稳定 URL | articles[].thumbUrl |
|
|
74
|
+
| articles[].needOpenComment | articles[].needOpenComment |
|
|
75
|
+
| articles[].onlyFansCanComment | articles[].onlyFansCanComment |
|
|
76
|
+
|
|
77
|
+
正文中的外链图片仍按文章发布通用规则先转存到稳定地址;Open 后端会继续使用 thumbUrl 和正文资源创建草稿并提交发布。
|
|
78
|
+
|
|
79
|
+
## 4. 推荐命令
|
|
80
|
+
|
|
81
|
+
~~~
|
|
82
|
+
yxer upload <cover-path> --bucket cloud-publish
|
|
83
|
+
yxer validate 微信公众号-Open article <payload.json>
|
|
84
|
+
yxer publish article 微信公众号-Open <payload.json> --dry-run
|
|
85
|
+
yxer publish article 微信公众号-Open <payload.json>
|
|
86
|
+
~~~
|
|
@@ -126,6 +126,7 @@ yxer publish form account publish-form.json --id <online_account_id>
|
|
|
126
126
|
| 目标数据 | 对应 Action | 文档参考 |
|
|
127
127
|
| :--- | :--- | :--- |
|
|
128
128
|
| `location` | `locations` | [获取位置信息](../../get-locations.md) |
|
|
129
|
+
| `collection` | `collections` | [获取合集列表](../../get-collections.md) |
|
|
129
130
|
| `activity` | `activities` | [获取活动列表](../../get-publish-activities.md) |
|
|
130
131
|
| `shopping_cart`| `goods` | [获取商品列表](../../get-goods.md) |
|
|
131
132
|
| `drama` | `drama-tasks` | [获取视频号剧集列表](../../get-drama-tasks.md) |
|
|
@@ -31,6 +31,8 @@
|
|
|
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
|
+
视频在上传前会由 CLI 使用 FFmpeg 完整解码视频和音频帧;本地文件在读取期间发生变化、远程地址只返回部分内容、文件损坏或截断时,CLI 会返回结构化错误并停止上传。请确保 `ffmpeg` 可从 `PATH` 找到;如需自动提取视频宽高和时长,再传 `--auto-meta` 并确保 `ffprobe` 可用。
|
|
35
|
+
|
|
34
36
|
> [!IMPORTANT]
|
|
35
37
|
> **视频号 512KB 图片限制**:
|
|
36
38
|
> 上传视频号视频封面或视频号图文图片时,必须带平台用途参数:
|
|
@@ -216,7 +216,9 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
216
216
|
|
|
217
217
|
- 支持格式:`mp4` / `mov`
|
|
218
218
|
- 调用 `yxer upload <视频路径>` 获取 key
|
|
219
|
-
-
|
|
219
|
+
- CLI 会在请求上传地址前用 FFmpeg 完整解码视频和音频帧;损坏、截断或远程只返回部分内容的文件会被拒绝
|
|
220
|
+
- 运行环境必须能从 `PATH` 找到 `ffmpeg`;使用 `--auto-meta` 回填视频宽高和时长时还需要 `ffprobe`
|
|
221
|
+
- 需要将视频宽高和时长写入发布 payload 时,使用 `yxer upload <视频路径> --auto-meta`,并保留返回的 `duration`
|
|
220
222
|
- 视频封面必须单独上传,不能用视频文件本身代替封面
|
|
221
223
|
|
|
222
224
|
### URL 资源
|
|
@@ -236,7 +238,7 @@ yxer publish <type> <platform> .\payload.json --publish-channel local --client-i
|
|
|
236
238
|
| --- | --- | --- |
|
|
237
239
|
| `location` | `yxer query locations <account_id> [--query 关键词]` | 整个 `yxer query locations` 返回对象 |
|
|
238
240
|
| `music` | `yxer query music <account_id> [--query 关键词]` | 整个 `yxer query music` 返回对象 |
|
|
239
|
-
| `collection` / `sub_collection` | `yxer query collections <account_id> [--type video]` | 整个 `yxer query collections` 返回对象 |
|
|
241
|
+
| `collection` / `sub_collection` | `yxer query collections <account_id> [--type video] [--next-page TOKEN]` | 整个 `yxer query collections` 返回对象 |
|
|
240
242
|
| 视频号 `drama` | `yxer query drama-tasks <account_id> [--query 关键词]` | 只保留 `yixiaoerId`、`yixiaoerImageUrl`、`yixiaoerName`,不使用 `raw` |
|
|
241
243
|
| `challenge` | `yxer query challenges <account_id> [--query 关键词]` | 整个 `yxer query challenges` 返回对象 |
|
|
242
244
|
| 小红书 `description` 中的 `<friend>` | `yxer query friends <account_id> --red-id <小红书号>` | 将整个用户对象 JSON 序列化到标签 `raw`,支持陌生人,标签正文使用查询结果名称 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 图文发布工作流
|
|
2
2
|
|
|
3
|
-
> 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
|
|
3
|
+
> 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
|
|
4
4
|
> 阅读本文档前,请先阅读 [common-rules.md](./common-rules.md)。
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -32,8 +32,8 @@ yxer schema get <platform> imageText
|
|
|
32
32
|
6. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
|
|
33
33
|
7. 查阅对应平台文档:`../platforms/imageText/`
|
|
34
34
|
8. 执行校验:`yxer validate <platform> imageText <payload.json>`
|
|
35
|
-
9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
|
|
36
|
-
10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
|
|
35
|
+
9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
|
|
36
|
+
10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
|
|
37
37
|
|
|
38
38
|
## 关键规则
|
|
39
39
|
|
|
@@ -62,6 +62,6 @@ yxer publish imageText 抖音 .\payload.json --publish-channel local --client-id
|
|
|
62
62
|
## 平台文档入口
|
|
63
63
|
|
|
64
64
|
- 索引:`../platforms/imageText/index.md`
|
|
65
|
-
- 平台细节:`../platforms/imageText/*.md`
|
|
66
|
-
|
|
67
|
-
微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。
|
|
65
|
+
- 平台细节:`../platforms/imageText/*.md`
|
|
66
|
+
|
|
67
|
+
微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。
|