@deepseek-ai/dsh 0.0.1-rc.2 → 0.1.0-rc.2

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.
@@ -1,4 +1,4 @@
1
- import { t as INSTALL_ANCHOR } from "./profile-boot-D95nr1z0.js";
1
+ import { t as INSTALL_ANCHOR } from "./profile-boot-DG5t9aNs.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";
@@ -0,0 +1,2 @@
1
+ import { o as runProfile } from "./profile-boot-DG5t9aNs.js";
2
+ export { runProfile };
@@ -2,8 +2,8 @@ import { writeFileSync } from "node:fs";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { PROFILE_PATCH_FILENAME, boot, composeEntries, healProfilesModuleFallback, installFailLoud, loadOptionalPatches, loadOverlayPatches, loadProfile, watchUserPatches } from "@deepseek-ai/dsh-app-boot";
4
4
  import { join, resolve } from "node:path";
5
- import { dshHomePath, resolveDshHome } from "@deepseek-ai/dsh-paths";
6
- import { DSH_ENVIRONMENT_KEY } from "@deepseek-ai/dsh-environment";
5
+ import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
6
+ import { DSH_LAUNCH_ENVIRONMENT_KEY } from "@deepseek-ai/dsh-launch-environment";
7
7
  import { provideCmdline } from "@deepseek-ai/dsh-cmdline";
8
8
  //#region lib/types/process-shutdown.js
9
9
  /** Bounded, escalating process shutdown for the long-lived CLI surfaces. */
@@ -69,44 +69,6 @@ function createProcessShutdown(dispose, forceExit = (code) => {
69
69
  };
70
70
  }
71
71
  //#endregion
72
- //#region lib/types/windows-shell.js
73
- /**
74
- * The Windows shell platform layer: on win32 hosts the shipped profile
75
- * compositions swap the POSIX-only bash stack for the sandbox-confined
76
- * PowerShell stack (`@deepseek-ai/dsh-pwsh-sandbox` +
77
- * `@deepseek-ai/dsh-tool-pwsh`). The layer is the base bundle's
78
- * `windows.cordis.patch.yml`, injected by the launcher between the bundle
79
- * layers and the user layers so a user patch can still override it — the
80
- * only override channel is composition config, like every other roster
81
- * decision. POSIX hosts never receive the layer.
82
- * @module @deepseek-ai/dsh/windows-shell
83
- */
84
- /** The base bundle whose package carries the Windows shell patch. */
85
- const BASE_BUNDLE = "@deepseek-ai/dsh-base";
86
- /** The Windows shell patch filename inside the base bundle package. */
87
- const WINDOWS_SHELL_PATCH_FILENAME = "windows.cordis.patch.yml";
88
- /**
89
- * Resolve the Windows shell platform layer for a profile composition.
90
- * @param platform - the host platform (`process.platform` at call sites).
91
- * @param layers - the profile's bundle layers, in application order.
92
- * @param binName - the diagnostic prefix on thrown errors (`dsh`).
93
- * @returns the pwsh layer on win32, else `undefined`. A custom profile that
94
- * mounts no base bundle is skipped (it owns its shell stack); a base
95
- * bundle whose Windows shell patch is missing fails loud in
96
- * {@link loadOverlayPatches} — the shipped package always carries it, so
97
- * a miss is a broken installation.
98
- */
99
- function resolveWindowsShellLayer(platform, layers, binName) {
100
- if (platform !== "win32") return void 0;
101
- const base = layers.find((layer) => layer.packageName === BASE_BUNDLE);
102
- if (base === void 0) return void 0;
103
- const label = join(base.packageDir, WINDOWS_SHELL_PATCH_FILENAME);
104
- return {
105
- label,
106
- patches: loadOverlayPatches(binName, label)
107
- };
108
- }
109
- //#endregion
110
72
  //#region lib/types/profile-boot.js
