dsh-plugin-wsl-env 0.22.0 → 0.23.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.
Files changed (81) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/CONTRIBUTING.md +7 -3
  3. package/README.md +11 -9
  4. package/SUPPORT.md +1 -1
  5. package/cordis.patch.yml +4 -4
  6. package/docs/AGENT-PROTOCOL-V7.md +4 -4
  7. package/docs/API.md +12 -2
  8. package/docs/ARCHITECTURE.md +59 -19
  9. package/docs/CONFIGURATION.md +40 -18
  10. package/docs/CONFIGURATION.zh.md +44 -8
  11. package/docs/DIAGNOSTICS.md +19 -6
  12. package/docs/DIAGNOSTICS.zh.md +15 -6
  13. package/docs/LIMITATIONS.md +42 -17
  14. package/docs/LIMITATIONS.zh.md +47 -12
  15. package/docs/MIGRATION.md +1 -1
  16. package/docs/PEER-PARITY.md +8 -7
  17. package/docs/QUICKSTART.md +16 -8
  18. package/docs/QUICKSTART.zh.md +22 -4
  19. package/docs/README.zh.md +19 -10
  20. package/docs/RELEASING.md +8 -3
  21. package/docs/REQUIREMENTS.zh.md +11 -6
  22. package/docs/ROADMAP-1.0.md +12 -11
  23. package/docs/ROADMAP.md +10 -8
  24. package/docs/UPSTREAM-FILE-REFERENCE-SEAM.md +3 -2
  25. package/docs/UPSTREAM-FSIO-EXPORT.md +8 -9
  26. package/docs/UPSTREAM-SERVICE-SWAP.md +9 -5
  27. package/docs/UPSTREAM-TERMINAL-TITLE.md +9 -8
  28. package/docs/VALUE.zh.md +5 -5
  29. package/docs/root-fs-routing.md +27 -19
  30. package/lib/agent-confined.d.ts +2 -2
  31. package/lib/agent-confined.js +0 -1
  32. package/lib/agent-exec.d.ts +2 -11
  33. package/lib/agent-protocol.d.ts +6 -5
  34. package/lib/agent.d.ts +5 -5
  35. package/lib/auto-preset.d.ts +4 -3
  36. package/lib/bwrap.d.ts +2 -1
  37. package/lib/client-host.d.ts +1 -1
  38. package/lib/client-host.js +1 -1
  39. package/lib/cwd-prompt-tool.d.ts +4 -20
  40. package/lib/cwd-prompt.d.ts +11 -10
  41. package/lib/distro-route.d.ts +3 -2
  42. package/lib/doctor-live.d.ts +2 -1
  43. package/lib/fs-routing.d.ts +30 -1
  44. package/lib/fs-routing.js +31 -3
  45. package/lib/fs-substrate.d.ts +0 -1
  46. package/lib/fs-substrate.js +0 -1
  47. package/lib/fsio-agent.d.ts +3 -21
  48. package/lib/fsio-agent.js +2 -4
  49. package/lib/git-exec.d.ts +3 -2
  50. package/lib/git-route.d.ts +4 -2
  51. package/lib/git-route.js +4 -2
  52. package/lib/index.d.ts +9 -10
  53. package/lib/index.js +124 -12
  54. package/lib/listing.d.ts +2 -1
  55. package/lib/messages.d.ts +1 -1
  56. package/lib/native-agent.d.ts +3 -2
  57. package/lib/paths.d.ts +2 -1
  58. package/lib/picker.d.ts +1 -14
  59. package/lib/picker.js +1 -2
  60. package/lib/preflight.d.ts +5 -4
  61. package/lib/probe-cache.d.ts +2 -1
  62. package/lib/sandbox-core.d.ts +2 -11
  63. package/lib/sandbox-core.js +1 -1
  64. package/lib/sandbox.d.ts +0 -1
  65. package/lib/sandbox.js +0 -4
  66. package/lib/search-exec.d.ts +2 -1
  67. package/lib/session-runtime.d.ts +3 -2
  68. package/lib/shell-env.d.ts +3 -2
  69. package/lib/shell.d.ts +1 -1
  70. package/lib/shell.js +1 -1
  71. package/lib/subprocess.d.ts +1 -1
  72. package/lib/update-check.d.ts +3 -3
  73. package/lib/wsl-doctor-command.d.ts +38 -10
  74. package/lib/wsl-doctor-command.js +168 -27
  75. package/lib/wsl-doctor-tool.d.ts +9 -16
  76. package/lib/wsl-doctor-tool.js +10 -4
  77. package/lib/wsl.d.ts +3 -2
  78. package/package.json +27 -33
  79. package/scripts/bootstrap-import.sh +189 -0
  80. package/scripts/open-wsl-vscode.ps1 +36 -0
  81. package/examples/preset-wsl-session-sandbox.cordis.patch.yml +0 -178
