@dptech-corp/bohr-cli 2.6.95 → 2.6.97

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
@@ -22,6 +22,39 @@
22
22
 
23
23
  ## [Unreleased]
24
24
 
25
+ ## [2.6.97] - 2026-09-12
26
+
27
+ ### Fixed
28
+
29
+ - **`bohr doctor` 的 `connectivity` 改查网关健康接口**:此前打的是一条不存在的路由,任何 HTTP 应答都算连通;现在认出是 Bohrium 网关才报 pass。
30
+ - **`bohr doctor` 的 `extension_health` 与 `bohr extension list` 一致**:此前漏报 trisol/wenyon;缺二进制记 `warn`。
31
+ - **遮蔽补救改名为 `.legacy` 后缀**:原先的 `bohr-legacy` 会被当成扩展(PATH 上 `bohr-*` 都算)。已按旧写法改过的,再改一次即可。
32
+
33
+ ## [2.6.96] - 2026-09-12
34
+
35
+ ### Breaking
36
+
37
+ - **`bohr sandbox doctor` 没就绪时改为退出 0**:原先退出 1,与命令失败同码。结论改读 `data.ready`;`&&` 短路的脚本要改判它。
38
+
39
+ ### Added
40
+
41
+ - **`bohr doctor` 新增 `path_integrity` 检查**:独立安装遮住 npm 那一份时记 `warn`,点名两个路径并给出改法;`--offline` 下也跑。
42
+
43
+ ### Fixed
44
+
45
+ - **`bohr doctor` 不再把 AccessKey 拼进 URL**:此前两项检查把它放进查询串,会进网关与代理日志,断网时还会打在输出里。现在走请求头。
46
+ - **`bohr doctor` 的 `cli_version` 真去查最新版了**:此前恒报 pass。落后时给出升级命令;落后或查不到记 `warn`,不影响 `data.healthy`。
47
+ - **`bohr update` 更新独立安装时,会点名 npm 管着的那一份**:此前它原地更新完就返回成功,版本号对了、遮蔽还在,调用方从此没有理由再敲 `npm install -g`——而那是唯一会提醒遮蔽的地方。现在 stderr 给出两个路径与 `mv` 改法,`-o json` 的 `data.other_install` 给出同一件事。问不出 npm 根目录、或 npm 没装本包时保持沉默。
48
+ - **`~/.vouch/state.json` 记全凭据覆盖的受众**:token 本就替 wenyon 与 trisol 签发,此前只写 wenyon。重新登录即更新,不改变 trisol 连通性。
49
+
50
+ ### Changed(内部,无用户面行为变化)
51
+
52
+ - 删掉 `scripts/install.sh` / `install.ps1` 两个独立安装脚本。它们从未随 npm 包分发,自身文档教的分发 URL 已失效(405 / 404),安装路径仍然只有 `npm install -g @dptech-corp/bohr-cli`。过去跑过它的机器上 `~/.bohr/bin/bohr` 的残留不受影响,处理方法见 README 的「升级后 `bohr version` 显示的还是旧版本号」一节。
53
+
54
+ ### Changed
55
+
56
+ - **同名命令在本组更深处也指得出来**:`bohr notebook restart` 补一句 `"bohr notebook server restart" exists`;原先只有顶层或全树唯一才说。
57
+
25
58
  ## [2.6.95] - 2026-09-11
26
59
 
27
60
  ### Breaking
package/README.md CHANGED
@@ -108,7 +108,7 @@ npm install -g @dptech-corp/bohr-cli@latest --registry https://registry.npmjs.or
108
108
  | 来源 | 留下的可执行文件 | 写进 PATH 的位置 |
109
109
  |-|-|-|
110
110
  | 早期版本 | `~/.bohrium/bohr` | rc 文件里的 `~/.bohrium` |
111
- | `scripts/install.sh` | `~/.bohr/bin/bohr` | rc 文件里的 `export PATH="$HOME/.bohr/bin:$PATH"` |
111
+ | 独立安装脚本(已移除) | `~/.bohr/bin/bohr` | rc 文件里的 `export PATH="$HOME/.bohr/bin:$PATH"` |
112
112
 
113
113
  手动确认与处理如下。
114
114
 
@@ -129,7 +129,7 @@ npm install -g @dptech-corp/bohr-cli@latest --registry https://registry.npmjs.or
129
129
  3. 把第 1 步里 `command -v bohr` 报出来的**那个文件**改名——不是照抄下面的路径,是改你自己那一个:
130
130
 
131
131
  ```bash
132
- mv "$(command -v bohr)" "$(command -v bohr)-legacy"
132
+ mv "$(command -v bohr)" "$(command -v bohr).legacy"
133
133
  ```
134
134
 
135
135
  如果它在 `~/.bohrium` 里,**不要删掉 `~/.bohrium` 整个目录**——登录凭据还存在那里,新版是从它迁移过来的。`~/.bohr/bin` 里没有凭据,只有那个可执行文件。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dptech-corp/bohr-cli",
