dsh-plugin-wsl-env 0.19.0 → 0.22.0

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 (48) hide show
  1. package/CHANGELOG.md +188 -1
  2. package/README.md +2 -2
  3. package/client.d.ts +5 -0
  4. package/client.js +218 -0
  5. package/cordis.patch.yml +75 -1
  6. package/docs/API.md +1 -0
  7. package/docs/CONFIGURATION.md +48 -5
  8. package/docs/CONFIGURATION.zh.md +15 -1
  9. package/docs/DIAGNOSTICS.md +110 -0
  10. package/docs/DIAGNOSTICS.zh.md +96 -0
  11. package/docs/LIMITATIONS.md +25 -0
  12. package/docs/LIMITATIONS.zh.md +7 -0
  13. package/docs/MIGRATION.md +1 -1
  14. package/docs/QUICKSTART.md +19 -3
  15. package/docs/RELEASING.md +3 -0
  16. package/docs/ROADMAP-1.0.md +49 -4
  17. package/docs/UPSTREAM-FILE-REFERENCE-SEAM.md +5 -0
  18. package/docs/UPSTREAM-OPEN-IN-APP.md +33 -0
  19. package/lib/client-host.d.ts +29 -0
  20. package/lib/client-host.js +29 -0
  21. package/lib/cwd-prompt-tool.d.ts +88 -0
  22. package/lib/cwd-prompt-tool.js +94 -0
  23. package/lib/cwd-prompt.d.ts +166 -0
  24. package/lib/cwd-prompt.js +203 -0
  25. package/lib/doctor-live.d.ts +5 -1
  26. package/lib/doctor-live.js +3 -2
  27. package/lib/index.d.ts +11 -0
  28. package/lib/index.js +10 -8
  29. package/lib/messages.d.ts +238 -0
  30. package/lib/messages.js +292 -0
  31. package/lib/preflight.d.ts +24 -0
  32. package/lib/preflight.js +111 -11
  33. package/lib/sandbox-core.js +7 -14
  34. package/lib/session-scope.js +10 -5
  35. package/lib/shell-env.d.ts +25 -0
  36. package/lib/shell-env.js +56 -0
  37. package/lib/shell.d.ts +3 -1
  38. package/lib/shell.js +3 -1
  39. package/lib/update-check.d.ts +197 -0
  40. package/lib/update-check.js +211 -0
  41. package/lib/wsl-doctor-command.d.ts +105 -0
  42. package/lib/wsl-doctor-command.js +240 -0
  43. package/lib/wsl-doctor-tool.d.ts +214 -0
  44. package/lib/wsl-doctor-tool.js +423 -0
  45. package/locale/doctor/en.json +30 -0
  46. package/locale/doctor/zh.json +30 -0
  47. package/package.json +47 -5
  48. package/scripts/doctor.mjs +1606 -171
@@ -0,0 +1,30 @@
1
+ {
2
+ "app": "dsh-plugin-wsl-env 环境诊断",
3
+ "mark.ok": "通过",
4
+ "mark.warn": "警告",
5
+ "mark.fail": "失败",
6
+ "mark.skipped": "跳过",
7
+ "mark.unknown": "未知",
8
+ "mark.info": "信息",
9
+ "summary": "通过 {ok},警告 {warn},失败 {fail},信息 {info}",
10
+ "summary.skipped": ",跳过 {n}",
11
+ "summary.unknown": ",未知 {n}(传输抖动——重跑以获得裁决)",
12
+ "timings": "耗时: {line};总计 {total}ms",
13
+ "verdict.ready.none": "裁决: READY——首条命令应能成功",
14
+ "verdict.ready.one": "裁决: READY——首条命令应能在 {target} 中成功",
15
+ "verdict.ready.many": "裁决: READY——首条命令应能在以下每个 distro 中成功: {targets}",
16
+ "verdict.blocked": "裁决: BLOCKED——阻断项: {blockers};先应用上方的修复,再重跑",
17
+ "fix.prefix": " 修复: {remedy}",
18
+ "fix.hint": "加 --fix 清扫残留 scope;--fix --install 安装软件包前会先询问",
19
+ "sessions.title": "正在运行的 distro 会话",
20
+ "sessions.none": " (无)",
21
+ "sessions.no-user-manager": "无用户管理器——scope 不可用",
22
+ "sessions.no-scopes": "无会话 scope",
23
+ "ports.title": "{distro} 中的监听端口",
24
+ "ports.none": "\n正在运行的 distro 中没有监听端口",
25
+ "bundle.written": "bundle: 已写入 {path}({bytes} 字节{redacted})",
26
+ "bundle.redacted": ",已脱敏",
27
+ "refusal.read-only": "doctor: --read-only 拒绝 --fix/--install;请改用 `pnpm run doctor --fix`",
28
+ "refusal.scoped-fix": "doctor: --fix 需要完整运行——分区运行无法复核未探测的项目",
29
+ "confirm.install": "以 root 在 \"{distro}\" 中安装 {packages}?"
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-wsl-env",
3
- "version": "0.19.0",
3
+ "version": "0.22.0",
4
4
  "description": "在 WSL 的 Linux 实例中打开项目工作区,在对应 Linux 空间中进行命令执行、运行 shell 脚本和文件访问,以获得全套 Linux Shell 工具链收益,并通过 bubblewrap 对命令进行沙箱隔离",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -11,10 +11,14 @@
11
11
  "windows"
12
12
  ],
