@yizhuan-cli/cli 0.1.10 → 0.1.11

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
@@ -7,13 +7,13 @@
7
7
  需要 Node.js 22 或更高版本。
8
8
 
9
9
  ```bash
10
- npm install -g @yizhuan-cli/cli@0.1.10
10
+ npm install -g @yizhuan-cli/cli@0.1.11
11
11
  ```
12
12
 
13
13
  如果发布在私有 npm registry,请加上对应 registry:
14
14
 
15
15
  ```bash
16
- npm install -g @yizhuan-cli/cli@0.1.10 --registry=https://your-private-registry.example
16
+ npm install -g @yizhuan-cli/cli@0.1.11 --registry=https://your-private-registry.example
17
17
  ```
18
18
 
19
19
  ## 配置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yizhuan-cli/cli",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "易撰命令行工具,用于通过 API Key 查询易撰真实数据。",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1,13 +1,25 @@
1
1
  ---
2
2
  name: yizhuan-cli
3
3
  description: |
4
- 通过易撰 CLI(yizhuan 命令)查询易撰真实数据的全量兼容与回退 Skill。当没有更具体的拆分 Skill 时处理作品、作者、热点、雷达、会员、灵感、收藏和检测;若已安装用户明确指定平台对应的 yizhuan-<platform> Skill,必须优先使用对应的拆分平台 Skill,不得与其竞争。业务数据禁止臆造。
4
+ 安装、配置并使用易撰 CLI(yizhuan 命令)查询真实数据的全量 Skill,处理作品、作者、全网搜索、热点、竞品动态、会员、灵感、收藏和一键检测;若已安装用户明确指定平台对应的 yizhuan-<platform> Skill,必须优先使用对应的拆分平台 Skill。业务数据禁止臆造。
5
5
  ---
6
6
 
7
7
  # 易撰 CLI
8
8
 
9
9
  使用本机 `yizhuan` 命令访问易撰数据。所有查询以 CLI JSON 输出为准,不在对话、日志、Skill 文件或临时请求文件中写入 API Key。
10
10
 
11
+ ## 首次安装与配置
12
+
13
+ 用户要求安装或配置本 Skill 时,在一次流程中完成以下操作,不要求用户另行安装其他易撰 Skill:
14
+
15
+ 1. 检查 Node.js 22+ 和 npm。
16
+ 2. 若 `yizhuan` 命令不存在,说明将全局安装最新稳定版 CLI,并取得一次明确授权后执行 `npm install -g @yizhuan-cli/cli@latest`。
17
+ 3. 执行 `yizhuan --version` 和 `yizhuan skill sync --global`。
18
+ 4. 执行 `yizhuan config init`,API Key 必须由用户在本机不回显终端输入,禁止要求用户粘贴到对话中。
19
+ 5. 执行 `yizhuan doctor --global`;通过后即可在同一 Skill 中处理全部业务查询。
20
+
21
+ 除全局 npm 安装授权和 API Key 的安全输入外,Agent 应连续完成安装、同步、配置和诊断,不把流程拆成需要用户逐步确认的多轮操作。
22
+
11
23
  ## 环境检查
12
24
 
13
25
  开始业务查询前运行:
@@ -38,11 +50,13 @@ yizhuan doctor
38
50
  | 竞品动态 | `yizhuan execute --ability radar --mode timeline --timeRange 7d` |
39
51
  | 会员 | `yizhuan execute --ability membership` |
40
52
  | 我的灵感 / 灵感库 / 收藏作品 | `yizhuan execute --ability favorites` |
53
+ | 一键检测 | 将标题和正文写入临时 JSON 文件后执行 `yizhuan execute --ability detection --json-file <file>` |
41
54
 
42
55
  ## 调用规则
43
56
 
44
57
  - 需要真实易撰数据时必须调用 CLI,不直接猜测结果。
45
58
  - 一键检测的原创度检测当前只有百度引擎。展示检测结果时使用 `data.originalScore` 和 `data.originalEngine`;不得把历史兼容字段 `_360`、`sogou`、`zonghe` 展示为检测引擎或额外得分。
59
+ - 一键检测支持 `submit`、`get` 和 `wait` 模式。`wait` 必须按照服务端 `pollAfterSeconds` 轮询;pending、failed、timeout 状态必须如实报告,成功、失败或超时后均清理包含标题和正文的临时 JSON 文件。
46
60
  - PowerShell 使用单引号包裹 JSON。终端可能改写引号时,将不含密钥的请求对象写入文件,再使用 `--json-file`。
47
61
  - `execute --json-file` 是完整参数对象的唯一输入源,不与 `--params`、`--query` 或独立参数混用。
48
62
  - 热点查询使用 `query` 统一协议并明确 `platform`;缺少平台时先澄清,不默认猜测。
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "yizhuan-cli",
4
- "version": "0.1.10",
5
- "compatibleCliVersion": "0.1.10",
6
- "source": "npm:@yizhuan-cli/cli@0.1.10",
4
+ "version": "0.1.11",
5
+ "compatibleCliVersion": "0.1.11",
6
+ "source": "npm:@yizhuan-cli/cli@0.1.11",
7
7
  "digestAlgorithm": "sha256",
8
8
  "files": [
9
9
  {
10
10
  "path": "SKILL.md",
11
- "sha256": "fa478305d464ef41379022ce936ca4a1ccceedfeb77e4c2a249069fdeefd588c"
11
+ "sha256": "a01401451f9931f26f6ed9154f2e9720073c88a3576aa58a98a87fd6eef2c045"
12
12
  }
13
13
  ]
14
14
  }
package/src/doctor.js CHANGED
@@ -53,9 +53,9 @@ export function inspectLocalEnvironment(
53
53
  ? check('pass', 'node', `Node.js ${nodeVersion} 满足 >=${minimumNode}`)
54
54
  : check('fail', 'node', `Node.js ${nodeVersion} 不满足 ${packageJson.engines?.node || '版本要求'}`, `安装 Node.js ${minimumNode || 22} 或更高版本。`))
55
55
 
56
- checks.push(packageJson.version === '0.1.10'
56
+ checks.push(packageJson.version === '0.1.11'
57
57
  ? check('pass', 'cli_version', `CLI ${packageJson.version}`)
58
- : check('fail', 'cli_version', `CLI 版本为 ${packageJson.version},预期 0.1.10`, '安装 @yizhuan-cli/cli@0.1.10。'))
58
+ : check('fail', 'cli_version', `CLI 版本为 ${packageJson.version},预期 0.1.11`, '安装 @yizhuan-cli/cli@0.1.11。'))
59
59
 
60
60
  if (!exists(configPath)) {
61
61
  checks.push(check('fail', 'config', `配置不存在:${configPath}`, '运行 yizhuan config init。'))