@yixiaoermail/cli 3.2.3 → 3.2.6
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/bin/install.js +46 -2
- package/bin/yxer.js +31 -2
- 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 +58 -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 +8 -0
- package/schemas/platforms/baijiahao.video.schema.json +19 -2
- 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/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/kuaichuanhao.article.schema.json +20 -8
- package/schemas/platforms/kuaishou-open.video.schema.json +102 -0
- package/schemas/platforms/kuaishou.imageText.schema.json +12 -2
- package/schemas/platforms/kuaishou.video.schema.json +31 -0
- package/schemas/platforms/shipinhao.imageText.schema.json +13 -1
- package/schemas/platforms/shipinhao.video.schema.json +31 -0
- package/schemas/platforms/souhushipin.video.schema.json +3 -3
- package/schemas/platforms/tengxunshipin.video.schema.json +1 -0
- 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 +27 -25
- package/schemas/platforms/xiaohongshu.video.schema.json +2 -1
- package/schemas/platforms/xinlang.imageText.schema.json +23 -2
- package/schemas/platforms/xinlang.video.schema.json +40 -10
- package/schemas/platforms/yidianhao.article.schema.json +1 -0
- package/schemas/platforms/yidianhao.video.schema.json +9 -8
- 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 +21 -8
- 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/install-and-sync.md +5 -7
- 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 +1 -1
- 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 +20 -9
- package/skills/yixiaoer/references/platforms/get-locations.md +0 -5
- package/skills/yixiaoer/references/platforms/imageText/weixinshipinhao.md +0 -7
package/bin/install.js
CHANGED
|
@@ -83,7 +83,7 @@ function buildDownloadUrl(baseUrl, archiveName) {
|
|
|
83
83
|
return `${baseUrl.replace(/\/+$/, "")}/${archiveName}`;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function
|
|
86
|
+
function downloadWithCurl(url, destPath, execFile = execFileSync) {
|
|
87
87
|
assertAllowedHost(url);
|
|
88
88
|
|
|
89
89
|
const args = [
|
|
@@ -106,7 +106,48 @@ function download(url, destPath) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
args.push(url);
|
|
109
|
-
|
|
109
|
+
execFile("curl", args, { stdio: ["ignore", "ignore", "pipe"] });
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function downloadWithPowerShell(url, destPath, execFile = execFileSync) {
|
|
113
|
+
assertAllowedHost(url);
|
|
114
|
+
|
|
115
|
+
const psCommand =
|
|
116
|
+
"$ProgressPreference='SilentlyContinue';" +
|
|
117
|
+
"$ErrorActionPreference='Stop';" +
|
|
118
|
+
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;" +
|
|
119
|
+
"Invoke-WebRequest -UseBasicParsing -Uri $env:YXER_URL -OutFile $env:YXER_DEST";
|
|
120
|
+
|
|
121
|
+
execFile(
|
|
122
|
+
"powershell.exe",
|
|
123
|
+
["-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", psCommand],
|
|
124
|
+
{
|
|
125
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
126
|
+
env: {
|
|
127
|
+
...process.env,
|
|
128
|
+
YXER_URL: url,
|
|
129
|
+
YXER_DEST: destPath
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function download(url, destPath, platform = process.platform, execFile = execFileSync) {
|
|
136
|
+
try {
|
|
137
|
+
downloadWithCurl(url, destPath, execFile);
|
|
138
|
+
} catch (error) {
|
|
139
|
+
if (platform !== "win32") {
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
try {
|
|
144
|
+
downloadWithPowerShell(url, destPath, execFile);
|
|
145
|
+
} catch (fallbackError) {
|
|
146
|
+
fallbackError.message =
|
|
147
|
+
`${error.message}; fallback via PowerShell failed: ${fallbackError.message}`;
|
|
148
|
+
throw fallbackError;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
110
151
|
}
|
|
111
152
|
|
|
112
153
|
function parseChecksums(content) {
|
|
@@ -245,6 +286,9 @@ if (require.main === module) {
|
|
|
245
286
|
module.exports = {
|
|
246
287
|
ALLOWED_HOSTS,
|
|
247
288
|
buildDownloadUrl,
|
|
289
|
+
download,
|
|
290
|
+
downloadWithCurl,
|
|
291
|
+
downloadWithPowerShell,
|
|
248
292
|
getBinaryPath,
|
|
249
293
|
getBinDir,
|
|
250
294
|
getExpectedChecksum,
|
package/bin/yxer.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { spawnSync } = require("node:child_process");
|
|
4
4
|
const fs = require("node:fs");
|
|
5
5
|
const { ensureExecutable } = require("./ensure-executable");
|
|
6
|
-
const { install } = require("./install");
|
|
6
|
+
const { getBinaryPath, install } = require("./install");
|
|
7
7
|
const { getBinaryFilename, resolveBinaryPath } = require("./resolve-binary");
|
|
8
8
|
|
|
9
9
|
function resolveBinary() {
|
|
@@ -25,6 +25,35 @@ function resolveBinary() {
|
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
const expectedBinaryPath = getBinaryPath(__dirname, platform, arch);
|
|
29
|
+
const oldBinaryPath = expectedBinaryPath ? `${expectedBinaryPath}.old` : null;
|
|
30
|
+
|
|
31
|
+
if (platform === "win32" && expectedBinaryPath && oldBinaryPath && fs.existsSync(oldBinaryPath)) {
|
|
32
|
+
if (!fs.existsSync(expectedBinaryPath)) {
|
|
33
|
+
try {
|
|
34
|
+
fs.renameSync(oldBinaryPath, expectedBinaryPath);
|
|
35
|
+
} catch (_) {
|
|
36
|
+
// Best-effort recovery before the normal install path runs.
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
const probe = spawnSync(expectedBinaryPath, ["--version"], { stdio: "ignore" });
|
|
40
|
+
if (probe.status !== 0) {
|
|
41
|
+
try {
|
|
42
|
+
fs.rmSync(expectedBinaryPath, { force: true });
|
|
43
|
+
fs.renameSync(oldBinaryPath, expectedBinaryPath);
|
|
44
|
+
} catch (_) {
|
|
45
|
+
// Fall through to the normal install/error handling path.
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
try {
|
|
49
|
+
fs.rmSync(oldBinaryPath, { force: true });
|
|
50
|
+
} catch (_) {
|
|
51
|
+
// Best-effort stale file cleanup only.
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
28
57
|
const binaryPath = resolveBinaryPath(__dirname, platform, arch);
|
|
29
58
|
if (!binaryPath || !fs.existsSync(binaryPath)) {
|
|
30
59
|
try {
|
|
@@ -37,7 +66,7 @@ function resolveBinary() {
|
|
|
37
66
|
message: `Expected packaged binary not found: ${filename}`,
|
|
38
67
|
category: "environment",
|
|
39
68
|
hint: `Automatic install failed: ${error.message}`,
|
|
40
|
-
nextCommand: "
|
|
69
|
+
nextCommand: "yxer update",
|
|
41
70
|
retryable: true
|
|
42
71
|
}
|
|
43
72
|
})
|
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
037276dc914524b60ac8e43be383ee145a2934c6e4a4c451a3ed41594e7a74fe yxer-cli-3.2.6-windows-amd64.zip
|
|
2
|
+
eaa92317648534616ead48011c90fee0d22beb8db6fb8b9dbafc152eb71c1f40 yxer-cli-3.2.6-windows-arm64.zip
|
|
3
|
+
de5cbc9759a9d6b659d1f35b4f5f337228b3ad76b01a0eb19c30ddfd646243b6 yxer-cli-3.2.6-darwin-amd64.tar.gz
|
|
4
|
+
636ebab7e934c8ec8f5ce951b18dd0d7e477f27c83e210051b860c4d02dfdf3e yxer-cli-3.2.6-darwin-arm64.tar.gz
|
|
5
|
+
c334a3e1de833bc4e24cf6450d01fb7bbe676ef94376ba28bed81f64d407f8d8 yxer-cli-3.2.6-linux-amd64.tar.gz
|
|
6
|
+
8ddbcb70a16eb08362e2148a86246d51b2f428a08c00db043c42f361cefb10be yxer-cli-3.2.6-linux-arm64.tar.gz
|
package/package.json
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`yxer` 是本技能唯一执行入口。Agent 和用户都应直接使用它。
|
|
4
4
|
|
|
5
|
-
命令树设计标准见:`references/cli/command-design.md`
|
|
6
|
-
|
|
7
5
|
## 命令分组
|
|
8
6
|
|
|
9
7
|
### 环境与版本
|
|
@@ -34,7 +32,7 @@ yxer skill sync [--global]
|
|
|
34
32
|
yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
|
|
35
33
|
yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
|
|
36
34
|
yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID]
|
|
37
|
-
yxer account-group list
|
|
35
|
+
yxer account-group list [--page 1] [--size 10]
|
|
38
36
|
yxer account-group create <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
|
|
39
37
|
yxer account-group update <group_id> <name> [--visible-scope all|specific] [--visible-user USER_ID]... [--dry-run]
|
|
40
38
|
yxer account-group delete <group_id> [--dry-run]
|
|
@@ -46,7 +44,14 @@ yxer upload --url <resource_url> [--bucket cloud-publish|material-library] [--dr
|
|
|
46
44
|
|
|
47
45
|
```bash
|
|
48
46
|
yxer validate <platform> <type> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>]
|
|
49
|
-
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]
|
|
50
55
|
```
|
|
51
56
|
|
|
52
57
|
### 草稿与素材库
|
|
@@ -61,25 +66,13 @@ yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>]
|
|
|
61
66
|
|
|
62
67
|
```bash
|
|
63
68
|
yxer query categories <account_id> [--type video|article]
|
|
64
|
-
yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3]
|
|
65
|
-
yxer query music <account_id> [--query 关键词]
|
|
66
|
-
yxer query
|
|
67
|
-
yxer query goods <account_id> [--query 关键词] [--next-page TOKEN]
|
|
69
|
+
yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3]
|
|
70
|
+
yxer query music <account_id> [--query 关键词]
|
|
71
|
+
yxer query goods <account_id> [--query 关键词]
|
|
68
72
|
yxer query collections <account_id> [--type video|article]
|
|
69
|
-
yxer query miniapps <account_id> [--query 关键词]
|
|
70
|
-
yxer query syncapps <account_id>
|
|
71
|
-
yxer query games <account_id> [--query 关键词]
|
|
72
|
-
yxer query hot-events <account_id> [--type video|article]
|
|
73
|
-
yxer query groups <account_id>
|
|
74
73
|
yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
|
|
75
|
-
yxer query
|
|
76
|
-
yxer query challenges <account_id> [--query 关键词] [--type video] [--next-page TOKEN]
|
|
74
|
+
yxer query challenges <account_id> [--query 关键词] [--type video]
|
|
77
75
|
yxer query records [--platform P] [--limit N] [--status S] [--json]
|
|
78
|
-
yxer query details <task_set_id>
|
|
79
|
-
yxer query account-overviews --platform P [--name 关键词] [--group 分组] [--login-status 1] [--member-id ID] [--page 1] [--size 10]
|
|
80
|
-
yxer query content-overviews [--platform P] [--account-id ID] [--publish-user-id ID] [--type video|article|miniVideo|dynamic] [--title 关键词] [--publish-start-time 毫秒] [--publish-end-time 毫秒] [--page 1] [--size 10]
|
|
81
|
-
yxer query proxies [--size 9999]
|
|
82
|
-
yxer query proxy-areas
|
|
83
76
|
yxer prepare <platform> <type>
|
|
84
77
|
yxer schema fields <platform> <type>
|
|
85
78
|
yxer schema get <platform> <type>
|
|
@@ -96,22 +89,27 @@ yxer schema get <platform> <type>
|
|
|
96
89
|
- 发布类型统一使用:`video`、`imageText`、`article`
|
|
97
90
|
- 单次 `yxer publish` 只处理一个平台
|
|
98
91
|
- `publish` 仅支持 `payload.json` 模式
|
|
99
|
-
-
|
|
92
|
+
- 新建或补字段时,先执行 `yxer prepare <platform> <type>` / `yxer publish form start` 和 `yxer schema fields <platform> <type>`;`schema fields` 默认返回扁平路径清单,只有需要完整 payload 骨架时再执行 `yxer schema get <platform> <type>`
|
|
100
93
|
- `payload.json` 只支持标准 `publishArgs` 结构,所有平台统一
|
|
101
94
|
- CLI 会根据 `publishArgs` 自动补齐最外层 `cover`、`coverKey`、`desc`、`isDraft`、`isAppContent`
|
|
102
95
|
- 云发布是默认模式
|
|
103
96
|
- 本机发布时必须提供 `clientId`
|
|
104
97
|
- `yxer validate`、`yxer publish --dry-run`、`yxer publish` 使用同一套发布通道解析逻辑
|
|
105
|
-
-
|
|
106
|
-
|
|
98
|
+
- `yxer publish --dry-run` 不创建发布任务;它返回最终请求预览,并在有 API key 的云发布场景执行账号/代理 preflight。local dry-run 不检测客户端在线状态。
|
|
99
|
+
- 本机发布推荐通过两种方式提供 `clientId`:
|
|
107
100
|
- flags:`yxer publish <type> <platform> <payload.json> --publish-channel local --client-id <clientId>`
|
|
108
101
|
- 预设默认值:`yxer config set-local-client-id <clientId>` 后,再执行 `--publish-channel local`
|
|
102
|
+
- 第四个位置参数属于旧版兼容,不再作为 Agent 推荐入口。
|
|
109
103
|
- 本机发布校验时,推荐在 `validate` 阶段就显式传入 `--publish-channel local`;若未显式传入但 payload 中已写 `publishChannel=local`,CLI 也会尝试从默认配置读取 `clientId`
|
|
110
104
|
- `yxer draft save` 只处理蚁小二内部草稿,不等同于平台草稿箱
|
|
111
105
|
- `yxer material create` 只做素材登记,前提是资源已经通过 `yxer upload --bucket material-library` 上传
|
|
112
106
|
- `yxer material add --file ...` 会自动完成上传和素材登记
|
|
113
107
|
- 查询类操作可以直接执行
|
|
114
|
-
-
|
|
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`。
|
|
115
113
|
- 所有请求字段都必须来自 schema、平台文档或 CLI 返回结果;严禁虚构字段、乱猜枚举、手写 `raw` 对象或编造资源元数据
|
|
116
114
|
|
|
117
115
|
## 快速示例
|
|
@@ -127,18 +125,9 @@ yxer config get
|
|
|
127
125
|
|
|
128
126
|
```bash
|
|
129
127
|
yxer accounts list 抖音 --json
|
|
130
|
-
yxer accounts list 抖音 --page 2 --size 20 --json
|
|
131
|
-
yxer accounts list 小红书 --all --status 1 --json
|
|
132
128
|
yxer accounts list 小红书 --status 1
|
|
133
129
|
```
|
|
134
130
|
|
|
135
|
-
说明:
|
|
136
|
-
|
|
137
|
-
- `accounts list` 默认查询第 `1` 页、每页 `20` 条
|
|
138
|
-
- 显式传 `--page`、`--size` 可控制单页查询范围
|
|
139
|
-
- 传 `--all` 时,CLI 才会根据远端返回的分页信号继续翻页汇总后续账号
|
|
140
|
-
- 不会用“当前页已满”来猜测下一页是否存在
|
|
141
|
-
|
|
142
131
|
### 上传资源
|
|
143
132
|
|
|
144
133
|
```bash
|
|
@@ -214,16 +203,18 @@ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <cl
|
|
|
214
203
|
|
|
215
204
|
## 常见工作流入口
|
|
216
205
|
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
206
|
+
- 共享规则:`../yixiaoer-shared.md`
|
|
207
|
+
- 通用规则:`../workflows/common-rules.md`
|
|
208
|
+
- 图文发布:`../workflows/publish-imageText.md`
|
|
209
|
+
- 视频发布:`../workflows/publish-video.md`
|
|
210
|
+
- 文章发布:`../workflows/publish-article.md`
|
|
221
211
|
|
|
222
212
|
## 发布通道约定
|
|
223
213
|
|
|
224
214
|
- 用户未指定“本机发布 / 本地发布 / 客户端发布”时,Agent 应默认使用云发布。
|
|
225
215
|
- 用户明确要求本机发布,或说明要走本机客户端/本机网络时,Agent 必须显式传 `--publish-channel local`,不要只在说明文字里表达。
|
|
226
216
|
- 若云发布返回“账号代理不存在”等代理相关错误,可建议切换到本机发布。
|
|
217
|
+
- CLI 默认只返回本机发布 `nextCommand`,不会自动切换通道;`--auto-fallback-local` 属于用户明确授权后的高级选项,不作为 Agent 默认路径。
|
|
227
218
|
- 若本机发布返回“客户端不在线”或“获取在线设备列表失败”,可建议用户启动蚁小二客户端,或改回云发布。
|
|
228
219
|
|
|
229
220
|
## 输出约定
|
|
@@ -233,8 +224,8 @@ yxer publish video 抖音 .\payload.json --publish-channel local --client-id <cl
|
|
|
233
224
|
- 成功输出格式:`ok/action/version/data`
|
|
234
225
|
- 失败输出格式:`ok/version/error`
|
|
235
226
|
- 错误通过统一错误 envelope 输出
|
|
236
|
-
- `yxer doctor` 可能返回 `_notice.skills`,提示当前 AI skill 与 CLI
|
|
237
|
-
- `yxer update`
|
|
227
|
+
- `yxer doctor` 可能返回 `_notice.skills`,提示当前 AI skill 与 CLI 版本不同步,并建议优先执行 `yxer update`
|
|
228
|
+
- `yxer update` 是当前推荐的统一入口:会检查 CLI 安装方式、在 npm 安装场景下升级 CLI,并同步 AI skill
|
|
238
229
|
|
|
239
230
|
## 入口约束
|
|
240
231
|
|
|
@@ -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 解析结果为准
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# 创建账号分组
|
|
2
|
+
|
|
3
|
+
用于创建账号分组,对应接口 `POST /groups`。
|
|
4
|
+
|
|
5
|
+
## 推荐命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yxer account-group create 核心账号组 --dry-run
|
|
9
|
+
yxer account-group create 核心账号组
|
|
10
|
+
yxer account-group create 核心账号组 --visible-scope all --dry-run
|
|
11
|
+
yxer account-group create 核心账号组 --visible-scope specific --visible-user user_1 --visible-user user_2 --dry-run
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## 请求说明
|
|
15
|
+
|
|
16
|
+
- CLI 请求体支持以下字段:
|
|
17
|
+
- `name`: 分组名
|
|
18
|
+
- `visibleScope`: 可见范围,支持 `all` / `specific`
|
|
19
|
+
- `visibleUsers`: 当 `visibleScope=specific` 时必填,表示可见用户 ID 列表
|
|
20
|
+
- `--visible-scope specific` 时,必须至少传入一个 `--visible-user <userId>`。
|
|
21
|
+
- 当涉及“指定成员可见”时,应先执行 [`yxer query members`](./get-members.md) 获取真实成员 ID,再回填到 `--visible-user`。
|
|
22
|
+
- 写操作先执行 `--dry-run`,确认请求体后再正式提交。
|
|
23
|
+
|
|
24
|
+
## 输出说明
|
|
25
|
+
|
|
26
|
+
- `--dry-run` 返回预览请求,不产生实际副作用。
|
|
27
|
+
- 正式执行返回远端创建结果,字段以 CLI 实际 JSON 输出为准。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 删除账号分组
|
|
2
|
+
|
|
3
|
+
用于删除账号分组,对应接口 `DELETE /groups/{groupId}`。
|
|
4
|
+
|
|
5
|
+
## 推荐命令
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yxer account-group delete group_1 --dry-run
|
|
9
|
+
yxer account-group delete group_1
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## 请求说明
|
|
13
|
+
|
|
14
|
+
- 路径参数 `groupId` 使用命令第一个位置参数传入。
|
|
15
|
+
- 删除前先执行 `--dry-run`,确认目标分组 ID 后再正式提交。
|
|
16
|
+
|
|
17
|
+
## 输出说明
|
|
18
|
+
|
|
19
|
+
- `--dry-run` 返回预览请求,不产生实际副作用。
|
|
20
|
+
- 正式执行返回远端删除结果;若接口返回空响应,CLI 成功 envelope 中的 `data` 可能为 `null`。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# 账号、环境与 Skill 同步
|
|
2
|
+
|
|
3
|
+
适用范围:用户要检查环境、初始化配置、查询账号、查看 skill 安装状态。
|
|
4
|
+
|
|
5
|
+
**CRITICAL - 用户只要说“先看看环境/账号/同步状态”,就先停在本域,不要提前进入发布、草稿或素材主流程。**
|
|
6
|
+
|
|
7
|
+
## 优先读取
|
|
8
|
+
|
|
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)
|
|
14
|
+
|
|
15
|
+
## 常用命令
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yxer doctor
|
|
19
|
+
yxer config get
|
|
20
|
+
yxer config init --api-key <apiKey>
|
|
21
|
+
yxer config set-local-client-id <clientId>
|
|
22
|
+
yxer accounts list [platform] [--name 关键词] [--status 1] [--page 1] [--size 20] [--all] [--json]
|
|
23
|
+
yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
|
|
24
|
+
yxer query account-overviews --platform P [--name 关键词] [--group 分组] [--login-status 1] [--member-id ID] [--page 1] [--size 10]
|
|
25
|
+
yxer query content-overviews [--platform P] [--account-id ID] [--publish-user-id ID] [--type video|article|miniVideo|dynamic] [--title 关键词] [--publish-start-time 毫秒] [--publish-end-time 毫秒]
|
|
26
|
+
yxer query proxies [--size 9999]
|
|
27
|
+
yxer query proxy-areas
|
|
28
|
+
yxer accounts update <account_id> [--proxy-id ID] [--kuaidaili-area CODE] [--remark 文本] [--group ID] --dry-run
|
|
29
|
+
yxer skill show
|
|
30
|
+
yxer skill sync [--global]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 规则
|
|
34
|
+
|
|
35
|
+
- 首次使用、环境不明、或失败排查后,先 `yxer doctor`
|
|
36
|
+
- `doctor` 失败时先修环境,不继续业务流程
|
|
37
|
+
- 涉及本机发布前的 `clientId` 判断时,先查询现有配置和账号列表
|
|
38
|
+
- `yxer accounts list` 默认查第 `1` 页、每页 `20` 条;传 `--page`、`--size` 可控制单页范围,传 `--all` 时才继续翻页
|
|
39
|
+
- `yxer accounts update` 是写操作,正式执行前必须先用同一参数执行 `--dry-run`
|
|
40
|
+
- 涉及账号分组的 `visibleUsers`、指定成员可见、按成员挑选负责人时,先执行 `yxer query members` 获取真实成员 ID
|
|
41
|
+
- 命中多个账号时,结构化列出候选并让用户确认;只有一个可用账号时可自动选中并说明
|
|
42
|
+
- 查询或更新账号配置时,按执行协议记录当前状态;任何写操作失败后按错误恢复协议处理,不直接重复执行
|
|
43
|
+
- 用户明确说“先不要发布,只查环境/账号”时,完成本域后直接停下,不擅自继续发布流程
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# 草稿与素材库
|
|
2
|
+
|
|
3
|
+
适用范围:用户要保存草稿、登记素材、上传素材到素材库,或先存资源再继续发布。
|
|
4
|
+
|
|
5
|
+
**CRITICAL - 用户说“草稿”时,MUST 先区分蚁小二草稿、平台草稿、还是仅上传素材;禁止自行猜测。**
|
|
6
|
+
|
|
7
|
+
## 读取顺序
|
|
8
|
+
|
|
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)
|
|
16
|
+
|
|
17
|
+
## 常用命令
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
yxer draft save <payload.json> [--dry-run]
|
|
21
|
+
yxer material add --file <文件路径或URL> [--thumb <缩略图路径或URL>] [--type image|video|file] [--dry-run]
|
|
22
|
+
yxer upload --file <file_path> --bucket material-library
|
|
23
|
+
yxer upload --url <resource_url> --bucket material-library
|
|
24
|
+
yxer material create <payload.json> [--dry-run]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 决策规则
|
|
28
|
+
|
|
29
|
+
- 用户只说“保存草稿”时,先区分蚁小二草稿和平台草稿,不要自行猜测
|
|
30
|
+
- 用户只想把资源放进素材库时,优先 `material add`
|
|
31
|
+
- 用户已有上传结果,只差登记素材时,再用 `material create`
|
|
32
|
+
- 草稿和素材写操作必须先 dry-run;资源字段必须保留上传来源,不能手写 key、尺寸或格式
|
|
33
|
+
- 素材任务不自动进入发布主流程;只有用户明确要“上传后马上发布”时,再切回发布域
|
|
34
|
+
- 用户明确说“先存一下,别发”时,停在本域,不擅自回切发布域
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# 安装、升级与同步
|
|
2
|
+
|
|
3
|
+
适用范围:用户要安装、升级或卸载 CLI / skill,重新同步 skill,或查看宿主如何接入该技能。
|
|
4
|
+
|
|
5
|
+
**CRITICAL - 用户意图是安装、升级或同步时,先完成本域动作,不要跳到发布流程里“顺手再发一次”验证。**
|
|
6
|
+
|
|
7
|
+
## 标准安装流程
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @yixiaoermail/cli
|
|
11
|
+
yxer --version
|
|
12
|
+
yxer config init --api-key <apiKey>
|
|
13
|
+
yxer update
|
|
14
|
+
yxer doctor
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
如果是 SkillHub / skills 市场接入,建议先安装 `skills/yixiaoer-bootstrap`,由它负责:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @yixiaoermail/cli@latest
|
|
21
|
+
yxer update --global
|
|
22
|
+
yxer config init --api-key <apiKey>
|
|
23
|
+
yxer doctor
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 升级流程
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
yxer update
|
|
30
|
+
yxer doctor
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 卸载流程
|
|
34
|
+
|
|
35
|
+
优先先卸载 skill,再卸载 CLI。
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx skills --help
|
|
39
|
+
npm uninstall -g @yixiaoermail/cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
如果需要彻底清理本地配置,可按需删除:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
%USERPROFILE%\.yxer\config.json
|
|
46
|
+
%USERPROFILE%\.yxer\skills.stamp
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
如果不确定 skill 安装位置,先执行:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
yxer skill show
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 规则
|
|
56
|
+
|
|
57
|
+
- 安装 CLI 时优先使用 `npm install -g @yixiaoermail/cli`
|
|
58
|
+
- CLI 安装后优先使用 `yxer update`,让 CLI 升级检查与本地随包 skill 同步走同一条路径
|
|
59
|
+
- `yxer --version` 升级后,应提示重新同步 skill
|
|
60
|
+
- `SKILL.md` 或 `references/` 中影响 Agent 行为的文档更新后,应提示重新同步
|
|
61
|
+
- `yxer doctor` 返回 `_notice.skills` 时,优先执行 `yxer update`
|
|
62
|
+
- 用户明确说“只想同步 skill / 看安装方法”时,完成本域说明后直接停下
|
|
63
|
+
- 不要引导普通用户从源码构建或手动放置 `yxer.exe`;源码构建只用于研发、测试或 npm 成品包制作
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# 发布与 Payload
|
|
2
|
+
|
|
3
|
+
适用范围:用户要发布视频、图文、文章,或要修订发布 payload、解释字段归属、确认发布通道。
|
|
4
|
+
|
|
5
|
+
**CRITICAL - 只要用户意图落在本域,MUST 先读取下方 workflow,再决定是否执行任何 `prepare`、字段查询、`validate` 或 `publish`。**
|
|
6
|
+
**BLOCKING REQUIREMENT - 未使用同一份 `payload.json` 和同一套发布通道参数完成 `validate`、`publish --dry-run` 前,绝对禁止正式 `publish`。缺账号、字段、资源或动态对象时,必须先完成 `doctor`、账号确认、`prepare/form`、`schema fields`、上传和查询。**
|
|
7
|
+
**AI EXECUTION PROTOCOL - 发布域任务必须先按协议状态机推进,不允许越过 `validated` / `dry_run_passed` 状态直接发布。**
|
|
8
|
+
|
|
9
|
+
## 读取顺序
|
|
10
|
+
|
|
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. 按类型继续读取:
|
|
21
|
+
- 图文:[`../workflows/publish-imageText.md`](../workflows/publish-imageText.md)
|
|
22
|
+
- 视频:[`../workflows/publish-video.md`](../workflows/publish-video.md)
|
|
23
|
+
- 文章:[`../workflows/publish-article.md`](../workflows/publish-article.md)
|
|
24
|
+
|
|
25
|
+
## 意图路由
|
|
26
|
+
|
|
27
|
+
- 用户只说“帮我发一下”“发个抖音/小红书”“发视频/图文/文章”时,直接进入本域,并继续按类型读取 workflow。
|
|
28
|
+
- 用户明确说“先别发,只生成 payload”“帮我修 payload”时,仍进入本域,但最终动作只停留在 payload 修订或 `validate` / `publish --dry-run`。
|
|
29
|
+
- 用户明确说“查为什么发失败了”“解释报错”时,先切 [`./troubleshooting.md`](./troubleshooting.md),不要直接重试正式发布。
|
|
30
|
+
- 用户明确说“上传素材后马上发”时,先完成素材流程,再回切本域继续执行发布主流程。
|
|
31
|
+
|
|
32
|
+
## 平台差异入口
|
|
33
|
+
|
|
34
|
+
- 总索引:[`../platforms/index.md`](../platforms/index.md)
|
|
35
|
+
- 视频平台:[`../platforms/video/index.md`](../platforms/video/index.md)
|
|
36
|
+
- 图文平台:[`../platforms/imageText/index.md`](../platforms/imageText/index.md)
|
|
37
|
+
- 文章平台:[`../platforms/article/index.md`](../platforms/article/index.md)
|
|
38
|
+
|
|
39
|
+
只有在 `prepare` / `schema get` 之后,且当前 workflow 无法回答平台差异时,才继续读取具体平台文档。
|
|
40
|
+
|
|
41
|
+
## 强制门禁
|
|
42
|
+
|
|
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`
|
|
48
|
+
- 未按 `data-accuracy.md` 完成动态字段查询和多候选确认,不继续写 payload 或发布
|
|
49
|
+
- 未先 `validate` 与 `publish --dry-run` 不执行正式 `publish`
|
|
50
|
+
|
|
51
|
+
## 常用命令
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
yxer accounts list [platform] [--name 关键词] [--status 1] [--json]
|
|
55
|
+
yxer prepare <platform> <type>
|
|
56
|
+
yxer schema get <platform> <type>
|
|
57
|
+
yxer upload --file <file_path>
|
|
58
|
+
yxer upload --url <resource_url>
|
|
59
|
+
yxer query categories <account_id> [--type video|article]
|
|
60
|
+
yxer query locations <account_id> [--query 关键词] [--next-page TOKEN]
|
|
61
|
+
yxer query music <account_id> [--query 关键词] [--category-id ID] [--category-name 名称] [--next-page TOKEN]
|
|
62
|
+
yxer query music-categories <account_id>
|
|
63
|
+
yxer query goods <account_id> [--query 关键词] [--next-page TOKEN]
|
|
64
|
+
yxer query collections <account_id> [--type video|article]
|
|
65
|
+
yxer query miniapps <account_id> [--query 关键词]
|
|
66
|
+
yxer query syncapps <account_id>
|
|
67
|
+
yxer query games <account_id> [--query 关键词]
|
|
68
|
+
yxer query hot-events <account_id> [--type video|article]
|
|
69
|
+
yxer query groups <account_id>
|
|
70
|
+
yxer query activities <account_id> [--type video|article] [--category-id ID] [--query 关键词]
|
|
71
|
+
yxer query challenges <account_id> [--query 关键词] [--type video] [--next-page TOKEN]
|
|
72
|
+
yxer validate <platform> <type> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>]
|
|
73
|
+
yxer publish <type> <platform> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>] --dry-run
|
|
74
|
+
yxer publish <type> <platform> <payload.json> [--publish-channel cloud|local] [--client-id <clientId>]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 决策提示
|
|
78
|
+
|
|
79
|
+
- 用户只说“帮我发”时,默认云发布;明确说“本机发布”“客户端发布”时切到本机通道。
|
|
80
|
+
- 用户要“只生成 payload”时,仍要先走 `prepare` / `schema get` 和字段查询纪律。
|
|
81
|
+
- 用户要填分类、位置、音乐、合集、话题、商品时,先查询,再回填完整对象。
|
|
82
|
+
- 用户要挂载小程序或选择同步发布应用时,先执行 `yxer query miniapps` / `yxer query syncapps`,再把 CLI 返回对象完整回填到 payload。
|
|
83
|
+
- 用户要挂载游戏、绑定热点或选择群聊时,先执行 `yxer query games` / `yxer query hot-events` / `yxer query groups`,再把 CLI 返回对象完整回填到 payload。
|
|
84
|
+
- 用户要按音乐分类找配乐或参加平台活动时,先执行 `yxer query music-categories` / `yxer query activities`,再把 CLI 返回对象完整回填到 payload。
|