feishu-codex-console 1.0.0-beta.6 → 1.0.0-beta.8

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/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes are recorded here. Versions follow Semantic Versioning while the public API stabilizes.
4
4
 
5
+ ## 1.0.0-beta.8 - 2026-07-18
6
+
7
+ ### Fixed
8
+
9
+ - The installed CLI now supports the standard `--help`/`-h` and `--version`/`-v` aliases instead of treating them as options with missing values.
10
+
11
+ ## 1.0.0-beta.7 - 2026-07-17
12
+
13
+ ### Changed
14
+
15
+ - npm releases now use GitHub OIDC trusted publishing with job-scoped permissions and no long-lived repository token; prerelease tags create correctly marked GitHub prereleases.
16
+
5
17
  ## 1.0.0-beta.6 - 2026-07-17
6
18
 
7
19
  ### Fixed
@@ -194,13 +194,13 @@ npx feishu-codex-console migrate --from /absolute/path/to/old/feishu-codex-bridg
194
194
 
195
195
  ## 维护者发布
196
196
 
197
- 每次推送 `v<package version>` 标签时,Release workflow 会重新运行类型检查、测试、生产构建和 tarball 干净安装测试,然后使用 npm provenance 发布并创建 GitHub Release。
197
+ 每次推送 `v<package version>` 标签时,Release workflow 会重新运行类型检查、测试、生产构建和 tarball 干净安装测试,然后通过 GitHub OIDC 可信发布生成 npm provenance,并创建 GitHub Release。
198
198
 
199
199
  仓库需要配置:
200
200
 
201
201
  - GitHub Environment:`npm`,建议要求维护者审批。
202
- - Environment secret:`NPM_TOKEN`。
203
- - npm 账号开启双因素认证,并使用适合 CI granular access token。
202
+ - npm 包的 Trusted Publisher:GitHub Actions、仓库 `LeoChaseYoung/feishu-codex-console`、工作流 `release.yml`、Environment `npm`,仅允许 `npm publish`。
203
+ - npm 账号开启双因素认证;仓库和 Environment 不保存长期 `NPM_TOKEN`。
204
204
 
205
205
  标签必须与 `package.json` 完全一致,例如 `1.0.0-beta.4` 对应 `v1.0.0-beta.4`。
206
206
 
@@ -12,7 +12,7 @@
12
12
  - [ ] tarball 能初始化运行手册且绝不覆盖已有目录,并完成一次不带 `--yes` 的只读升级预览。
13
13
  - [ ] `version --json` 与兼容矩阵中的 Codex、lark-cli、配置、状态和 SQLite 版本一致。
14
14
  - [ ] `npm run release:check -- v<version>` 通过。
15
- - [ ] npm 发布使用 provenance,预发布版本进入 `next` dist-tag。
15
+ - [ ] npm 发布通过 GitHub OIDC Trusted Publisher 生成 provenance,仓库和 Environment 中不存在长期 `NPM_TOKEN`,预发布版本进入 `next` dist-tag。
16
16
 
17
17
  这些门禁由 CI 和 Release workflow 执行;任一平台失败都不会进入 npm publish。
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feishu-codex-console",
3
- "version": "1.0.0-beta.6",
3
+ "version": "1.0.0-beta.8",
4
4
  "description": "A reliable Feishu control plane for local Codex projects, sessions, approvals, and live Card 2.0 tasks.",
5
5
  "private": false,
6
6
  "license": "MIT",
package/scripts/cli.mjs CHANGED
@@ -33,7 +33,15 @@ import { initializeRunbookTemplate } from "./runbook-template.mjs";
33
33
 
34
34
  const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
35
35
  const args = process.argv.slice(2);
36
- const command = args[0] && !args[0].startsWith("-") ? args.shift() : "help";
36
+ const commandToken = args[0];
37
+ const shorthandCommand =
38
+ commandToken === "--help" || commandToken === "-h"
39
+ ? "help"
40
+ : commandToken === "--version" || commandToken === "-v"
41
+ ? "version"
42
+ : undefined;
43
+ if (shorthandCommand) args.shift();
44
+ const command = shorthandCommand ?? (args[0] && !args[0].startsWith("-") ? args.shift() : "help");
37
45
  const flags = parseFlags(args);
38
46
 
39
47
  try {
@@ -31,10 +31,20 @@ try {
31
31
  await access(compatibilityCli);
32
32
  run(cli, ["help"], installDir);
33
33
  run(compatibilityCli, ["help"], installDir);
34
+ const helpAlias = run(cli, ["--help"], installDir);
35
+ if (!helpAlias.includes("用法:")) {
36
+ throw new Error("Installed CLI did not expose help through --help.");
37
+ }
38
+ run(compatibilityCli, ["-h"], installDir);
34
39
  const versionInfo = JSON.parse(run(cli, ["version", "--json"], installDir));
35
40
  if (versionInfo.product !== "feishu-codex-console" || !versionInfo.version) {
36
41
  throw new Error("Installed CLI did not expose version and compatibility metadata.");
37
42
  }
43
+ const versionAlias = run(cli, ["--version"], installDir);
44
+ if (!versionAlias.includes(`feishu-codex-console ${versionInfo.version}`)) {
45
+ throw new Error("Installed CLI did not expose its version through --version.");
46
+ }
47
+ run(compatibilityCli, ["-v"], installDir);
38
48
  runExpectFailure(
39
49
  cli,
40
50
  [
@@ -116,7 +126,7 @@ try {
116
126
  if (configMode !== 0o600) throw new Error(`Config mode is ${configMode.toString(8)}, expected 600.`);
117
127
  if (dataMode !== 0o700) throw new Error(`Data mode is ${dataMode.toString(8)}, expected 700.`);
118
128
  }
119
- console.log("Package smoke test passed: packed, installed, resumed, initialized runbooks, and previewed a safe upgrade.");
129
+ console.log("Package smoke test passed: packed, installed, verified CLI aliases, resumed, initialized runbooks, and previewed a safe upgrade.");
120
130
  } finally {
121
131
  await rm(sandbox, { recursive: true, force: true });
122
132
  if (archive) await rm(path.join(packageRoot, archive), { force: true });