@deepseek-ai/dsh 0.1.2-rc.1 → 0.1.5-alpha.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.i18n.yaml +2 -2
- package/README.md +2 -1
- package/README.zh.md +2 -1
- package/lib/bin.js +45 -26
- package/lib/{dump-config-BNQ_bV66.js → dump-config-lFgMwK8i.js} +4 -3
- package/lib/{plugin-F7ZVfRyo.js → plugin-Ddi42qoW.js} +1 -1
- package/lib/profile-boot-BP_C0vpU.js +2 -0
- package/lib/{profile-boot-BTzzdrGY.js → profile-boot-Dk-7KqJc.js} +58 -8
- package/package.json +105 -102
- package/lib/profile-boot-x7_BzdeW.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: 2e74ef68cf0b8487083a2e2af0f5175c78ec5212
|
|
6
|
+
README.zh.md: 85a75f4c025e1bfe1461b9ffdaca533d308318ba
|
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ The `dsh` command is the sole supported Node application launcher: profiles are
|
|
|
9
9
|
| Command | Purpose |
|
|
10
10
|
|---|---|
|
|
11
11
|
| `dsh --profile <name>` | Boot the named profile under `$DSH_HOME/profiles/<name>`. |
|
|
12
|
+
| `dsh --profile <name> --from-default-profile <template>` | Create a new custom profile from a shipped template, then boot it. |
|
|
12
13
|
| `dsh --profile acp` | Serve automation clients over ACP stdio until disconnect. |
|
|
13
14
|
| `dsh --profile headless "job"` | Run one fresh persisted session, print the final answer, and exit. |
|
|
14
15
|
| `dsh --profile sdk` | Serve SDK clients over JSON-RPC stdio until shutdown or disconnect. |
|
|
@@ -16,7 +17,7 @@ The `dsh` command is the sole supported Node application launcher: profiles are
|
|
|
16
17
|
| `dsh web` | Alias of `--profile web`. |
|
|
17
18
|
| `dsh plugin --profile <name> <pnpm args>` | Manage a profile's plugins by forwarding to pnpm in the profile directory. |
|
|
18
19
|
|
|
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
|
|
20
|
+
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. Create another profile at an unused, non-shipped name with `--from-default-profile`, or initialize a base-backed profile through `dsh plugin`. The `desktop` name is reserved for the Electron-owned profile, so the CLI rejects boot, config-dump, and plugin-management requests for it.
|
|
20
21
|
|
|
21
22
|
## App arguments
|
|
22
23
|
|
package/README.zh.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| 命令 | 用途 |
|
|
10
10
|
|---|---|
|
|
11
11
|
| `dsh --profile <name>` | 启动位于 `$DSH_HOME/profiles/<name>` 的指定 profile。 |
|
|
12
|
+
| `dsh --profile <name> --from-default-profile <template>` | 从随附模板创建新的自定义 profile,然后启动它。 |
|
|
12
13
|
| `dsh --profile acp` | 通过 ACP stdio 为自动化 client 提供服务,直至断开连接。 |
|
|
13
14
|
| `dsh --profile headless "job"` | 运行一个全新的持久化会话,打印最终答案并退出。 |
|
|
14
15
|
| `dsh --profile sdk` | 通过 JSON-RPC stdio 为 SDK client 提供服务,直至关闭或断开连接。 |
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
| `dsh web` | `--profile web` 的别名。 |
|
|
17
18
|
| `dsh plugin --profile <name> <pnpm args>` | 通过在 profile 目录中转发给 pnpm 来管理该 profile 的插件。 |
|
|
18
19
|
|
|
19
|
-
运行命令时所在的目录将作为默认 workspace 根目录。`web`、`headless`、`sdk`、`sdk-minimal` 和 `acp` profile
|
|
20
|
+
运行命令时所在的目录将作为默认 workspace 根目录。`web`、`headless`、`sdk`、`sdk-minimal` 和 `acp` profile 在首次使用时会从随附模板自动初始化。使用 `--from-default-profile` 可以基于这些模板之一,在尚未使用的非内置名称处创建其他 profile;通过 `dsh plugin` 则可以初始化一个以 base 为基础的 profile。`desktop` 名称保留给 Electron 持有的 profile,因此 CLI 会拒绝针对它的启动、配置 dump 和插件管理请求。
|
|
20
21
|
|
|
21
22
|
## 应用参数
|
|
22
23
|
|
package/lib/bin.js
CHANGED
|
@@ -25,10 +25,15 @@ import { Command, CommanderError } from "commander";
|
|
|
25
25
|
* variadic — a variadic `--patch` would swallow the inner arguments.
|
|
26
26
|
*/
|
|
27
27
|
const collect = (value, previous = []) => [...previous, value];
|
|
28
|
+
function rejectElectronProfile(program, profile) {
|
|
29
|
+
if (profile.toLowerCase() === "desktop") program.error("error: profile \"desktop\" is managed exclusively by the Electron application");
|
|
30
|
+
}
|
|
28
31
|
/** The launcher's own help text; each app prints its own. */
|
|
29
32
|
const HELP_EXAMPLES = `
|
|
30
33
|
Examples:
|
|
31
34
|
dsh --profile web boot the web profile (same as: dsh web)
|
|
35
|
+
dsh --profile rescue --from-default-profile web
|
|
36
|
+
create rescue from the shipped web template, then boot it
|
|
32
37
|
dsh --profile headless "run the tests" answer one task, print the result, and exit
|
|
33
38
|
dsh --profile tui --patch ./extra.yml boot a custom profile with one extra overlay
|
|
34
39
|
dsh --profile tui --resume <session> arguments after the launcher flags reach the app
|
|
@@ -47,9 +52,11 @@ Examples:
|
|
|
47
52
|
function resolveBoot(program, profile, options, args) {
|
|
48
53
|
const patches = options.patch ?? [];
|
|
49
54
|
if (patches.includes("")) program.error("error: --patch needs a path");
|
|
55
|
+
if (options.fromDefaultProfile === "") program.error("error: --from-default-profile needs a name");
|
|
50
56
|
if (options.dumpConfig !== true && options.dumpDefaultConfig !== true) return {
|
|
51
57
|
mode: "profile",
|
|
52
58
|
profile,
|
|
59
|
+
fromDefaultProfile: options.fromDefaultProfile,
|
|
53
60
|
patches,
|
|
54
61
|
args
|
|
55
62
|
};
|
|
@@ -60,6 +67,7 @@ function resolveBoot(program, profile, options, args) {
|
|
|
60
67
|
return {
|
|
61
68
|
mode: "dump-config",
|
|
62
69
|
profile,
|
|
70
|
+
fromDefaultProfile: options.fromDefaultProfile,
|
|
63
71
|
defaultOnly,
|
|
64
72
|
patches
|
|
65
73
|
};
|
|
@@ -74,28 +82,31 @@ function resolveBoot(program, profile, options, args) {
|
|
|
74
82
|
function parseDshArgs(argv, version) {
|
|
75
83
|
let resolved;
|
|
76
84
|
const program = new Command();
|
|
77
|
-
program.name("dsh").version(version, "-V, --version", "output the version number").description("dsh: boot a DeepSeek Harness profile — an ordered stack of plugin-bundle patch layers under your own overrides.").addHelpText("after", HELP_EXAMPLES).exitOverride().helpOption(false).allowUnknownOption().passThroughOptions().enablePositionalOptions().argument("[args...]", "arguments for the booted profile's app (see: dsh --profile <name> --help)").option("--profile <name>", "the profile under $DSH_HOME/profiles to boot").option("--patch <path>", "extra patch-list overlay applied after the profile layer (repeatable)", collect).option("--dump-config", "print the composed profile tree and exit").option("--dump-default-config", "print the profile tree without its user layer or --patch overlays and exit").action((args, options) => {
|
|
85
|
+
program.name("dsh").version(version, "-V, --version", "output the version number").description("dsh: boot a DeepSeek Harness profile — an ordered stack of plugin-bundle patch layers under your own overrides.").addHelpText("after", HELP_EXAMPLES).exitOverride().helpOption(false).allowUnknownOption().passThroughOptions().enablePositionalOptions().argument("[args...]", "arguments for the booted profile's app (see: dsh --profile <name> --help)").option("--profile <name>", "the profile under $DSH_HOME/profiles to boot").option("--from-default-profile <name>", "initialize a new custom profile from a shipped profile template").option("--patch <path>", "extra patch-list overlay applied after the profile layer (repeatable)", collect).option("--dump-config", "print the composed profile tree and exit").option("--dump-default-config", "print the profile tree without its user layer or --patch overlays and exit").action((args, options) => {
|
|
78
86
|
if (options.profile === void 0) {
|
|
79
87
|
if (args.some((argument) => argument === "-h" || argument === "--help")) program.help();
|
|
80
88
|
program.error("error: --profile <name> is required");
|
|
81
89
|
}
|
|
82
90
|
const profile = options.profile;
|
|
83
91
|
if (profile === "") program.error("error: --profile needs a name");
|
|
92
|
+
rejectElectronProfile(program, profile);
|
|
84
93
|
resolved = resolveBoot(program, profile, options, args);
|
|
85
94
|
});
|
|
86
95
|
/** Reject parent options supplied before a subcommand. */
|
|
87
96
|
const rejectParentOptions = (command) => {
|
|
88
97
|
const parent = program.opts();
|
|
89
|
-
if (parent.profile !== void 0 || parent.patch !== void 0 || parent.dumpConfig !== void 0 || parent.dumpDefaultConfig !== void 0) program.error(`error: ${command} takes none of parent --profile, --patch, --dump-config, or --dump-default-config`);
|
|
98
|
+
if (parent.profile !== void 0 || parent.patch !== void 0 || parent.dumpConfig !== void 0 || parent.dumpDefaultConfig !== void 0 || parent.fromDefaultProfile !== void 0) program.error(`error: ${command} takes none of parent --profile, --from-default-profile, --patch, --dump-config, or --dump-default-config`);
|
|
90
99
|
};
|
|
91
100
|
const web = program.command("web").description("boot the web profile (alias of --profile web); the web app's own flags follow");
|
|
92
101
|
web.helpOption(false).allowUnknownOption().passThroughOptions().enablePositionalOptions().argument("[args...]", "arguments for the web app (see: dsh web --help)").option("--patch <path>", "extra patch-list overlay applied after the profile layer (repeatable)", collect).option("--dump-config", "print the composed web-profile tree (with the user layer and any --patch) and exit").option("--dump-default-config", "print the web profile's bundle layers (no user layer) and exit").action((args, options) => {
|
|
93
102
|
rejectParentOptions("web");
|
|
94
103
|
resolved = resolveBoot(web, "web", options, args);
|
|
95
104
|
});
|
|
96
|
-
program.command("plugin").description("manage a profile's plugins by forwarding the remaining arguments to pnpm in the profile directory")
|
|
105
|
+
const plugin = program.command("plugin").description("manage a profile's plugins by forwarding the remaining arguments to pnpm in the profile directory");
|
|
106
|
+
plugin.requiredOption("--profile <name>", "the profile whose plugins to manage (initialized on first use)").allowUnknownOption().argument("[args...]", "pnpm arguments, forwarded verbatim (add <pkg>, remove <pkg>, why <pkg>, ...)").action((args, options) => {
|
|
97
107
|
rejectParentOptions("plugin");
|
|
98
108
|
if (options.profile === "") program.error("error: --profile needs a name");
|
|
109
|
+
rejectElectronProfile(plugin, options.profile);
|
|
99
110
|
if (args.length === 0) program.error("error: plugin needs pnpm arguments to forward (e.g. add <package>)");
|
|
100
111
|
resolved = {
|
|
101
112
|
mode: "plugin",
|
|
@@ -123,29 +134,37 @@ function readVersion() {
|
|
|
123
134
|
const manifest = JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8"));
|
|
124
135
|
return typeof manifest.version === "string" ? manifest.version : "0.0.0";
|
|
125
136
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Run the public dsh command-line interface.
|
|
139
|
+
* @returns a promise that settles when the selected command mode finishes.
|
|
140
|
+
*/
|
|
141
|
+
async function runCli() {
|
|
142
|
+
const invocation = parseDshArgs(process.argv.slice(2), readVersion());
|
|
143
|
+
switch (invocation.mode) {
|
|
144
|
+
case "profile": {
|
|
145
|
+
const { runProfile } = await import("./profile-boot-BP_C0vpU.js");
|
|
146
|
+
await runProfile({
|
|
147
|
+
environment: loadLayeredEnv("dsh"),
|
|
148
|
+
profile: invocation.profile,
|
|
149
|
+
fromDefaultProfile: invocation.fromDefaultProfile,
|
|
150
|
+
patchFiles: invocation.patches,
|
|
151
|
+
args: invocation.args
|
|
152
|
+
});
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case "plugin": {
|
|
156
|
+
const { runPlugin } = await import("./plugin-Ddi42qoW.js");
|
|
157
|
+
process.exit(runPlugin(invocation.profile, invocation.args));
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
case "dump-config": {
|
|
161
|
+
const { runDumpConfig } = await import("./dump-config-lFgMwK8i.js");
|
|
162
|
+
runDumpConfig(invocation.profile, invocation.defaultOnly, invocation.patches, invocation.fromDefaultProfile);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
default: throw new Error(`dsh: unhandled invocation mode ${JSON.stringify(invocation)}`);
|
|
147
166
|
}
|
|
148
|
-
default: throw new Error(`dsh: unhandled invocation mode ${JSON.stringify(invocation)}`);
|
|
149
167
|
}
|
|
168
|
+
if (import.meta.main) await runCli();
|
|
150
169
|
//#endregion
|
|
151
|
-
export {};
|
|
170
|
+
export { runCli };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-Dk-7KqJc.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";
|
|
@@ -19,9 +19,10 @@ const NAME = "dsh";
|
|
|
19
19
|
* (the recovery diagnostic for a broken `cordis.patch.yml`, which is then
|
|
20
20
|
* never parsed).
|
|
21
21
|
* @param patches - `--patch` overlay paths, in argv order.
|
|
22
|
+
* @param fromDefaultProfile - shipped template used once to initialize a missing profile.
|
|
22
23
|
*/
|
|
23
|
-
function runDumpConfig(profile, defaultOnly, patches) {
|
|
24
|
-
const loaded = prepareProfile(profile, !defaultOnly);
|
|
24
|
+
function runDumpConfig(profile, defaultOnly, patches, fromDefaultProfile) {
|
|
25
|
+
const loaded = prepareProfile(profile, !defaultOnly, fromDefaultProfile);
|
|
25
26
|
const layers = loaded.layers.map((layer) => ({
|
|
26
27
|
label: layer.packageName,
|
|
27
28
|
patches: layer.patches
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as INSTALL_ANCHOR } from "./profile-boot-
|
|
1
|
+
import { t as INSTALL_ANCHOR } from "./profile-boot-Dk-7KqJc.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";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { writeFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { PROFILE_PATCH_FILENAME, boot, composeEntries, healProfilesModuleFallback, installFailLoud, loadOptionalPatches, loadOverlayPatches, loadProfile, watchUserPatches } from "@deepseek-ai/dsh-app-boot";
|
|
4
|
-
import { join, resolve } from "node:path";
|
|
3
|
+
import { PROFILE_PATCH_FILENAME, PROFILE_TEMPLATES, boot, composeEntries, healProfilesModuleFallback, initProfile, installFailLoud, loadOptionalPatches, loadOverlayPatches, loadProfile, resolveProfileDir, watchUserPatches } from "@deepseek-ai/dsh-app-boot";
|
|
4
|
+
import { dirname, join, resolve } from "node:path";
|
|
5
5
|
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
6
|
+
import { installProxyFromEnvironment } from "@deepseek-ai/dsh-http-proxy";
|
|
6
7
|
import { DSH_LAUNCH_ENVIRONMENT_KEY } from "@deepseek-ai/dsh-launch-environment";
|
|
7
8
|
import { provideCmdline } from "@deepseek-ai/dsh-cmdline";
|
|
8
9
|
//#region lib/types/process-shutdown.js
|
|
@@ -128,6 +129,48 @@ const PROFILE_ROOT_CONFIG = `# dsh profile root — an empty entry list. The tre
|
|
|
128
129
|
/** Root config filename inside a profile directory. */
|
|
129
130
|
const PROFILE_ROOT_FILENAME = "cordis.yml";
|
|
130
131
|
/**
|
|
132
|
+
* Initialize a missing profile from one shipped template. This copies only
|
|
133
|
+
* the template's bundle list and patch-reload policy; local state from the
|
|
134
|
+
* same-named shipped profile is not read, and no inheritance metadata is
|
|
135
|
+
* persisted. Shipped profile names are reserved, and the target directory is
|
|
136
|
+
* claimed exclusively so existing or concurrent state is never reused.
|
|
137
|
+
* @param name - the new profile name.
|
|
138
|
+
* @param fromDefaultProfile - shipped profile template to copy.
|
|
139
|
+
* @param home - Harness home containing the profile directory.
|
|
140
|
+
* @throws when the template is unknown, the target name is shipped, or the target directory exists.
|
|
141
|
+
*/
|
|
142
|
+
function initializeProfileFromDefault(name, fromDefaultProfile, home = resolveDshHome()) {
|
|
143
|
+
const dir = resolveProfileDir(name, home);
|
|
144
|
+
const template = Object.hasOwn(PROFILE_TEMPLATES, fromDefaultProfile) ? PROFILE_TEMPLATES[fromDefaultProfile] : void 0;
|
|
145
|
+
if (template === void 0) {
|
|
146
|
+
const expected = Object.keys(PROFILE_TEMPLATES).sort().map((value) => JSON.stringify(value)).join(", ");
|
|
147
|
+
throw new Error(`${NAME}: unknown default profile ${JSON.stringify(fromDefaultProfile)}; expected one of ${expected}`);
|
|
148
|
+
}
|
|
149
|
+
if (Object.hasOwn(PROFILE_TEMPLATES, name)) throw new Error(`${NAME}: profile ${JSON.stringify(name)} is shipped and cannot be a custom profile target; omit --from-default-profile to use it`);
|
|
150
|
+
mkdirSync(dirname(dir), { recursive: true });
|
|
151
|
+
try {
|
|
152
|
+
mkdirSync(dir);
|
|
153
|
+
} catch (error) {
|
|
154
|
+
if (error.code !== "EEXIST") throw error;
|
|
155
|
+
const manifestPath = join(dir, "package.json");
|
|
156
|
+
if (existsSync(manifestPath)) throw new Error(`${NAME}: profile ${JSON.stringify(name)} already exists at ${manifestPath}; omit --from-default-profile to use it`);
|
|
157
|
+
throw new Error(`${NAME}: profile directory ${dir} already exists; choose an unused profile name`);
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
initProfile(dir, template.bundles, template.patchReload);
|
|
161
|
+
} catch (error) {
|
|
162
|
+
try {
|
|
163
|
+
rmSync(dir, {
|
|
164
|
+
recursive: true,
|
|
165
|
+
force: true
|
|
166
|
+
});
|
|
167
|
+
} catch (cleanupError) {
|
|
168
|
+
throw new AggregateError([error, cleanupError], `${NAME}: profile initialization failed and ${dir} could not be removed`);
|
|
169
|
+
}
|
|
170
|
+
throw error;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
131
174
|
* Resolve the telemetry opt-out switch into its boot patch. ANY non-empty
|
|
132
175
|
* value (including `'0'`/`'false'`) disables: a privacy switch prefers
|
|
133
176
|
* off-by-mistake over on-by-mistake. A composition without the telemetry row
|
|
@@ -156,9 +199,12 @@ function resolveTelemetryPatch(disabledEnv, hasRow) {
|
|
|
156
199
|
* the identical base).
|
|
157
200
|
* @param name - the profile name.
|
|
158
201
|
* @param userLayer - `false` skips parsing `cordis.patch.yml` (the default dump).
|
|
202
|
+
* @param fromDefaultProfile - shipped template used once to initialize a missing profile.
|
|
159
203
|
* @returns the loaded profile.
|
|
204
|
+
* @throws when explicit initialization names an unknown template or an existing profile.
|
|
160
205
|
*/
|
|
161
|
-
function prepareProfile(name, userLayer = true) {
|
|
206
|
+
function prepareProfile(name, userLayer = true, fromDefaultProfile) {
|
|
207
|
+
if (fromDefaultProfile !== void 0) initializeProfileFromDefault(name, fromDefaultProfile);
|
|
162
208
|
const profile = loadProfile(NAME, name, INSTALL_ANCHOR, void 0, { userLayer });
|
|
163
209
|
writeFileSync(join(profile.dir, PROFILE_ROOT_FILENAME), PROFILE_ROOT_CONFIG);
|
|
164
210
|
return profile;
|
|
@@ -183,8 +229,8 @@ function allPatches(composed) {
|
|
|
183
229
|
* @param patchFiles - `--patch` overlay paths, in argv order.
|
|
184
230
|
* @returns the profile and its patch layers.
|
|
185
231
|
*/
|
|
186
|
-
async function composeProfile(name, patchFiles) {
|
|
187
|
-
const profile = prepareProfile(name);
|
|
232
|
+
async function composeProfile(name, patchFiles, fromDefaultProfile) {
|
|
233
|
+
const profile = prepareProfile(name, true, fromDefaultProfile);
|
|
188
234
|
await healProfilesModuleFallback({
|
|
189
235
|
installAnchor: INSTALL_ANCHOR,
|
|
190
236
|
profile
|
|
@@ -231,11 +277,15 @@ function suppressShutdownError(ctx, signal, error) {
|
|
|
231
277
|
* @returns the settled root context and the shutdown controller.
|
|
232
278
|
*/
|
|
233
279
|
async function runProfile(options) {
|
|
234
|
-
const
|
|
280
|
+
const disposeProxy = await installProxyFromEnvironment(options.environment, (message) => {
|
|
281
|
+
process.stderr.write(`${NAME}: ${message}\n`);
|
|
282
|
+
});
|
|
283
|
+
const composed = await composeProfile(options.profile, options.patchFiles, options.fromDefaultProfile);
|
|
235
284
|
const app = {};
|
|
236
285
|
const appReady = createAppReady();
|
|
237
286
|
const shutdown = createProcessShutdown(async () => {
|
|
238
287
|
await app.current?.fiber.dispose();
|
|
288
|
+
await disposeProxy();
|
|
239
289
|
});
|
|
240
290
|
const signalShutdown = new AbortController();
|
|
241
291
|
const interrupt = (code) => {
|
|
@@ -296,4 +346,4 @@ async function runProfile(options) {
|
|
|
296
346
|
};
|
|
297
347
|
}
|
|
298
348
|
//#endregion
|
|
299
|
-
export {
|
|
349
|
+
export { prepareProfile as a, initializeProfileFromDefault as i, PROFILE_ROOT_FILENAME as n, resolveTelemetryPatch as o, homePatchPath as r, runProfile as s, INSTALL_ANCHOR as t };
|
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.5-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,72 +32,73 @@
|
|
|
32
32
|
"js-yaml": "^4.2.0",
|
|
33
33
|
"node-addon-require-builtin": "^0.1.4",
|
|
34
34
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
35
|
-
"@deepseek-ai/cordis-plugin-hmr": "^1.0.17",
|
|
36
35
|
"@deepseek-ai/cordis-plugin-include": "^1.0.7",
|
|
37
|
-
"@deepseek-ai/cordis-plugin-timer": "^1.1.4",
|
|
38
|
-
"@deepseek-ai/dsh-acp-app": "^0.1.2-rc.1",
|
|
39
36
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
40
|
-
"@deepseek-ai/
|
|
41
|
-
"@deepseek-ai/
|
|
42
|
-
"@deepseek-ai/dsh-app
|
|
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-pwsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
75
|
-
"@deepseek-ai/dsh-
|
|
76
|
-
"@deepseek-ai/dsh-
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
78
|
-
"@deepseek-ai/dsh-
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"@deepseek-ai/dsh-tool-
|
|
81
|
-
"@deepseek-ai/dsh-tool-
|
|
82
|
-
"@deepseek-ai/dsh-tool-
|
|
83
|
-
"@deepseek-ai/dsh-tool-
|
|
84
|
-
"@deepseek-ai/dsh-tool-
|
|
85
|
-
"@deepseek-ai/dsh-tool-
|
|
86
|
-
"@deepseek-ai/dsh-tool-
|
|
87
|
-
"@deepseek-ai/dsh-tool-
|
|
88
|
-
"@deepseek-ai/dsh-
|
|
89
|
-
"@deepseek-ai/dsh-tool-
|
|
90
|
-
"@deepseek-ai/dsh-tool-
|
|
91
|
-
"@deepseek-ai/dsh-tool-
|
|
92
|
-
"@deepseek-ai/dsh-tool-
|
|
93
|
-
"@deepseek-ai/dsh-tool-
|
|
94
|
-
"@deepseek-ai/dsh-tool-
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-
|
|
37
|
+
"@deepseek-ai/cordis-plugin-hmr": "^1.0.17",
|
|
38
|
+
"@deepseek-ai/cordis-plugin-timer": "^1.1.4",
|
|
39
|
+
"@deepseek-ai/dsh-acp-app": "^0.1.5-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-agent-instructions": "^0.1.5-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-agent-tool-presentation": "^0.1.5-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-app-boot": "^0.1.5-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-base": "^0.1.5-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": "^0.1.5-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-client-ui-cordis": "^0.1.5-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-command-compact": "^0.1.5-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-command-goal": "^0.1.5-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-compaction-basic": "^0.1.5-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-compaction-tool-result-pruner": "^0.1.5-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-cordis-client-runner": "^0.1.5-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-fs-local": "^0.1.5-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-goal": "^0.1.5-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-goal-round-driver": "^0.1.5-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-headless": "^0.1.5-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.5-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-hooks-claude-code": "^0.1.5-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-hooks-codex": "^0.1.5-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-jobs-local": "^0.1.5-alpha.1",
|
|
59
|
+
"@deepseek-ai/dsh-launch-environment": "^0.1.5-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-mcp-client": "^0.1.5-alpha.1",
|
|
61
|
+
"@deepseek-ai/dsh-persona": "^0.1.5-alpha.1",
|
|
62
|
+
"@deepseek-ai/dsh-pwsh-local": "^0.1.5-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-pwsh-sandbox": "^0.1.5-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-schedule": "^0.1.5-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-sdk-app": "^0.1.5-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-sdk-minimal": "^0.1.5-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.5-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-session-reference": "^0.1.5-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-skill": "^0.1.5-alpha.1",
|
|
70
|
+
"@deepseek-ai/dsh-skill-filesystem": "^0.1.5-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-terminal": "^0.1.5-alpha.1",
|
|
72
|
+
"@deepseek-ai/dsh-cmdline": "^0.1.5-alpha.1",
|
|
73
|
+
"@deepseek-ai/dsh-terminal-bash": "^0.1.5-alpha.1",
|
|
74
|
+
"@deepseek-ai/dsh-time-context": "^0.1.5-alpha.1",
|
|
75
|
+
"@deepseek-ai/dsh-tmux-context": "^0.1.5-alpha.1",
|
|
76
|
+
"@deepseek-ai/dsh-token-meter": "^0.1.5-alpha.1",
|
|
77
|
+
"@deepseek-ai/dsh-tool-ask-user": "^0.1.5-alpha.1",
|
|
78
|
+
"@deepseek-ai/dsh-tool-bash": "^0.1.5-alpha.1",
|
|
79
|
+
"@deepseek-ai/dsh-tool-bash-persistent": "^0.1.5-alpha.1",
|
|
80
|
+
"@deepseek-ai/dsh-tool-cordis": "^0.1.5-alpha.1",
|
|
81
|
+
"@deepseek-ai/dsh-tool-fs": "^0.1.5-alpha.1",
|
|
82
|
+
"@deepseek-ai/dsh-tool-fs-search": "^0.1.5-alpha.1",
|
|
83
|
+
"@deepseek-ai/dsh-tool-goal": "^0.1.5-alpha.1",
|
|
84
|
+
"@deepseek-ai/dsh-tool-jobs": "^0.1.5-alpha.1",
|
|
85
|
+
"@deepseek-ai/dsh-plan-mode": "^0.1.5-alpha.1",
|
|
86
|
+
"@deepseek-ai/dsh-tool-pwsh-persistent": "^0.1.5-alpha.1",
|
|
87
|
+
"@deepseek-ai/dsh-tool-ralph": "^0.1.5-alpha.1",
|
|
88
|
+
"@deepseek-ai/dsh-tool-skill": "^0.1.5-alpha.1",
|
|
89
|
+
"@deepseek-ai/dsh-tool-str-replace-editor": "^0.1.5-alpha.1",
|
|
90
|
+
"@deepseek-ai/dsh-tool-subagent": "^0.1.5-alpha.1",
|
|
91
|
+
"@deepseek-ai/dsh-tool-subagent-control": "^0.1.5-alpha.1",
|
|
92
|
+
"@deepseek-ai/dsh-tool-todo": "^0.1.5-alpha.1",
|
|
93
|
+
"@deepseek-ai/dsh-tool-web": "^0.1.5-alpha.1",
|
|
94
|
+
"@deepseek-ai/dsh-tool-workflow": "^0.1.5-alpha.1",
|
|
95
|
+
"@deepseek-ai/dsh-web-app": "^0.1.5-alpha.1",
|
|
96
|
+
"@deepseek-ai/dsh-webhook": "^0.1.5-alpha.1",
|
|
97
|
+
"@deepseek-ai/dsh-webhook-github": "^0.1.5-alpha.1",
|
|
98
|
+
"@deepseek-ai/dsh-workflow-worker-thread": "^0.1.5-alpha.1",
|
|
99
99
|
"@deepseek-ai/schemastery": "^3.18.2",
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
100
|
+
"@deepseek-ai/dsh-http-proxy": "^0.1.5-alpha.1",
|
|
101
|
+
"@deepseek-ai/dsh-tool-pwsh": "^0.1.5-alpha.1"
|
|
101
102
|
},
|
|
102
103
|
"devDependencies": {
|
|
103
104
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
@@ -105,43 +106,45 @@
|
|
|
105
106
|
"@types/ws": "8.18.1",
|
|
106
107
|
"execa": "^10.0.0",
|
|
107
108
|
"ws": "8.21.0",
|
|
108
|
-
"@deepseek-ai/dsh-acp": "^0.1.
|
|
109
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
110
|
-
"@deepseek-ai/dsh-
|
|
111
|
-
"@deepseek-ai/dsh-
|
|
112
|
-
"@deepseek-ai/dsh-
|
|
113
|
-
"@deepseek-ai/dsh-
|
|
114
|
-
"@deepseek-ai/dsh-
|
|
115
|
-
"@deepseek-ai/dsh-
|
|
116
|
-
"@deepseek-ai/dsh-
|
|
117
|
-
"@deepseek-ai/dsh-
|
|
118
|
-
"@deepseek-ai/dsh-
|
|
119
|
-
"@deepseek-ai/dsh-fs-
|
|
120
|
-
"@deepseek-ai/dsh-
|
|
121
|
-
"@deepseek-ai/dsh-
|
|
122
|
-
"@deepseek-ai/dsh-
|
|
123
|
-
"@deepseek-ai/dsh-llm
|
|
124
|
-
"@deepseek-ai/dsh-llm-
|
|
125
|
-
"@deepseek-ai/dsh-llm-
|
|
126
|
-
"@deepseek-ai/dsh-
|
|
127
|
-
"@deepseek-ai/dsh-
|
|
128
|
-
"@deepseek-ai/dsh-
|
|
129
|
-
"@deepseek-ai/dsh-sandbox-
|
|
130
|
-
"@deepseek-ai/dsh-
|
|
131
|
-
"@deepseek-ai/dsh-session
|
|
132
|
-
"@deepseek-ai/dsh-
|
|
133
|
-
"@deepseek-ai/dsh-
|
|
134
|
-
"@deepseek-ai/dsh-
|
|
135
|
-
"@deepseek-ai/dsh-
|
|
136
|
-
"@deepseek-ai/dsh-
|
|
137
|
-
"@deepseek-ai/dsh-
|
|
138
|
-
"@deepseek-ai/dsh-
|
|
139
|
-
"@deepseek-ai/dsh-
|
|
140
|
-
"@deepseek-ai/dsh-
|
|
141
|
-
"@deepseek-ai/dsh-
|
|
142
|
-
"@deepseek-ai/dsh-
|
|
143
|
-
"@deepseek-ai/dsh-
|
|
144
|
-
"@deepseek-ai/dsh-
|
|
145
|
-
"@deepseek-ai/dsh-
|
|
109
|
+
"@deepseek-ai/dsh-acp": "^0.1.5-alpha.1",
|
|
110
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-alpha.1",
|
|
111
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.5-alpha.1",
|
|
112
|
+
"@deepseek-ai/dsh-attachment-local": "^0.1.5-alpha.1",
|
|
113
|
+
"@deepseek-ai/dsh-bash-local": "^0.1.5-alpha.1",
|
|
114
|
+
"@deepseek-ai/dsh-credentials-local": "^0.1.5-alpha.1",
|
|
115
|
+
"@deepseek-ai/dsh-deepseek-llm-api-extensions": "^0.1.5-alpha.1",
|
|
116
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.5-alpha.1",
|
|
117
|
+
"@deepseek-ai/dsh-experimental-agent-team-profile": "^0.1.5-alpha.1",
|
|
118
|
+
"@deepseek-ai/dsh-experimental-code-runtime-python": "^0.1.5-alpha.1",
|
|
119
|
+
"@deepseek-ai/dsh-experimental-tool-agent-team": "^0.1.5-alpha.1",
|
|
120
|
+
"@deepseek-ai/dsh-fs-sandbox": "^0.1.5-alpha.1",
|
|
121
|
+
"@deepseek-ai/dsh-host-frontend-static": "^0.1.5-alpha.1",
|
|
122
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.5-alpha.1",
|
|
123
|
+
"@deepseek-ai/dsh-fs-observation-policy": "^0.1.5-alpha.1",
|
|
124
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
|
|
125
|
+
"@deepseek-ai/dsh-llm-mock-server": "^0.1.5-alpha.1",
|
|
126
|
+
"@deepseek-ai/dsh-llm-pi-ai": "^0.1.5-alpha.1",
|
|
127
|
+
"@deepseek-ai/dsh-llm-replay": "^0.1.5-alpha.1",
|
|
128
|
+
"@deepseek-ai/dsh-loader-smoke": "^0.1.5-alpha.1",
|
|
129
|
+
"@deepseek-ai/dsh-plugin-package-inventory-deepseek": "^0.1.5-alpha.1",
|
|
130
|
+
"@deepseek-ai/dsh-sandbox-local": "^0.1.5-alpha.1",
|
|
131
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.1.5-alpha.1",
|
|
132
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
|
|
133
|
+
"@deepseek-ai/dsh-llm-deepseek": "^0.1.5-alpha.1",
|
|
134
|
+
"@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.5-alpha.1",
|
|
135
|
+
"@deepseek-ai/dsh-session-log-deepseek": "^0.1.5-alpha.1",
|
|
136
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.5-alpha.1",
|
|
137
|
+
"@deepseek-ai/dsh-session-query": "^0.1.5-alpha.1",
|
|
138
|
+
"@deepseek-ai/dsh-shell-env": "^0.1.5-alpha.1",
|
|
139
|
+
"@deepseek-ai/dsh-settings": "^0.1.5-alpha.1",
|
|
140
|
+
"@deepseek-ai/dsh-subagent": "^0.1.5-alpha.1",
|
|
141
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "^0.1.5-alpha.1",
|
|
142
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.5-alpha.1",
|
|
143
|
+
"@deepseek-ai/dsh-settings-file": "^0.1.5-alpha.1",
|
|
144
|
+
"@deepseek-ai/dsh-subprocess-local": "^0.1.5-alpha.1",
|
|
145
|
+
"@deepseek-ai/dsh-experimental-agent-team": "^0.1.5-alpha.1",
|
|
146
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.1",
|
|
147
|
+
"@deepseek-ai/dsh-user-approval": "^0.1.5-alpha.1",
|
|
148
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-alpha.1"
|
|
146
149
|
}
|
|
147
150
|
}
|