ds-harness-remote 0.4.23 → 0.4.25
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 +4 -4
- package/dist/harness-version.d.ts +9 -2
- package/dist/harness-version.d.ts.map +1 -1
- package/dist/harness-version.js +34 -11
- package/dist/harness-version.js.map +1 -1
- package/dist/index.js +19 -7
- package/dist/index.js.map +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dsh-plugin.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Continue DeepSeek Harness sessions and experimental Codex workspaces from anothe
|
|
|
19
19
|
Add the current package version to the `web` profile, then restart Harness:
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
dsh plugin --profile web add -w ds-harness-remote@0.4.
|
|
22
|
+
dsh plugin --profile web add -w ds-harness-remote@0.4.25
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
### dsh-TUI Host
|
|
@@ -27,7 +27,7 @@ dsh plugin --profile web add -w ds-harness-remote@0.4.23
|
|
|
27
27
|
Remote can also run as a Host in a terminal-only [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI) profile:
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
dsh plugin --profile dsh-tui add -w ds-harness-remote@0.4.
|
|
30
|
+
dsh plugin --profile dsh-tui add -w ds-harness-remote@0.4.25
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
After starting dsh-TUI, manage Remote with `/remote`, `/remote login`, `/remote status`, and `/remote logout`.
|
|
@@ -44,13 +44,13 @@ After starting dsh-TUI, manage Remote with `/remote`, `/remote login`, `/remote
|
|
|
44
44
|
|
|
45
45
|
## Compatibility
|
|
46
46
|
|
|
47
|
-
Plugin `0.4.
|
|
47
|
+
Plugin `0.4.25` targets DeepSeek Harness `dsh-v0.2.0-rc.1` and retains `dsh-v0.1.7-rc.1` compatibility; it also supports `dsh-v0.1.6-alpha.2` and earlier settings hosts. It supports:
|
|
48
48
|
|
|
49
49
|
- `dsh-v0.1.1-rc.2` through the official legacy `ApiProxy`;
|
|
50
50
|
- `dsh-v0.1.2-alpha.1` through `dsh-v0.1.2-rc.1` through the official Typert Remote Gateway;
|
|
51
51
|
- `dsh-v0.1.5-rc.1`, `dsh-v0.1.6-alpha.1`, and `dsh-v0.2.0-rc.1` Session V3 through the official Typert Remote Gateway.
|
|
52
52
|
|
|
53
|
-
The same package feature-detects the older settings registry and the `0.1.7-rc.1` and `0.2.0-rc.1` Volatile settings entry. Remote Web/Desktop and Android normalize released sessions that still report the retired `code` agent preset to `ptc`.
|
|
53
|
+
The same package feature-detects the older settings registry and the `0.1.7-rc.1` and `0.2.0-rc.1` Volatile settings entry. Remote Web/Desktop and Android normalize released sessions that still report the retired `code` agent preset to `ptc`. The Host reads the running Harness version from the CLI entrypoint, or from the 0.2.0 Desktop shell's `@deepseek-ai/dsh-desktop-host` entrypoint when the Harness CLI package is only a sibling of that entrypoint inside `app.asar`.
|
|
54
54
|
|
|
55
55
|
## Self-hosted Server
|
|
56
56
|
|
|
@@ -9,8 +9,15 @@ export declare function selectHarnessVersion(reportedVersion: string | undefined
|
|
|
9
9
|
export declare function harnessSessionGeneration(version: string | undefined): HarnessSessionGeneration;
|
|
10
10
|
/**
|
|
11
11
|
* Compatibility fallback for Harness builds whose host.describe still returns
|
|
12
|
-
* the historical 0.0.1 placeholder.
|
|
13
|
-
*
|
|
12
|
+
* the historical 0.0.1 placeholder.
|
|
13
|
+
*
|
|
14
|
+
* Both supported entrypoint layouts must be covered. A CLI/dsh-TUI entrypoint
|
|
15
|
+
* sits below the @deepseek-ai/dsh package root, so only its ancestor chain is
|
|
16
|
+
* worth walking. The 0.2.0 Desktop shell instead launches its own
|
|
17
|
+
* `@deepseek-ai/dsh-desktop-host` entrypoint from inside `app.asar`, where the
|
|
18
|
+
* ancestors carry only the desktop shell and runtime manifests while the
|
|
19
|
+
* Harness CLI package is a sibling; resolve that package through the
|
|
20
|
+
* entrypoint's module scope.
|
|
14
21
|
*/
|
|
15
22
|
export declare function readHarnessDistributionVersion(entrypoint?: string | undefined): Promise<string | undefined>;
|
|
16
23
|
//# sourceMappingURL=harness-version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-version.d.ts","sourceRoot":"","sources":["../src/harness-version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harness-version.d.ts","sourceRoot":"","sources":["../src/harness-version.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,wBAAwB,GAAG,QAAQ,GAAG,IAAI,CAAA;AAEtD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAK1E;AAED,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GACtC,MAAM,GAAG,SAAS,CAGpB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,wBAAwB,CAS9F;AAcD;;;;;;;;;;;GAWG;AACH,wBAAsB,8BAA8B,CAClD,UAAU,GAAE,MAAM,GAAG,SAA2B,GAC/C,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAgB7B"}
|
package/dist/harness-version.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
2
3
|
import { dirname, isAbsolute, join } from 'node:path';
|
|
3
4
|
const LEGACY_PLACEHOLDER_VERSION = '0.0.1';
|
|
5
|
+
const HARNESS_PACKAGE_NAME = '@deepseek-ai/dsh';
|
|
4
6
|
export function normalizeHarnessVersion(value) {
|
|
5
7
|
if (typeof value !== 'string')
|
|
6
8
|
return undefined;
|
|
@@ -31,29 +33,50 @@ export function harnessSessionGeneration(version) {
|
|
|
31
33
|
// 0.2.0 retains the existing Remote carrier; its on-disk format is unrelated.
|
|
32
34
|
return major === 0 && ((minor === 1 && patch >= 5) || minor === 2) ? 'v3' : 'legacy';
|
|
33
35
|
}
|
|
36
|
+
/** Read a candidate manifest, ignoring every package that is not the Harness CLI. */
|
|
37
|
+
async function readHarnessManifestVersion(manifestPath) {
|
|
38
|
+
try {
|
|
39
|
+
const manifest = JSON.parse(await readFile(manifestPath, 'utf8'));
|
|
40
|
+
if (manifest.name !== HARNESS_PACKAGE_NAME)
|
|
41
|
+
return undefined;
|
|
42
|
+
return normalizeHarnessVersion(manifest.version);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Missing or malformed manifests simply mean this candidate does not hold the Harness package.
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
34
49
|
/**
|
|
35
50
|
* Compatibility fallback for Harness builds whose host.describe still returns
|
|
36
|
-
* the historical 0.0.1 placeholder.
|
|
37
|
-
*
|
|
51
|
+
* the historical 0.0.1 placeholder.
|
|
52
|
+
*
|
|
53
|
+
* Both supported entrypoint layouts must be covered. A CLI/dsh-TUI entrypoint
|
|
54
|
+
* sits below the @deepseek-ai/dsh package root, so only its ancestor chain is
|
|
55
|
+
* worth walking. The 0.2.0 Desktop shell instead launches its own
|
|
56
|
+
* `@deepseek-ai/dsh-desktop-host` entrypoint from inside `app.asar`, where the
|
|
57
|
+
* ancestors carry only the desktop shell and runtime manifests while the
|
|
58
|
+
* Harness CLI package is a sibling; resolve that package through the
|
|
59
|
+
* entrypoint's module scope.
|
|
38
60
|
*/
|
|
39
61
|
export async function readHarnessDistributionVersion(entrypoint = process.argv[1]) {
|
|
40
62
|
if (entrypoint === undefined || !isAbsolute(entrypoint))
|
|
41
63
|
return undefined;
|
|
42
64
|
let directory = dirname(entrypoint);
|
|
43
65
|
for (let depth = 0; depth < 8; depth += 1) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return normalizeHarnessVersion(manifest.version);
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
// Most ancestors do not contain a package manifest.
|
|
51
|
-
}
|
|
66
|
+
const version = await readHarnessManifestVersion(join(directory, 'package.json'));
|
|
67
|
+
if (version !== undefined)
|
|
68
|
+
return version;
|
|
52
69
|
const parent = dirname(directory);
|
|
53
70
|
if (parent === directory)
|
|
54
71
|
break;
|
|
55
72
|
directory = parent;
|
|
56
73
|
}
|
|
57
|
-
|
|
74
|
+
try {
|
|
75
|
+
return await readHarnessManifestVersion(createRequire(entrypoint).resolve(`${HARNESS_PACKAGE_NAME}/package.json`));
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
// The entrypoint may not be a module path that can reach the Harness CLI package.
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
58
81
|
}
|
|
59
82
|
//# sourceMappingURL=harness-version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-version.js","sourceRoot":"","sources":["../src/harness-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErD,MAAM,0BAA0B,GAAG,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"harness-version.js","sourceRoot":"","sources":["../src/harness-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErD,MAAM,0BAA0B,GAAG,OAAO,CAAA;AAC1C,MAAM,oBAAoB,GAAG,kBAAkB,CAAA;AAI/C,MAAM,UAAU,uBAAuB,CAAC,KAAc;IACpD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAA;IAC/C,MAA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739
|
import { readFile } from "node:fs/promises";
|
|
14740
|
+
import { createRequire } from "node:module";
|
|
14740
14741
|
import { dirname, isAbsolute, join } from "node:path";
|
|
14741
14742
|
var LEGACY_PLACEHOLDER_VERSION = "0.0.1";
|
|
14743
|
+
var HARNESS_PACKAGE_NAME = "@deepseek-ai/dsh";
|
|
14742
14744
|
function normalizeHarnessVersion(value) {
|
|
14743
14745
|
if (typeof value !== "string") return void 0;
|
|
14744
14746
|
const version = value.trim();
|
|
@@ -14758,20 +14760,30 @@ function harnessSessionGeneration(version) {
|
|
|
14758
14760
|
const patch = Number(match[3]);
|
|
14759
14761
|
return major === 0 && (minor === 1 && patch >= 5 || minor === 2) ? "v3" : "legacy";
|
|
14760
14762
|
}
|
|
14763
|
+
async function readHarnessManifestVersion(manifestPath) {
|
|
14764
|
+
try {
|
|
14765
|
+
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
14766
|
+
if (manifest.name !== HARNESS_PACKAGE_NAME) return void 0;
|
|
14767
|
+
return normalizeHarnessVersion(manifest.version);
|
|
14768
|
+
} catch {
|
|
14769
|
+
return void 0;
|
|
14770
|
+
}
|
|
14771
|
+
}
|
|
14761
14772
|
async function readHarnessDistributionVersion(entrypoint = process.argv[1]) {
|
|
14762
14773
|
if (entrypoint === void 0 || !isAbsolute(entrypoint)) return void 0;
|
|
14763
14774
|
let directory = dirname(entrypoint);
|
|
14764
14775
|
for (let depth = 0; depth < 8; depth += 1) {
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
if (manifest.name === "@deepseek-ai/dsh") return normalizeHarnessVersion(manifest.version);
|
|
14768
|
-
} catch {
|
|
14769
|
-
}
|
|
14776
|
+
const version = await readHarnessManifestVersion(join(directory, "package.json"));
|
|
14777
|
+
if (version !== void 0) return version;
|
|
14770
14778
|
const parent = dirname(directory);
|
|
14771
14779
|
if (parent === directory) break;
|
|
14772
14780
|
directory = parent;
|
|
14773
14781
|
}
|
|
14774
|
-
|
|
14782
|
+
try {
|
|
14783
|
+
return await readHarnessManifestVersion(createRequire(entrypoint).resolve(`${HARNESS_PACKAGE_NAME}/package.json`));
|
|
14784
|
+
} catch {
|
|
14785
|
+
return void 0;
|
|
14786
|
+
}
|
|
14775
14787
|
}
|
|
14776
14788
|
|
|
14777
14789
|
// src/remote-api-proxy.ts
|
|
@@ -18366,7 +18378,7 @@ function normalizeServerUrl(value) {
|
|
|
18366
18378
|
}
|
|
18367
18379
|
|
|
18368
18380
|
// src/version.ts
|
|
18369
|
-
var PLUGIN_VERSION = "0.4.
|
|
18381
|
+
var PLUGIN_VERSION = "0.4.25";
|
|
18370
18382
|
|
|
18371
18383
|
// src/server-api.ts
|
|
18372
18384
|
var TERMINAL_CONTROL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f]/u;
|