@fishwithcat/dsh 0.2.2-alpha.2 → 0.2.2-alpha.3.fork.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/lib/bin-CKGHv5ga.js +270 -0
- package/lib/bin.js +19 -261
- package/lib/{dump-config-D97dwXdd.js → dump-config-DCQrFN8g.js} +3 -3
- package/lib/dump-config-ekMiCsuS.js +2 -0
- package/lib/{dump-config-schema-r4V15-lg.js → dump-config-schema-C_NhxM7L.js} +2 -2
- package/lib/{plugin-DscIHF4k.js → plugin-cQMw2oZz.js} +4 -4
- package/lib/profile-boot.js +1 -1
- package/lib/types/installed-bin.d.ts +9 -0
- package/package.json +137 -137
- package/lib/dump-config-DuXZcU0e.js +0 -2
- package/lib/{profile-boot-e2mS45fC.js → profile-boot-xiaehH2x.js} +3 -3
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { StartupError, getDshRuntimeVersion, loadLayeredEnv } from "@deepseek-ai/dsh-app-boot";
|
|
3
|
+
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
4
|
+
import { Command, CommanderError, InvalidArgumentError } from "commander";
|
|
5
|
+
import { randomUUID } from "node:crypto";
|
|
6
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
7
|
+
import { inspect } from "node:util";
|
|
8
|
+
//#region lib/types/args.js
|
|
9
|
+
/**
|
|
10
|
+
* Commander adapter for the `dsh` command line.
|
|
11
|
+
*
|
|
12
|
+
* The launcher parses only what it owns — which profile to boot, which extra
|
|
13
|
+
* patch overlays to apply, and the config dumps — and hands **everything after
|
|
14
|
+
* its own flags** to the booted tree verbatim, where injected app plugins parse
|
|
15
|
+
* their own flag families and print their own `--help` (see
|
|
16
|
+
* `@deepseek-ai/dsh-cmdline`). Launcher flags therefore come first: the first
|
|
17
|
+
* token this parser does not recognize starts the inner arguments, so
|
|
18
|
+
* `dsh --profile tui --resume abc` boots the tui profile with `--resume abc`,
|
|
19
|
+
* and `dsh --profile web -h` prints the web app's help, not this one's.
|
|
20
|
+
*
|
|
21
|
+
* `dsh <name>` abbreviates `dsh --profile <name>`; `plugin` manages a profile's
|
|
22
|
+
* plugin dependencies by forwarding to pnpm; `watch` opens the TUI's read-only viewer.
|
|
23
|
+
* @module @deepseek-ai/dsh/args
|
|
24
|
+
*/
|
|
25
|
+
/** Environment variable that overrides which profile a bare `dsh` boots. */
|
|
26
|
+
const DEFAULT_PROFILE_ENV = "DSH_DEFAULT_PROFILE";
|
|
27
|
+
/**
|
|
28
|
+
* Profile a bare `dsh` boots when the invocation names none. This fork defaults
|
|
29
|
+
* to its terminal UI; name another shipped profile through
|
|
30
|
+
* {@link DEFAULT_PROFILE_ENV} to change the default, or set that variable empty
|
|
31
|
+
* to require `--profile` as upstream does.
|
|
32
|
+
*/
|
|
33
|
+
const DEFAULT_PROFILE = "tui";
|
|
34
|
+
/**
|
|
35
|
+
* Repeatable single-value collector: `--patch a.yml --patch b.yml`. Never
|
|
36
|
+
* variadic — a variadic `--patch` would swallow the inner arguments.
|
|
37
|
+
*/
|
|
38
|
+
const collect = (value, previous = []) => [...previous, value];
|
|
39
|
+
function selectProfile(value, previous) {
|
|
40
|
+
if (previous !== void 0) throw new InvalidArgumentError("select a profile only once");
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
function rejectElectronProfile(program, profile) {
|
|
44
|
+
if (profile.toLowerCase() === "desktop") program.error("error: profile \"desktop\" is managed exclusively by the Electron application");
|
|
45
|
+
}
|
|
46
|
+
/** The launcher's own help text; each app prints its own. */
|
|
47
|
+
const HELP_EXAMPLES = `
|
|
48
|
+
Examples:
|
|
49
|
+
dsh boot the default terminal UI profile (same as: dsh --profile tui)
|
|
50
|
+
dsh web boot the web profile (same as: dsh --profile web)
|
|
51
|
+
dsh rescue --from-default-profile web
|
|
52
|
+
recreate rescue from the shipped web template, then boot it
|
|
53
|
+
dsh headless "run the tests" answer one task, print the result, and exit
|
|
54
|
+
dsh tui --patch ./extra.yml boot a custom profile with one extra overlay
|
|
55
|
+
dsh tui --resume <session> arguments after the launcher flags reach the app
|
|
56
|
+
dsh watch <session> watch a local subagent read-only from another terminal
|
|
57
|
+
dsh web --help the web app's own flags and help
|
|
58
|
+
dsh plugin --profile tui add <package> install a plugin into the tui profile
|
|
59
|
+
`;
|
|
60
|
+
/**
|
|
61
|
+
* Resolve a boot or dump invocation from the launcher flags and the leftover
|
|
62
|
+
* inner arguments.
|
|
63
|
+
* @param program - the command whose options were parsed.
|
|
64
|
+
* @param profile - the profile these flags boot.
|
|
65
|
+
* @param options - the launcher flags commander collected.
|
|
66
|
+
* @param args - the leftover arguments, in argv order.
|
|
67
|
+
* @returns the resolved invocation.
|
|
68
|
+
*/
|
|
69
|
+
function resolveBoot(program, profile, options, args) {
|
|
70
|
+
const patches = options.patch ?? [];
|
|
71
|
+
if (patches.includes("")) program.error("error: --patch needs a path");
|
|
72
|
+
if (options.fromDefaultProfile === "") program.error("error: --from-default-profile needs a name");
|
|
73
|
+
const dumps = [
|
|
74
|
+
options.dumpConfig,
|
|
75
|
+
options.dumpDefaultConfig,
|
|
76
|
+
options.dumpConfigSchema
|
|
77
|
+
].filter(Boolean);
|
|
78
|
+
if (dumps.length === 0) return {
|
|
79
|
+
mode: "profile",
|
|
80
|
+
profile,
|
|
81
|
+
fromDefaultProfile: options.fromDefaultProfile,
|
|
82
|
+
patches,
|
|
83
|
+
args
|
|
84
|
+
};
|
|
85
|
+
if (dumps.length > 1) program.error("error: --dump-config, --dump-default-config, and --dump-config-schema are mutually exclusive");
|
|
86
|
+
if (args.length > 0) program.error(`error: config dumps take no app arguments, got ${args.map((argument) => JSON.stringify(argument)).join(" ")}`);
|
|
87
|
+
if (options.dumpConfigSchema === true) return {
|
|
88
|
+
mode: "dump-config-schema",
|
|
89
|
+
profile,
|
|
90
|
+
fromDefaultProfile: options.fromDefaultProfile,
|
|
91
|
+
patches
|
|
92
|
+
};
|
|
93
|
+
const defaultOnly = options.dumpDefaultConfig === true;
|
|
94
|
+
if (defaultOnly && patches.length > 0) program.error("error: --dump-default-config prints the bundle layers and takes no --patch");
|
|
95
|
+
return {
|
|
96
|
+
mode: "dump-config",
|
|
97
|
+
profile,
|
|
98
|
+
fromDefaultProfile: options.fromDefaultProfile,
|
|
99
|
+
defaultOnly,
|
|
100
|
+
patches
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Resolve argv into one invocation, or print and exit for help, version, or an
|
|
105
|
+
* error.
|
|
106
|
+
* @param argv - arguments after the Node binary and script.
|
|
107
|
+
* @param version - version string printed by `--version`.
|
|
108
|
+
* @param manageDesktopProfile - permit Desktop's installed carrier to manage its reserved profile's plugins.
|
|
109
|
+
* @returns the resolved invocation.
|
|
110
|
+
*/
|
|
111
|
+
function parseDshArgs(argv, version, manageDesktopProfile = false) {
|
|
112
|
+
const first = argv[0];
|
|
113
|
+
let resolved;
|
|
114
|
+
const program = new Command();
|
|
115
|
+
program.name("dsh").version(version, "-V, --version", "output the version number").usage("[--profile] <name> [options] [app-args...]\n dsh plugin --profile <name> <pnpm-args...>").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).helpCommand(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", selectProfile).option("--from-default-profile <name>", "replace a custom profile with a fresh copy of 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-config-schema", "print JSON Schema for profile entries and patches without mounting").option("--dump-default-config", "print the profile tree without its user layer or --patch overlays and exit").action((args, options) => {
|
|
116
|
+
if (options.profile === void 0 && args.some((argument) => argument === "-h" || argument === "--help")) program.help();
|
|
117
|
+
if (options.profile === "") program.error("error: --profile needs a name");
|
|
118
|
+
const profile = options.profile ?? process.env[DEFAULT_PROFILE_ENV] ?? DEFAULT_PROFILE;
|
|
119
|
+
if (profile === "") program.error("error: --profile <name> is required");
|
|
120
|
+
rejectElectronProfile(program, profile);
|
|
121
|
+
resolved = resolveBoot(program, profile, options, args);
|
|
122
|
+
});
|
|
123
|
+
if (first === "plugin") {
|
|
124
|
+
const plugin = program.command("plugin").description("manage a profile's plugins by forwarding the remaining arguments to pnpm in the profile directory");
|
|
125
|
+
plugin.helpOption("-h, --help", "show this help").passThroughOptions().requiredOption("--profile <name>", "the profile whose plugins to manage (initialized on first use)", selectProfile).allowUnknownOption().argument("[args...]", "pnpm arguments, forwarded verbatim (add <pkg>, remove <pkg>, why <pkg>, ...)").action((args, options) => {
|
|
126
|
+
if (options.profile === "") program.error("error: --profile needs a name");
|
|
127
|
+
if (!manageDesktopProfile) rejectElectronProfile(plugin, options.profile);
|
|
128
|
+
if (args.length === 0) program.error("error: plugin needs pnpm arguments to forward (e.g. add <package>)");
|
|
129
|
+
resolved = {
|
|
130
|
+
mode: "plugin",
|
|
131
|
+
profile: options.profile.toLowerCase() === "desktop" ? "desktop" : options.profile,
|
|
132
|
+
args
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
if (first === "watch") {
|
|
137
|
+
const watch = program.command("watch").description("watch a local subagent session read-only in the terminal");
|
|
138
|
+
watch.helpOption("-h, --help", "show this help").argument("<session-id>", "the local subagent session to watch").option("--patch <path>", "extra patch-list overlay for the tui profile (repeatable)", collect).action((sessionId, options) => {
|
|
139
|
+
if (sessionId === "") watch.error("error: watch needs a session id");
|
|
140
|
+
if (program.opts().profile !== void 0) watch.error("error: watch uses the tui profile; do not pass --profile");
|
|
141
|
+
resolved = resolveBoot(watch, "tui", options, ["--watch", sessionId]);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
try {
|
|
145
|
+
const expanded = first !== void 0 && !first.startsWith("-") && first !== "plugin" && first !== "watch" ? ["--profile", ...argv] : argv;
|
|
146
|
+
program.parse(expanded, { from: "user" });
|
|
147
|
+
} catch (error) {
|
|
148
|
+
return process.exit(error instanceof CommanderError ? error.exitCode : 1);
|
|
149
|
+
}
|
|
150
|
+
/* v8 ignore next -- an action resolves or Commander throws */
|
|
151
|
+
if (resolved === void 0) throw new Error("dsh: no invocation resolved");
|
|
152
|
+
return resolved;
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region lib/types/startup-diagnostics.js
|
|
156
|
+
/** Save original startup diagnostics while keeping the terminal report concise. */
|
|
157
|
+
/** Wait for stderr to finish the write before the failed process exits. */
|
|
158
|
+
function writeStderr(text) {
|
|
159
|
+
return new Promise((resolve, reject) => {
|
|
160
|
+
process.stderr.write(text, (error) => {
|
|
161
|
+
if (error) reject(error);
|
|
162
|
+
else resolve();
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Print the startup summary and save a private, uniquely named report under DSH_HOME/logs.
|
|
168
|
+
* Failed writes print the complete report to stderr instead of claiming a saved path.
|
|
169
|
+
* @param error - startup audit failure retaining plugin metadata and original errors.
|
|
170
|
+
* @param context - resolved Harness home, application version, and selected profile.
|
|
171
|
+
* @param write - terminal output sink; awaited before returning, defaults to stderr.
|
|
172
|
+
* @returns after saving or printing the report and completing terminal writes.
|
|
173
|
+
*/
|
|
174
|
+
async function reportStartupFailure(error, context, write = writeStderr) {
|
|
175
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
176
|
+
const report = "WARNING: Raw diagnostics may contain configuration or credential values from plugin errors. Review before sharing.\n\n" + inspect({
|
|
177
|
+
timestamp: now,
|
|
178
|
+
dshVersion: context.version,
|
|
179
|
+
nodeVersion: process.version,
|
|
180
|
+
platform: process.platform,
|
|
181
|
+
arch: process.arch,
|
|
182
|
+
profile: context.profile,
|
|
183
|
+
error
|
|
184
|
+
}, {
|
|
185
|
+
depth: null,
|
|
186
|
+
maxArrayLength: null,
|
|
187
|
+
maxStringLength: null,
|
|
188
|
+
showHidden: true,
|
|
189
|
+
customInspect: false,
|
|
190
|
+
getters: false,
|
|
191
|
+
colors: false
|
|
192
|
+
}) + "\n";
|
|
193
|
+
await write(`${error.message}\n`);
|
|
194
|
+
const logDir = join(context.home, "logs");
|
|
195
|
+
const logPath = join(logDir, `startup-${now.replaceAll(":", "-")}-${randomUUID()}.log`);
|
|
196
|
+
try {
|
|
197
|
+
await mkdir(logDir, {
|
|
198
|
+
recursive: true,
|
|
199
|
+
mode: 448
|
|
200
|
+
});
|
|
201
|
+
await writeFile(logPath, report, {
|
|
202
|
+
flag: "wx",
|
|
203
|
+
mode: 384
|
|
204
|
+
});
|
|
205
|
+
} catch (writeError) {
|
|
206
|
+
await write(`\ndsh: warning: could not write startup diagnostics: ${String(writeError)}\nFull diagnostics:\n${report}`);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
await write(`\nFull diagnostics: ${logPath}\n`);
|
|
210
|
+
}
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region lib/types/bin.js
|
|
213
|
+
/**
|
|
214
|
+
* Command-line entry for dsh.
|
|
215
|
+
* @module @deepseek-ai/dsh/bin
|
|
216
|
+
*/
|
|
217
|
+
/* v8 ignore file -- built-bin acceptance exercises this self-executing dispatch. */
|
|
218
|
+
/**
|
|
219
|
+
* Run the public dsh command-line interface.
|
|
220
|
+
* @param options - Package runtime and Desktop profile access supplied by the installation.
|
|
221
|
+
* @returns a promise that settles when the selected command mode finishes.
|
|
222
|
+
*/
|
|
223
|
+
async function runCli(options = {}) {
|
|
224
|
+
const version = getDshRuntimeVersion();
|
|
225
|
+
const { manageDesktopProfile, ...profileOptions } = options;
|
|
226
|
+
const invocation = parseDshArgs(process.argv.slice(2), version, manageDesktopProfile);
|
|
227
|
+
switch (invocation.mode) {
|
|
228
|
+
case "profile": {
|
|
229
|
+
const { runProfile } = await import("./profile-boot.js");
|
|
230
|
+
try {
|
|
231
|
+
await runProfile({
|
|
232
|
+
environment: loadLayeredEnv("dsh"),
|
|
233
|
+
profile: invocation.profile,
|
|
234
|
+
fromDefaultProfile: invocation.fromDefaultProfile,
|
|
235
|
+
patchFiles: invocation.patches,
|
|
236
|
+
args: invocation.args,
|
|
237
|
+
...profileOptions
|
|
238
|
+
});
|
|
239
|
+
} catch (error) {
|
|
240
|
+
if (!(error instanceof StartupError)) throw error;
|
|
241
|
+
await reportStartupFailure(error, {
|
|
242
|
+
home: resolveDshHome(),
|
|
243
|
+
version,
|
|
244
|
+
profile: invocation.profile
|
|
245
|
+
});
|
|
246
|
+
process.exit(1);
|
|
247
|
+
}
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
case "plugin": {
|
|
251
|
+
const { runPlugin } = await import("./plugin-cQMw2oZz.js");
|
|
252
|
+
process.exit(await runPlugin(invocation.profile, invocation.args, options.packageManager));
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
case "dump-config": {
|
|
256
|
+
const { runDumpConfig } = await import("./dump-config-ekMiCsuS.js");
|
|
257
|
+
runDumpConfig(invocation.profile, invocation.defaultOnly, invocation.patches, invocation.fromDefaultProfile);
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
case "dump-config-schema": {
|
|
261
|
+
const { runDumpConfigSchema } = await import("./dump-config-schema-C_NhxM7L.js");
|
|
262
|
+
await runDumpConfigSchema(invocation.profile, invocation.patches, invocation.fromDefaultProfile);
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
default: throw new Error(`dsh: unhandled invocation mode ${JSON.stringify(invocation)}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (import.meta.main) await runCli();
|
|
269
|
+
//#endregion
|
|
270
|
+
export { runCli };
|
package/lib/bin.js
CHANGED
|
@@ -1,271 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { randomUUID } from "node:crypto";
|
|
6
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
7
|
-
import { join } from "node:path";
|
|
8
|
-
import { inspect } from "node:util";
|
|
9
|
-
//#region lib/types/args.js
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
//#region lib/types/installed-bin.js
|
|
10
5
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* The launcher parses only what it owns — which profile to boot, which extra
|
|
14
|
-
* patch overlays to apply, and the config dumps — and hands **everything after
|
|
15
|
-
* its own flags** to the booted tree verbatim, where injected app plugins parse
|
|
16
|
-
* their own flag families and print their own `--help` (see
|
|
17
|
-
* `@deepseek-ai/dsh-cmdline`). Launcher flags therefore come first: the first
|
|
18
|
-
* token this parser does not recognize starts the inner arguments, so
|
|
19
|
-
* `dsh --profile tui --resume abc` boots the tui profile with `--resume abc`,
|
|
20
|
-
* and `dsh --profile web -h` prints the web app's help, not this one's.
|
|
21
|
-
*
|
|
22
|
-
* `dsh <name>` abbreviates `dsh --profile <name>`; `plugin` manages a profile's
|
|
23
|
-
* plugin dependencies by forwarding to pnpm; `watch` opens the TUI's read-only viewer.
|
|
24
|
-
* @module @deepseek-ai/dsh/args
|
|
6
|
+
* Installed CLI entry for disk launchers and embedded runtimes.
|
|
7
|
+
* @module @deepseek-ai/dsh/installed-bin
|
|
25
8
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* Profile a bare `dsh` boots when the invocation names none. This fork defaults
|
|
30
|
-
* to its terminal UI; name another shipped profile through
|
|
31
|
-
* {@link DEFAULT_PROFILE_ENV} to change the default, or set that variable empty
|
|
32
|
-
* to require `--profile` as upstream does.
|
|
33
|
-
*/
|
|
34
|
-
const DEFAULT_PROFILE = "tui";
|
|
35
|
-
/**
|
|
36
|
-
* Repeatable single-value collector: `--patch a.yml --patch b.yml`. Never
|
|
37
|
-
* variadic — a variadic `--patch` would swallow the inner arguments.
|
|
38
|
-
*/
|
|
39
|
-
const collect = (value, previous = []) => [...previous, value];
|
|
40
|
-
function selectProfile(value, previous) {
|
|
41
|
-
if (previous !== void 0) throw new InvalidArgumentError("select a profile only once");
|
|
42
|
-
return value;
|
|
43
|
-
}
|
|
44
|
-
function rejectElectronProfile(program, profile) {
|
|
45
|
-
if (profile.toLowerCase() === "desktop") program.error("error: profile \"desktop\" is managed exclusively by the Electron application");
|
|
46
|
-
}
|
|
47
|
-
/** The launcher's own help text; each app prints its own. */
|
|
48
|
-
const HELP_EXAMPLES = `
|
|
49
|
-
Examples:
|
|
50
|
-
dsh boot the default terminal UI profile (same as: dsh --profile tui)
|
|
51
|
-
dsh web boot the web profile (same as: dsh --profile web)
|
|
52
|
-
dsh rescue --from-default-profile web
|
|
53
|
-
recreate rescue from the shipped web template, then boot it
|
|
54
|
-
dsh headless "run the tests" answer one task, print the result, and exit
|
|
55
|
-
dsh tui --patch ./extra.yml boot a custom profile with one extra overlay
|
|
56
|
-
dsh tui --resume <session> arguments after the launcher flags reach the app
|
|
57
|
-
dsh watch <session> watch a local subagent read-only from another terminal
|
|
58
|
-
dsh web --help the web app's own flags and help
|
|
59
|
-
dsh plugin --profile tui add <package> install a plugin into the tui profile
|
|
60
|
-
`;
|
|
61
|
-
/**
|
|
62
|
-
* Resolve a boot or dump invocation from the launcher flags and the leftover
|
|
63
|
-
* inner arguments.
|
|
64
|
-
* @param program - the command whose options were parsed.
|
|
65
|
-
* @param profile - the profile these flags boot.
|
|
66
|
-
* @param options - the launcher flags commander collected.
|
|
67
|
-
* @param args - the leftover arguments, in argv order.
|
|
68
|
-
* @returns the resolved invocation.
|
|
69
|
-
*/
|
|
70
|
-
function resolveBoot(program, profile, options, args) {
|
|
71
|
-
const patches = options.patch ?? [];
|
|
72
|
-
if (patches.includes("")) program.error("error: --patch needs a path");
|
|
73
|
-
if (options.fromDefaultProfile === "") program.error("error: --from-default-profile needs a name");
|
|
74
|
-
const dumps = [
|
|
75
|
-
options.dumpConfig,
|
|
76
|
-
options.dumpDefaultConfig,
|
|
77
|
-
options.dumpConfigSchema
|
|
78
|
-
].filter(Boolean);
|
|
79
|
-
if (dumps.length === 0) return {
|
|
80
|
-
mode: "profile",
|
|
81
|
-
profile,
|
|
82
|
-
fromDefaultProfile: options.fromDefaultProfile,
|
|
83
|
-
patches,
|
|
84
|
-
args
|
|
85
|
-
};
|
|
86
|
-
if (dumps.length > 1) program.error("error: --dump-config, --dump-default-config, and --dump-config-schema are mutually exclusive");
|
|
87
|
-
if (args.length > 0) program.error(`error: config dumps take no app arguments, got ${args.map((argument) => JSON.stringify(argument)).join(" ")}`);
|
|
88
|
-
if (options.dumpConfigSchema === true) return {
|
|
89
|
-
mode: "dump-config-schema",
|
|
90
|
-
profile,
|
|
91
|
-
fromDefaultProfile: options.fromDefaultProfile,
|
|
92
|
-
patches
|
|
93
|
-
};
|
|
94
|
-
const defaultOnly = options.dumpDefaultConfig === true;
|
|
95
|
-
if (defaultOnly && patches.length > 0) program.error("error: --dump-default-config prints the bundle layers and takes no --patch");
|
|
96
|
-
return {
|
|
97
|
-
mode: "dump-config",
|
|
98
|
-
profile,
|
|
99
|
-
fromDefaultProfile: options.fromDefaultProfile,
|
|
100
|
-
defaultOnly,
|
|
101
|
-
patches
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Resolve argv into one invocation, or print and exit for help, version, or an
|
|
106
|
-
* error.
|
|
107
|
-
* @param argv - arguments after the Node binary and script.
|
|
108
|
-
* @param version - version string printed by `--version`.
|
|
109
|
-
* @param manageDesktopProfile - permit Desktop's installed carrier to manage its reserved profile's plugins.
|
|
110
|
-
* @returns the resolved invocation.
|
|
111
|
-
*/
|
|
112
|
-
function parseDshArgs(argv, version, manageDesktopProfile = false) {
|
|
113
|
-
const first = argv[0];
|
|
114
|
-
let resolved;
|
|
115
|
-
const program = new Command();
|
|
116
|
-
program.name("dsh").version(version, "-V, --version", "output the version number").usage("[--profile] <name> [options] [app-args...]\n dsh plugin --profile <name> <pnpm-args...>").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).helpCommand(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", selectProfile).option("--from-default-profile <name>", "replace a custom profile with a fresh copy of 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-config-schema", "print JSON Schema for profile entries and patches without mounting").option("--dump-default-config", "print the profile tree without its user layer or --patch overlays and exit").action((args, options) => {
|
|
117
|
-
if (options.profile === void 0 && args.some((argument) => argument === "-h" || argument === "--help")) program.help();
|
|
118
|
-
if (options.profile === "") program.error("error: --profile needs a name");
|
|
119
|
-
const profile = options.profile ?? process.env[DEFAULT_PROFILE_ENV] ?? DEFAULT_PROFILE;
|
|
120
|
-
if (profile === "") program.error("error: --profile <name> is required");
|
|
121
|
-
rejectElectronProfile(program, profile);
|
|
122
|
-
resolved = resolveBoot(program, profile, options, args);
|
|
9
|
+
var __rewriteRelativeImportExtension = function(path, preserveJsx) {
|
|
10
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
11
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
123
12
|
});
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
plugin.helpOption("-h, --help", "show this help").passThroughOptions().requiredOption("--profile <name>", "the profile whose plugins to manage (initialized on first use)", selectProfile).allowUnknownOption().argument("[args...]", "pnpm arguments, forwarded verbatim (add <pkg>, remove <pkg>, why <pkg>, ...)").action((args, options) => {
|
|
127
|
-
if (options.profile === "") program.error("error: --profile needs a name");
|
|
128
|
-
if (!manageDesktopProfile) rejectElectronProfile(plugin, options.profile);
|
|
129
|
-
if (args.length === 0) program.error("error: plugin needs pnpm arguments to forward (e.g. add <package>)");
|
|
130
|
-
resolved = {
|
|
131
|
-
mode: "plugin",
|
|
132
|
-
profile: options.profile.toLowerCase() === "desktop" ? "desktop" : options.profile,
|
|
133
|
-
args
|
|
134
|
-
};
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
if (first === "watch") {
|
|
138
|
-
const watch = program.command("watch").description("watch a local subagent session read-only in the terminal");
|
|
139
|
-
watch.helpOption("-h, --help", "show this help").argument("<session-id>", "the local subagent session to watch").option("--patch <path>", "extra patch-list overlay for the tui profile (repeatable)", collect).action((sessionId, options) => {
|
|
140
|
-
if (sessionId === "") watch.error("error: watch needs a session id");
|
|
141
|
-
if (program.opts().profile !== void 0) watch.error("error: watch uses the tui profile; do not pass --profile");
|
|
142
|
-
resolved = resolveBoot(watch, "tui", options, ["--watch", sessionId]);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
try {
|
|
146
|
-
const expanded = first !== void 0 && !first.startsWith("-") && first !== "plugin" && first !== "watch" ? ["--profile", ...argv] : argv;
|
|
147
|
-
program.parse(expanded, { from: "user" });
|
|
148
|
-
} catch (error) {
|
|
149
|
-
return process.exit(error instanceof CommanderError ? error.exitCode : 1);
|
|
150
|
-
}
|
|
151
|
-
/* v8 ignore next -- an action resolves or Commander throws */
|
|
152
|
-
if (resolved === void 0) throw new Error("dsh: no invocation resolved");
|
|
153
|
-
return resolved;
|
|
154
|
-
}
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region lib/types/startup-diagnostics.js
|
|
157
|
-
/** Save original startup diagnostics while keeping the terminal report concise. */
|
|
158
|
-
/** Wait for stderr to finish the write before the failed process exits. */
|
|
159
|
-
function writeStderr(text) {
|
|
160
|
-
return new Promise((resolve, reject) => {
|
|
161
|
-
process.stderr.write(text, (error) => {
|
|
162
|
-
if (error) reject(error);
|
|
163
|
-
else resolve();
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
}
|
|
13
|
+
return path;
|
|
14
|
+
};
|
|
167
15
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* @
|
|
171
|
-
* @param context - resolved Harness home, application version, and selected profile.
|
|
172
|
-
* @param write - terminal output sink; awaited before returning, defaults to stderr.
|
|
173
|
-
* @returns after saving or printing the report and completing terminal writes.
|
|
16
|
+
* Run the CLI in the importing carrier's module tree.
|
|
17
|
+
* @param options - Installation-owned runtime options.
|
|
18
|
+
* @returns Settlement of the selected command.
|
|
174
19
|
*/
|
|
175
|
-
async function
|
|
176
|
-
|
|
177
|
-
const report = "WARNING: Raw diagnostics may contain configuration or credential values from plugin errors. Review before sharing.\n\n" + inspect({
|
|
178
|
-
timestamp: now,
|
|
179
|
-
dshVersion: context.version,
|
|
180
|
-
nodeVersion: process.version,
|
|
181
|
-
platform: process.platform,
|
|
182
|
-
arch: process.arch,
|
|
183
|
-
profile: context.profile,
|
|
184
|
-
error
|
|
185
|
-
}, {
|
|
186
|
-
depth: null,
|
|
187
|
-
maxArrayLength: null,
|
|
188
|
-
maxStringLength: null,
|
|
189
|
-
showHidden: true,
|
|
190
|
-
customInspect: false,
|
|
191
|
-
getters: false,
|
|
192
|
-
colors: false
|
|
193
|
-
}) + "\n";
|
|
194
|
-
await write(`${error.message}\n`);
|
|
195
|
-
const logDir = join(context.home, "logs");
|
|
196
|
-
const logPath = join(logDir, `startup-${now.replaceAll(":", "-")}-${randomUUID()}.log`);
|
|
197
|
-
try {
|
|
198
|
-
await mkdir(logDir, {
|
|
199
|
-
recursive: true,
|
|
200
|
-
mode: 448
|
|
201
|
-
});
|
|
202
|
-
await writeFile(logPath, report, {
|
|
203
|
-
flag: "wx",
|
|
204
|
-
mode: 384
|
|
205
|
-
});
|
|
206
|
-
} catch (writeError) {
|
|
207
|
-
await write(`\ndsh: warning: could not write startup diagnostics: ${String(writeError)}\nFull diagnostics:\n${report}`);
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
await write(`\nFull diagnostics: ${logPath}\n`);
|
|
20
|
+
async function runCli(options) {
|
|
21
|
+
await (await import("./bin-CKGHv5ga.js")).runCli(options);
|
|
211
22
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
* @module @deepseek-ai/dsh/bin
|
|
217
|
-
*/
|
|
218
|
-
/* v8 ignore file -- built-bin acceptance exercises this self-executing dispatch. */
|
|
219
|
-
/**
|
|
220
|
-
* Run the public dsh command-line interface.
|
|
221
|
-
* @param options - Package runtime and Desktop profile access supplied by the installation.
|
|
222
|
-
* @returns a promise that settles when the selected command mode finishes.
|
|
223
|
-
*/
|
|
224
|
-
async function runCli(options = {}) {
|
|
225
|
-
const version = getDshRuntimeVersion();
|
|
226
|
-
const { manageDesktopProfile, ...profileOptions } = options;
|
|
227
|
-
const invocation = parseDshArgs(process.argv.slice(2), version, manageDesktopProfile);
|
|
228
|
-
switch (invocation.mode) {
|
|
229
|
-
case "profile": {
|
|
230
|
-
const { runProfile } = await import("./profile-boot.js");
|
|
231
|
-
try {
|
|
232
|
-
await runProfile({
|
|
233
|
-
environment: loadLayeredEnv("dsh"),
|
|
234
|
-
profile: invocation.profile,
|
|
235
|
-
fromDefaultProfile: invocation.fromDefaultProfile,
|
|
236
|
-
patchFiles: invocation.patches,
|
|
237
|
-
args: invocation.args,
|
|
238
|
-
...profileOptions
|
|
239
|
-
});
|
|
240
|
-
} catch (error) {
|
|
241
|
-
if (!(error instanceof StartupError)) throw error;
|
|
242
|
-
await reportStartupFailure(error, {
|
|
243
|
-
home: resolveDshHome(),
|
|
244
|
-
version,
|
|
245
|
-
profile: invocation.profile
|
|
246
|
-
});
|
|
247
|
-
process.exit(1);
|
|
248
|
-
}
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
case "plugin": {
|
|
252
|
-
const { runPlugin } = await import("./plugin-DscIHF4k.js");
|
|
253
|
-
process.exit(await runPlugin(invocation.profile, invocation.args, options.packageManager));
|
|
254
|
-
break;
|
|
255
|
-
}
|
|
256
|
-
case "dump-config": {
|
|
257
|
-
const { runDumpConfig } = await import("./dump-config-DuXZcU0e.js");
|
|
258
|
-
runDumpConfig(invocation.profile, invocation.defaultOnly, invocation.patches, invocation.fromDefaultProfile);
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
case "dump-config-schema": {
|
|
262
|
-
const { runDumpConfigSchema } = await import("./dump-config-schema-r4V15-lg.js");
|
|
263
|
-
await runDumpConfigSchema(invocation.profile, invocation.patches, invocation.fromDefaultProfile);
|
|
264
|
-
break;
|
|
265
|
-
}
|
|
266
|
-
default: throw new Error(`dsh: unhandled invocation mode ${JSON.stringify(invocation)}`);
|
|
267
|
-
}
|
|
23
|
+
if (import.meta.main) {
|
|
24
|
+
const entry = process.platform === "win32" ? pathToFileURL(realpathSync.native(import.meta.filename)).href : import.meta.url;
|
|
25
|
+
if (entry === import.meta.url) await runCli();
|
|
26
|
+
else await (await import(__rewriteRelativeImportExtension(entry))).runCli();
|
|
268
27
|
}
|
|
269
|
-
if (import.meta.main) await runCli();
|
|
270
28
|
//#endregion
|
|
271
29
|
export { runCli };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-
|
|
2
|
-
import { loadOptionalPatches, loadOverlayPatches, renderConfigDump } from "@deepseek-ai/dsh-app-boot";
|
|
3
|
-
import { join, resolve } from "node:path";
|
|
1
|
+
import { a as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-xiaehH2x.js";
|
|
4
2
|
import { existsSync } from "node:fs";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
import { loadOptionalPatches, loadOverlayPatches, renderConfigDump } from "@deepseek-ai/dsh-app-boot";
|
|
5
5
|
//#region lib/types/dump-config.js
|
|
6
6
|
/**
|
|
7
7
|
* Config-dump entry for `dsh --profile <name> --dump-config`: compose the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as prepareProfile, t as INSTALL_ANCHOR } from "./profile-boot-
|
|
2
|
-
import { t as collectConfigDumpLayers } from "./dump-config-
|
|
1
|
+
import { a as prepareProfile, t as INSTALL_ANCHOR } from "./profile-boot-xiaehH2x.js";
|
|
2
|
+
import { t as collectConfigDumpLayers } from "./dump-config-DCQrFN8g.js";
|
|
3
3
|
import { generateConfigSchema } from "@deepseek-ai/dsh-app-boot";
|
|
4
4
|
//#region lib/types/dump-config-schema.js
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as INSTALL_ANCHOR } from "./profile-boot-
|
|
2
|
-
import { initProfile, readProfileCompatibility, resolveProfileDir } from "@deepseek-ai/dsh-app-boot";
|
|
3
|
-
import { mkdir } from "node:fs/promises";
|
|
4
|
-
import { join } from "node:path";
|
|
1
|
+
import { t as INSTALL_ANCHOR } from "./profile-boot-xiaehH2x.js";
|
|
5
2
|
import { existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { initProfile, readProfileCompatibility, resolveProfileDir } from "@deepseek-ai/dsh-app-boot";
|
|
6
5
|
import { DEFAULT_PROFILE_BUNDLES, PROFILE_TEMPLATES } from "@deepseek-ai/dsh-official-bundles";
|
|
6
|
+
import { mkdir } from "node:fs/promises";
|
|
7
7
|
import { runPluginCommand, runProfilePnpm, setProfileVersionExemption } from "@deepseek-ai/dsh-plugin-manager/operations";
|
|
8
8
|
import { withFileLock } from "@deepseek-ai/dsh-atomic-write";
|
|
9
9
|
//#region lib/types/plugin.js
|
package/lib/profile-boot.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as prepareProfile, i as initializeProfileFromDefault, n as PROFILE_ROOT_FILENAME, o as runProfile, r as homePatchPath, t as INSTALL_ANCHOR } from "./profile-boot-
|
|
1
|
+
import { a as prepareProfile, i as initializeProfileFromDefault, n as PROFILE_ROOT_FILENAME, o as runProfile, r as homePatchPath, t as INSTALL_ANCHOR } from "./profile-boot-xiaehH2x.js";
|
|
2
2
|
export { INSTALL_ANCHOR, PROFILE_ROOT_FILENAME, homePatchPath, initializeProfileFromDefault, prepareProfile, runProfile };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import type { RunCliOptions } from './bin.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Run the CLI in the importing carrier's module tree.
|
|
5
|
+
* @param options - Installation-owned runtime options.
|
|
6
|
+
* @returns Settlement of the selected command.
|
|
7
|
+
*/
|
|
8
|
+
export declare function runCli(options?: RunCliOptions): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=installed-bin.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishwithcat/dsh",
|
|
3
3
|
"description": "dsh CLI: profile launch, plugin management, and configuration inspection",
|
|
4
|
-
"version": "0.2.2-alpha.
|
|
4
|
+
"version": "0.2.2-alpha.3.fork.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -17,148 +17,148 @@
|
|
|
17
17
|
],
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@deepseek-ai/cordis": "~4.0.6-alpha.
|
|
21
|
-
"@deepseek-ai/dsh-hmr": "0.2.2-alpha.
|
|
22
|
-
"@deepseek-ai/cordis-plugin-include": "~1.0.11-alpha.
|
|
23
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.
|
|
24
|
-
"@deepseek-ai/cordis-plugin-timer": "~1.1.8-alpha.
|
|
25
|
-
"@deepseek-ai/dsh-acp-app": "0.2.2-alpha.
|
|
26
|
-
"@deepseek-ai/dsh-agent-instructions": "0.2.2-alpha.
|
|
27
|
-
"@deepseek-ai/dsh-agent-tool-presentation": "0.2.2-alpha.
|
|
28
|
-
"@deepseek-ai/dsh-app-boot": "0.2.2-alpha.
|
|
29
|
-
"@deepseek-ai/dsh-base": "0.2.2-alpha.
|
|
30
|
-
"@deepseek-ai/dsh-client-ui-agent-preset": "0.2.2-alpha.
|
|
31
|
-
"@deepseek-ai/dsh-client-ui-cordis": "0.2.2-alpha.
|
|
32
|
-
"@deepseek-ai/dsh-cmdline": "0.2.2-alpha.
|
|
33
|
-
"@deepseek-ai/dsh-command-compact": "0.2.2-alpha.
|
|
34
|
-
"@deepseek-ai/dsh-command-goal": "0.2.2-alpha.
|
|
35
|
-
"@deepseek-ai/dsh-compaction-basic": "npm:@fishwithcat/dsh-compaction-basic@0.2.2-alpha.
|
|
36
|
-
"@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.2-alpha.
|
|
37
|
-
"@deepseek-ai/dsh-cordis-client-runner": "0.2.2-alpha.
|
|
38
|
-
"@deepseek-ai/dsh-experimental-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-goal": "0.2.2-alpha.
|
|
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-pwsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-sdk-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-session-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-skill": "0.2.2-alpha.
|
|
59
|
-
"@deepseek-ai/dsh-skill-
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-terminal": "0.2.2-alpha.
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-tool-
|
|
68
|
-
"@deepseek-ai/dsh-tool-bash": "0.2.2-alpha.
|
|
69
|
-
"@deepseek-ai/dsh-tool-
|
|
70
|
-
"@deepseek-ai/dsh-tool-
|
|
71
|
-
"@deepseek-ai/dsh-tool-
|
|
72
|
-
"@deepseek-ai/dsh-tool-fs": "0.2.2-alpha.
|
|
73
|
-
"@deepseek-ai/dsh-tool-
|
|
74
|
-
"@deepseek-ai/dsh-tool-
|
|
75
|
-
"@deepseek-ai/dsh-tool-
|
|
76
|
-
"@deepseek-ai/dsh-tool-pwsh": "0.2.2-alpha.
|
|
77
|
-
"@deepseek-ai/dsh-tool-
|
|
78
|
-
"@deepseek-ai/dsh-tool-
|
|
79
|
-
"@deepseek-ai/dsh-tool-
|
|
80
|
-
"@deepseek-ai/dsh-tool-
|
|
81
|
-
"@deepseek-ai/dsh-tool-subagent": "0.2.2-alpha.
|
|
82
|
-
"@deepseek-ai/dsh-tool-
|
|
83
|
-
"@deepseek-ai/dsh-tool-
|
|
84
|
-
"@deepseek-ai/dsh-tool-
|
|
85
|
-
"@deepseek-ai/dsh-
|
|
86
|
-
"@deepseek-ai/dsh-
|
|
87
|
-
"@deepseek-ai/dsh-
|
|
88
|
-
"@deepseek-ai/
|
|
89
|
-
"@deepseek-ai/schemastery": "~3.18.6-alpha.1",
|
|
20
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.2",
|
|
21
|
+
"@deepseek-ai/dsh-hmr": "0.2.2-alpha.3",
|
|
22
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.11-alpha.2",
|
|
23
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
|
|
24
|
+
"@deepseek-ai/cordis-plugin-timer": "~1.1.8-alpha.2",
|
|
25
|
+
"@deepseek-ai/dsh-acp-app": "0.2.2-alpha.3",
|
|
26
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.2-alpha.3",
|
|
27
|
+
"@deepseek-ai/dsh-agent-tool-presentation": "0.2.2-alpha.3",
|
|
28
|
+
"@deepseek-ai/dsh-app-boot": "0.2.2-alpha.3",
|
|
29
|
+
"@deepseek-ai/dsh-base": "0.2.2-alpha.3",
|
|
30
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": "0.2.2-alpha.3",
|
|
31
|
+
"@deepseek-ai/dsh-client-ui-cordis": "0.2.2-alpha.3",
|
|
32
|
+
"@deepseek-ai/dsh-cmdline": "0.2.2-alpha.3",
|
|
33
|
+
"@deepseek-ai/dsh-command-compact": "0.2.2-alpha.3",
|
|
34
|
+
"@deepseek-ai/dsh-command-goal": "0.2.2-alpha.3",
|
|
35
|
+
"@deepseek-ai/dsh-compaction-basic": "npm:@fishwithcat/dsh-compaction-basic@0.2.2-alpha.3",
|
|
36
|
+
"@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.2-alpha.3",
|
|
37
|
+
"@deepseek-ai/dsh-cordis-client-runner": "0.2.2-alpha.3",
|
|
38
|
+
"@deepseek-ai/dsh-experimental-inspector-profile": "0.2.2-alpha.3",
|
|
39
|
+
"@deepseek-ai/dsh-fs-local": "0.2.2-alpha.3",
|
|
40
|
+
"@deepseek-ai/dsh-goal": "0.2.2-alpha.3",
|
|
41
|
+
"@deepseek-ai/dsh-goal-round-driver": "0.2.2-alpha.3",
|
|
42
|
+
"@deepseek-ai/dsh-headless": "0.2.2-alpha.3",
|
|
43
|
+
"@deepseek-ai/dsh-home-paths": "0.2.2-alpha.3",
|
|
44
|
+
"@deepseek-ai/dsh-jobs-local": "0.2.2-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.2-alpha.3",
|
|
46
|
+
"@deepseek-ai/dsh-mcp-client": "0.2.2-alpha.3",
|
|
47
|
+
"@deepseek-ai/dsh-official-bundles": "0.2.2-alpha.3",
|
|
48
|
+
"@deepseek-ai/dsh-persona": "0.2.2-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-plan-mode": "0.2.2-alpha.3",
|
|
50
|
+
"@deepseek-ai/dsh-pwsh-local": "0.2.2-alpha.3",
|
|
51
|
+
"@deepseek-ai/dsh-pwsh-sandbox": "0.2.2-alpha.3",
|
|
52
|
+
"@deepseek-ai/dsh-schedule": "0.2.2-alpha.3",
|
|
53
|
+
"@deepseek-ai/dsh-sdk-app": "0.2.2-alpha.3",
|
|
54
|
+
"@deepseek-ai/dsh-sdk-minimal": "0.2.2-alpha.3",
|
|
55
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.3",
|
|
56
|
+
"@deepseek-ai/dsh-session-reference": "0.2.2-alpha.3",
|
|
57
|
+
"@deepseek-ai/dsh-skill": "0.2.2-alpha.3",
|
|
58
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.2-alpha.3",
|
|
59
|
+
"@deepseek-ai/dsh-skill-office": "0.2.2-alpha.3",
|
|
60
|
+
"@deepseek-ai/dsh-tool-workspace-dependencies": "0.2.2-alpha.3",
|
|
61
|
+
"@deepseek-ai/dsh-terminal": "0.2.2-alpha.3",
|
|
62
|
+
"@deepseek-ai/dsh-terminal-bash": "0.2.2-alpha.3",
|
|
63
|
+
"@deepseek-ai/dsh-time-context": "0.2.2-alpha.3",
|
|
64
|
+
"@deepseek-ai/dsh-tmux-context": "0.2.2-alpha.3",
|
|
65
|
+
"@deepseek-ai/dsh-token-meter": "0.2.2-alpha.3",
|
|
66
|
+
"@deepseek-ai/dsh-tool-ask-user": "npm:@fishwithcat/dsh-tool-ask-user@0.2.2-alpha.3",
|
|
67
|
+
"@deepseek-ai/dsh-tool-bash": "0.2.2-alpha.3",
|
|
68
|
+
"@deepseek-ai/dsh-tool-bash-persistent": "0.2.2-alpha.3",
|
|
69
|
+
"@deepseek-ai/dsh-tool-cordis": "0.2.2-alpha.3",
|
|
70
|
+
"@deepseek-ai/dsh-tool-present": "0.2.2-alpha.3",
|
|
71
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.2-alpha.3",
|
|
72
|
+
"@deepseek-ai/dsh-tool-fs-search": "0.2.2-alpha.3",
|
|
73
|
+
"@deepseek-ai/dsh-tool-goal": "0.2.2-alpha.3",
|
|
74
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.2-alpha.3",
|
|
75
|
+
"@deepseek-ai/dsh-tool-pwsh": "0.2.2-alpha.3",
|
|
76
|
+
"@deepseek-ai/dsh-tool-pwsh-persistent": "0.2.2-alpha.3",
|
|
77
|
+
"@deepseek-ai/dsh-tool-schedule": "0.2.2-alpha.3",
|
|
78
|
+
"@deepseek-ai/dsh-tool-skill": "0.2.2-alpha.3",
|
|
79
|
+
"@deepseek-ai/dsh-tool-str-replace-editor": "0.2.2-alpha.3",
|
|
80
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.2-alpha.3",
|
|
81
|
+
"@deepseek-ai/dsh-tool-subagent-control": "0.2.2-alpha.3",
|
|
82
|
+
"@deepseek-ai/dsh-tool-todo": "npm:@fishwithcat/dsh-tool-todo@0.2.2-alpha.3",
|
|
83
|
+
"@deepseek-ai/dsh-tool-web": "0.2.2-alpha.3",
|
|
84
|
+
"@deepseek-ai/dsh-tool-workflow": "0.2.2-alpha.3",
|
|
85
|
+
"@deepseek-ai/dsh-tui-app": "npm:@fishwithcat/dsh-tui-app@0.2.2-alpha.3.fork.1",
|
|
86
|
+
"@deepseek-ai/dsh-web-app": "0.2.2-alpha.3",
|
|
87
|
+
"@deepseek-ai/dsh-workflow-ptc": "0.2.2-alpha.3",
|
|
88
|
+
"@deepseek-ai/schemastery": "~3.18.6-alpha.2",
|
|
90
89
|
"commander": "^15.0.0",
|
|
91
90
|
"js-yaml": "^4.3.2",
|
|
92
91
|
"node-addon-require-builtin": "^0.1.9",
|
|
93
|
-
"@deepseek-ai/dsh-http-proxy": "0.2.2-alpha.
|
|
94
|
-
"@deepseek-ai/dsh-mcp-resources": "0.2.2-alpha.
|
|
95
|
-
"@deepseek-ai/dsh-plugin-manager": "0.2.2-alpha.
|
|
96
|
-
"@deepseek-ai/dsh-atomic-write": "0.2.2-alpha.
|
|
97
|
-
"@deepseek-ai/dsh-agent-preset": "0.2.2-alpha.
|
|
98
|
-
"@deepseek-ai/dsh-experimental-voice-input-bundle": "0.2.2-alpha.
|
|
99
|
-
"@deepseek-ai/dsh-experimental-auto-review": "0.2.2-alpha.
|
|
100
|
-
"@deepseek-ai/dsh-experimental-cot-translation-bundle": "0.2.2-alpha.
|
|
101
|
-
"@deepseek-ai/dsh-experimental-badge-skill-bundle": "0.2.2-alpha.
|
|
102
|
-
"@deepseek-ai/dsh-experimental-ralph-bundle": "0.2.2-alpha.
|
|
103
|
-
"@deepseek-ai/dsh-experimental-session-titles-bundle": "0.2.2-alpha.
|
|
104
|
-
"@deepseek-ai/dsh-experimental-terminal-bundle": "0.2.2-alpha.
|
|
105
|
-
"@deepseek-ai/dsh-experimental-liveshare": "0.2.2-alpha.
|
|
106
|
-
"@deepseek-ai/dsh-experimental-session-search": "0.2.2-alpha.
|
|
107
|
-
"@deepseek-ai/dsh-experimental-tool-worktree": "0.2.2-alpha.
|
|
108
|
-
"@deepseek-ai/dsh-
|
|
109
|
-
"@deepseek-ai/dsh-
|
|
110
|
-
"@deepseek-ai/dsh-
|
|
92
|
+
"@deepseek-ai/dsh-http-proxy": "0.2.2-alpha.3",
|
|
93
|
+
"@deepseek-ai/dsh-mcp-resources": "0.2.2-alpha.3",
|
|
94
|
+
"@deepseek-ai/dsh-plugin-manager": "0.2.2-alpha.3",
|
|
95
|
+
"@deepseek-ai/dsh-atomic-write": "0.2.2-alpha.3",
|
|
96
|
+
"@deepseek-ai/dsh-agent-preset": "0.2.2-alpha.3",
|
|
97
|
+
"@deepseek-ai/dsh-experimental-voice-input-bundle": "0.2.2-alpha.3",
|
|
98
|
+
"@deepseek-ai/dsh-experimental-auto-review": "0.2.2-alpha.3",
|
|
99
|
+
"@deepseek-ai/dsh-experimental-cot-translation-bundle": "0.2.2-alpha.3",
|
|
100
|
+
"@deepseek-ai/dsh-experimental-badge-skill-bundle": "0.2.2-alpha.3",
|
|
101
|
+
"@deepseek-ai/dsh-experimental-ralph-bundle": "0.2.2-alpha.3",
|
|
102
|
+
"@deepseek-ai/dsh-experimental-session-titles-bundle": "0.2.2-alpha.3",
|
|
103
|
+
"@deepseek-ai/dsh-experimental-terminal-bundle": "0.2.2-alpha.3",
|
|
104
|
+
"@deepseek-ai/dsh-experimental-liveshare": "0.2.2-alpha.3",
|
|
105
|
+
"@deepseek-ai/dsh-experimental-session-search": "0.2.2-alpha.3",
|
|
106
|
+
"@deepseek-ai/dsh-experimental-tool-worktree": "0.2.2-alpha.3",
|
|
107
|
+
"@deepseek-ai/dsh-cua-bundle": "0.2.2-alpha.3",
|
|
108
|
+
"@deepseek-ai/dsh-experimental-plugin-market-bundle": "0.2.2-alpha.3",
|
|
109
|
+
"@deepseek-ai/dsh-personalized-recommendations": "0.2.2-alpha.3",
|
|
110
|
+
"@deepseek-ai/dsh-experimental-forge-bundle": "0.2.2-alpha.3"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@deepseek-ai/dsh-skill-badge": "0.2.2-alpha.
|
|
114
|
-
"@deepseek-ai/dsh-webhook-github": "0.2.2-alpha.
|
|
115
|
-
"@deepseek-ai/dsh-webhook": "0.2.2-alpha.
|
|
116
|
-
"@deepseek-ai/dsh-tool-ralph": "0.2.2-alpha.
|
|
117
|
-
"@deepseek-ai/dsh-hooks-codex": "0.2.2-alpha.
|
|
118
|
-
"@deepseek-ai/dsh-hooks-claude-code": "0.2.2-alpha.
|
|
113
|
+
"@deepseek-ai/dsh-skill-badge": "0.2.2-alpha.3",
|
|
114
|
+
"@deepseek-ai/dsh-webhook-github": "0.2.2-alpha.3",
|
|
115
|
+
"@deepseek-ai/dsh-webhook": "0.2.2-alpha.3",
|
|
116
|
+
"@deepseek-ai/dsh-tool-ralph": "0.2.2-alpha.3",
|
|
117
|
+
"@deepseek-ai/dsh-hooks-codex": "0.2.2-alpha.3",
|
|
118
|
+
"@deepseek-ai/dsh-hooks-claude-code": "0.2.2-alpha.3",
|
|
119
119
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
120
|
-
"@deepseek-ai/dsh-acp": "0.2.2-alpha.
|
|
121
|
-
"@deepseek-ai/dsh-agent": "0.2.2-alpha.
|
|
122
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.
|
|
123
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-alpha.
|
|
124
|
-
"@deepseek-ai/dsh-attachment-local": "0.2.2-alpha.
|
|
125
|
-
"@deepseek-ai/dsh-bash-local": "0.2.2-alpha.
|
|
126
|
-
"@deepseek-ai/dsh-credentials-local": "0.2.2-alpha.
|
|
127
|
-
"@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.2.2-alpha.
|
|
128
|
-
"@deepseek-ai/dsh-
|
|
129
|
-
"@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.2.2-alpha.
|
|
130
|
-
"@deepseek-ai/dsh-
|
|
131
|
-
"@deepseek-ai/dsh-fs-observation-policy": "0.2.2-alpha.
|
|
132
|
-
"@deepseek-ai/dsh-fs-sandbox": "0.2.2-alpha.
|
|
133
|
-
"@deepseek-ai/dsh-host-frontend-static": "0.2.2-alpha.
|
|
134
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.2-alpha.
|
|
135
|
-
"@deepseek-ai/dsh-llm": "0.2.2-alpha.
|
|
136
|
-
"@deepseek-ai/dsh-llm-deepseek": "0.2.2-alpha.
|
|
137
|
-
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.2-alpha.
|
|
138
|
-
"@deepseek-ai/dsh-llm-deepseek-account": "0.2.2-alpha.
|
|
139
|
-
"@deepseek-ai/dsh-llm-mock-server": "0.2.2-alpha.
|
|
140
|
-
"@deepseek-ai/dsh-llm-pi-ai": "0.2.2-alpha.
|
|
141
|
-
"@deepseek-ai/dsh-llm-replay": "0.2.2-alpha.
|
|
142
|
-
"@deepseek-ai/dsh-loader-smoke": "0.2.2-alpha.
|
|
143
|
-
"@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.2.2-alpha.
|
|
144
|
-
"@deepseek-ai/dsh-sandbox-local": "0.2.2-alpha.
|
|
145
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.
|
|
146
|
-
"@deepseek-ai/dsh-sdk-client": "0.2.2-alpha.
|
|
147
|
-
"@deepseek-ai/dsh-session": "0.2.2-alpha.
|
|
148
|
-
"@deepseek-ai/dsh-session-checkpoint-policy": "0.2.2-alpha.
|
|
149
|
-
"@deepseek-ai/dsh-session-log-deepseek": "0.2.2-alpha.
|
|
150
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.2-alpha.
|
|
151
|
-
"@deepseek-ai/dsh-session-query": "0.2.2-alpha.
|
|
152
|
-
"@deepseek-ai/dsh-shell-env": "0.2.2-alpha.
|
|
153
|
-
"@deepseek-ai/dsh-settings": "0.2.2-alpha.
|
|
154
|
-
"@deepseek-ai/dsh-subagent": "0.2.2-alpha.
|
|
155
|
-
"@deepseek-ai/dsh-subagent-fork-in-process": "0.2.2-alpha.
|
|
156
|
-
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.2-alpha.
|
|
157
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.
|
|
158
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.
|
|
159
|
-
"@deepseek-ai/dsh-tool-testkit": "0.2.2-alpha.
|
|
160
|
-
"@deepseek-ai/dsh-tools": "0.2.2-alpha.
|
|
161
|
-
"@deepseek-ai/dsh-user-approval": "0.2.2-alpha.
|
|
120
|
+
"@deepseek-ai/dsh-acp": "0.2.2-alpha.3",
|
|
121
|
+
"@deepseek-ai/dsh-agent": "0.2.2-alpha.3",
|
|
122
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.2-alpha.3",
|
|
123
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-alpha.3",
|
|
124
|
+
"@deepseek-ai/dsh-attachment-local": "0.2.2-alpha.3",
|
|
125
|
+
"@deepseek-ai/dsh-bash-local": "0.2.2-alpha.3",
|
|
126
|
+
"@deepseek-ai/dsh-credentials-local": "0.2.2-alpha.3",
|
|
127
|
+
"@deepseek-ai/dsh-deepseek-llm-api-extensions": "0.2.2-alpha.3",
|
|
128
|
+
"@deepseek-ai/dsh-agent-team": "0.2.2-alpha.3",
|
|
129
|
+
"@deepseek-ai/dsh-experimental-ptc-runtime-python": "0.2.2-alpha.3",
|
|
130
|
+
"@deepseek-ai/dsh-tool-agent-team": "0.2.2-alpha.3",
|
|
131
|
+
"@deepseek-ai/dsh-fs-observation-policy": "0.2.2-alpha.3",
|
|
132
|
+
"@deepseek-ai/dsh-fs-sandbox": "0.2.2-alpha.3",
|
|
133
|
+
"@deepseek-ai/dsh-host-frontend-static": "0.2.2-alpha.3",
|
|
134
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.2-alpha.3",
|
|
135
|
+
"@deepseek-ai/dsh-llm": "0.2.2-alpha.3",
|
|
136
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.2.2-alpha.3",
|
|
137
|
+
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.2-alpha.3",
|
|
138
|
+
"@deepseek-ai/dsh-llm-deepseek-account": "0.2.2-alpha.3",
|
|
139
|
+
"@deepseek-ai/dsh-llm-mock-server": "0.2.2-alpha.3",
|
|
140
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.2.2-alpha.3",
|
|
141
|
+
"@deepseek-ai/dsh-llm-replay": "0.2.2-alpha.3",
|
|
142
|
+
"@deepseek-ai/dsh-loader-smoke": "0.2.2-alpha.3",
|
|
143
|
+
"@deepseek-ai/dsh-plugin-package-inventory-deepseek": "0.2.2-alpha.3",
|
|
144
|
+
"@deepseek-ai/dsh-sandbox-local": "0.2.2-alpha.3",
|
|
145
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.3",
|
|
146
|
+
"@deepseek-ai/dsh-sdk-client": "0.2.2-alpha.3",
|
|
147
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.3",
|
|
148
|
+
"@deepseek-ai/dsh-session-checkpoint-policy": "0.2.2-alpha.3",
|
|
149
|
+
"@deepseek-ai/dsh-session-log-deepseek": "0.2.2-alpha.3",
|
|
150
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.2-alpha.3",
|
|
151
|
+
"@deepseek-ai/dsh-session-query": "0.2.2-alpha.3",
|
|
152
|
+
"@deepseek-ai/dsh-shell-env": "0.2.2-alpha.3",
|
|
153
|
+
"@deepseek-ai/dsh-settings": "0.2.2-alpha.3",
|
|
154
|
+
"@deepseek-ai/dsh-subagent": "0.2.2-alpha.3",
|
|
155
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "0.2.2-alpha.3",
|
|
156
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.2-alpha.3",
|
|
157
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.3",
|
|
158
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.3",
|
|
159
|
+
"@deepseek-ai/dsh-tool-testkit": "0.2.2-alpha.3",
|
|
160
|
+
"@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
|
|
161
|
+
"@deepseek-ai/dsh-user-approval": "0.2.2-alpha.3",
|
|
162
162
|
"@types/js-yaml": "^4.0.9",
|
|
163
163
|
"@types/ws": "8.18.1",
|
|
164
164
|
"ajv": "^8.20.0",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PROFILE_PATCH_FILENAME, PluginPackages, boot, createRuntimeResolution, initProfile, installFailLoud, loadOverlayPatches, loadProfile, readProfilePatches, reportSkippedBundles, resolveProfileDir } from "@deepseek-ai/dsh-app-boot";
|
|
2
|
-
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
3
|
-
import { dirname, join, resolve } from "node:path";
|
|
4
1
|
import { existsSync, mkdirSync, mkdtempSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
5
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname, join, resolve } from "node:path";
|
|
4
|
+
import { PROFILE_PATCH_FILENAME, PluginPackages, boot, createRuntimeResolution, initProfile, installFailLoud, loadOverlayPatches, loadProfile, readProfilePatches, reportSkippedBundles, resolveProfileDir } from "@deepseek-ai/dsh-app-boot";
|
|
6
5
|
import { PROFILE_TEMPLATES } from "@deepseek-ai/dsh-official-bundles";
|
|
6
|
+
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
7
7
|
import { installProxyFromEnvironment } from "@deepseek-ai/dsh-http-proxy";
|
|
8
8
|
import { DSH_LAUNCH_ENVIRONMENT_KEY } from "@deepseek-ai/dsh-launch-environment";
|
|
9
9
|
import { provideCmdline } from "@deepseek-ai/dsh-cmdline";
|