Hua1Q1nG/dsh-prompt-self0

dsh-prompt-self-client

Personal prompt profile engine for DeepSeek Harness: message-level prompt rewriting and automatic profile learning with a bilingual settings panel and conversation dock.

包名
dsh-prompt-self-client
版本
0.3.0
许可证
MIT
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Hua1Q1nG/dsh-prompt-self

🎛 使用

入口位置能力
状态胶囊对话输入框上方一眼看清引擎状态(绿=全开/黄=部分/灰=暂停),点击弹出面板快速切换
设置页设置 →「Prompt 画像」开关 + 画像完整视图 + 刷新
语言-fin(可选)立即学习最近一次交互并简短确认(自动学习已覆盖日常场景)
查看画像对话里说「看看我的画像」模型经 skill 读取并展示画像

⚙️ 配置

预设引擎行(Agent 层)

- id: prompt-self-client
  name: './prompt-self/lib/index.js'
  config:
    enabled: true            # 主开关(组合级)
    provider: deepseek-official
    model: deepseek-v4-flash # 辅助调用模型(改写/学习,建议用快模型)

完整配置项(均有默认值,均可省略):

默认说明
enabledtrue组合级主开关
forceEnginefalse单组合(无预设作用域)profile 下强制启用引擎(测试用)
profilePath/skills/prompt-self-optimizer/profile.md画像文件路径
recordsPath/skills/prompt-self-optimizer/profile.records.md学习记录档案路径(默认自动推导,0.2.0)
statePathprofilePath + ".state.json"已学习配对去重状态
configPathprofilePath + ".config.json"运行时开关文件
provider / modeldeepseek-official / deepseek-v4-flash辅助 LLM 路由
optimizeMaxTokens1200改写输出上限(推理型辅助模型需留出推理余量)
learnMaxTokens3200学习输出上限
optimizeTimeoutMs / learnTimeoutMs30000 / 120000调用超时
maxPromptChars / maxOutputChars6000 / 10000学习样本截断
maxHabits / maxRules / maxRecords40 / 40 / 30(预设行已设 20 / 18 / 10画像容量上限
maxProfileChars6000改写调用注入画像的总长截断(字符,0.2.0)

运行时开关(可视化 UI 写入)

profile.md.config.json(由开关 UI 自动维护):

{ "optimizeEnabled": true, "learnEnabled": true, "model": "deepseek-v4-flash" }

引擎按 mtime 缓存读取,改动即时生效,无需重启-fin 显式学习不受 learnEnabled 限制。

Web 路由(宿主层)

路由方法说明
/prompt-self/profileGET画像三栏 + 开关状态 + 更新时间
/prompt-self/configGET / POST运行时开关读取 / 写入(POST body:{optimizeEnabled?, learnEnabled?, model?}