@dsh-workbench/core 1.1.13 → 1.1.14-beta.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  工作台本体:一个 **DeepSeek Harness 插件**,给 dsh 换一层外壳 —— 左栏项目与会话、
4
4
  中间常驻对话、右侧一列实时数据面板。dsh 本体一行不改,装与不装都只影响你自己的这份实例。
5
- 同仓的另外三个包(`shared` / `module-tools` / `module-hello`)是给**模块作者**的库与样本,
5
+ 同仓的其他包(`shared` / `module-tools` / `module-hello` / `adapter-*` / `adapters-default`)是给**作者与实现者**的库、样本与适配器,
6
6
  终端用户只会直接装这一个。
7
7
 
8
8
  > 只想把它用起来?先看根目录的 [README](../../README.md):三种装法、界面长什么样、
@@ -89,14 +89,16 @@ dsh-workbench migrate --force # 已经迁过一次、想再补并一次
89
89
 
90
90
  | 路径 | 是什么 |
91
91
  |---|---|
92
- | `dist/host/**` | 宿主侧入口(`exports["."]`)与类型;构建产物,不进 git |
92
+ | `dist/host/**` | 宿主侧入口(`exports["."]`);构建产物,不进 git |
93
+ | `dist/types/**` | 类型声明(`exports` 的 `types` 指向这里);构建产物,不进 git |
93
94
  | `client.js` | 浏览器侧 bundle,dsh 客户端按 `dsh.client` 加载 |
94
95
  | `cordis.patch.yml` | 把自己插进 profile 组合图的补丁(装载) |
95
96
  | `preset/diy.patch.yml` | 「工作台 DIY 模式」的 preset;由 `scripts/gen-diy-preset.mjs` 从 dsh 出厂那份 `standard.patch.yml` 派生(生成后提交,selfcheck 盯过期) |
96
97
  | `profile/` | 出厂 profile 模板:可写根那一行(启动器 `--patch` 用,seed 也抄进 profile) |
97
98
  | `skills/` | 模块 DIY 指引,装好后挂给 agent;漏了不报错,只是 agent 不知道要怎么做模块 |
98
99
  | `bin/` | `dsh-workbench` 启动器、隔离 opencli 的入口 |
99
- | `scripts/` | 随包出货的脚本:`seed-profile.sh` / `seed-workshop.sh` / `create-workbench.mjs` / `clone-profile.mjs` / `share-data-root.mjs` |
100
+ | `scripts/` | 随包出货的脚本:`seed-profile.sh` / `seed-workshop.sh` / `create-workbench.mjs` / `clone-profile.mjs` / `share-data-root.mjs` / `patch-blocks.mjs` |
101
+ | `icon.svg` | 插件图标(dsh 插件页用) |
100
102
 
101
103
  ## 数据落在哪
102
104
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { spawn } from 'node:child_process';
2
+ import { execa } from 'execa';
3
3
  import {
4
4
  existsSync,
5
5
  lstatSync,
@@ -250,20 +250,17 @@ function manifestCoreSpec() {
250
250
 
251
251
  function install() {
252
252
  say('装工坊依赖(第一次会下载 react / typescript / vitest)...');
253
- return new Promise((resolve) => {
254
- const child = spawn(`"${pnpm}" install`, {
255
- cwd: diy,
256
- stdio: 'inherit',
257
- shell: true,
258
- env: process.env,
259
- windowsHide: true,
260
- });
261
- child.on('error', (error) => {
253
+ return execa(pnpm, ['install'], {
254
+ cwd: diy,
255
+ stdio: 'inherit',
256
+ env: process.env,
257
+ reject: false,
258
+ })
259
+ .then((result) => result.exitCode ?? 1)
260
+ .catch((error) => {
262
261
  say(`pnpm 没跑起来:${String(error)}`);
263
- resolve(1);
262
+ return 1;
264
263
  });
265
- child.on('close', (code) => resolve(code ?? 1));
266
- });
267
264
  }
268
265
 
269
266
  const version = shellVersion();