@cofy-x/dsh-console 0.1.0-alpha.20 → 0.1.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@ DSH Console requires Node.js 24 or newer, supports DeepSeek Harness `0.2.0-rc.2`
11
11
  Plugin admission on newer releases is still governed by DSH compatibility checks; Console never grants version exemptions or bypasses Host restrictions.
12
12
 
13
13
  ```sh
14
- npm install --global @deepseek-ai/dsh@0.2.0-rc.2 @cofy-x/dsh-console@0.1.0-alpha.20
14
+ npm install --global @deepseek-ai/dsh@0.2.0-rc.2 @cofy-x/dsh-console@0.1.0-alpha.21
15
15
  dsh-console --prompt "hello"
16
16
  ```
17
17
 
@@ -50,4 +50,8 @@ In `/sessions`, press `/` to search and Enter to preview a Session. Forking offe
50
50
 
51
51
  Full-text search opens a DSH-managed, rebuildable SQLite index under `DSH_HOME` on the first search, not at startup. Session logs remain the durable source of truth. A user profile that explicitly disables the DSH search provider keeps that override.
52
52
 
53
+ ## Existing DSH profiles
54
+
55
+ The launcher defaults to its managed `dsh-console` profile. Select an existing DSH profile with `dsh-console --profile my-profile --prompt "hello"`, or set `DSH_CONSOLE_PROFILE=my-profile` as an environment default; the explicit option wins. Create the profile through DSH first (`dsh plugin --profile my-profile add @cofy-x/dsh-console@0.1.0-alpha.21` requires `pnpm` on `PATH`). Console reconciles only its own bundle, then forwards remaining arguments to DSH. DSH owns provider, credential, package, and patch configuration. Profiles under one `DSH_HOME` share Sessions, credentials, settings, and attachments; use another `DSH_HOME` for isolation. A missing or invalid selected profile fails without falling back.
56
+
53
57
  See the [GitHub repository](https://github.com/cofy-x/dsh-console) for source development, architecture, alpha boundaries, and license attribution details.
@@ -25,7 +25,7 @@ const manifest = JSON.parse(
25
25
  readFileSync(join(packageRoot, 'package.json'), 'utf8'),
26
26
  );
27
27
  const packageName = '@cofy-x/dsh-console';
28
- const profile = 'dsh-console';
28
+ const defaultProfile = 'dsh-console';
29
29
  const RESTART_EXIT_CODE = 199;
30
30
  const forwardedArgs = process.argv.slice(2);
31
31
  const compatibility = manifest.dsh?.compatibility;
@@ -35,6 +35,26 @@ const compatibility = manifest.dsh?.compatibility;
35
35
  // argument surface.
36
36
  if (forwardedArgs[0] === '--') forwardedArgs.shift();
37
37
 
38
+ let cliProfile;
39
+ let hasCliProfile = false;
40
+ if (forwardedArgs[0] === '--profile') {
41
+ hasCliProfile = true;
42
+ forwardedArgs.shift();
43
+ cliProfile = forwardedArgs.shift();
44
+ } else if (forwardedArgs[0]?.startsWith('--profile=')) {
45
+ hasCliProfile = true;
46
+ cliProfile = forwardedArgs.shift().slice('--profile='.length);
47
+ }
48
+ if (hasCliProfile && (!cliProfile || cliProfile.startsWith('-'))) {
49
+ fail(['dsh-console: --profile requires a DSH profile name.']);
50
+ }
51
+ if (
52
+ forwardedArgs[0] === '--profile' ||
53
+ forwardedArgs[0]?.startsWith('--profile=')
54
+ ) {
55
+ fail(['dsh-console: select a DSH profile only once.']);
56
+ }
57
+
38
58
  if (forwardedArgs[0] === '--version' || forwardedArgs[0] === '-V') {
39
59
  process.stdout.write(`${manifest.version}\n`);
40
60
  process.exit(0);
@@ -45,6 +65,24 @@ function fail(lines) {
45
65
  process.exit(1);
46
66
  }
47
67
 
68
+ const profile = hasCliProfile
69
+ ? cliProfile
70
+ : process.env.DSH_CONSOLE_PROFILE || defaultProfile;
71
+ if (
72
+ profile === '.' ||
73
+ profile === '..' ||
74
+ profile === 'node_modules' ||
75
+ profile.includes('/') ||
76
+ profile.includes('\\')
77
+ ) {
78
+ fail([`dsh-console: invalid DSH profile name ${JSON.stringify(profile)}.`]);
79
+ }
80
+ if (profile.toLowerCase() === 'desktop') {
81
+ fail([
82
+ 'dsh-console: the desktop profile is managed by DeepSeek Harness Desktop.',
83
+ ]);
84
+ }
85
+
48
86
  const minimumDshVersion = semver.valid(compatibility?.minimum);
49
87
  const maximumTestedDshVersion = semver.valid(compatibility?.maximumTested);
50
88
  if (
@@ -175,6 +213,13 @@ const installedManifest = join(
175
213
  'dsh-console',
176
214
  'package.json',
177
215
  );
216
+ if (profile !== defaultProfile && !existsSync(profileManifest)) {
217
+ fail([
218
+ `dsh-console: DSH profile ${JSON.stringify(profile)} does not exist.`,
219
+ `Create it first with: dsh plugin --profile ${JSON.stringify(profile)} add <package>`,
220
+ `Profile directory: ${profileRoot}`,
221
+ ]);
222
+ }
178
223
 
179
224
  function readJson(path) {
180
225
  try {
@@ -226,7 +271,36 @@ const packageSpec =
226
271
  explicitPackageSpec ||
227
272
  (localCheckout ? packageRoot : `${packageName}@${manifest.version}`);
228
273
 
229
- if (profileNeedsInstall({ explicitPackageSpec, localCheckout })) {
274
+ const needsInstall = profileNeedsInstall({
275
+ explicitPackageSpec,
276
+ localCheckout,
277
+ });
278
+ if (needsInstall && profile !== defaultProfile) {
279
+ // Ask DSH to validate the existing bundle stack before package mutation.
280
+ // Its default dump does not boot the app or parse the user patch.
281
+ const inspection = crossSpawn.sync(
282
+ dshExecutable,
283
+ ['--profile', profile, '--dump-default-config'],
284
+ {
285
+ encoding: 'utf8',
286
+ env: process.env,
287
+ stdio: ['ignore', 'ignore', 'pipe'],
288
+ },
289
+ );
290
+ if (inspection.error || inspection.signal || inspection.status !== 0) {
291
+ const reason =
292
+ inspection.error?.message ||
293
+ inspection.stderr?.trim().slice(0, 500) ||
294
+ inspection.signal ||
295
+ `exit ${String(inspection.status)}`;
296
+ fail([
297
+ `dsh-console: DSH profile ${JSON.stringify(profile)} could not be loaded; no Console package was installed.`,
298
+ `Reason: ${reason}`,
299
+ ]);
300
+ }
301
+ }
302
+
303
+ if (needsInstall) {
230
304
  const status = run(dshExecutable, [
231
305
  'plugin',
232
306
  '--profile',
package/dist/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.0-alpha.21] - 2026-10-02
10
+
11
+ ### Added
12
+
13
+ - Select an existing DSH profile with `--profile` or `DSH_CONSOLE_PROFILE`, while keeping the managed `dsh-console` profile as the default.
14
+
15
+ ### Changed
16
+
17
+ - Reconcile only the Console bundle through DSH's public plugin manager in the selected profile; preserve its other bundles and user patch.
18
+
9
19
  ## [0.1.0-alpha.20] - 2026-10-02
10
20
 
11
21
  ### Changed
@@ -6426,7 +6426,7 @@ import { Box as Box25 } from "ink";
6426
6426
  import { Box as Box21, Text as Text21 } from "ink";
6427
6427
 
6428
6428
  // src/generated/git-commit.ts
6429
- var GIT_COMMIT_INFO = "140fffc";
6429
+ var GIT_COMMIT_INFO = "0a8885c";
6430
6430
 
6431
6431
  // src/ui/components/dialogs/about-box.tsx
6432
6432
  import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
package/dist/dsh/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  apply,
4
4
  inject,
5
5
  name
6
- } from "../chunk-XJWMFEIM.js";
6
+ } from "../chunk-23HFFDMB.js";
7
7
  import "../chunk-WTD7XY24.js";
8
8
  import "../chunk-GNENCGXA.js";
9
9
  export {
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  Config,
3
3
  apply,
4
4
  name
5
- } from "./chunk-XJWMFEIM.js";
5
+ } from "./chunk-23HFFDMB.js";
6
6
  import "./chunk-WTD7XY24.js";
7
7
  import "./chunk-GNENCGXA.js";
8
8
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofy-x/dsh-console",
3
- "version": "0.1.0-alpha.20",
3
+ "version": "0.1.0-alpha.21",
4
4
  "description": "DSH-native terminal workbench (TUI) for DeepSeek Harness with durable sessions, structured tools, plans, subagents, and rotating Pokémon startup art.",
5
5
  "repository": {
6
6
  "type": "git",