@deepseek-ai/dsh-experimental-webworker-runtime 0.2.0-rc.1 → 0.2.1-alpha.1

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.i18n.yaml CHANGED
@@ -15,8 +15,8 @@
15
15
  en: 4e53164159b5ce41
16
16
  zh: 89582dc0294d0776
17
17
  /deepseek-ai-dsh-experimental-webworker-runtime/use-this-package:
18
- en: 7c80a0d046f93fb1
19
- zh: a9fdcc7a9f9a8828
18
+ en: 6dd3d8495bc6ee61
19
+ zh: 71f7da310233a37b
20
20
  /deepseek-ai-dsh-experimental-webworker-runtime/model-experience:
21
21
  en: 61fce9b4c7dc96e6
22
22
  zh: dc2d931063a38327
@@ -24,8 +24,8 @@
24
24
  en: ca75c51c89c2c9b0
25
25
  zh: 64715dc7e6d02f71
26
26
  /deepseek-ai-dsh-experimental-webworker-runtime/known-limitations-and-deferred-work:
27
- en: 6fe586817a42fdad
28
- zh: c19ab678d61e82d3
27
+ en: dd2469d07c86127a
28
+ zh: efa1be38e57bdd1e
29
29
  /deepseek-ai-dsh-experimental-webworker-runtime/known-limitations-and-deferred-work/dev-note:
30
- en: f14ab6f2449c3c53
31
- zh: e3f7d3a3d772c0b7
30
+ en: e67f633dc6fe7773
31
+ zh: e88aeb617ffb74ea
package/README.md CHANGED
@@ -34,7 +34,7 @@ Three build artifacts and one source-owned process layer:
34
34
 
35
35
  Acceptance lives in `apps/web/tests/preview-boot.e2e.ts`, which serves the real built pages and drives the pre-boot chooser plus Worker activation in headless Chromium. The empty selection exercises first-run startup. The `vfs-example` overlay supplies ordinary workspace files and plaintext persistence artifacts for cold Workspace/Session discovery, tool presentation, subagent navigation, and history paging without a model request. The [packer](../webworker-packer/README.md) prepares current-generation successors from committed historical logs in Node; those source logs remain byte-identical in the overlay. The fixture generator owns the acceptance test's current projection cache. The chooser reserves WebFS as a separate user-authorized source; that provider does not read the built-in fixture.
36
36
 
37
- The [built-bundle import sweep](tests/compile/transform-corpus-check.ts) checks bare Node imports after the library build. Its Dockkit exception accepts Node’s unknown-`.css`-extension refusal for any stylesheet rather than one pinned path; another extension, error code, or message, and an unexpectedly successful exempt import, remain errors. See the [stylesheet exemption decision](../../../.agents/notes/implemented/bug-fix/2026-09-10-built-bundle-css-exemption.md).
37
+ The [built-bundle import sweep](tests/compile/transform-corpus-check.ts) checks bare Node imports after the library build. Its Dockkit exception accepts Node’s unknown-`.css`-extension refusal for any stylesheet rather than one pinned path; another extension, error code, or message, and an unexpectedly successful exempt import, remain errors.
38
38
 
39
39
  -----
40
40
 
@@ -53,6 +53,7 @@ None; this package neither assembles nor sends a provider request.
53
53
 
54
54
  - **The worker composition writes plaintext session logs** (`compression: 'none'` boot patch): it carries no Zstandard codec, so exported logs are `.jsonl`, never `.jsonl.zstd`.
55
55
  - **`node:dns/promises`, `node:vm`, `node:net`, `node:sqlite`, `node:worker_threads` are structural stubs**: every call reports its refusal on the console and throws. Rows needing native DNS, a real process, or realm isolation cannot run here.
56
+ - **`node:assert/strict` supports truthiness assertions only**: for falsy values, the callable default and `ok` throw `ERR_ASSERTION` with the supplied message or generic text, or rethrow a supplied Error unchanged. Other assertion APIs are absent.
56
57
  - **Desktop product telemetry is unavailable**: `got.post` reports an explicit worker-host refusal. Got and its Node HTTP dependencies are excluded from the browser image; Desktop reporting remains disabled in the preview composition.
