@numa-tech/numa 1.12.5 → 1.12.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.
Files changed (2) hide show
  1. package/README.md +41 -26
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -23,23 +23,18 @@
23
23
  npm config set @numa-tech:registry=https://registry.npmjs.org/
24
24
  ```
25
25
 
26
- 公司私有 registry 仍受支持,可通过 `numa config --set registryUrl=<url>` 或 shortcut
27
- `--registry-url <url>` 显式选择。发布人员先使用 `npm run release -- patch --tag=candidate`;脚本锁步更新
28
- 所有 workspace 的版本与内部精确依赖,并按依赖顺序将每个包的同一份 tarball 依次推送到
29
- 公共 npm 和公司私有 registry 的 `candidate` tag,不改动 `latest`。已存在且 integrity/tag 一致的目标会被跳过;部分失败时使用
30
- `npm run release:resume` 从持久化状态补推,不会再次修改版本或重新生成 tarball。
31
- 可用 `NUMA_PUBLIC_NPM_REGISTRY`、`NUMA_PRIVATE_NPM_REGISTRY` 覆盖两个发布目标。旧版配置
32
- 中作为默认值保存的私有 registry 会自动迁移到公共 npm;迁移后显式设置的私有地址会保留。
26
+ 客户端仍可通过 `numa config --set registryUrl=<url>` 或 shortcut 的 `--registry-url <url>`
27
+ 选择兼容的 npm 镜像或代理;这只影响安装与启动。Numa 的正式发布目标固定为
28
+ `https://registry.npmjs.org/`,发布脚本不再向任何私有 registry 上传包。
33
29
 
34
- 发布前需要在用户或 CI 的 `.npmrc` 中分别配置两个 registry 的令牌:
30
+ 发布前需要在用户或 CI 的 `.npmrc` 中配置公共 npm 令牌:
35
31
 
36
32
  ```ini
37
33
  //registry.npmjs.org/:_authToken=${NPM_PUBLIC_TOKEN}
38
- //packages.aliyun.com/60371955c4393f5ed3b7baa8/npm/npm-registry/:_authToken=${NPM_PRIVATE_TOKEN}
39
34
  ```
40
35
 
41
- 脚本会先检查 Git 工作区干净、当前分支与 upstream 完全同步,再于修改版本号之前检查两个
42
- registry 的身份以及公共 npm `@tokensrc`、`@numa-tech` scope 权限。使用验证器 App 的
36
+ 脚本会先检查 Git 工作区干净、当前分支与 upstream 完全同步,再于修改版本号之前检查公共
37
+ npm 身份以及 `@tokensrc`、`@numa-tech` scope 权限。使用验证器 App 的
43
38
  本地交互发布会在公共 npm 推送前隐藏输入 6 位 OTP,并显式传给 `npm publish`;
44
39
  使用带 bypass 2FA 权限的 granular token 时直接回车即可。非交互环境可以临时提供
45
40
  `NUMA_PUBLIC_NPM_OTP`,更推荐使用 bypass 2FA granular token 或 npm trusted publishing。
@@ -53,31 +48,51 @@ npm org ls numa-tech --registry=https://registry.npmjs.org/
53
48
  npm org ls tokensrc --registry=https://registry.npmjs.org/
54
49
  ```
55
50
 
56
- 双仓库发布命令:
51
+ ## 标准发布流程
52
+
53
+ 所有 workspace 包必须锁步发布,并严格执行 `candidate → 验收 → latest`。禁止直接发布到
54
+ `latest`,也不要单独手工发布某一个 workspace 包。
57
55
 
58
56
  ```bash
59
- # 仅预览:1.12.0 -> 1.12.1,默认 candidate,不修改文件、不访问 registry
57
+ # 1. 确认 main 与远端同步,并验证公共 npm 身份
58
+ git switch main
59
+ git pull --ff-only
60
+ npm whoami --registry=https://registry.npmjs.org/
61
+
62
+ # 2. 预览下一个 patch 版本;不修改文件、不访问 npm
60
63
  npm run release -- patch --dry-run
61
64
 
