@goodandready/dsh-clinebot 0.2.0
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 +28 -0
- package/LICENSE +21 -0
- package/README.md +153 -0
- package/README.ru.md +131 -0
- package/README.zh.md +68 -0
- package/cordis.patch.yml +6 -0
- package/lib/client.js +895 -0
- package/lib/cline-client.js +342 -0
- package/lib/http.js +34 -0
- package/lib/index.js +573 -0
- package/lib/models.js +210 -0
- package/package.json +68 -0
package/lib/models.js
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated and extensible models catalog for ClineBot / ClinePass.
|
|
3
|
+
*
|
|
4
|
+
* Notice: GET /v1/models returns 404 on api.cline.bot, so DSH cannot rely on
|
|
5
|
+
* dynamic OpenAI model discovery. This catalogue provides the official ClinePass
|
|
6
|
+
* models plus support for user-defined custom models added via the Settings page.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const PROVIDER_ID = 'clinebot'
|
|
10
|
+
export const PROVIDER_DISPLAY_NAME = 'ClineBot (ClinePass)'
|
|
11
|
+
export const DEFAULT_MODEL_ID = 'cline-pass/deepseek-v4-flash'
|
|
12
|
+
|
|
13
|
+
export const CLINE_MODELS = Object.freeze([
|
|
14
|
+
{
|
|
15
|
+
id: 'cline-pass/deepseek-v4-flash',
|
|
16
|
+
name: 'DeepSeek V4 Flash',
|
|
17
|
+
description: 'High-speed reasoning & code completion model optimized for agentic loops.',
|
|
18
|
+
contextLength: 200000,
|
|
19
|
+
maxTokens: 8192,
|
|
20
|
+
input: ['text', 'image'],
|
|
21
|
+
category: 'coding',
|
|
22
|
+
recommended: true,
|
|
23
|
+
isCustom: false,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'cline-pass/deepseek-v4-pro',
|
|
27
|
+
name: 'DeepSeek V4 Pro',
|
|
28
|
+
description: 'Flagship reasoning and multi-turn architectural coding model.',
|
|
29
|
+
contextLength: 200000,
|
|
30
|
+
maxTokens: 8192,
|
|
31
|
+
input: ['text', 'image'],
|
|
32
|
+
category: 'coding',
|
|
33
|
+
recommended: true,
|
|
34
|
+
isCustom: false,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'cline-pass/glm-5.2',
|
|
38
|
+
name: 'GLM 5.2',
|
|
39
|
+
description: 'Bilingual general & coding model with strong instruction following.',
|
|
40
|
+
contextLength: 200000,
|
|
41
|
+
maxTokens: 8192,
|
|
42
|
+
input: ['text'],
|
|
43
|
+
category: 'general',
|
|
44
|
+
recommended: false,
|
|
45
|
+
isCustom: false,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'cline-pass/kimi-k3',
|
|
49
|
+
name: 'Kimi K3',
|
|
50
|
+
description: 'Long-context reasoning & document synthesis model by Moonshot AI.',
|
|
51
|
+
contextLength: 200000,
|
|
52
|
+
maxTokens: 8192,
|
|
53
|
+
input: ['text'],
|
|
54
|
+
category: 'reasoning',
|
|
55
|
+
recommended: true,
|
|
56
|
+
isCustom: false,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'cline-pass/kimi-k2.7-code',
|
|
60
|
+
name: 'Kimi K2.7 Code',
|
|
61
|
+
description: 'Specialized coding model with agentic tool calling support.',
|
|
62
|
+
contextLength: 200000,
|
|
63
|
+
maxTokens: 8192,
|
|
64
|
+
input: ['text'],
|
|
65
|
+
category: 'coding',
|
|
66
|
+
recommended: false,
|
|
67
|
+
isCustom: false,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'cline-pass/kimi-k2.6',
|
|
71
|
+
name: 'Kimi K2.6',
|
|
72
|
+
description: 'Balanced long-context conversational model.',
|
|
73
|
+
contextLength: 200000,
|
|
74
|
+
maxTokens: 8192,
|
|
75
|
+
input: ['text'],
|
|
76
|
+
category: 'general',
|
|
77
|
+
recommended: false,
|
|
78
|
+
isCustom: false,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'cline-pass/qwen3.7-max',
|
|
82
|
+
name: 'Qwen 3.7 Max',
|
|
83
|
+
description: 'Large-scale multimodal foundation model from Alibaba Cloud.',
|
|
84
|
+
contextLength: 200000,
|
|
85
|
+
maxTokens: 8192,
|
|
86
|
+
input: ['text', 'image'],
|
|
87
|
+
category: 'multimodal',
|
|
88
|
+
recommended: true,
|
|
89
|
+
isCustom: false,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'cline-pass/qwen3.7-plus',
|
|
93
|
+
name: 'Qwen 3.7 Plus',
|
|
94
|
+
description: 'Fast, capable multimodal model with strong multilingual skills.',
|
|
95
|
+
contextLength: 200000,
|
|
96
|
+
maxTokens: 8192,
|
|
97
|
+
input: ['text', 'image'],
|
|
98
|
+
category: 'multimodal',
|
|
99
|
+
recommended: false,
|
|
100
|
+
isCustom: false,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'cline-pass/minimax-m3',
|
|
104
|
+
name: 'MiniMax M3',
|
|
105
|
+
description: 'High throughput reasoning and synthesis model.',
|
|
106
|
+
contextLength: 200000,
|
|
107
|
+
maxTokens: 8192,
|
|
108
|
+
input: ['text'],
|
|
109
|
+
category: 'reasoning',
|
|
110
|
+
recommended: false,
|
|
111
|
+
isCustom: false,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 'cline-pass/mimo-v2.5',
|
|
115
|
+
name: 'MiMo V2.5',
|
|
116
|
+
description: 'Xiaomi MiMo efficient instruction model.',
|
|
117
|
+
contextLength: 200000,
|
|
118
|
+
maxTokens: 8192,
|
|
119
|
+
input: ['text'],
|
|
120
|
+
category: 'general',
|
|
121
|
+
recommended: false,
|
|
122
|
+
isCustom: false,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'cline-pass/mimo-v2.5-pro',
|
|
126
|
+
name: 'MiMo V2.5 Pro',
|
|
127
|
+
description: 'Xiaomi MiMo advanced agentic reasoning model.',
|
|
128
|
+
contextLength: 200000,
|
|
129
|
+
maxTokens: 8192,
|
|
130
|
+
input: ['text'],
|
|
131
|
+
category: 'coding',
|
|
132
|
+
recommended: false,
|
|
133
|
+
isCustom: false,
|
|
134
|
+
},
|
|
135
|
+
])
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Validate a custom model entry.
|
|
139
|
+
*/
|
|
140
|
+
export function validateCustomModel(raw) {
|
|
141
|
+
if (!raw || typeof raw !== 'object') {
|
|
142
|
+
return { ok: false, error: 'Model descriptor must be an object' }
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
let id = String(raw.id || '').trim()
|
|
146
|
+
if (!id) {
|
|
147
|
+
return { ok: false, error: 'Model ID is required' }
|
|
148
|
+
}
|
|
149
|
+
// If user didn't prefix with cline-pass/, allow both or auto-prefix if helpful
|
|
150
|
+
if (!id.startsWith('cline-pass/') && !id.includes('/')) {
|
|
151
|
+
id = `cline-pass/${id}`
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const name = String(raw.name || '').trim() || id.split('/').pop() || id
|
|
155
|
+
const contextLength = Number(raw.contextLength) > 0 ? Number(raw.contextLength) : 200000
|
|
156
|
+
const maxTokens = Number(raw.maxTokens) > 0 ? Number(raw.maxTokens) : 8192
|
|
157
|
+
const hasVision = Boolean(raw.hasVision || raw.input?.includes('vision') || raw.input?.includes('image'))
|
|
158
|
+
const input = hasVision ? ['text', 'image'] : ['text']
|
|
159
|
+
const category = ['coding', 'reasoning', 'multimodal', 'general'].includes(raw.category)
|
|
160
|
+
? raw.category
|
|
161
|
+
: hasVision ? 'multimodal' : 'general'
|
|
162
|
+
|
|
163
|
+
return {
|
|
164
|
+
ok: true,
|
|
165
|
+
model: {
|
|
166
|
+
id,
|
|
167
|
+
name,
|
|
168
|
+
description: String(raw.description || 'User added custom model').trim(),
|
|
169
|
+
contextLength,
|
|
170
|
+
maxTokens,
|
|
171
|
+
input,
|
|
172
|
+
category,
|
|
173
|
+
recommended: false,
|
|
174
|
+
isCustom: true,
|
|
175
|
+
},
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Get all models combining built-in official models with custom user additions.
|
|
181
|
+
*/
|
|
182
|
+
export function getAllModels(customModels = []) {
|
|
183
|
+
const result = [...CLINE_MODELS]
|
|
184
|
+
const seenIds = new Set(result.map((m) => m.id))
|
|
185
|
+
|
|
186
|
+
if (Array.isArray(customModels)) {
|
|
187
|
+
for (const item of customModels) {
|
|
188
|
+
const valid = validateCustomModel(item)
|
|
189
|
+
if (valid.ok && !seenIds.has(valid.model.id)) {
|
|
190
|
+
result.push(valid.model)
|
|
191
|
+
seenIds.add(valid.model.id)
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return result
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export function findModel(id, customModels = []) {
|
|
200
|
+
const all = getAllModels(customModels)
|
|
201
|
+
return all.find((m) => m.id === id) || null
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export function isSupportedModel(id, customModels = []) {
|
|
205
|
+
return findModel(id, customModels) !== null
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function getDefaultModelIds(customModels = []) {
|
|
209
|
+
return getAllModels(customModels).map((m) => m.id)
|
|
210
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@goodandready/dsh-clinebot",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "DeepSeek Harness companion for ClineBot / ClinePass: dedicated settings page, live quota usage limits dashboard, in-UI credentials saving, static & custom models catalog, model picker control, and /cline slash-command.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./lib/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./lib/index.js",
|
|
10
|
+
"./client": "./lib/client.js",
|
|
11
|
+
"./package.json": "./package.json",
|
|
12
|
+
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"lib/",
|
|
16
|
+
"cordis.patch.yml",
|
|
17
|
+
"README.md",
|
|
18
|
+
"README.ru.md",
|
|
19
|
+
"README.zh.md",
|
|
20
|
+
"CHANGELOG.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"dsh",
|
|
25
|
+
"dsh-plugin",
|
|
26
|
+
"deepseek-harness",
|
|
27
|
+
"cline",
|
|
28
|
+
"clinebot",
|
|
29
|
+
"clinepass",
|
|
30
|
+
"openai-compatible",
|
|
31
|
+
"llm-provider",
|
|
32
|
+
"usage-dashboard",
|
|
33
|
+
"quota-limits"
|
|
34
|
+
],
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/GooDAnDReaDY/dsh-clinebot.git"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"test": "node --test test/*.test.js"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=20"
|
|
44
|
+
},
|
|
45
|
+
"dsh": {
|
|
46
|
+
"bundle": {
|
|
47
|
+
"patch": "./cordis.patch.yml"
|
|
48
|
+
},
|
|
49
|
+
"client": {
|
|
50
|
+
"platform": "web",
|
|
51
|
+
"inject": []
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
56
|
+
"@deepseek-ai/dsh-credentials": "^0.1.0-rc.6",
|
|
57
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.6",
|
|
58
|
+
"@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
|
|
59
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
60
|
+
},
|
|
61
|
+
"homepage": "https://github.com/GooDAnDReaDY/dsh-clinebot#readme",
|
|
62
|
+
"bugs": {
|
|
63
|
+
"url": "https://github.com/GooDAnDReaDY/dsh-clinebot/issues"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
}
|
|
68
|
+
}
|