@musdrop/ds-harness-remote 0.6.16 → 0.6.17
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/dist/index.js +23 -8
- package/dsh-plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -75383,7 +75383,7 @@ function parseIpv6(value) {
|
|
|
75383
75383
|
}
|
|
75384
75384
|
|
|
75385
75385
|
// packages/plugin/src/version.ts
|
|
75386
|
-
var PLUGIN_VERSION = "0.6.
|
|
75386
|
+
var PLUGIN_VERSION = "0.6.17";
|
|
75387
75387
|
|
|
75388
75388
|
// packages/plugin/src/server-api.ts
|
|
75389
75389
|
var TERMINAL_CONTROL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f]/u;
|
|
@@ -126930,7 +126930,7 @@ var RemoteModelAdapter = class extends LlmAdapter {
|
|
|
126930
126930
|
};
|
|
126931
126931
|
}
|
|
126932
126932
|
async listModels(provider) {
|
|
126933
|
-
return this.
|
|
126933
|
+
return this.deduplicated().map((entry) => this.toModelInfo(provider, entry));
|
|
126934
126934
|
}
|
|
126935
126935
|
async resolveModel(provider, model, _signal) {
|
|
126936
126936
|
const entry = this.findModel(model);
|
|
@@ -126943,19 +126943,34 @@ var RemoteModelAdapter = class extends LlmAdapter {
|
|
|
126943
126943
|
stream: (options) => this.stream(options)
|
|
126944
126944
|
};
|
|
126945
126945
|
}
|
|
126946
|
+
/**
|
|
126947
|
+
* The Host may lend the same bare model name from several providers. DSH
|
|
126948
|
+
* requires unique ids within one provider's catalog, so drop later entries
|
|
126949
|
+
* whose route key (and therefore stable id) repeats.
|
|
126950
|
+
*/
|
|
126951
|
+
deduplicated() {
|
|
126952
|
+
const seen = /* @__PURE__ */ new Set();
|
|
126953
|
+
return this.transport.models().filter((entry) => {
|
|
126954
|
+
if (seen.has(entry.id)) return false;
|
|
126955
|
+
seen.add(entry.id);
|
|
126956
|
+
return true;
|
|
126957
|
+
});
|
|
126958
|
+
}
|
|
126946
126959
|
/** Resolve a borrower-facing model id back to a lent model entry. */
|
|
126947
126960
|
findModel(modelId) {
|
|
126948
126961
|
const models = this.transport.models();
|
|
126949
|
-
const
|
|
126950
|
-
if (
|
|
126951
|
-
const
|
|
126952
|
-
return
|
|
126962
|
+
const exact = models.find((entry) => entry.id === modelId);
|
|
126963
|
+
if (exact !== void 0) return exact;
|
|
126964
|
+
const bare = models.filter((entry) => entry.model === modelId);
|
|
126965
|
+
return bare.length === 1 ? bare[0] : void 0;
|
|
126953
126966
|
}
|
|
126954
126967
|
toModelInfo(provider, entry) {
|
|
126968
|
+
const sourceProvider = entry.provider || provider;
|
|
126955
126969
|
return {
|
|
126956
126970
|
provider,
|
|
126957
|
-
|
|
126958
|
-
|
|
126971
|
+
// Route key, unique across providers; entry.id is provider::model.
|
|
126972
|
+
id: entry.id,
|
|
126973
|
+
name: `${sourceProvider} / ${entry.name}`,
|
|
126959
126974
|
...entry.inputModalities === void 0 ? {} : { inputModalities: [...entry.inputModalities] },
|
|
126960
126975
|
...entry.contextWindow === void 0 ? {} : { context: { contextWindow: entry.contextWindow } },
|
|
126961
126976
|
...entry.maxTokens === void 0 ? {} : { defaultMaxTokens: entry.maxTokens },
|
package/dsh-plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@musdrop/ds-harness-remote",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.17",
|
|
4
4
|
"description": "P2P-based, end-to-end encrypted remote access to DeepSeek Harness, CodeX, Claude Code, Pi, and other workspaces from web and mobile clients. Fork adding cross-device model lending/borrowing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek",
|