@musdrop/ds-harness-remote 0.6.16 → 0.6.19
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 +144 -145
- package/dist/client.js +23 -5
- package/dist/index.js +100 -64
- package/dsh-plugin.json +1 -1
- package/locale/README.en.md +38 -39
- package/locale/README.ja.md +38 -39
- package/locale/README.ru.md +38 -39
- package/locale/README.uk.md +38 -39
- package/locale/README.zh.md +38 -39
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75192,8 +75192,10 @@ var configSchema = external_exports.object({
|
|
|
75192
75192
|
binary: external_exports.string().trim().min(1).max(4096).optional()
|
|
75193
75193
|
}).strict().optional(),
|
|
75194
75194
|
acp: external_exports.object({ enabled: external_exports.boolean().optional(), backends: external_exports.array(external_exports.object({ id: external_exports.string().trim().regex(/^[a-z0-9][a-z0-9._-]{0,31}$/i), enabled: external_exports.boolean().optional(), command: external_exports.string().trim().min(1).max(4096).optional(), args: external_exports.array(external_exports.string().max(4096)).max(32).optional(), cwd: external_exports.string().max(4096).optional() }).strict()).max(12).optional(), backend: external_exports.string().trim().regex(/^[a-z0-9][a-z0-9._-]{0,31}$/i).optional(), command: external_exports.string().trim().min(1).max(4096).optional(), args: external_exports.array(external_exports.string().max(4096)).max(32).optional(), cwd: external_exports.string().max(4096).optional() }).strict().optional(),
|
|
75195
|
+
// [model-sharing] BEGIN — .strict() would reject a config carrying this key.
|
|
75195
75196
|
// [model-sharing] Master switch only; grants live in the feature's own store.
|
|
75196
75197
|
modelShare: external_exports.object({ enabled: external_exports.boolean().optional() }).strict().optional()
|
|
75198
|
+
// [model-sharing] END
|
|
75197
75199
|
}).strict();
|
|
75198
75200
|
function resolveConfig(input4 = {}, env = process.env) {
|
|
75199
75201
|
const parsed = configSchema.parse(input4);
|
|
@@ -75260,9 +75262,11 @@ function resolveConfig(input4 = {}, env = process.env) {
|
|
|
75260
75262
|
};
|
|
75261
75263
|
})
|
|
75262
75264
|
},
|
|
75265
|
+
// [model-sharing] BEGIN — default value; index.ts dereferences .enabled.
|
|
75263
75266
|
// [model-sharing] On by default: the surface stays inert until the store
|
|
75264
75267
|
// enables a grant on the lending side or a source on the borrowing side.
|
|
75265
75268
|
modelShare: { enabled: parsed.modelShare?.enabled !== false }
|
|
75269
|
+
// [model-sharing] END
|
|
75266
75270
|
};
|
|
75267
75271
|
}
|
|
75268
75272
|
var LOCAL_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
|
|
@@ -75383,7 +75387,7 @@ function parseIpv6(value) {
|
|
|
75383
75387
|
}
|
|
75384
75388
|
|
|
75385
75389
|
// packages/plugin/src/version.ts
|
|
75386
|
-
var PLUGIN_VERSION = "0.6.
|
|
75390
|
+
var PLUGIN_VERSION = "0.6.19";
|
|
75387
75391
|
|
|
75388
75392
|
// packages/plugin/src/server-api.ts
|
|
75389
75393
|
var TERMINAL_CONTROL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f]/u;
|
|
@@ -93834,6 +93838,7 @@ var ClientModeRuntime = class {
|
|
|
93834
93838
|
if (this.closed) throw new ClientModeError("CANCELLED", "The Remote runtime is closed.");
|
|
93835
93839
|
return this.sessionTools.run(operation, args, signal);
|
|
93836
93840
|
}
|
|
93841
|
+
// [model-sharing] BEGIN — transport factory + listing call for borrowed models.
|
|
93837
93842
|
/**
|
|
93838
93843
|
* [model-sharing] A transport bound to one lending Host that **holds its
|
|
93839
93844
|
* connection across the whole borrowed stream**. `withToolRemote` would
|
|
@@ -114010,7 +114015,7 @@ var ModelShareStoreFile = class {
|
|
|
114010
114015
|
}
|
|
114011
114016
|
cache;
|
|
114012
114017
|
writing = Promise.resolve();
|
|
114013
|
-
/** Active directory watcher, if `watch()` was called. */
|
|
114018
|
+
/** Active directory watcher and every callback it serves, if `watch()` was called. */
|
|
114014
114019
|
watcher;
|
|
114015
114020
|
get path() {
|
|
114016
114021
|
return join17(this.directory, this.fileName);
|
|
@@ -114050,45 +114055,67 @@ var ModelShareStoreFile = class {
|
|
|
114050
114055
|
*
|
|
114051
114056
|
* The watcher is best-effort: a missing directory simply yields no events,
|
|
114052
114057
|
* and a failed watch never throws into the caller.
|
|
114058
|
+
*
|
|
114059
|
+
* One directory handle serves every subscriber. A second `watch()` joins the
|
|
114060
|
+
* running watcher instead of replacing its callback, and the handle is closed
|
|
114061
|
+
* (freeing the slot) once the last subscriber unsubscribes — so a later
|
|
114062
|
+
* `watch()` installs a live watcher rather than handing back a stop function
|
|
114063
|
+
* whose handle is already closed.
|
|
114053
114064
|
*/
|
|
114054
114065
|
watch(onChange) {
|
|
114055
|
-
|
|
114066
|
+
const running = this.watcher;
|
|
114067
|
+
if (running !== void 0) {
|
|
114068
|
+
running.listeners.add(onChange);
|
|
114069
|
+
return this.unsubscribe(running, onChange);
|
|
114070
|
+
}
|
|
114071
|
+
const listeners = /* @__PURE__ */ new Set([onChange]);
|
|
114056
114072
|
let closed = false;
|
|
114057
114073
|
let timer2;
|
|
114074
|
+
let handle;
|
|
114058
114075
|
const emit2 = () => {
|
|
114059
114076
|
if (closed) return;
|
|
114060
114077
|
this.cache = void 0;
|
|
114061
114078
|
void this.read().then((store) => {
|
|
114062
|
-
if (
|
|
114079
|
+
if (closed) return;
|
|
114080
|
+
for (const listener of [...listeners]) {
|
|
114081
|
+
if (closed) return;
|
|
114082
|
+
listener(store);
|
|
114083
|
+
}
|
|
114063
114084
|
}).catch(() => void 0);
|
|
114064
114085
|
};
|
|
114086
|
+
const stop = () => {
|
|
114087
|
+
if (closed) return;
|
|
114088
|
+
closed = true;
|
|
114089
|
+
if (timer2 !== void 0) clearTimeout(timer2);
|
|
114090
|
+
timer2 = void 0;
|
|
114091
|
+
if (this.watcher?.stop === stop) this.watcher = void 0;
|
|
114092
|
+
try {
|
|
114093
|
+
handle?.close();
|
|
114094
|
+
} catch {
|
|
114095
|
+
}
|
|
114096
|
+
};
|
|
114065
114097
|
try {
|
|
114066
114098
|
const directory = this.directory;
|
|
114067
114099
|
const fileName = this.fileName;
|
|
114068
|
-
|
|
114100
|
+
handle = watch2(directory, { persistent: false }, (_event, changed) => {
|
|
114069
114101
|
if (changed != null && String(changed) !== fileName) return;
|
|
114070
114102
|
if (timer2 !== void 0) clearTimeout(timer2);
|
|
114071
114103
|
timer2 = setTimeout(emit2, 120);
|
|
114072
114104
|
timer2.unref?.();
|
|
114073
114105
|
});
|
|
114074
114106
|
handle.on("error", () => void 0);
|
|
114075
|
-
const stop = () => {
|
|
114076
|
-
closed = true;
|
|
114077
|
-
if (timer2 !== void 0) clearTimeout(timer2);
|
|
114078
|
-
try {
|
|
114079
|
-
handle.close();
|
|
114080
|
-
} catch {
|
|
114081
|
-
}
|
|
114082
|
-
};
|
|
114083
|
-
this.watcher = stop;
|
|
114084
|
-
return stop;
|
|
114085
114107
|
} catch {
|
|
114086
|
-
|
|
114087
|
-
closed = true;
|
|
114088
|
-
};
|
|
114089
|
-
this.watcher = stop;
|
|
114090
|
-
return stop;
|
|
114108
|
+
handle = void 0;
|
|
114091
114109
|
}
|
|
114110
|
+
const subscription = { listeners, stop };
|
|
114111
|
+
this.watcher = subscription;
|
|
114112
|
+
return this.unsubscribe(subscription, onChange);
|
|
114113
|
+
}
|
|
114114
|
+
unsubscribe(subscription, onChange) {
|
|
114115
|
+
return () => {
|
|
114116
|
+
subscription.listeners.delete(onChange);
|
|
114117
|
+
if (subscription.listeners.size === 0) subscription.stop();
|
|
114118
|
+
};
|
|
114092
114119
|
}
|
|
114093
114120
|
};
|
|
114094
114121
|
|
|
@@ -117217,8 +117244,7 @@ var MODEL_SHARE_METHODS = [
|
|
|
117217
117244
|
"model.share.list",
|
|
117218
117245
|
"model.share.open",
|
|
117219
117246
|
"model.share.chunk",
|
|
117220
|
-
"model.share.close"
|
|
117221
|
-
"model.share.config"
|
|
117247
|
+
"model.share.close"
|
|
117222
117248
|
];
|
|
117223
117249
|
var sharedModelSchema = external_exports.object({
|
|
117224
117250
|
/** Stable route key: `${provider}::${model}`. Also the borrower-facing model id. */
|
|
@@ -117230,12 +117256,9 @@ var sharedModelSchema = external_exports.object({
|
|
|
117230
117256
|
contextWindow: external_exports.number().int().positive().optional(),
|
|
117231
117257
|
maxTokens: external_exports.number().int().positive().optional(),
|
|
117232
117258
|
reasoningEfforts: external_exports.array(external_exports.string().min(1).max(64)).optional(),
|
|
117233
|
-
inputModalities: external_exports.array(external_exports.enum(["text", "image"])).optional()
|
|
117234
|
-
/** Optional upstream promo/availability badge text, passed through verbatim. */
|
|
117235
|
-
badge: external_exports.string().max(128).optional()
|
|
117259
|
+
inputModalities: external_exports.array(external_exports.enum(["text", "image"])).optional()
|
|
117236
117260
|
}).strict();
|
|
117237
117261
|
var listRequestSchema = external_exports.object({}).strict();
|
|
117238
|
-
var configRequestSchema = external_exports.object({}).strict();
|
|
117239
117262
|
var openRequestSchema = external_exports.object({
|
|
117240
117263
|
/** Stable route key from `model.share.list`. */
|
|
117241
117264
|
modelId: external_exports.string().min(1).max(256),
|
|
@@ -117323,8 +117346,10 @@ var apiMethods = /* @__PURE__ */ new Set([
|
|
|
117323
117346
|
"remote.transport.upgrade.activate",
|
|
117324
117347
|
"remote.transport.upgrade.drain",
|
|
117325
117348
|
"remote.transport.upgrade.abort",
|
|
117349
|
+
// [model-sharing] BEGIN — without these the router answers METHOD_NOT_FOUND.
|
|
117326
117350
|
// [model-sharing] Borrowed-model RPCs on the existing encrypted channel.
|
|
117327
117351
|
...MODEL_SHARE_METHODS
|
|
117352
|
+
// [model-sharing] END
|
|
117328
117353
|
]);
|
|
117329
117354
|
var HOST_CAPABILITIES = [
|
|
117330
117355
|
"harness.remote.v1",
|
|
@@ -117365,6 +117390,7 @@ var RpcRouter = class {
|
|
|
117365
117390
|
this.attention?.close();
|
|
117366
117391
|
this.loopback?.closeAll();
|
|
117367
117392
|
this.sessionTransfer?.close();
|
|
117393
|
+
this.modelShare?.closeAll();
|
|
117368
117394
|
await Promise.all([
|
|
117369
117395
|
this.harnessRemote?.closeAll(),
|
|
117370
117396
|
this.codex?.closeAll(),
|
|
@@ -117451,8 +117477,10 @@ var RpcRouter = class {
|
|
|
117451
117477
|
...this.dshWeb?.available() ? [DSH_WEB_CAPABILITY] : [],
|
|
117452
117478
|
...this.transportUpgrade === void 0 ? [] : [TRANSPORT_UPGRADE_CAPABILITY],
|
|
117453
117479
|
...this.attention === void 0 ? [] : [ATTENTION_INBOX_CAPABILITY],
|
|
117480
|
+
// [model-sharing] BEGIN — clients gate the whole feature on this flag.
|
|
117454
117481
|
// [model-sharing] Only advertise lending when this Host can serve it.
|
|
117455
117482
|
...this.modelShare === void 0 ? [] : [MODEL_SHARE_CAPABILITY]
|
|
117483
|
+
// [model-sharing] END
|
|
117456
117484
|
])];
|
|
117457
117485
|
let workspaceTypes;
|
|
117458
117486
|
if (this.workspaceTypes !== void 0) {
|
|
@@ -117604,7 +117632,6 @@ var RpcRouter = class {
|
|
|
117604
117632
|
// [model-sharing] BEGIN — lending dispatch. Every branch re-checks the
|
|
117605
117633
|
// lending policy host-side; a borrower can never widen its own access.
|
|
117606
117634
|
case "model.share.list":
|
|
117607
|
-
case "model.share.config":
|
|
117608
117635
|
case "model.share.open":
|
|
117609
117636
|
case "model.share.chunk":
|
|
117610
117637
|
case "model.share.close":
|
|
@@ -122130,9 +122157,12 @@ var HostPluginRuntime = class {
|
|
|
122130
122157
|
context.connectionId,
|
|
122131
122158
|
(event2) => send(createEvent("attention.follow.event", event2))
|
|
122132
122159
|
),
|
|
122160
|
+
// [model-sharing] BEGIN — last RpcRouter argument; losing it silently
|
|
122161
|
+
// passes the lending host where upstream expects nothing.
|
|
122133
122162
|
// [model-sharing] Lending is per-connection because the grant check
|
|
122134
122163
|
// needs the authenticated peer device id.
|
|
122135
122164
|
this.modelShareFactory?.(context.peerDeviceId)
|
|
122165
|
+
// [model-sharing] END
|
|
122136
122166
|
);
|
|
122137
122167
|
}, this.logger);
|
|
122138
122168
|
if (config2.serverUrl !== void 0) {
|
|
@@ -122741,9 +122771,9 @@ var ModelShareHost = class {
|
|
|
122741
122771
|
*/
|
|
122742
122772
|
async listShared(deviceId) {
|
|
122743
122773
|
const { host } = await this.store.read();
|
|
122744
|
-
if (!host.enabled) return { enabled: false, models: []
|
|
122774
|
+
if (!host.enabled) return { enabled: false, models: [] };
|
|
122745
122775
|
if (host.allowedDevices.length > 0 && !host.allowedDevices.includes(deviceId)) {
|
|
122746
|
-
return { enabled: false, models: []
|
|
122776
|
+
return { enabled: false, models: [] };
|
|
122747
122777
|
}
|
|
122748
122778
|
const allowed = allowedRoutes(host, deviceId);
|
|
122749
122779
|
const wildcardProviders = /* @__PURE__ */ new Set();
|
|
@@ -122802,7 +122832,7 @@ var ModelShareHost = class {
|
|
|
122802
122832
|
const entry = (catalogs.get(provider) ?? []).find((candidate) => candidate.id === model);
|
|
122803
122833
|
if (entry !== void 0) await emit2(provider, entry);
|
|
122804
122834
|
}
|
|
122805
|
-
return { enabled: true, models
|
|
122835
|
+
return { enabled: true, models };
|
|
122806
122836
|
}
|
|
122807
122837
|
async safeResolve(provider, entry) {
|
|
122808
122838
|
try {
|
|
@@ -122811,10 +122841,6 @@ var ModelShareHost = class {
|
|
|
122811
122841
|
return entry;
|
|
122812
122842
|
}
|
|
122813
122843
|
}
|
|
122814
|
-
/** `model.share.config` — policy summary for this peer. */
|
|
122815
|
-
async describePolicy(deviceId) {
|
|
122816
|
-
return this.listShared(deviceId);
|
|
122817
|
-
}
|
|
122818
122844
|
/** `model.share.open` — begin one bridged stream. */
|
|
122819
122845
|
async open(deviceId, params) {
|
|
122820
122846
|
const request2 = openRequestSchema.parse(params);
|
|
@@ -122877,7 +122903,7 @@ var ModelShareHost = class {
|
|
|
122877
122903
|
}
|
|
122878
122904
|
if (active2.finished === void 0) active2.finished = { reason: "stop" };
|
|
122879
122905
|
} catch (error62) {
|
|
122880
|
-
const code =
|
|
122906
|
+
const code = "INTERNAL_ERROR";
|
|
122881
122907
|
active2.finished = {
|
|
122882
122908
|
reason: "error",
|
|
122883
122909
|
failure: {
|
|
@@ -122969,9 +122995,6 @@ var ModelShareHost = class {
|
|
|
122969
122995
|
case "model.share.list":
|
|
122970
122996
|
listRequestSchema.parse(params);
|
|
122971
122997
|
return this.listShared(deviceId);
|
|
122972
|
-
case "model.share.config":
|
|
122973
|
-
configRequestSchema.parse(params);
|
|
122974
|
-
return this.describePolicy(deviceId);
|
|
122975
122998
|
case "model.share.open":
|
|
122976
122999
|
return this.open(deviceId, params);
|
|
122977
123000
|
case "model.share.chunk":
|
|
@@ -126915,22 +126938,8 @@ var RemoteModelAdapter = class extends LlmAdapter {
|
|
|
126915
126938
|
providerInfo(provider) {
|
|
126916
126939
|
return { id: provider, name: this.transport.hostName };
|
|
126917
126940
|
}
|
|
126918
|
-
providerRetryPolicy(_provider) {
|
|
126919
|
-
return void 0;
|
|
126920
|
-
}
|
|
126921
|
-
imageRequestPricing(_provider, _model) {
|
|
126922
|
-
return void 0;
|
|
126923
|
-
}
|
|
126924
|
-
imageRequestTarget(_provider, _model, image) {
|
|
126925
|
-
return {
|
|
126926
|
-
width: image.width,
|
|
126927
|
-
height: image.height,
|
|
126928
|
-
maxImageBytes: image.bytes,
|
|
126929
|
-
imageTargetBytes: image.bytes
|
|
126930
|
-
};
|
|
126931
|
-
}
|
|
126932
126941
|
async listModels(provider) {
|
|
126933
|
-
return this.
|
|
126942
|
+
return this.deduplicated().map((entry) => this.toModelInfo(provider, entry));
|
|
126934
126943
|
}
|
|
126935
126944
|
async resolveModel(provider, model, _signal) {
|
|
126936
126945
|
const entry = this.findModel(model);
|
|
@@ -126943,19 +126952,34 @@ var RemoteModelAdapter = class extends LlmAdapter {
|
|
|
126943
126952
|
stream: (options) => this.stream(options)
|
|
126944
126953
|
};
|
|
126945
126954
|
}
|
|
126955
|
+
/**
|
|
126956
|
+
* The Host may lend the same bare model name from several providers. DSH
|
|
126957
|
+
* requires unique ids within one provider's catalog, so drop later entries
|
|
126958
|
+
* whose route key (and therefore stable id) repeats.
|
|
126959
|
+
*/
|
|
126960
|
+
deduplicated() {
|
|
126961
|
+
const seen = /* @__PURE__ */ new Set();
|
|
126962
|
+
return this.transport.models().filter((entry) => {
|
|
126963
|
+
if (seen.has(entry.id)) return false;
|
|
126964
|
+
seen.add(entry.id);
|
|
126965
|
+
return true;
|
|
126966
|
+
});
|
|
126967
|
+
}
|
|
126946
126968
|
/** Resolve a borrower-facing model id back to a lent model entry. */
|
|
126947
126969
|
findModel(modelId) {
|
|
126948
126970
|
const models = this.transport.models();
|
|
126949
|
-
const
|
|
126950
|
-
if (
|
|
126951
|
-
const
|
|
126952
|
-
return
|
|
126971
|
+
const exact = models.find((entry) => entry.id === modelId);
|
|
126972
|
+
if (exact !== void 0) return exact;
|
|
126973
|
+
const bare = models.filter((entry) => entry.model === modelId);
|
|
126974
|
+
return bare.length === 1 ? bare[0] : void 0;
|
|
126953
126975
|
}
|
|
126954
126976
|
toModelInfo(provider, entry) {
|
|
126977
|
+
const sourceProvider = entry.provider || provider;
|
|
126955
126978
|
return {
|
|
126956
126979
|
provider,
|
|
126957
|
-
|
|
126958
|
-
|
|
126980
|
+
// Route key, unique across providers; entry.id is provider::model.
|
|
126981
|
+
id: entry.id,
|
|
126982
|
+
name: `${sourceProvider} / ${entry.name}`,
|
|
126959
126983
|
...entry.inputModalities === void 0 ? {} : { inputModalities: [...entry.inputModalities] },
|
|
126960
126984
|
...entry.contextWindow === void 0 ? {} : { context: { contextWindow: entry.contextWindow } },
|
|
126961
126985
|
...entry.maxTokens === void 0 ? {} : { defaultMaxTokens: entry.maxTokens },
|
|
@@ -127095,10 +127119,11 @@ var BorrowerRuntime = class {
|
|
|
127095
127119
|
const bound = {
|
|
127096
127120
|
hostId,
|
|
127097
127121
|
hostName,
|
|
127098
|
-
|
|
127122
|
+
...transport.onStale === void 0 ? {} : { onStale: transport.onStale },
|
|
127099
127123
|
open: (request2) => transport.open(request2),
|
|
127100
127124
|
drain: (streamId, waitMs) => transport.drain(streamId, waitMs),
|
|
127101
|
-
close: (streamId) => transport.close(streamId)
|
|
127125
|
+
close: (streamId) => transport.close(streamId),
|
|
127126
|
+
...transport.release === void 0 ? {} : { release: transport.release }
|
|
127102
127127
|
};
|
|
127103
127128
|
await this.reconcile(hostId, hostName, bound, lent);
|
|
127104
127129
|
}
|
|
@@ -127130,9 +127155,11 @@ var BorrowerRuntime = class {
|
|
|
127130
127155
|
existing.holder.models = [...selected];
|
|
127131
127156
|
existing.models = existing.holder.models;
|
|
127132
127157
|
if (existing.transport !== transport) {
|
|
127133
|
-
|
|
127134
|
-
|
|
127135
|
-
|
|
127158
|
+
if (existing.transport?.release !== transport.release) {
|
|
127159
|
+
try {
|
|
127160
|
+
existing.transport?.release?.();
|
|
127161
|
+
} catch {
|
|
127162
|
+
}
|
|
127136
127163
|
}
|
|
127137
127164
|
existing.transport = transport;
|
|
127138
127165
|
}
|
|
@@ -127147,6 +127174,9 @@ var BorrowerRuntime = class {
|
|
|
127147
127174
|
// on the registration cannot change model metadata, so reconcile writes
|
|
127148
127175
|
// the new set here and the adapter reads it on every call.
|
|
127149
127176
|
models: () => holder.models,
|
|
127177
|
+
// The stale hook has to reach the adapter, not stop at the bound object:
|
|
127178
|
+
// the adapter is what notices a missing model or a dropped connection.
|
|
127179
|
+
...transport.onStale === void 0 ? {} : { onStale: transport.onStale },
|
|
127150
127180
|
open: (request2) => transport.open(request2),
|
|
127151
127181
|
drain: (streamId, waitMs) => transport.drain(streamId, waitMs),
|
|
127152
127182
|
close: (streamId) => transport.close(streamId)
|
|
@@ -128673,8 +128703,11 @@ async function activate(ctx, readConfig, entryId, requireRemoteEvents = false) {
|
|
|
128673
128703
|
const attachments = safeGetService2(ctx, "attachments") ?? safeGetService2(rootContext(ctx), "attachments");
|
|
128674
128704
|
return attachments?.fileHostPath?.(ref);
|
|
128675
128705
|
},
|
|
128706
|
+
// [model-sharing] BEGIN — appended HostPluginRuntime argument; upstream
|
|
128707
|
+
// ends the list at the attachment path resolver above.
|
|
128676
128708
|
// [model-sharing] Lending factory for this Host connection.
|
|
128677
128709
|
lendingFactory
|
|
128710
|
+
// [model-sharing] END
|
|
128678
128711
|
);
|
|
128679
128712
|
let nextClientRuntime;
|
|
128680
128713
|
if (nextConfig.serverUrl !== void 0 && connection !== void 0) {
|
|
@@ -128835,6 +128868,8 @@ async function activate(ctx, readConfig, entryId, requireRemoteEvents = false) {
|
|
|
128835
128868
|
pluginUpgrade,
|
|
128836
128869
|
true,
|
|
128837
128870
|
logStore,
|
|
128871
|
+
// [model-sharing] BEGIN — appended PluginControlRuntime argument; the
|
|
128872
|
+
// class declares no parameter for it upstream.
|
|
128838
128873
|
// [model-sharing] Lazy binding so server switches recreate the store
|
|
128839
128874
|
// and the borrower providers can be resynced after a policy edit.
|
|
128840
128875
|
// `describe` reports per-source borrow diagnostics: without a client
|
|
@@ -128850,6 +128885,7 @@ async function activate(ctx, readConfig, entryId, requireRemoteEvents = false) {
|
|
|
128850
128885
|
sources: modelShareBorrowers.flatMap((borrower) => borrower.describeBorrower())
|
|
128851
128886
|
})
|
|
128852
128887
|
}
|
|
128888
|
+
// [model-sharing] END
|
|
128853
128889
|
);
|
|
128854
128890
|
if (initialStorageError !== void 0) {
|
|
128855
128891
|
controlRuntime?.setStartupFailure(initialStorageError, { storageAvailable: false });
|
package/dsh-plugin.json
CHANGED
package/locale/README.en.md
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- **
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[Full guide](https://github.com/liguobao/ds-harness-remote/blob/main/README.md) · [Self-hosting](https://github.com/liguobao/ds-harness-remote/blob/main/apps/server/README.md) · [Report an issue](https://github.com/liguobao/ds-harness-remote/issues)
|
|
1
|
+
## This is a fork, not the original
|
|
2
|
+
|
|
3
|
+
This plugin (`@musdrop/ds-harness-remote`) is a fork of [`liguobao/ds-harness-remote`](https://github.com/liguobao/ds-harness-remote) adding **cross-device model lending/borrowing** on top of everything below:
|
|
4
|
+
|
|
5
|
+
- **Lend**: share this machine's configured models with other devices. Requests are re-driven locally with this machine's own credentials — the borrower never sees any secret, but every call spends this machine's quota.
|
|
6
|
+
- **Borrow**: use models another device lends; they appear in the local model picker under that device's **name** as the provider.
|
|
7
|
+
- **Two-sided grants**: the lender picks providers/devices and models; the borrower opts in per device. Only models allowed on both sides show up.
|
|
8
|
+
- Configuration lives in this plugin's detail page, in the new **"Model sharing" section**.
|
|
9
|
+
|
|
10
|
+
**⚠️ Not coinstallable with the original**: the plugin shares the original's id (`com.r2049.ds-harness-remote`), so a profile can hold only one of the two. The shared id also means this fork **replaces** the original seamlessly — existing Remote configuration and sign-in carry over. Model-sharing policy is stored in a separate `model-share.json`.
|
|
11
|
+
|
|
12
|
+
The original feature tour follows.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# DS Harness Remote
|
|
17
|
+
|
|
18
|
+
[Website](https://dsh.r2049.cn/) · [Web client](https://dsh.r2049.cn/app) · [iOS beta](https://github.com/liguobao/ds-harness-remote/issues/20) · [Android download](https://github.com/liguobao/ds-harness-remote/releases/latest)
|
|
19
|
+
|
|
20
|
+
Use **direct P2P connections** to continue using DeepSeek Harness on your work computer from another computer, browser, or phone. Your workspaces, sessions, tools, and project settings stay on the original computer.
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- Open Harness workspaces and sessions remotely, send messages, switch models, interrupt tasks, and handle approvals.
|
|
25
|
+
- Connect to configured CodeX, Claude Code, Pi, OpenCode, and other workspaces.
|
|
26
|
+
- Browse workspace files, preview content, and use the remote terminal when enabled.
|
|
27
|
+
- **Direct P2P connections first**: devices exchange data directly, with no relay server carrying session data once connected; no public IP or inbound port required on the host.
|
|
28
|
+
- **End-to-end encryption throughout**: automatically fall back to TURN or Relay when a direct connection is unavailable. Relay servers cannot decrypt session content.
|
|
29
|
+
|
|
30
|
+
## Get started
|
|
31
|
+
|
|
32
|
+
1. Install and enable the plugin on your work computer, then open **Remote** in the sidebar and sign in.
|
|
33
|
+
2. Sign in to the same account through Remote on another computer, the [browser client](https://dsh.r2049.cn/app), the [iOS app (beta)](https://github.com/liguobao/ds-harness-remote/issues/20), the [Android app](https://github.com/liguobao/ds-harness-remote/releases/latest), or [DSH Go](https://github.com/ccch1mneyyy/dsh-go).
|
|
34
|
+
3. Select an online host and workspace to continue. Keep your work computer running and connected to the internet.
|
|
35
|
+
|
|
36
|
+
[DSH Go](https://github.com/ccch1mneyyy/dsh-go) is a third-party DeepSeek Harness Android client. It can run DSH locally on your phone or connect to DSH on your computer through this plugin.
|
|
37
|
+
|
|
38
|
+
[Full guide](https://github.com/liguobao/ds-harness-remote/blob/main/README.md) · [Self-hosting](https://github.com/liguobao/ds-harness-remote/blob/main/apps/server/README.md) · [Report an issue](https://github.com/liguobao/ds-harness-remote/issues)
|
package/locale/README.ja.md
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[詳しい使い方](https://github.com/liguobao/ds-harness-remote/blob/main/README.ja.md) · [セルフホスティング](https://github.com/liguobao/ds-harness-remote/blob/main/apps/server/README.md) · [問題を報告](https://github.com/liguobao/ds-harness-remote/issues)
|
|
1
|
+
## これはフォーク版です(原版ではありません)
|
|
2
|
+
|
|
3
|
+
本プラグイン(`@musdrop/ds-harness-remote`)は [`liguobao/ds-harness-remote`](https://github.com/liguobao/ds-harness-remote) のフォークで、既存の全機能に加えて**デバイス間モデル貸借**を追加しています:
|
|
4
|
+
|
|
5
|
+
- **貸出(Lend)**:このマシンが設定済みのモデルを他デバイスに貸し出します。リクエストはこのマシンが自身の資格情報で代行し、相手に秘密情報は渡りませんが、消費されるのはこのマシンのクォータです。
|
|
6
|
+
- **借用(Borrow)**:他デバイスが貸し出したモデルを利用でき、選択器には相手の**デバイス名**をプロバイダーとして表示されます。
|
|
7
|
+
- **双方向の許可**:貸し手はプロバイダー/デバイス/モデルを指定し、借り手はデバイスごとに有効化します。双方が許可したモデルのみ表示されます。
|
|
8
|
+
- 設定は本プラグインの詳細ページにある**「モデル共有」セクション**で行います。
|
|
9
|
+
|
|
10
|
+
**⚠️ 原版との併用不可**:原版 `ds-harness-remote` と同じプラグイン ID を持つため、同一 profile にはどちらか一方のみ。同 ID であるため、このフォークは原版をシームレスに**置き換え**でき、既存の Remote 設定とサインイン状態はそのまま引き継がれます。
|
|
11
|
+
|
|
12
|
+
以下は原版の機能紹介です。
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# DS Harness Remote
|
|
17
|
+
|
|
18
|
+
[公式サイト](https://dsh.r2049.cn/) · [Web クライアント](https://dsh.r2049.cn/app) · [iOS ベータ](https://github.com/liguobao/ds-harness-remote/issues/20) · [Android ダウンロード](https://github.com/liguobao/ds-harness-remote/releases/latest)
|
|
19
|
+
|
|
20
|
+
**P2P ネットワークで直接接続**し、別のパソコン、ブラウザー、スマートフォンから、作業用パソコン上の DeepSeek Harness を引き続き使えます。ワークスペース、セッション、ツール、プロジェクト設定は元のパソコンに保持されます。
|
|
21
|
+
|
|
22
|
+
## 主な機能
|
|
23
|
+
|
|
24
|
+
- Harness のワークスペースとセッションを開き、メッセージ送信、モデル切り替え、タスク中断、承認操作ができます。
|
|
25
|
+
- 設定済みの CodeX、Claude Code、Pi、OpenCode などのワークスペースに接続できます。
|
|
26
|
+
- ワークスペースのファイル閲覧、プレビュー、有効化済みのリモートターミナルを利用できます。
|
|
27
|
+
- **P2P 直接接続を優先**:端末間で直接データを転送し、接続後のセッションデータは中継サーバーを経由しません。ホストのパブリック IP や公開ポートは不要です。
|
|
28
|
+
- **通信は常にエンドツーエンド暗号化**:直接接続できない場合は TURN または Relay に自動で切り替えます。中継サーバーはセッションの内容を復号できません。
|
|
29
|
+
|
|
30
|
+
## 使い始めるには
|
|
31
|
+
|
|
32
|
+
1. 作業用パソコンにプラグインをインストールして有効化し、サイドバーの **Remote** からログインします。
|
|
33
|
+
2. 別のパソコンの Remote、[ブラウザー](https://dsh.r2049.cn/app)、[iOS アプリ(ベータ)](https://github.com/liguobao/ds-harness-remote/issues/20)、[Android アプリ](https://github.com/liguobao/ds-harness-remote/releases/latest)、または [DSH Go](https://github.com/ccch1mneyyy/dsh-go) で同じアカウントにログインします。
|
|
34
|
+
3. オンラインのホストとワークスペースを選択します。作業用パソコンは起動し、インターネットに接続したままにしてください。
|
|
35
|
+
|
|
36
|
+
[DSH Go](https://github.com/ccch1mneyyy/dsh-go) はサードパーティー製の DeepSeek Harness Android クライアントです。スマートフォン上で DSH を実行するほか、本プラグイン経由でパソコン上の DSH にリモート接続できます。
|
|
37
|
+
|
|
38
|
+
[詳しい使い方](https://github.com/liguobao/ds-harness-remote/blob/main/README.ja.md) · [セルフホスティング](https://github.com/liguobao/ds-harness-remote/blob/main/apps/server/README.md) · [問題を報告](https://github.com/liguobao/ds-harness-remote/issues)
|