13
13
  "type": "module",
14
- "types": "./lib/shell.d.ts",
15
- "main": "lib/shell.js",
14
+ "types": "./lib/client-host.d.ts",
15
+ "main": "lib/client-host.js",
16
16
  "exports": {
17
17
  ".": {
18
+ "types": "./lib/client-host.d.ts",
19
+ "default": "./lib/client-host.js"
20
+ },
21
+ "./shell": {
18
22
  "types": "./lib/shell.d.ts",
19
23
  "default": "./lib/shell.js"
20
24
  },
@@ -28,6 +32,26 @@
28
32
  },
29
33
  "./auto-preset/locale/en.json": "./locale/auto-preset/en.json",
30
34
  "./auto-preset/locale/zh.json": "./locale/auto-preset/zh.json",
35
+ "./cwd-prompt": {
36
+ "types": "./lib/cwd-prompt.d.ts",
37
+ "default": "./lib/cwd-prompt.js"
38
+ },
39
+ "./cwd-prompt-tool": {
40
+ "types": "./lib/cwd-prompt-tool.d.ts",
41
+ "default": "./lib/cwd-prompt-tool.js"
42
+ },
43
+ "./wsl-doctor-tool": {
44
+ "types": "./lib/wsl-doctor-tool.d.ts",
45
+ "default": "./lib/wsl-doctor-tool.js"
46
+ },
47
+ "./wsl-doctor-command": {
48
+ "types": "./lib/wsl-doctor-command.d.ts",
49
+ "default": "./lib/wsl-doctor-command.js"
50
+ },
51
+ "./client": {
52
+ "types": "./client.d.ts",
53
+ "default": "./client.js"
54
+ },
31
55
  "./file-reference-wsl": {
32
56
  "types": "./lib/file-reference-wsl.d.ts",
33
57
  "default": "./lib/file-reference-wsl.js"
@@ -79,6 +103,10 @@
79
103
  },
80
104
  "./subprocess/locale/en.json": "./locale/subprocess/en.json",
81
105
  "./subprocess/locale/zh.json": "./locale/subprocess/zh.json",
