@goodandready/dsh-ollama-cloud-provider 0.1.30 → 0.1.32
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 +18 -0
- package/README.md +4 -4
- package/README.ru.md +4 -4
- package/README.zh.md +4 -4
- package/lib/client.js +12 -5
- package/lib/index.js +24 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.32 — 2026-11-06
|
|
4
|
+
|
|
5
|
+
- Reliability: handled already-aborted signal check in adapter test mock to prevent hanging promises under load (#102).
|
|
6
|
+
- Diagnostics: routed catalog snapshot cleanup and TUI registration errors through `bestEffortFailed` (#103).
|
|
7
|
+
- Accessibility: added `aria-expanded` and CSS-rotated chevron indicator to collapsible model groups (#104).
|
|
8
|
+
|
|
9
|
+
## 0.1.31 — 2026-11-06
|
|
10
|
+
|
|
11
|
+
- Robustness: wrapped ndjson streaming chunk and tail JSON parsing in try/catch
|
|
12
|
+
to safely discard or report corrupted chunks without aborting the connection abruptly (#97).
|
|
13
|
+
- Route Security: restricted `readOnly` check in route handlers to non-GET methods only
|
|
14
|
+
(`req.method !== 'GET'`), avoiding premature rejects on idempotent read probes (#98).
|
|
15
|
+
- Deterministic Tests: enforced `--test-concurrency=1` in `package.json` test runner
|
|
16
|
+
to ensure deterministic test order and prevent timer/teardown races under Node 24 (#99).
|
|
17
|
+
- UI Defaults: explicitly verified and locked invariant that all on-screen UI badges and
|
|
18
|
+
widgets (specifically `showSidebarQuota`) remain disabled by default (`false`) and must
|
|
19
|
+
be explicitly enabled by user in settings (#100).
|
|
20
|
+
|
|
3
21
|
## 0.1.30 — 2026-11-05
|
|
4
22
|
|
|
5
23
|
- 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.32
|
|
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.32
|
|
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.32.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.32.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.32
|
|
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.32
|
|
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.32.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.32.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.32
|
|
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.32
|
|
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.32.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.32.tgz
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
安装完成后重启 dsh 或 DSH 桌面端,在模型列表中选择 **Ollama Cloud** 即可。
|
package/lib/client.js
CHANGED
|
@@ -3067,12 +3067,16 @@ window.__ModuleLoader__.load({
|
|
|
3067
3067
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3068
3068
|
type: "button",
|
|
3069
3069
|
className: "ocl-model-group-head",
|
|
3070
|
+
"aria-expanded": collapsedGroups[group.key] !== true,
|
|
3070
3071
|
onClick: () => toggleGroup(group.key),
|
|
3071
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3072
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3073
|
+
className: "ocl-group-title",
|
|
3074
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3075
|
+
className: `ocl-chevron ${collapsedGroups[group.key] === true ? "ocl-chevron-collapsed" : ""}`,
|
|
3076
|
+
"aria-hidden": "true",
|
|
3077
|
+
children: "▾"
|
|
3078
|
+
}), group.label]
|
|
3079
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3076
3080
|
className: "ocl-badge",
|
|
3077
3081
|
children: group.models.length
|
|
3078
3082
|
})]
|
|
@@ -3749,6 +3753,9 @@ window.__ModuleLoader__.load({
|
|
|
3749
3753
|
.ocl-drag-handle { cursor: grab; color: var(--ocl-text-secondary); user-select: none; }
|
|
3750
3754
|
.ocl-dragging { opacity: 0.5; }
|
|
3751
3755
|
.ocl-model-group { display: flex; flex-direction: column; gap: 2px; }
|
|
3756
|
+
.ocl-group-title { display: inline-flex; align-items: center; gap: 6px; }
|
|
3757
|
+
.ocl-chevron { display: inline-block; transition: transform 0.15s ease; font-size: 10px; line-height: 1; }
|
|
3758
|
+
.ocl-chevron-collapsed { transform: rotate(-90deg); }
|
|
3752
3759
|
.ocl-model-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 4px 0; border: 0; background: none; color: var(--ocl-text-secondary); font-size: 11px; font-weight: 650; cursor: pointer; text-align: left; }
|
|
3753
3760
|
.ocl-model-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
3754
3761
|
.ocl-model-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--ocl-text-secondary); font-size: 11px; }
|
package/lib/index.js
CHANGED
|
@@ -88,7 +88,7 @@ function setBestEffortLogger(logger) {
|
|
|
88
88
|
function bestEffortFailed(label, error) {
|
|
89
89
|
try {
|
|
90
90
|
sink?.debug?.(`${label}: ${redactText(error instanceof Error ? error.message : String(error))}`);
|
|
91
|
-
} catch {}
|
|
91
|
+
} catch (caught) {}
|
|
92
92
|
}
|
|
93
93
|
// src/attempt.ts
|
|
94
94
|
/** One abort/timeout budget for one attempt; callers create a fresh one per retry. */
|
|
@@ -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.32";
|
|
128
128
|
const DEFAULT_CONTEXT_WINDOW = 131072;
|
|
129
129
|
const DEFAULT_MAX_TOKENS = 32768;
|
|
130
130
|
const DEFAULT_GENERATE_MAX_TOKENS = 131072;
|
|
@@ -451,14 +451,18 @@ async function saveCatalogSnapshot(baseURL, ids, meta) {
|
|
|
451
451
|
bestEffortFailed("catalog cache write failed", error);
|
|
452
452
|
try {
|
|
453
453
|
await unlink(temp);
|
|
454
|
-
} catch {
|
|
454
|
+
} catch (unlinkError) {
|
|
455
|
+
bestEffortFailed("cleanup temp cache failed", unlinkError);
|
|
456
|
+
}
|
|
455
457
|
}
|
|
456
458
|
}
|
|
457
459
|
/** Remove the persistent snapshot together with the in-memory cache. */
|
|
458
460
|
function clearCatalogSnapshot() {
|
|
459
461
|
try {
|
|
460
462
|
unlinkSync(catalogCachePath());
|
|
461
|
-
} catch {
|
|
463
|
+
} catch (error) {
|
|
464
|
+
if (error.code !== "ENOENT") bestEffortFailed("clear catalog snapshot failed", error);
|
|
465
|
+
}
|
|
462
466
|
}
|
|
463
467
|
// src/models.generated.ts
|
|
464
468
|
const GENERATED_MODELS = {
|
|
@@ -2249,13 +2253,24 @@ async function* ndjsonObjects(body, idleTimeoutMs, signal) {
|
|
|
2249
2253
|
const line = buffer.slice(0, boundary).trim();
|
|
2250
2254
|
buffer = buffer.slice(boundary + 1);
|
|
2251
2255
|
if (line === "") continue;
|
|
2252
|
-
|
|
2256
|
+
let parsed;
|
|
2257
|
+
try {
|
|
2258
|
+
parsed = JSON.parse(line);
|
|
2259
|
+
} catch (error) {
|
|
2260
|
+
bestEffortFailed("ndjson line parse failed", error);
|
|
2261
|
+
continue;
|
|
2262
|
+
}
|
|
2253
2263
|
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) yield parsed;
|
|
2254
2264
|
}
|
|
2255
2265
|
}
|
|
2256
2266
|
const tail = buffer.trim();
|
|
2257
2267
|
if (tail !== "") {
|
|
2258
|
-
|
|
2268
|
+
let parsed;
|
|
2269
|
+
try {
|
|
2270
|
+
parsed = JSON.parse(tail);
|
|
2271
|
+
} catch (error) {
|
|
2272
|
+
bestEffortFailed("ndjson tail parse failed", error);
|
|
2273
|
+
}
|
|
2259
2274
|
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) yield parsed;
|
|
2260
2275
|
}
|
|
2261
2276
|
} finally {
|
|
@@ -4903,7 +4918,7 @@ function applyRoutes(ctx, web, deps) {
|
|
|
4903
4918
|
}));
|
|
4904
4919
|
};
|
|
4905
4920
|
const readOnly = (req, res) => {
|
|
4906
|
-
if (req.method !== "GET"
|
|
4921
|
+
if (req.method !== "GET") {
|
|
4907
4922
|
json(res, 405, { error: "GET required" });
|
|
4908
4923
|
return false;
|
|
4909
4924
|
}
|
|
@@ -5392,8 +5407,9 @@ function applyOllamaTuiSettings(ctx, deps) {
|
|
|
5392
5407
|
remove?.();
|
|
5393
5408
|
try {
|
|
5394
5409
|
remove = service.register(buildOllamaTuiSection(deps));
|
|
5395
|
-
} catch {
|
|
5410
|
+
} catch (error) {
|
|
5396
5411
|
remove = void 0;
|
|
5412
|
+
bestEffortFailed("tui section registration failed", error);
|
|
5397
5413
|
}
|
|
5398
5414
|
};
|
|
5399
5415
|
refresh();
|
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.32",
|
|
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"
|