@takboo/dsh-session-bin 0.2.2 → 0.2.4

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
@@ -12,7 +12,7 @@
12
12
  - 简洁的删除确认,可在设置中全局关闭;批量操作显示进度和日志,完成后保留简短统计及失败项。中断或断线后可查询结果并明确继续。
13
13
  - 中英文界面,使用宿主控件、浅色和深色主题。
14
14
 
15
- 当前版本为 `0.2.2`,包名为 `@takboo/dsh-session-bin`。GitHub Release 提供预编译 tarball;npm 通过 trusted publishing 自动发布同一份产物。[dshmarket 收录流程](docs/release.md#dshmarket)独立于 npm 发布,须经目录检查与维护者审核。核心功能的分平台运行证据见[当前兼容性验证](docs/verification/dsh-0.2.1-rc2.md)。
15
+ 当前版本为 `0.2.4`,包名为 `@takboo/dsh-session-bin`。GitHub Release 提供预编译 tarball;npm 通过 trusted publishing 自动发布同一份产物。[dshmarket 收录流程](docs/release.md#dshmarket)独立于 npm 发布,须经目录检查与维护者审核。核心功能的分平台运行证据见[当前桌面兼容性验证](docs/verification/desktop-runtime.md)。
16
16
 
17
17
  ## 界面预览
18
18
 
@@ -22,27 +22,28 @@
22
22
 
23
23
  ## 兼容性
24
24
 
25
- 本版适配 DSH `0.2.1-rc.2`,已核对本插件使用的接口及存储实现,并更新精确版本准入;详细证据见[兼容性验证](docs/verification/dsh-0.2.1-rc2.md)。使用 DSH `0.2.1-rc.1` 时请保留插件 `0.2.1`;旧宿主 `0.2.0-rc.2` 对应插件 `0.2.0`。
25
+ 本版适配 DSH `0.2.1-rc.2`,修复 macOS ARM64 桌面版内置运行时被拒绝永久删除的问题,见[桌面兼容性验证](docs/verification/desktop-runtime.md)。此前 CLI/Web 的 SDK 适配证据见[rc.2 验证](docs/verification/dsh-0.2.1-rc2.md)。使用 DSH `0.2.1-rc.1` 时请保留插件 `0.2.1`;旧宿主 `0.2.0-rc.2` 对应插件 `0.2.0`。
26
26
 
27
- 永久删除绑定 DSH `0.2.1-rc.2`、Node `24.18.1` / libuv `1.52.1`,使用单 Host 和已验证的 JSONL raw/zstd 存储组合。
27
+ 永久删除仅对以下精确运行时及环境启用,使用单 Host 和已验证的 JSONL raw/zstd 存储组合:
28
28
 
29
- | 已验收环境 | CPU 架构 | 文件系统 |
30
- | --- | --- | --- |
31
- | Windows Server 2025 | x64 | NTFS |
32
- | macOS 15 | Apple Silicon ARM64、Intel x64 | APFS |
33
- | Ubuntu 24.04 | ARM64、x64 | ext2/ext3/ext4 family(type `0xef53`) |
29
+ | 宿主运行时 | 已验收环境 | CPU 架构 | 文件系统 |
30
+ | --- | --- | --- | --- |
31
+ | 独立 Node `24.18.1` / libuv `1.52.1` | Windows Server 2025 | x64 | NTFS |
32
+ | 独立 Node `24.18.1` / libuv `1.52.1` | macOS 15 | Apple Silicon ARM64、Intel x64 | APFS |
33
+ | 独立 Node `24.18.1` / libuv `1.52.1` | Ubuntu 24.04 | ARM64、x64 | ext2/ext3/ext4 family(type `0xef53`) |
34
+ | Electron `44.7.0` / Node `24.21.0` / libuv `1.52.1` | macOS 15 桌面运行时 | Apple Silicon ARM64 | APFS |
34
35
 
35
- 表格记录实际验收环境,不代表所有 Windows、macOS 或 Linux 版本均已验证。Windows ARM64、其他运行时及未验证的存储组合不在支持范围内。永久删除还会检查宿主源码、资源身份和当前状态;不满足条件时明确拒绝。完整准入与限制见 [Host 生命周期](docs/host-lifecycle.md)。
36
+ 表格记录实际验收环境,不代表所有 Windows、macOS 或 Linux 版本均已验证。Windows ARM64、其他桌面架构/版本、普通 Node `24.21.0` 及未验证的存储组合不在永久删除支持范围内。永久删除还会检查宿主源码、资源身份和当前状态;不满足条件时明确拒绝。完整准入与限制见 [Host 生命周期](docs/host-lifecycle.md)。
36
37
 
37
38
  ## 安装
38
39
 
39
40
  从 npm 安装已发布的预编译包:
40
41
 
41
42
  ```sh
42
- dsh plugin --profile web add @takboo/dsh-session-bin@0.2.2
43
+ dsh plugin --profile web add @takboo/dsh-session-bin@0.2.4
43
44
  ```
44
45
 
45
- 以上命令使用已安装的 DSH `0.2.1-rc.2`,将完整插件 bundle 安装到 `web` profile。桌面版请在其对应 profile 的插件管理页面安装同一个 npm 包。启动或重新启动该 profile 后,从侧栏打开“会话回收站”(Session Bin)。发布包包含预编译 Host 和 Client,使用者安装时无需编译 TypeScript;其 tarball 已通过真实 CLI/GUI 验证。
46
+ 以上命令使用已安装的 DSH `0.2.1-rc.2`,将完整插件 bundle 安装到 `web` profile。已验证的 macOS ARM64 桌面版请在 `desktop` profile 的插件管理页面安装同一个 npm 包,并重新启动该 profile 的宿主。启动或重新启动该 profile 后,从侧栏打开“会话回收站”(Session Bin)。发布包包含预编译 Host 和 Client,使用者安装时无需编译 TypeScript;其 tarball 已通过真实 CLI/GUI 验证。
46
47
 
47
48
  卸载同一 profile 中的插件:
48
49
 
@@ -50,7 +51,7 @@ dsh plugin --profile web add @takboo/dsh-session-bin@0.2.2
50
51
  dsh plugin --profile web remove @takboo/dsh-session-bin
51
52
  ```
52
53
 
53
- 也可下载 [v0.2.2 Release](https://github.com/takboo/dsh-session-bin/releases/tag/v0.2.2) 中的三个附件,核对 `SHA256SUMS` 后运行 `dsh plugin --profile web add ./dsh-session-bin.tgz`。自行构建时,先完成下方[开发入门](#开发入门),再运行 `mise exec -- pnpm exec npm pack --ignore-scripts`。
54
+ 也可下载 [v0.2.4 Release](https://github.com/takboo/dsh-session-bin/releases/tag/v0.2.4) 中的三个附件,核对 `SHA256SUMS` 后运行 `dsh plugin --profile web add ./dsh-session-bin.tgz`。自行构建时,先完成下方[开发入门](#开发入门),再运行 `mise exec -- pnpm exec npm pack --ignore-scripts`。
54
55
 
55
56
  如安装过早期未加 scope 的开发包,先从同一 profile 卸载 `dsh-session-bin`,再安装 scoped 包,避免重复注册;原生归档和已有操作记录保留。分发契约见[发布文档](docs/release.md)。
56
57
 
@@ -93,6 +94,8 @@ mise run verify
93
94
  | `mise run build` | 生成预编译产物和类型声明 |
94
95
  | `mise run verify` | 完整本地行为与打包验证 |
95
96
  | `mise run verify:gui` | 隔离 Web profile 中的双语 CLI/GUI 验证 |
97
+ | `mise run verify:desktop` | 已安装桌面 Electron 与真实 ASAR Host 的隔离完整回归 |
98
+ | `mise run verify:desktop:gui` | 在已安装桌面 Electron 上运行隔离 Web 双语 CLI/GUI |
96
99
  | `mise run verify:platform` | 记录实际操作系统的候选组合验收证据 |
97
100
  | `mise run verify:linux` | 在固定 Node 的 Linux 容器内验证,需要 Docker |
98
101
 
@@ -1,8 +1,10 @@
1
1
  import type { FileHandle } from 'node:fs/promises';
2
2
  export type NativePlatform = 'darwin' | 'linux' | 'win32';
3
3
  export declare function nativePlatformCandidate(platform?: NodeJS.Platform, arch?: NodeJS.Architecture): boolean;
4
+ /** Audited runtime carriers; production OS qualification remains independent. */
5
+ export declare function nativeRuntimeCandidate(node?: string, uv?: string, electron?: string | undefined): boolean;
4
6
  /** Actual erasure evidence is promoted separately from an implemented Adapter. */
5
- export declare function nativePlatformVerified(platform?: NodeJS.Platform, arch?: NodeJS.Architecture, node?: string, uv?: string): boolean;
7
+ export declare function nativePlatformVerified(platform?: NodeJS.Platform, arch?: NodeJS.Architecture, node?: string, uv?: string, electron?: string | undefined): boolean;
6
8
  /** Session namespace matches the audited JSONL writer; plugin ownership is independent. */
7
9
  export declare function windowsSemaphoreName(path: string, purpose: 'session' | 'plugin'): string;
8
10
  /** Same-volume rename whose metadata acknowledgement is written through. */
package/dist/index.js CHANGED
@@ -19,8 +19,12 @@ import { resolve, toNamespacedPath } from "node:path";
19
19
  function nativePlatformCandidate(platform = process.platform, arch = process.arch) {
20
20
  return ["darwin", "linux", "win32"].includes(platform) && ["arm64", "x64"].includes(arch);
21
21
  }
22
- function nativePlatformVerified(platform = process.platform, arch = process.arch, node = process.versions.node, uv = process.versions.uv) {
23
- if (node !== "24.18.1" || uv !== "1.52.1") return false;
22
+ function nativeRuntimeCandidate(node = process.versions.node, uv = process.versions.uv, electron = process.versions.electron) {
23
+ return uv === "1.52.1" && (node === "24.18.1" && !electron || node === "24.21.0" && electron === "44.7.0");
24
+ }
25
+ function nativePlatformVerified(platform = process.platform, arch = process.arch, node = process.versions.node, uv = process.versions.uv, electron = process.versions.electron) {
26
+ if (node === "24.21.0" && uv === "1.52.1" && electron === "44.7.0") return platform === "darwin" && arch === "arm64";
27
+ if (node !== "24.18.1" || uv !== "1.52.1" || electron) return false;
24
28
  return (/* @__PURE__ */ new Set(["darwin/arm64", "darwin/x64", "linux/arm64", "linux/x64", "win32/x64"])).has(`${platform}/${arch}`);
25
29
  }
26
30
  var windowsKernel;
@@ -4176,7 +4180,7 @@ var NativeRetirementOwner = class _NativeRetirementOwner {
4176
4180
  observationsClosed = false;
4177
4181
  closing;
4178
4182
  static async open(ctx, options = {}) {
4179
- if (process.versions.node !== "24.18.1" || process.versions.uv !== "1.52.1" || !nativePlatformCandidate()) return;
4183
+ if (!nativeRuntimeCandidate() || !nativePlatformCandidate()) return;
4180
4184
  if (!nativePlatformVerified() && !options.platformQualification?.({
4181
4185
  platform: process.platform,
4182
4186
  arch: process.arch,
@@ -5054,6 +5058,7 @@ export {
5054
5058
  nativePlatformVerified,
5055
5059
  nativeRetirementDomainSpec,
5056
5060
  nativeRetirementOwnerDomainSpec,
5061
+ nativeRuntimeCandidate,
5057
5062
  nativeServiceInstance,
5058
5063
  openRegularFile,
5059
5064
  preparePurgeRequestSchema,