ds-harness-remote 0.3.19 → 0.3.20
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 +2 -2
- package/dist/harness-api-bridge.js +1 -1
- package/dist/index.js +32 -8
- package/dist/index.js.map +2 -2
- package/dist/remote-api-proxy.js +19 -1
- package/dist/remote-api-proxy.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,11 +124,11 @@ Alternatively, install the pinned GitHub release in DSH Desktop or with the CLI:
|
|
|
124
124
|
也可以在 DSH Desktop 中安装固定版本的 GitHub Release,或使用命令行安装:
|
|
125
125
|
|
|
126
126
|
```text
|
|
127
|
-
github:liguobao/deepseek-harness-remote#v0.3.
|
|
127
|
+
github:liguobao/deepseek-harness-remote#v0.3.20
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
```sh
|
|
131
|
-
dsh plugin --profile web add "github:liguobao/deepseek-harness-remote#v0.3.
|
|
131
|
+
dsh plugin --profile web add "github:liguobao/deepseek-harness-remote#v0.3.20"
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
GitHub / 项目地址:<https://github.com/liguobao/deepseek-harness-remote>
|
|
@@ -102,7 +102,7 @@ export class HarnessApiBridge {
|
|
|
102
102
|
mux;
|
|
103
103
|
host;
|
|
104
104
|
answer;
|
|
105
|
-
constructor(api, publish, maxStreams =
|
|
105
|
+
constructor(api, publish, maxStreams = 8, logger, typertGateway) {
|
|
106
106
|
this.api = api;
|
|
107
107
|
this.publish = publish;
|
|
108
108
|
this.maxStreams = maxStreams;
|
package/dist/index.js
CHANGED
|
@@ -4627,6 +4627,9 @@ function adaptDataChannel(raw) {
|
|
|
4627
4627
|
get binaryType() {
|
|
4628
4628
|
return raw.binaryType;
|
|
4629
4629
|
},
|
|
4630
|
+
set binaryType(value) {
|
|
4631
|
+
raw.binaryType = value;
|
|
4632
|
+
},
|
|
4630
4633
|
set onopen(value) {
|
|
4631
4634
|
raw.onopen = value;
|
|
4632
4635
|
},
|
|
@@ -4777,7 +4780,6 @@ function isChunk(frame) {
|
|
|
4777
4780
|
|
|
4778
4781
|
// ../webrtc/dist/rtc-data-channel.js
|
|
4779
4782
|
var DEFAULT_NEGOTIATE_TIMEOUT_MS = 8e3;
|
|
4780
|
-
var DEFAULT_SEND_TIMEOUT_MS = 5e3;
|
|
4781
4783
|
var RtcDataChannelTransport = class {
|
|
4782
4784
|
pc;
|
|
4783
4785
|
role;
|
|
@@ -4811,7 +4813,7 @@ var RtcDataChannelTransport = class {
|
|
|
4811
4813
|
this.onSignal = options.onSignal;
|
|
4812
4814
|
this.negotiateTimeoutMs = options.negotiateTimeoutMs ?? DEFAULT_NEGOTIATE_TIMEOUT_MS;
|
|
4813
4815
|
this.channelLabel = options.channelLabel ?? RTC_DATA_CHANNEL_LABEL;
|
|
4814
|
-
this.sendTimeoutMs = options.sendTimeoutMs
|
|
4816
|
+
this.sendTimeoutMs = options.sendTimeoutMs;
|
|
4815
4817
|
this.pc = options.factory.create({ iceServers: options.iceServers });
|
|
4816
4818
|
this.pc.ondatachannel = (event) => this.adoptChannel(event.channel);
|
|
4817
4819
|
this.pc.onicecandidate = (event) => {
|
|
@@ -5104,11 +5106,16 @@ var RtcDataChannelTransport = class {
|
|
|
5104
5106
|
return channel;
|
|
5105
5107
|
}
|
|
5106
5108
|
armWatchdog(channel) {
|
|
5107
|
-
if (this.
|
|
5109
|
+
if (this.closed || this.sendTimeoutMs === void 0 || this.sendTimeoutMs <= 0)
|
|
5108
5110
|
return;
|
|
5111
|
+
if (this.watchdogTimer !== void 0)
|
|
5112
|
+
clearTimeout(this.watchdogTimer);
|
|
5113
|
+
this.watchdogTimer = void 0;
|
|
5109
5114
|
const baseline = channel.bufferedAmount;
|
|
5110
|
-
if (baseline <= 0)
|
|
5115
|
+
if (baseline <= 0) {
|
|
5116
|
+
this.lastBufferedAmount = 0;
|
|
5111
5117
|
return;
|
|
5118
|
+
}
|
|
5112
5119
|
this.lastBufferedAmount = baseline;
|
|
5113
5120
|
this.watchdogTimer = setTimeout(() => {
|
|
5114
5121
|
this.watchdogTimer = void 0;
|
|
@@ -5499,7 +5506,10 @@ var AdaptiveTransport = class extends BaseTransport {
|
|
|
5499
5506
|
this.bytesReceived += data.byteLength;
|
|
5500
5507
|
this.emit(data);
|
|
5501
5508
|
});
|
|
5502
|
-
rtc.onClose(() =>
|
|
5509
|
+
rtc.onClose(() => {
|
|
5510
|
+
if (this.rtc === rtc && this.dataMode === "webrtc")
|
|
5511
|
+
this.emitClose();
|
|
5512
|
+
});
|
|
5503
5513
|
try {
|
|
5504
5514
|
await rtc.connect();
|
|
5505
5515
|
} catch (error) {
|
|
@@ -12908,7 +12918,7 @@ var RemoteHarnessApiProxy = class {
|
|
|
12908
12918
|
if (String(response.rpcId) !== String(request.rpcId) || typeof response.result !== "object" || response.result === null) {
|
|
12909
12919
|
throw new Error("The remote Host returned an invalid Harness API response.");
|
|
12910
12920
|
}
|
|
12911
|
-
return response;
|
|
12921
|
+
return normalizeLegacyResponse(method, response);
|
|
12912
12922
|
}
|
|
12913
12923
|
async respond(message) {
|
|
12914
12924
|
return this.client.rpc("harness.api.respond", { message });
|
|
@@ -12941,6 +12951,20 @@ var RemoteHarnessApiProxy = class {
|
|
|
12941
12951
|
}
|
|
12942
12952
|
}
|
|
12943
12953
|
};
|
|
12954
|
+
function normalizeLegacyResponse(method, response) {
|
|
12955
|
+
if (method !== "host.describe" || !response.result.ok) return response;
|
|
12956
|
+
const value = response.result.value;
|
|
12957
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return response;
|
|
12958
|
+
const description = value;
|
|
12959
|
+
if (typeof description.home === "string" || typeof description.cwd !== "string") return response;
|
|
12960
|
+
return {
|
|
12961
|
+
...response,
|
|
12962
|
+
result: {
|
|
12963
|
+
...response.result,
|
|
12964
|
+
value: { ...description, home: description.cwd }
|
|
12965
|
+
}
|
|
12966
|
+
};
|
|
12967
|
+
}
|
|
12944
12968
|
function isRemoteDisconnect(error) {
|
|
12945
12969
|
return error instanceof Error && (error.message === "remote transport closed" || error.message === "remote client closed");
|
|
12946
12970
|
}
|
|
@@ -13068,7 +13092,7 @@ function normalizeServerUrl(value) {
|
|
|
13068
13092
|
}
|
|
13069
13093
|
|
|
13070
13094
|
// src/version.ts
|
|
13071
|
-
var PLUGIN_VERSION = "0.3.
|
|
13095
|
+
var PLUGIN_VERSION = "0.3.20";
|
|
13072
13096
|
|
|
13073
13097
|
// src/server-api.ts
|
|
13074
13098
|
var HostServerApi = class {
|
|
@@ -15870,7 +15894,7 @@ var HARNESS_API_ALLOWLIST = [
|
|
|
15870
15894
|
var NATIVE_CALL_TIMEOUT_MS = 3e4;
|
|
15871
15895
|
var SESSION_HISTORY_PAGE_SIZES = [50, 30, 20, 12, 6, 3, 1];
|
|
15872
15896
|
var HarnessApiBridge = class {
|
|
15873
|
-
constructor(api, publish, maxStreams =
|
|
15897
|
+
constructor(api, publish, maxStreams = 8, logger, typertGateway) {
|
|
15874
15898
|
this.api = api;
|
|
15875
15899
|
this.publish = publish;
|
|
15876
15900
|
this.maxStreams = maxStreams;
|