@takboo/dsh-session-bin 0.2.1 → 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.1`,包名为 `@takboo/dsh-session-bin`。GitHub Release 提供预编译 tarball;npm 通过 trusted publishing 自动发布同一份产物。[dshmarket 收录流程](docs/release.md#dshmarket)独立于 npm 发布,须经目录检查与维护者审核。核心功能的分平台运行证据见[当前兼容性验证](docs/verification/dsh-0.2.1-rc1.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.1`,修复 JSONL 插件入口及 API Session 生命周期的兼容性;详细证据见[兼容性验证](docs/verification/dsh-0.2.1-rc1.md)。使用旧宿主 `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.1`、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.1
43
+ dsh plugin --profile web add @takboo/dsh-session-bin@0.2.4
43
44
  ```
44
45
 
45
- 以上命令使用已安装的 DSH `0.2.1-rc.1`,将完整插件 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.1
50
51
  dsh plugin --profile web remove @takboo/dsh-session-bin
51
52
  ```
52
53
 
53
- 也可下载 [v0.2.1 Release](https://github.com/takboo/dsh-session-bin/releases/tag/v0.2.1) 中的三个附件,核对 `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
 
@@ -7,70 +7,70 @@ export declare const nativeRetirementSdkSources: {
7
7
  };
8
8
  };
9
9
  readonly "dsh-session": {
10
- readonly version: "0.2.1-rc.1";
10
+ readonly version: "0.2.1-rc.2";
11
11
  readonly files: {
12
12
  readonly "lib/index.js": "2f5dd07cb5c744a29abbb8003a8a4cefd9e582c6e2538074ca299a0ddd02a3bf";
13
13
  readonly "lib/types/index.js": "59cced30c7ee65813c62f4858c2fc15c8c636df96507b60c15543468178b72f2";
14
14
  };
15
15
  };
16
16
  readonly "dsh-session-persistence": {
17
- readonly version: "0.2.1-rc.1";
17
+ readonly version: "0.2.1-rc.2";
18
18
  readonly files: {
19
19
  readonly "lib/index.js": "cc0b6d3a224133af611b428d5a49020e300f86c3b4ba28037aeb219029bde3eb";
20
20
  };
21
21
  };
22
22
  readonly "dsh-session-persistence-jsonl": {
23
- readonly version: "0.2.1-rc.1";
23
+ readonly version: "0.2.1-rc.2";
24
24
  readonly files: {
25
25
  readonly "lib/index.js": "973dd78679b2661d6f492343bc22b124ae958aa597d3b36c698a2c650f909984";
26
26
  };
27
27
  };
28
28
  readonly "dsh-session-format-catalog": {
29
- readonly version: "0.2.1-rc.1";
29
+ readonly version: "0.2.1-rc.2";
30
30
  readonly files: {
31
31
  readonly "lib/index.js": "836bbb772ab505c299f1a4a246164c50c7c08b67ab0d17f1251d7ea2cd8c1818";
32
32
  readonly "lib/types/index.js": "c7d797760bf2b9bc654751f2f8cb0b8a6b98998c8d9c1e41323c71a4d5f316f2";
33
33
  };
34
34
  };
35
35
  readonly "dsh-storage-domain": {
36
- readonly version: "0.2.1-rc.1";
36
+ readonly version: "0.2.1-rc.2";
37
37
  readonly files: {
38
38
  readonly "lib/index.js": "a54f7664d2f64fe04a08c7058ca5bff4fc69ed6a0d30c2bc11561b620698ef16";
39
39
  };
40
40
  };
41
41
  readonly "dsh-storage-json": {
42
- readonly version: "0.2.1-rc.1";
42
+ readonly version: "0.2.1-rc.2";
43
43
  readonly files: {
44
44
  readonly "lib/index.js": "0a6b75d5569db3379edd93e863570170e1f4121b6c9fabd856f5b476cffe8df4";
45
45
  };
46
46
  };
47
47
  readonly "dsh-workspace": {
48
- readonly version: "0.2.1-rc.1";
48
+ readonly version: "0.2.1-rc.2";
49
49
  readonly files: {
50
50
  readonly "lib/index.js": "931ca0cb10c5102066c7723690a887f0e6e8e7ab0ffdee1a782686745b0b934f";
51
51
  readonly "lib/types/index.js": "ed69989d8286598fddb3a40030723810a1238968e91ccfec05fc84657bb5ec74";
52
52
  };
53
53
  };