62
- # 候选 patch:全量验证、双发到 candidate,成功后提交、打 tag 并原子推送
65
+ # 3. 发布 candidate;脚本自动检查、构建、打包、发布、提交、打 tag 并原子推送
63
66
  npm run release -- patch --tag=candidate
64
67
 
65
- # 线上验收通过后,显式把同一候选版本晋级为 latest
66
- npm run release:promote -- 1.12.1 --from-tag=candidate
68
+ # 4. 使用 candidate 做安装与功能验收
69
+ npx -y --prefer-online --registry=https://registry.npmjs.org/ @numa-tech/numa@candidate --version
70
+ npx -y --prefer-online --registry=https://registry.npmjs.org/ @numa-tech/numa@candidate codex status --json
67
71
 
68
- # 候选 minor / 指定完整版本(也可显式附加 --tag=next)
69
- npm run release -- minor
70
- npm run release -- 2.0.0
72
+ # 5. 验收通过后,将 X.Y.Z 替换为本次 candidate 的实际版本并晋级 latest
73
+ npm run release:promote -- X.Y.Z --from-tag=candidate
71
74
 
72
- # 某个目标失败后恢复;查询两个 registry 并复用原 tarball/integrity
73
- npm run release:resume
75
+ # 6. 确认三个公共包的 latest 均已更新
76
+ npm dist-tag ls @numa-tech/cli-auth --registry=https://registry.npmjs.org/
77
+ npm dist-tag ls @tokensrc/codex --registry=https://registry.npmjs.org/
78
+ npm dist-tag ls @numa-tech/numa --registry=https://registry.npmjs.org/
74
79
  ```
75
80
 
76
- 候选发布只有在全部包的两个 registry integrity candidate tag 都校验成功后,脚本才会创建
77
- `chore(release): vX.Y.Z` commit、附注 tag,并以一次 atomic push 推送分支和 tag。部分失败
78
- 不会 commit 或打 tag,也不会尝试回滚 npm 的不可变版本。晋级命令会先验证干净且同步的
79
- release commit/tag、两个 registry 的候选 tag 及跨 registry integrity,再幂等更新 `latest`;
80
- 它不修改源码或 Git 历史。
81
+ 候选发布只有在三个公共包的 exact-version integrity `candidate` tag 都校验成功后,脚本才会
82
+ 创建 `chore(release): vX.Y.Z` commit、附注 tag,并以一次 atomic push 推送分支和 tag
83
+ 如果发布中断,运行 `npm run release:resume`;它会复用持久化的原始 tarball 和 integrity,跳过
84
+ 已经成功的包。不要重新执行普通 patch 发布,否则可能开始下一个版本。晋级命令会验证干净且
85
+ 同步的 release commit/tag、公共 npm 上的候选版本与 tag,再使用权威 `npm dist-tag ls` 接口
86
+ 幂等更新并校验 `latest`;它不修改源码或 Git 历史。
87
+
88
+ 发布 minor、major 或指定版本时,仅替换第 2、3 步的版本参数:
89
+
90
+ ```bash
91
+ npm run release -- minor --dry-run
92
+ npm run release -- minor --tag=candidate
93
+ npm run release -- 2.0.0 --dry-run
94
+ npm run release -- 2.0.0 --tag=candidate
95
+ ```
81
96
 
82
97
  macOS / Windows 日常启动 Codex 的推荐方式:
83
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@numa-tech/numa",
3
- "version": "1.12.5",
3
+ "version": "1.12.6",
4
4
  "description": "Cross-platform CLI for the Numa internal developer platform with Keycloak authentication and MCP support.",
5
5
  "author": "numa-tech",
6
6
  "keywords": [
@@ -55,8 +55,8 @@
55
55
  "dependencies": {
56
56
  "@clack/prompts": "^1.7.0",
57
57
  "@modelcontextprotocol/sdk": "^1.29.0",
58
- "@numa-tech/cli-auth": "1.12.5",
59
- "@tokensrc/codex": "1.12.5",
58
+ "@numa-tech/cli-auth": "1.12.6",
59
+ "@tokensrc/codex": "1.12.6",
60
60
  "commander": "^14.0.3",
61
61
  "open": "^10.2.0",
62
62
  "yauzl": "^3.4.0",