@goodandready/dsh-subscriptions 0.6.0 → 0.6.2
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 +12 -1
- package/README.ru.md +11 -0
- package/README.zh.md +6 -0
- package/lib/accounts.js +1 -1
- package/lib/adapter.js +2 -2
- package/lib/client.js +220 -189
- package/lib/crypto.js +4 -4
- package/lib/google-validation.js +1 -1
- package/lib/health.js +2 -2
- package/lib/history.js +5 -5
- package/lib/http.js +7 -0
- package/lib/images.js +21 -21
- package/lib/index.js +19 -19
- package/lib/loopback.js +10 -10
- package/lib/ratelimit.js +2 -2
- package/lib/refs.js +9 -1
- package/lib/routes/accounts.js +343 -0
- package/lib/routes/oauth.js +248 -0
- package/lib/routes/proxy.js +147 -0
- package/lib/routes/status.js +257 -0
- package/lib/routes.js +12 -916
- package/lib/subscriptions.js +1 -1
- package/lib/ui-styles.js +12 -12
- package/lib/usage.js +1 -1
- package/lib/vendor-factory.js +13 -13
- package/package.json +5 -5
- package/lib/ui-i18n.js +0 -256
package/README.md
CHANGED
|
@@ -195,10 +195,15 @@ dsh plugin --profile web add @goodandready/dsh-subscriptions
|
|
|
195
195
|
```
|
|
196
196
|
|
|
197
197
|
> [!IMPORTANT]
|
|
198
|
-
> Restart DSH Web UI after installation (`systemctl --user restart dsh-web`) and navigate to **Settings → Subscriptions** to link your accounts.
|
|
198
|
+
> Restart DSH Web UI after installation (`systemctl --user restart dsh-web`) and navigate to **Settings → Plugins → Plugin Settings → Subscriptions** to link your accounts.
|
|
199
199
|
|
|
200
200
|
---
|
|
201
201
|
|
|
202
|
+
|
|
203
|
+
> [!TIP]
|
|
204
|
+
> **UI Settings Card vs YAML Overrides**:
|
|
205
|
+
> All common options (account slots, autoLoopback, privacyMask, composerQuota, expiryNotifyDays, codexFastMode, codexVerbosity, ollamaFallback/baseUrl/model, and cooldown/probe intervals) can be managed directly in the Web UI card (**Settings → Plugins → Plugin Settings → Subscriptions**). Low-level parameters such as OAuth client IDs/redirect URIs, API base URL overrides, and custom vendors are configured in `settings.yaml`.
|
|
206
|
+
|
|
202
207
|
## ⚙️ Configuration Reference (`settings.yaml`)
|
|
203
208
|
|
|
204
209
|
```yaml
|
|
@@ -231,6 +236,12 @@ dsh-subscriptions:
|
|
|
231
236
|
|
|
232
237
|
---
|
|
233
238
|
|
|
239
|
+
## 🌐 Localization
|
|
240
|
+
|
|
241
|
+
The plugin source language is English only. Russian and other translations are provided at runtime by separate language plugins (for example the russification plugin), which translate the registered locale keys - the package itself ships no bundled translations (Changed in 0.6.1).
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
234
245
|
## 📄 License
|
|
235
246
|
|
|
236
247
|
MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
|
package/README.ru.md
CHANGED
|
@@ -172,6 +172,11 @@ dsh plugin --profile web add @goodandready/dsh-subscriptions
|
|
|
172
172
|
|
|
173
173
|
---
|
|
174
174
|
|
|
175
|
+
|
|
176
|
+
> [!TIP]
|
|
177
|
+
> **Карточка настроек в UI vs Настройки в YAML**:
|
|
178
|
+
> Все основные параметры (слоты аккаунтов, перехват autoLoopback, privacyMask, индикатор composerQuota, оповещение expiryNotifyDays, codexFastMode, codexVerbosity, ollamaFallback/baseUrl/model, интервалы cooldown и probe) настраиваются напрямую в Web UI: **«Настройки → Плагины → Настройки плагинов → Subscriptions»**. Низкоуровневые оверрайды (собственные OAuth Client ID / Redirect URI, Base URL для прокси, кастомные вендоры) задаются в `settings.yaml`.
|
|
179
|
+
|
|
175
180
|
## ⚙️ Пример конфигурации (`settings.yaml`)
|
|
176
181
|
|
|
177
182
|
```yaml
|
|
@@ -204,6 +209,12 @@ dsh-subscriptions:
|
|
|
204
209
|
|
|
205
210
|
---
|
|
206
211
|
|
|
212
|
+
## 🌐 Локализация
|
|
213
|
+
|
|
214
|
+
Исходный язык плагина - только английский. Русский и другие переводы во время работы предоставляют отдельные языковые плагины (например, плагин русификации), переводящие зарегистрированные ключи локали, - сам пакет не содержит встроенных переводов (Changed in 0.6.1).
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
207
218
|
## 📄 Лицензия
|
|
208
219
|
|
|
209
220
|
MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
|
package/README.zh.md
CHANGED
|
@@ -138,6 +138,12 @@ dsh plugin --profile web add @goodandready/dsh-subscriptions
|
|
|
138
138
|
|
|
139
139
|
---
|
|
140
140
|
|
|
141
|
+
## 🌐 本地化
|
|
142
|
+
|
|
143
|
+
插件源语言仅为英语。俄语及其他翻译由独立的语言插件(如俄化插件)在运行时对注册的本地化键进行翻译,包本身不内置翻译(Changed in 0.6.1)。
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
141
147
|
## 📄 开源协议
|
|
142
148
|
|
|
143
149
|
MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
|
package/lib/accounts.js
CHANGED
|
@@ -327,7 +327,7 @@ export function createAccountStore({ credentials, getConfig, fetchImpl, fetchFor
|
|
|
327
327
|
recordExhaust(ref) { health.set(ref, recordExhaust(health.get(ref))) },
|
|
328
328
|
recordBroken(ref) { health.set(ref, recordBroken(health.get(ref))) },
|
|
329
329
|
recordSuccess(ref) {
|
|
330
|
-
//
|
|
330
|
+
// successful request clears the cooldown and puts the account back in rotation
|
|
331
331
|
cooldowns.delete(ref)
|
|
332
332
|
quarantines.delete(ref)
|
|
333
333
|
if (health.has(ref)) health.set(ref, null)
|
package/lib/adapter.js
CHANGED
|
@@ -147,9 +147,9 @@ export class SubscriptionAdapter extends LlmAdapter {
|
|
|
147
147
|
signal: opts.signal,
|
|
148
148
|
saveBlob: (next) => deps.saveBlob(account.ref, next),
|
|
149
149
|
})
|
|
150
|
-
//
|
|
150
|
+
// stream completed successfully: clear cooldown and health penalties
|
|
151
151
|
if (typeof deps.recordSuccess === 'function') deps.recordSuccess(account.ref)
|
|
152
|
-
// #65:
|
|
152
|
+
// #65: record in the request and cost history.
|
|
153
153
|
if (typeof deps.recordHistory === 'function') {
|
|
154
154
|
try {
|
|
155
155
|
deps.recordHistory({
|