dsh-plugin-wsl-env 0.28.0 → 0.29.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/CHANGELOG.md +368 -0
- package/CONTRIBUTING.md +68 -12
- package/CONTRIBUTING.zh.md +34 -4
- package/README.md +1 -1
- package/agent/native/linux-aarch64/dsh-wsl-agent +0 -0
- package/agent/native/linux-x86_64/dsh-wsl-agent +0 -0
- package/agent/wsl-agent.sh +15 -4
- package/client.js +540 -160
- package/cordis.patch.yml +28 -7
- package/docs/AGENT-PROTOCOL-V7.md +4 -2
- package/docs/API.md +1 -1
- package/docs/API.zh.md +1 -1
- package/docs/ARCHITECTURE.md +7 -4
- package/docs/ARCHITECTURE.zh.md +6 -4
- package/docs/COMPATIBILITY.md +1 -1
- package/docs/COMPATIBILITY.zh.md +1 -1
- package/docs/CONFIGURATION.md +28 -15
- package/docs/CONFIGURATION.zh.md +20 -11
- package/docs/DIAGNOSTICS.md +45 -19
- package/docs/DIAGNOSTICS.zh.md +33 -15
- package/docs/LIMITATIONS.md +70 -10
- package/docs/LIMITATIONS.zh.md +53 -8
- package/docs/PERFORMANCE.md +29 -1
- package/docs/PERFORMANCE.zh.md +23 -1
- package/docs/QUICKSTART.md +21 -15
- package/docs/QUICKSTART.zh.md +13 -11
- package/docs/README.zh.md +1 -1
- package/docs/RELEASING.md +29 -6
- package/docs/RELEASING.zh.md +9 -0
- package/docs/adr/0002-native-agent.md +50 -2
- package/lib/agent-confined.js +15 -4
- package/lib/agent-errors.d.ts +16 -0
- package/lib/agent-errors.js +19 -0
- package/lib/agent-exec.d.ts +8 -1
- package/lib/agent-exec.js +2 -1
- package/lib/agent-shared.d.ts +85 -2
- package/lib/agent-shared.js +167 -38
- package/lib/agent.d.ts +60 -6
- package/lib/agent.js +177 -28
- package/lib/auto-preset.js +7 -2
- package/lib/doctor-live.d.ts +36 -7
- package/lib/doctor-live.js +61 -12
- package/lib/doctor-process.d.ts +68 -0
- package/lib/doctor-process.js +139 -0
- package/lib/doctor-report.js +11 -109
- package/lib/fs-substrate.js +3 -3
- package/lib/fsio-agent.d.ts +57 -6
- package/lib/fsio-agent.js +168 -75
- package/lib/git-exec.d.ts +7 -1
- package/lib/git-exec.js +14 -2
- package/lib/native-agent.d.ts +25 -4
- package/lib/native-agent.js +52 -9
- package/lib/picker.d.ts +2 -1
- package/lib/picker.js +30 -13
- package/lib/plugin-update.js +18 -14
- package/lib/provider-common.d.ts +112 -0
- package/lib/provider-common.js +171 -0
- package/lib/sandbox-core.js +52 -13
- package/lib/search-exec.d.ts +6 -0
- package/lib/search-exec.js +10 -2
- package/lib/session-runtime.d.ts +46 -1
- package/lib/session-runtime.js +57 -7
- package/lib/session-scope.d.ts +22 -1
- package/lib/session-scope.js +33 -7
- package/lib/shell-env.js +125 -12
- package/lib/socket-isolation.d.ts +12 -4
- package/lib/socket-isolation.js +27 -10
- package/lib/status.d.ts +7 -4
- package/lib/status.js +72 -16
- package/lib/subprocess.js +3 -3
- package/lib/terminal-activity.js +6 -9
- package/lib/wsl-doctor-command.js +36 -80
- package/lib/wsl-filesystem.d.ts +9 -4
- package/lib/wsl-filesystem.js +26 -10
- package/lib/wsl-shell.d.ts +27 -17
- package/lib/wsl-shell.js +83 -24
- package/lib/wsl.d.ts +3 -1
- package/lib/wsl.js +82 -7
- package/package.json +5 -4
- package/scripts/bootstrap.sh +36 -12
- package/scripts/doctor.mjs +514 -201
package/agent/wsl-agent.sh
CHANGED
|
@@ -449,7 +449,7 @@ fs_list() {
|
|
|
449
449
|
# stat and identity with one follow-up per link — the peer lists follow-stats
|
|
450
450
|
# but has to know which entries are links all the same. Names are safe inside
|
|
451
451
|
# records (records split on NUL, names taken after the 6th TAB).
|
|
452
|
-
local d err
|
|
452
|
+
local d err rc
|
|
453
453
|
d=$(b64dec "$1")
|
|
454
454
|
# The LIST TARGET follows symlinks, like every read path: `find` does not
|
|
455
455
|
# traverse its starting point, so a symlink-to-directory used to list EMPTY
|
|
@@ -460,10 +460,21 @@ fs_list() {
|
|
|
460
460
|
err=$(cat "$ERR_FILE")
|
|
461
461
|
fs_fail "$(fs_classify "$err")" "$err"
|
|
462
462
|
}
|
|
463
|
-
find "$d" -mindepth 1 -maxdepth 1 -printf '%y\t%s\t%D\t%i\t%T@\t%C@\t%p\0' 2>"$ERR_FILE"
|
|
463
|
+
find "$d" -mindepth 1 -maxdepth 1 -printf '%y\t%s\t%D\t%i\t%T@\t%C@\t%p\0' 2>"$ERR_FILE"
|
|
464
|
+
rc=$?
|
|
465
|
+
if [ "$rc" -ne 0 ]; then
|
|
464
466
|
err=$(cat "$ERR_FILE")
|
|
465
|
-
|
|
466
|
-
|
|
467
|
+
# An entry that appeared and vanished again between the directory read
|
|
468
|
+
# and its own stat is not a failed listing: `find` names it on stderr and
|
|
469
|
+
# exits 1, while the directory itself never went away and every other
|
|
470
|
+
# entry is already in the records written. That one diagnostic, and only
|
|
471
|
+
# it, is tolerated — and only while the directory is still there.
|
|
472
|
+
if [ -n "$err" ] && [ -d "$d" ] && ! printf '%s\n' "$err" | grep -v ': No such file or directory$' | grep -q .; then
|
|
473
|
+
:
|
|
474
|
+
else
|
|
475
|
+
fs_fail "$(fs_classify "$err")" "$err"
|
|
476
|
+
fi
|
|
477
|
+
fi
|
|
467
478
|
}
|
|
468
479
|
|
|
469
480
|
fs_realpath() {
|