@deepseek-ai/dsh 0.1.1-rc.2 → 0.1.2-alpha.3
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.i18n.yaml +2 -2
- package/README.md +13 -5
- package/README.zh.md +12 -6
- package/lib/bin.js +4 -7
- package/lib/{dump-config-D-jtgwY3.js → dump-config-BNQ_bV66.js} +1 -1
- package/lib/{plugin-9h8shc4d.js → plugin-F7ZVfRyo.js} +3 -2
- package/lib/{profile-boot-DG5t9aNs.js → profile-boot-BTzzdrGY.js} +48 -32
- package/lib/profile-boot-x7_BzdeW.js +2 -0
- package/package.json +119 -74
- package/config/agent-presets/code/agent.cordis.yml +0 -263
- package/config/agent-presets/code/preset.yml +0 -3
- package/config/agent-presets/cordis/agent.cordis.yml +0 -263
- package/config/agent-presets/cordis/preset.yml +0 -3
- package/config/agent-presets/cordis/skills/cordis-plugin-development/SKILL.md +0 -420
- package/config/agent-presets/cordis/skills/editing-cordis-compositions/SKILL.md +0 -165
- package/config/agent-presets/minimal/agent.cordis.yml +0 -88
- package/config/agent-presets/minimal/preset.yml +0 -3
- package/config/agent-presets/standard/agent.cordis.yml +0 -252
- package/config/agent-presets/standard/preset.yml +0 -3
- package/lib/profile-boot-BnJoK_kl.js +0 -2
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write apps/cli/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 850a9371c1515d1e0219e9a685b638063c498ff4
|
|
6
|
+
README.zh.md: 02de213d7a7158971b445511a00661183b37234c
|
package/README.md
CHANGED
|
@@ -2,22 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
The `dsh` command is the
|
|
5
|
+
The `dsh` command is the sole supported Node application launcher: profiles are ordered stacks of plugin-bundle patch layers under the user's own overrides. SDK and ACP are profiles, not separate public bins. The Python runtime wheel packages this same command; the SDK defaults to `sdk`, and the minimal example selects `sdk-minimal`. [`src/args.ts`](src/args.ts) owns the command grammar, and [`src/bin.ts`](src/bin.ts) loads only the selected runner. Invalid commands, options from another mode, configuration errors, and boot failures exit nonzero.
|
|
6
6
|
|
|
7
7
|
## Entry modes
|
|
8
8
|
|
|
9
9
|
| Command | Purpose |
|
|
10
10
|
|---|---|
|
|
11
11
|
| `dsh --profile <name>` | Boot the named profile under `$DSH_HOME/profiles/<name>`. |
|
|
12
|
+
| `dsh --profile acp` | Serve automation clients over ACP stdio until disconnect. |
|
|
12
13
|
| `dsh --profile headless "job"` | Run one fresh persisted session, print the final answer, and exit. |
|
|
14
|
+
| `dsh --profile sdk` | Serve SDK clients over JSON-RPC stdio until shutdown or disconnect. |
|
|
15
|
+
| `dsh --profile sdk-minimal` | Serve SDK clients with the standalone minimal agent tree. |
|
|
13
16
|
| `dsh web` | Alias of `--profile web`. |
|
|
14
17
|
| `dsh plugin --profile <name> <pnpm args>` | Manage a profile's plugins by forwarding to pnpm in the profile directory. |
|
|
15
18
|
|
|
16
|
-
The invoking directory is the default workspace root. The `web` and `
|
|
19
|
+
The invoking directory is the default workspace root. The `web`, `headless`, `sdk`, `sdk-minimal`, and `acp` profiles auto-initialize on first use from shipped templates; any other profile must be created through `dsh plugin`.
|
|
17
20
|
|
|
18
21
|
## App arguments
|
|
19
22
|
|
|
20
|
-
The launcher parses only its own flags and hands everything after them to the booted profile, where any injected app plugin may parse the shared immutable snapshot ([`dsh-cmdline`](../../packages/boot/cmdline/README.md)).
|
|
23
|
+
The launcher parses only its own flags and hands everything after them to the booted profile, where any injected app plugin may parse the shared immutable snapshot ([`dsh-cmdline`](../../packages/boot/cmdline/README.md)). The first token the launcher does not recognize starts the app's arguments:
|
|
21
24
|
|
|
22
25
|
```sh
|
|
23
26
|
dsh --profile web --port 8080 # --port belongs to the web app
|
|
@@ -27,21 +30,26 @@ dsh --profile web --help # the web app's flags, not the launcher's
|
|
|
27
30
|
dsh --help # the launcher's own help
|
|
28
31
|
```
|
|
29
32
|
|
|
33
|
+
<a id="profiles"></a>
|
|
30
34
|
## Profiles
|
|
31
35
|
|
|
32
|
-
A profile directory holds a `package.json` (out-of-tree plugin dependencies plus the profile manifest `dsh.profile` with its ordered `bundles` list) and a `cordis.patch.yml` (the user's own patch layer).
|
|
36
|
+
A profile directory holds a `package.json` (out-of-tree plugin dependencies plus the profile manifest `dsh.profile` with its ordered `bundles` list and `patchReload` lifecycle) and a `cordis.patch.yml` (the user's own patch layer). `patchReload: live` watches the profile and home-level patch files; `startup` applies them once.
|
|
33
37
|
|
|
34
38
|
The tree composes over an empty root:
|
|
35
39
|
- each bundle's patch in `dsh.profile.bundles` order
|
|
36
40
|
- then the profile's `cordis.patch.yml`, then the home-level `$DSH_HOME/cordis.patch.yml`
|
|
37
41
|
- then `--patch` overlays
|
|
38
42
|
|
|
39
|
-
Bundles named in `dsh.profile.bundles` resolve from the dsh installation first (`@deepseek-ai/dsh-base`, `@deepseek-ai/dsh-web-app`, `@deepseek-ai/dsh-headless`), then from the profile's own `node_modules`, where pnpm installs out-of-tree plugins.
|
|
43
|
+
Bundles named in `dsh.profile.bundles` resolve from the dsh installation first (`@deepseek-ai/dsh-base`, `@deepseek-ai/dsh-web-app`, `@deepseek-ai/dsh-headless`, `@deepseek-ai/dsh-sdk-app`, `@deepseek-ai/dsh-sdk-minimal`, `@deepseek-ai/dsh-acp-app`), then from the profile's own `node_modules`, where pnpm installs out-of-tree plugins.
|
|
40
44
|
|
|
41
45
|
Use `--dump-default-config` and `--dump-config` to inspect the composed tree without booting it.
|
|
42
46
|
|
|
43
47
|
The [CLI behavior reference](reference/README.md) owns exact layer precedence, flags, shutdown behavior, deployment defaults, and source execution.
|
|
44
48
|
|
|
49
|
+
## Optional overlays
|
|
50
|
+
|
|
51
|
+
`config/examples/` ships opt-in overlays for GitHub review webhooks, session-local Schedule, memory MCP servers, and runtime Cordis tools. They are never part of a default profile; the [user guides](../../docs/user/guide/index.md) and [developer practice guides](../../docs/user/develop/practice/index.md) own setup and safety instructions.
|
|
52
|
+
|
|
45
53
|
## Development
|
|
46
54
|
|
|
47
55
|
Production runs require built package and frontend artifacts. From the repository root, run `pnpm run build` separately, then use `pnpm dsh <args...>` to run the TypeScript entry and forward every argument; the [source-execution reference](reference/README.md#source-execution) owns the module-resolution contract.
|
package/README.zh.md
CHANGED
|
@@ -2,22 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
`dsh`
|
|
5
|
+
`dsh` 是唯一受支持的 Node 应用启动器;profile 由多个插件组合包 patch 层按顺序叠加而成,其上再应用用户自己的覆盖配置。SDK 与 ACP 都是 profile,而不是独立的公开 bin。Python 运行时 wheel 会打包同一个命令;SDK 默认使用 `sdk`,极简示例选择 `sdk-minimal`。[`src/args.ts`](src/args.ts) 负责命令语法,[`src/bin.ts`](src/bin.ts) 只加载选中的运行器。无效命令、来自其他模式的选项、配置错误和启动失败都会以非零状态退出。
|
|
6
6
|
|
|
7
7
|
## 入口模式
|
|
8
8
|
|
|
9
9
|
| 命令 | 用途 |
|
|
10
10
|
|---|---|
|
|
11
11
|
| `dsh --profile <name>` | 启动位于 `$DSH_HOME/profiles/<name>` 的指定 profile。 |
|
|
12
|
+
| `dsh --profile acp` | 通过 ACP stdio 为自动化 client 提供服务,直至断开连接。 |
|
|
12
13
|
| `dsh --profile headless "job"` | 运行一个全新的持久化会话,打印最终答案并退出。 |
|
|
14
|
+
| `dsh --profile sdk` | 通过 JSON-RPC stdio 为 SDK client 提供服务,直至关闭或断开连接。 |
|
|
15
|
+
| `dsh --profile sdk-minimal` | 以独立极简 agent 配置树为 SDK client 提供服务。 |
|
|
13
16
|
| `dsh web` | `--profile web` 的别名。 |
|
|
14
17
|
| `dsh plugin --profile <name> <pnpm args>` | 通过在 profile 目录中转发给 pnpm 来管理该 profile 的插件。 |
|
|
15
18
|
|
|
16
|
-
运行命令时所在的目录将作为默认 workspace 根目录。`web` 和 `
|
|
19
|
+
运行命令时所在的目录将作为默认 workspace 根目录。`web`、`headless`、`sdk`、`sdk-minimal` 和 `acp` profile 在首次使用时会从随附模板自动初始化;其他任何 profile 都必须通过 `dsh plugin` 创建。
|
|
17
20
|
|
|
18
21
|
## 应用参数
|
|
19
22
|
|
|
20
|
-
启动器只解析自身的 flag,并将其后的所有内容交给已启动的 profile;注入该 profile 的任意应用插件都可以解析这份共享的不可变快照([`dsh-cmdline`](../../packages/boot/cmdline/README.zh.md)
|
|
23
|
+
启动器只解析自身的 flag,并将其后的所有内容交给已启动的 profile;注入该 profile 的任意应用插件都可以解析这份共享的不可变快照([`dsh-cmdline`](../../packages/boot/cmdline/README.zh.md))。启动器无法识别的第一个 token 标志着应用参数的开始:
|
|
21
24
|
|
|
22
25
|
```sh
|
|
23
26
|
dsh --profile web --port 8080 # --port belongs to the web app
|
|
@@ -28,22 +31,25 @@ dsh --help # the launcher's own help
|
|
|
28
31
|
```
|
|
29
32
|
|
|
30
33
|
<a id="profiles"></a>
|
|
31
|
-
|
|
32
34
|
## Profile
|
|
33
35
|
|
|
34
|
-
profile 目录包含一个 `package.json`,其中记录树外插件依赖,以及 profile manifest(元数据清单)`dsh.profile`
|
|
36
|
+
profile 目录包含一个 `package.json`,其中记录树外插件依赖,以及 profile manifest(元数据清单)`dsh.profile`、其中按顺序排列的 `bundles` 列表与 `patchReload` 生命周期;还包含一个 `cordis.patch.yml`,其中保存用户自己的 patch 层。`patchReload: live` 监视 profile 与 home 级 patch 文件,`startup` 则只应用一次。
|
|
35
37
|
|
|
36
38
|
配置树以空根为起点,依次叠加以下配置层:
|
|
37
39
|
- `dsh.profile.bundles` 中各组合包的 patch
|
|
38
40
|
- profile 自身的 `cordis.patch.yml`,然后是 home 级的 `$DSH_HOME/cordis.patch.yml`
|
|
39
41
|
- `--patch` 指定的覆盖层
|
|
40
42
|
|
|
41
|
-
`dsh.profile.bundles` 中列出的组合包先从 dsh 安装目录解析(`@deepseek-ai/dsh-base`、`@deepseek-ai/dsh-web-app`、`@deepseek-ai/dsh-headless`),再从 profile 自身的 `node_modules` 解析;pnpm 会将树外插件安装到该目录。
|
|
43
|
+
`dsh.profile.bundles` 中列出的组合包先从 dsh 安装目录解析(`@deepseek-ai/dsh-base`、`@deepseek-ai/dsh-web-app`、`@deepseek-ai/dsh-headless`、`@deepseek-ai/dsh-sdk-app`、`@deepseek-ai/dsh-sdk-minimal`、`@deepseek-ai/dsh-acp-app`),再从 profile 自身的 `node_modules` 解析;pnpm 会将树外插件安装到该目录。
|
|
42
44
|
|
|
43
45
|
使用 `--dump-default-config` 和 `--dump-config` 可在不启动的情况下检查组合后的配置树。
|
|
44
46
|
|
|
45
47
|
层的确切优先级、flag、关闭行为、部署默认值和源码执行方式,以 [CLI(命令行界面)行为参考](reference/README.zh.md)为准。
|
|
46
48
|
|
|
49
|
+
## 可选 Overlay
|
|
50
|
+
|
|
51
|
+
`config/examples/` 交付 GitHub 评审 webhook、会话内 Schedule、记忆 MCP 服务与运行时 Cordis 工具的可选 overlay。它们绝不属于默认 profile;安装与安全说明由[用户指南](../../docs/user/guide/index.zh.md)和[开发实战指南](../../docs/user/develop/practice/index.zh.md)负责。
|
|
52
|
+
|
|
47
53
|
## 开发
|
|
48
54
|
|
|
49
55
|
生产运行需要已构建的包与前端产物。请在仓库根目录单独运行 `pnpm run build`,然后使用 `pnpm dsh <args...>` 运行 TypeScript 入口并转发所有参数;模块解析约定以[源码执行参考](reference/README.zh.md#source-execution)为准。
|
package/lib/bin.js
CHANGED
|
@@ -115,13 +115,10 @@ function parseDshArgs(argv, version) {
|
|
|
115
115
|
//#endregion
|
|
116
116
|
//#region lib/types/bin.js
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
119
|
-
* of each dispatch path; the adapter prints and exits for
|
|
120
|
-
* `--help`/`--version`/a parse error, so only a valid mode reaches the switch.
|
|
118
|
+
* Command-line entry for dsh.
|
|
121
119
|
* @module @deepseek-ai/dsh/bin
|
|
122
120
|
*/
|
|
123
121
|
/* v8 ignore file -- built-bin acceptance exercises this self-executing dispatch. */
|
|
124
|
-
/** This app's version, read from its checked-in package.json. */
|
|
125
122
|
function readVersion() {
|
|
126
123
|
const manifest = JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8"));
|
|
127
124
|
return typeof manifest.version === "string" ? manifest.version : "0.0.0";
|
|
@@ -129,7 +126,7 @@ function readVersion() {
|
|
|
129
126
|
const invocation = parseDshArgs(process.argv.slice(2), readVersion());
|
|
130
127
|
switch (invocation.mode) {
|
|
131
128
|
case "profile": {
|
|
132
|
-
const { runProfile } = await import("./profile-boot-
|
|
129
|
+
const { runProfile } = await import("./profile-boot-x7_BzdeW.js");
|
|
133
130
|
await runProfile({
|
|
134
131
|
environment: loadLayeredEnv("dsh"),
|
|
135
132
|
profile: invocation.profile,
|
|
@@ -139,12 +136,12 @@ switch (invocation.mode) {
|
|
|
139
136
|
break;
|
|
140
137
|
}
|
|
141
138
|
case "plugin": {
|
|
142
|
-
const { runPlugin } = await import("./plugin-
|
|
139
|
+
const { runPlugin } = await import("./plugin-F7ZVfRyo.js");
|
|
143
140
|
process.exit(runPlugin(invocation.profile, invocation.args));
|
|
144
141
|
break;
|
|
145
142
|
}
|
|
146
143
|
case "dump-config": {
|
|
147
|
-
const { runDumpConfig } = await import("./dump-config-
|
|
144
|
+
const { runDumpConfig } = await import("./dump-config-BNQ_bV66.js");
|
|
148
145
|
runDumpConfig(invocation.profile, invocation.defaultOnly, invocation.patches);
|
|
149
146
|
break;
|
|
150
147
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-
|
|
1
|
+
import { i as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-BTzzdrGY.js";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { loadOptionalPatches, loadOverlayPatches, renderConfigDump } from "@deepseek-ai/dsh-app-boot";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as INSTALL_ANCHOR } from "./profile-boot-
|
|
1
|
+
import { t as INSTALL_ANCHOR } from "./profile-boot-BTzzdrGY.js";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { DEFAULT_PROFILE_BUNDLES, PROFILE_TEMPLATES, initProfile, readProfileManifest, resolveBundleDir, resolveProfileDir, writeProfileManifest } from "@deepseek-ai/dsh-app-boot";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
@@ -101,7 +101,8 @@ function anchorPathSpec(argument, cwd) {
|
|
|
101
101
|
function runPlugin(profile, args) {
|
|
102
102
|
const dir = resolveProfileDir(profile);
|
|
103
103
|
if (!existsSync(join(dir, "package.json"))) {
|
|
104
|
-
|
|
104
|
+
const template = PROFILE_TEMPLATES[profile];
|
|
105
|
+
initProfile(dir, template?.bundles ?? DEFAULT_PROFILE_BUNDLES, template?.patchReload);
|
|
105
106
|
process.stderr.write(`${NAME}: initialized profile ${profile} at ${dir}\n`);
|
|
106
107
|
}
|
|
107
108
|
const before = readProfileManifest(NAME, dir);
|
|
@@ -74,17 +74,38 @@ function createProcessShutdown(dispose, forceExit = (code) => {
|
|
|
74
74
|
* Shared profile boot for every `dsh` surface: resolve the profile, stack its
|
|
75
75
|
* patch layers (bundle layers in `dsh.profile.bundles` order, the profile's
|
|
76
76
|
* own `cordis.patch.yml`, `--patch` overlays, the telemetry switch), mount the
|
|
77
|
-
* tree over the profile's empty root config,
|
|
78
|
-
*
|
|
77
|
+
* tree over the profile's empty root config, apply its selected patch-reload
|
|
78
|
+
* lifecycle, and wire fail-loud plus bounded shutdown.
|
|
79
79
|
*
|
|
80
80
|
* App flags are not the launcher's business: the invocation's inner arguments
|
|
81
81
|
* are provided to the tree through `ctx.cmdlineArgs`, where any injected app
|
|
82
82
|
* plugin may read the same immutable snapshot.
|
|
83
83
|
* @module @deepseek-ai/dsh/profile-boot
|
|
84
84
|
*/
|
|
85
|
-
/** Shipped agent-preset root: beside this app's own config, in both source and built layouts. */
|
|
86
|
-
const SHIPPED_PRESET_ROOT = fileURLToPath(new URL("../config/agent-presets/", import.meta.url));
|
|
87
85
|
const NAME = "dsh";
|
|
86
|
+
/** Launcher-owned readiness signal committed only after boot and host setup succeed. */
|
|
87
|
+
function createAppReady() {
|
|
88
|
+
let ready = false;
|
|
89
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
90
|
+
return {
|
|
91
|
+
service: { onReady(listener) {
|
|
92
|
+
if (ready) {
|
|
93
|
+
listener();
|
|
94
|
+
return () => {};
|
|
95
|
+
}
|
|
96
|
+
listeners.add(listener);
|
|
97
|
+
return () => {
|
|
98
|
+
listeners.delete(listener);
|
|
99
|
+
};
|
|
100
|
+
} },
|
|
101
|
+
commit() {
|
|
102
|
+
if (ready) return;
|
|
103
|
+
ready = true;
|
|
104
|
+
for (const listener of [...listeners]) listener();
|
|
105
|
+
listeners.clear();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
88
109
|
/**
|
|
89
110
|
* The home-level user patch layer (`$DSH_HOME/cordis.patch.yml`), applied
|
|
90
111
|
* over every profile's own layer. Resolved per call, not at module load:
|
|
@@ -125,20 +146,19 @@ function resolveTelemetryPatch(disabledEnv, hasRow) {
|
|
|
125
146
|
};
|
|
126
147
|
}
|
|
127
148
|
/**
|
|
128
|
-
* Load a resolved profile for `name
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
149
|
+
* Load a resolved profile for `name` and (re)write the empty root config. The
|
|
150
|
+
* root is always rewritten: the whole composition is patch layers, and the
|
|
151
|
+
* vendored Loader's tree write-back (a plugin self-disposing persists the
|
|
152
|
+
* current tree) can bake composed rows into this file — which would duplicate
|
|
153
|
+
* every bundle insert on the next boot. The file exists on disk only because
|
|
154
|
+
* the Loader needs a real include root to anchor `baseUrl` at the profile
|
|
155
|
+
* directory (the config dump anchors on the same file, so both compose over
|
|
156
|
+
* the identical base).
|
|
136
157
|
* @param name - the profile name.
|
|
137
158
|
* @param userLayer - `false` skips parsing `cordis.patch.yml` (the default dump).
|
|
138
159
|
* @returns the loaded profile.
|
|
139
160
|
*/
|
|
140
161
|
function prepareProfile(name, userLayer = true) {
|
|
141
|
-
healProfilesModuleFallback(INSTALL_ANCHOR);
|
|
142
162
|
const profile = loadProfile(NAME, name, INSTALL_ANCHOR, void 0, { userLayer });
|
|
143
163
|
writeFileSync(join(profile.dir, PROFILE_ROOT_FILENAME), PROFILE_ROOT_CONFIG);
|
|
144
164
|
return profile;
|
|
@@ -154,17 +174,21 @@ function allPatches(composed) {
|
|
|
154
174
|
}
|
|
155
175
|
/**
|
|
156
176
|
* Load `name` and compose its effective patch stack: bundle layers in
|
|
157
|
-
* `dsh.profile.bundles` order (
|
|
158
|
-
* platform
|
|
177
|
+
* `dsh.profile.bundles` order (a base-backed profile gets the base bundle's
|
|
178
|
+
* platform-gated shell rows), the profile's user layer, the home-level user
|
|
159
179
|
* layer (`$DSH_HOME/cordis.patch.yml` — machine-local preferences that apply
|
|
160
180
|
* to every profile, so it outranks the per-profile layer), `--patch` overlays,
|
|
161
181
|
* then the telemetry switch.
|
|
162
182
|
* @param name - the profile name.
|
|
163
183
|
* @param patchFiles - `--patch` overlay paths, in argv order.
|
|
164
|
-
* @returns the profile
|
|
184
|
+
* @returns the profile and its patch layers.
|
|
165
185
|
*/
|
|
166
|
-
function composeProfile(name, patchFiles) {
|
|
186
|
+
async function composeProfile(name, patchFiles) {
|
|
167
187
|
const profile = prepareProfile(name);
|
|
188
|
+
await healProfilesModuleFallback({
|
|
189
|
+
installAnchor: INSTALL_ANCHOR,
|
|
190
|
+
profile
|
|
191
|
+
});
|
|
168
192
|
const homePatches = loadOptionalPatches(NAME, homePatchPath()) ?? [];
|
|
169
193
|
const overlays = patchFiles.flatMap((file) => loadOverlayPatches(NAME, resolve(file)));
|
|
170
194
|
const bundlePatches = profile.layers.flatMap((layer) => layer.patches);
|
|
@@ -176,24 +200,13 @@ function composeProfile(name, patchFiles) {
|
|
|
176
200
|
overlays
|
|
177
201
|
])) if (typeof row.id === "string") rows.set(row.id, row);
|
|
178
202
|
const composedOverlays = [...overlays];
|
|
179
|
-
if (rows.has("agent-presets")) composedOverlays.push({
|
|
180
|
-
id: "agent-presets",
|
|
181
|
-
config: {
|
|
182
|
-
...rows.get("agent-presets")?.config ?? {},
|
|
183
|
-
roots: [{
|
|
184
|
-
path: SHIPPED_PRESET_ROOT,
|
|
185
|
-
trust: "system"
|
|
186
|
-
}]
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
203
|
const telemetryPatch = resolveTelemetryPatch(process.env.DSH_TELEMETRY_DISABLED, rows.has(TELEMETRY_ROW_ID));
|
|
190
204
|
if (telemetryPatch !== void 0) composedOverlays.push(telemetryPatch);
|
|
191
205
|
return {
|
|
192
206
|
profile,
|
|
193
207
|
bundlePatches,
|
|
194
208
|
homePatches,
|
|
195
|
-
overlays: composedOverlays
|
|
196
|
-
rows
|
|
209
|
+
overlays: composedOverlays
|
|
197
210
|
};
|
|
198
211
|
}
|
|
199
212
|
/**
|
|
@@ -218,8 +231,9 @@ function suppressShutdownError(ctx, signal, error) {
|
|
|
218
231
|
* @returns the settled root context and the shutdown controller.
|
|
219
232
|
*/
|
|
220
233
|
async function runProfile(options) {
|
|
221
|
-
const composed = composeProfile(options.profile, options.patchFiles);
|
|
234
|
+
const composed = await composeProfile(options.profile, options.patchFiles);
|
|
222
235
|
const app = {};
|
|
236
|
+
const appReady = createAppReady();
|
|
223
237
|
const shutdown = createProcessShutdown(async () => {
|
|
224
238
|
await app.current?.fiber.dispose();
|
|
225
239
|
});
|
|
@@ -249,11 +263,12 @@ async function runProfile(options) {
|
|
|
249
263
|
hostCtx.provide(DSH_LAUNCH_ENVIRONMENT_KEY, options.environment);
|
|
250
264
|
provideCmdline(hostCtx, {
|
|
251
265
|
args: options.args,
|
|
252
|
-
exit: (code) => void shutdown.shutdown(code)
|
|
266
|
+
exit: (code) => void shutdown.shutdown(code),
|
|
267
|
+
ready: appReady.service
|
|
253
268
|
});
|
|
254
269
|
});
|
|
255
270
|
app.current = ctx;
|
|
256
|
-
if (!signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0) try {
|
|
271
|
+
if (composed.profile.patchReload === "live" && !signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0) try {
|
|
257
272
|
if (ctx.get("hmr") === void 0) {
|
|
258
273
|
if (ctx.get("timer") === void 0) await ctx.loader.create({ name: "@deepseek-ai/cordis-plugin-timer" });
|
|
259
274
|
await ctx.loader.create({
|
|
@@ -274,6 +289,7 @@ async function runProfile(options) {
|
|
|
274
289
|
} catch (error) {
|
|
275
290
|
suppressShutdownError(ctx, signalShutdown.signal, error);
|
|
276
291
|
}
|
|
292
|
+
if (!signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0) appReady.commit();
|
|
277
293
|
return {
|
|
278
294
|
ctx,
|
|
279
295
|
shutdown
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh",
|
|
3
3
|
"description": "dsh CLI: profile boot, plugin management, and the browser UI alias",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -15,88 +15,133 @@
|
|
|
15
15
|
"dsh": "lib/bin.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
-
"lib/*.js"
|
|
19
|
-
"config"
|
|
18
|
+
"lib/*.js"
|
|
20
19
|
],
|
|
20
|
+
"dsh": {
|
|
21
|
+
"configTrees": [
|
|
22
|
+
{
|
|
23
|
+
"mount": "config/agent-presets",
|
|
24
|
+
"path": "../../packages/preset/agent-presets/presets",
|
|
25
|
+
"scanRoster": true
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
21
29
|
"license": "MIT",
|
|
22
30
|
"dependencies": {
|
|
23
31
|
"commander": "^15.0.0",
|
|
24
32
|
"js-yaml": "^4.2.0",
|
|
25
33
|
"node-addon-require-builtin": "^0.1.4",
|
|
26
|
-
"@deepseek-ai/cordis-plugin-
|
|
27
|
-
"@deepseek-ai/cordis
|
|
28
|
-
"@deepseek-ai/cordis-plugin-
|
|
29
|
-
"@deepseek-ai/cordis-plugin-
|
|
30
|
-
"@deepseek-ai/
|
|
31
|
-
"@deepseek-ai/dsh-app
|
|
32
|
-
"@deepseek-ai/dsh-
|
|
33
|
-
"@deepseek-ai/dsh-
|
|
34
|
-
"@deepseek-ai/dsh-
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-
|
|
37
|
-
"@deepseek-ai/dsh-command-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-compaction-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-tool-
|
|
69
|
-
"@deepseek-ai/dsh-tool-
|
|
70
|
-
"@deepseek-ai/dsh-tool-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@deepseek-ai/dsh-tool-
|
|
75
|
-
"@deepseek-ai/dsh-tool-
|
|
76
|
-
"@deepseek-ai/dsh-tool-
|
|
77
|
-
"@deepseek-ai/dsh-tool-
|
|
78
|
-
"@deepseek-ai/dsh-tool-
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"@deepseek-ai/dsh-
|
|
81
|
-
"@deepseek-ai/
|
|
82
|
-
"@deepseek-ai/dsh-tool-
|
|
83
|
-
"@deepseek-ai/dsh-tool-
|
|
84
|
-
"@deepseek-ai/dsh-
|
|
34
|
+
"@deepseek-ai/cordis-plugin-hmr": "^1.0.17",
|
|
35
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
36
|
+
"@deepseek-ai/cordis-plugin-include": "^1.0.7",
|
|
37
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
38
|
+
"@deepseek-ai/cordis-plugin-timer": "^1.1.4",
|
|
39
|
+
"@deepseek-ai/dsh-acp-app": "^0.1.2-alpha.3",
|
|
40
|
+
"@deepseek-ai/dsh-agent-instructions": "^0.1.2-alpha.3",
|
|
41
|
+
"@deepseek-ai/dsh-agent-tool-presentation": "^0.1.2-alpha.3",
|
|
42
|
+
"@deepseek-ai/dsh-app-boot": "^0.1.2-alpha.3",
|
|
43
|
+
"@deepseek-ai/dsh-base": "^0.1.2-alpha.3",
|
|
44
|
+
"@deepseek-ai/dsh-cmdline": "^0.1.2-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-command-compact": "^0.1.2-alpha.3",
|
|
46
|
+
"@deepseek-ai/dsh-command-goal": "^0.1.2-alpha.3",
|
|
47
|
+
"@deepseek-ai/dsh-compaction-basic": "^0.1.2-alpha.3",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-cordis": "^0.1.2-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": "^0.1.2-alpha.3",
|
|
50
|
+
"@deepseek-ai/dsh-compaction-tool-result-pruner": "^0.1.2-alpha.3",
|
|
51
|
+
"@deepseek-ai/dsh-cordis-client-runner": "^0.1.2-alpha.3",
|
|
52
|
+
"@deepseek-ai/dsh-fs-local": "^0.1.2-alpha.3",
|
|
53
|
+
"@deepseek-ai/dsh-goal": "^0.1.2-alpha.3",
|
|
54
|
+
"@deepseek-ai/dsh-goal-round-driver": "^0.1.2-alpha.3",
|
|
55
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.2-alpha.3",
|
|
56
|
+
"@deepseek-ai/dsh-hooks-claude-code": "^0.1.2-alpha.3",
|
|
57
|
+
"@deepseek-ai/dsh-hooks-codex": "^0.1.2-alpha.3",
|
|
58
|
+
"@deepseek-ai/dsh-jobs-local": "^0.1.2-alpha.3",
|
|
59
|
+
"@deepseek-ai/dsh-launch-environment": "^0.1.2-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-mcp-client": "^0.1.2-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-persona": "^0.1.2-alpha.3",
|
|
62
|
+
"@deepseek-ai/dsh-plan-mode": "^0.1.2-alpha.3",
|
|
63
|
+
"@deepseek-ai/dsh-pwsh-local": "^0.1.2-alpha.3",
|
|
64
|
+
"@deepseek-ai/dsh-pwsh-sandbox": "^0.1.2-alpha.3",
|
|
65
|
+
"@deepseek-ai/dsh-schedule": "^0.1.2-alpha.3",
|
|
66
|
+
"@deepseek-ai/dsh-sdk-app": "^0.1.2-alpha.3",
|
|
67
|
+
"@deepseek-ai/dsh-sdk-minimal": "^0.1.2-alpha.3",
|
|
68
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.2-alpha.3",
|
|
69
|
+
"@deepseek-ai/dsh-session-reference": "^0.1.2-alpha.3",
|
|
70
|
+
"@deepseek-ai/dsh-skill": "^0.1.2-alpha.3",
|
|
71
|
+
"@deepseek-ai/dsh-skill-filesystem": "^0.1.2-alpha.3",
|
|
72
|
+
"@deepseek-ai/dsh-terminal": "^0.1.2-alpha.3",
|
|
73
|
+
"@deepseek-ai/dsh-tmux-context": "^0.1.2-alpha.3",
|
|
74
|
+
"@deepseek-ai/dsh-headless": "^0.1.2-alpha.3",
|
|
75
|
+
"@deepseek-ai/dsh-token-meter": "^0.1.2-alpha.3",
|
|
76
|
+
"@deepseek-ai/dsh-tool-ask-user": "^0.1.2-alpha.3",
|
|
77
|
+
"@deepseek-ai/dsh-tool-bash": "^0.1.2-alpha.3",
|
|
78
|
+
"@deepseek-ai/dsh-tool-bash-persistent": "^0.1.2-alpha.3",
|
|
79
|
+
"@deepseek-ai/dsh-time-context": "^0.1.2-alpha.3",
|
|
80
|
+
"@deepseek-ai/dsh-terminal-bash": "^0.1.2-alpha.3",
|
|
81
|
+
"@deepseek-ai/dsh-tool-cordis": "^0.1.2-alpha.3",
|
|
82
|
+
"@deepseek-ai/dsh-tool-fs": "^0.1.2-alpha.3",
|
|
83
|
+
"@deepseek-ai/dsh-tool-fs-search": "^0.1.2-alpha.3",
|
|
84
|
+
"@deepseek-ai/dsh-tool-goal": "^0.1.2-alpha.3",
|
|
85
|
+
"@deepseek-ai/dsh-tool-jobs": "^0.1.2-alpha.3",
|
|
86
|
+
"@deepseek-ai/dsh-tool-pwsh": "^0.1.2-alpha.3",
|
|
87
|
+
"@deepseek-ai/dsh-tool-pwsh-persistent": "^0.1.2-alpha.3",
|
|
88
|
+
"@deepseek-ai/dsh-tool-skill": "^0.1.2-alpha.3",
|
|
89
|
+
"@deepseek-ai/dsh-tool-ralph": "^0.1.2-alpha.3",
|
|
90
|
+
"@deepseek-ai/dsh-tool-str-replace-editor": "^0.1.2-alpha.3",
|
|
91
|
+
"@deepseek-ai/dsh-tool-subagent": "^0.1.2-alpha.3",
|
|
92
|
+
"@deepseek-ai/dsh-tool-subagent-control": "^0.1.2-alpha.3",
|
|
93
|
+
"@deepseek-ai/dsh-tool-todo": "^0.1.2-alpha.3",
|
|
94
|
+
"@deepseek-ai/dsh-tool-web": "^0.1.2-alpha.3",
|
|
95
|
+
"@deepseek-ai/dsh-webhook": "^0.1.2-alpha.3",
|
|
96
|
+
"@deepseek-ai/dsh-webhook-github": "^0.1.2-alpha.3",
|
|
97
|
+
"@deepseek-ai/dsh-workflow-worker-thread": "^0.1.2-alpha.3",
|
|
98
|
+
"@deepseek-ai/schemastery": "^3.18.2",
|
|
99
|
+
"@deepseek-ai/dsh-tool-workflow": "^0.1.2-alpha.3",
|
|
100
|
+
"@deepseek-ai/dsh-web-app": "^0.1.2-alpha.3"
|
|
85
101
|
},
|
|
86
102
|
"devDependencies": {
|
|
103
|
+
"@agentclientprotocol/sdk": "1.4.0",
|
|
87
104
|
"@types/js-yaml": "^4.0.9",
|
|
105
|
+
"@types/ws": "8.18.1",
|
|
88
106
|
"execa": "^10.0.0",
|
|
89
|
-
"
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-
|
|
99
|
-
"@deepseek-ai/dsh-
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
107
|
+
"ws": "8.21.0",
|
|
108
|
+
"@deepseek-ai/dsh-acp": "^0.1.2-alpha.3",
|
|
109
|
+
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.3",
|
|
110
|
+
"@deepseek-ai/dsh-attachment-local": "^0.1.2-alpha.3",
|
|
111
|
+
"@deepseek-ai/dsh-bash-local": "^0.1.2-alpha.3",
|
|
112
|
+
"@deepseek-ai/dsh-credentials-local": "^0.1.2-alpha.3",
|
|
113
|
+
"@deepseek-ai/dsh-deepseek-llm-api-extensions": "^0.1.2-alpha.3",
|
|
114
|
+
"@deepseek-ai/dsh-experimental-agent-team": "^0.1.2-alpha.3",
|
|
115
|
+
"@deepseek-ai/dsh-experimental-agent-team-profile": "^0.1.2-alpha.3",
|
|
116
|
+
"@deepseek-ai/dsh-experimental-tool-agent-team": "^0.1.2-alpha.3",
|
|
117
|
+
"@deepseek-ai/dsh-fs-observation-policy": "^0.1.2-alpha.3",
|
|
118
|
+
"@deepseek-ai/dsh-fs-sandbox": "^0.1.2-alpha.3",
|
|
119
|
+
"@deepseek-ai/dsh-host-frontend-static": "^0.1.2-alpha.3",
|
|
120
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.3",
|
|
121
|
+
"@deepseek-ai/dsh-llm-mock-server": "^0.1.2-alpha.3",
|
|
122
|
+
"@deepseek-ai/dsh-llm-deepseek": "^0.1.2-alpha.3",
|
|
123
|
+
"@deepseek-ai/dsh-llm-pi-ai": "^0.1.2-alpha.3",
|
|
124
|
+
"@deepseek-ai/dsh-llm-replay": "^0.1.2-alpha.3",
|
|
125
|
+
"@deepseek-ai/dsh-plugin-package-inventory-deepseek": "^0.1.2-alpha.3",
|
|
126
|
+
"@deepseek-ai/dsh-loader-smoke": "^0.1.2-alpha.3",
|
|
127
|
+
"@deepseek-ai/dsh-llm": "^0.1.2-alpha.3",
|
|
128
|
+
"@deepseek-ai/dsh-sandbox-local": "^0.1.2-alpha.3",
|
|
129
|
+
"@deepseek-ai/dsh-session": "^0.1.2-alpha.3",
|
|
130
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.2-alpha.3",
|
|
131
|
+
"@deepseek-ai/dsh-session-query": "^0.1.2-alpha.3",
|
|
132
|
+
"@deepseek-ai/dsh-settings": "^0.1.2-alpha.3",
|
|
133
|
+
"@deepseek-ai/dsh-settings-file": "^0.1.2-alpha.3",
|
|
134
|
+
"@deepseek-ai/dsh-subagent": "^0.1.2-alpha.3",
|
|
135
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "^0.1.2-alpha.3",
|
|
136
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.2-alpha.3",
|
|
137
|
+
"@deepseek-ai/dsh-subprocess-local": "^0.1.2-alpha.3",
|
|
138
|
+
"@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.2-alpha.3",
|
|
139
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.1.2-alpha.3",
|
|
140
|
+
"@deepseek-ai/dsh-session-log-deepseek": "^0.1.2-alpha.3",
|
|
141
|
+
"@deepseek-ai/dsh-shell-env": "^0.1.2-alpha.3",
|
|
142
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.3",
|
|
143
|
+
"@deepseek-ai/dsh-user-approval": "^0.1.2-alpha.3",
|
|
144
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.3",
|
|
145
|
+
"@deepseek-ai/dsh-tool-subagent-report": "^0.1.2-alpha.3"
|
|
101
146
|
}
|
|
102
147
|
}
|