@cofy-x/dsh-console 0.1.0-alpha.7 → 0.1.0-alpha.9

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
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Install
8
8
 
9
- DSH Console requires Node.js 24 or newer and a working DSH provider configuration. This release is verified from the npm-default DeepSeek Harness `0.1.1-rc.2` through the current source release `0.1.2-alpha.1`; install DSH normally without pinning the command to a version.
9
+ DSH Console requires Node.js 24 or newer and a working DSH provider configuration. This release is verified from the npm-default DeepSeek Harness `0.1.1-rc.2` through the current source release `0.1.2-alpha.3`; install DSH normally without pinning the command to a version.
10
10
 
11
11
  ```sh
12
12
  npm install --global @deepseek-ai/dsh @cofy-x/dsh-console
@@ -17,7 +17,7 @@ Public Alpha releases retain prerelease versions while the current published Con
17
17
 
18
18
  ## Use
19
19
 
20
- The launcher initializes or locates the `dsh-console` DSH profile and starts an interactive terminal session. It can continue persisted work before the TUI starts:
20
+ The launcher initializes its owned `dsh-console` DSH profile, aligns the profile package with the launcher version, and starts an interactive terminal session. It can continue persisted work before the TUI starts:
21
21
 
22
22
  ```sh
23
23
  dsh-console --continue
@@ -6,7 +6,7 @@
6
6
  * SPDX-License-Identifier: Apache-2.0
7
7
  */
8
8
 
9
- import { existsSync, readFileSync } from 'node:fs';
9
+ import { existsSync, readFileSync, realpathSync } from 'node:fs';
10
10
  import { homedir } from 'node:os';
11
11
  import { dirname, join } from 'node:path';
12
12
  import { fileURLToPath } from 'node:url';
@@ -16,6 +16,7 @@ const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
16
16
  const manifest = JSON.parse(
17
17
  readFileSync(join(packageRoot, 'package.json'), 'utf8'),
18
18
  );
19
+ const packageName = '@cofy-x/dsh-console';
19
20
  const profile = 'dsh-console';
20
21
  const RESTART_EXIT_CODE = 199;
21
22
  const forwardedArgs = process.argv.slice(2);
@@ -31,16 +32,45 @@ if (forwardedArgs[0] === '--version' || forwardedArgs[0] === '-V') {
31
32
  }
32
33
 
33
34
  const dshHome = process.env.DSH_HOME || join(homedir(), '.dsh');
35
+ const profileRoot = join(dshHome, 'profiles', profile);
36
+ const profileManifest = join(profileRoot, 'package.json');
34
37
  const installedManifest = join(
35
- dshHome,
36
- 'profiles',
37
- profile,
38
+ profileRoot,
38
39
  'node_modules',
39
40
  '@cofy-x',
40
41
  'dsh-console',
41
42
  'package.json',
42
43
  );
43
44
 