54
54
  readonly "dsh-session-query": {
55
- readonly version: "0.2.1-rc.1";
55
+ readonly version: "0.2.1-rc.2";
56
56
  readonly files: {
57
57
  readonly "lib/index.js": "76ce2944e561c12f48b5e240d68cafe54ce6d667b1d20722e6939ed834489939";
58
58
  };
59
59
  };
60
60
  readonly "dsh-session-query-sqlite": {
61
- readonly version: "0.2.1-rc.1";
61
+ readonly version: "0.2.1-rc.2";
62
62
  readonly files: {
63
63
  readonly "lib/index.js": "dbecf83320e10d93d735b3d01384ab817a0b90102ccecb0a22c013c71dfe70a0";
64
64
  };
65
65
  };
66
66
  readonly "dsh-session-projection-cache": {
67
- readonly version: "0.2.1-rc.1";
67
+ readonly version: "0.2.1-rc.2";
68
68
  readonly files: {
69
69
  readonly "lib/index.js": "faf307dce5db2fb7ff58b4c7d9e544fc7cad5de2f270a89326a8d7bb2bda9c80";
70
70
  };
71
71
  };
72
72
  readonly "dsh-api-session-controller": {
73
- readonly version: "0.2.1-rc.1";
73
+ readonly version: "0.2.1-rc.2";
74
74
  readonly files: {
75
75
  readonly "lib/index.js": "a9801acb577b03053c5d5a3191ff555c5f1d791d0acddec113bea4511e33b386";
76
76
  readonly "lib/types/index.js": "616ced16623b7448afa908ff65093eb6ef2a478d32e5ef9bc22634bfa9f80472";
@@ -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;
@@ -1806,70 +1810,70 @@ var nativeRetirementSdkSources = {
1806
1810
  }
1807
1811
  },
1808
1812
  "dsh-session": {
1809
- "version": "0.2.1-rc.1",
1813
+ "version": "0.2.1-rc.2",
1810
1814
  "files": {
1811
1815
  "lib/index.js": "2f5dd07cb5c744a29abbb8003a8a4cefd9e582c6e2538074ca299a0ddd02a3bf",
1812
1816
  "lib/types/index.js": "59cced30c7ee65813c62f4858c2fc15c8c636df96507b60c15543468178b72f2"
1813
1817
  }
1814
1818
  },
1815
1819
  "dsh-session-persistence": {
1816
- "version": "0.2.1-rc.1",
1820
+ "version": "0.2.1-rc.2",
1817
1821
  "files": {
1818
1822
  "lib/index.js": "cc0b6d3a224133af611b428d5a49020e300f86c3b4ba28037aeb219029bde3eb"
1819
1823
  }
1820
1824
  },
1821
1825
  "dsh-session-persistence-jsonl": {
1822
- "version": "0.2.1-rc.1",
1826
+ "version": "0.2.1-rc.2",
1823
1827
  "files": {
1824
1828
  "lib/index.js": "973dd78679b2661d6f492343bc22b124ae958aa597d3b36c698a2c650f909984"
1825
1829
  }
1826
1830
  },
1827
1831
  "dsh-session-format-catalog": {
1828
- "version": "0.2.1-rc.1",
1832
+ "version": "0.2.1-rc.2",
1829
1833
  "files": {
1830
1834
  "lib/index.js": "836bbb772ab505c299f1a4a246164c50c7c08b67ab0d17f1251d7ea2cd8c1818",
1831
1835
  "lib/types/index.js": "c7d797760bf2b9bc654751f2f8cb0b8a6b98998c8d9c1e41323c71a4d5f316f2"
1832
1836
  }
1833
1837
  },
1834
1838
  "dsh-storage-domain": {
1835
- "version": "0.2.1-rc.1",
1839
+ "version": "0.2.1-rc.2",
1836
1840
  "files": {
1837
1841
  "lib/index.js": "a54f7664d2f64fe04a08c7058ca5bff4fc69ed6a0d30c2bc11561b620698ef16"
1838
1842
  }
1839
1843
  },
1840
1844
  "dsh-storage-json": {
1841
- "version": "0.2.1-rc.1",
1845
+ "version": "0.2.1-rc.2",
1842
1846
  "files": {
1843
1847
  "lib/index.js": "0a6b75d5569db3379edd93e863570170e1f4121b6c9fabd856f5b476cffe8df4"
1844
1848
  }
1845
1849
  },
1846
1850
  "dsh-workspace": {
1847
- "version": "0.2.1-rc.1",
1851
+ "version": "0.2.1-rc.2",
1848
1852
  "files": {
1849
1853
  "lib/index.js": "931ca0cb10c5102066c7723690a887f0e6e8e7ab0ffdee1a782686745b0b934f",
1850
1854
  "lib/types/index.js": "ed69989d8286598fddb3a40030723810a1238968e91ccfec05fc84657bb5ec74"
1851
1855
  }
1852
1856
  },
1853
1857
  "dsh-session-query": {
1854
- "version": "0.2.1-rc.1",
1858
+ "version": "0.2.1-rc.2",
1855
1859
  "files": {
1856
1860
  "lib/index.js": "76ce2944e561c12f48b5e240d68cafe54ce6d667b1d20722e6939ed834489939"
1857
1861
  }
1858
1862
  },
1859
1863
  "dsh-session-query-sqlite": {
1860
- "version": "0.2.1-rc.1",
1864
+ "version": "0.2.1-rc.2",
1861
1865
  "files": {
1862
1866
  "lib/index.js": "dbecf83320e10d93d735b3d01384ab817a0b90102ccecb0a22c013c71dfe70a0"
1863
1867
  }
1864
1868
  },
1865
1869
  "dsh-session-projection-cache": {
1866
- "version": "0.2.1-rc.1",
1870
+ "version": "0.2.1-rc.2",
1867
1871
  "files": {
1868
1872
  "lib/index.js": "faf307dce5db2fb7ff58b4c7d9e544fc7cad5de2f270a89326a8d7bb2bda9c80"
1869
1873
  }
1870
1874
  },
1871
1875
  "dsh-api-session-controller": {
1872
- "version": "0.2.1-rc.1",
1876
+ "version": "0.2.1-rc.2",
1873
1877
  "files": {
1874
1878
  "lib/index.js": "a9801acb577b03053c5d5a3191ff555c5f1d791d0acddec113bea4511e33b386",
1875
1879
  "lib/types/index.js": "616ced16623b7448afa908ff65093eb6ef2a478d32e5ef9bc22634bfa9f80472"
@@ -1881,7 +1885,7 @@ var legacyDurableContractFingerprint = "2618a33decce99fe8ae893245236273d10ac5536
1881
1885
  async function nativeRetirementSdkFingerprint() {
1882
1886
  const root = createRequire(import.meta.url);
1883
1887
  const hostPath = root.resolve("@deepseek-ai/dsh/package.json");
1884
- if (JSON.parse(await readFile(hostPath, "utf8")).version !== "0.2.1-rc.1") return null;
1888
+ if (JSON.parse(await readFile(hostPath, "utf8")).version !== "0.2.1-rc.2") return null;
1885
1889
  const base = createRequire(hostPath);
1886
1890
  for (const [name2, expected] of Object.entries(nativeRetirementSdkSources)) {
1887
1891
  let path;
@@ -1914,7 +1918,7 @@ async function nativeRetirementSdkFingerprint() {
1914
1918
  if (error.code === "MODULE_NOT_FOUND") return null;
1915
1919
  throw error;
1916
1920
  }
1917
- if (JSON.parse(await readFile(path, "utf8")).version !== "0.2.1-rc.1" || createHash3("sha256").update(await readFile(join2(dirname(path), "lib/index.js"))).digest("hex") !== expected) return null;
1921
+ if (JSON.parse(await readFile(path, "utf8")).version !== "0.2.1-rc.2" || createHash3("sha256").update(await readFile(join2(dirname(path), "lib/index.js"))).digest("hex") !== expected) return null;
1918
1922
  }
1919
1923
  return legacyDurableContractFingerprint;
1920
1924
  }
@@ -2425,7 +2429,7 @@ var NativeJsonlFiles = class _NativeJsonlFiles {
2425
2429
  if (typeof internals.root !== "string" || !isAbsolute2(internals.root) || internals.compression !== "none" && internals.compression !== "zstd" || typeof config?.root !== "string" || resolve2(config.root) !== internals.root || (config.compression ?? "zstd") !== internals.compression) return;
2426
2430
  const require2 = createRequire2(import.meta.url);
2427
2431
  const metadata = require2("@deepseek-ai/dsh-session-persistence-jsonl/package.json");
2428
- if (metadata.version !== "0.2.1-rc.1") return;
2432
+ if (metadata.version !== "0.2.1-rc.2") return;
2429
2433
  let root;
2430
2434
  try {
2431
2435
  root = await realpath2(internals.root);
@@ -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,