111
73
  /**
112
74
  * Shared profile boot for every `dsh` surface: resolve the profile, stack its
@@ -122,8 +84,6 @@ function resolveWindowsShellLayer(platform, layers, binName) {
122
84
  */
123
85
  /** Shipped agent-preset root: beside this app's own config, in both source and built layouts. */
124
86
  const SHIPPED_PRESET_ROOT = fileURLToPath(new URL("../config/agent-presets/", import.meta.url));
125
- /** Harness-home directory holding locally authored agent presets. */
126
- const USER_PRESET_DIR = ".agent-presets";
127
87
  const NAME = "dsh";
128
88
  /**
129
89
  * The home-level user patch layer (`$DSH_HOME/cordis.patch.yml`), applied
@@ -137,7 +97,7 @@ function homePatchPath() {
137
97
  /** Absolute path of this dsh installation's package.json (both anchors: src/ and lib/ sit one level under apps/cli). */
138
98
  const INSTALL_ANCHOR = fileURLToPath(new URL("../package.json", import.meta.url));
139
99
  /** The session-telemetry row id the DSH_TELEMETRY_DISABLED switch targets. */
140
- const TELEMETRY_ROW_ID = "telemetry-otel";
100
+ const TELEMETRY_ROW_ID = "session-telemetry-otel";
141
101
  /** The empty root entry list every profile tree patches over. */