57
58
  - **Host package commands are unavailable**: `execa` reports an explicit worker-host refusal; the preview cannot run pnpm, install plugins, or install native dependencies.
58
59
  - **PTC Node programs are unavailable**: the process shim exposes `/dsh/bin/node` as its executable identity so the provider can activate, but the Worker has neither a Node executable nor `stripTypeScriptTypes`. Program execution fails before launching a child.
@@ -74,5 +75,3 @@ None; this package neither assembles nor sends a provider request.
74
75
  None.
75
76
 
76
77
  </details>
77
-
78
- **Runtime invariant:** No companion is published. This package is pre-Cordis platform glue — the tree it boots runs the product packages' own invariants, and the assembly's contracts (image contract gate, tunnel refusals) fail loud at boot rather than drifting at run time.
package/README.zh.md CHANGED
@@ -34,7 +34,7 @@ kind: "package-library"
34
34
 
35
35
  验收在 `apps/web/tests/preview-boot.e2e.ts`:静态服务真实构建页面,在 headless Chromium 里驱动 pre-boot 选择面板与 Worker 激活。空白选择验证首次启动;`vfs-example` overlay 提供普通 workspace 文件与明文 persistence 产物,无需模型请求即可验证 Workspace/Session 冷发现、工具呈现、subagent 导航和历史分页。[打包器](../webworker-packer/README.zh.md)在 Node 中根据已提交的历史日志准备当前代后继文件;这些源日志在 overlay 中逐字节保持不变。fixture 生成器负责验收测试的当前投影缓存。选择面板为 WebFS 保留独立的用户授权来源;该 provider 不读取内置 fixture。
36
36
 
37
- [已构建 bundle 导入检查](tests/compile/transform-corpus-check.ts)在库构建后检查裸 Node 导入。Dockkit 例外接受 Node 针对任意样式表报告的未知 `.css` 扩展名错误,而不限定某一固定路径;其他扩展名、错误码或消息,以及意外成功的豁免导入,仍然报错。参见 [样式表豁免决策](../../../.agents/notes/implemented/bug-fix/2026-09-10-built-bundle-css-exemption.zh.md)。
37
+ [已构建 bundle 导入检查](tests/compile/transform-corpus-check.ts)在库构建后检查裸 Node 导入。Dockkit 例外接受 Node 针对任意样式表报告的未知 `.css` 扩展名错误,而不限定某一固定路径;其他扩展名、错误码或消息,以及意外成功的豁免导入,仍然报错。
38
38
 
39
39
  -----
40
40
 
@@ -53,6 +53,7 @@ kind: "package-library"
53
53
 
54
54
  - **worker 组合写明文会话日志**(`compression: 'none'` boot patch):不带 Zstandard 编解码器,导出日志是 `.jsonl`,不会是 `.jsonl.zstd`。
55
55
  - **`node:dns/promises`、`node:vm`、`node:net`、`node:sqlite`、`node:worker_threads` 是结构化 stub**:每次调用在 console 报告拒绝并抛出。需要原生 DNS、真进程或真 realm 隔离的行在此无法运行。
56
+ - **`node:assert/strict` 仅支持真值断言**:对于假值,可调用的默认导出和 `ok` 使用传入的消息或通用文本抛出 `ERR_ASSERTION`,或原样抛出传入的 Error。其他断言 API 未提供。
56
57
  - **桌面产品埋点不可用**:`got.post` 明确报告 worker host 不支持该调用。浏览器镜像不包含 Got 及其 Node HTTP 依赖;预览组合不启用桌面上报。
57
58
  - **宿主包管理命令不可用**:`execa` 明确报告 worker host 不支持该调用;预览无法运行 pnpm、安装插件或安装原生依赖。
58
59
  - **PTC Node 程序不可用**:process shim 用 `/dsh/bin/node` 表示可执行文件身份,使 provider 能够激活,但 Worker 既没有 Node 可执行文件,也没有 `stripTypeScriptTypes`。程序执行会在启动子进程前失败。
@@ -74,5 +75,3 @@ kind: "package-library"
74
75
  无。
75
76
 
76
77
  </details>
