treg
superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:re-ITRT/dsh-keyring
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness(dsh)密钥保险库插件:密钥自动脱敏、自动收纳、密码本设置页、跨重启持久。
以官方 profile bundle(npm 包)形态安装,重启 dsh web 后自动加载,数据不丢。
密钥自动脱敏(进模型上下文前)
ghp_ / github_pat_ / gho_、sk- / sk-ant-、AIza(Google)、AKIA(AWS)、xox* / xapp-(Slack)、hf_、glpat- 等 GitLab 全家桶、npm_、pypi-、Stripe / Telegram / JWT / 私钥块等。KEY=value 环境变量、YAML/JSON 字段(password: …、"apiKey":"…")、Authorization: / x-api-key: 请求头。***;长 token 保留头 6 尾 4。agent/pre-step)与工具输出(tools/post-execute)。双层存储
scope=global):跨会话、跨重启持久;存放于 dsh 凭据文件(.credentials.yaml,0600 权限)。scope=session):只存在于当前会话内,随会话结束自动消失;不写入全局。模型工具
keyring_store(新增;同名再次保存即覆盖/编辑)keyring_get(取回原文,供当前操作使用)keyring_list(列出键名+元数据,不返回值)keyring_unset(删除,可删全局或会话级条目)设置页「密码本」(UI)
--dsw-alias-*),自动适配深浅色。以官方 profile bundle 形态安装:
dsh plugin --profile web add dsh-keyring
# 或本地目录:
dsh plugin --profile web add ./dsh-keyring
# 或 tarball:
dsh plugin --profile web add ./dsh-keyring-0.1.0.tgz
装完重启 dsh web 即生效(自动加入 dsh.profile.bundles)。
若从 git 安装,需要
prepare脚本 +pnpm-workspace.yaml的allowBuilds(见官方 publish.md)。
本插件在克隆的 deepseek-harness 仓库内作为 workspace 成员开发(复用仓库依赖),
以独立 DSH_HOME + 独立端口跑隔离测试环境,绝不触碰生产 ~/.dsh。
# 构建 host + client
pnpm --filter dsh-keyring run build
# 或直接:
../../node_modules/.bin/tsc -p tsconfig.json
node scripts/build-client.mjs
# 一键验收(类型检查 + 37 项功能验证)
bash verify-all.sh
# 隔离环境安装(独立 DSH_HOME)
DSH_HOME=$PWD/test-home pnpm dsh plugin --profile web add ./plugin-dev/dsh-keyring
# 隔离环境启动
DSH_HOME=$PWD/test-home pnpm dsh --profile web --no-open --port 3091
src/redact.ts 脱敏引擎(Hermes 规则移植 TS,输出命中列表 + 遮罩文本)
src/store.ts KeyringStore 服务:全局凭据持久 + 会话内存
src/bridge.ts 脱敏桥:agent/pre-step + tools/post-execute + agent/disposed 清理
src/tools.ts keyring_store/get/list/unset 模型工具
src/remote.ts keyring Remote(host 侧,供设置页 CRUD)
src/config.ts Schemastery 配置 schema
client/ 浏览器半:设置页「密码本」UI(remote.ts 描述符 + index.tsx)
cordis.patch.yml bundle patch(id: keyring, name: dsh-keyring)
scripts/build-client.mjs client bundle 构建(esbuild + __ModuleLoader__ 外壳)
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: cli。