鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-clinebot

DeepSeek Harness 的 ClineBot/ClinePass 集成:专属设置页、实时配额仪表板、界面内密钥保存、精选与自定义模型选择,以及 /cline 命令。

模型接入
访问 GitHub
文档README

📦 @goodandready/dsh-clinebot

Native ClineBot / ClinePass Provider Companion for DeepSeek Harness

🇬🇧 English • 🇷🇺 Русский • 🇨🇳 中文说明


⚡ Overview & The Problem

ClinePass (https://cline.bot) is a flat-rate subscription service ($9.99/mo) providing developers with 2–5x higher rate limits across premier open-weights coding and reasoning models through a single OpenAI-compatible endpoint (https://api.cline.bot/api/v1).

Integrating ClinePass into DeepSeek Harness (DSH) natively poses key challenges:

  1. No /v1/models Discovery: GET /v1/models on api.cline.bot returns 404 Not Found. Dynamic discovery fails silently or leaves the provider with 0 models.
  2. Model Identifier Formats: Models require the specific prefix cline-pass/ (e.g. cline-pass/deepseek-v4-flash, cline-pass/kimi-k3).
  3. Quota Tracking: Rolling 5-hour and weekly limits need clear in-browser visualization.
  4. Credential Security: Storing API keys directly in plain settings is insecure.

@goodandready/dsh-clinebot provides a complete solution:

  • 🖥️ Dedicated Settings Page: Full-width page in DSH Settings (Settings → ClineBot).
  • 🔄 Dynamic Subscription Model Sync: Automatically pulls real models included in your ClinePass plan directly from GET /api/v1/users/me/plan with one-click DSH provider sync.
  • ⚠️ Quota Exhaustion Alerts: Real-time visual warning banners when 5-hour rolling limit reaches 80% (warning) and 95% (exhausted), complete with countdown to reset.
  • 📈 Session Metrics Telemetry: Live dashboard tracking request counts, token consumption estimates, latency, and last-request timestamp.
  • 📊 Live Quota Dashboard: Visual progress bars for 5-hour rolling limits and weekly windows from the official GET /users/me/plan/usage-limits API.
  • 🔑 In-UI Key Storage: Paste your API key directly in the UI; it is saved securely via ctx.credentials.set() into ~/.dsh/.credentials.yaml.
  • 🎯 Model Picker Management: Granular checkboxes to choose which models appear in the chat picker.
  • 💬 Slash-Command /cline: Check quota, limits, warnings, session metrics, latency, and active model directly from the DSH chat console.

🏛️ Architecture

▼
mermaid
复制代码
graph LR subgraph UI [DSH Web Interface] Page["Dedicated Page (Settings -> ClineBot)"] QuotaBar["5-Hour & Weekly Progress Bars & Warning Banner"] KeyInput["Direct Key Paste & Save"] ModelPick["Dynamic Model Sync & Picker Controls"] StatsCard["Session Metrics Telemetry"] end subgraph PluginHost [dsh-clinebot Host Runtime] HttpEndpoints["API: /api/plugins/dsh-clinebot/*"] ClientCore["lib/cline-client.js"] ModelCatalog["lib/models.js (Curated + Dynamic Plan)"] SlashCmd["Command: /cline"] end subgraph DSHCore [DeepSeek Harness Services] Credentials["Credentials Service (~/.dsh/.credentials.yaml)"] PiAi["Settings: llm-pi-ai.providers.clinebot"] end subgraph Upstream [Cline Cloud] ClinePass["api.cline.bot/api/v1/chat/completions"] ClineQuota["api.cline.bot/api/v1/users/me/plan/usage-limits"] ClinePlan["api.cline.bot/api/v1/users/me/plan"] end Page -->|GET /status & /usage| HttpEndpoints KeyInput -->|POST /save-key| HttpEndpoints ModelPick -->|POST /models/sync| HttpEndpoints HttpEndpoints --> Credentials HttpEndpoints --> ClientCore ClientCore --> ModelCatalog HttpEndpoints -->|Atomic Mutate| PiAi ClientCore -->|Chat| ClinePass ClientCore -->|Usage Limits| ClineQuota ClientCore -->|Plan Features| ClinePlan

✨ Features & Module Breakdown

  • lib/models.js: Manages the curated catalog (11 built-in models) and dynamically parses subscription plan models (parsePlanIncludedModels, getAllModels, getDynamicModels).
  • lib/cline-client.js:
    • fetchUsageLimits: queries GET /users/me/plan/usage-limits, GET /users/me/plan, and GET /users/me with in-memory caching.
    • sessionStats / recordSessionRequest: in-memory telemetry recording requests count, tokens, latency, and timestamps.
    • saveCredentialKey: writes credentials directly into ~/.dsh/.credentials.yaml.
    • smokeChat: tests latency via non-streaming ping and updates session metrics.
    • buildPiAiProvider: builds the DSH llm-pi-ai structure (api: 'openai-completions').
  • lib/index.js: Cordis service module managing routes (including POST /dsh-clinebot/models/sync), quota warnings threshold evaluation, credentials, and registering the /cline slash command.
  • lib/client.js: Full-featured dedicated Settings section (settings.section, order 28) with live quota bars, exhaustion warning banner, session metrics telemetry card, one-click plan sync button, and plugin accordion (settings.plugin.item).

📦 Installation

▼
bash
复制代码
dsh plugin --profile web add @goodandready/dsh-clinebot

Restart your DeepSeek Harness instance and refresh the browser.


💬 Slash-Command /cline

From any DSH chat session, type /cline to inspect quota, warning alerts, and session telemetry:

▼
text
复制代码
### 🤖 ClinePass Status (ClinePass ($9.99/mo)) * Latency: ✅ 210 ms * Active Key: CLINEBOT_API_KEY (credentials) * Default Model: `cline-pass/deepseek-v4-flash` ⏱ 5-Hour Window: [████░░░░░░] 42% (resets: 18:00) 📅 Weekly Window: [██████░░░░] 60% (resets: Sep 8) * Account: `developer@example.com` 📈 Session Metrics: * Requests: 14 calls * Tokens: ~8,450 (Prompt: 6,100 | Completion: 2,350) * Last Latency: 210 ms

⚙️ Configuration Reference (settings.yaml)

Configure options in settings.yaml or directly inside the Web UI:

▼
yaml
复制代码
dsh-clinebot: enabled: true baseUrl: https://api.cline.bot/api/v1 apiKeyEnv: CLINEBOT_API_KEY defaultModel: cline-pass/deepseek-v4-flash timeoutMs: 15000 smokeTimeoutMs: 25000 enabledModels: - cline-pass/deepseek-v4-flash - cline-pass/deepseek-v4-pro - cline-pass/kimi-k3 - cline-pass/qwen3.7-max dynamicModels: []

Configuration Parameters

ParameterTypeDefaultDescription
enabledbooleantrueEnable or disable the ClineBot provider bridge
baseUrlstring"https://api.cline.bot/api/v1"ClinePass OpenAI-compatible base URL
apiKeyEnvstring"CLINEBOT_API_KEY"Environment variable / credentials key name
defaultModelstring"cline-pass/deepseek-v4-flash"Default selected model ID
timeoutMsnumber15000HTTP request timeout in milliseconds
smokeTimeoutMsnumber25000Smoke test latency ping timeout
enabledModelsarray[...]List of models exposed in the DSH chat picker
dynamicModelsarray[]Dynamic models automatically synced from the official plan

🧪 Testing

Run the automated test suite:

▼
bash
复制代码
npm test

📄 License

MIT © GooDAnDReaDY

模型接入

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:GooDAnDReaDY/dsh-clinebot

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
dsh-subscriptions
通过 OAuth 将 ChatGPT Codex、Claude、Grok 与 Antigravity 订阅注册为 DeepSeek Harness 的 LLM 提供方,无需为其配置 API Key。
dsh-zhipu-toolkit
智谱 BigModel GLM 双端点模型目录(Coding Plan 与普通 API),支持实时模型发现与实测校准的思考档位映射,提供凭据、端点与默认推理档的可视化设置卡片。
dsh-qwen38-compaction-fix
针对 NInfer 托管的 qwen3.8-27b 网关的压缩修复:在 dsh 上下文压缩与会话标题调用中关闭思考,避免 xhigh 推理耗尽全部输出预算;同一思路适用于其他启动方式,本包仅面向 NInfer。
dsh-model-sync
一键同步 / 自动同步供应商模型列表,与 /v1/models 保持一致。
dsh-openrouter-provider-advisor
按量化、速度、缓存重度价格、上下文和可用率为当前 DSH 模型推荐 OpenRouter 供应商,并支持一键切换以帮助降低 token 成本。