142
102
  const PROFILE_ROOT_CONFIG = `# dsh profile root — an empty entry list. The tree is composed as patches:
143
103
  # each bundle in package.json's dsh.profile.bundles, then cordis.patch.yml, then any
@@ -155,7 +115,7 @@ const PROFILE_ROOT_FILENAME = "cordis.yml";
155
115
  * switch set.
156
116
  * @param disabledEnv - the raw `DSH_TELEMETRY_DISABLED` value (`undefined` when unset).
157
117
  * @param hasRow - whether the composition carries the telemetry row.
158
- * @returns the disable patch, or `undefined` when telemetry stays enabled or is not mounted.
118
+ * @returns the disable patch, or `undefined` when no hard-disable patch is required.
159
119
  */
160
120
  function resolveTelemetryPatch(disabledEnv, hasRow) {
161
121
  if ((disabledEnv ?? "") === "" || !hasRow) return void 0;
@@ -187,7 +147,6 @@ function prepareProfile(name, userLayer = true) {
187
147
  function allPatches(composed) {
188
148
  return [
189
149
  ...composed.bundlePatches,
190
- ...composed.windowsShellPatches,
191
150
  ...composed.profile.patches,
192
151
  ...composed.homePatches,
193
152
  ...composed.overlays
@@ -195,10 +154,10 @@ function allPatches(composed) {
195
154
  }
196
155
  /**
197
156
  * Load `name` and compose its effective patch stack: bundle layers in
198
- * `dsh.profile.bundles` order, the win32 shell platform layer (when the host
199
- * is Windows), the profile's user layer, the home-level user layer
200
- * (`$DSH_HOME/cordis.patch.yml` — machine-local preferences that apply to
201
- * every profile, so it outranks the per-profile layer), `--patch` overlays,
157
+ * `dsh.profile.bundles` order (the base bundle gates the shell stacks by
158
+ * platform on its own rows), the profile's user layer, the home-level user
159
+ * layer (`$DSH_HOME/cordis.patch.yml` — machine-local preferences that apply
160
+ * to every profile, so it outranks the per-profile layer), `--patch` overlays,
202
161
  * then the telemetry switch.
203
162
  * @param name - the profile name.
204
163
  * @param patchFiles - `--patch` overlay paths, in argv order.
@@ -209,11 +168,9 @@ function composeProfile(name, patchFiles) {
209
168
  const homePatches = loadOptionalPatches(NAME, homePatchPath()) ?? [];
210
169
  const overlays = patchFiles.flatMap((file) => loadOverlayPatches(NAME, resolve(file)));
211
170
  const bundlePatches = profile.layers.flatMap((layer) => layer.patches);
212
- const windowsShellPatches = resolveWindowsShellLayer(process.platform, profile.layers, NAME)?.patches ?? [];
213
171
  const rows = /* @__PURE__ */ new Map();
214
172
  for (const row of composeEntries([
215
173
  bundlePatches,
216
- windowsShellPatches,
217
174
  profile.patches,
218
175
  homePatches,
219
176
  overlays
@@ -226,9 +183,6 @@ function composeProfile(name, patchFiles) {
226
183
  roots: [{
227
184
  path: SHIPPED_PRESET_ROOT,
228
185
  trust: "system"
229
- }, {
230
- path: dshHomePath(USER_PRESET_DIR),
231
- trust: "user"
232
186
  }]
233
187
  }
234
188
  });
@@ -237,7 +191,6 @@ function composeProfile(name, patchFiles) {
237
191
  return {
238
192
  profile,
239
193
  bundlePatches,
240
- windowsShellPatches,
241
194
  homePatches,
242
195
  overlays: composedOverlays,
243
196
  rows
@@ -287,14 +240,13 @@ async function runProfile(options) {
287
240
  const rootConfig = join(composed.profile.dir, PROFILE_ROOT_FILENAME);
288
241
  const composeLive = () => structuredClone([
289
242
  ...composed.bundlePatches,
290
- ...composed.windowsShellPatches,
291
243
  ...loadOptionalPatches(NAME, composed.profile.patchPath) ?? [],
292
244
  ...loadOptionalPatches(NAME, homePatchPath()) ?? [],
293
245
  ...composed.overlays
294
246
  ]);
295
247
  const ctx = await boot(NAME, rootConfig, structuredClone(allPatches(composed)), (hostCtx) => {
296
248
  app.current = hostCtx;
297
- hostCtx.provide(DSH_ENVIRONMENT_KEY, options.environment);
249
+ hostCtx.provide(DSH_LAUNCH_ENVIRONMENT_KEY, options.environment);
298
250
  provideCmdline(hostCtx, {
299
251
  args: options.args,
300
252
  exit: (code) => void shutdown.shutdown(code)
@@ -328,4 +280,4 @@ async function runProfile(options) {
328
280
  };
329
281
  }
330
282
  //#endregion
331
- export { resolveTelemetryPatch as a, prepareProfile as i, PROFILE_ROOT_FILENAME as n, runProfile as o, homePatchPath as r, resolveWindowsShellLayer as s, INSTALL_ANCHOR as t };
283
+ export { resolveTelemetryPatch as a, prepareProfile as i, PROFILE_ROOT_FILENAME as n, runProfile as o, homePatchPath as r, 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.0.1-rc.2",
4
+ "version": "0.1.0-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -18,81 +18,84 @@
18
18
  "lib/*.js",
19
19
  "config"
20
20
  ],
21
- "license": "BSD-3-Clause",
21
+ "license": "MIT",
22
22
  "dependencies": {
23
23
  "commander": "^15.0.0",
24
24
  "js-yaml": "^4.2.0",
25
25
  "node-addon-require-builtin": "^0.1.4",
26
- "@deepseek-ai/cordis-plugin-hmr": "^1.0.16-rc.1",
27
- "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1",
28
- "@deepseek-ai/dsh-app-boot": "^0.0.1-rc.2",
29
- "@deepseek-ai/dsh-agent-tool-mode": "^0.0.1-rc.2",
30
- "@deepseek-ai/dsh-base": "^0.0.1-rc.2",
31
- "@deepseek-ai/cordis-plugin-timer": "^1.1.3-rc.1",
32
- "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
33
- "@deepseek-ai/dsh-command-compact": "^0.0.1-rc.2",
34
- "@deepseek-ai/dsh-command-goal": "^0.0.1-rc.2",
35
- "@deepseek-ai/dsh-compact-basic": "^0.0.1-rc.2",
36
- "@deepseek-ai/dsh-goal-session": "^0.0.1-rc.2",
37
- "@deepseek-ai/dsh-cmdline": "^0.0.1-rc.2",
38
- "@deepseek-ai/dsh-compact-tool-result-prune": "^0.0.1-rc.2",
39
- "@deepseek-ai/dsh-goal": "^0.0.1-rc.2",
40
- "@deepseek-ai/dsh-environment": "^0.0.1-rc.2",
41
- "@deepseek-ai/dsh-fs-local": "^0.0.1-rc.2",
42
- "@deepseek-ai/dsh-headless": "^0.0.1-rc.2",
43
- "@deepseek-ai/dsh-mcp-client": "^0.0.1-rc.2",
44
- "@deepseek-ai/dsh-persona": "^0.0.1-rc.2",
45
- "@deepseek-ai/dsh-pty": "^0.0.1-rc.2",
46
- "@deepseek-ai/dsh-plan-mode": "^0.0.1-rc.2",
47
- "@deepseek-ai/dsh-pty-local": "^0.0.1-rc.2",
48
- "@deepseek-ai/dsh-pwsh-local": "^0.0.1-rc.2",
49
- "@deepseek-ai/dsh-pwsh-sandbox": "^0.0.1-rc.2",
50
- "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.2",
51
- "@deepseek-ai/dsh-session-reference": "^0.0.1-rc.2",
52
- "@deepseek-ai/dsh-time-context": "^0.0.1-rc.2",
53
- "@deepseek-ai/dsh-skill": "^0.0.1-rc.2",
54
- "@deepseek-ai/dsh-skill-local": "^0.0.1-rc.2",
55
- "@deepseek-ai/dsh-tasks-local": "^0.0.1-rc.2",
56
- "@deepseek-ai/dsh-tmux-context": "^0.0.1-rc.2",
57
- "@deepseek-ai/dsh-token-meter": "^0.0.1-rc.2",
58
- "@deepseek-ai/dsh-tool-ask-user": "^0.0.1-rc.2",
59
- "@deepseek-ai/dsh-tool-bash": "^0.0.1-rc.2",
60
- "@deepseek-ai/dsh-tool-bash-persistent": "^0.0.1-rc.2",
61
- "@deepseek-ai/dsh-tool-cordis": "^0.0.1-rc.2",
62
- "@deepseek-ai/dsh-tool-fs-search": "^0.0.1-rc.2",
63
- "@deepseek-ai/dsh-tool-pwsh": "^0.0.1-rc.2",
64
- "@deepseek-ai/dsh-tool-goal": "^0.0.1-rc.2",
65
- "@deepseek-ai/dsh-tool-schedule": "^0.0.1-rc.2",
66
- "@deepseek-ai/dsh-tool-ralph": "^0.0.1-rc.2",
67
- "@deepseek-ai/dsh-tool-str-replace-editor": "^0.0.1-rc.2",
68
- "@deepseek-ai/dsh-tool-skill": "^0.0.1-rc.2",
69
- "@deepseek-ai/dsh-paths": "^0.0.1-rc.2",
70
- "@deepseek-ai/dsh-tool-fs": "^0.0.1-rc.2",
71
- "@deepseek-ai/dsh-tool-subagent": "^0.0.1-rc.2",
72
- "@deepseek-ai/dsh-tool-tasks": "^0.0.1-rc.2",
73
- "@deepseek-ai/dsh-tool-web": "^0.0.1-rc.2",
74
- "@deepseek-ai/dsh-tool-workflow": "^0.0.1-rc.2",
75
- "@deepseek-ai/dsh-web-app": "^0.0.1-rc.2",
76
- "@deepseek-ai/dsh-workspace-context": "^0.0.1-rc.2",
77
- "@deepseek-ai/cordis": "^4.0.1-rc.1",
78
- "@deepseek-ai/dsh-tool-todo": "^0.0.1-rc.2",
79
- "@deepseek-ai/dsh-workflow-workerthread": "^0.0.1-rc.2",
80
- "@deepseek-ai/dsh-tool-subagent-control": "^0.0.1-rc.2"
26
+ "@deepseek-ai/cordis-plugin-hmr": "^1.0.16",
27
+ "@deepseek-ai/cordis-plugin-include": "^1.0.6",
28
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.2",
29
+ "@deepseek-ai/cordis-plugin-timer": "^1.1.3",
30
+ "@deepseek-ai/dsh-agent-tool-presentation": "^0.1.0-rc.2",
31
+ "@deepseek-ai/dsh-base": "^0.1.0-rc.2",
32
+ "@deepseek-ai/dsh-cordis-client-runner": "^0.1.0-rc.2",
33
+ "@deepseek-ai/dsh-client-ui-agent-preset": "^0.1.0-rc.2",
34
+ "@deepseek-ai/dsh-client-ui-cordis": "^0.1.0-rc.2",
35
+ "@deepseek-ai/dsh-command-compact": "^0.1.0-rc.2",
36
+ "@deepseek-ai/dsh-command-goal": "^0.1.0-rc.2",
37
+ "@deepseek-ai/dsh-compaction-basic": "^0.1.0-rc.2",
38
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "^0.1.0-rc.2",
39
+ "@deepseek-ai/dsh-goal": "^0.1.0-rc.2",
40
+ "@deepseek-ai/dsh-goal-round-driver": "^0.1.0-rc.2",
41
+ "@deepseek-ai/dsh-cmdline": "^0.1.0-rc.2",
42
+ "@deepseek-ai/dsh-launch-environment": "^0.1.0-rc.2",
43
+ "@deepseek-ai/dsh-fs-local": "^0.1.0-rc.2",
44
+ "@deepseek-ai/dsh-headless": "^0.1.0-rc.2",
45
+ "@deepseek-ai/dsh-mcp-client": "^0.1.0-rc.2",
46
+ "@deepseek-ai/dsh-home-paths": "^0.1.0-rc.2",
47
+ "@deepseek-ai/dsh-persona": "^0.1.0-rc.2",
48
+ "@deepseek-ai/dsh-plan-mode": "^0.1.0-rc.2",
49
+ "@deepseek-ai/dsh-terminal": "^0.1.0-rc.2",
50
+ "@deepseek-ai/dsh-terminal-bash": "^0.1.0-rc.2",
51
+ "@deepseek-ai/dsh-pwsh-local": "^0.1.0-rc.2",
52
+ "@deepseek-ai/dsh-pwsh-sandbox": "^0.1.0-rc.2",
53
+ "@deepseek-ai/dsh-session-projection": "^0.1.0-rc.2",
54
+ "@deepseek-ai/dsh-session-reference": "^0.1.0-rc.2",
55
+ "@deepseek-ai/dsh-time-context": "^0.1.0-rc.2",
56
+ "@deepseek-ai/dsh-skill": "^0.1.0-rc.2",
57
+ "@deepseek-ai/dsh-skill-filesystem": "^0.1.0-rc.2",
58
+ "@deepseek-ai/dsh-jobs-local": "^0.1.0-rc.2",
59
+ "@deepseek-ai/dsh-tmux-context": "^0.1.0-rc.2",
60
+ "@deepseek-ai/dsh-token-meter": "^0.1.0-rc.2",
61
+ "@deepseek-ai/dsh-tool-ask-user": "^0.1.0-rc.2",
62
+ "@deepseek-ai/dsh-tool-bash": "^0.1.0-rc.2",
63
+ "@deepseek-ai/dsh-tool-bash-persistent": "^0.1.0-rc.2",
64
+ "@deepseek-ai/dsh-tool-cordis": "^0.1.0-rc.2",
65
+ "@deepseek-ai/dsh-tool-fs": "^0.1.0-rc.2",
66
+ "@deepseek-ai/dsh-tool-fs-search": "^0.1.0-rc.2",
67
+ "@deepseek-ai/dsh-tool-goal": "^0.1.0-rc.2",
68
+ "@deepseek-ai/dsh-tool-pwsh": "^0.1.0-rc.2",
69
+ "@deepseek-ai/dsh-tool-ralph": "^0.1.0-rc.2",
70
+ "@deepseek-ai/dsh-schedule": "^0.1.0-rc.2",
71
+ "@deepseek-ai/dsh-tool-skill": "^0.1.0-rc.2",
72
+ "@deepseek-ai/dsh-tool-subagent": "^0.1.0-rc.2",
73
+ "@deepseek-ai/dsh-tool-subagent-control": "^0.1.0-rc.2",
74
+ "@deepseek-ai/dsh-tool-jobs": "^0.1.0-rc.2",
75
+ "@deepseek-ai/dsh-tool-todo": "^0.1.0-rc.2",
76
+ "@deepseek-ai/dsh-tool-web": "^0.1.0-rc.2",
77
+ "@deepseek-ai/dsh-tool-workflow": "^0.1.0-rc.2",
78
+ "@deepseek-ai/dsh-web-app": "^0.1.0-rc.2",
79
+ "@deepseek-ai/dsh-workflow-worker-thread": "^0.1.0-rc.2",
80
+ "@deepseek-ai/cordis": "^4.0.1",
81
+ "@deepseek-ai/dsh-agent-instructions": "^0.1.0-rc.2",
82
+ "@deepseek-ai/dsh-tool-str-replace-editor": "^0.1.0-rc.2",
83
+ "@deepseek-ai/dsh-app-boot": "^0.1.0-rc.2"
81
84
  },
82
85
  "devDependencies": {
83
86
  "@types/js-yaml": "^4.0.9",
84
87
  "execa": "^10.0.0",
85
- "@deepseek-ai/dsh-frontend-static": "^0.0.1-rc.2",
86
- "@deepseek-ai/dsh-host-apiproxy": "^0.0.1-rc.2",
87
- "@deepseek-ai/dsh-host-webserver": "^0.0.1-rc.2",
88
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2",
89
- "@deepseek-ai/dsh-llm-mock-server": "^0.0.1-rc.2",
90
- "@deepseek-ai/dsh-loader-smoke": "^0.0.1-rc.2",
91
- "@deepseek-ai/dsh-agent": "^0.0.1-rc.2",
92
- "@deepseek-ai/dsh-settings": "^0.0.1-rc.2",
93
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
94
- "@deepseek-ai/dsh-subagent": "^0.0.1-rc.2",
95
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.2",
96
- "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2"
88
+ "@deepseek-ai/dsh-agent": "^0.1.0-rc.2",
89
+ "@deepseek-ai/dsh-host-frontend-static": "^0.1.0-rc.2",
90
+ "@deepseek-ai/dsh-host-apiproxy": "^0.1.0-rc.2",
91
+ "@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.2",
92
+ "@deepseek-ai/dsh-llm": "^0.1.0-rc.2",
93
+ "@deepseek-ai/dsh-llm-mock-server": "^0.1.0-rc.2",
94
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.2",
95
+ "@deepseek-ai/dsh-settings": "^0.1.0-rc.2",
96
+ "@deepseek-ai/dsh-subagent": "^0.1.0-rc.2",
97
+ "@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.2",
98
+ "@deepseek-ai/dsh-loader-smoke": "^0.1.0-rc.2",
99
+ "@deepseek-ai/dsh-tools": "^0.1.0-rc.2"
97
100
  }
98
101
  }
@@ -1,2 +0,0 @@
1
- import { o as runProfile } from "./profile-boot-D95nr1z0.js";
2
- export { runProfile };