@goodandready/dsh-clinebot 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/CHANGELOG.md +5 -0
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/README.zh.md +1 -1
- package/lib/cline-client.js +11 -1
- package/lib/models.js +36 -0
- package/lib/provider-sync.js +1 -0
- package/lib/routes/models.js +1 -0
- package/lib/transport/cline-transport.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to `@goodandready/dsh-clinebot` will be documented in this f
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.17] - 2026-10-28
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Dated ClinePass models** (GitHub #18): model sync and auto-discovery now consult `GET /models` and add dated variants such as `cline-pass/deepseek-v4.1-flash-1017` when their stable plan alias is included. Regular usage refreshes do not make the extra catalog request.
|
|
12
|
+
|
|
8
13
|
## [0.6.16] - 2026-10-21
|
|
9
14
|
|
|
10
15
|
### Fixed
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h3>Native ClineBot / ClinePass Provider Companion for DeepSeek Harness</h3>
|
|
6
6
|
|
|
7
|
-
<p><b>0.6.
|
|
7
|
+
<p><b>0.6.17</b> syncs dated ClinePass variants such as <code>deepseek-v4.1-flash-1017</code>, accepts the full DSH <code>0.2.1</code> prerelease line and keeps the multimodal/model/price improvements. Chat runs on the native <code>ctx.llm</code> adapter; the legacy <code>llm-pi-ai</code>, loopback proxy and <code>llm/stream</code> path are removed.</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@goodandready/dsh-clinebot"><img src="https://img.shields.io/npm/v/@goodandready/dsh-clinebot.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
|
package/README.ru.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h3>Нативное подключение провайдера ClineBot / ClinePass для DeepSeek Harness</h3>
|
|
6
6
|
|
|
7
|
-
<p><b>0.6.
|
|
7
|
+
<p><b>0.6.17</b> синхронизирует dated-варианты ClinePass, включая <code>deepseek-v4.1-flash-1017</code>, поддерживает всю линию DSH <code>0.2.1</code> и сохраняет улучшения мультимодальности, моделей и цен. Чат работает через нативный адаптер <code>ctx.llm</code>; старые <code>llm-pi-ai</code>, loopback-прокси и <code>llm/stream</code> удалены.</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@goodandready/dsh-clinebot"><img src="https://img.shields.io/npm/v/@goodandready/dsh-clinebot.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
|
package/README.zh.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<h3>适用于 DeepSeek Harness 的 ClineBot / ClinePass 原生模型提供商伴侣插件</h3>
|
|
6
6
|
|
|
7
|
-
<p><b>0.6.
|
|
7
|
+
<p><b>0.6.17</b> 同步 ClinePass 日期变体(包括 <code>deepseek-v4.1-flash-1017</code>),支持 DSH <code>0.2.1</code> 整条预发布线,并保留多模态、模型与价格改进。聊天使用原生 <code>ctx.llm</code> 适配器;旧的 <code>llm-pi-ai</code>、回环代理和 <code>llm/stream</code> 已删除。</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@goodandready/dsh-clinebot"><img src="https://img.shields.io/npm/v/@goodandready/dsh-clinebot.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
|
package/lib/cline-client.js
CHANGED
|
@@ -15,6 +15,7 @@ export {
|
|
|
15
15
|
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_MODEL_ID,
|
|
18
|
+
mergePlanModelVariants,
|
|
18
19
|
parsePlanIncludedModels,
|
|
19
20
|
} from './models.js'
|
|
20
21
|
|
|
@@ -164,6 +165,7 @@ export async function fetchUsageLimits(baseUrl, apiKey, {
|
|
|
164
165
|
timeoutMs = DEFAULT_TIMEOUT_MS,
|
|
165
166
|
fetchImpl = fetch,
|
|
166
167
|
bypassCache = false,
|
|
168
|
+
includeCatalog = false,
|
|
167
169
|
ttlMs = USAGE_CACHE_TTL_MS,
|
|
168
170
|
} = {}) {
|
|
169
171
|
const base = normalizeBaseUrl(baseUrl)
|
|
@@ -254,9 +256,12 @@ export async function fetchUsageLimits(baseUrl, apiKey, {
|
|
|
254
256
|
let dynamicModels = []
|
|
255
257
|
|
|
256
258
|
try {
|
|
257
|
-
const [meRes, planRes] = await Promise.all([
|
|
259
|
+
const [meRes, planRes, catalogRes] = await Promise.all([
|
|
258
260
|
fetchImpl(`${base}/users/me`, { method: 'GET', headers, signal, keepalive: true }).catch(() => null),
|
|
259
261
|
fetchImpl(`${base}/users/me/plan`, { method: 'GET', headers, signal, keepalive: true }).catch(() => null),
|
|
262
|
+
includeCatalog
|
|
263
|
+
? fetchImpl(`${base}/models`, { method: 'GET', headers, signal, keepalive: true }).catch(() => null)
|
|
264
|
+
: Promise.resolve(null),
|
|
260
265
|
])
|
|
261
266
|
|
|
262
267
|
if (meRes?.ok) {
|
|
@@ -282,6 +287,11 @@ export async function fetchUsageLimits(baseUrl, apiKey, {
|
|
|
282
287
|
dynamicModels = parsePlanIncludedModels(featuresIncluded)
|
|
283
288
|
}
|
|
284
289
|
}
|
|
290
|
+
|
|
291
|
+
if (includeCatalog && catalogRes?.ok) {
|
|
292
|
+
const catalogData = await catalogRes.json().catch(() => ({}))
|
|
293
|
+
dynamicModels = mergePlanModelVariants(dynamicModels, catalogData?.data)
|
|
294
|
+
}
|
|
285
295
|
} catch {
|
|
286
296
|
/* best-effort secondary details */
|
|
287
297
|
}
|
package/lib/models.js
CHANGED
|
@@ -266,6 +266,42 @@ export function parsePlanIncludedModels(includedInput) {
|
|
|
266
266
|
return matched
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
+
/**
|
|
270
|
+
* Add dated catalog variants (for example deepseek-v4.1-flash-1017) that
|
|
271
|
+
* belong to models included in the active plan. The plan feature text only
|
|
272
|
+
* carries the stable alias, while GET /models exposes the dated models.
|
|
273
|
+
*/
|
|
274
|
+
export function mergePlanModelVariants(planModels, catalogModels = []) {
|
|
275
|
+
const normalized = (Array.isArray(planModels) ? planModels : []).map(migrateModelEntry)
|
|
276
|
+
const seen = new Set(normalized.map((model) => model?.id).filter(Boolean))
|
|
277
|
+
const merged = [...normalized]
|
|
278
|
+
|
|
279
|
+
for (const entry of Array.isArray(catalogModels) ? catalogModels : []) {
|
|
280
|
+
const rawId = typeof entry === 'string' ? entry : entry?.id
|
|
281
|
+
if (typeof rawId !== 'string' || rawId.startsWith('~') || rawId.startsWith('@preset/') || rawId.includes(':batch')) continue
|
|
282
|
+
const slug = rawId.split('/').pop()
|
|
283
|
+
const dateMatch = slug?.match(/-(\d{4})$/)
|
|
284
|
+
if (!dateMatch) continue
|
|
285
|
+
|
|
286
|
+
const candidateId = migrateModelId(`cline-pass/${slug}`)
|
|
287
|
+
if (seen.has(candidateId)) continue
|
|
288
|
+
|
|
289
|
+
const base = normalized.find((model) => model.id && candidateId.startsWith(`${model.id}-`))
|
|
290
|
+
if (!base) continue
|
|
291
|
+
|
|
292
|
+
merged.push({
|
|
293
|
+
...base,
|
|
294
|
+
id: candidateId,
|
|
295
|
+
name: `${base.name} ${dateMatch[1]}`,
|
|
296
|
+
description: `Official ClinePass dated variant of ${base.name}.`,
|
|
297
|
+
recommended: false,
|
|
298
|
+
})
|
|
299
|
+
seen.add(candidateId)
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return merged
|
|
303
|
+
}
|
|
304
|
+
|
|
269
305
|
/**
|
|
270
306
|
* Get all models:
|
|
271
307
|
* 1. When plan is synchronized (dynamicModels is a non-empty array):
|
package/lib/provider-sync.js
CHANGED
|
@@ -222,6 +222,7 @@ export async function autoDiscoverPlanModels(ctx, { live, getSettingsApi, syncPr
|
|
|
222
222
|
usageData = await fetchUsageLimits(pub.baseUrl, activeAcc.value, {
|
|
223
223
|
timeoutMs: Math.min(pub.timeoutMs, 5000),
|
|
224
224
|
bypassCache: true,
|
|
225
|
+
includeCatalog: true,
|
|
225
226
|
})
|
|
226
227
|
} catch {
|
|
227
228
|
usageData = null
|
package/lib/routes/models.js
CHANGED
|
@@ -27,6 +27,7 @@ export function registerModelsRoutes(ctx, { live, getSettingsApi, syncProviderSt
|
|
|
27
27
|
const usageData = await fetchUsageLimits(pub.baseUrl, activeKey.value, {
|
|
28
28
|
timeoutMs: pub.timeoutMs,
|
|
29
29
|
bypassCache: true,
|
|
30
|
+
includeCatalog: true,
|
|
30
31
|
})
|
|
31
32
|
|
|
32
33
|
if (!usageData.ok) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-clinebot",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.17",
|
|
4
4
|
"description": "DeepSeek Harness companion for ClineBot / ClinePass: dynamic subscription models sync, quota exhaustion warnings, session metrics, dedicated settings page, live usage limits, and /cline slash-command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|