@@ -0,0 +1,189 @@
1
+ #!/usr/bin/env bash
2
+ # Import a distro from a rootfs tarball and configure it for this plugin, in
3
+ # one pass — the compatibility-matrix run's import traps, automated
4
+ # (WSL-310; the traps are documented in docs/COMPATIBILITY.md).
5
+ #
6
+ # scripts/bootstrap-import.sh <tarball> <distro-name> [--user <name>] [--dir <windows dir>]
7
+ #
8
+ # What it does, in order, printing every config write before it applies it:
9
+ #
10
+ # 1. detect the tarball's architecture from an ELF header (x86_64/aarch64);
11
+ # 2. `wsl --import` into %USERPROFILE%\wsl\<name> (or --dir);
12
+ # 3. unstick the first launch: a wedged OOBE is terminated and bypassed by
13
+ # starting as root (the Debian 13.5 wedge from the matrix run);
14
+ # 4. write /etc/wsl.conf: [boot] systemd=true for systemd families, and
15
+ # [user] default=<name> — an imported default-root distro makes the
16
+ # agent run as root, whose 0600 files no user can read (the substrate
17
+ # probe's four failures);
18
+ # 5. create the user when the tarball has none;
19
+ # 6. install bubblewrap through the distro's own package manager;
20
+ # 7. enable Linger (systemd families only — OpenRC distros run the
21
+ # non-systemd path and sessionSandbox reports the narrower scope);
22
+ # 8. hand the result to `doctor <name> --read-only` for the final pass —
23
+ # the bootstrap does not grade itself.
24
+ #
25
+ # The script is idempotent per distro name: an existing distro of the same
26
+ # name is reported and left alone (wsl --import would refuse anyway).
27
+
28
+ set -euo pipefail
29
+
30
+ TARBALL="${1:-}"
31
+ NAME="${2:-}"
32
+ USER_NAME=""
33
+ INSTALL_DIR=""
34
+ shift 2 2>/dev/null || true
35
+ while [ $# -gt 0 ]; do
36
+ case "$1" in
37
+ --user) USER_NAME="${2:-}"; shift 2 ;;
38
+ --dir) INSTALL_DIR="${2:-}"; shift 2 ;;
39
+ *) echo "bootstrap-import: unknown argument $1" >&2; exit 1 ;;
40
+ esac
41
+ done
42
+
43
+ [ -n "$TARBALL" ] && [ -f "$TARBALL" ] || { echo "bootstrap-import: usage: $0 <tarball> <distro-name> [--user <name>] [--dir <dir>]" >&2; exit 1; }
44
+ [ -n "$NAME" ] || { echo "bootstrap-import: a distro name is required" >&2; exit 1; }
45
+ case "$NAME" in *[!a-zA-Z0-9._-]*) echo "bootstrap-import: invalid distro name '$NAME'" >&2; exit 1 ;; esac
46
+
47
+ HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
48
+
49
+ step() { printf '\n== %s ==\n' "$1"; }
50
+
51
+ # ---- 1. architecture --------------------------------------------------------
52
+ step "1. tarball architecture"
53
+ # Docker export tars list top-level "bin/…", distro rootfs tars list
54
+ # "./usr/bin/…" — and some candidates are directories whose extraction yields
55
+ # no bytes, so walk the list until one produces an ELF header.
56
+ FIRST_BIN=""
57
+ for candidate in $(tar ${TOPT:-} -tf "$TARBALL" | grep -E '^\.{0,2}/?(usr/)?bin/[^/]+$' | head -10); do
58
+ # dd exits after two bytes, which SIGPIPEs tar — pipefail would kill this
59
+ # script for the expected behaviour, so the pipeline is tolerated and only
60
+ # a non-empty header counts.
61
+ header="$( { tar ${TOPT:-} -xOf "$TARBALL" "$candidate" 2>/dev/null || true; } | { dd bs=1 skip=18 count=2 2>/dev/null || true; } | od -An -tx1 | tr -d ' \n' || true)"
62
+ if [ -n "$header" ]; then FIRST_BIN="$candidate"; break; fi
63
+ done
64
+ # docker export produces an uncompressed tar; the cloud/rootfs images ship
65
+ # .gz and .xz. The compression flag follows the filename.
66
+ case "$TARBALL" in
67
+ *.gz|*.tgz) TOPT="-z" ;;
68
+ *.xz) TOPT="-J" ;;
69
+ *.bz2) TOPT="-j" ;;
70
+ *) TOPT="" ;;
71
+ esac
72
+ MACHINE="$header"
73
+ # e_machine is little-endian at offset 0x12: bytes "3e 00" = x86_64,
74
+ # "b7 00" = aarch64.
75
+ case "$MACHINE" in
76
+ 3e00) ARCH="x86_64" ;;
77
+ b700) ARCH="aarch64" ;;
78
+ *) echo "bootstrap-import: unknown ELF machine '$MACHINE' — cannot pick the agent architecture" >&2; exit 1 ;;
79
+ esac
80
+ echo "arch: $ARCH"
81
+
82
+ # ---- 2. import --------------------------------------------------------------
83
+ step "2. import"
84
+ if [ -z "$INSTALL_DIR" ]; then
85
+ USERPROFILE_WIN="$(cmd.exe /c "echo %USERPROFILE%" 2>/dev/null | tr -d '\r\n')"
86
+ case "$USERPROFILE_WIN" in "%"*) echo "bootstrap-import: cannot read %USERPROFILE% through interop; pass --dir" >&2; exit 1 ;; esac
87
+ INSTALL_DIR="$(wslpath -u "$USERPROFILE_WIN")/wsl/$NAME"
88
+ INSTALL_DIR_WIN="$(wslpath -w "$INSTALL_DIR")"
89
+ else
90
+ INSTALL_DIR_WIN="$(wslpath -w "$INSTALL_DIR")"
91
+ fi
92
+ mkdir -p "$INSTALL_DIR"
93
+ if wsl.exe -l -q 2>/dev/null | tr -d '\r\0' | grep -qx "$NAME"; then
94
+ echo "$NAME already exists — skipping the import, continuing with configuration"
95
+ else
96
+ echo "import: $TARBALL -> $NAME (base $INSTALL_DIR_WIN)"
97
+ timeout 300 wsl.exe --import "$NAME" "$INSTALL_DIR_WIN" "$(wslpath -w "$TARBALL")" >/dev/null
98
+ echo "imported."
99
+ fi
100
+
101
+ # ---- 3. unstick the first launch --------------------------------------------
102
+ step "3. first launch"
103
+ unstick() {
104
+ local n
105
+ for n in 1 2; do
106
+ if timeout 30 wsl.exe -d "$NAME" -u root -- /bin/true >/dev/null 2>&1; then
107
+ echo "first launch ok (as root)"
108
+ return 0
109
+ fi
110
+ echo "launch attempt $n wedged — terminating and retrying"
111
+ timeout 30 wsl.exe --terminate "$NAME" >/dev/null 2>&1 || true
112
+ sleep 2
113
+ done
114
+ return 1
115
+ }
116
+ unstick || { echo "bootstrap-import: the distro does not answer even as root — see docs/COMPATIBILITY.md's Debian OOBE note" >&2; exit 1; }
117
+
118
+ # ---- 4./5. family, user, wsl.conf --------------------------------------------
119
+ step "4. package family and user"
120
+ FAMILY="$(wsl.exe -d "$NAME" -u root --exec sh -c 'for f in apt-get dnf pacman zypper apk; do command -v "$f" >/dev/null 2>&1 && { echo "$f"; exit 0; }; done; echo unknown' | tr -d '\r\n')"
121
+ echo "family: $FAMILY"
122
+ [ "$FAMILY" != "unknown" ] || { echo "bootstrap-import: no known package manager — cannot install bubblewrap" >&2; exit 1; }
123
+
124
+ if [ -z "$USER_NAME" ]; then
125
+ USER_NAME="$(printf '%s' "$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r\n')" | tr 'A-Z' 'a-z' | tr -cd 'a-z0-9_-' | cut -c1-24)"
126
+ [ -n "$USER_NAME" ] || USER_NAME="dsh-user"
127
+ fi
128
+ if ! wsl.exe -d "$NAME" -u root -- id "$USER_NAME" >/dev/null 2>&1; then
129
+ echo "creating user: $USER_NAME"
130
+ case "$FAMILY" in
131
+ apk) wsl.exe -d "$NAME" -u root -- sh -c "apk add -q shadow >/dev/null 2>&1; adduser -D -s /bin/ash '$USER_NAME'" ;;
132
+ *) wsl.exe -d "$NAME" -u root -- useradd -m -s /bin/bash "$USER_NAME" ;;
133
+ esac
134
+ fi
135
+
136
+ echo "writing /etc/wsl.conf:"
137
+ SYSTEMD="no"
138
+ case "$FAMILY" in
139
+ apk) echo " (OpenRC — no [boot] systemd line; sessionSandbox reports the narrower scope per WSL-201)" ;;
140
+ *) SYSTEMD="yes"; echo " [boot] systemd=true" ;;
141
+ esac
142
+ echo " [user] default=$USER_NAME"
143
+ echo " -> /etc/wsl.conf"
144
+ case "$SYSTEMD" in
145
+ yes) wsl.exe -d "$NAME" -u root -- sh -c '{ echo "[boot]"; echo "systemd=true"; echo "[user]"; echo "default='"$USER_NAME"'"; } > /etc/wsl.conf' ;;
146
+ *) wsl.exe -d "$NAME" -u root -- sh -c '{ echo "[user]"; echo "default='"$USER_NAME"'"; } > /etc/wsl.conf' ;;
147
+ esac
148
+ wsl.exe -d "$NAME" -u root -- cat /etc/wsl.conf
149
+ timeout 30 wsl.exe --terminate "$NAME" >/dev/null 2>&1 || true
150
+ sleep 2
151
+ echo ""
152
+ echo "NOTE: [boot] systemd=true takes effect only after a full \"wsl.exe --shutdown\""
153
+ echo "(exit everything, run it, then reopen) — the distro terminate above is not enough."
154
+
155
+ # ---- 6. bubblewrap ------------------------------------------------------------
156
+ step "6. bubblewrap"
157
+ # systemd rides the install for the families that ship it: docker-export
158
+ # tarballs strip it, and a written [boot] systemd=true without the package is
159
+ # a boot that never starts.
160
+ case "$FAMILY" in
161
+ apt-get) INSTALL_CMD="apt-get update -qq && apt-get install -y -qq --no-install-recommends bubblewrap git ripgrep inotify-tools systemd systemd-sysv" ;;
162
+ dnf) INSTALL_CMD="dnf install -y -q bubblewrap git ripgrep inotify-tools systemd" ;;
163
+ pacman) INSTALL_CMD="pacman -Sy --noconfirm --needed bubblewrap git ripgrep inotify-tools systemd" ;;
164
+ zypper) INSTALL_CMD="zypper --non-interactive install bubblewrap git ripgrep inotify-tools systemd" ;;
165
+ apk) INSTALL_CMD="apk add -q bubblewrap git coreutils" ;;
166
+ esac
167
+ wsl.exe -d "$NAME" -u root -- sh -c "$INSTALL_CMD"
168
+ wsl.exe -d "$NAME" --exec bwrap --version >/dev/null 2>&1 && echo "bwrap ok"
169
+
170
+ # ---- 7. Linger ----------------------------------------------------------------
171
+ step "7. Linger"
172
+ if [ "$SYSTEMD" = "yes" ]; then
173
+ # root runs it: the user manager may be up while enable-linger still asks
174
+ # for the polkit privilege the fresh user does not have.
175
+ wsl.exe -d "$NAME" -u root -- loginctl enable-linger "$USER_NAME" 2>/dev/null \
176
+ && echo "Linger enabled for $USER_NAME" \
177
+ || echo "Linger could not be enabled — the session runtime will degrade; run inside the distro: loginctl enable-linger $USER_NAME (as root)"
178
+ else
179
+ echo "skipped (no systemd)"
180
+ fi
181
+
182
+ # ---- 8. doctor pass ------------------------------------------------------------
183
+ step "8. doctor --read-only"
184
+ echo "cd $(pwd) && node scripts/doctor.mjs $NAME --read-only"
185
+ node "$HERE/doctor.mjs" "$NAME" --read-only || {
186
+ echo "bootstrap-import: doctor reported failures — fix them, or file them if they are fresh-distro traps this script should self-heal" >&2
187
+ exit 1
188
+ }
189
+ echo "bootstrap-import: $NAME ready"
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env pwsh
2
+ # Open a WSL folder in VS Code through Remote-WSL — the full Linux
3
+ # integration (distro shell, extensions in the distro, local ext4 speed) —
4
+ # instead of the degraded UNC share (9p files, Windows terminal, Windows
5
+ # extensions).
6
+ #
7
+ # scripts/open-wsl-vscode.ps1 -Path "\\wsl.localhost\ubuntu\home\me\proj"
8
+ # scripts/open-wsl-vscode.ps1 -Path "/home/me/proj" -Distro ubuntu
9
+ #
10
+ # Requires VS Code on PATH (the `code` shim) and the Remote-WSL extension.
11
+
12
+ param(
13
+ [Parameter(Mandatory = $true)][string]$Path,
14
+ [string]$Distro
15
+ )
16
+
17
+ $ErrorActionPreference = "Stop"
18
+
19
+ # Shape 1: a WSL UNC path carries its own distro name.
20
+ if ($Path -match '^\\\\wsl(?:\.localhost)?\\([^\\]+)\\(.*)$') {
21
+ $Distro = $Matches[1]
22
+ $LinuxPath = "/" + ($Matches[2] -replace "\\", "/")
23
+ }
24
+ elseif ($Path -match "^/") {
25
+ # Shape 2: a Linux path needs the distro named explicitly.
26
+ if (-not $Distro) { throw "open-wsl-vscode: a Linux path requires -Distro" }
27
+ $LinuxPath = $Path -replace "\\", "/"
28
+ }
29
+ else {
30
+ throw "open-wsl-vscode: not a WSL UNC path or a Linux path: $Path"
31
+ }
32
+
33
+ $Uri = "vscode-remote://wsl+$Distro$LinuxPath"
34
+ Write-Output "opening $Uri"
35
+ & code --folder-uri $Uri
36
+ if ($LASTEXITCODE -ne 0) { throw "code exited $LASTEXITCODE" }
@@ -1,178 +0,0 @@
1
- # A profile-patch fragment for `$DSH_HOME/profiles/<name>/cordis.patch.yml`.
2
- # It is the plugin's ENTIRE `preset-wsl` row (a row's config is replaced whole,
3
- # never deep-merged) with `sessionSandbox: true` on the `wsl-shell` AND
4
- # `wsl-fs` plugins.
5
- #
6
- # Paste it in place of any existing `- id: preset-wsl` entry in that profile
7
- # layer, then restart the app. Regenerate it from the plugin's
8
- # `cordis.patch.yml` whenever the shipped preset changes.
9
-
10
- - id: preset-wsl
11
- name: '@deepseek-ai/dsh-agent-preset'
12
- config:
13
- id: wsl
14
- order: 2
15
- plugins:
16
- - id: wsl-env
17
- name: cordis:group
18
- group: true
19
- isolate:
20
- shell: true
21
- fs: true
22
- config:
23
- # ── the WSL environment for this preset only ────────────────────
24
- # No `cwd`: an empty default workdir means the distro user's home,
25
- # asked of the distro itself. Pin a directory here to override it —
26
- # a value that is right on one machine is wrong on every other.
27
- #
28
- # Commands run in one persistent systemd user scope per session
29
- # (ADR 0001): a background dev server survives the command that
30
- # started it, `/tmp` is the distro's real `/tmp`, and `ps` sees the
31
- # session. This needs systemd as PID 1 (`[boot] systemd=true` in
32
- # /etc/wsl.conf) and a lingering user manager (`loginctl
33
- # enable-linger <user>`); the preflight refuses with those remedies
34
- # when one is missing. Set `sessionSandbox: false` for the old
35
- # per-command shape. Bubblewrap is still required for the mount
36
- # profile; without it the providers fail closed.
37
- - id: wsl-shell
38
- name: 'dsh-plugin-wsl-env'
39
- config:
40
- distro: ''
41
- loginShell: true
42
- timeoutMs: 120000
43
- maxTimeoutMs: 600000
44
- sessionSandbox: true
45
- agentBackend: auto
46
- - id: wsl-fs
47
- name: 'dsh-plugin-wsl-env/fs'
48
- config:
49
- distro: ''
50
- restrictToDistro: true
51
- # agent (the default): reads/writes/identities run inside the
52
- # distro over the resident agent (lib/fs-substrate.js) —
53
- # native symlinks and mode bits, the write guard survives to
54
- # publication, and confined mutations are kernel-enforced.
55
- # share: the opt-out — the Windows-side host fs stack over
56
- # the 9p share.
57
- substrate: agent
58
- # Confined writes ride the session runtime (ADR 0001), so they
59
- # share the command's real /tmp and workspace mounts.
60
- sessionSandbox: true
61
- - id: persona
62
- name: '@deepseek-ai/dsh-persona'
63
- config:
64
- prefix: You are a coding agent powered by the {{model}} model.
65
- - id: agent-instructions
66
- name: '@deepseek-ai/dsh-agent-instructions'
67
- config:
68
- maxBytes: 65536
69
- - id: time-context
70
- name: '@deepseek-ai/dsh-time-context'
71
- - id: tool-bash
72
- name: '@deepseek-ai/dsh-tool-bash'
73
- disabled: false
74
- - id: tool-pwsh
75
- name: '@deepseek-ai/dsh-tool-pwsh'
76
- disabled: true
77
- - id: tool-fs
78
- name: '@deepseek-ai/dsh-tool-fs'
79
- - id: tool-fs-search
80
- name: '@deepseek-ai/dsh-tool-fs-search'
81
- config:
82
- sampleOverCapGlobResults: false
83
- - id: tool-jobs
84
- name: '@deepseek-ai/dsh-tool-jobs'
85
- - id: tool-schedule
86
- name: '@deepseek-ai/dsh-tool-schedule'
87
- - id: skill-filesystem
88
- name: '@deepseek-ai/dsh-skill-filesystem'
89
- - id: tool-skill
90
- name: '@deepseek-ai/dsh-tool-skill'
91
- - id: command-goal
92
- name: '@deepseek-ai/dsh-command-goal'
93
- - id: tool-goal
94
- name: '@deepseek-ai/dsh-tool-goal'
95
- - id: planning
96
- name: cordis:group
97
- group: true
98
- isolate:
99
- planMode: true
100
- config:
101
- - id: plan-mode
102
- name: '@deepseek-ai/dsh-plan-mode'
103
- config:
104
- section: |
105
- You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
106
-
107
- Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
108
-
109
- The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
110
-
111
- Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
112
-
113
- Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
114
-
115
- When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
116
- - id: compaction
117
- name: cordis:group
118
- group: true
119
- isolate:
120
- compaction: true
121
- toolResultPruner: true
122
- config:
123
- - id: compaction-basic
124
- name: '@deepseek-ai/dsh-compaction-basic'
125
- - id: command-compact
126
- name: '@deepseek-ai/dsh-command-compact'
127
- - id: tool-result-pruner
128
- name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
129
- config:
130
- thresholdChars: 8192
131
- headChars: 4096
132
- tailChars: 1024
133
- - id: delegation
134
- name: cordis:group
135
- group: true
136
- isolate:
137
- workflowEngine: true
138
- config:
139
- - id: tool-subagent-control
140
- name: '@deepseek-ai/dsh-tool-subagent-control'
141
- - id: tool-subagent-list-agents
142
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
143
- - id: tool-subagent
144
- name: '@deepseek-ai/dsh-tool-subagent'
145
- config:
146
- provider: spawn
147
- toolName: subagent
148
- modelSelectionSettings: true
149
- - id: tool-subagent-fork
150
- name: '@deepseek-ai/dsh-tool-subagent'
151
- config:
152
- provider: fork
153
- toolName: subagent_fork
154
- - id: workflow-ptc
155
- name: '@deepseek-ai/dsh-workflow-ptc'
156
- config:
157
- provider: spawn
158
- - id: tool-workflow
159
- name: '@deepseek-ai/dsh-tool-workflow'
160
- - id: tool-ask-user
161
- name: '@deepseek-ai/dsh-tool-ask-user'
162
- - id: tool-todo
163
- name: '@deepseek-ai/dsh-tool-todo'
164
- config:
165
- allowParallelInProgress: true
166
- - id: tool-web
167
- name: '@deepseek-ai/dsh-tool-web'
168
- config:
169
- fetch: true
170
- searchTimeoutMs: 60000
171
- - id: present
172
- name: '@deepseek-ai/dsh-tool-present'
173
- - id: tool-plugin-manager
174
- name: '@deepseek-ai/dsh-plugin-manager/tools'
175
- disabled: true
176
- - id: tool-plugin-market
177
- name: '@deepseek-ai/dsh-plugin-market/tools'
178
- disabled: true