@yixiaoermail/cli 3.2.24 → 3.2.26
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 +11 -11
- package/bin/install.js +14 -3
- package/checksums.txt +6 -6
- package/package.json +2 -1
- package/references/platforms/article/toutiaohao.md +3 -1
- package/references/platforms/imageText/toutiaohao.md +3 -1
- package/references/platforms/video/toutiaohao.md +3 -1
- package/references/workflows/publish-imageText.md +6 -6
- package/schemas/platforms/toutiaohao.article.schema.json +6 -10
- package/schemas/platforms/toutiaohao.imageText.schema.json +5 -2
- package/schemas/platforms/toutiaohao.video.schema.json +6 -3
- package/skills/yixiaoer/SKILL.md +1 -1
- package/skills/yixiaoer/references/platforms/article/toutiaohao.md +3 -1
- package/skills/yixiaoer/references/platforms/imageText/toutiaohao.md +3 -1
- package/skills/yixiaoer/references/platforms/video/toutiaohao.md +3 -1
- package/skills/yixiaoer/references/workflows/publish-imageText.md +6 -6
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @yixiaoermail/cli
|
|
2
2
|
|
|
3
3
|
Packaged `yxer` CLI for global npm installation.
|
|
4
4
|
|
|
@@ -8,8 +8,6 @@ Packaged `yxer` CLI for global npm installation.
|
|
|
8
8
|
npm install -g @yixiaoermail/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The npm package installs a lightweight launcher. During install or first run it downloads the matching platform binary from the release assets.
|
|
12
|
-
|
|
13
11
|
## Verify
|
|
14
12
|
|
|
15
13
|
```bash
|
|
@@ -28,16 +26,18 @@ Use `yxer skill sync --global` if your host expects a global skill install.
|
|
|
28
26
|
|
|
29
27
|
## Release Packaging
|
|
30
28
|
|
|
31
|
-
This package expects
|
|
29
|
+
This package expects assets in the versioned TOS directory named like:
|
|
32
30
|
|
|
33
31
|
```text
|
|
34
|
-
yxer-cli
|
|
35
|
-
yxer-cli
|
|
36
|
-
yxer-cli
|
|
37
|
-
yxer-cli
|
|
38
|
-
yxer-cli
|
|
39
|
-
yxer-cli
|
|
32
|
+
yxer-cli-<version>-windows-amd64.zip
|
|
33
|
+
yxer-cli-<version>-windows-arm64.zip
|
|
34
|
+
yxer-cli-<version>-darwin-amd64.tar.gz
|
|
35
|
+
yxer-cli-<version>-darwin-arm64.tar.gz
|
|
36
|
+
yxer-cli-<version>-linux-amd64.tar.gz
|
|
37
|
+
yxer-cli-<version>-linux-arm64.tar.gz
|
|
40
38
|
checksums.txt
|
|
41
39
|
```
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
To override the versioned download directory, set `YXER_DOWNLOAD_BASE_URL` before installation.
|
|
42
|
+
|
|
43
|
+
Release builds and publishing are performed from the repository owner's local machine with `scripts/publish-release.ps1`. The script previews by default; pass `-Execute` only after reviewing the TOS and npm dry-run output.
|
package/bin/install.js
CHANGED
|
@@ -9,10 +9,19 @@ const { ensureExecutable } = require("./ensure-executable");
|
|
|
9
9
|
|
|
10
10
|
const PACKAGE_NAME = "yxer";
|
|
11
11
|
const ARCHIVE_PREFIX = "yxer-cli";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
const packageInfo = require("../package.json");
|
|
13
|
+
const VERSION = packageInfo.version.replace(/-.*$/, "");
|
|
14
|
+
if (!packageInfo.yxerDownloadRootUrl) {
|
|
15
|
+
throw new Error("Missing yxerDownloadRootUrl in package.json");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function buildVersionBaseUrl(rootUrl, version) {
|
|
19
|
+
return `${rootUrl.replace(/\/+$/, "")}/v${version}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const DEFAULT_BASE_URL = buildVersionBaseUrl(packageInfo.yxerDownloadRootUrl, VERSION);
|
|
15
23
|
const ALLOWED_HOSTS = new Set([
|
|
24
|
+
new URL(DEFAULT_BASE_URL).hostname,
|
|
16
25
|
"github.com",
|
|
17
26
|
"objects.githubusercontent.com",
|
|
18
27
|
"release-assets.githubusercontent.com",
|
|
@@ -286,6 +295,7 @@ if (require.main === module) {
|
|
|
286
295
|
module.exports = {
|
|
287
296
|
ALLOWED_HOSTS,
|
|
288
297
|
buildDownloadUrl,
|
|
298
|
+
buildVersionBaseUrl,
|
|
289
299
|
download,
|
|
290
300
|
downloadWithCurl,
|
|
291
301
|
downloadWithPowerShell,
|
|
@@ -296,5 +306,6 @@ module.exports = {
|
|
|
296
306
|
install,
|
|
297
307
|
isSupportedPlatform,
|
|
298
308
|
parseChecksums,
|
|
309
|
+
resolveBaseUrl,
|
|
299
310
|
verifyChecksum
|
|
300
311
|
};
|
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
a665ae99d9934cff6f7bedbb9bb0bfd11d1c3b567c9bd4f8eaf2792d62f1ef69 yxer-cli-3.2.26-windows-amd64.zip
|
|
2
|
+
1781de4190d0ee8af38ce388020b405be5c00a5b2451856f2d02d14d551c3e86 yxer-cli-3.2.26-windows-arm64.zip
|
|
3
|
+
da26afc4c6f09e9ab51a70d168306e111eeb3b9916ecef87129e54641b6eca79 yxer-cli-3.2.26-darwin-amd64.tar.gz
|
|
4
|
+
14290697ea16d70518996dd05c42c2ac7ce222831c1afcf0464acc426855d36b yxer-cli-3.2.26-darwin-arm64.tar.gz
|
|
5
|
+
7635fbb8607943fbc65bfdccb7a1f49b5ae5788dd971c3852e73aa39e3b23c8e yxer-cli-3.2.26-linux-amd64.tar.gz
|
|
6
|
+
eab790466851e9423cdc86f74b6bef7bac66ba84c9727bbcfb783e196be15822 yxer-cli-3.2.26-linux-arm64.tar.gz
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yixiaoermail/cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.26",
|
|
4
|
+
"yxerDownloadRootUrl": "https://yixiaoer-lite-asserts.tos-cn-shanghai.volces.com/yxer/releases",
|
|
4
5
|
"description": "Yixiaoer CLI packaged for npm global installation",
|
|
5
6
|
"bin": {
|
|
6
7
|
"yxer": "bin/yxer.js"
|
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
| `location` | `Object` | 否 | 位置对象 (`PlatformDataItem`) | - |
|
|
32
32
|
| `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
|
|
33
33
|
| `advertisement` | `number` | 否 | 广告投放收益: 2-无收益, 3-投放广告赚收益 | `3` |
|
|
34
|
-
| `declaration
|
|
34
|
+
| `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
|
|
35
35
|
| `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
|
|
36
36
|
|
|
37
|
+
普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。`isFirst=true` 表示“头条首发”,与 `declaration=10` 的“首发精选”是两个独立字段。
|
|
38
|
+
|
|
37
39
|
## 2. Payload 完整示例
|
|
38
40
|
|
|
39
41
|
```json
|
|
@@ -25,9 +25,11 @@
|
|
|
25
25
|
| `formType` | `string` | **是** | 固定值: `task` | `task` |
|
|
26
26
|
| `description` | `string` | **是** | 图文描述,支持 HTML 和话题标签 (`<topic>`)。最多 1000 字符。 | - |
|
|
27
27
|
| `images` | `Array` | **是** | 图片数组 (`OldImage[]`) | - |
|
|
28
|
-
| `declaration` | `number` | 否 |
|
|
28
|
+
| `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
|
|
29
29
|
| `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | - |
|
|
30
30
|
|
|
31
|
+
普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
|
|
32
|
+
|
|
31
33
|
## 2. 复杂对象结构说明
|
|
32
34
|
|
|
33
35
|
### 复杂对象:OldImage
|
|
@@ -27,11 +27,13 @@
|
|
|
27
27
|
| `title` | `string` | **是** | 视频标题 (1-30 字符) | - |
|
|
28
28
|
| `description` | `string` | **是** | 视频描述 (1-400 字符) | - |
|
|
29
29
|
| `tags` | `string[]` | **是** | 视频标签 (1-5 个,字符串数组) | - |
|
|
30
|
-
| `declaration` | `number` | 否 |
|
|
30
|
+
| `declaration` | `number` | 否 | 创作声明:`0`-无需声明,`2`-取自站外,`1`-自行拍摄,`3`-AI 生成,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
|
|
31
31
|
| `scheduledTime` | `number` | 否 | 定时发布时间戳(13 位 Unix 时间戳,单位:毫秒) | - |
|
|
32
32
|
| `visibleType` | `number` | **是** | 可见性: 0-公开, 1-私密 | 0 |
|
|
33
33
|
| `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
|
|
34
34
|
|
|
35
|
+
普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
|
|
36
|
+
|
|
35
37
|
## 2. Payload 完整示例
|
|
36
38
|
|
|
37
39
|
```json
|
|
@@ -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` 的独立工作流。
|
|
@@ -141,21 +141,17 @@
|
|
|
141
141
|
"declaration": {
|
|
142
142
|
"type": "number",
|
|
143
143
|
"enum": [
|
|
144
|
+
0,
|
|
144
145
|
1,
|
|
145
146
|
2,
|
|
146
147
|
3,
|
|
147
148
|
6,
|
|
148
149
|
7,
|
|
149
|
-
8
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
"enum": [
|
|
155
|
-
1,
|
|
156
|
-
2,
|
|
157
|
-
3
|
|
158
|
-
]
|
|
150
|
+
8,
|
|
151
|
+
9,
|
|
152
|
+
10
|
|
153
|
+
],
|
|
154
|
+
"default": 0
|
|
159
155
|
},
|
|
160
156
|
"publishTime": {
|
|
161
157
|
"type": "string",
|
package/skills/yixiaoer/SKILL.md
CHANGED
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
| `location` | `Object` | 否 | 位置对象 (`PlatformDataItem`) | - |
|
|
32
32
|
| `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
|
|
33
33
|
| `advertisement` | `number` | 否 | 广告投放收益: 2-无收益, 3-投放广告赚收益 | `3` |
|
|
34
|
-
| `declaration
|
|
34
|
+
| `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
|
|
35
35
|
| `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
|
|
36
36
|
|
|
37
|
+
普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。`isFirst=true` 表示“头条首发”,与 `declaration=10` 的“首发精选”是两个独立字段。
|
|
38
|
+
|
|
37
39
|
## 2. Payload 完整示例
|
|
38
40
|
|
|
39
41
|
```json
|
|
@@ -25,9 +25,11 @@
|
|
|
25
25
|
| `formType` | `string` | **是** | 固定值: `task` | `task` |
|
|
26
26
|
| `description` | `string` | **是** | 图文描述,支持 HTML 和话题标签 (`<topic>`)。最多 1000 字符。 | - |
|
|
27
27
|
| `images` | `Array` | **是** | 图片数组 (`OldImage[]`) | - |
|
|
28
|
-
| `declaration` | `number` | 否 |
|
|
28
|
+
| `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
|
|
29
29
|
| `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | - |
|
|
30
30
|
|
|
31
|
+
普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
|
|
32
|
+
|
|
31
33
|
## 2. 复杂对象结构说明
|
|
32
34
|
|
|
33
35
|
### 复杂对象:OldImage
|
|
@@ -27,11 +27,13 @@
|
|
|
27
27
|
| `title` | `string` | **是** | 视频标题 (1-30 字符) | - |
|
|
28
28
|
| `description` | `string` | **是** | 视频描述 (1-400 字符) | - |
|
|
29
29
|
| `tags` | `string[]` | **是** | 视频标签 (1-5 个,字符串数组) | - |
|
|
30
|
-
| `declaration` | `number` | 否 |
|
|
30
|
+
| `declaration` | `number` | 否 | 创作声明:`0`-无需声明,`2`-取自站外,`1`-自行拍摄,`3`-AI 生成,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
|
|
31
31
|
| `scheduledTime` | `number` | 否 | 定时发布时间戳(13 位 Unix 时间戳,单位:毫秒) | - |
|
|
32
32
|
| `visibleType` | `number` | **是** | 可见性: 0-公开, 1-私密 | 0 |
|
|
33
33
|
| `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
|
|
34
34
|
|
|
35
|
+
普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
|
|
36
|
+
|
|
35
37
|
## 2. Payload 完整示例
|
|
36
38
|
|
|
37
39
|
```json
|
|
@@ -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` 的独立工作流。
|