編集者注

Miku196/dsh-tokensave

Miku196/dsh-tokensave is a DeepSeek Harness ecosystem project for notifications and integrations. Review its public README for features, setup, and usage details.

これは DeepSeek Harness(DSH)プラグインです。当サイトは GitHub README、インストール情報、メンテナンス状況、公開セキュリティシグナルをまとめています。

dsh-tokensaver

DeepSeek Harness 移植版 pi-tokensaverPi coding agent 扩展)—— 把 tokensave 的本地语义图引擎接进 DSH,让 agent 用语义查询代替暴力 grep/读文件,大幅省 token。

license version dsh-plugin

它做什么

pi-tokensaver 阶段DSH 中的实现
1. tokensave sync + .gitignore 卫生本插件(apply 时执行 init/sync
2. 工具桥接cli 直连(0.2.0 起 MCP 模式已移除):tokensave tool <name> --args <json>,无 serve 进程、无 MCP,工具名 tokensave_*
3. 系统提示词注入本插件ctx.systemPrompt.section
4. teardown 杀进程无长驻进程,无需处理

装好后模型会自动获得 80+ 个语义图工具(search / callers / callees / body / entities / status / dead_code / circular …),并在系统提示词中被引导优先使用它们探索代码——一次语义查询省 900–2000 token,tokensave_metrics 可量化每次调用省了多少。

安装(web profile 示例)

前置条件:

  1. tokensave 已安装(cargo install tokensave,或从 GitHub Releases 下载 tokensave-vX.Y.Z-x86_64-windows.zip 解压后放入 PATH)。
  2. dsh 可用,且 profile 目录有 pnpmdsh plugin 依赖)。

从 GitHub 安装(推荐)

dsh plugin --profile web add github:Miku196/dsh-tokensave

本地开发安装

dsh plugin --profile web add file:/path/to/dsh-tokensaver

挂载配置

$DSH_HOME/profiles/web/cordis.patch.yml 里加一行:

- insert:
    - id: tokensaver
      name: dsh-tokensaver
      config:
        binary: /path/to/tokensave   # 或 PATH 上的命令名
        cwd: /path/to/your/project   # 语义图所在目录
        autoSync: true

0.2.0 起仅支持 cli 直连,MCP 模式(bridge: "mcp" + dsh-mcp-client 行)已移除。

保存后 dsh web 会自动热重载(无需重启)。新会话中模型即可调用 tokensave_searchtokensave_callers 等工具。

更新插件

dsh plugin --profile web update dsh-tokensaver

配置

字段默认说明
binarytokensave可执行文件路径或 PATH 命令名
cwdprocess.cwd()项目根目录(语义图所在目录)
bridgecli历史字段(仅 cli):0.2.0 起 MCP 模式已移除,填 mcp 会报错
autoSynctrue启动时 init(无索引)/ sync(有索引)
syncTimeoutMs600000同步超时
callTimeoutMs120000cli 模式单次工具调用超时
updateChecktrue启动时查 crates.io 是否有 tokensave 新版本,有则告警
updateCheckTimeoutMs10000更新检查网络超时
promptOrder150提示词 section 顺序(工具指导带 100–199)
gitignoreHygienetrue自动把 .tokensave/ 加进 .gitignore

任何失败都优雅降级:binary 缺失时只告警,不阻塞 profile 启动,也不注入提示词(避免模型调用不存在的工具)。

开发

# cli 桥单元自测(工具发现 / --help 解析 / schema 生成 / 版本检测 / 真实调用)
TOKENSAVE_BINARY=/path/to/tokensave TOKENSAVE_CWD=/path/to/your/project node test-cli.mjs

致谢

License

MIT © dsh-tokensaver contributors

REPOSITORY SIGNALS

セキュリティとインストールエビデンス

このスコアは公開リポジトリメタデータと当サイトに登録されたインストールエビデンスのみに基づくもので、コードセキュリティ監査とは異なります。

出所の追跡可能性

公開プラグインカタログから取得し、公開 GitHub リポジトリにリンクしています。

ライセンス

リポジトリは MIT ライセンスを宣言しています。

メンテナンス活動

過去180日以内にコードの更新があります。

インストールエビデンス

再現可能な正確なインストールメタデータはまだ登録されていません。リポジトリの説明に従って手動で確認してください。

インストールライフサイクルスクリプト

確認したパッケージメタデータにインストールライフサイクルスクリプトは宣言されていません。