DSH Plugins
返回列表
🧠

dsh-env-profile

记忆 更新于 2026.08.18

在终端中运行以下命令:

dsh plugin install Yvesgao/dsh-env-profile

将以下提示词粘贴到 DeepSeek Harness 对话框中:

在 DeepSeek Harness 中执行 dsh plugin install Yvesgao/dsh-env-profile 完成安装,插件源码地址为 https://github.com/Yvesgao/dsh-env-profile 。

插件介绍

Every new session forces the model to rediscover the machine from scratch: which tools are installed, their versions, which paths are reliable, which network link is fast. That repeated probing is slow and burns tokens for no lasting gain. dsh-env-profile solves exactly this. As a DSH global-experience plugin, it runs a one-time host-side probe, distills the results into a cross-session profile, and hands the model a working knowledge of the environment from the very first turn so it stops re-running env, which, and ping round by round.

The closed loop has three stages. Probing fires in parallel across 33 common commands (existence plus version where available), key filesystem paths, a TCP-443 handshake timing, and a 1 MiB disk read/write sample—all deterministic host-side operations that cost zero tokens and are cached for a configurable interval (default 6 hours). Accumulation subscribes to session events, folds per-turn tool calls, errors, and token ledgers into per-session stats, and uses the session's own model every N turns to extract user preferences, project conventions, and useful paths as knowledge entries, deduplicated by normalized text and stored globally. Injection compresses the profile into a byte-deterministic summary (hard-capped at 600 characters by default) at system-prompt slot 500; when the profile is unchanged the summary is identical byte-for-byte every turn, so DeepSeek's prefix cache keeps hitting, and even when the summary does shift only the tail is invalidated while the large stable prefixes above remain cached.

It is aimed at developers who run DSH intensively and care about token efficiency: if you open a dozen sessions a day, keep asking the model to re-verify tool versions, paths, or network latency, or simply want the model to carry forward the machine's quirks across sessions, this plugin gives every new conversation the full environment context up front and redirects the saved probing turns and explanatory tokens back to the actual work. The current skeleton targets Windows; POSIX support is already on the roadmap.

使用场景

  • 每次新会话开局即获得本机工具、路径、网络与磁盘快照,省去重复探测
  • 将各会话的工具调用、错误与 token 账目折叠为全局统计,沉淀为可查询的长期档案
  • 以字节确定的低开销摘要注入每轮系统提示,稳定前缀缓存命中率并压低 token 消耗

适合人员

  • 高频使用 DSH 并注重 token 效率的开发者
  • 需要跨会话保持环境上下文的自动化工作流
  • 希望减少重复探测、加快会话启动速度的终端用户