dsh-code-server-app 0.1.32 → 0.1.37

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.en.md CHANGED
@@ -10,7 +10,7 @@
10
10
  > - Microsoft **open-source** extensions (Python, TypeScript debugger, ESLint, …) are mirrored on Open VSX and install normally by search;
11
11
  > - **If you need a proprietary Microsoft extension**: download the `.vsix` from the Marketplace page and install it manually with `code-server --install-extension <file>` (or drop it into `--extensions-dir`).
12
12
 
13
- A static profile plugin (npm package with host + client bundle) that installs the latest [code-server](https://github.com/coder/code-server) **on demand into a dedicated profile directory** (installing the plugin itself is script-free and does not install code-server), auto-discovered and used on startup — no global npm install, no `bin` configuration.
13
+ A static profile plugin (npm package with host + client bundle) that **bundles** [code-server](https://github.com/coder/code-server) in the package itself (a pack-time artifact at `vendor/code-server`, with no install scripts and no postinstall) and runs it in place from the plugin directory. VS Code's inner dependencies and the prebuilt native modules are **all installed by the package manager together with the plugin** — no global npm install, no `bin` configuration, no profile config changes, no second install command.
14
14
 
15
15
  ## UI carrier (chosen by the DSH version, feature-detected at runtime)
16
16
 
@@ -44,65 +44,105 @@ A static profile plugin (npm package with host + client bundle) that installs th
44
44
  while `file:///C:/...` reports "Workspace does not exist".
45
45
  - Process lifecycle is managed by the host plugin: startup writes `$DSH_HOME/code-server/pid.json`, stop kills the tree (`taskkill /T` or process-group SIGKILL),
46
46
  crash/exit updates status live; after a DSH host restart the plugin **adopts** a still-running instance (verifies pid + `/healthz`), without duplicate start or killing unrelated processes;
47
- - `node_modules` (dependencies, including code-server) is git-ignored; after cloning, follow "Install the plugin (script-free install; code-server installed on demand)" below — `pnpm pack` + `dsh plugin --profile web add`.
47
+ - `node_modules` and the pack-time artifact `vendor/` are git-ignored; after cloning, follow
48
+ "Install the plugin (script-free install; code-server bundled)" below — `pnpm install` → `pnpm run build:client` →
49
+ `pnpm run vendor:code-server` → `pnpm pack` + `dsh plugin --profile web add`.
48
50
 
49
- > Verified locally (BM: Windows 11 ARM64): `code-server@4.134.0` (with Code 1.135.0)
50
- > shipped with the plugin, auto-discovered started healthz 200cwd switch restart while running stopped → fully recycled.
51
+ > Verified locally (BM: Windows 11 ARM64): `code-server@4.136.2` (with Code 1.136.1) bundled in the plugin,
52
+ > placed offline at activationVS Code internal deps installed started healthz 200
53
+ > cwd switch restart while running → stopped → fully recycled.
51
54
 
52
- ## Install the plugin (script-free install; code-server installed on demand)
55
+ ## Packaging (how to build the tarball)
53
56
 
54
57
  ```powershell
55
- # 1) Pack (in the plugin workspace)
56
58
  cd C:\Users\User\Desktop\dsh-code-server-app
57
- # Fresh clone: install dev deps and generate the client bundle first (lib/client.js is not committed; built from src/factory.js)
58
- pnpm install # esbuild + motion (pack only)
59
- pnpm run build:client # src/factory.js lib/client.js
60
- pnpm pack
59
+ pnpm install # dev deps (esbuild + motion); allowBuilds is explicit no postinstall runs
60
+ pnpm run build:client # src/factory.js lib/client.js (not committed; must be built first)
61
+ pnpm run vendor:check # optional: show the bundled code-server version vs npm latest
62
+ pnpm run vendor:code-server # produce vendor/code-server (code-server + its own deps)
63
+ node scripts/vendor-repacks.mjs --target win32-arm64,win32-x64 --pack # build/repack prebuilt natives
64
+ pnpm run publish:repacks # publish @jinsiyu/dshcs-* and the platform aggregators
65
+ pnpm pack # → dsh-code-server-app-<version>.tgz (~59MB)
66
+ npm publish dsh-code-server-app-<version>.tgz --access public # publish the plugin itself (same verified tarball)
61
67
  ```
62
68
 
69
+ | Goal | Command |
70
+ |---|---|
71
+ | **Build the latest code-server from npm** | `pnpm run vendor:latest` (= `--force`): snapshots `code-server@latest` into `vendor/code-server`; afterwards you **must** re-run `vendor-repacks.mjs` and republish the prebuilt natives |
72
+ | **Pin a version** | `pnpm run vendor:code-server -- --version 4.136.2` |
73
+ | **Snapshot from an existing tree** | `pnpm run vendor:code-server -- --from <code-server dir>` (seconds) |
74
+ | **Rebuild prebuilt natives** | `node scripts/vendor-repacks.mjs [--from <existing full install>] --target win32-arm64,win32-x64 --pack` (without `--from` it npm-installs and compiles the source tree itself — slow) |
75
+ | **Publish prebuilt natives** | `pnpm run publish:repacks` (`--dry-run` to preview; `--only <substr>` to filter; `--otp <code>` / `--limit N` for 2FA) |
76
+ | **Publish the plugin itself** | `npm publish dsh-code-server-app-<version>.tgz --access public` (publishes the exact tarball that was verified; no re-packing) |
77
+ | **Just report versions** | `pnpm run vendor:check` |
78
+
79
+ > `pnpm pack`'s `prepack` runs the vendor-code-server script once; when `vendor/code-server` already exists it is
80
+ > a **no-op that takes seconds**, so after ordinary code changes you can just run `pnpm pack` (it will never
81
+ > silently upgrade code-server). Upgrading code-server requires an explicit `pnpm run vendor:latest`
82
+ > (or `--force` / `--version`) **plus** republishing the prebuilt natives.
83
+
84
+ ## Install the plugin (one command; all dependencies installed by the package manager)
85
+
63
86
  ```powershell
64
- # 2) Install (published tarball; the plugin has no postinstall → no pnpm approve-builds / allowBuilds needed)
65
- dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app\dsh-code-server-app-0.1.32.tgz
87
+ # no postinstall in the package → no pnpm approve-builds / allowBuilds; one command installs everything
88
+ dsh plugin --profile web add dsh-code-server-app@0.1.36
89
+ # a local tarball works the same way:
90
+ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app\dsh-code-server-app-0.1.36.tgz
66
91
  ```
67
92
 
68
- > Installation only drops plugin files: **no package scripts run and code-server is not installed**
69
- > (pnpm prints no build-scripts approval prompt). code-server is installed **on first use**: the startup
70
- > install-guide modal's "Install" button, Settings Plugins Code Server "Install environment",
71
- > or manually `node <plugin-dir>\scripts\setup-code-server.mjs` (`npm run setup:code-server`).
72
-
73
- ### Install mechanism
74
-
75
- - **Script-free install**: `package.json` has no `postinstall`, so pnpm runs no package script while
76
- installing the plugin (no `pnpm approve-builds` / `allowBuilds` approval needed) and does not install code-server;
77
- - **code-server is not in `dependencies`** (pnpm never touches it; no script-approval issues); instead
78
- `scripts/setup-code-server.mjs` installs **the latest** `code-server` **with npm into a dedicated profile
79
- directory** on demand (version not pinned; npm `latest` is used at install time):
80
- - Triggers: host `POST /api/code-server/setup` (startup guide modal "Install" / settings card "Install environment"),
81
- or manually `npm run setup:code-server`;
82
- - Install root: `<profile>\.code-server-app` (e.g. `C:\Users\User\.dsh\profiles\web\.code-server-app`),
83
- a standalone project isolated from the profile dependency tree (avoids ERESOLVE);
84
- - The install root carries its own `package.json` with `allowScripts`: `code-server: false` (skips the official `sh ./postinstall.sh`
85
- Windows has no `sh`, it would fail; `argon2/unrs-resolver: true` builds native modules; both without version pins);
86
- - Afterwards it installs VS Code internal dependencies (144 packages) + `bin\code-server.cmd`;
87
- - **code-server lands at** `<profile>\.code-server-app\node_modules\code-server\`;
88
- idempotent and self-healing (every on-demand run checks first: skips when instantiated and equal to npm latest;
89
- **auto-upgrades when the installed version differs**).
90
- - **Pin a version**: set the env var `DSHCS_CODE_SERVER_VERSION` (it must be visible to the **process that runs setup** — the `dsh web` process for UI-triggered installs; e.g. `4.134.0`); unset it to follow latest.
91
- - **Why no install-time setup**: installation stays fast and succeeds even without a C++ toolchain (a missing
92
- toolchain surfaces later in the "Install" flow, with logs in the top banner and the settings card); code-server
93
- upgrades now happen only during on-demand installs and **no longer on every plugin reinstall**.
94
-
95
- > **Migration note when upgrading from 0.1.28**: the old plugin shipped a `postinstall`, so the profile's
96
- > `pnpm-workspace.yaml` may still carry `allowBuilds: dsh-code-server-app@file:...<old version>.tgz: true`
97
- > entries and pnpm 11 may have recorded an `ignoredBuilds` entry in `node_modules/.modules.yaml` after which
98
- > every install reports `[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: dsh-code-server-app@file:...`
99
- > even though the new version has no install scripts at all. Fix: collapse those entries in the profile's
100
- > `pnpm-workspace.yaml` into a single `dsh-code-server-app: false` ("never build") and re-run the install;
101
- > this machine's 0.1.29 upgrade already performed that migration.
102
-
103
- > **Uninstall**: the code-server directory is independent of the plugin package — first
104
- > `Remove-Item -Recurse -Force <profile>\.code-server-app`, then `dsh plugin --profile web remove dsh-code-server-app`.
105
- > The settings card's "Environment check" section also shows this hint.
93
+ Ready to use immediately **no second step, no "Install environment", no install-guide modal**:
94
+
95
+ - the `code-server` tree (`vendor/code-server/`) ships inside the plugin package and **runs in place** from the
96
+ plugin directory (`<profile>\node_modules\dsh-code-server-app\vendor\code-server\out\node\entry.js`);
97
+ - the **pure-JS part** of VS Code's inner dependencies (35 packages: xterm / katex / typescript / ws / tar …) is
98
+ declared in the plugin's `dependencies` and installed by pnpm into the profile's `node_modules` (hoisted);
99
+ - the **packages that need compiling** (node-pty / @vscode/sqlite3 / kerberos / koffi / ssh2 / cpu-features /
100
+ @parcel/watcher / @vscode/windows-* 16 in total) are provided as prebuilt `@jinsiyu/dshcs-*` packages,
101
+ pulled back under their **original names** by the **platform aggregator**
102
+ `@jinsiyu/dsh-code-server-runtime-<platform>-<arch>` using `npm:` aliases. The aggregators sit in the plugin's
103
+ `optionalDependencies` (gated by `os`/`cpu`), so pnpm **auto-selects the right one for the current
104
+ architecture**;
105
+ - consequently the dependency graph contains **no package with pre/install/postinstall or a `binding.gyp`**
106
+ no profile `allowBuilds`, no build script ever runs, and **the user machine needs no C++ toolchain**.
107
+
108
+ ### Install mechanism (why it is built this way)
109
+
110
+ - **The pnpm 11 hard constraint**: any package in the dependency graph whose manifest has
111
+ `preinstall|install|postinstall` (or whose tarball contains `binding.gyp`/`.hooks`) is treated as
112
+ "requires build" and must be approved through the **host profile's** `pnpm-workspace.yaml` (`allowBuilds`),
113
+ otherwise `dsh plugin add` exits 1 with `[ERR_PNPM_IGNORED_BUILDS]`. A dependency's own `pnpm.allowBuilds`,
114
+ `.npmrc`, the `patch:` protocol and `optionalDependencies` are all ineffective (measured 2026-09, pnpm 11.25);
115
+ - **the code-server tree** therefore ships as plain files instead of a `dependencies` entry. At pack time
116
+ `npm install code-server@<version> --ignore-scripts` (skips the official `sh ./postinstall.sh` there is no
117
+ `sh` on Windows and the script only accepts npm/yarn user agents, so it always fails under pnpm) → supply the
118
+ argon2 native binary (no Windows prebuild exists; compile with `node-gyp-build`, or reuse an existing
119
+ `argon2.node` via `DSHCS_ARGON2_BINARY`) → strip leftover install scripts → snapshot to `vendor/code-server/`;
120
+ - **packages that need compiling** are repacked by `scripts/vendor-repacks.mjs` into `@jinsiyu/dshcs-*`:
121
+ copy the already-compiled package directory → **delete `scripts` / `files` / `binding.gyp` / `.hooks` /
122
+ `.npmignore`** (keeping the compiled `.node` and every runtime file) rewrite dependencies that belong to the
123
+ same set to `npm:` aliases → platform-specific ones get an `os`/`cpu` pair and a `-<platform>-<arch>` suffix;
124
+ - **the platform aggregator** maps those repacks back to their original names (e.g.
125
+ `"node-pty": "npm:@jinsiyu/dshcs-node-pty@1.2.0-beta.15"`), so VS Code's `require('node-pty')` needs no change.
126
+ The aggregator itself is `os`/`cpu` gated, and the plugin declares both win32-arm64 and win32-x64 in
127
+ `optionalDependencies` → one command picks the right one automatically;
128
+ - **resolution path**: from `vendor/code-server/out/node/entry.js` Node walks
129
+ `<plugin>/vendor/code-server/node_modules` `<plugin>/node_modules` `<profile>/node_modules`; the profile's
130
+ `nodeLinker: hoisted` puts every dependency into `<profile>/node_modules`, exactly what the runtime sees.
131
+
132
+ > **Size note**: the plugin tarball is **~59MB** (bundled code-server is 232MB unpacked); the inner dependencies
133
+ > and prebuilt natives are downloaded by pnpm (roughly 300–350MB, ~250MB of it native packages). Neither
134
+ > `vendor/` nor `repack/` is tracked by git (see `.gitignore`), but `vendor/` **must** ship in the npm package
135
+ > (the main `files` list includes it).
136
+
137
+ > **Upgrading from ≤ 0.1.35**: the old install root `<profile>\.code-server-app` (with ~1.4GB of inner
138
+ > dependencies) and the "Install environment" step are gone. The new version detects the old root and logs that it
139
+ > can be safely deleted: `Remove-Item -Recurse -Force <profile>\.code-server-app`. Old
140
+ > `dsh-code-server-app: false` entries in the profile's `pnpm-workspace.yaml` can be removed too (no build
141
+ > approval is needed any more).
142
+
143
+ > **Uninstall**: `dsh plugin --profile web remove dsh-code-server-app` is enough (the plugin directory contains the
144
+ > code-server tree and is deleted with it); if an old install root is still around, delete
145
+ > `<profile>\.code-server-app` manually.
106
146
 
107
147
  > After install/dependency changes, **restart `dsh web`** (the static plugin row and host probe paths load at startup).
108
148
 
@@ -112,64 +152,63 @@ dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app\dsh-code-
112
152
  dsh plugin --profile web add C:\Users\User\Desktop\dsh-code-server-app
113
153
  ```
114
154
 
115
- > A source path installs via `link:`; when the profile layout is unavailable, the host's
116
- > `scripts/setup-code-server.mjs` falls back to installing code-server into the **plugin workspace node_modules**
117
- > (the host supports both layouts). The install itself runs no scripts; on first use click "Install" or run
118
- > `npm run setup:code-server` manually.
155
+ > A source path installs via `link:`. On a dev machine without `vendor/code-server`, run
156
+ > `pnpm run vendor:code-server` first. Dependencies (inner JS deps + the platform aggregator) are installed by pnpm
157
+ > too but the not-yet-published local `@jinsiyu/*` packages must either be published first, or the
158
+ > `repack/tgz/*.tgz` files must be installed into the profile as `file:` dependencies.
119
159
  >
120
160
  > **Changing the client bundle**: edit `src/factory.js` then run `pnpm run build:client`
121
161
  > to regenerate `lib/client.js` (that artifact is not tracked; a browser refresh picks it up — no host restart needed).
122
162
  > Window animations are driven by the embedded `motion`; feel parameters live in `winPhysics` (one spot) in `src/factory.js`.
123
163
 
124
- ### Environment requirements (packages that need building + toolchain)
164
+ ### Pack-machine environment (the user machine needs nothing)
125
165
 
126
- During the on-demand install (`scripts/setup-code-server.mjs` npm self-installs code-server + VS Code internal deps), **only one package really needs local compilation** (installing the plugin itself needs no toolchain):
166
+ **A toolchain is needed at pack time only never on the user machine.**
127
167
 
128
- | Package | Build method | ARM64 local compile | x64 local compile |
129
- |---|---|---|---|
130
- | **code-server** (main) | official `sh ./postinstall.sh` is skipped via `allowScripts: code-server: false` (no `sh` on Windows) | ❌ | ❌ |
131
- | **argon2** | `node-gyp-build` (binding.gyp + node-addon-api) | ✅ **mandatory** | ✅ **mandatory too** — prebuilds only contain Linux `*.glibc.node`; **no Windows prebuilds at all** |
132
- | **unrs-resolver** | `napi-postinstall check`; loads the prebuilt `@unrs/resolver-binding-win32-{x64,arm64}-msvc` | ❌ pure prebuilt | ❌ pure prebuilt |
133
- | **VS Code internal deps** (`lib/vscode/node_modules`, 144 pkgs) | `ensureNpmDeps` runs `npm install` per dir; own postinstalls (node-pty/koffi/kerberos…) | ⚠️ mostly prebuilt | ⚠️ mostly prebuilt |
134
-
135
- **Base environment checklist (verified locally, Windows)**:
136
-
137
- | Env | Version / requirement | ARM64 | x64 |
168
+ | Env | Version / requirement | User machine | Pack machine |
138
169
  |---|---|---|---|
139
170
  | Node.js | **v24.x** (latest code-server requirement; v24.13.1 here) | required | required |
140
- | npm | ships with Node | required | required |
141
- | **MSVC build tools** | **VS Community 2026 (18.9) + C++ desktop workload** | **required** (argon2 compile) | **required** (argon2 compile) |
142
- | **VS Spectre-mitigated libs** | "MSVC v18x Spectre-mitigated libraries for ARM64" (use the matching-arch libs on x64) | required (otherwise MSB8040) | required (otherwise MSB8040) |
143
- | Python | **3.13.x** (e.g. `Python313-arm64\python.exe`; x64 version on x64) | required (node-gyp scripts) | ✅ required |
144
- | node-gyp | **13.x** (9.x doesn't recognize VS 2026) | required | required |
171
+ | npm / pnpm | npm ships with Node; pnpm comes from DSH | required (installs deps) | required |
172
+ | **MSVC build tools** | **VS Community 2026 + C++ desktop workload** | **not needed** | pack time (16 native packages + argon2) |
173
+ | **VS Spectre-mitigated libs** | one set for ARM64 **and** one for x86/x64 ("MSVC v14x Spectre-mitigated libs") | not needed | pack time (otherwise MSB8040) |
174
+ | Python | **3.13.x** | not needed | pack time (node-gyp) |
175
+ | node-gyp | **13.x** (older versions don't recognize VS 2026) | not needed | pack time |
145
176
 
146
- > **Bottom line (corrected from measurements)**:
147
- > - **Windows (x64 and ARM64 are the same)**: argon2's prebuilds contain **only Linux `*.glibc.node` — no Windows prebuilds at all**; `node-gyp-build` can't find one **always falls back to a local node-gyp compile**. So **x64 also needs the full C++ toolchain** (MSVC + Spectre + Python + node-gyp 13); there is no "zero-compile on x64";
148
- > - unrs-resolver and VS Code internal deps use prebuilds — no extra tools;
149
- > - On a machine without a toolchain you may set `allowScripts.argon2: false` in the install root `package.json`, but argon2 missing makes code-server fail at startup with a `node-gyp-build` error — only suitable if you don't depend on argon2 (not recommended).
177
+ > **Packing still works without the Spectre libs**: when a package fails to compile, `vendor-repacks.mjs` downgrades
178
+ > `SpectreMitigation` to `false` in that architecture's `*.gyp` files and retries (only the Spectre hardening is
179
+ > lost, functionality is unaffected) and says so in the log.
150
180
 
151
- ### Windows native build notes (verified locally, ARM64)
181
+ ### Windows native build notes (pack time, verified locally ARM64)
152
182
 
153
183
  - **VS needs the Spectre-mitigated libraries** (MSB8040): Visual Studio Installer → Individual components →
154
- "MSVC v18x Spectre-mitigated libraries for ARM64" (same for x86/x64).
184
+ "MSVC v14x Spectre-mitigated libs" **install the ARM64 and the x86/x64 sets separately**.
155
185
  - **node-gyp 13.x** (9.x does not recognize VS 2026): `npm install -g node-gyp@latest`.
156
- - Latest code-server requires **Node v24** (v24.13.1 verified here; a lower version fails at startup).
186
+ - **x64 cross-compiling**: `vendor-repacks.mjs` uses `npm install --os=win32 --cpu=x64 --ignore-scripts` to fetch
187
+ the packages, then `npm rebuild --arch=x64` per package; the resulting PE machine types were verified
188
+ (kerberos / sqlite3 / spdlog …).
189
+ - Latest code-server requires **Node v24**.
157
190
  - If you don't need the self-contained install (e.g. a global code-server already exists), skip it:
158
191
  the plugin falls back to a configured/PATH `bin` (see the "Config" table).
159
192
 
160
193
  ### Upgrading the code-server version
161
194
 
162
- - **Automatic by default**: the script does not pin the version during an on-demand install, if the installed version differs from npm latest it reinstalls to latest (no manual edits).
163
- - **How to trigger**: Settings Plugins Code Server "Install environment", or `npm run setup:code-server`;
164
- **it no longer upgrades on plugin reinstall** (reinstalling the plugin neither installs nor upgrades code-server).
165
- - **To pin**: set the env var `DSHCS_CODE_SERVER_VERSION` (e.g. `4.134.0`; must be in the `dsh web` process environment); unset it to follow latest again.
166
- - Measured locally: installed `4.135.0`, npm latest `4.136.2` the next on-demand install will upgrade to `4.136.2`.
195
+ - **The version is decided at pack time**: `pnpm run vendor:latest` (= `--force`) rebuilds with the npm
196
+ **latest** version; or use `pnpm run vendor:code-server -- --version 4.136.2` / `DSHCS_CODE_SERVER_VERSION`.
197
+ With an existing `vendor/code-server`, a plain `pnpm pack` never upgrades (it is a no-op).
198
+ - **Check first**: `pnpm run vendor:check` prints the bundled version / npm latest.
199
+ - **A version bump requires republishing the prebuilt natives** (the inner dependency versions change with
200
+ code-server): `node scripts/vendor-repacks.mjs --target win32-arm64,win32-x64 --pack` →
201
+ `pnpm run publish:repacks` → bump the plugin version → `pnpm pack`. The script rewrites the plugin's
202
+ `dependencies` (the pure-JS set) and both aggregator versions.
203
+ - **No runtime auto-upgrade anymore**: nothing fetches latest at startup; the version is fully determined by the bundled artifact.
204
+ - Bundled locally right now: `code-server@4.136.2` (with Code 1.136.1).
167
205
 
168
- ### Compatibility with the old runtime-directory install
206
+ ### Compatibility with the old install locations
169
207
 
170
- `runtime/node_modules/code-server` (the earlier manual approach) is no longer supported
171
- host probe order: `<profile>\.code-server-app` (dedicated dir) > plugin-internal `node_modules` > PATH/config `bin`
172
- (top-level hoisted is a historical layout and is no longer probed).
208
+ Host probe order: `<plugin>/vendor/code-server` (**the real layout, runs in place**) > the old install root
209
+ `<profile>\.code-server-app\node_modules\code-server` (0.1.35 and earlier, only when the in-package tree is
210
+ missing) > plugin-internal `node_modules/code-server` (development) > PATH/config `bin`. The old root is only
211
+ mentioned in a startup log line; nothing writes to it any more.
173
212
 
174
213
  ## Settings card (Settings → Plugins → Code Server)
175
214
 
@@ -185,11 +224,16 @@ persisted via the official settings domain (`settingsScope`, namespace `code-ser
185
224
  > `windowedOpen`; the client applies them at once); no dsh restart needed. **After adding new setting keys, restart dsh web before first use**,
186
225
  > so the host re-registers the settings namespace (schema includes the new key); otherwise save/validation of the new key won't work.
187
226
 
227
+ The bottom of the card is **Environment check** (click "Check environment" to read the host `status.env`): entry,
228
+ `native` (argon2), VS Code inner dependencies, and **prebuilt native packages** (platform aggregator name +
229
+ resolved module count). Since 0.1.36 there is no "Install environment" button — dependencies are installed by the
230
+ package manager, and the card only reports the result.
231
+
188
232
  ## Config (`config` in cordis.patch.yml; all have defaults)
189
233
 
190
234
  | Key | Default | Description |
191
235
  |---|---|---|
192
- | `bin` | `code-server` (placeholder) | Launch priority: explicit `bin` in config > `<profile>\.code-server-app` (dedicated dir, auto-run with node) > plugin-internal `node_modules` > `code-server` on PATH. None present → startup error with install guidance |
236
+ | `bin` | `code-server` (placeholder) | Launch priority: explicit `bin` in config > the in-package `vendor/code-server/out/node/entry.js` > the old install root `.code-server-app` > plugin-internal `node_modules` > `code-server` on PATH. None present → startup error with troubleshooting hints |
193
237
  | `host` | `127.0.0.1` | Bind address; `auth: none` only allows loopback (localhost/127.0.0.1/::1) |
194
238
  | `port` | `8090` | Port; on conflict startup fails with diagnostics (no automatic port change) |
195
239
  | `auth` | `none` | `none` \| `password`; non-loopback host automatically requires password |
@@ -218,10 +262,10 @@ Host/Origin fence and browser auth); in the desktop profile `apps/desktop-host`
218
262
 
219
263
  | Method | Path | Description |
220
264
  |---|---|---|
221
- | GET | `/api/code-server/status` | `{ ok, running, status, host, port, pid, cwd, url, version, error, logTail, adopted }` (also `env` environment check and `setup` install-task progress) |
265
+ | GET | `/api/code-server/status` | `{ ok, running, status, host, port, pid, cwd, url, version, error, logTail, adopted }` (also `env` environment check and the `setup` compatibility field) |
222
266
  | POST | `/api/code-server/start` | body `{ cwd? }` (omit cwd to keep the current workspace); idempotent |
223
267
  | POST | `/api/code-server/stop` | Stop and recycle the process tree |
224
- | POST | `/api/code-server/setup` | Run the environment install in the background (npm install code-server + native + VS Code internal deps); progress via `status.setup` polling |
268
+ | POST | `/api/code-server/setup` | **Compatibility no-op**: since 0.1.36 dependencies are installed by the package manager, so this only re-runs the env self-check and returns |
225
269
  | POST | `/api/code-server/open-file` | body `{ file }` — writes the signal consumed by the built-in `dshcs-open-file` extension to open the file in code-server |
226
270
 
227
271
  > The plugin no longer registers `/code-server/*` webServer-only routes, and the code-server icon is inlined as a data URI