@qcplay/cli 1.0.12 → 1.0.13

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 CHANGED
@@ -32,13 +32,13 @@ qcplay-cli article import "https://mp.weixin.qq.com/s/..." article.md
32
32
  qcplay-cli www-article-list.store article.md
33
33
  ```
34
34
 
35
- 保存成功后,CLI 会输出文章 ID、`未上线` 状态和可点击的排版预览地址:
35
+ 保存成功后,CLI 会输出文章 ID、`未上线` 状态和可点击的排版预览地址,并自动在浏览器中打开该页面:
36
36
 
37
37
  ```text
38
38
  https://snail.qingcigame.com/official/news-details.html?id=<文章ID>
39
39
  ```
40
40
 
41
- 检查 PC 和移动端排版无误后再上线。ID 可以省略,此时只使用当前账号最近一次保存的未上线文章:
41
+ 文章内容和排版只由用户在打开的预览页面中检查,CLI AI 不自动抓取、分析或判断预览内容。用户明确确认无误后再上线。ID 可以省略,此时只使用当前账号最近一次保存的未上线文章:
42
42
 
43
43
  ```bash
44
44
  qcplay-cli article update [id]
package/bin/qcplay.js CHANGED
@@ -602,9 +602,11 @@ function openBrowser(targetUrl) {
602
602
  stdio: "ignore"
603
603
  });
604
604
 
605
- child.on("error", reject);
606
- child.unref();
607
- resolve();
605
+ child.once("error", reject);
606
+ child.once("spawn", () => {
607
+ child.unref();
608
+ resolve();
609
+ });
608
610
  });
609
611
  }
610
612
 
@@ -1771,7 +1773,13 @@ async function publishArticleCommand(file, options) {
1771
1773
  console.log(chalk.yellow(`本地未能记录最近文章 ID,后续操作请手动输入 ${articleId}: ${stateWarning}`));
1772
1774
  }
1773
1775
  console.log("");
1774
- console.log("请打开预览地址检查 PC 和移动端排版。确认无误后执行:");
1776
+ try {
1777
+ await openBrowser(previewUrl);
1778
+ console.log(chalk.cyan("已打开文章预览页面,请由用户检查文章内容和排版。"));
1779
+ } catch {
1780
+ console.log(chalk.yellow("自动打开预览页面失败,请手动打开上面的预览地址。"));
1781
+ }
1782
+ console.log("用户确认无误后再执行:");
1775
1783
  console.log("");
1776
1784
  console.log(` qcplay-cli article update ${articleId}`);
1777
1785
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qcplay/cli",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "QCPlay CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,7 +45,7 @@ qcplay article import "https://mp.weixin.qq.com/s/..." article.md
45
45
 
46
46
  该命令只生成本地官网文章草稿,不会提交到官网。确认草稿正文和 Front Matter 后,再执行保存命令。
47
47
 
48
- 保存命令始终以 `status: "0"` 创建未上线文章,并输出文章 ID 和可点击预览地址。必须先让用户检查 PC、移动端排版;只有用户明确确认上线后,才能执行:
48
+ 保存命令始终以 `status: "0"` 创建未上线文章,并输出文章 ID 和可点击预览地址。保存成功后必须打开该预览网页,只让用户本人检查文章内容和排版。AI 不得自动访问、抓取、截图、分析、比较或判断预览内容。只有用户明确确认上线后,才能执行:
49
49
 
50
50
  ```bash
51
51
  qcplay article update [id]
@@ -127,7 +127,7 @@ QCPlay CLI 调用认证后端保存文章
127
127
  ```yaml
128
128
  status: "0"
129
129
  ```
130
- 用户检查预览并明确确认后,使用 `article update [id]` 将状态更新为 `1`。不得通过首次保存直接上线。
130
+ CLI 打开预览网页后,由用户本人检查。AI 不检查预览内容,也不代替用户判断。用户明确确认后,使用 `article update [id]` 将状态更新为 `1`。不得通过首次保存直接上线。
131
131
 
132
132
  8. **不得伪造发布结果**
133
133
  如果接口返回失败,必须原样提示失败原因,不得编造文章 URL 或成功状态。
@@ -348,7 +348,7 @@ qcplay www-article-list.store article.md
348
348
  预览地址: https://snail.qingcigame.com/official/news-details.html?id=123
349
349
  ```
350
350
 
351
- 让用户打开预览地址检查 PC 和移动端排版。用户明确确认上线后执行:
351
+ CLI 必须自动打开预览地址,然后停止流程并让用户本人检查。AI 不读取或分析预览页面,不得自行确认上线。用户明确确认上线后执行:
352
352
 
353
353
  ```bash
354
354
  qcplay article update 123
@@ -1006,8 +1006,11 @@ CLI 必须兼容:
1006
1006
  文章 ID: 123
1007
1007
  文章状态: 未上线
1008
1008
  预览地址: https://snail.qingcigame.com/official/news-details.html?id=123
1009
+ 已打开文章预览页面,请由用户检查文章内容和排版。
1009
1010
  ```
1010
1011
 
1012
+ 输出后必须等待用户明确答复。不能因为接口成功、页面可以打开或 AI 自行检查通过而自动上线。
1013
+
1011
1014
  确认上线成功后输出:
1012
1015
 
1013
1016
  ```txt
@@ -1120,7 +1123,9 @@ release_time 格式错误,请使用 YYYY-MM-DD,例如 2026-07-09
1120
1123
  9. 保存、上线或删除的成功和失败都在当前终端输出;
1121
1124
  10. 不得打印完整 token;
1122
1125
  11. 未得到用户确认,不得执行上线;
1123
- 12. 删除只能更新 `status=2`,不得物理删除数据。
1126
+ 12. 删除只能更新 `status=2`,不得物理删除数据;
1127
+ 13. 保存成功后只负责打开预览网页,由用户本人检查;
1128
+ 14. AI 不得访问、抓取、截图、分析、比较或判断预览内容。
1124
1129
 
1125
1130
  ---
1126
1131
 
@@ -1137,7 +1142,9 @@ release_time 格式错误,请使用 YYYY-MM-DD,例如 2026-07-09
1137
1142
  7. 将 token 写入 article.md;
1138
1143
  8. 未校验正文直接发布;
1139
1144
  9. 将 `is_index2` 和 `type` 暴露给普通用户填写;
1140
- 10. 发布失败时伪造成功结果。
1145
+ 10. 发布失败时伪造成功结果;
1146
+ 11. AI 自动检查预览页面并代替用户决定上线;
1147
+ 12. 未收到用户明确确认就把文章更新为 `status=1`。
1141
1148
 
1142
1149
  ---
1143
1150