@cofy-x/dsh-console 0.1.0-alpha.16 → 0.1.0-alpha.18

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,14 +6,18 @@
6
6
 
7
7
  ## Install
8
8
 
9
- DSH Console requires Node.js 24 or newer, supports DeepSeek Harness `0.1.6-alpha.1`, and needs a working DSH provider configuration. Compatibility is verified against the immutable Harness release commit; install DSH normally without pinning the command to a version.
9
+ DSH Console requires Node.js 24 or newer, supports DeepSeek Harness `0.1.7-rc.1` through the maximum tested version `0.1.7-rc.1`, and needs a working DSH provider configuration. Console follows audited DSH releases; the compatible prerelease can differ from npm `latest`, so install the exact audited pair:
10
+
11
+ Plugin admission on newer releases is still governed by DSH compatibility checks; Console never grants version exemptions or bypasses Host restrictions.
10
12
 
11
13
  ```sh
12
- npm install --global @deepseek-ai/dsh @cofy-x/dsh-console
14
+ npm install --global @deepseek-ai/dsh@0.1.7-rc.1 @cofy-x/dsh-console@0.1.0-alpha.18
13
15
  dsh-console --prompt "hello"
14
16
  ```
15
17
 
16
- Public Alpha releases retain prerelease versions while the current published Console remains available through npm's default install path.
18
+ The launcher resolves the actual `dsh` executable on `PATH` and validates its version before changing the Console profile. Check it with `dsh --version` and `command -v dsh` on macOS/Linux, `(Get-Command dsh).Source` in PowerShell, or `where dsh` in Command Prompt. Older DSH releases are blocked with the exact repair command; newer unaudited releases receive a non-blocking warning.
19
+
20
+ Public Alpha releases retain prerelease versions while the current published Console remains available through npm's default install path. The published launcher reconciles its package into the DSH profile; `pnpm start` from a source checkout resolves that checkout and is a separate development path.
17
21
 
18
22
  ## Use
19
23
 
@@ -1,5 +1,21 @@
1
1
  # Third-Party Notices
2
2
 
3
+ ## DeepSeek Harness preset resources
4
+
5
+ The generated `dist/presets/*.patch.yml` files are copied unchanged from the public exports of the audited `@deepseek-ai/dsh-web-app` package. Their license follows.
6
+
7
+ MIT License
8
+
9
+ Copyright (c) 2026 DeepSeek
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+
17
+ ## Other dependencies
18
+
3
19
  DSH Console retains and adapts portions of the terminal UI and supporting