77
-
78
- **运行时不变式:** 不发布伴生入口。这是 Cordis 启动前的平台 glue;其启动的产品树运行各包自己的不变式,image 与 tunnel 约定在 boot 时失败。
package/lib/index.js CHANGED
@@ -721,6 +721,8 @@ const MODULE_PROXIES = {
721
721
  "node:buffer": "./node/builtin_modules/implemented/buffer.ts",
722
722
  "node:http": "./node/builtin_modules/implemented/http.ts",
723
723
  "node:async_hooks": "./node/builtin_modules/implemented/async_hooks.ts",
724
+ "node:assert/strict": "./node/builtin_modules/implemented/assert/strict.ts",
725
+ "assert/strict": "./node/builtin_modules/implemented/assert/strict.ts",
724
726
  "node:util": "./node/builtin_modules/implemented/util.ts",
725
727
  "node:util/types": "./node/builtin_modules/implemented/util/types.ts",
726
728
  "node:events": "./node/builtin_modules/implemented/events.ts",
@@ -0,0 +1,16 @@
1
+ /** Truthiness assertions for Worker modules importing `node:assert/strict`. */
2
+ /**
3
+ * Require a truthy value; falsy values throw `ERR_ASSERTION` or the supplied Error.
4
+ * @param value - Value to test.
5
+ * @param message - Failure message or Error to throw unchanged; omitted messages use generic text.
6
+ * @returns Nothing; successful completion narrows the value to a truthy value.
7
+ */
8
+ export declare function ok(value: unknown, message?: string | Error): asserts value;
9
+ /** CommonJS interop marker for lowered ESM default imports. */
10
+ export declare const __esModule = true;
11
+ /** Callable truthiness assertion with the identical `ok` method; other assertion APIs are absent. */
12
+ declare const assert: typeof ok & {
13
+ ok: typeof ok;
14
+ };
15
+ export default assert;
16
+ //# sourceMappingURL=strict.d.ts.map
package/lib/worker.js CHANGED
@@ -4797,6 +4797,34 @@ function installAsyncContextHooks() {
4797
4797
  });
4798
4798
  }
4799
4799
  //#endregion
4800
+ //#region src/node/builtin_modules/implemented/assert/strict.ts
4801
+ var strict_exports = /* @__PURE__ */ __exportAll({
4802
+ __esModule: () => true,
4803
+ default: () => assert,
4804
+ ok: () => ok
4805
+ });
4806
+ /** Truthiness assertions for Worker modules importing `node:assert/strict`. */
4807
+ /**
4808
+ * Require a truthy value; falsy values throw `ERR_ASSERTION` or the supplied Error.
4809
+ * @param value - Value to test.
4810
+ * @param message - Failure message or Error to throw unchanged; omitted messages use generic text.
4811
+ * @returns Nothing; successful completion narrows the value to a truthy value.
4812
+ */
4813
+ function ok(value, message) {
4814
+ if (value) return;
4815
+ if (message instanceof Error) throw message;
4816
+ throw Object.assign(new Error(message ?? "The expression evaluated to a falsy value."), {
4817
+ name: "AssertionError",
4818
+ code: "ERR_ASSERTION",
4819
+ actual: value,
4820
+ expected: true,
4821
+ operator: "==",
4822
+ generatedMessage: message === void 0
4823
+ });
4824
+ }
4825
+ /** Callable truthiness assertion with the identical `ok` method; other assertion APIs are absent. */
4826
+ const assert = Object.assign(ok, { ok });
4827
+ //#endregion
4800
4828
  //#region ../../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/_u64.js
4801
4829
  const U32_MASK64 = /* @__PURE__ */ (() => BigInt(2 ** 32 - 1))();
4802
4830
  const _32n = /* @__PURE__ */ BigInt(32);
