@goodandready/dsh-ollama-cloud-provider 0.1.3 → 0.1.5
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 +79 -57
- package/NOTICE +15 -15
- package/README.md +8 -7
- package/README.ru.md +6 -5
- package/README.zh.md +6 -5
- package/cordis.patch.yml +11 -11
- package/lib/client.js +80 -64
- package/lib/index.d.ts +3 -0
- package/lib/index.js +47 -5
- package/package.json +121 -121
package/CHANGELOG.md
CHANGED
|
@@ -1,57 +1,79 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 0.1.
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.5 — 2026-10-22
|
|
4
|
+
|
|
5
|
+
- Write routes now require an `Origin` or `Referer` whose host matches `Host`;
|
|
6
|
+
a request with neither is rejected with 403. This closes the LAN-bridge path
|
|
7
|
+
that rewrites both Host and socket to loopback (#28).
|
|
8
|
+
- Added route-guard tests for 405, non-loopback Host/socket, cross-origin and
|
|
9
|
+
missing sources, plus native stream parser tests for text, thinking, tool
|
|
10
|
+
calls, in-band quota errors, aborts, idle timeouts, abrupt closes and empty
|
|
11
|
+
streams (#26).
|
|
12
|
+
- `prepare` now sends tsdown output to stderr, so `npm pack --json` stays
|
|
13
|
+
parseable and preflight can inspect the package (#25).
|
|
14
|
+
- DESIGN.md now records the 64-token Test connection budget and its reason (#27).
|
|
15
|
+
|
|
16
|
+
## 0.1.4 — 2026-10-21
|
|
17
|
+
|
|
18
|
+
- Model list rows now use the reference three-column grid: badges live inside
|
|
19
|
+
the name cell, so rows no longer stretch, wrap into empty gaps or truncate the
|
|
20
|
+
model id to a single character (#20).
|
|
21
|
+
- The sidebar quota card uses the reference 16px ring and no longer appends the
|
|
22
|
+
internal `default` account label. An optional `planLabel` (for example `PRO`)
|
|
23
|
+
can be shown next to the provider name instead (#21).
|
|
24
|
+
|
|
25
|
+
## 0.1.3 — 2026-10-21
|
|
26
|
+
|
|
27
|
+
- Aligned README documentation trio with dsh-documentation-standard: added standardized Hero headers, goodandready.app hub badges, support tables, and Mermaid architecture diagrams across English, Russian, and Chinese documentations.
|
|
28
|
+
- Updated installation instructions and package version parity.
|
|
29
|
+
|
|
30
|
+
## 0.1.2 — 2026-10-21
|
|
31
|
+
|
|
32
|
+
- Test connection falls back to the reasoning text when a thinking model returns
|
|
33
|
+
no content, and uses a 64-token budget (#17).
|
|
34
|
+
- Production acceptance of 0.1.1 confirmed chat, catalog and balance; the probe
|
|
35
|
+
is the only follow-up defect.
|
|
36
|
+
|
|
37
|
+
## 0.1.1 — 2026-10-21
|
|
38
|
+
|
|
39
|
+
Audit fixes (Gitea #1–#15):
|
|
40
|
+
|
|
41
|
+
- A transient transport/timeout/server failure no longer cools down the only
|
|
42
|
+
configured account; the harness retry policy can recover. Credential and quota
|
|
43
|
+
rejections still cool the key (#1).
|
|
44
|
+
- Removed the unimplemented `toolUpdate: 'addition-only'` declaration so the
|
|
45
|
+
model always receives the full tool list (#2).
|
|
46
|
+
- `/dsh-ollama/key` and `/key/clear` only accept this plugin's credential
|
|
47
|
+
references (`apiKeyEnv`, configured account refs and `OLLAMA_*`) (#3).
|
|
48
|
+
- The sidebar quota card honors `showSidebarQuota`, stays unmounted while the
|
|
49
|
+
setting is off and stops polling `/state` (#4).
|
|
50
|
+
- The injected stylesheet carries `data-dsh-plugin` so neighbouring plugin
|
|
51
|
+
cleanup cannot strip it (#5).
|
|
52
|
+
- Analytics uses the shared `estimateCost` implementation and applies
|
|
53
|
+
`priceOverrides` (#7).
|
|
54
|
+
- Empty catch blocks report through `bestEffortFailed` at debug level (#8).
|
|
55
|
+
- Removed unused modules and exports (`quota-runway`, `requireImages`,
|
|
56
|
+
`clearAnalyticsCache`, `PLUGIN_PROVIDERS`, `showUrlFor`) (#9).
|
|
57
|
+
- Heatmap and theme values no longer hardcode colors (#10).
|
|
58
|
+
- Test-connection requests disable thinking and use a 32-token budget (#11).
|
|
59
|
+
- The request log is flushed on shutdown (#12).
|
|
60
|
+
- Architecture documentation moved to `docs/design/ARCHITECTURE.md`; the
|
|
61
|
+
design contract lives in `docs/design/DESIGN.md` (#13).
|
|
62
|
+
- Added wiring, analytics, route-guard and adapter regression tests (#14).
|
|
63
|
+
- Account rows show the 7-day spend without a meaningless percentage (#15).
|
|
64
|
+
|
|
65
|
+
## 0.1.0
|
|
66
|
+
|
|
67
|
+
Initial release.
|
|
68
|
+
|
|
69
|
+
- Registers the `ollama-cloud` provider route for DeepSeek Harness.
|
|
70
|
+
- Native `/api/chat` transport (NDJSON) with thinking, tool calls, images and usage counters.
|
|
71
|
+
- OpenAI-compatible `/v1/chat/completions` transport selectable per model.
|
|
72
|
+
- Live model catalog from `/v1/models` enriched with `/api/tags` capabilities, plus an offline snapshot.
|
|
73
|
+
- Balance from `/api/balance` (credits and legacy percentage windows) and spend from `/api/usage`
|
|
74
|
+
with 24-hour, 7-day and 30-day windows and per-model groups.
|
|
75
|
+
- Multi-account rotation before the first streamed token, persistent cooldowns, sticky sessions and
|
|
76
|
+
model → account glob rules.
|
|
77
|
+
- Price estimates including off-peak rates and per-model overrides.
|
|
78
|
+
- Settings page, sidebar quota card, quota/analytics panel with a request heatmap, `/ollama` command,
|
|
79
|
+
TUI settings section and one-click plugin update.
|
package/NOTICE
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
dsh-ollama-cloud-provider
|
|
2
|
-
Copyright (c) 2026 GooDAnDReaDY
|
|
3
|
-
|
|
4
|
-
This product is MIT-licensed (see LICENSE).
|
|
5
|
-
|
|
6
|
-
Third-party references and attribution:
|
|
7
|
-
|
|
8
|
-
- The plugin structure, cordis lifecycle wiring, HTTP route guards, request log, analytics reader,
|
|
9
|
-
quota runway and generic client widgets were adapted from the author's own
|
|
10
|
-
`@goodandready/dsh-opencode-provider` (MIT).
|
|
11
|
-
- The feature set was informed by `@goodandready/dsh-clinebot` (MIT) and
|
|
12
|
-
`@mars-sea/dsh-commandcode-provider` (MIT). No vendor code from those packages is bundled.
|
|
13
|
-
- DeepSeek Harness packages (`@deepseek-ai/*`) are host-owned peer dependencies and are not bundled.
|
|
14
|
-
- Ollama Cloud API facts were verified against the public documentation and live endpoints on
|
|
15
|
-
2026-10-21. Ollama is a trademark of its respective owner; this plugin is unofficial.
|
|
1
|
+
dsh-ollama-cloud-provider
|
|
2
|
+
Copyright (c) 2026 GooDAnDReaDY
|
|
3
|
+
|
|
4
|
+
This product is MIT-licensed (see LICENSE).
|
|
5
|
+
|
|
6
|
+
Third-party references and attribution:
|
|
7
|
+
|
|
8
|
+
- The plugin structure, cordis lifecycle wiring, HTTP route guards, request log, analytics reader,
|
|
9
|
+
quota runway and generic client widgets were adapted from the author's own
|
|
10
|
+
`@goodandready/dsh-opencode-provider` (MIT).
|
|
11
|
+
- The feature set was informed by `@goodandready/dsh-clinebot` (MIT) and
|
|
12
|
+
`@mars-sea/dsh-commandcode-provider` (MIT). No vendor code from those packages is bundled.
|
|
13
|
+
- DeepSeek Harness packages (`@deepseek-ai/*`) are host-owned peer dependencies and are not bundled.
|
|
14
|
+
- Ollama Cloud API facts were verified against the public documentation and live endpoints on
|
|
15
|
+
2026-10-21. Ollama is a trademark of its respective owner; this plugin is unofficial.
|
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ graph LR
|
|
|
84
84
|
- **Price estimates** from the published Ollama pricing table, including off-peak rates, with per-model overrides.
|
|
85
85
|
- **Browser UI**:
|
|
86
86
|
- **Settings → Ollama Cloud**: key, balance, accounts, rules, model allowlist, per-model transport, connection settings.
|
|
87
|
-
- **Sidebar quota card** (off by default, and it does not poll `/state` while disabled): a ring with the highest used window and rows with remaining credits or legacy windows.
|
|
87
|
+
- **Sidebar quota card** (off by default, and it does not poll `/state` while disabled): a ring with the highest used window and rows with remaining credits or legacy windows; an optional `planLabel` is shown next to the provider name.
|
|
88
88
|
- **Center quota panel**: spend windows, spend by model, accounts, routing trace, usage analytics and a request heatmap.
|
|
89
89
|
- **`/ollama` command** for status, usage, balance, accounts, models, rules and `test [model]`.
|
|
90
90
|
- **TUI settings section** for terminal profiles.
|
|
@@ -103,17 +103,17 @@ npm pack
|
|
|
103
103
|
Install the published package:
|
|
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.5
|
|
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.5
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
Or install the packed tarball into a profile:
|
|
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.5.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.5.tgz
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
Restart dsh (or DSH Desktop), then pick **Ollama Cloud** in the model picker.
|
|
@@ -142,6 +142,7 @@ Restart dsh (or DSH Desktop), then pick **Ollama Cloud** in the model picker.
|
|
|
142
142
|
activeAccount: '' # label or credential name to pin
|
|
143
143
|
stickySession: true
|
|
144
144
|
showSidebarQuota: false
|
|
145
|
+
planLabel: '' # optional, e.g. PRO
|
|
145
146
|
```
|
|
146
147
|
|
|
147
148
|
Every field except `apiKey` is volatile and appears in dsh settings.
|
|
@@ -190,10 +191,10 @@ Open **Settings → Ollama Cloud**:
|
|
|
190
191
|
- **Routing** — sticky session per conversation.
|
|
191
192
|
- **Models** — search, refresh the live catalog, hide models, override the wire transport per model, see price, context and capabilities.
|
|
192
193
|
- **Connection** — native and OpenAI bases, usage and balance endpoints, transport, timeouts, output cap and context override.
|
|
193
|
-
- **Sidebar** — show or hide the quota card.
|
|
194
|
+
- **Sidebar** — show or hide the quota card, and an optional plan label (for example `PRO`) shown next to the provider name.
|
|
194
195
|
- **Plugin update** — current/latest version and **Update now**.
|
|
195
196
|
|
|
196
|
-
The Host serves `/dsh-ollama/state`, `/health`, `/analytics`, `/usage`, `/balance`, `/config`, `/key`, `/key/clear`, `/refresh`, `/models/refresh`, `/test` and `/update`. Writes require JSON,
|
|
197
|
+
The Host serves `/dsh-ollama/state`, `/health`, `/analytics`, `/usage`, `/balance`, `/config`, `/key`, `/key/clear`, `/refresh`, `/models/refresh`, `/test` and `/update`. Writes require JSON, an `Origin` or `Referer` matching `Host`, and are restricted to loopback (`127.0.0.1` / `::1`); a write without either source header is rejected with 403.
|
|
197
198
|
|
|
198
199
|
## Command
|
|
199
200
|
|
package/README.ru.md
CHANGED
|
@@ -84,7 +84,7 @@ graph LR
|
|
|
84
84
|
- **Оценка стоимости**: тарификация по официальному прайс-листу Ollama Cloud, включая ночные скидки (off-peak rates) и возможность ручного переопределения цен на модель.
|
|
85
85
|
- **Интерфейс в браузере (Web UI)**:
|
|
86
86
|
- **Настройки → Ollama Cloud**: управление ключами, отображение баланса, пул аккаунтов, правила маршрутизации, allowlist моделей, выбор транспорта.
|
|
87
|
-
- **Карточка квоты в сайдбаре**: кольцевой индикатор с наиболее загруженным окном и детализацией остатка кредитов (по умолчанию выключена и не нагружает сеть фоновыми
|
|
87
|
+
- **Карточка квоты в сайдбаре**: кольцевой индикатор с наиболее загруженным окном и детализацией остатка кредитов (по умолчанию выключена и не нагружает сеть фоновыми опросами; рядом с названием можно показать `planLabel`, например `PRO`).
|
|
88
88
|
- **Центральная панель квот**: окна расходов, разбивка по моделям, трейс маршрутизации, аналитика токенов и интерактивный heatmap запросов.
|
|
89
89
|
- **Команда `/ollama`**: статус провайдера, квоты, баланс, список аккаунтов, моделей, правил и запуск тестового запроса `test [model]`.
|
|
90
90
|
- **Интеграция с терминалом (TUI)**: специальная секция настроек в терминальном режиме.
|
|
@@ -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.5
|
|
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.5
|
|
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.5.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.5.tgz
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
После установки перезапустите dsh (или DSH Desktop) и выберите **Ollama Cloud** в списке моделей.
|
|
@@ -137,6 +137,7 @@ dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud
|
|
|
137
137
|
activeAccount: '' # метка для принудительного закрепления
|
|
138
138
|
stickySession: true
|
|
139
139
|
showSidebarQuota: false
|
|
140
|
+
planLabel: '' # необязательно, например PRO
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
Все поля, кроме `apiKey`, доступны для изменения в интерфейсе настроек DSH.
|
package/README.zh.md
CHANGED
|
@@ -84,7 +84,7 @@ graph LR
|
|
|
84
84
|
- **成本透明估算**:依据官方发布的价目表(包含闲时优惠折扣)进行费用估算,支持按模型覆盖价格。
|
|
85
85
|
- **Web UI 与交互卡片**:
|
|
86
86
|
- **设置 → Ollama Cloud**:密钥配置、余额显示、账号池管理、模型白名单与协议切换。
|
|
87
|
-
-
|
|
87
|
+
- **侧边栏配额指示卡片**:环形展示最高额度窗口(默认关闭且不产生后台轮询;可在名称旁显示 `planLabel`,例如 `PRO`)。
|
|
88
88
|
- **中央用量分析面板**:支出窗口、请求热力图与用量走势。
|
|
89
89
|
- **`/ollama` 快捷指令**:快速查询状态、额度、余额、账号列表与执行联通性测试。
|
|
90
90
|
- **一键热更新**:在 DSH 设置页直接检测 npm 最新版本并快速安装更新。
|
|
@@ -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.5
|
|
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.5
|
|
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.5.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.5.tgz
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
安装完成后重启 dsh 或 DSH 桌面端,在模型列表中选择 **Ollama Cloud** 即可。
|
|
@@ -136,6 +136,7 @@ dsh plugin --profile desktop add /absolute/path/to/goodandready-dsh-ollama-cloud
|
|
|
136
136
|
activeAccount: '' # 固定指定活跃账号
|
|
137
137
|
stickySession: true
|
|
138
138
|
showSidebarQuota: false
|
|
139
|
+
planLabel: '' # 可选,例如 PRO
|
|
139
140
|
```
|
|
140
141
|
|
|
141
142
|
除 `apiKey` 外的所有配置项均可在 DSH 设置页直接修改。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# dsh-ollama-cloud-provider bundle layer.
|
|
2
|
-
# Registers the `ollama-cloud` provider route. All fields are optional —
|
|
3
|
-
# schema defaults apply.
|
|
4
|
-
#
|
|
5
|
-
# `name` must be the FULL package specifier as installed in the profile's
|
|
6
|
-
# node_modules. Quote it: an unquoted YAML scalar starting with `@` fails.
|
|
7
|
-
- insert:
|
|
8
|
-
- id: llm-ollama-cloud
|
|
9
|
-
name: "@goodandready/dsh-ollama-cloud-provider"
|
|
10
|
-
config:
|
|
11
|
-
apiKeyEnv: OLLAMA_API_KEY
|
|
1
|
+
# dsh-ollama-cloud-provider bundle layer.
|
|
2
|
+
# Registers the `ollama-cloud` provider route. All fields are optional —
|
|
3
|
+
# schema defaults apply.
|
|
4
|
+
#
|
|
5
|
+
# `name` must be the FULL package specifier as installed in the profile's
|
|
6
|
+
# node_modules. Quote it: an unquoted YAML scalar starting with `@` fails.
|
|
7
|
+
- insert:
|
|
8
|
+
- id: llm-ollama-cloud
|
|
9
|
+
name: "@goodandready/dsh-ollama-cloud-provider"
|
|
10
|
+
config:
|
|
11
|
+
apiKeyEnv: OLLAMA_API_KEY
|
package/lib/client.js
CHANGED
|
@@ -120,6 +120,8 @@ window.__ModuleLoader__.load({
|
|
|
120
120
|
sidebar: "Sidebar",
|
|
121
121
|
showSidebarQuota: "Show the quota card in the sidebar",
|
|
122
122
|
showSidebarQuotaHint: "The card appears above Settings and opens this panel.",
|
|
123
|
+
planLabel: "Plan label",
|
|
124
|
+
planLabelHint: "Optional label shown on the sidebar card, for example PRO. Ollama does not expose the plan name via API.",
|
|
123
125
|
usageAnalytics: "Usage analytics",
|
|
124
126
|
analyticsEmpty: "No Ollama Cloud sessions in this window.",
|
|
125
127
|
analyticsHint: "Aggregated from the local session projection cache: numeric metadata only, no prompt text.",
|
|
@@ -277,6 +279,8 @@ window.__ModuleLoader__.load({
|
|
|
277
279
|
sidebar: "侧边栏",
|
|
278
280
|
showSidebarQuota: "在侧边栏显示配额卡片",
|
|
279
281
|
showSidebarQuotaHint: "卡片显示在设置上方,点击可打开此面板。",
|
|
282
|
+
planLabel: "套餐标签",
|
|
283
|
+
planLabelHint: "侧边栏卡片上显示的可选标签,例如 PRO。Ollama API 不提供套餐名称。",
|
|
280
284
|
usageAnalytics: "用量分析",
|
|
281
285
|
analyticsEmpty: "此窗口内没有 Ollama Cloud 会话。",
|
|
282
286
|
analyticsHint: "来自本地会话投影缓存,仅包含数值元数据,不读取提示词。",
|
|
@@ -1005,8 +1009,8 @@ window.__ModuleLoader__.load({
|
|
|
1005
1009
|
};
|
|
1006
1010
|
}
|
|
1007
1011
|
function MiniRing(props) {
|
|
1008
|
-
const size = props.size ??
|
|
1009
|
-
const radius =
|
|
1012
|
+
const size = props.size ?? 16;
|
|
1013
|
+
const radius = 7;
|
|
1010
1014
|
const circumference = 2 * Math.PI * radius;
|
|
1011
1015
|
const filled = Math.max(0, Math.min(100, props.percent)) / 100;
|
|
1012
1016
|
const stroke = props.percent >= 90 ? "var(--ocl-danger)" : props.percent >= 75 ? "var(--ocl-warning)" : "var(--ocl-accent)";
|
|
@@ -1014,24 +1018,24 @@ window.__ModuleLoader__.load({
|
|
|
1014
1018
|
className: "ocl-ring",
|
|
1015
1019
|
width: size,
|
|
1016
1020
|
height: size,
|
|
1017
|
-
viewBox: "0 0
|
|
1021
|
+
viewBox: "0 0 20 20",
|
|
1018
1022
|
fill: "none",
|
|
1019
1023
|
"aria-hidden": "true",
|
|
1020
1024
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
1021
|
-
cx: "
|
|
1022
|
-
cy: "
|
|
1025
|
+
cx: "10",
|
|
1026
|
+
cy: "10",
|
|
1023
1027
|
r: radius,
|
|
1024
1028
|
stroke: "var(--ocl-border-strong)",
|
|
1025
|
-
strokeWidth: "
|
|
1029
|
+
strokeWidth: "2.5"
|
|
1026
1030
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
1027
|
-
cx: "
|
|
1028
|
-
cy: "
|
|
1031
|
+
cx: "10",
|
|
1032
|
+
cy: "10",
|
|
1029
1033
|
r: radius,
|
|
1030
1034
|
stroke,
|
|
1031
|
-
strokeWidth: "
|
|
1035
|
+
strokeWidth: "2.5",
|
|
1032
1036
|
strokeLinecap: "round",
|
|
1033
1037
|
strokeDasharray: `${circumference * filled} ${circumference}`,
|
|
1034
|
-
transform: "rotate(-90
|
|
1038
|
+
transform: "rotate(-90 10 10)"
|
|
1035
1039
|
})]
|
|
1036
1040
|
});
|
|
1037
1041
|
}
|
|
@@ -1076,8 +1080,8 @@ window.__ModuleLoader__.load({
|
|
|
1076
1080
|
const report = state?.usage?.report;
|
|
1077
1081
|
const bars = quotaBars(report);
|
|
1078
1082
|
const worst = worstUsedPercent(report);
|
|
1079
|
-
const
|
|
1080
|
-
const name =
|
|
1083
|
+
const plan = state?.config.planLabel?.trim() ?? "";
|
|
1084
|
+
const name = plan === "" ? t("quotaCardName") : `${t("quotaCardName")} · ${plan}`;
|
|
1081
1085
|
const detail = bars.map((entry) => `${entry.label}: ${entry.remainingPercent.toFixed(0)}% ${t("remaining")}`).join(" · ");
|
|
1082
1086
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1083
1087
|
type: "button",
|
|
@@ -1441,6 +1445,7 @@ window.__ModuleLoader__.load({
|
|
|
1441
1445
|
maxOutputTokens: state.config.maxOutputTokens === null ? "" : String(state.config.maxOutputTokens),
|
|
1442
1446
|
contextWindow: state.config.contextWindow === null ? "" : String(state.config.contextWindow),
|
|
1443
1447
|
showSidebarQuota: state.config.showSidebarQuota,
|
|
1448
|
+
planLabel: state.config.planLabel,
|
|
1444
1449
|
activeAccount: state.config.activeAccount,
|
|
1445
1450
|
accounts: state.config.accounts.map((account) => ({ ...account })),
|
|
1446
1451
|
modelAccountRules: state.config.modelAccountRules.map((rule) => ({ ...rule })),
|
|
@@ -1471,6 +1476,7 @@ window.__ModuleLoader__.load({
|
|
|
1471
1476
|
maxOutputTokens: numberOrNull(draft.maxOutputTokens),
|
|
1472
1477
|
contextWindow: numberOrNull(draft.contextWindow),
|
|
1473
1478
|
showSidebarQuota: draft.showSidebarQuota,
|
|
1479
|
+
planLabel: draft.planLabel.trim(),
|
|
1474
1480
|
activeAccount: draft.activeAccount.trim(),
|
|
1475
1481
|
accounts: draft.accounts.map((account) => ({
|
|
1476
1482
|
label: account.label.trim(),
|
|
@@ -1587,63 +1593,67 @@ window.__ModuleLoader__.load({
|
|
|
1587
1593
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1588
1594
|
className: "ocl-model",
|
|
1589
1595
|
children: [
|
|
1590
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
checked: visible,
|
|
1595
|
-
onChange: (event) => onVisible(event.target.checked)
|
|
1596
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1597
|
-
className: "ocl-model-name",
|
|
1598
|
-
title: `${model.name} · ${model.description}`,
|
|
1599
|
-
children: model.id
|
|
1600
|
-
})]
|
|
1596
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1597
|
+
type: "checkbox",
|
|
1598
|
+
checked: visible,
|
|
1599
|
+
onChange: (event) => onVisible(event.target.checked)
|
|
1601
1600
|
}),
|
|
1602
|
-
|
|
1603
|
-
className: "ocl-
|
|
1604
|
-
title:
|
|
1605
|
-
children: t("free")
|
|
1606
|
-
}) : null,
|
|
1607
|
-
!model.free && model.cost.priced ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1608
|
-
className: "ocl-badge",
|
|
1609
|
-
title: t("legendPrice"),
|
|
1601
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1602
|
+
className: "ocl-model-name",
|
|
1603
|
+
title: `${model.name} · ${model.description}`,
|
|
1610
1604
|
children: [
|
|
1611
|
-
|
|
1612
|
-
model.
|
|
1613
|
-
|
|
1614
|
-
|
|
1605
|
+
model.id,
|
|
1606
|
+
model.free ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1607
|
+
className: "ocl-badge",
|
|
1608
|
+
title: t("legendFree"),
|
|
1609
|
+
children: [" ", t("free")]
|
|
1610
|
+
}) : null,
|
|
1611
|
+
!model.free && model.cost.priced ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1612
|
+
className: "ocl-badge",
|
|
1613
|
+
title: t("legendPrice"),
|
|
1614
|
+
children: [
|
|
1615
|
+
" $",
|
|
1616
|
+
model.cost.input,
|
|
1617
|
+
"/$",
|
|
1618
|
+
model.cost.output
|
|
1619
|
+
]
|
|
1620
|
+
}) : null,
|
|
1621
|
+
!model.free && !model.cost.priced ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1622
|
+
className: "ocl-badge",
|
|
1623
|
+
title: t("legendUnknownPrice"),
|
|
1624
|
+
children: [" ", t("priceUnknown")]
|
|
1625
|
+
}) : null,
|
|
1626
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1627
|
+
className: "ocl-badge",
|
|
1628
|
+
title: t("legendContext"),
|
|
1629
|
+
children: [
|
|
1630
|
+
" ",
|
|
1631
|
+
Math.round(model.contextWindow / 1024),
|
|
1632
|
+
"K"
|
|
1633
|
+
]
|
|
1634
|
+
}),
|
|
1635
|
+
model.tools ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1636
|
+
className: "ocl-badge",
|
|
1637
|
+
title: t("legendTools"),
|
|
1638
|
+
children: [" ", t("tools")]
|
|
1639
|
+
}) : null,
|
|
1640
|
+
model.input.includes("image") ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1641
|
+
className: "ocl-badge",
|
|
1642
|
+
children: [" ", t("vision")]
|
|
1643
|
+
}) : null,
|
|
1644
|
+
model.reasoning.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1645
|
+
className: "ocl-badge",
|
|
1646
|
+
title: model.reasoning.join(", "),
|
|
1647
|
+
children: [" ", t("reasoning")]
|
|
1648
|
+
}) : null,
|
|
1649
|
+
model.available ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1650
|
+
className: "ocl-badge ocl-badge-warn",
|
|
1651
|
+
children: [" ", t("unavailable")]
|
|
1652
|
+
})
|
|
1615
1653
|
]
|
|
1616
|
-
}) : null,
|
|
1617
|
-
!model.free && !model.cost.priced ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1618
|
-
className: "ocl-badge",
|
|
1619
|
-
title: t("legendUnknownPrice"),
|
|
1620
|
-
children: t("priceUnknown")
|
|
1621
|
-
}) : null,
|
|
1622
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1623
|
-
className: "ocl-badge",
|
|
1624
|
-
title: t("legendContext"),
|
|
1625
|
-
children: [Math.round(model.contextWindow / 1024), "K"]
|
|
1626
|
-
}),
|
|
1627
|
-
model.tools ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1628
|
-
className: "ocl-badge",
|
|
1629
|
-
title: t("legendTools"),
|
|
1630
|
-
children: t("tools")
|
|
1631
|
-
}) : null,
|
|
1632
|
-
model.input.includes("image") ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1633
|
-
className: "ocl-badge",
|
|
1634
|
-
children: t("vision")
|
|
1635
|
-
}) : null,
|
|
1636
|
-
model.reasoning.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1637
|
-
className: "ocl-badge",
|
|
1638
|
-
title: model.reasoning.join(", "),
|
|
1639
|
-
children: t("reasoning")
|
|
1640
|
-
}) : null,
|
|
1641
|
-
model.available ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1642
|
-
className: "ocl-badge ocl-badge-warn",
|
|
1643
|
-
children: t("unavailable")
|
|
1644
1654
|
}),
|
|
1645
1655
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
1646
|
-
className: "ocl-select
|
|
1656
|
+
className: "ocl-select",
|
|
1647
1657
|
value: transport === "" ? model.transport : transport,
|
|
1648
1658
|
"aria-label": t("transport"),
|
|
1649
1659
|
onChange: (event) => onTransport(event.target.value),
|
|
@@ -2415,6 +2425,12 @@ window.__ModuleLoader__.load({
|
|
|
2415
2425
|
type: "number",
|
|
2416
2426
|
value: draft.contextWindow,
|
|
2417
2427
|
onChange: (value) => update({ contextWindow: value })
|
|
2428
|
+
}),
|
|
2429
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
|
|
2430
|
+
label: t("planLabel"),
|
|
2431
|
+
hint: t("planLabelHint"),
|
|
2432
|
+
value: draft.planLabel,
|
|
2433
|
+
onChange: (value) => update({ planLabel: value })
|
|
2418
2434
|
})
|
|
2419
2435
|
]
|
|
2420
2436
|
})]
|
package/lib/index.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ interface Config {
|
|
|
66
66
|
activeAccount?: string;
|
|
67
67
|
/** Show the quota card in the sidebar. */
|
|
68
68
|
showSidebarQuota?: boolean;
|
|
69
|
+
/** Optional plan label shown on the sidebar card, for example PRO. */
|
|
70
|
+
planLabel?: string;
|
|
69
71
|
/** Per-model price overrides in USD per 1M tokens. */
|
|
70
72
|
priceOverrides?: Record<string, ModelPriceOverride>;
|
|
71
73
|
/** Product user agent sent to Ollama Cloud. */
|
|
@@ -94,6 +96,7 @@ interface ResolvedConfig {
|
|
|
94
96
|
stickySession: boolean;
|
|
95
97
|
activeAccount: string;
|
|
96
98
|
showSidebarQuota: boolean;
|
|
99
|
+
planLabel: string;
|
|
97
100
|
priceOverrides: Readonly<Record<string, ModelPriceOverride>>;
|
|
98
101
|
userAgent: string;
|
|
99
102
|
}
|
package/lib/index.js
CHANGED
|
@@ -51,7 +51,7 @@ const DEFAULT_API_BASE = "https://ollama.com";
|
|
|
51
51
|
const DEFAULT_OPENAI_BASE = "https://ollama.com/v1";
|
|
52
52
|
const DEFAULT_USAGE_URL = "https://ollama.com/api/usage";
|
|
53
53
|
const DEFAULT_BALANCE_URL = "https://ollama.com/api/balance";
|
|
54
|
-
const DEFAULT_USER_AGENT = "dsh-ollama-cloud-provider/0.1.
|
|
54
|
+
const DEFAULT_USER_AGENT = "dsh-ollama-cloud-provider/0.1.5";
|
|
55
55
|
const DEFAULT_CONTEXT_WINDOW = 131072;
|
|
56
56
|
const DEFAULT_MAX_TOKENS = 32768;
|
|
57
57
|
const DEFAULT_GENERATE_MAX_TOKENS = 131072;
|
|
@@ -88,6 +88,7 @@ const Config = z.object({
|
|
|
88
88
|
stickySession: markVolatile(z.boolean().default(true)),
|
|
89
89
|
activeAccount: markVolatile(z.string().default("")),
|
|
90
90
|
showSidebarQuota: markVolatile(z.boolean().default(false)),
|
|
91
|
+
planLabel: markVolatile(z.string().default("")),
|
|
91
92
|
priceOverrides: markVolatile(z.dict(z.object({
|
|
92
93
|
input: z.number().min(0),
|
|
93
94
|
output: z.number().min(0),
|
|
@@ -178,6 +179,7 @@ function resolveConfig(config) {
|
|
|
178
179
|
stickySession: config.stickySession !== false,
|
|
179
180
|
activeAccount: typeof config.activeAccount === "string" ? config.activeAccount : "",
|
|
180
181
|
showSidebarQuota: config.showSidebarQuota === true,
|
|
182
|
+
planLabel: typeof config.planLabel === "string" ? config.planLabel.trim() : "",
|
|
181
183
|
priceOverrides: priceRecord(config.priceOverrides),
|
|
182
184
|
userAgent: typeof config.userAgent === "string" && config.userAgent !== "" ? config.userAgent : DEFAULT_USER_AGENT
|
|
183
185
|
};
|
|
@@ -3573,6 +3575,7 @@ function publicConfig(config) {
|
|
|
3573
3575
|
stickySession: config.stickySession,
|
|
3574
3576
|
activeAccount: config.activeAccount,
|
|
3575
3577
|
showSidebarQuota: config.showSidebarQuota,
|
|
3578
|
+
planLabel: config.planLabel,
|
|
3576
3579
|
priceOverrides: config.priceOverrides,
|
|
3577
3580
|
userAgent: config.userAgent
|
|
3578
3581
|
};
|
|
@@ -3656,6 +3659,29 @@ function json(res, status, value) {
|
|
|
3656
3659
|
res.setHeader("cache-control", "no-store");
|
|
3657
3660
|
res.end(JSON.stringify(value));
|
|
3658
3661
|
}
|
|
3662
|
+
function sourceHost(value) {
|
|
3663
|
+
if (value === void 0 || value === "") return void 0;
|
|
3664
|
+
try {
|
|
3665
|
+
return new URL(value).host;
|
|
3666
|
+
} catch {
|
|
3667
|
+
return;
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
/**
|
|
3671
|
+
* Write routes must prove a same-origin browser context. A LAN bridge that
|
|
3672
|
+
* rewrites Host and socket to loopback would otherwise let any non-browser
|
|
3673
|
+
* client write keys and settings without an Origin. Fail closed when neither
|
|
3674
|
+
* Origin nor Referer is present.
|
|
3675
|
+
*/
|
|
3676
|
+
function writeSourceError(req) {
|
|
3677
|
+
const host = req.headers.host;
|
|
3678
|
+
if (host === void 0 || host === "") return "request host required";
|
|
3679
|
+
const origin = req.headers.origin;
|
|
3680
|
+
if (origin !== void 0 && origin !== "") return sourceHost(origin) === host ? void 0 : "cross-origin request refused";
|
|
3681
|
+
const referer = req.headers.referer;
|
|
3682
|
+
if (referer === void 0 || referer === "") return "request origin required";
|
|
3683
|
+
return sourceHost(referer) === host ? void 0 : "cross-origin request refused";
|
|
3684
|
+
}
|
|
3659
3685
|
function allowedOrigin(req) {
|
|
3660
3686
|
const origin = req.headers.origin;
|
|
3661
3687
|
if (origin === void 0 || origin === "") return true;
|
|
@@ -3706,8 +3732,9 @@ function requirePost(req, res) {
|
|
|
3706
3732
|
json(res, 403, { error: "non-loopback Host refused" });
|
|
3707
3733
|
return false;
|
|
3708
3734
|
}
|
|
3709
|
-
|
|
3710
|
-
|
|
3735
|
+
const sourceError = writeSourceError(req);
|
|
3736
|
+
if (sourceError !== void 0) {
|
|
3737
|
+
json(res, 403, { error: sourceError });
|
|
3711
3738
|
return false;
|
|
3712
3739
|
}
|
|
3713
3740
|
const remote = req.socket.remoteAddress ?? "";
|
|
@@ -3777,6 +3804,7 @@ function configOps(patch) {
|
|
|
3777
3804
|
if ("stickySession" in patch) set("stickySession", patch.stickySession === true);
|
|
3778
3805
|
if ("activeAccount" in patch) set("activeAccount", patch.activeAccount);
|
|
3779
3806
|
if ("showSidebarQuota" in patch) set("showSidebarQuota", patch.showSidebarQuota === true);
|
|
3807
|
+
if ("planLabel" in patch) set("planLabel", patch.planLabel);
|
|
3780
3808
|
if ("priceOverrides" in patch) set("priceOverrides", cleanPrices(patch.priceOverrides));
|
|
3781
3809
|
if ("userAgent" in patch) set("userAgent", patch.userAgent);
|
|
3782
3810
|
return ops;
|
|
@@ -4258,6 +4286,18 @@ function buildOllamaTuiSection(deps) {
|
|
|
4258
4286
|
value: text.trim() === "true"
|
|
4259
4287
|
})
|
|
4260
4288
|
},
|
|
4289
|
+
{
|
|
4290
|
+
path: ["planLabel"],
|
|
4291
|
+
group: "sidebar",
|
|
4292
|
+
kind: "text",
|
|
4293
|
+
label: "Plan label",
|
|
4294
|
+
hint: "Optional label shown on the sidebar card, for example PRO.",
|
|
4295
|
+
format: (value) => String(value === void 0 ? deps.planLabel() : value),
|
|
4296
|
+
parse: (text) => text.trim() === "" ? { kind: "clear" } : {
|
|
4297
|
+
kind: "set",
|
|
4298
|
+
value: text.trim()
|
|
4299
|
+
}
|
|
4300
|
+
},
|
|
4261
4301
|
{
|
|
4262
4302
|
path: ["activeAccount"],
|
|
4263
4303
|
group: "advanced",
|
|
@@ -4328,7 +4368,8 @@ function applyOllamaTuiSettings(ctx, deps) {
|
|
|
4328
4368
|
visibleModels: deps.visibleModels(),
|
|
4329
4369
|
activeAccount: deps.activeAccount(),
|
|
4330
4370
|
stickySession: deps.stickySession(),
|
|
4331
|
-
showSidebarQuota: deps.showSidebarQuota()
|
|
4371
|
+
showSidebarQuota: deps.showSidebarQuota(),
|
|
4372
|
+
planLabel: deps.planLabel()
|
|
4332
4373
|
});
|
|
4333
4374
|
let lastSignature = signature();
|
|
4334
4375
|
const refresh = () => {
|
|
@@ -4626,7 +4667,8 @@ function apply(ctx, config) {
|
|
|
4626
4667
|
visibleModels: () => current().visibleModels,
|
|
4627
4668
|
activeAccount: () => current().activeAccount,
|
|
4628
4669
|
stickySession: () => current().stickySession,
|
|
4629
|
-
showSidebarQuota: () => current().showSidebarQuota
|
|
4670
|
+
showSidebarQuota: () => current().showSidebarQuota,
|
|
4671
|
+
planLabel: () => current().planLabel
|
|
4630
4672
|
});
|
|
4631
4673
|
});
|
|
4632
4674
|
ctx.inject(["webServer"], (webCtx) => {
|
package/package.json
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@goodandready/dsh-ollama-cloud-provider",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Ollama Cloud LLM provider plugin for DeepSeek Harness (dsh).",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "./lib/index.js",
|
|
8
|
-
"types": "./lib/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./lib/index.d.ts",
|
|
12
|
-
"default": "./lib/index.js"
|
|
13
|
-
},
|
|
14
|
-
"./client": {
|
|
15
|
-
"default": "./lib/client.js"
|
|
16
|
-
},
|
|
17
|
-
"./package.json": "./package.json",
|
|
18
|
-
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"lib",
|
|
22
|
-
"!lib/**/*.map",
|
|
23
|
-
"cordis.patch.yml",
|
|
24
|
-
"README.md",
|
|
25
|
-
"README.zh.md",
|
|
26
|
-
"README.ru.md",
|
|
27
|
-
"CHANGELOG.md",
|
|
28
|
-
"LICENSE",
|
|
29
|
-
"NOTICE",
|
|
30
|
-
"media/visual-verification.png"
|
|
31
|
-
],
|
|
32
|
-
"publishConfig": {
|
|
33
|
-
"access": "public"
|
|
34
|
-
},
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "git+https://github.com/GooDAnDReaDY/dsh-ollama-cloud-provider.git"
|
|
38
|
-
},
|
|
39
|
-
"bugs": {
|
|
40
|
-
"url": "https://github.com/GooDAnDReaDY/dsh-ollama-cloud-provider/issues"
|
|
41
|
-
},
|
|
42
|
-
"homepage": "https://github.com/GooDAnDReaDY/dsh-ollama-cloud-provider#readme",
|
|
43
|
-
"dsh": {
|
|
44
|
-
"bundle": {
|
|
45
|
-
"patch": "./cordis.patch.yml"
|
|
46
|
-
},
|
|
47
|
-
"client": {
|
|
48
|
-
"platform": "web",
|
|
49
|
-
"inject": [
|
|
50
|
-
"@deepseek-ai/dsh-client-locale",
|
|
51
|
-
"@deepseek-ai/dsh-client-ui-renderer",
|
|
52
|
-
"@deepseek-ai/dsh-client-ui-settings"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"compatibility": {
|
|
56
|
-
"dshReleases": {
|
|
57
|
-
"0.2.0-rc.2": "compatible",
|
|
58
|
-
"0.2.1-rc.2": "compatible"
|
|
59
|
-
},
|
|
60
|
-
"dsh": "0.2.0-rc.2 || 0.2.1-rc.2"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"engines": {
|
|
64
|
-
"node": ">=22",
|
|
65
|
-
"dsh": "0.2.0-rc.2 || 0.2.1-rc.2"
|
|
66
|
-
},
|
|
67
|
-
"scripts": {
|
|
68
|
-
"build": "tsdown",
|
|
69
|
-
"prepare": "tsdown",
|
|
70
|
-
"typecheck": "tsc --noEmit",
|
|
71
|
-
"test": "node --import tsx --test tests/core.test.ts tests/usage.test.ts tests/adapter.test.ts tests/routes.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",
|
|
72
|
-
"check": "npm run typecheck && npm test && npm run build",
|
|
73
|
-
"release": "npm run check && npm pack",
|
|
74
|
-
"sync:models": "node scripts/sync-models.mjs"
|
|
75
|
-
},
|
|
76
|
-
"keywords": [
|
|
77
|
-
"dsh",
|
|
78
|
-
"dsh-plugin",
|
|
79
|
-
"deepseek-harness",
|
|
80
|
-
"ollama",
|
|
81
|
-
"ollama-cloud",
|
|
82
|
-
"llm-provider"
|
|
83
|
-
],
|
|
84
|
-
"peerDependencies": {
|
|
85
|
-
"@deepseek-ai/cordis": "~4.0.4 || ~4.0.5",
|
|
86
|
-
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
87
|
-
"@deepseek-ai/dsh-client-locale": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
89
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
90
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
91
|
-
"@deepseek-ai/dsh-commands": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
92
|
-
"@deepseek-ai/dsh-credentials": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
93
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
94
|
-
"@deepseek-ai/dsh-launch-environment": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
95
|
-
"@deepseek-ai/dsh-llm": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
96
|
-
"@deepseek-ai/dsh-settings": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
97
|
-
"@deepseek-ai/schemastery": "~3.18.4 || ~3.18.5",
|
|
98
|
-
"react": "^18.2.0"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"@deepseek-ai/cordis": "~4.0.5",
|
|
102
|
-
"@deepseek-ai/dsh-attachment": "0.2.1-rc.2",
|
|
103
|
-
"@deepseek-ai/dsh-client-locale": "^0.2.1-rc.2",
|
|
104
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-rc.2",
|
|
105
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.2.1-rc.2",
|
|
106
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.2",
|
|
107
|
-
"@deepseek-ai/dsh-commands": "0.2.1-rc.2",
|
|
108
|
-
"@deepseek-ai/dsh-credentials": "0.2.1-rc.2",
|
|
109
|
-
"@deepseek-ai/dsh-host-webserver": "^0.2.1-rc.2",
|
|
110
|
-
"@deepseek-ai/dsh-launch-environment": "0.2.1-rc.2",
|
|
111
|
-
"@deepseek-ai/dsh-llm": "0.2.1-rc.2",
|
|
112
|
-
"@deepseek-ai/dsh-settings": "0.2.1-rc.2",
|
|
113
|
-
"@deepseek-ai/schemastery": "~3.18.5",
|
|
114
|
-
"@types/node": "^22.0.0",
|
|
115
|
-
"@types/react": "^18.3.1",
|
|
116
|
-
"react": "^18.3.1",
|
|
117
|
-
"tsdown": "^0.22.2",
|
|
118
|
-
"tsx": "^4.23.12",
|
|
119
|
-
"typescript": "^5.7.2"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@goodandready/dsh-ollama-cloud-provider",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "Ollama Cloud LLM provider plugin for DeepSeek Harness (dsh).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./lib/index.js",
|
|
8
|
+
"types": "./lib/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
|
+
"default": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./client": {
|
|
15
|
+
"default": "./lib/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib",
|
|
22
|
+
"!lib/**/*.map",
|
|
23
|
+
"cordis.patch.yml",
|
|
24
|
+
"README.md",
|
|
25
|
+
"README.zh.md",
|
|
26
|
+
"README.ru.md",
|
|
27
|
+
"CHANGELOG.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"NOTICE",
|
|
30
|
+
"media/visual-verification.png"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/GooDAnDReaDY/dsh-ollama-cloud-provider.git"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/GooDAnDReaDY/dsh-ollama-cloud-provider/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/GooDAnDReaDY/dsh-ollama-cloud-provider#readme",
|
|
43
|
+
"dsh": {
|
|
44
|
+
"bundle": {
|
|
45
|
+
"patch": "./cordis.patch.yml"
|
|
46
|
+
},
|
|
47
|
+
"client": {
|
|
48
|
+
"platform": "web",
|
|
49
|
+
"inject": [
|
|
50
|
+
"@deepseek-ai/dsh-client-locale",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"compatibility": {
|
|
56
|
+
"dshReleases": {
|
|
57
|
+
"0.2.0-rc.2": "compatible",
|
|
58
|
+
"0.2.1-rc.2": "compatible"
|
|
59
|
+
},
|
|
60
|
+
"dsh": "0.2.0-rc.2 || 0.2.1-rc.2"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=22",
|
|
65
|
+
"dsh": "0.2.0-rc.2 || 0.2.1-rc.2"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsdown",
|
|
69
|
+
"prepare": "tsdown 1>&2",
|
|
70
|
+
"typecheck": "tsc --noEmit",
|
|
71
|
+
"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/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",
|
|
72
|
+
"check": "npm run typecheck && npm test && npm run build",
|
|
73
|
+
"release": "npm run check && npm pack",
|
|
74
|
+
"sync:models": "node scripts/sync-models.mjs"
|
|
75
|
+
},
|
|
76
|
+
"keywords": [
|
|
77
|
+
"dsh",
|
|
78
|
+
"dsh-plugin",
|
|
79
|
+
"deepseek-harness",
|
|
80
|
+
"ollama",
|
|
81
|
+
"ollama-cloud",
|
|
82
|
+
"llm-provider"
|
|
83
|
+
],
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"@deepseek-ai/cordis": "~4.0.4 || ~4.0.5",
|
|
86
|
+
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-client-locale": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-commands": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-credentials": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
95
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-settings": "0.2.0-rc.2 || 0.2.1-rc.2",
|
|
97
|
+
"@deepseek-ai/schemastery": "~3.18.4 || ~3.18.5",
|
|
98
|
+
"react": "^18.2.0"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@deepseek-ai/cordis": "~4.0.5",
|
|
102
|
+
"@deepseek-ai/dsh-attachment": "0.2.1-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.1-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.1-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.1-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-commands": "0.2.1-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-credentials": "0.2.1-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-host-webserver": "^0.2.1-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.1-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-settings": "0.2.1-rc.2",
|
|
113
|
+
"@deepseek-ai/schemastery": "~3.18.5",
|
|
114
|
+
"@types/node": "^22.0.0",
|
|
115
|
+
"@types/react": "^18.3.1",
|
|
116
|
+
"react": "^18.3.1",
|
|
117
|
+
"tsdown": "^0.22.2",
|
|
118
|
+
"tsx": "^4.23.12",
|
|
119
|
+
"typescript": "^5.7.2"
|
|
120
|
+
}
|
|
121
|
+
}
|