dsh-plugin-wsl-env 0.19.0 → 0.21.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.
- package/CHANGELOG.md +122 -0
- package/README.md +2 -2
- package/client.d.ts +5 -0
- package/client.js +98 -0
- package/cordis.patch.yml +66 -1
- package/docs/API.md +1 -0
- package/docs/CONFIGURATION.md +39 -5
- package/docs/CONFIGURATION.zh.md +15 -1
- package/docs/DIAGNOSTICS.md +83 -0
- package/docs/DIAGNOSTICS.zh.md +73 -0
- package/docs/LIMITATIONS.md +25 -0
- package/docs/LIMITATIONS.zh.md +7 -0
- package/docs/MIGRATION.md +1 -1
- package/docs/QUICKSTART.md +19 -3
- package/docs/RELEASING.md +3 -0
- package/docs/ROADMAP-1.0.md +49 -4
- package/docs/UPSTREAM-FILE-REFERENCE-SEAM.md +5 -0
- package/docs/UPSTREAM-OPEN-IN-APP.md +33 -0
- package/lib/client-host.d.ts +29 -0
- package/lib/client-host.js +29 -0
- package/lib/cwd-prompt-tool.d.ts +88 -0
- package/lib/cwd-prompt-tool.js +94 -0
- package/lib/cwd-prompt.d.ts +166 -0
- package/lib/cwd-prompt.js +203 -0
- package/lib/doctor-live.d.ts +5 -1
- package/lib/doctor-live.js +3 -2
- package/lib/index.js +6 -8
- package/lib/messages.d.ts +157 -0
- package/lib/messages.js +199 -0
- package/lib/preflight.d.ts +24 -0
- package/lib/preflight.js +111 -11
- package/lib/sandbox-core.js +7 -14
- package/lib/session-scope.js +10 -5
- package/lib/shell-env.d.ts +25 -0
- package/lib/shell-env.js +56 -0
- package/lib/shell.d.ts +3 -1
- package/lib/shell.js +3 -1
- package/lib/update-check.d.ts +197 -0
- package/lib/update-check.js +211 -0
- package/lib/wsl-doctor-tool.d.ts +122 -0
- package/lib/wsl-doctor-tool.js +161 -0
- package/package.json +43 -5
- package/scripts/doctor.mjs +1167 -160
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,128 @@ were part of the record.
|
|
|
16
16
|
|
|
17
17
|
## [Unreleased]
|
|
18
18
|
|
|
19
|
+
## [0.21.0] - 2026-11-08
|
|
20
|
+
|
|
21
|
+
One theme: the doctor and the preflight reach the GUI — the readiness probes
|
|
22
|
+
run at plugin load, the doctor lands as a composer button and a per-session
|
|
23
|
+
`DSH_WSL_DOCTOR` fact, and the bare package name becomes the client host half
|
|
24
|
+
that makes both loadable.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **BREAKING: `.` is now the no-op web client host half; the shell executor
|
|
29
|
+
moved to `dsh-plugin-wsl-env/shell`.** The web app's client-modules roster
|
|
30
|
+
only scans Loader rows whose name is an exact package name, so the doctor's
|
|
31
|
+
composer button (declared under `dsh.client`) loads only when the package
|
|
32
|
+
is mounted at its bare name — and the shell executor that used to own `.`
|
|
33
|
+
cannot run at the composition root without shadowing the shipped host
|
|
34
|
+
shell. The bundle's patch layer therefore mounts the bare name as a no-op
|
|
35
|
+
row (`wsl-env-client-host`) that puts the package on the web bundle list,
|
|
36
|
+
while the preset mounts the executor through the explicit `./shell` subpath.
|
|
37
|
+
The doctor button is the plugin's own feature again — the interim
|
|
38
|
+
`dsh-wsl-env-doctor-button` companion bundle is removed. A profile that
|
|
39
|
+
mounted `dsh-plugin-wsl-env` directly for the executor must switch to
|
|
40
|
+
`dsh-plugin-wsl-env/shell`.
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- **The preflight runs at plugin load, not only at session open.** A new
|
|
45
|
+
`startup` key (default `true`) on `wsl-preflight` runs the same `bwrap` and
|
|
46
|
+
session-runtime probes once at mount — install plus restart — against the
|
|
47
|
+
pinned or WSL-default distro, so the verdict is in the log before any
|
|
48
|
+
session opens. A session on that distro repeats only the runtime-context
|
|
49
|
+
entry (a shared single-flight verdict plus per-process dedupe keeps the log
|
|
50
|
+
to one line); other distros keep the session-open check unchanged, and
|
|
51
|
+
`startup: false` restores the old behavior exactly.
|
|
52
|
+
|
|
53
|
+
- **The doctor entered the GUI.** A new `DSH_WSL_DOCTOR` fact rides every
|
|
54
|
+
distro session: a ready-to-run command that executes the doctor from
|
|
55
|
+
inside the session, using the app's own runtime as Node through interop —
|
|
56
|
+
a GUI user can ask the model for a diagnosis (`sh -c
|
|
57
|
+
"$DSH_WSL_DOCTOR --json"`) without a terminal or a separate Node install.
|
|
58
|
+
The session-start preflight now publishes its verdict on healthy sessions
|
|
59
|
+
too (`WSL preflight: ready — …`), so the transcript reads as a verdict on
|
|
60
|
+
every session start, not only on failures. And a new `wsl_doctor` tool
|
|
61
|
+
(mounted inside `preset-wsl`) lets the model run the doctor itself —
|
|
62
|
+
in-process through `doctorReport()` with the live resident's state merged
|
|
63
|
+
in — returning the verdict, blockers and per-failure remedies to the
|
|
64
|
+
transcript. The whole entry is the plugin's own; the page-level action
|
|
65
|
+
proposed upstream (discussion #12499) was withdrawn the same day as
|
|
66
|
+
unnecessary coupling — the cohesive shape needs no upstream surface.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
- **The doctor's verdict closes the loop: green means the first command
|
|
70
|
+
works.** The report moves to schemaVersion 2 — `verdict: ready | blocked`,
|
|
71
|
+
`blockers`, per-distro verdicts and per-check `distro` /
|
|
72
|
+
`blocksFirstCommand` — computed under the **effective configuration** (the
|
|
73
|
+
profile layers the app loads, not the shipped defaults): a missing systemd
|
|
74
|
+
only blocks under `sessionSandbox: true`, while `auto` names its fallback
|
|
75
|
+
and `false` names the opt-out. New checks: the per-distro WSL mode (WSL1
|
|
76
|
+
named as the root cause, with the `--set-version` remedy), `.wslconfig`
|
|
77
|
+
validation with its semantics (the silent-ignore trap, unknown keys,
|
|
78
|
+
memory hazards, `localhostForwarding`), `/etc/wsl.conf` cross-checks
|
|
79
|
+
(boot/interop/automount against the runtime, terminate remedies), the
|
|
80
|
+
disk, the clock and DNS. Three smoke legs prove the chain — one EXEC
|
|
81
|
+
frame, the confined fence (write inside runs, write outside is refused),
|
|
82
|
+
one FSB batch over a temp dir that is cleaned up. `--all` (and the
|
|
83
|
+
effective `auto`/`default` target set) check every installed distro; one
|
|
84
|
+
wedged distro cannot mask the others. `--fix` ends in a re-verified
|
|
85
|
+
report: every fix is followed by a fresh probe, the affected checks carry
|
|
86
|
+
the after state, and the Windows git trust whitelist joins the fixable set
|
|
87
|
+
behind the confirmation gate. `--bundle <path>` writes the attachable
|
|
88
|
+
diagnostic file (`--redact` strips home and DSH paths), deprecated profile
|
|
89
|
+
keys (`substrate: share`, `distro: ''`) are named with their migration, and
|
|
90
|
+
per-phase timings ride the report. The doctor targets every installed
|
|
91
|
+
distro the effective configuration can reach; remedies that would rewrite
|
|
92
|
+
user- or distro-owned files stay manual, and the verdict never upgrades the
|
|
93
|
+
`enforcement: partial` statement. [DIAGNOSTICS.md](docs/DIAGNOSTICS.md)
|
|
94
|
+
maps every error code to its check or its transient class.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
- **The plugin's refusal messages follow the harness language.** A new
|
|
98
|
+
`lib/messages.js` catalog renders the `sessionSandbox` preflight verdicts,
|
|
99
|
+
the `bwrap` install and repair hints, and the distro/workdir command errors
|
|
100
|
+
in English or Chinese, selected from the host `locale` entry's `preference`
|
|
101
|
+
field through an optional `settings` injection (the base bundle's service; a
|
|
102
|
+
profile without it, an unset preference, or any other language keeps
|
|
103
|
+
English). The read refreshes on `settings/document-updated`, so switching
|
|
104
|
+
the app's language takes effect without a restart. Commands, config keys
|
|
105
|
+
and file paths stay verbatim in both catalogs. The English templates are the
|
|
106
|
+
shipped texts byte-for-byte, and three groups stay English by design — the
|
|
107
|
+
`FS_*` refusals in `fs-decisions` and the fsio replica (the tool layer
|
|
108
|
+
matches on those strings) and the standalone `scripts/doctor.mjs` — see
|
|
109
|
+
[CONFIGURATION.md — Message language](docs/CONFIGURATION.md#message-language)
|
|
110
|
+
and [LIMITATIONS.md](docs/LIMITATIONS.md).
|
|
111
|
+
|
|
112
|
+
- **The plugin notices its own updates.** A new `wsl-update-check` row asks the
|
|
113
|
+
app's plugin manager for this package's version list on a slow timer (first
|
|
114
|
+
check 2–10 minutes after startup, then once a day; `intervalMs` configures
|
|
115
|
+
it, floored at one minute, and `enabled: false` stops the check). When the
|
|
116
|
+
stable channel has moved, the managed `DSH_WSL_PLUGIN_UPDATE` variable in
|
|
117
|
+
every distro session carries the fact, deprecation and "requires a newer
|
|
118
|
+
DSH" marks included; every other answer — no host plugin-manager, a linked
|
|
119
|
+
checkout, an unreachable registry — stays silent at debug level. The check
|
|
120
|
+
never fetches on its own and never installs: upgrading stays manual (Plugins
|
|
121
|
+
page, or `dsh plugin add`), then a restart, because the harness has no hot
|
|
122
|
+
reload. `node scripts/doctor.mjs` gained an `update.latest` section that
|
|
123
|
+
asks the same question on demand, `DSH_UPDATE_REGISTRIES` pins or empties
|
|
124
|
+
its registry list.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Fixed
|
|
128
|
+
|
|
129
|
+
- **The tool rows mount again: the context reads are declared.** Both tool
|
|
130
|
+
rows (`wsl-cwd-prompt-tool`, `wsl-doctor-tool`) read `ctx.tools` (and the
|
|
131
|
+
`workingDirectory` service) without exporting `inject`, so cordis 4 threw
|
|
132
|
+
`cannot get property "tools" without inject` at activation — the shipped
|
|
133
|
+
`working_directory` tool stayed disabled with no replacement registered.
|
|
134
|
+
Both rows now declare `inject = ["tools", "workingDirectory"]`. The
|
|
135
|
+
`wsl_doctor` tool additionally resolves its collector per call instead of
|
|
136
|
+
reading a `ctx.doctor` service nothing provides: a provided `doctor`
|
|
137
|
+
service through the optional `ctx.get`, else the test seam's `doctor`
|
|
138
|
+
property, else the package's own `doctorReport` — a required inject of a
|
|
139
|
+
nonexistent service would have failed the whole `preset-wsl` mount.
|
|
140
|
+
|
|
19
141
|
## [0.19.0] - 2026-11-06
|
|
20
142
|
|
|
21
143
|
One theme: the wire and the doctor catch up with the substrate — protocol v7
|
package/README.md
CHANGED
|
@@ -115,9 +115,9 @@ Install `bubblewrap` before the first command:
|
|
|
115
115
|
wsl.exe -d <distro> -u root -- apt-get install -y bubblewrap
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
From a checkout, `pnpm run doctor` is the one-command environment check: Windows/WSL versions, the distro and
|
|
118
|
+
From a checkout, `pnpm run doctor` is the one-command environment check: Windows/WSL versions, the per-distro WSL mode, `.wslconfig` and `/etc/wsl.conf` cross-checks, the disk, clock and DNS, bubblewrap usability, systemd / the user manager / Linger, the optional tools, peer versions, the agent cache, a fresh-agent handshake, three smoke legs that prove the chain (frame I/O, the confined fence, the batched substrate), stale session scopes, the known profile-patch and deprecated-key traps, and whether a newer stable release exists on the registry. The run ends in a verdict — `ready` (the first command should succeed) or `blocked` (the named checks to fix) — computed under the effective configuration. Each failure prints one copy-paste remedy; `--json` is the machine contract, `--fix` re-verifies what it fixed (packages need `--fix --install` and an explicit confirmation), `--all` checks every installed distro, and `--bundle <path>` writes the diagnostic file a setup report attaches (`--redact` strips the paths). `pnpm run diagnose` is its read-only alias. `pnpm run bootstrap <distro>` remains the narrower tool-install helper.
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
The plugin notices its own updates about once a day (first check a few minutes after startup) by asking the app's plugin manager — it never fetches on its own. When a newer stable release exists, the managed `DSH_WSL_PLUGIN_UPDATE` variable in every distro session carries the fact; `wsl-update-check.enabled: false` in the patch config turns the check off, and `DSH_UPDATE_REGISTRIES` overrides which registries the doctor's on-demand check asks (comma-separated, or empty to skip it on an air-gapped machine). Upgrading stays manual, because the harness has no hot reload: install again (Plugins page, or the `add` command), then restart. Uninstall on
|
|
121
121
|
the Plugins page, or with `dsh plugin --profile wsl remove dsh-plugin-wsl-env`
|
|
122
122
|
where the CLI is installed; the agent cache under `~/.cache/dsh-wsl` can then be
|
|
123
123
|
deleted. If you added a local `workspace-files-wsl` workaround to your profile to
|
package/client.d.ts
ADDED
package/client.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The doctor's GUI button: a pill in the conversation composer dock that drops
|
|
3
|
+
* `/wsl-doctor` into the current session's input and submits it.
|
|
4
|
+
*
|
|
5
|
+
* The composer dock's slot components receive the harness's standard props —
|
|
6
|
+
* `inputActions` among them. Sending is `setDraft(text)` (replace the whole
|
|
7
|
+
* draft with plain text) followed by `submit()` (send the current draft — the
|
|
8
|
+
* published face has no submit-with-text verb). When those verbs are missing
|
|
9
|
+
* the button degrades to a draft prefill, never to a broken control.
|
|
10
|
+
*
|
|
11
|
+
* Loaded by the harness's web client loader through the `dsh.client`
|
|
12
|
+
* declaration in package.json; the composition's bare-name row
|
|
13
|
+
* (`wsl-env-client-host`, mounting the no-op root export) is what puts this
|
|
14
|
+
* package on the web bundle list.
|
|
15
|
+
*/
|
|
16
|
+
window.__ModuleLoader__.load({
|
|
17
|
+
id: "dsh-plugin-wsl-env",
|
|
18
|
+
factory(require) {
|
|
19
|
+
const React = require("react");
|
|
20
|
+
const h = React.createElement;
|
|
21
|
+
|
|
22
|
+
const COMMAND =
|
|
23
|
+
"请用 wsl_doctor 工具对当前会话的发行版运行环境诊断:先给 verdict," +
|
|
24
|
+
"blocked 时逐条列出失败项与 remedy,不代改文件、不代装软件包。";
|
|
25
|
+
|
|
26
|
+
function DoctorButton(props) {
|
|
27
|
+
const trigger = () => {
|
|
28
|
+
const actions = props && props.inputActions;
|
|
29
|
+
// The published InputActions face has no submit(text): submit() sends
|
|
30
|
+
// the CURRENT draft, and insertText needs a captureInsertion() span.
|
|
31
|
+
// setDraft replaces the whole draft with plain text, then submit()
|
|
32
|
+
// sends it — one click, no span bookkeeping.
|
|
33
|
+
if (actions && typeof actions.setDraft === "function" && typeof actions.submit === "function") {
|
|
34
|
+
try {
|
|
35
|
+
actions.setDraft(COMMAND);
|
|
36
|
+
actions.submit();
|
|
37
|
+
return;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
// Fall through to the draft prefill below; the command text is the
|
|
40
|
+
// same either way.
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (actions && typeof actions.setDraft === "function") {
|
|
44
|
+
try {
|
|
45
|
+
actions.setDraft(COMMAND);
|
|
46
|
+
return;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
// Ignored: the draft stays untouched rather than half-filled.
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return h(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
onClick: trigger,
|
|
57
|
+
title: "运行 WSL 环境诊断(doctor)",
|
|
58
|
+
style: {
|
|
59
|
+
display: "flex",
|
|
60
|
+
alignItems: "center",
|
|
61
|
+
gap: 5,
|
|
62
|
+
// The dock is a centered flex row; an auto left margin overrides
|
|
63
|
+
// the group centering for this item alone and pins the pill to
|
|
64
|
+
// the dock's right edge.
|
|
65
|
+
marginLeft: "auto",
|
|
66
|
+
padding: "2px 10px",
|
|
67
|
+
borderRadius: 999,
|
|
68
|
+
fontSize: 12,
|
|
69
|
+
border: "none",
|
|
70
|
+
outline: "none",
|
|
71
|
+
background: "transparent",
|
|
72
|
+
color: "inherit",
|
|
73
|
+
opacity: 0.75,
|
|
74
|
+
cursor: "pointer",
|
|
75
|
+
userSelect: "none",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
"WSL 诊断"
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
inject: ["slots"],
|
|
84
|
+
apply(ctx) {
|
|
85
|
+
ctx.slots.inject("conversation.composer.dock", function* () {
|
|
86
|
+
yield ctx.slots.register(
|
|
87
|
+
{
|
|
88
|
+
name: "conversation.composer.dock",
|
|
89
|
+
id: "wsl-doctor-button",
|
|
90
|
+
order: 9,
|
|
91
|
+
},
|
|
92
|
+
DoctorButton
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
});
|
package/cordis.patch.yml
CHANGED
|
@@ -139,7 +139,30 @@
|
|
|
139
139
|
- id: fs-sandbox
|
|
140
140
|
disabled: true
|
|
141
141
|
|
|
142
|
+
# The shipped `working_directory` tool prints the host-canonical UNC spelling
|
|
143
|
+
# (`fs.processPath()`), which the distro shell cannot resolve — the same
|
|
144
|
+
# failure mode the cwd rewrite below removes. Disable the shipped row by id
|
|
145
|
+
# (a top-level entry: a disable inside an insert list is duplicate-id data,
|
|
146
|
+
# see the comment above), then mount the replacement in the insert list.
|
|
147
|
+
- id: tool-working-directory
|
|
148
|
+
disabled: true
|
|
149
|
+
|
|
142
150
|
- insert:
|
|
151
|
+
# ═════════════════════════════════════════════════════════════════════════════
|
|
152
|
+
# The web client host half.
|
|
153
|
+
#
|
|
154
|
+
# The web app's client-modules roster only scans Loader rows whose name is
|
|
155
|
+
# an exact package name, and this package's service rows are all subpath
|
|
156
|
+
# mounts — so without this row the browser half declared under `dsh.client`
|
|
157
|
+
# (the doctor composer button) would never load. `.` is the no-op client
|
|
158
|
+
# host half (lib/client-host.js), safe at the composition root; the shell
|
|
159
|
+
# executor that used to own `.` lives at `dsh-plugin-wsl-env/shell` since
|
|
160
|
+
# 0.20.0 and is mounted inside the preset below. The bare specifier is
|
|
161
|
+
# load-bearing: do not "simplify" it to a subpath.
|
|
162
|
+
# ═════════════════════════════════════════════════════════════════════════════
|
|
163
|
+
- id: wsl-env-client-host
|
|
164
|
+
name: 'dsh-plugin-wsl-env'
|
|
165
|
+
|
|
143
166
|
- id: fs-routing
|
|
144
167
|
name: 'dsh-plugin-wsl-env/fs-routing'
|
|
145
168
|
config:
|
|
@@ -172,6 +195,40 @@
|
|
|
172
195
|
- id: wsl-preflight
|
|
173
196
|
name: 'dsh-plugin-wsl-env/preflight'
|
|
174
197
|
|
|
198
|
+
# Distro-native working directory in the runtime context: rewrite the
|
|
199
|
+
# `working-directory:current` entry so a distro session reads its cwd as
|
|
200
|
+
# the POSIX path its own commands use (`/home/...`) instead of the host
|
|
201
|
+
# UNC spelling (`\\wsl.localhost\<distro>\...`). Display only: it touches
|
|
202
|
+
# one prompt entry, leaves drive paths and every other context alone, and
|
|
203
|
+
# degrades to a no-op on a harness without the assemble waterfall.
|
|
204
|
+
- id: wsl-cwd-prompt
|
|
205
|
+
name: 'dsh-plugin-wsl-env/cwd-prompt'
|
|
206
|
+
config:
|
|
207
|
+
enabled: true
|
|
208
|
+
|
|
209
|
+
# Distro-native `working_directory` tool: the third surface the cwd reaches
|
|
210
|
+
# the model through. Same tool name, parameters, and `cd` semantics (the
|
|
211
|
+
# harness's `workingDirectory` service still owns all directory state);
|
|
212
|
+
# the returned path is rewritten to the distro's POSIX form. Non-WSL paths
|
|
213
|
+
# pass through byte for byte. Pairs with the top-level disable of
|
|
214
|
+
# `tool-working-directory` above.
|
|
215
|
+
- id: wsl-cwd-prompt-tool
|
|
216
|
+
name: 'dsh-plugin-wsl-env/cwd-prompt-tool'
|
|
217
|
+
|
|
218
|
+
# Update check: on a slow timer (first check 2-10 minutes after boot, then
|
|
219
|
+
# once a day) ask the host's plugin-manager whether a newer stable release
|
|
220
|
+
# of this package exists, and publish one fact the shell-env row serves as
|
|
221
|
+
# DSH_WSL_PLUGIN_UPDATE. Advisory only: it never installs, never fetches on
|
|
222
|
+
# its own (the host's plugin-manager does the registry work), and a host
|
|
223
|
+
# without the service — or a bundle loaded from a linked checkout — skips
|
|
224
|
+
# the check quietly. Upgrading stays manual; the harness has no HMR, so a
|
|
225
|
+
# fresh version needs a restart to take effect.
|
|
226
|
+
- id: wsl-update-check
|
|
227
|
+
name: 'dsh-plugin-wsl-env/update-check'
|
|
228
|
+
config:
|
|
229
|
+
enabled: true
|
|
230
|
+
intervalMs: 86400000
|
|
231
|
+
|
|
175
232
|
- insert:
|
|
176
233
|
# ═════════════════════════════════════════════════════════════════════════════
|
|
177
234
|
# preset-wsl — the WSL environment, scoped to agents that select this preset.
|
|
@@ -239,7 +296,7 @@
|
|
|
239
296
|
# per-command shape. Bubblewrap is still required for the mount
|
|
240
297
|
# profile; without it the providers fail closed.
|
|
241
298
|
- id: wsl-shell
|
|
242
|
-
name: 'dsh-plugin-wsl-env'
|
|
299
|
+
name: 'dsh-plugin-wsl-env/shell'
|
|
243
300
|
config:
|
|
244
301
|
# auto: follow the request workdir's UNC distro; "default"
|
|
245
302
|
# forces WSL's default, and a name pins. Empty is auto.
|
|
@@ -300,6 +357,14 @@
|
|
|
300
357
|
sampleOverCapGlobResults: false
|
|
301
358
|
- id: tool-jobs
|
|
302
359
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
360
|
+
|
|
361
|
+
# The model runs the environment doctor itself: the verdict
|
|
362
|
+
# lands in the transcript (ready, or blocked with per-failure
|
|
363
|
+
# copy-paste remedies). In-process via doctorReport(), so the
|
|
364
|
+
# live resident's state merges in; mounts inside this preset
|
|
365
|
+
# because a host-preset agent has no distro to examine.
|
|
366
|
+
- id: wsl-doctor-tool
|
|
367
|
+
name: 'dsh-plugin-wsl-env/wsl-doctor-tool'
|
|
303
368
|
- id: tool-schedule
|
|
304
369
|
name: '@deepseek-ai/dsh-tool-schedule'
|
|
305
370
|
- id: skill-filesystem
|
package/docs/API.md
CHANGED
|
@@ -19,6 +19,7 @@ this page is the quick tour.
|
|
|
19
19
|
| `./picker` | `WslDirectoryPicker` | the distro-aware directory picker |
|
|
20
20
|
| `./auto-preset` | the `auto-preset` row | first-run profile bootstrap |
|
|
21
21
|
| `./shell-env` | the `wsl-shell-env` row | the `DSH_WSL_*` facts registry |
|
|
22
|
+
| `./update-check` | the `wsl-update-check` row | the once-a-day update notice (fact store + host-delegated check) |
|
|
22
23
|
|
|
23
24
|
Stability: tool names and error codes are API (docs/MIGRATION.md); the
|
|
24
25
|
runtime rows' config keys are documented in docs/CONFIGURATION.md.
|
package/docs/CONFIGURATION.md
CHANGED
|
@@ -135,8 +135,11 @@ The root router is app-level, not session-owned, so it does not use
|
|
|
135
135
|
| | `wslPath` | `wsl.exe` | Path to `wsl.exe`. |
|
|
136
136
|
| | `sandbox` | `true` | Run the session-start `bwrap` check. |
|
|
137
137
|
| | `sessionSandbox` | `true` | Also check systemd, the user manager, `systemd-run`, and Linger. Set false when the profile does not use a session runtime. |
|
|
138
|
+
| | `startup` | `true` | Also run the same checks once at plugin load — install + restart — against the pinned or WSL-default distro, so the verdict is in the log before any session opens. |
|
|
138
139
|
| `wsl-shell-env` | `distro` | `''` | Distro used to populate the `DSH_WSL_*` environment facts. |
|
|
139
140
|
| | `portsRefreshMs` | `10000` | Listening-port snapshot interval, in milliseconds. |
|
|
141
|
+
| `wsl-update-check` | `enabled` | `true` | Whether the plugin checks the app's plugin manager for a newer stable release. The result is served as `DSH_WSL_PLUGIN_UPDATE`; the check never installs. |
|
|
142
|
+
| | `intervalMs` | `86400000` | Check interval, in milliseconds (first check 2–10 minutes after startup); floored at one minute. |
|
|
140
143
|
|
|
141
144
|
The GUI file tree and previews use the bundled `workspace-files` row through
|
|
142
145
|
`fs-routing`; they do not use a separate WSL provider row. To change its
|
|
@@ -286,7 +289,11 @@ distros, the direct install command is:
|
|
|
286
289
|
wsl.exe -d <distro> -u root -- apt-get install -y bubblewrap
|
|
287
290
|
```
|
|
288
291
|
|
|
289
|
-
The `wsl-preflight` row runs these checks when a session opens
|
|
292
|
+
The `wsl-preflight` row runs these checks when a session opens, and — with
|
|
293
|
+
`startup: true`, the default — once at plugin load against the pinned or
|
|
294
|
+
WSL-default distro, so an install plus restart already carries the verdict in
|
|
295
|
+
the log; a session on that distro then repeats only the runtime-context entry.
|
|
296
|
+
It also checks
|
|
290
297
|
the session-runtime prerequisites when `sessionSandbox: true`. The warning is
|
|
291
298
|
advisory: it does not install packages or change the providers' fail-closed
|
|
292
299
|
behavior. Set `sandbox: false` on this row or remove it to silence the
|
|
@@ -298,13 +305,40 @@ without confinement; their `sandboxMode` becomes `undefined`. The tool layer
|
|
|
298
305
|
reports that no sandbox is active. On `fs-routing`, the setting disables the
|
|
299
306
|
mutation fence; that row reports `sandboxMode: undefined` either way.
|
|
300
307
|
|
|
308
|
+
### Message language
|
|
309
|
+
|
|
310
|
+
The plugin's refusal and remedy messages (the `sessionSandbox` preflight
|
|
311
|
+
verdicts, the `bwrap` install and repair hints, and the distro/workdir
|
|
312
|
+
command errors) follow the harness app's Language setting: the preference is
|
|
313
|
+
read from the host `locale` entry's `preference` field through the host
|
|
314
|
+
settings service, and a language switch takes effect without a restart.
|
|
315
|
+
Chinese (`zh`, including `zh-CN` and `zh-Hans` tags) and English ship; every
|
|
316
|
+
other language — and any profile without the settings service, or an unset
|
|
317
|
+
preference — renders English. Commands, config keys and file paths inside a
|
|
318
|
+
message are never translated. Three message groups stay English by design:
|
|
319
|
+
the `FS_*` refusal texts in `fs-decisions` and the fsio replica (the tool
|
|
320
|
+
layer matches on those strings byte-for-byte), and the standalone
|
|
321
|
+
`scripts/doctor.mjs`, which runs outside the app.
|
|
322
|
+
|
|
301
323
|
## Diagnose configuration and refusals
|
|
302
324
|
|
|
325
|
+
In a session the model can run the diagnosis itself: the `wsl_doctor` tool
|
|
326
|
+
(mounted inside `preset-wsl`) calls the doctor in-process and returns the
|
|
327
|
+
verdict with per-failure remedies — the user just asks for a diagnosis.
|
|
328
|
+
`DSH_WSL_DOCTOR` additionally carries a ready-to-run command that executes
|
|
329
|
+
the doctor script from inside the distro (the app's own runtime as Node,
|
|
330
|
+
through interop) — run it as `sh -c "$DSH_WSL_DOCTOR --json"`. And
|
|
303
331
|
`pnpm run doctor` is the one-command environment check: Windows/WSL versions,
|
|
304
|
-
the distro
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
332
|
+
the per-distro WSL mode, `.wslconfig` and `/etc/wsl.conf` cross-checks, the
|
|
333
|
+
disk, the clock, DNS, the distro and its shell, bubblewrap, systemd/Linger,
|
|
334
|
+
the peer floor, a fresh agent handshake, stale session scopes, the known
|
|
335
|
+
profile-patch and deprecated-key traps — each failure with a copyable remedy.
|
|
336
|
+
The run ends in a verdict (`ready` or `blocked`) computed under the effective
|
|
337
|
+
configuration: `--json` is the machine contract (schemaVersion 2), `--fix`
|
|
338
|
+
re-verifies what it fixed, `--all` checks every installed distro, `--bundle
|
|
339
|
+
<path>` writes the attachable diagnostic file (`--redact` strips the paths).
|
|
340
|
+
See [DIAGNOSTICS.md](DIAGNOSTICS.md) for the verdict contract and the
|
|
341
|
+
error-code map. With the CLI distribution, `dsh --profile <name> --dump-config` inspects
|
|
308
342
|
the composed profile without booting it and shows whether a row override
|
|
309
343
|
applied; the desktop app has no `dsh` command, so read `cordis.patch.yml` and
|
|
310
344
|
the Plugins page there.
|
package/docs/CONFIGURATION.zh.md
CHANGED
|
@@ -133,6 +133,7 @@ Loader 在挂载该行之前会校验宿主和发行版设置;
|
|
|
133
133
|
| | `wslPath` | `wsl.exe` | `wsl.exe` 的路径。 |
|
|
134
134
|
| | `sandbox` | `true` | 运行会话启动时的 `bwrap` 检查。 |
|
|
135
135
|
| | `sessionSandbox` | `true` | 同时检查 systemd、user manager、`systemd-run` 和 Linger。profile 不使用会话 runtime 时设为 false。 |
|
|
136
|
+
| | `startup` | `true` | 插件加载时(即安装 + 重启后)对 pin 的或 WSL 默认发行版预先运行同一组检查,让判定在任何会话打开之前就出现在日志里。 |
|
|
136
137
|
| `wsl-shell-env` | `distro` | `''` | 用于填充 `DSH_WSL_*` 环境事实的发行版。 |
|
|
137
138
|
| | `portsRefreshMs` | `10000` | 监听端口快照的刷新间隔,单位毫秒。 |
|
|
138
139
|
|
|
@@ -276,7 +277,9 @@ scripts/bootstrap.sh <distro> --install
|
|
|
276
277
|
wsl.exe -d <distro> -u root -- apt-get install -y bubblewrap
|
|
277
278
|
```
|
|
278
279
|
|
|
279
|
-
会话打开时,`wsl-preflight`
|
|
280
|
+
会话打开时,`wsl-preflight` 行会运行这些检查;`startup: true`(默认)时,
|
|
281
|
+
插件加载阶段还会对 pin 的或 WSL 默认发行版预先运行同一组检查,因此安装加
|
|
282
|
+
重启之后判定就已经出现在日志里,该发行版上的会话只会重复注入运行时上下文条目。
|
|
280
283
|
`sessionSandbox: true` 时,它还会检查会话 runtime 的前置条件。
|
|
281
284
|
该警告仅供参考:它不会安装软件包,也不会改变提供者关闭(fail-closed)
|
|
282
285
|
的行为。在该行设置 `sandbox: false` 或移除该行可让沙箱警告静音。
|
|
@@ -287,6 +290,17 @@ profile 不使用会话 runtime 时,设置 `sessionSandbox: false`。
|
|
|
287
290
|
会报告没有沙箱生效。在 `fs-routing` 上,该设置会禁用变更围栏;
|
|
288
291
|
无论开关如何,该行都报告 `sandboxMode: undefined`。
|
|
289
292
|
|
|
293
|
+
### 消息语言
|
|
294
|
+
|
|
295
|
+
插件的拒绝与修复消息(`sessionSandbox` 预检判定、`bwrap` 的安装与修复提示、
|
|
296
|
+
发行版/工作目录命令错误)跟随 harness 应用的语言设置:偏好经宿主 settings
|
|
297
|
+
服务从 `locale` 条目的 `preference` 字段读取,切换语言无需重启应用。
|
|
298
|
+
内置中文(`zh`,含 `zh-CN`、`zh-Hans` 标签)与英文;其他语言——以及
|
|
299
|
+
没有 settings 服务的 profile 或未设置偏好的情况——渲染英文。消息内的
|
|
300
|
+
命令、配置键与文件路径一律不翻译。三组消息按设计保持英文:
|
|
301
|
+
`fs-decisions` 中的 `FS_*` 拒绝文本与 fsio 复刻(工具层按字节匹配这些
|
|
302
|
+
字符串),以及独立运行的 `scripts/doctor.mjs`(它在应用之外执行)。
|
|
303
|
+
|
|
290
304
|
## 诊断配置问题与拒绝
|
|
291
305
|
|
|
292
306
|
CLI 发行版可用 `dsh --profile <name> --dump-config` 检查合成后的 profile,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Diagnostics: the doctor and the error-code map
|
|
2
|
+
|
|
3
|
+
Every refusal this plugin produces is named. This page is the map between
|
|
4
|
+
those names and the doctor: for each error code, whether the `doctor`
|
|
5
|
+
(`pnpm run doctor`, or `node scripts/doctor.mjs --json`) covers its
|
|
6
|
+
precondition, and which check id answers for it. The authoritative meaning
|
|
7
|
+
and remedy of each code live in [ARCHITECTURE.md](ARCHITECTURE.md#error-codes);
|
|
8
|
+
this page adds the diagnostics dimension and the verdict contract.
|
|
9
|
+
|
|
10
|
+
## The doctor's verdict
|
|
11
|
+
|
|
12
|
+
`doctor --json` (schemaVersion 2) ends in `verdict: "ready" | "blocked"`
|
|
13
|
+
with the blocking ids in `blockers`, and a per-distro breakdown in
|
|
14
|
+
`distroVerdicts`. The blocking rule has one invariant: **a `fail` blocks** —
|
|
15
|
+
config-awareness lives in the statuses (a missing systemd only fails under
|
|
16
|
+
`sessionSandbox: true`; `auto` names its per-command fallback and `false`
|
|
17
|
+
names the opt-out, both as warnings), so the verdict answers under the
|
|
18
|
+
**effective configuration** — the profile layers the app loads, overlaid on
|
|
19
|
+
the shipped preset — not the shipped defaults. The `config.effective` check
|
|
20
|
+
reports what was read and from where.
|
|
21
|
+
|
|
22
|
+
`verdict: ready` means the first command should succeed in the target
|
|
23
|
+
distro(s) under the expected scope; the smoke legs (`functional.exec`,
|
|
24
|
+
`functional.sandbox`, `functional.fs`) prove the chain itself — frame I/O,
|
|
25
|
+
the confined fence, the batched substrate — not just the prerequisites.
|
|
26
|
+
A leg whose prerequisite failed reports `skipped` with the blocker named;
|
|
27
|
+
`skipped` never blocks.
|
|
28
|
+
|
|
29
|
+
`--fix` ends in a re-verified report: every fix is followed by a fresh probe
|
|
30
|
+
of what it claims to have fixed, the affected checks carry the after state,
|
|
31
|
+
and the verdict is recomputed — `ready`, or the remaining blockers. Remedies
|
|
32
|
+
that rewrite user- or distro-owned files (`.wslconfig`, `/etc/wsl.conf`, a
|
|
33
|
+
WSL1 conversion, installing a distro) are never automated; the remedy text
|
|
34
|
+
says so.
|
|
35
|
+
|
|
36
|
+
`--bundle <path>` writes a local JSON file (report + versions + effective
|
|
37
|
+
configuration) for a setup report; `--redact` replaces home and DSH paths
|
|
38
|
+
with `<redacted-*>` placeholders. The bundle contains no file contents, no
|
|
39
|
+
environment variables, and no telemetry.
|
|
40
|
+
|
|
41
|
+
## The map
|
|
42
|
+
|
|
43
|
+
Class legend:
|
|
44
|
+
|
|
45
|
+
- **environment** — a machine state the doctor probes; `doctor` green covers
|
|
46
|
+
it.
|
|
47
|
+
- **policy** — a per-call decision (the sandbox fence, the distro fence);
|
|
48
|
+
the doctor proves the fence's shape, the call decides the case.
|
|
49
|
+
- **data** — caller- or data-transient; no machine precondition exists, so
|
|
50
|
+
no doctor check claims it.
|
|
51
|
+
|
|
52
|
+
| Code | Class | Doctor checks | In one line |
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| `SANDBOX_UNAVAILABLE` | environment | `sandbox.bwrap`, `sandbox.bwrap-usable`, `functional.sandbox` | the requested confinement cannot be enforced (no usable bubblewrap) |
|
|
55
|
+
| `FS_SANDBOX_DENIED` | policy | `functional.sandbox` (the fence shape) | the file-effect policy refused the write, or the kernel refused it at the resident's profile |
|
|
56
|
+
| `FS_OUTSIDE_DISTRO` | policy | `config.effective` (the effective `distro`) | the path names another distro's share while the fence is pinned |
|
|
57
|
+
| `FS_IO_ERROR` | environment | `distro.reachable`, `distro.disk`, `agent.handshake`, `functional.exec`, `functional.fs` | the catch-all: an agent outage, a wedged distro, a full disk, an unmappable path |
|
|
58
|
+
| `FS_NOT_FOUND` | data | — | the path does not exist — the ordinary answer |
|
|
59
|
+
| `FS_NOT_REGULAR_FILE` | data | — | a directory, symlink or device where a regular file is required |
|
|
60
|
+
| `FS_NOT_DIRECTORY` | data | — | a list was asked of a non-directory |
|
|
61
|
+
| `FS_NOT_TEXT` | data | — | the content is not UTF-8 text |
|
|
62
|
+
| `FS_TOO_LARGE` | data | — | the content exceeds the caller's byte cap |
|
|
63
|
+
| `FS_ABORTED` | data | — | the caller's own signal cancelled the call |
|
|
64
|
+
| `FS_NOT_OBSERVED` | data | — | a guarded create targeted a file that existed unread |
|
|
65
|
+
| `FS_STALE_VERSION` | data | — | the caller's version is stale; re-read and retry |
|
|
66
|
+
| `FS_EDIT_NOT_FOUND` | data | — | the literal edit matched nothing |
|
|
67
|
+
| `FS_AMBIGUOUS_EDIT` | data | — | the literal edit matched more than once |
|
|
68
|
+
| `FS_PATCH_MISMATCH` | data | — | the hunks no longer match the file; rebuild them |
|
|
69
|
+
| `FS_SAME_TARGET` | data | — | a move whose source and destination are the same file |
|
|
70
|
+
| `AgentUnavailableError` | environment | `agent.handshake`, `agent.native`, `agent.cache`, `functional.exec` | the execution layer's revival budget is spent; the named state says so |
|
|
71
|
+
|
|
72
|
+
The agent's structured FS reasons (`notfound`, `notdir`, `perm`, `loop`,
|
|
73
|
+
`stale`, `io`) map onto the codes above at `lib/fsio-agent.js`; the wire
|
|
74
|
+
dialect itself is [AGENT-PROTOCOL-V7.md](AGENT-PROTOCOL-V7.md).
|
|
75
|
+
|
|
76
|
+
## When the doctor is green but a call still fails
|
|
77
|
+
|
|
78
|
+
That is the **policy** and **data** classes doing their jobs: a refusal the
|
|
79
|
+
doctor cannot predict because it depends on the call, not the machine. If a
|
|
80
|
+
call fails repeatedly with an **environment**-class code while the doctor
|
|
81
|
+
says `ready`, that is a bug — file it with the `doctor --bundle` output (a
|
|
82
|
+
[setup report](https://github.com/Big-Dao/dsh-plugin-wsl-env/blob/main/.github/ISSUE_TEMPLATE/setup_report.yml)
|
|
83
|
+
carries it).
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# 诊断:doctor 与错误码地图
|
|
2
|
+
|
|
3
|
+
本插件产生的每一个拒绝都有名字。本页是这些名字与 doctor 的对照表:
|
|
4
|
+
对每个错误码,说明 `doctor`(`pnpm run doctor`,或
|
|
5
|
+
`node scripts/doctor.mjs --json`)是否覆盖其前置条件、由哪个检查 id 应答。
|
|
6
|
+
每个码的权威含义与修复在 [ARCHITECTURE.md](ARCHITECTURE.md)(错误码一节);
|
|
7
|
+
本页补充诊断维度与 verdict 契约。
|
|
8
|
+
|
|
9
|
+
## doctor 的裁决
|
|
10
|
+
|
|
11
|
+
`doctor --json`(schemaVersion 2)以 `verdict: "ready" | "blocked"` 收尾,
|
|
12
|
+
阻断 id 列在 `blockers`,按 distro 的细分在 `distroVerdicts`。阻断规则只有
|
|
13
|
+
一条不变式:**`fail` 即阻断**——配置感知体现在状态上(缺 systemd 只在
|
|
14
|
+
`sessionSandbox: true` 时 fail;`auto` 点名其 per-command 回退,`false`
|
|
15
|
+
点名选择退出,两者均为 warn),因此裁决回答的是**生效配置**——应用实际
|
|
16
|
+
加载的 profile 层叠加在出厂 preset 之上——而不是出厂默认。`config.effective`
|
|
17
|
+
检查报告读到了什么、从哪里读的。
|
|
18
|
+
|
|
19
|
+
`verdict: ready` 表示首条命令应在目标 distro、预期 scope 下成功;smoke 腿
|
|
20
|
+
(`functional.exec`、`functional.sandbox`、`functional.fs`)证明链路本身——
|
|
21
|
+
帧 I/O、受限围栏、批量 substrate——而不只是前置条件。前置失败的腿以
|
|
22
|
+
`skipped` 报告并点名阻断者;`skipped` 永不阻断。
|
|
23
|
+
|
|
24
|
+
`--fix` 以复验报告收尾:每个修复后都跟着一次对它声称修好的东西的全新探查,
|
|
25
|
+
受影响的检查项携带 after 状态,verdict 重算——`ready`,或剩余阻断者。
|
|
26
|
+
会改写用户或 distro 所有文件的修复(`.wslconfig`、`/etc/wsl.conf`、WSL1
|
|
27
|
+
转换、安装 distro)永不开户自动化;remedy 文本会写明。
|
|
28
|
+
|
|
29
|
+
`--bundle <path>` 写出本地 JSON 文件(报告 + 版本 + 生效配置)供 setup
|
|
30
|
+
report 附带;`--redact` 把 home 与 DSH 路径替换为 `<redacted-*>` 占位符。
|
|
31
|
+
bundle 不含文件内容、环境变量,也没有遥测。
|
|
32
|
+
|
|
33
|
+
## 地图
|
|
34
|
+
|
|
35
|
+
类别图例:
|
|
36
|
+
|
|
37
|
+
- **environment**——doctor 探查的机器状态;doctor 绿即覆盖。
|
|
38
|
+
- **policy**——按调用决定(沙箱围栏、distro 围栏);doctor 证明围栏形状,
|
|
39
|
+
调用决定具体情形。
|
|
40
|
+
- **data**——调用方或数据瞬态;不存在机器前置条件,因此没有 doctor 检查
|
|
41
|
+
认领它。
|
|
42
|
+
|
|
43
|
+
| 码 | 类别 | doctor 检查 | 一句话 |
|
|
44
|
+
|---|---|---|---|
|
|
45
|
+
| `SANDBOX_UNAVAILABLE` | environment | `sandbox.bwrap`、`sandbox.bwrap-usable`、`functional.sandbox` | 所请求的隔离无法强制(无可用 bubblewrap) |
|
|
46
|
+
| `FS_SANDBOX_DENIED` | policy | `functional.sandbox`(围栏形状) | 文件效果策略拒绝了写入,或内核在驻留 agent 的 profile 处拒绝 |
|
|
47
|
+
| `FS_OUTSIDE_DISTRO` | policy | `config.effective`(生效的 `distro`) | 围栏钉死时路径指向另一 distro 的共享 |
|
|
48
|
+
| `FS_IO_ERROR` | environment | `distro.reachable`、`distro.disk`、`agent.handshake`、`functional.exec`、`functional.fs` | 兜底:agent 失联、distro 僵死、磁盘满、无法映射的路径 |
|
|
49
|
+
| `FS_NOT_FOUND` | data | — | 路径不存在——普通答案 |
|
|
50
|
+
| `FS_NOT_REGULAR_FILE` | data | — | 需要常规文件处出现了目录、符号链接或设备 |
|
|
51
|
+
| `FS_NOT_DIRECTORY` | data | — | 对非目录发起列表 |
|
|
52
|
+
| `FS_NOT_TEXT` | data | — | 内容不是 UTF-8 文本 |
|
|
53
|
+
| `FS_TOO_LARGE` | data | — | 内容超出调用方携带的字节上限 |
|
|
54
|
+
| `FS_ABORTED` | data | — | 调用方自己的信号取消了调用 |
|
|
55
|
+
| `FS_NOT_OBSERVED` | data | — | 受守卫的创建命中了存在但未读过的文件 |
|
|
56
|
+
| `FS_STALE_VERSION` | data | — | 调用方版本过期;重读后重试 |
|
|
57
|
+
| `FS_EDIT_NOT_FOUND` | data | — | 字面编辑没有命中 |
|
|
58
|
+
| `FS_AMBIGUOUS_EDIT` | data | — | 字面编辑命中多处 |
|
|
59
|
+
| `FS_PATCH_MISMATCH` | data | — | hunk 与文件不再吻合;按新文本重建 |
|
|
60
|
+
| `FS_SAME_TARGET` | data | — | move 的源与目的地解析为同一文件 |
|
|
61
|
+
| `AgentUnavailableError` | environment | `agent.handshake`、`agent.native`、`agent.cache`、`functional.exec` | 执行层的复活预算耗尽;具名状态会说明 |
|
|
62
|
+
|
|
63
|
+
agent 的结构化 FS 原因(`notfound`、`notdir`、`perm`、`loop`、`stale`、
|
|
64
|
+
`io`)在 `lib/fsio-agent.js` 映射到上表各码;线上方言本身见
|
|
65
|
+
[AGENT-PROTOCOL-V7.md](AGENT-PROTOCOL-V7.md)。
|
|
66
|
+
|
|
67
|
+
## doctor 绿但调用仍失败
|
|
68
|
+
|
|
69
|
+
那是 **policy** 与 **data** 类别在正常工作:doctor 无法预测取决于调用而非
|
|
70
|
+
机器的拒绝。若某个 **environment** 类错误码反复出现而 doctor 显示 `ready`,
|
|
71
|
+
那是缺陷——附上 `doctor --bundle` 输出提报
|
|
72
|
+
([setup report](https://github.com/Big-Dao/dsh-plugin-wsl-env/blob/main/.github/ISSUE_TEMPLATE/setup_report.yml)
|
|
73
|
+
会携带它)。
|