4
20
  utilities from [Gemini CLI](https://github.com/google-gemini/gemini-cli),
5
21
  Copyright 2025 Google LLC, licensed under Apache-2.0. Files derived from that
@@ -9,37 +25,37 @@ original work are Copyright cofy-x.
9
25
  The npm package keeps third-party runtime packages external. They are resolved
10
26
  by the package manager and retain their own license files and notices.
11
27
 
12
- | Dependency | License |
13
- | --- | --- |
14
- | `@deepseek-ai/dsh-cmdline` | MIT |
15
- | `@deepseek-ai/schemastery` | MIT |
16
- | `@xterm/headless` | MIT |
17
- | `ansi-escapes` | MIT |
18
- | `ansi-regex` | MIT |
19
- | `chalk` | MIT |
20
- | `chardet` | MIT |
21
- | `clipboardy` | MIT |
22
- | `commander` | MIT |
23
- | `comment-json` | MIT |
24
- | `diff` | BSD-3-Clause |
25
- | `dotenv` | BSD-2-Clause |
26
- | `fdir` | MIT |
27
- | `fzf` | BSD-3-Clause |
28
- | `ignore` | MIT |
29
- | `ink` (`@jrichman/ink`) | MIT |
30
- | `ink-gradient` | MIT |
31
- | `ink-spinner` | MIT |
32
- | `lowlight` | MIT |
33
- | `mnemonist` | MIT |
34
- | `picomatch` | MIT |
35
- | `react` | MIT |
36
- | `string-width` | MIT |
37
- | `strip-ansi` | MIT |
38
- | `strip-json-comments` | MIT |
39
- | `tinygradient` | MIT |
40
- | `undici` | MIT |
41
- | `yargs` | MIT |
42
- | `zod` | MIT |
28
+ | Dependency | License |
29
+ | -------------------------- | ------------ |
30
+ | `@deepseek-ai/dsh-cmdline` | MIT |
31
+ | `@deepseek-ai/schemastery` | MIT |
32
+ | `@xterm/headless` | MIT |
33
+ | `ansi-escapes` | MIT |
34
+ | `ansi-regex` | MIT |
35
+ | `chalk` | MIT |
36
+ | `chardet` | MIT |
37
+ | `clipboardy` | MIT |
38
+ | `commander` | MIT |
39
+ | `comment-json` | MIT |
40
+ | `diff` | BSD-3-Clause |
41
+ | `dotenv` | BSD-2-Clause |
42
+ | `fdir` | MIT |
43
+ | `fzf` | BSD-3-Clause |
44
+ | `ignore` | MIT |
45
+ | `ink` (`@jrichman/ink`) | MIT |
46
+ | `ink-gradient` | MIT |
47
+ | `ink-spinner` | MIT |
48
+ | `lowlight` | MIT |
49
+ | `mnemonist` | MIT |
50
+ | `picomatch` | MIT |
51
+ | `react` | MIT |
52
+ | `string-width` | MIT |
53
+ | `strip-ansi` | MIT |
54
+ | `strip-json-comments` | MIT |
55
+ | `tinygradient` | MIT |
56
+ | `undici` | MIT |
57
+ | `yargs` | MIT |
58
+ | `zod` | MIT |
43
59
 
44
60
  DeepSeek Harness services are supplied by the active DSH profile through the
45
61
  optional peer dependencies declared in `@cofy-x/dsh-console`. Those packages
@@ -6,11 +6,19 @@
6
6
  * SPDX-License-Identifier: Apache-2.0
7
7
  */
8
8
 
9
- import { existsSync, readFileSync, realpathSync } from 'node:fs';
9
+ import {
10
+ accessSync,
11
+ constants,
12
+ existsSync,
13
+ readFileSync,
14
+ realpathSync,
15
+ statSync,
16
+ } from 'node:fs';
10
17
  import { homedir } from 'node:os';
11
- import { dirname, join } from 'node:path';
18
+ import { delimiter, dirname, join, resolve } from 'node:path';
12
19
  import { fileURLToPath } from 'node:url';
13
20
  import crossSpawn from 'cross-spawn';
21
+ import semver from 'semver';
14
22
 
15
23
  const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
16
24
  const manifest = JSON.parse(
@@ -20,6 +28,7 @@ const packageName = '@cofy-x/dsh-console';
20
28
  const profile = 'dsh-console';
21
29
  const RESTART_EXIT_CODE = 199;
22
30
  const forwardedArgs = process.argv.slice(2);
31
+ const compatibility = manifest.dsh?.compatibility;
23
32
 
24
33
  // Package managers preserve the conventional argument separator when running
25
34
  // scripts. It separates package-manager options and is not part of the CLI's
@@ -31,6 +40,131 @@ if (forwardedArgs[0] === '--version' || forwardedArgs[0] === '-V') {
31
40
  process.exit(0);
32
41
  }
33
42
 
43
+ function fail(lines) {
44
+ process.stderr.write(`${lines.join('\n')}\n`);
45
+ process.exit(1);
46
+ }
47
+
48
+ const minimumDshVersion = semver.valid(compatibility?.minimum);
49
+ const maximumTestedDshVersion = semver.valid(compatibility?.maximumTested);
50
+ if (
51
+ !minimumDshVersion ||
52
+ !maximumTestedDshVersion ||
53
+ semver.gt(minimumDshVersion, maximumTestedDshVersion)
54
+ ) {
55
+ fail(['dsh-console: invalid DSH compatibility metadata in package.json.']);
56
+ }
57
+
58
+ const installDshCommand = `npm install --global @deepseek-ai/dsh@${minimumDshVersion}`;
59
+
60
+ function environmentValue(name) {
61
+ const entry = Object.entries(process.env).find(
62
+ ([key]) => key.toLowerCase() === name.toLowerCase(),
63
+ );
64
+ return entry?.[1];
65
+ }
66
+
67
+ function resolveDshExecutable() {
68
+ const searchPath = environmentValue('PATH');
69
+ if (!searchPath) return undefined;
70
+
71
+ const names = ['dsh'];
72
+ if (process.platform === 'win32') {
73
+ const extensions = (environmentValue('PATHEXT') || '.COM;.EXE;.BAT;.CMD')
74
+ .split(delimiter)
75
+ .filter(Boolean);
76
+ names.push(...extensions.map((extension) => `dsh${extension}`));
77
+ }
78
+
79
+ let inaccessible;
80
+ for (const directory of searchPath.split(delimiter)) {
81
+ const root = resolve(directory || process.cwd());
82
+ for (const name of names) {
83
+ const candidate = join(root, name);
84
+ try {
85
+ if (!statSync(candidate).isFile()) continue;
86
+ if (process.platform !== 'win32') accessSync(candidate, constants.X_OK);
87
+ return candidate;
88
+ } catch (error) {
89
+ if (existsSync(candidate) && error?.code === 'EACCES') {
90
+ inaccessible ||= candidate;
91
+ }
92
+ }
93
+ }
94
+ }
95
+ return inaccessible;
96
+ }
97
+
98
+ function parseDshVersion(output) {
99
+ const match = output.match(
100
+ /(?:^|[^0-9A-Za-z-])v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?)(?=$|[^0-9A-Za-z-])/,
101
+ );
102
+ return match ? semver.valid(match[1]) : null;
103
+ }
104
+
105
+ function remediation(executable = 'not found on PATH') {
106
+ return [
107
+ `DSH executable: ${executable}`,
108
+ `Minimum supported version: ${minimumDshVersion}`,
109
+ `Install the compatible release: ${installDshCommand}`,
110
+ 'Then verify: dsh --version',
111
+ ];
112
+ }
113
+
114
+ const dshExecutable = resolveDshExecutable();
115
+ if (!dshExecutable) {
116
+ fail([
117
+ 'dsh-console: DeepSeek Harness is required but dsh was not found.',
118
+ ...remediation(),
119
+ ]);
120
+ }
121
+
122
+ const versionResult = crossSpawn.sync(dshExecutable, ['--version'], {
123
+ encoding: 'utf8',
124
+ env: process.env,
125
+ stdio: ['ignore', 'pipe', 'pipe'],
126
+ });
127
+ if (versionResult.error) {
128
+ fail([
129
+ 'dsh-console: unable to execute DeepSeek Harness.',
130
+ ...remediation(dshExecutable),
131
+ `Reason: ${versionResult.error.message}`,
132
+ ]);
133
+ }
134
+ if (versionResult.signal || versionResult.status !== 0) {
135
+ fail([
136
+ 'dsh-console: dsh --version did not complete successfully.',
137
+ ...remediation(dshExecutable),
138
+ `Exit: ${versionResult.signal || String(versionResult.status)}`,
139
+ ]);
140
+ }
141
+
142
+ const versionOutput = `${versionResult.stdout || ''}\n${versionResult.stderr || ''}`;
143
+ const detectedDshVersion = parseDshVersion(versionOutput);
144
+ if (!detectedDshVersion) {
145
+ const summary = versionOutput.trim().replace(/\s+/g, ' ').slice(0, 160);
146
+ fail([
147
+ 'dsh-console: dsh --version returned an unrecognized version.',
148
+ ...remediation(dshExecutable),
149
+ `Output: ${summary ? JSON.stringify(summary) : '(empty)'}`,
150
+ ]);
151
+ }
152
+ if (semver.lt(detectedDshVersion, minimumDshVersion)) {
153
+ fail([
154
+ 'dsh-console: the selected DeepSeek Harness release is too old.',
155
+ `DSH executable: ${dshExecutable}`,
156
+ `Detected version: ${detectedDshVersion}`,
157
+ `Minimum supported version: ${minimumDshVersion}`,
158
+ `Install the compatible release: ${installDshCommand}`,
159
+ 'Then verify: dsh --version',
160
+ ]);
161
+ }
162
+ if (semver.gt(detectedDshVersion, maximumTestedDshVersion)) {
163
+ process.stderr.write(
164
+ `dsh-console: warning: DSH ${detectedDshVersion} at ${dshExecutable} is newer than the maximum tested version ${maximumTestedDshVersion}; continuing without a formal compatibility guarantee.\n`,
165
+ );
166
+ }
167
+
34
168
  const dshHome = process.env.DSH_HOME || join(homedir(), '.dsh');
35
169
  const profileRoot = join(dshHome, 'profiles', profile);
36
170
  const profileManifest = join(profileRoot, 'package.json');
@@ -93,7 +227,7 @@ const packageSpec =
93
227
  (localCheckout ? packageRoot : `${packageName}@${manifest.version}`);
94
228
 
95
229
  if (profileNeedsInstall({ explicitPackageSpec, localCheckout })) {
96
- const status = run('dsh', [
230
+ const status = run(dshExecutable, [
97
231
  'plugin',
98
232
  '--profile',
99
233
  profile,
@@ -105,6 +239,6 @@ if (profileNeedsInstall({ explicitPackageSpec, localCheckout })) {
105
239
 
106
240
  let status;
107
241
  do {
108
- status = run('dsh', ['--profile', profile, ...forwardedArgs]);
242
+ status = run(dshExecutable, ['--profile', profile, ...forwardedArgs]);
109
243
  } while (status === RESTART_EXIT_CODE);
110
244
  process.exit(status);
package/cordis.patch.yml CHANGED
@@ -17,8 +17,8 @@
17
17
 
18
18
  # Console owns a per-Session Agent composition, including its scoped Skills.
19
19
  # dsh-base does not mount the preset roster, so the Console bundle must.
20
- - id: agent-presets
21
- name: '@deepseek-ai/dsh-agent-presets'
20
+ - id: agent-preset-registry
21
+ name: '@deepseek-ai/dsh-agent-preset-registry'
22
22
  config:
23
23
  default: standard
24
24
 
package/dist/CHANGELOG.md CHANGED
@@ -6,6 +6,30 @@ 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.18] - 2026-09-24
10
+
11
+ ### Changed
12
+
13
+ - Advance the audited DeepSeek Harness baseline to `0.1.7-rc.1` at immutable release commit `a60af51e809d008d89af3ade60ee107547b175bf`.
14
+ - Use the public declarative Agent preset registry and package the exported Harness preset resources unchanged, preserving Host-owned selection and composition policy.
15
+ - Consume Session format 4 tool-role results and header-only projection-cache reads through public DSH APIs; persistence and historical migration remain Harness-owned.
16
+ - Follow the Session-ID-based Job registry and its public lifecycle event stream without consuming model-owned output.
17
+
18
+ ### Fixed
19
+
20
+ - Recheck live Harness preset policy before selection and deferred Session creation, cancel closed picker requests, reject cross-Session selection races, and verify exported preset resources in the installed package rather than only the build directory.
21
+
22
+ ## [0.1.0-alpha.17] - 2026-09-18
23
+
24
+ ### Added
25
+
26
+ - Validate the exact `dsh` executable selected from `PATH` against package compatibility metadata before profile changes, with actionable missing, old, invalid, and failed-version diagnostics plus a non-blocking warning for newer unaudited releases.
27
+
28
+ ### Changed
29
+
30
+ - Pin installation documentation to the audited DSH and Console prerelease pair and mechanically check those examples against the public package manifest.
31
+ - Advance the audited DeepSeek Harness baseline to `0.1.6-alpha.2` at immutable release commit `6b1808f432adfa96ab6c2f033e158ca230422e16`, retaining Host ownership of model modality, Plan review identity, and Subagent capacity policy.
32
+
9
33
  ## [0.1.0-alpha.16] - 2026-09-15
10
34
 
11
35
  ### Changed
@@ -199,7 +223,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
199
223
  - Keep debug diagnostics aligned within the existing footer row and preserve structured logs in the debug console.
200
224
  - Address initial CodeQL findings, dependency advisories, CI concurrency issues, and release build ordering.
201
225
 
202
- [Unreleased]: https://github.com/cofy-x/dsh-console/compare/v0.1.0-alpha.16...HEAD
226
+ [Unreleased]: https://github.com/cofy-x/dsh-console/compare/v0.1.0-alpha.18...HEAD
227
+ [0.1.0-alpha.18]: https://github.com/cofy-x/dsh-console/compare/v0.1.0-alpha.17...v0.1.0-alpha.18
228
+ [0.1.0-alpha.17]: https://github.com/cofy-x/dsh-console/compare/v0.1.0-alpha.16...v0.1.0-alpha.17
203
229
  [0.1.0-alpha.16]: https://github.com/cofy-x/dsh-console/compare/v0.1.0-alpha.15...v0.1.0-alpha.16
204
230
  [0.1.0-alpha.15]: https://github.com/cofy-x/dsh-console/compare/v0.1.0-alpha.14...v0.1.0-alpha.15
205
231
  [0.1.0-alpha.14]: https://github.com/cofy-x/dsh-console/compare/v0.1.0-alpha.13...v0.1.0-alpha.14