45
+ function readJson(path) {
46
+ try {
47
+ return JSON.parse(readFileSync(path, 'utf8'));
48
+ } catch {
49
+ return undefined;
50
+ }
51
+ }
52
+
53
+ function profileNeedsInstall({ explicitPackageSpec, localCheckout }) {
54
+ if (explicitPackageSpec) return true;
55
+
56
+ const installed = readJson(installedManifest);
57
+ if (installed?.name !== packageName || installed.version !== manifest.version)
58
+ return true;
59
+
60
+ if (localCheckout) {
61
+ try {
62
+ return (
63
+ realpathSync(dirname(installedManifest)) !== realpathSync(packageRoot)
64
+ );
65
+ } catch {
66
+ return true;
67
+ }
68
+ }
69
+
70
+ const configured = readJson(profileManifest)?.dependencies?.[packageName];
71
+ return configured !== manifest.version;
72
+ }
73
+
44
74
  function run(command, args) {
45
75
  const result = crossSpawn.sync(command, args, {
46
76
  stdio: 'inherit',
@@ -56,11 +86,13 @@ function run(command, args) {
56
86
  return result.status ?? 1;
57
87
  }
58
88
 
59
- if (!existsSync(installedManifest)) {
60
- const localCheckout = existsSync(join(packageRoot, 'src'));
61
- const packageSpec =
62
- process.env.DSH_CONSOLE_PACKAGE_SPEC ||
63
- (localCheckout ? packageRoot : `@cofy-x/dsh-console@${manifest.version}`);
89
+ const localCheckout = existsSync(join(packageRoot, 'src'));
90
+ const explicitPackageSpec = process.env.DSH_CONSOLE_PACKAGE_SPEC;
91
+ const packageSpec =
92
+ explicitPackageSpec ||
93
+ (localCheckout ? packageRoot : `${packageName}@${manifest.version}`);
94
+
95
+ if (profileNeedsInstall({ explicitPackageSpec, localCheckout })) {
64
96
  const status = run('dsh', [
65
97
  'plugin',
66
98
  '--profile',
@@ -6260,7 +6260,7 @@ import { Box as Box25 } from "ink";
6260
6260
  import { Box as Box21, Text as Text20 } from "ink";
6261
6261
 
6262
6262
  // src/generated/git-commit.ts
6263
- var GIT_COMMIT_INFO = "52d0684";
6263
+ var GIT_COMMIT_INFO = "b9a0ef1";
6264
6264
 
6265
6265
  // src/ui/components/dialogs/about-box.tsx
6266
6266
  import { jsx as jsx27, 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-HNDB6HFI.js";
6
+ } from "../chunk-COK2AX4I.js";
7
7
  import "../chunk-WTD7XY24.js";
8
8
  import "../chunk-4L2DX7CL.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-HNDB6HFI.js";
5
+ } from "./chunk-COK2AX4I.js";
6
6
  import "./chunk-WTD7XY24.js";
7
7
  import "./chunk-4L2DX7CL.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.7",
3
+ "version": "0.1.0-alpha.9",
4
4
  "description": "A TypeScript and React/Ink terminal frontend for DeepSeek Harness.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "compatibility": {
61
61
  "minimum": "0.1.1-rc.2",
62
- "maximumTested": "0.1.2-alpha.1"
62
+ "maximumTested": "0.1.2-alpha.3"
63
63
  }
64
64
  },
65
65
  "dependencies": {
@@ -128,23 +128,23 @@
128
128
  "peerDependencies": {
129
129
  "@deepseek-ai/cordis": ">=4.0.1-rc.1 <5.0.0",
130
130
  "@deepseek-ai/cordis-plugin-loader": ">=1.0.2 <2.0.0",
131
- "@deepseek-ai/dsh-cmdline": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
132
- "@deepseek-ai/dsh-agent": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
133
- "@deepseek-ai/dsh-agent-default-model": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
134
- "@deepseek-ai/dsh-attachment": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
135
- "@deepseek-ai/dsh-commands": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
136
- "@deepseek-ai/dsh-credentials": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
137
- "@deepseek-ai/dsh-llm": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
138
- "@deepseek-ai/dsh-permission-presets": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
139
- "@deepseek-ai/dsh-session": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
140
- "@deepseek-ai/dsh-session-projection": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
141
- "@deepseek-ai/dsh-session-query": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
142
- "@deepseek-ai/dsh-settings": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
143
- "@deepseek-ai/dsh-subagent": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
144
- "@deepseek-ai/dsh-tool-todo": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
145
- "@deepseek-ai/dsh-tools": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
146
- "@deepseek-ai/dsh-user-approval": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
147
- "@deepseek-ai/dsh-user-questions": ">=0.1.1-rc.2 <=0.1.2-alpha.1",
131
+ "@deepseek-ai/dsh-cmdline": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
132
+ "@deepseek-ai/dsh-agent": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
133
+ "@deepseek-ai/dsh-agent-default-model": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
134
+ "@deepseek-ai/dsh-attachment": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
135
+ "@deepseek-ai/dsh-commands": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
136
+ "@deepseek-ai/dsh-credentials": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
137
+ "@deepseek-ai/dsh-llm": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
138
+ "@deepseek-ai/dsh-permission-presets": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
139
+ "@deepseek-ai/dsh-session": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
140
+ "@deepseek-ai/dsh-session-projection": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
141
+ "@deepseek-ai/dsh-session-query": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
142
+ "@deepseek-ai/dsh-settings": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
143
+ "@deepseek-ai/dsh-subagent": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
144
+ "@deepseek-ai/dsh-tool-todo": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
145
+ "@deepseek-ai/dsh-tools": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
146
+ "@deepseek-ai/dsh-user-approval": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
147
+ "@deepseek-ai/dsh-user-questions": ">=0.1.1-rc.2 <=0.1.2-alpha.3",
148
148
  "@deepseek-ai/schemastery": ">=3.18.1 <4.0.0"
149
149
  },
150
150
  "peerDependenciesMeta": {
@@ -211,6 +211,7 @@
211
211
  },
212
212
  "license": "Apache-2.0",
213
213
  "publishConfig": {
214
- "access": "public"
214
+ "access": "public",
215
+ "tag": "latest"
215
216
  }
216
217
  }