106
+ "./update-check": {
107
+ "types": "./lib/update-check.d.ts",
108
+ "default": "./lib/update-check.js"
109
+ },
82
110
  "./wsl": {
83
111
  "types": "./lib/wsl.d.ts",
84
112
  "default": "./lib/wsl.js"
@@ -87,6 +115,14 @@
87
115
  "dsh": {
88
116
  "bundle": {
89
117
  "patch": "./cordis.patch.yml"
118
+ },
119
+ "client": {
120
+ "platform": "web",
121
+ "immediately": true,
122
+ "inject": [
123
+ "@deepseek-ai/dsh-client-ui-slots",
124
+ "@deepseek-ai/dsh-client-ui-conversation"
125
+ ]
90
126
  }
91
127
  },
92
128
  "files": [
@@ -96,6 +132,8 @@
96
132
  "agent/native/linux-*/dsh-wsl-agent",
97
133
  "locale/**/*.json",
98
134
  "cordis.patch.yml",
135
+ "client.js",
136
+ "client.d.ts",
99
137
  "examples/**/*.yml",
100
138
  "README.md",
101
139
  "docs/README.zh.md",
@@ -126,6 +164,8 @@
126
164
  "docs/UPSTREAM-TERMINAL-TITLE.md",
127
165
  "docs/API.md",
128
166
  "docs/ARCHITECTURE.md",
167
+ "docs/DIAGNOSTICS.md",
168
+ "docs/DIAGNOSTICS.zh.md",
129
169
  "docs/ROADMAP.md",
130
170
  "docs/ROADMAP-1.0.md",
131
171
  "CHANGELOG.md",
@@ -143,9 +183,9 @@
143
183
  "lint:types": "tsc --noEmit",
144
184
  "build": "node scripts/build.mjs",
145
185
  "lint:build": "node test/build-freshness.mjs",
146
- "test:coverage": "node scripts/coverage-gate.mjs -- node --test --test-timeout=60000 --experimental-test-coverage --test-coverage-lines=85 --test-coverage-branches=84 --test-coverage-functions=70 --test-coverage-exclude='scripts/**' --test-coverage-exclude='test/**' test/agent-exec.test.mjs test/agent-fs-script.test.mjs test/agent-protocol.test.mjs test/agent.test.mjs test/fs-substrate.test.mjs test/fs.boot.test.mjs test/composition.test.mjs test/provider.test.mjs test/file-reference-wsl.test.mjs test/fsio-agent.test.mjs test/fsio-text.test.mjs test/git-exec.test.mjs test/git-route.test.mjs test/listing.test.mjs test/paths.test.mjs test/ports.test.mjs test/preset-choice.test.mjs test/probe-cache.test.mjs test/preflight.test.mjs test/sandbox.test.mjs test/search-exec.test.mjs test/search-route.test.mjs test/shell.test.mjs test/shell-env.test.mjs test/terminal-activity.test.mjs test/terminal.test.mjs test/watcher.test.mjs test/wsl.test.mjs test/fs-decisions.test.mjs test/session-scope.test.mjs test/session-runtime.test.mjs test/native-agent.test.mjs test/peers.test.mjs test/agent-shared.test.mjs test/distro-route.test.mjs test/fs-routing.test.mjs test/doctor.test.mjs test/profile-preset.test.mjs test/packaging.test.mjs test/peer-canary.test.mjs test/probe-runner.test.mjs",
186
+ "test:coverage": "node scripts/coverage-gate.mjs -- node --test --test-timeout=60000 --experimental-test-coverage --test-coverage-lines=85 --test-coverage-branches=84 --test-coverage-functions=70 --test-coverage-exclude='scripts/**' --test-coverage-exclude='test/**' test/agent-exec.test.mjs test/agent-fs-script.test.mjs test/agent-protocol.test.mjs test/agent.test.mjs test/fs-substrate.test.mjs test/fs.boot.test.mjs test/composition.test.mjs test/provider.test.mjs test/file-reference-wsl.test.mjs test/fsio-agent.test.mjs test/fsio-text.test.mjs test/git-exec.test.mjs test/git-route.test.mjs test/listing.test.mjs test/paths.test.mjs test/ports.test.mjs test/preset-choice.test.mjs test/probe-cache.test.mjs test/preflight.test.mjs test/sandbox.test.mjs test/search-exec.test.mjs test/search-route.test.mjs test/shell.test.mjs test/shell-env.test.mjs test/terminal-activity.test.mjs test/terminal.test.mjs test/watcher.test.mjs test/wsl.test.mjs test/fs-decisions.test.mjs test/session-scope.test.mjs test/session-runtime.test.mjs test/native-agent.test.mjs test/peers.test.mjs test/agent-shared.test.mjs test/distro-route.test.mjs test/fs-routing.test.mjs test/update-check.test.mjs test/doctor.test.mjs test/profile-preset.test.mjs test/packaging.test.mjs test/peer-canary.test.mjs test/probe-runner.test.mjs test/cwd-prompt.test.mjs test/cwd-prompt-tool.test.mjs test/wsl-doctor-tool.test.mjs test/wsl-doctor-command.test.mjs test/client-host.test.mjs test/messages.test.mjs",
147
187
  "test:syntax": "node test/syntax.mjs",
148
- "test:unit": "node scripts/test-watchdog.mjs -- node --test --test-timeout=60000 test/fs.boot.test.mjs test/fsio-text.test.mjs test/composition.test.mjs test/provider.test.mjs test/file-reference-wsl.test.mjs test/paths.test.mjs test/listing.test.mjs test/shell.test.mjs test/shell-env.test.mjs test/terminal.test.mjs test/probe-cache.test.mjs test/preflight.test.mjs test/preset-choice.test.mjs test/sandbox.test.mjs test/agent-protocol.test.mjs test/agent.test.mjs test/agent-fs-script.test.mjs test/fsio-agent.test.mjs test/fs-substrate.test.mjs test/agent-exec.test.mjs test/ports.test.mjs test/watcher.test.mjs test/wsl.test.mjs test/fs-decisions.test.mjs test/git-exec.test.mjs test/git-route.test.mjs test/search-route.test.mjs test/search-exec.test.mjs test/terminal-activity.test.mjs test/session-scope.test.mjs test/session-runtime.test.mjs test/native-agent.test.mjs test/peers.test.mjs test/agent-shared.test.mjs test/distro-route.test.mjs test/fs-routing.test.mjs test/doctor.test.mjs test/profile-preset.test.mjs test/packaging.test.mjs test/peer-canary.test.mjs test/probe-runner.test.mjs",
188
+ "test:unit": "node scripts/test-watchdog.mjs -- node --test --test-timeout=60000 test/fs.boot.test.mjs test/fsio-text.test.mjs test/composition.test.mjs test/provider.test.mjs test/file-reference-wsl.test.mjs test/paths.test.mjs test/listing.test.mjs test/shell.test.mjs test/shell-env.test.mjs test/terminal.test.mjs test/probe-cache.test.mjs test/preflight.test.mjs test/preset-choice.test.mjs test/sandbox.test.mjs test/agent-protocol.test.mjs test/agent.test.mjs test/agent-fs-script.test.mjs test/fsio-agent.test.mjs test/fs-substrate.test.mjs test/agent-exec.test.mjs test/ports.test.mjs test/watcher.test.mjs test/wsl.test.mjs test/fs-decisions.test.mjs test/git-exec.test.mjs test/git-route.test.mjs test/search-route.test.mjs test/search-exec.test.mjs test/terminal-activity.test.mjs test/session-scope.test.mjs test/session-runtime.test.mjs test/native-agent.test.mjs test/peers.test.mjs test/agent-shared.test.mjs test/distro-route.test.mjs test/fs-routing.test.mjs test/update-check.test.mjs test/doctor.test.mjs test/profile-preset.test.mjs test/packaging.test.mjs test/peer-canary.test.mjs test/probe-runner.test.mjs test/cwd-prompt.test.mjs test/cwd-prompt-tool.test.mjs test/wsl-doctor-tool.test.mjs test/wsl-doctor-command.test.mjs test/client-host.test.mjs test/messages.test.mjs",
149
189
  "lint:style": "node test/style.mjs",
150
190
  "lint:links": "node scripts/check-links.mjs",
151
191
  "lint:requirements": "node scripts/check-requirements.mjs",
@@ -212,6 +252,7 @@
212
252
  "@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.1",
213
253
  "@deepseek-ai/dsh-subprocess": "0.2.2-rc.1",
214
254
  "@deepseek-ai/dsh-subprocess-local": "0.2.2-rc.1",
255
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.1",
215
256
  "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
216
257
  "@types/js-yaml": "^4.0.9",
217
258
  "@types/node": "~22.20.5",
@@ -227,6 +268,7 @@
227
268
  "@deepseek-ai/dsh-host-directory-picker": ">=0.2.2-rc.1",
228
269
  "@deepseek-ai/dsh-sandbox": ">=0.2.2-rc.1",
229
270
  "@deepseek-ai/dsh-subprocess": ">=0.2.2-rc.1",
271
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.1",
230
272
  "@deepseek-ai/dsh-subprocess-local": ">=0.2.2-rc.1",
231
273
  "@deepseek-ai/dsh-typert-protocol": ">=0.2.2-rc.1",
232
274
  "@deepseek-ai/schemastery": "^3.19.0"