← 返回列表
D

dsh-ai-monitor

v0.1.0 · 4 天前发布

DeepSeek Harness plugin: query AI Monitor balance / usage from local SQLite — cost-aware agent, auto bookkeeping with the AI Monitor proxy.

dsh-plugindeepseek-harnessai-monitorbalanceusagetokencost

README

dsh-ai-monitor — DeepSeek Harness 插件

AI Monitor 与 DeepSeek Harness 的桥接插件:让 dsh agent 在跑任务前能感知 AI 预算,

任务后能汇报账单。只读本机 AI Monitor SQLite,不改动其数据。

安装(npm 发布后)

sh

方式一:直接添加到 dsh profile


cd ~/.dsh/profiles/web
npm install dsh-ai-monitor

方式二:dsh CLI(若已支持 plugin add)


dsh plugin add dsh-ai-monitor

然后在 dsh 启动时叠加 bundle(或通过 profile 引用)加载插件。

前置要求

  • 本机已安装并运行 AI Monitor,且至少添加了一个账户

  • dsh 已配置好模型(Settings → Models 填入 API key)

  • 数据库路径:~/Library/Application Support/com.ai-monitor.app/ai-monitor.db(可用 DSH_AI_MONITOR_DB 环境变量覆盖)
  • 功能

  • query_ai_balance 工具:查询各 AI 平台账户余额 + 今日 token 用量 + 消耗金额

  • 数据来源:AI Monitor 本地 SQLite

  • 只读模式(readonly: true + WAL 兼容),不锁库、不改数据
  • 配合 AI Monitor 代理使用(推荐)

    把 dsh 的 LLM 请求也指向 AI Monitor 本地代理(127.0

    查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    dsh-ai-monitor
    Repo
    git+https://github.com/WinterOne-hub/ai-monitor.git
    Engines
    {}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"}}