@@ -12981,6 +13009,7 @@ function createRequire(base) {
12981
13009
  /** Builtin specifiers the module proxy table answers (without the `node:` prefix). */
12982
13010
  const builtinModules = [
12983
13011
  "assert",
13012
+ "assert/strict",
12984
13013
  "async_hooks",
12985
13014
  "buffer",
12986
13015
  "child_process",
@@ -21876,6 +21905,7 @@ const REPLACED_EXTERNAL_PACKAGES = [
21876
21905
  */
21877
21906
  /** Builtin modules, keyed with and without the `node:` prefix. */
21878
21907
  const BUILTINS = {
21908
+ "assert/strict": () => strict_exports,
21879
21909
  async_hooks: () => async_hooks_exports,
21880
21910
  buffer: () => buffer_exports,
21881
21911
  child_process: () => child_process_exports,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-experimental-webworker-runtime",
3
3
  "description": "Browser-only harness runtime: in-memory VFS, module transform and loader, postMessage tunnel, and the dedicated Web Worker assembly, with the Node-compatibility layer that lets the host tree run unchanged",
4
- "version": "0.2.0-rc.1",
4
+ "version": "0.2.1-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -34,37 +34,37 @@
34
34
  "buffer": "^6.0.3",
35
35
  "picomatch": "^4.0.4",
36
36
  "readable-stream": "^4.7.0",
37
- "@deepseek-ai/dsh-util-crypto": "0.2.0-rc.1",
38
- "@deepseek-ai/dsh-client-web": "0.2.0-rc.1"
37
+ "@deepseek-ai/dsh-util-crypto": "0.2.1-alpha.1",
38
+ "@deepseek-ai/dsh-client-web": "0.2.1-alpha.1"
39
39
  },
40
40
  "peerDependencies": {
41
- "@deepseek-ai/cordis": "~4.0.4",
42
- "@deepseek-ai/dsh-client-modules": "0.2.0-rc.1",
43
- "@deepseek-ai/cordis-plugin-loader": "~1.0.5",
44
- "@deepseek-ai/dsh-client-connection": "0.2.0-rc.1",
45
- "@deepseek-ai/dsh-host-webserver": "0.2.0-rc.1"
41
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.1",
42
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
43
+ "@deepseek-ai/dsh-client-connection": "0.2.1-alpha.1",
44
+ "@deepseek-ai/dsh-client-modules": "0.2.1-alpha.1",
45
+ "@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/picomatch": "^3.0.2",
49
49
  "@types/readable-stream": "^4.0.24",
50
50
  "chokidar": "^5.0.0",
51
- "@deepseek-ai/cordis": "~4.0.4",
52
- "@deepseek-ai/cordis-plugin-loader": "~1.0.5",
53
- "@deepseek-ai/dsh-api-gateway": "0.2.0-rc.1",
54
- "@deepseek-ai/dsh-app-boot": "0.2.0-rc.1",
55
- "@deepseek-ai/dsh-bash-sandbox": "0.2.0-rc.1",
56
- "@deepseek-ai/dsh-client-connection": "0.2.0-rc.1",
57
- "@deepseek-ai/dsh-client-file-upload": "0.2.0-rc.1",
58
- "@deepseek-ai/dsh-host-webserver": "0.2.0-rc.1",
59
- "@deepseek-ai/dsh-sandbox-local": "0.2.0-rc.1",
60
- "@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.1",
61
- "@deepseek-ai/dsh-session": "0.2.0-rc.1",
62
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.0-rc.1",
63
- "@deepseek-ai/dsh-subagent": "0.2.0-rc.1",
64
- "@deepseek-ai/dsh-subprocess-local": "0.2.0-rc.1",
65
- "@deepseek-ai/node-addon-system": "~0.1.2",
66
- "@deepseek-ai/dsh-session-projection": "0.2.0-rc.1",
67
- "@deepseek-ai/dsh-client-modules": "0.2.0-rc.1"
51
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
52
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.1",
53
+ "@deepseek-ai/dsh-api-gateway": "0.2.1-alpha.1",
54
+ "@deepseek-ai/dsh-app-boot": "0.2.1-alpha.1",
55
+ "@deepseek-ai/dsh-client-connection": "0.2.1-alpha.1",
56
+ "@deepseek-ai/dsh-client-file-upload": "0.2.1-alpha.1",
57
+ "@deepseek-ai/dsh-client-modules": "0.2.1-alpha.1",
58
+ "@deepseek-ai/dsh-sandbox-local": "0.2.1-alpha.1",
59
+ "@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.1",
60
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.1",
61
+ "@deepseek-ai/dsh-bash-sandbox": "0.2.1-alpha.1",
62
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
63
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
64
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.1",
65
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
66
+ "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.1",
67
+ "@deepseek-ai/node-addon-system": "~0.1.2"
68
68
  },
69
69
  "files": [
70
70
  "lib/index.js",