dsh-code-server-app 0.3.43 → 0.3.45

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/lib/index.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  vsRoot,
36
36
  vsServerEntry,
37
37
  } from './vendor.js';
38
- import { aliasNodePathDirs, ensureRuntimeLayout, resolveRuntime, runtimePackageName, verifyNatives } from './native.js';
38
+ import { ensureRuntimeLayout, nativeRuntimeStatus } from './native.js';
39
39
  import { MOUNT_PATH, mountOnWebServer } from './serve-dsh.mjs';
40
40
  import { DEFAULT_CLAIM_EXTENSIONS, describeClaimPolicy, normalizeClaimExtensions } from './claim-types.js';
41
41
  import {
@@ -427,13 +427,12 @@ function envCheck() {
427
427
  const root = vsRoot();
428
428
  const entry = vsServerEntry();
429
429
  const inner = checkInnerDeps();
430
- const runtime = resolveRuntime();
431
- const natives = verifyNatives(runtime !== null ? runtime.modules : []);
430
+ const natives = nativeRuntimeStatus();
432
431
  const installed = root !== null ? readTreeVersion(root) : null;
433
432
  const vendored = vendoredVersion();
434
433
  return {
435
434
  ok: entry !== null && inner.missing.length === 0
436
- && runtime !== null && natives.missing.length === 0,
435
+ && natives.resolved > 0 && natives.missing.length === 0,
437
436
  tree: root !== null ? root.replace(/\\/g, '/') : null,
438
437
  entry: entry !== null ? entry.replace(/\\/g, '/') : null,
439
438
  productPath: productPath(root),
@@ -442,16 +441,14 @@ function envCheck() {
442
441
  treeVersion: installed,
443
442
  vendored,
444
443
  upToDate: installed !== null && vendored !== null && installed === vendored,
445
- // 本平台预编译原生产物(平台聚合包 + 它带回原始名字的原生模块)
446
- nativeRuntime: runtime !== null
447
- ? {
448
- name: runtime.name,
449
- source: 'package',
450
- version: runtime.version,
451
- packages: natives.resolved.length,
452
- missing: natives.missing,
453
- }
454
- : { name: runtimePackageName(), source: null, version: null, packages: 0, missing: [] },
444
+ // 本平台预编译原生产物(重打包子包按真名装进依赖图,运行时按原名补 junction)
445
+ nativeRuntime: {
446
+ name: natives.name,
447
+ source: natives.source,
448
+ version: natives.version,
449
+ packages: natives.resolved,
450
+ missing: natives.missing,
451
+ },
455
452
  node: process.version,
456
453
  platform: process.platform,
457
454
  arch: process.arch,
@@ -1650,14 +1647,9 @@ export async function apply(ctx, config) {
1650
1647
  // ?v= 缓存击穿标记:按"插件版本 + VS Code 树"生成 —— 只在真升级时让渲染器丢掉旧 bundle,
1651
1648
  // 平时正常命中缓存(workbench.js 有 18MB,每次启动都重拉不划算)。
1652
1649
  env.DSHCS_HTML_TAG = `${pluginVersion()}-${productPath() ?? 'dev'}`.replace(/[^A-Za-z0-9._-]/g, '');
1653
- // pnpm 会把带 os/cpu 限定的原生包嵌套装在平台聚合包下(如 <profile>/node_modules/@<scope>/
1654
- // dsh-code-server-runtime-<平台>-<架构>/node_modules/@vscode/spdlog),那些目录不在 VS Code
1655
- // 树的向上查找链里 → 用 NODE_PATH 让子进程的 require 找得到(CJS;ESM 由 ensureAliasLinks 的 junction 负责)。
1656
- const nodePathDirs = aliasNodePathDirs();
1657
- if (nodePathDirs.length > 0) {
1658
- const existing = typeof env.NODE_PATH === 'string' && env.NODE_PATH !== '' ? env.NODE_PATH.split(path.delimiter) : [];
1659
- env.NODE_PATH = [...new Set([...nodePathDirs, ...existing])].join(path.delimiter);
1660
- }
1650
+ // 0.3.45 起不再需要给子进程加 NODE_PATH:重打包原生包按**真名**挂在插件依赖上,而它们要的
1651
+ // **原始名字**(node-pty / @vscode/sqlite3 …)由 ensureRuntimeLayout() 在树里补 junction ——
1652
+ // 目录链同时满足 ESM import 与 CJS require,NODE_PATH 只对 CJS 生效且属兜底。
1661
1653
 
1662
1654
  let proc;
1663
1655
  try {
@@ -1781,7 +1773,7 @@ export async function apply(ctx, config) {
1781
1773
  parts.push(`内部依赖未装全(缺 ${missing.length} 个:${missing.slice(0, 5).join(', ')}${missing.length > 5 ? ' …' : ''})`);
1782
1774
  }
1783
1775
  if (env.nativeRuntime !== null && env.nativeRuntime.source === null) {
1784
- parts.push(`平台预编译包未安装(${env.nativeRuntime.name})`);
1776
+ parts.push(`预编译原生模块未安装(${env.nativeRuntime.name})`);
1785
1777
  } else if (Array.isArray(env.nativeRuntime?.missing) && env.nativeRuntime.missing.length > 0) {
1786
1778
  parts.push(`原生模块解析失败:${env.nativeRuntime.missing.slice(0, 5).join(', ')}`);
1787
1779
  }
package/lib/native.js CHANGED
@@ -1,90 +1,93 @@
1
- // lib/native.js — 平台聚合包(预编译原生模块)的定位与校验。
1
+ // lib/native.js — 预编译原生模块(重打包子包)的定位、校验与目录链还原。
2
2
  //
3
- // 模型(0.1.36 起):VS Code 内部依赖里那批「pnpm 拒绝安装」的原生包(node-pty /
4
- // @vscode/sqlite3 / kerberos / koffi / ssh2 / cpu-features / @parcel/watcher /
5
- // @vscode/windows-* …)在打包期由 scripts/vendor-repacks.mjs 重打包成
6
- // @<scope>/dshcs-<名字>[-<平台>-<架构>],再由平台聚合包
7
- // @<scope>/dsh-code-server-runtime-<平台>-<架构>
8
- // 用 npm: 别名把它们装回**原始名字**。聚合包挂在插件 package.json 的
9
- // optionalDependencies 上(os/cpu 限定)→ pnpm 一条命令按架构自动选中。
3
+ // 模型(0.3.45 起,取代 0.1.36 的「平台聚合包 + npm: 别名」):
4
+ // VS Code 内部依赖里那批「pnpm 拒绝安装」的原生包(node-pty / @vscode/sqlite3 / kerberos /
5
+ // koffi / ssh2 / cpu-features / @parcel/watcher / @vscode/windows-* …)在打包期由
6
+ // scripts/vendor-repacks.mjs 重打包成 @<scope>/dshcs-<名字>[-<平台>-<架构>],并**直接挂在插件
7
+ // 依赖上**:
8
+ // · 平台无关的重打包包 → 插件 `dependencies`(真名,如 @<scope>/dshcs-node-pty);
9
+ // · 平台专属的重打包包 → 插件 `optionalDependencies`(真名 + 包自带 os/cpu,每平台一份,
10
+ // 包管理器按架构自动选中,不匹配的在 lockfile 里是 optional ⇒ 缺失是允许的)。
10
11
  //
11
- // 本模块只做三件事:
12
- // 1. 找到本平台聚合包(以及它的依赖清单 = 期望可解析的原生模块名);
13
- // 2. 从 code-server 运行位置出发校验这些模块是否真的能 require 到;
14
- // 3. 必要时在 code-server 树里补齐别名 junction(ESM import 不认 NODE_PATH,只能靠目录链)。
12
+ // 为什么不沿用聚合包:聚合包把 16 个包挂在**可选子树**里,靠 `npm:` 别名还原原始名字;
13
+ // 而 dsh-desktop 的依赖图校验器在 `pnpm add` 之后立刻校验,偏偏 pnpm 的增量 hoisted 安装会
14
+ // 漏链这类「可选子树里的别名包」(实测 16 个漏 9 个,报 requires missing @microsoft/mxc-sdk)。
15
+ // 直接依赖(真名)在同一套设置下 100% 装上 ⇒ 改用直接依赖 + 运行时补 junction。
16
+ // 实测证据与复现命令见 docs/desktop-first-install-root-cause.md。
17
+ //
18
+ // 「原名 → 真包」的表由打包期写进 lib/vendored.json(随包发布),本模块运行时只读它。
19
+ //
20
+ // 本模块只做四件事:
21
+ // 1. 读 lib/vendored.json → 本平台期望可解析的「原名 → 真包」表;
22
+ // 2. 从 code-server 运行位置出发校验这些原名是否真的能 require/import 到;
23
+ // 3. 解析不到的在树里补 junction(ESM 不认 NODE_PATH,只认目录链);
24
+ // 4. 给环境检测卡片一份状态汇总。
15
25
  import { createRequire } from 'node:module';
16
26
  import { existsSync, readFileSync, mkdirSync, symlinkSync, lstatSync, rmSync } from 'node:fs';
17
27
  import { dirname, join } from 'node:path';
18
- import { PACKAGE_ROOT, codeServerRoot, profileRootOf } from './vendor.js';
28
+ import { PACKAGE_ROOT, codeServerRoot } from './vendor.js';
19
29
 
20
30
  const require_ = createRequire(import.meta.url);
31
+ /** 打包期由 scripts/vendor-repacks.mjs 写出的重打包表。 */
32
+ const VENDORED_FILE = join(PACKAGE_ROOT, 'lib', 'vendored.json');
21
33
 
22
34
  /** 平台目录名,如 win32-arm64。 */
23
35
  export function platformKey(platform = process.platform, arch = process.arch) {
24
36
  return `${platform}-${arch}`;
25
37
  }
26
38
 
27
- /** 本平台聚合包名(取插件 optionalDependencies 中匹配 <平台>-<架构> 的那个)。 */
28
- export function runtimePackageName(platform = process.platform, arch = process.arch) {
29
- const key = platformKey(platform, arch);
39
+ /** 读重打包表。
40
+ * @returns {{scope:string, targets:string[], modules:{alias:string,package:string,version?:string,platform?:boolean}[]}} */
41
+ export function readVendoredTable() {
30
42
  try {
31
- const pkg = JSON.parse(readFileSync(join(PACKAGE_ROOT, 'package.json'), 'utf8'));
32
- const declared = { ...(pkg.optionalDependencies ?? {}), ...(pkg.dependencies ?? {}) };
33
- const hit = Object.keys(declared).find((name) => /^@[^/]+\/dsh-code-server-runtime-/.test(name) && name.endsWith(`-${key}`));
34
- if (hit !== undefined) return hit;
35
- } catch { /* 回退默认 scope */ }
36
- return `@jinsiyu/dsh-code-server-runtime-${key}`;
43
+ const doc = JSON.parse(readFileSync(VENDORED_FILE, 'utf8'));
44
+ const modules = Array.isArray(doc?.modules)
45
+ ? doc.modules.filter((m) => m !== null && typeof m === 'object'
46
+ && typeof m.alias === 'string' && m.alias !== ''
47
+ && typeof m.package === 'string' && m.package !== '')
48
+ : [];
49
+ return {
50
+ scope: typeof doc?.scope === 'string' && doc.scope !== '' ? doc.scope : '@jinsiyu',
51
+ targets: Array.isArray(doc?.targets) ? doc.targets.filter((t) => typeof t === 'string') : [],
52
+ modules,
53
+ };
54
+ } catch {
55
+ return { scope: '@jinsiyu', targets: [], modules: [] };
56
+ }
37
57
  }
38
58
 
39
- /** 定位已安装的平台聚合包。
40
- * @returns {{name:string, version:string|null, root:string, modules:string[]}|null} */
41
- export function resolveRuntime() {
42
- const name = runtimePackageName();
43
- const candidates = [];
44
- try {
45
- candidates.push(dirname(require_.resolve(`${name}/package.json`)));
46
- } catch { /* 未安装 */ }
47
- const profileRoot = profileRootOf();
48
- for (const root of [join(PACKAGE_ROOT, 'node_modules'), profileRoot !== null ? join(profileRoot, 'node_modules') : null, PACKAGE_ROOT]) {
49
- if (root !== null) candidates.push(join(root, name));
50
- }
51
- for (const root of candidates) {
52
- const manifestPath = join(root, 'package.json');
53
- if (!existsSync(manifestPath)) continue;
54
- try {
55
- const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
56
- const modules = Object.keys({ ...(manifest.dependencies ?? {}), ...(manifest.optionalDependencies ?? {}) });
57
- return { name, version: typeof manifest.version === 'string' ? manifest.version : null, root, modules };
58
- } catch { /* 尝试下一个 */ }
59
- }
60
- return null;
59
+ /** 某个条目在指定平台的**真包名**(平台专属的按 `-<平台>-<架构>` 拼后缀)。 */
60
+ export function vendoredPackageName(entry, platform = process.platform, arch = process.arch) {
61
+ return entry.platform === true ? `${entry.package}-${platformKey(platform, arch)}` : entry.package;
62
+ }
63
+
64
+ /** 本平台期望装在依赖图里的重打包子包(原名 + 真名),按原名排序。
65
+ * @returns {{alias:string, packageName:string, version:string|null, platform:boolean}[]} */
66
+ export function vendoredEntries(platform = process.platform, arch = process.arch) {
67
+ return readVendoredTable().modules
68
+ .map((m) => ({
69
+ alias: m.alias,
70
+ packageName: vendoredPackageName(m, platform, arch),
71
+ version: typeof m.version === 'string' ? m.version : null,
72
+ platform: m.platform === true,
73
+ }))
74
+ .sort((a, b) => a.alias.localeCompare(b.alias));
61
75
  }
62
76
 
63
- /** 解析原生/别名模块时的锚点目录:
77
+ /** 解析原生模块时的锚点目录:
64
78
  * ① code-server 运行根(树自带 node_modules);
65
- * ② 平台聚合包目录 —— pnpm 会把带 os/cpu 限定的包**嵌套装在聚合包下**
66
- * (`<profile>/node_modules/@<scope>/dsh-code-server-runtime-<平台>-<架构>/node_modules/<别名>`),
67
- * 既不在 profile 根也不在 code-server 树里,所以要单独作为锚点(运行时用 NODE_PATH 覆盖同一批目录)。
68
- * @returns {string[]} */
79
+ * ② 插件包根 —— 重打包子包挂在插件依赖上(profile 根或插件自己的 node_modules),
80
+ * 从插件清单出发的解析链才看得到它们。 */
69
81
  export function nativeSearchRoots() {
70
82
  const roots = [];
71
83
  const cs = codeServerRoot();
72
84
  if (cs !== null) roots.push(cs);
73
- const runtime = resolveRuntime();
74
- if (runtime !== null) roots.push(runtime.root);
85
+ roots.push(PACKAGE_ROOT);
75
86
  return roots;
76
87
  }
77
88
 
78
- /** 运行时需要加进 NODE_PATH 的目录(平台聚合包下嵌套的别名包)。
79
- * @returns {string[]} */
80
- export function aliasNodePathDirs() {
81
- const runtime = resolveRuntime();
82
- if (runtime === null) return [];
83
- const dir = join(runtime.root, 'node_modules');
84
- return existsSync(dir) ? [dir] : [];
85
- }
86
-
87
89
  /** 解析某个模块的包目录(依次尝试各锚点;先 `<name>/package.json`,再模块入口)。
90
+ * @param {string} name 真包名(重打包子包名),如 `@jinsiyu/dshcs-node-pty`
88
91
  * @returns {string|null} */
89
92
  export function resolveNativeDir(name) {
90
93
  for (const root of nativeSearchRoots()) {
@@ -101,22 +104,23 @@ export function resolveNativeDir(name) {
101
104
  return null;
102
105
  }
103
106
 
104
- /** 从 code-server 运行位置(与聚合包目录)校验原生模块能否解析。
105
- * 先试 `<name>/package.json`(ESM-only 包没有 require 入口,如 @microsoft/mxc-sdk),
106
- * 再退回 `<name>` 本身。
107
- * @param {string[]} modules 期望的原生模块名(通常来自聚合包依赖清单)
107
+ /** 从 code-server 运行位置校验原生模块能否解析(名字用「原名」,即 VS Code 实际 import 的名字)。
108
+ * 先试 `<name>/package.json`(ESM-only 包没有 require 入口,如 @microsoft/mxc-sdk),再退回 `<name>` 本身。
109
+ * @param {string[]} modules 期望的原生模块名(别名)
108
110
  * @returns {{resolved:string[], missing:string[]}} */
109
111
  export function verifyNatives(modules) {
112
+ const csRoot = codeServerRoot();
110
113
  const resolved = [];
111
114
  const missing = [];
112
115
  for (const name of modules) {
113
- if (resolveNativeDir(name) !== null) resolved.push(name);
116
+ const ok = csRoot !== null && resolvesFromRoot(csRoot, name);
117
+ if (ok) resolved.push(name);
114
118
  else missing.push(name);
115
119
  }
116
120
  return { resolved, missing };
117
121
  }
118
122
 
119
- /** 某个模块能否**只靠 code-server 运行根**(含其祖先 node_modules)解析。 */
123
+ /** 某个名字能否**只靠 code-server 运行根**(含其祖先 node_modules)解析。 */
120
124
  function resolvesFromRoot(root, name) {
121
125
  try {
122
126
  const from = createRequire(join(root, 'package.json'));
@@ -130,34 +134,33 @@ function resolvesFromRoot(root, name) {
130
134
  return false;
131
135
  }
132
136
 
133
- /** 确保聚合包带回的别名模块能被 **code-server 树**解析。
137
+ /** 确保重打包子包能被 **code-server 树**按**原始名字**解析。
134
138
  *
135
- * 为什么必须做:pnpm 会把带 `os`/`cpu` 限定的包**嵌套装在聚合包自己的 node_modules 下**
136
- * (如 `<profile>/node_modules/@<scope>/dsh-code-server-runtime-win32-arm64/node_modules/@vscode/windows-registry`),
137
- * 而 VS Code 的 `lib/vscode/out/server-main.js` 用 **ESM `import`** 加载这些包 —— ESM 不认
138
- * `NODE_PATH`(那是 CJS 的兜底),只认目录链。所以这里在 `<codeServerRoot>/node_modules` 下
139
- * 为每个「从树里解析不到」的别名补一个 junction,指向聚合包内的真实目录。
139
+ * 为什么必须做:重打包子包的真名是 `@<scope>/dshcs-<名字>`,而 VS Code 的
140
+ * `lib/vscode/out/server-main.js` 用 **ESM `import`** 加载 `node-pty` / `@vscode/sqlite3` 这类原名 ——
141
+ * ESM 不认 `NODE_PATH`(那是 CJS 的兜底),只认目录链。所以这里在 `<树根>/node_modules` 下为每个
142
+ * 「从树里解析不到」的原名补一个 junction,指向插件依赖图里的真实目录。
140
143
  * 幂等、可重复调用;插件重装后由下次激活/启动自愈。
141
144
  * @returns {{created:string[], failed:string[]}} */
142
145
  export function ensureAliasLinks() {
143
- const runtime = resolveRuntime();
144
146
  const csRoot = codeServerRoot();
145
- if (runtime === null || csRoot === null) return { created: [], failed: [] };
147
+ if (csRoot === null) return { created: [], failed: [] };
146
148
  const linkRoot = join(csRoot, 'node_modules');
147
149
  const created = [];
148
150
  const failed = [];
149
- for (const alias of runtime.modules) {
150
- if (resolvesFromRoot(csRoot, alias)) continue; // 目录链已能看到(profile 根或树内),无需补
151
- const target = resolveNativeDir(alias);
152
- if (target === null) continue; // 该平台包没装上 → 交给 envCheck 报缺
153
- const link = join(linkRoot, alias);
151
+ for (const entry of vendoredEntries()) {
152
+ if (resolvesFromRoot(csRoot, entry.alias)) continue; // 目录链已能看到(profile 根或树内),无需补
153
+ const target = resolveNativeDir(entry.packageName);
154
+ if (target === null) continue; // 该平台子包没装上 → 交给 envCheck 报缺
155
+ const link = join(linkRoot, entry.alias);
154
156
  try {
155
- if (existsSync(link)) continue;
157
+ if (existsSync(join(link, 'package.json'))) continue; // 链接有效(真实目录或有效 junction)
158
+ if (pathEntryExists(link)) rmSync(link, { recursive: true, force: true }); // 断链(树被重装过)→ 清掉重建
156
159
  mkdirSync(dirname(link), { recursive: true });
157
160
  symlinkSync(target, link, process.platform === 'win32' ? 'junction' : 'dir');
158
- created.push(alias);
161
+ created.push(entry.alias);
159
162
  } catch (error) {
160
- failed.push(`${alias}: ${error && error.message ? error.message : String(error)}`);
163
+ failed.push(`${entry.alias}: ${error && error.message ? error.message : String(error)}`);
161
164
  }
162
165
  }
163
166
  return { created, failed };
@@ -251,7 +254,7 @@ export function ensureInnerModuleLinks() {
251
254
  return { created, failed };
252
255
  }
253
256
 
254
- /** 一次性补齐两类链接:VS Code 内部依赖目录 + 聚合包别名。 */
257
+ /** 一次性补齐两类链接:VS Code 内部依赖目录 + 重打包子包的原始名字。 */
255
258
  export function ensureRuntimeLayout() {
256
259
  const inner = ensureInnerModuleLinks();
257
260
  const aliases = ensureAliasLinks();
@@ -260,3 +263,28 @@ export function ensureRuntimeLayout() {
260
263
  failed: [...inner.failed, ...aliases.failed],
261
264
  };
262
265
  }
266
+
267
+ /** 本平台预编译原生包的状态汇总(环境检测卡片用)。
268
+ * @returns {{name:string, source:'package'|null, version:string|null, modules:number, packages:number,
269
+ * resolved:number, missing:string[], missingPackages:string[]}} */
270
+ export function nativeRuntimeStatus(platform = process.platform, arch = process.arch) {
271
+ const table = readVendoredTable();
272
+ const entries = vendoredEntries(platform, arch);
273
+ const installed = [];
274
+ const missingPackages = [];
275
+ for (const entry of entries) {
276
+ if (resolveNativeDir(entry.packageName) !== null) installed.push(entry);
277
+ else missingPackages.push(entry);
278
+ }
279
+ const { resolved, missing } = verifyNatives(entries.map((entry) => entry.alias));
280
+ return {
281
+ name: `${table.scope}/dshcs-*-${platformKey(platform, arch)}`,
282
+ source: installed.length > 0 ? 'package' : null,
283
+ version: null,
284
+ modules: entries.length,
285
+ packages: installed.length,
286
+ resolved: resolved.length,
287
+ missing,
288
+ missingPackages: missingPackages.map((entry) => entry.packageName),
289
+ };
290
+ }
package/lib/vendor.js CHANGED
@@ -10,7 +10,9 @@
10
10
  // - VS Code 内部依赖(约 1GB)与需编译的原生模块仍由包管理器安装:
11
11
  // 纯 JS 部分写在插件 package.json 的 dependencies;
12
12
  // pnpm 拒绝安装的原生包由 scripts/vendor-repacks.mjs 重打包成 @<scope>/dshcs-*,
13
- // 再由平台聚合包 @<scope>/dsh-code-server-runtime-<platform>-<arch> 用 npm: 别名装回原名字;
13
+ // 并**直接挂在插件依赖上**(平台无关的 → dependencies;平台专属的 → optionalDependencies,
14
+ // 包自带 os/cpu 按架构自动选)。原始名字由 lib/native.js 按 lib/vendored.json 补 junction ——
15
+ // 0.3.45 起不再有平台聚合包,原因见 docs/desktop-first-install-root-cause.md;
14
16
  // - 插件包内 `vendor/vscode/` 只作为**开发期/兼容**回退(发布包不含 vendor)。
15
17
  import { createRequire } from 'node:module';
16
18
  import { existsSync, readFileSync } from 'node:fs';
@@ -0,0 +1,99 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "generatedBy": "scripts/vendor-repacks.mjs",
4
+ "scope": "@jinsiyu",
5
+ "targets": [
6
+ "win32-arm64",
7
+ "win32-x64"
8
+ ],
9
+ "modules": [
10
+ {
11
+ "alias": "@microsoft/mxc-sdk",
12
+ "package": "@jinsiyu/dshcs-microsoft-mxc-sdk",
13
+ "version": "0.8.0"
14
+ },
15
+ {
16
+ "alias": "@parcel/watcher",
17
+ "package": "@jinsiyu/dshcs-parcel-watcher",
18
+ "version": "2.5.6"
19
+ },
20
+ {
21
+ "alias": "@vscode/deviceid",
22
+ "package": "@jinsiyu/dshcs-vscode-deviceid",
23
+ "version": "0.1.5",
24
+ "platform": true
25
+ },
26
+ {
27
+ "alias": "@vscode/fs-copyfile",
28
+ "package": "@jinsiyu/dshcs-vscode-fs-copyfile",
29
+ "version": "2.0.0"
30
+ },
31
+ {
32
+ "alias": "@vscode/native-watchdog",
33
+ "package": "@jinsiyu/dshcs-vscode-native-watchdog",
34
+ "version": "1.4.6",
35
+ "platform": true
36
+ },
37
+ {
38
+ "alias": "@vscode/proxy-agent",
39
+ "package": "@jinsiyu/dshcs-vscode-proxy-agent",
40
+ "version": "0.44.0"
41
+ },
42
+ {
43
+ "alias": "@vscode/spdlog",
44
+ "package": "@jinsiyu/dshcs-vscode-spdlog",
45
+ "version": "0.15.8",
46
+ "platform": true
47
+ },
48
+ {
49
+ "alias": "@vscode/sqlite3",
50
+ "package": "@jinsiyu/dshcs-vscode-sqlite3",
51
+ "version": "5.1.12-vscode",
52
+ "platform": true
53
+ },
54
+ {
55
+ "alias": "@vscode/windows-ca-certs",
56
+ "package": "@jinsiyu/dshcs-vscode-windows-ca-certs",
57
+ "version": "0.3.4",
58
+ "platform": true
59
+ },
60
+ {
61
+ "alias": "@vscode/windows-process-tree",
62
+ "package": "@jinsiyu/dshcs-vscode-windows-process-tree",
63
+ "version": "0.8.0",
64
+ "platform": true
65
+ },
66
+ {
67
+ "alias": "@vscode/windows-registry",
68
+ "package": "@jinsiyu/dshcs-vscode-windows-registry",
69
+ "version": "1.2.0",
70
+ "platform": true
71
+ },
72
+ {
73
+ "alias": "cpu-features",
74
+ "package": "@jinsiyu/dshcs-cpu-features",
75
+ "version": "0.0.10"
76
+ },
77
+ {
78
+ "alias": "kerberos",
79
+ "package": "@jinsiyu/dshcs-kerberos",
80
+ "version": "2.1.1-dshcs.1",
81
+ "platform": true
82
+ },
83
+ {
84
+ "alias": "koffi",
85
+ "package": "@jinsiyu/dshcs-koffi",
86
+ "version": "3.1.2"
87
+ },
88
+ {
89
+ "alias": "node-pty",
90
+ "package": "@jinsiyu/dshcs-node-pty",
91
+ "version": "1.2.0-beta.15"
92
+ },
93
+ {
94
+ "alias": "ssh2",
95
+ "package": "@jinsiyu/dshcs-ssh2",
96
+ "version": "1.17.0"
97
+ }
98
+ ]
99
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-code-server-app",
3
- "version": "0.3.43",
3
+ "version": "0.3.45",
4
4
  "description": "VS Code (from a code-server release) inside DSH: a right-sidebar tab driven by the plugin's own launcher over the in-process VS Code server (lib/launcher.mjs). Since 0.3.0 the bundle also ships an editor bridge (assets/extensions/dshcs-editor-bridge): a read-only channel between the in-tree VS Code extension host and DSH, giving the agent what only the editor knows (unsaved buffers, language-server diagnostics, the active selection) and letting editor gestures drive the session. Since 0.3.22 the ask panel renders that session's new content with DSH's own Markdown renderer (pinned to the deployed DSH UI version); since 0.3.23 it is a full-width dialog with collapsible thinking rows and can answer approval requests in place — the bridge's only non-read-only route (POST /approve, constrained to pending in-process requests and the outcomes allowed-once/rejected; panel-first for 5 minutes, handed back to the official card the moment the panel closes). The tab claims DSH file addresses (dsh-resource://file/**) by file type (setting claimExtensions), so the product's own produced-file chips, delivered-file previews and inline prose mentions open in the workbench. The IDE is a resident surface moved with Element.moveBefore instead of being remounted, so switching sidebar tabs no longer reloads it. Opening the tab switches the right sidebar to fullscreen by default (setting fullscreenOnOpen). Following a workspace switch is lightweight: the workbench re-navigates with the new ?folder= and the IDE process is not restarted (since 0.2.12). Requires a DSH with the right-sidebar services (sidebarRightTabs/sidebarRight, >= 0.1.5-alpha.1); older DSH versions get a single upgrade notice on the settings page and no other UI. Two serving modes: loopback port (default) or same-origin mount on DSH's own webServer (/code-server, protected by ctx.connection.requestRejection). No code-server Node layer, no argon2, no C++ toolchain.",
5
5
  "homepage": "https://github.com/jinsiyu/dsh-code-server-app",
6
6
  "repository": {
@@ -50,6 +50,7 @@
50
50
  "lib/serve-dsh.mjs",
51
51
  "lib/vendor.js",
52
52
  "lib/native.js",
53
+ "lib/vendored.json",
53
54
  "assets/favicon.ico",
54
55
  "assets/favicon.svg",
55
56
  "assets/extensions/dshcs-open-file",
@@ -63,6 +64,28 @@
63
64
  "README.md",
64
65
  "README.en.md"
65
66
  ],
67
+ "scripts": {
68
+ "vendor:vscode": "node scripts/vendor-vscode-server.mjs",
69
+ "vendor:latest": "node scripts/vendor-vscode-server.mjs --force",
70
+ "vendor:check": "node scripts/vendor-vscode-server.mjs --check",
71
+ "vendor:code-server": "node scripts/vendor-code-server.mjs",
72
+ "repack:build": "node scripts/vendor-repacks.mjs",
73
+ "publish:repacks": "node scripts/publish-repacks.mjs",
74
+ "publish:plugin": "node scripts/publish-plugin.mjs",
75
+ "promote": "node scripts/promote.mjs",
76
+ "prepack": "node scripts/vendor-vscode-server.mjs && node scripts/build-webview.mjs",
77
+ "build:client": "node scripts/build-client.mjs",
78
+ "build:webview": "node scripts/build-webview.mjs",
79
+ "test:apply": "node scripts/test-plugin-apply.mjs",
80
+ "test:launcher-routes": "node scripts/test-launcher-routes.mjs",
81
+ "test:fullscreen": "node scripts/test-sidebar-fullscreen.mjs",
82
+ "test:claim-types": "node scripts/test-claim-types.mjs",
83
+ "test:workspace-switch": "node scripts/test-workspace-switch.mjs",
84
+ "test:bridge-routes": "node scripts/test-bridge-routes.mjs",
85
+ "test:bridge-extension": "node scripts/test-bridge-extension.mjs",
86
+ "test:webview": "node scripts/test-webview-bundle.mjs",
87
+ "test:vendored": "node scripts/test-vendored-table.mjs"
88
+ },
66
89
  "devDependencies": {
67
90
  "@deepseek-ai/dsh-client-ui-primitives": "0.1.5-rc.2",
68
91
  "@deepseek-ai/dsh-client-ui-theme": "0.1.5-rc.2",
@@ -89,6 +112,14 @@
89
112
  },
90
113
  "license": "MIT",
91
114
  "dependencies": {
115
+ "@jinsiyu/dshcs-cpu-features": "0.0.10",
116
+ "@jinsiyu/dshcs-koffi": "3.1.2",
117
+ "@jinsiyu/dshcs-microsoft-mxc-sdk": "0.8.0",
118
+ "@jinsiyu/dshcs-node-pty": "1.2.0-beta.15",
119
+ "@jinsiyu/dshcs-parcel-watcher": "2.5.6",
120
+ "@jinsiyu/dshcs-ssh2": "1.17.0",
121
+ "@jinsiyu/dshcs-vscode-fs-copyfile": "2.0.0",
122
+ "@jinsiyu/dshcs-vscode-proxy-agent": "0.44.0",
92
123
  "@jinsiyu/dshcs-vscode-server": "4.137.0",
93
124
  "@microsoft/1ds-core-js": "3.2.13",
94
125
  "@microsoft/1ds-post-js": "3.2.13",
@@ -127,27 +158,21 @@
127
158
  "zod": "4.4.3"
128
159
  },
129
160
  "optionalDependencies": {
130
- "@jinsiyu/dsh-code-server-runtime-win32-arm64": "^0.3.10",
131
- "@jinsiyu/dsh-code-server-runtime-win32-x64": "^0.3.10"
132
- },
133
- "scripts": {
134
- "vendor:vscode": "node scripts/vendor-vscode-server.mjs",
135
- "vendor:latest": "node scripts/vendor-vscode-server.mjs --force",
136
- "vendor:check": "node scripts/vendor-vscode-server.mjs --check",
137
- "vendor:code-server": "node scripts/vendor-code-server.mjs",
138
- "repack:build": "node scripts/vendor-repacks.mjs",
139
- "publish:repacks": "node scripts/publish-repacks.mjs",
140
- "publish:plugin": "node scripts/publish-plugin.mjs",
141
- "promote": "node scripts/promote.mjs",
142
- "build:client": "node scripts/build-client.mjs",
143
- "build:webview": "node scripts/build-webview.mjs",
144
- "test:apply": "node scripts/test-plugin-apply.mjs",
145
- "test:launcher-routes": "node scripts/test-launcher-routes.mjs",
146
- "test:fullscreen": "node scripts/test-sidebar-fullscreen.mjs",
147
- "test:claim-types": "node scripts/test-claim-types.mjs",
148
- "test:workspace-switch": "node scripts/test-workspace-switch.mjs",
149
- "test:bridge-routes": "node scripts/test-bridge-routes.mjs",
150
- "test:bridge-extension": "node scripts/test-bridge-extension.mjs",
151
- "test:webview": "node scripts/test-webview-bundle.mjs"
161
+ "@jinsiyu/dshcs-kerberos-win32-arm64": "2.1.1-dshcs.1",
162
+ "@jinsiyu/dshcs-kerberos-win32-x64": "2.1.1-dshcs.1",
163
+ "@jinsiyu/dshcs-vscode-deviceid-win32-arm64": "0.1.5",
164
+ "@jinsiyu/dshcs-vscode-deviceid-win32-x64": "0.1.5",
165
+ "@jinsiyu/dshcs-vscode-native-watchdog-win32-arm64": "1.4.6",
166
+ "@jinsiyu/dshcs-vscode-native-watchdog-win32-x64": "1.4.6",
167
+ "@jinsiyu/dshcs-vscode-spdlog-win32-arm64": "0.15.8",
168
+ "@jinsiyu/dshcs-vscode-spdlog-win32-x64": "0.15.8",
169
+ "@jinsiyu/dshcs-vscode-sqlite3-win32-arm64": "5.1.12-vscode",
170
+ "@jinsiyu/dshcs-vscode-sqlite3-win32-x64": "5.1.12-vscode",
171
+ "@jinsiyu/dshcs-vscode-windows-ca-certs-win32-arm64": "0.3.4",
172
+ "@jinsiyu/dshcs-vscode-windows-ca-certs-win32-x64": "0.3.4",
173
+ "@jinsiyu/dshcs-vscode-windows-process-tree-win32-arm64": "0.8.0",
174
+ "@jinsiyu/dshcs-vscode-windows-process-tree-win32-x64": "0.8.0",
175
+ "@jinsiyu/dshcs-vscode-windows-registry-win32-arm64": "1.2.0",
176
+ "@jinsiyu/dshcs-vscode-windows-registry-win32-x64": "1.2.0"
152
177
  }
153
- }
178
+ }