3
- "version": "2.6.95",
3
+ "version": "2.6.97",
4
4
  "description": "CLI tool for Bohrium scientific computing platform",
5
5
  "bin": {
6
6
  "bohr": "run.js"
@@ -32,11 +32,11 @@
32
32
  "CHANGELOG.md"
33
33
  ],
34
34
  "optionalDependencies": {
35
- "@dptech-corp/bohr-cli-darwin-arm64": "2.6.95",
36
- "@dptech-corp/bohr-cli-darwin-amd64": "2.6.95",
37
- "@dptech-corp/bohr-cli-linux-amd64": "2.6.95",
38
- "@dptech-corp/bohr-cli-linux-arm64": "2.6.95",
39
- "@dptech-corp/bohr-cli-windows-amd64": "2.6.95",
40
- "@dptech-corp/bohr-cli-windows-arm64": "2.6.95"
35
+ "@dptech-corp/bohr-cli-darwin-arm64": "2.6.97",
36
+ "@dptech-corp/bohr-cli-darwin-amd64": "2.6.97",
37
+ "@dptech-corp/bohr-cli-linux-amd64": "2.6.97",
38
+ "@dptech-corp/bohr-cli-linux-arm64": "2.6.97",
39
+ "@dptech-corp/bohr-cli-windows-amd64": "2.6.97",
40
+ "@dptech-corp/bohr-cli-windows-arm64": "2.6.97"
41
41
  }
42
42
  }
package/postinstall.js CHANGED
@@ -596,7 +596,7 @@ function detectShadowedBohr(opts) {
596
596
  // 遮蔽源已知有两个,都是本仓自己造出来的:
597
597
  //
598
598
  // ~/.bohrium/bohr 早期版本的安装位置(登记行 recvqLGpdH3RXI 实测两台机器)
599
- // ~/.bohr/bin/bohr scripts/install.sh 装的位置,它还往 rc 文件写
599
+ // ~/.bohr/bin/bohr 早先的独立安装脚本装的位置(scripts/install.sh,已移除),它还往 rc 文件写
600
600
  // `export PATH="$HOME/.bohr/bin:$PATH"`——前置,所以必赢
601
601
  //
602
602
  // 所以补救命令**必须从实际挡路的那个路径生成**,不能写死其中一个。写死 ~/.bohrium 的
@@ -605,13 +605,17 @@ function detectShadowedBohr(opts) {
605
605
  //
606
606
  // 要改名的是 **PATH 上那一个**(found),不是它指向的目标(foundReal):found 是符号
607
607
  // 链接时,改名目标会留下一条断链,而 PATH 解析仍然命中那个链接名。
608
+ //
609
+ // 改名后缀是 `.legacy`:改完名的文件还在 PATH 上,而 bohr 把 PATH 上叫 bohr-* 的可执行
610
+ // 文件都当成扩展,原先的 bohr-legacy 就成了一个叫 legacy 的扩展(来龙去脉见 Go 那边
611
+ // HandBackSteps 的注释)。
608
612
  function shadowRemedyLines(detected, homeDir) {
609
613
  const home = homeDir || os.homedir();
610
614
  const legacyRoot = path.join(home, ".bohrium");
611
615
  const underLegacyRoot = (p) =>
612
616
  typeof p === "string" && (p === legacyRoot || p.startsWith(legacyRoot + path.sep));
613
617
 
614
- const lines = [`[postinstall] mv ${detected.found} ${detected.found}-legacy`];
618
+ const lines = [`[postinstall] mv ${detected.found} ${detected.found}.legacy`];
615
619
  // 「别删 ~/.bohrium」这句只在真的动到 ~/.bohrium 时才说。凭据在那儿,别处没有;
616
620
  // 对着一个 ~/.bohr/bin 的遮蔽讲 ~/.bohrium 的凭据,只会让人以为自己找错了东西。
617
621
  if (underLegacyRoot(detected.found) || underLegacyRoot(detected.foundReal)) {
@@ -623,6 +627,15 @@ function shadowRemedyLines(detected, homeDir) {
623
627
  return ["[postinstall] 2. rename the shadowing executable:"].concat(lines);
624
628
  }
625
629
 
630
+ // 同一个补救办法在本仓有三处话术,改名那一步由测试以 README 为准对账(这里由
631
+ // postinstall.test.js、Go 那边由 internal/update 的 handback_test.go):
632
+ //
633
+ // internal/update/update.go 的 HandBackSteps —— `bohr update` 与 `bohr doctor` 共用的 Go 版本
634
+ // npm/README.md「升级后 bohr version 显示的还是旧版本号」—— 给人读的五步版
635
+ //
636
+ // 下面第 3 步那段解释不是装饰:README 里逐字写着「这一步不能省」。改完名不刷新缓存,
637
+ // 下一条 `bohr` 会报 No such file or directory 指着刚改名的那个文件,人会以为自己把
638
+ // 环境弄坏了。Go 那一处的第一版就把这段丢了,2026-09-12 补回。
626
639
  function formatShadowWarning(detected, homeDir) {
627
640
  if (!detected) return null;
628
641
  const lines = [