@goodandready/dsh-ollama-cloud-provider 0.1.30 → 0.1.31
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/CHANGELOG.md +12 -0
- package/README.md +4 -4
- package/README.ru.md +4 -4
- package/README.zh.md +4 -4
- package/lib/index.js +15 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.31 — 2026-11-06
|
|
4
|
+
|
|
5
|
+
- Robustness: wrapped ndjson streaming chunk and tail JSON parsing in try/catch
|
|
6
|
+
to safely discard or report corrupted chunks without aborting the connection abruptly (#97).
|
|
7
|
+
- Route Security: restricted `readOnly` check in route handlers to non-GET methods only
|
|
8
|
+
(`req.method !== 'GET'`), avoiding premature rejects on idempotent read probes (#98).
|
|
9
|
+
- Deterministic Tests: enforced `--test-concurrency=1` in `package.json` test runner
|
|
10
|
+
to ensure deterministic test order and prevent timer/teardown races under Node 24 (#99).
|
|
11
|
+
- UI Defaults: explicitly verified and locked invariant that all on-screen UI badges and
|
|
12
|
+
widgets (specifically `showSidebarQuota`) remain disabled by default (`false`) and must
|
|
13
|
+
be explicitly enabled by user in settings (#100).
|
|
14
|
+
|
|
3
15
|
## 0.1.30 — 2026-11-05
|
|
4
16
|
|
|
5
17
|
- Security: credential writes now accept only the configured default/account
|
package/README.md
CHANGED
|
@@ -121,17 +121,17 @@ npm pack
|
|
|
121
121
|
Install the published package:
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
dsh plugin --profile web add @goodandready/dsh-ollama-cloud-provider@0.1.
|
|
124
|
+
dsh plugin --profile web add @goodandready/dsh-ollama-cloud-provider@0.1.31
|
|
125
125
|
# DSH Desktop:
|
|
126
|
-
dsh plugin --profile desktop add @goodandready/dsh-ollama-cloud-provider@0.1.
|
|
126
|
+
dsh plugin --profile desktop add @goodandready/dsh-ollama-cloud-provider@0.1.31
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Or install the packed tarball into a profile:
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
dsh plugin --profile web add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.
|
|
132
|
+
dsh plugin --profile web add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.31.tgz
|
|
133
133
|
# DSH Desktop:
|
|
134
|
-
dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.
|
|
134
|
+
dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.31.tgz
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
Restart dsh (or DSH Desktop), then pick **Ollama Cloud** in the model picker.
|
package/README.ru.md
CHANGED
|
@@ -103,17 +103,17 @@ npm pack
|
|
|
103
103
|
Установка опубликованного пакета из npm:
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
dsh plugin --profile web add @goodandready/dsh-ollama-cloud-provider@0.1.
|
|
106
|
+
dsh plugin --profile web add @goodandready/dsh-ollama-cloud-provider@0.1.31
|
|
107
107
|
# DSH Desktop:
|
|
108
|
-
dsh plugin --profile desktop add @goodandready/dsh-ollama-cloud-provider@0.1.
|
|
108
|
+
dsh plugin --profile desktop add @goodandready/dsh-ollama-cloud-provider@0.1.31
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
Либо установка из упакованного tarball:
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
dsh plugin --profile web add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.
|
|
114
|
+
dsh plugin --profile web add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.31.tgz
|
|
115
115
|
# DSH Desktop:
|
|
116
|
-
dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.
|
|
116
|
+
dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.31.tgz
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
После установки перезапустите dsh (или DSH Desktop) и выберите **Ollama Cloud** в списке моделей.
|
package/README.zh.md
CHANGED
|
@@ -102,17 +102,17 @@ npm pack
|
|
|
102
102
|
从 npm 安装已发布版本:
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
|
-
dsh plugin --profile web add @goodandready/dsh-ollama-cloud-provider@0.1.
|
|
105
|
+
dsh plugin --profile web add @goodandready/dsh-ollama-cloud-provider@0.1.31
|
|
106
106
|
# DSH 桌面端:
|
|
107
|
-
dsh plugin --profile desktop add @goodandready/dsh-ollama-cloud-provider@0.1.
|
|
107
|
+
dsh plugin --profile desktop add @goodandready/dsh-ollama-cloud-provider@0.1.31
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
或通过打包文件安装:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
-
dsh plugin --profile web add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.
|
|
113
|
+
dsh plugin --profile web add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.31.tgz
|
|
114
114
|
# DSH 桌面端:
|
|
115
|
-
dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.
|
|
115
|
+
dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud-provider-0.1.31.tgz
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
安装完成后重启 dsh 或 DSH 桌面端,在模型列表中选择 **Ollama Cloud** 即可。
|
package/lib/index.js
CHANGED
|
@@ -124,7 +124,7 @@ const DEFAULT_API_BASE = "https://ollama.com";
|
|
|
124
124
|
const DEFAULT_OPENAI_BASE = "https://ollama.com/v1";
|
|
125
125
|
const DEFAULT_USAGE_URL = "https://ollama.com/api/usage";
|
|
126
126
|
const DEFAULT_BALANCE_URL = "https://ollama.com/api/balance";
|
|
127
|
-
const DEFAULT_USER_AGENT = "dsh-ollama-cloud-provider/0.1.
|
|
127
|
+
const DEFAULT_USER_AGENT = "dsh-ollama-cloud-provider/0.1.31";
|
|
128
128
|
const DEFAULT_CONTEXT_WINDOW = 131072;
|
|
129
129
|
const DEFAULT_MAX_TOKENS = 32768;
|
|
130
130
|
const DEFAULT_GENERATE_MAX_TOKENS = 131072;
|
|
@@ -2249,13 +2249,24 @@ async function* ndjsonObjects(body, idleTimeoutMs, signal) {
|
|
|
2249
2249
|
const line = buffer.slice(0, boundary).trim();
|
|
2250
2250
|
buffer = buffer.slice(boundary + 1);
|
|
2251
2251
|
if (line === "") continue;
|
|
2252
|
-
|
|
2252
|
+
let parsed;
|
|
2253
|
+
try {
|
|
2254
|
+
parsed = JSON.parse(line);
|
|
2255
|
+
} catch (error) {
|
|
2256
|
+
bestEffortFailed("ndjson line parse failed", error);
|
|
2257
|
+
continue;
|
|
2258
|
+
}
|
|
2253
2259
|
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) yield parsed;
|
|
2254
2260
|
}
|
|
2255
2261
|
}
|
|
2256
2262
|
const tail = buffer.trim();
|
|
2257
2263
|
if (tail !== "") {
|
|
2258
|
-
|
|
2264
|
+
let parsed;
|
|
2265
|
+
try {
|
|
2266
|
+
parsed = JSON.parse(tail);
|
|
2267
|
+
} catch (error) {
|
|
2268
|
+
bestEffortFailed("ndjson tail parse failed", error);
|
|
2269
|
+
}
|
|
2259
2270
|
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) yield parsed;
|
|
2260
2271
|
}
|
|
2261
2272
|
} finally {
|
|
@@ -4903,7 +4914,7 @@ function applyRoutes(ctx, web, deps) {
|
|
|
4903
4914
|
}));
|
|
4904
4915
|
};
|
|
4905
4916
|
const readOnly = (req, res) => {
|
|
4906
|
-
if (req.method !== "GET"
|
|
4917
|
+
if (req.method !== "GET") {
|
|
4907
4918
|
json(res, 405, { error: "GET required" });
|
|
4908
4919
|
return false;
|
|
4909
4920
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-ollama-cloud-provider",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "Ollama Cloud LLM provider plugin for DeepSeek Harness (dsh).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"build": "tsdown",
|
|
74
74
|
"prepare": "tsdown 1>&2",
|
|
75
75
|
"typecheck": "tsc --noEmit",
|
|
76
|
-
"test": "node --import tsx --test tests/core.test.ts tests/usage.test.ts tests/adapter.test.ts tests/routes.test.ts tests/native.test.ts tests/openai-chat.test.ts tests/commands.test.ts tests/tui-settings.test.ts tests/analytics.test.ts tests/apply.test.ts tests/account-rules.test.ts tests/request-log.test.ts tests/image-budget.test.ts tests/tool-schema.test.ts tests/tools.test.ts tests/plugin-updater.test.ts tests/compat.test.ts tests/status.test.ts tests/settings-draft.test.ts tests/update-state.test.ts tests/ui-render.test.tsx tests/update-card-view.test.tsx tests/web.test.ts tests/mock-ollama.test.ts tests/reasoning.test.ts tests/catalog-cache.test.ts tests/attempt.test.ts tests/model-groups.test.tsx tests/discovery.test.ts tests/sanitize.test.ts tests/retry.test.ts tests/provider-card.test.tsx tests/host-verification.test.ts",
|
|
76
|
+
"test": "node --import tsx --test --test-concurrency=1 tests/core.test.ts tests/usage.test.ts tests/adapter.test.ts tests/routes.test.ts tests/native.test.ts tests/openai-chat.test.ts tests/commands.test.ts tests/tui-settings.test.ts tests/analytics.test.ts tests/apply.test.ts tests/account-rules.test.ts tests/request-log.test.ts tests/image-budget.test.ts tests/tool-schema.test.ts tests/tools.test.ts tests/plugin-updater.test.ts tests/compat.test.ts tests/status.test.ts tests/settings-draft.test.ts tests/update-state.test.ts tests/ui-render.test.tsx tests/update-card-view.test.tsx tests/web.test.ts tests/mock-ollama.test.ts tests/reasoning.test.ts tests/catalog-cache.test.ts tests/attempt.test.ts tests/model-groups.test.tsx tests/discovery.test.ts tests/sanitize.test.ts tests/retry.test.ts tests/provider-card.test.tsx tests/host-verification.test.ts",
|
|
77
77
|
"check": "npm run typecheck && npm test && npm run build",
|
|
78
78
|
"release": "npm run check && npm pack",
|
|
79
79
|
"sync:models": "node scripts/sync-models.mjs"
|