wildcrane 0.11.3 → 0.11.5

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
@@ -4,7 +4,9 @@ The CLI for WildCrane. See the draft. Let agents do the rest.
4
4
 
5
5
  See the [project README](https://github.com/ai4kanban/ai4kanban#readme) for the product overview and [documentation](https://wildcrane.ai/docs) for setup and usage.
6
6
 
7
- ## Install
7
+ ## 安装或更新
8
+
9
+ 适用于通过 npm 安装的独立 CLI:
8
10
 
9
11
  ```bash
10
12
  npm install -g wildcrane@latest
package/bin/ai4kanban.mjs CHANGED
@@ -7,10 +7,7 @@
7
7
  // package's built rules, and hand the whole command line to one of the two trees in there —
8
8
  // `akb raw <move>`, or everything else.
9
9
  //
10
- // Why so little lives here: the desktop app carries `bin/` and `dist/` and no node_modules
11
- // beside them (desktop/scripts/bundle-cli.mjs), so this file must have no dependencies. The
12
- // commands, their options and their help are declared in cli/src/lib/cli/, which the build
13
- // bundles — with everything it needs — into the one file this loads.
10
+ // 入口只使用 Node 内置模块;命令及依赖由 cli/src/ 打包到 dist/。
14
11
  //
15
12
  // Node 18+, same behaviour on macOS, Linux and Windows.
16
13
 
@@ -23,23 +20,7 @@ const PKG = JSON.parse(fs.readFileSync(path.join(PKG_DIR, 'package.json'), 'utf8
23
20
  const NAME = PKG.name
24
21
  const VERSION = PKG.version
25
22
 
26
- // How this command was reached, spelled so what it prints can be pasted straight back.
27
- //
28
- // A global install puts it on the PATH as `akb`, and every example everywhere spells it that
29
- // way. It is also run as a path — `node cli/bin/ai4kanban.mjs` in a source checkout, the copy
30
- // inside the desktop app — and printing `akb` to a reader who has none is printing a line
31
- // that ends in `command not found`. Whoever typed it is right here in argv, so ask that
32
- // rather than guessing: only the PATH spellings are `akb`, `.mjs` never is.
33
- //
34
- // Not what's on the PATH, which is a different question with a different answer: `npx` puts
35
- // an `akb` on the PATH of THIS process and nothing else, so the reader would still be given a
36
- // line their own shell can't run. That one is spotted by the cache it runs out of, and
37
- // answered with the same fetch pinned to this version — never `@latest`, which is how a board
38
- // comes to be driven by two versions of its own rules.
39
- //
40
- // AI4KANBAN_COMMAND is how the desktop app's launcher says what it was typed as. That
41
- // launcher is reached as `akb` on the PATH and then runs this file by its path, so argv alone
42
- // would report the copy inside the app — a line no reader can paste.
23
+ // 保留用户调用时的命令名;npx 调用固定版本,Runner 可通过环境变量指定名称。
43
24
  const PROGRAM = (() => {
44
25
  const named = (process.env.AI4KANBAN_COMMAND || '').trim()
45
26
  if (named) return named