
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-prompt-optimize
Advanced tools
DSH web 插件:输入框右侧 ✨ 按钮,用 DSH 内置模型或外部 LLM 一键优化提示词,再次点击还原原文(market-prompt-optimize 的 DSH 同款移植)。
DSH(DeepSeek Harness)web 插件:在聊天输入框右侧工具行加一个 ✨ 按钮, 用 LLM 一键优化当前草稿,再次点击还原原文(右键打开设置)。 这是 market-prompt-optimize(Codex 用户脚本)的 DSH 同款移植。
来源 / Source:https://raw.githubusercontent.com/BigPizzaV3/CodexPlusPlusScriptMarket/main/scripts/prompt-optimize.js
inputActions.setDraft)。| 模式 | 说明 |
|---|---|
| 内置(默认) | 走 DSH 自带 ctx.llm 服务,不需要额外 API Key。模型解析顺序:设置里的 Provider/Model 覆盖 → 当前会话正在用的模型 → 第一个已注册 provider 的默认模型 |
| OpenAI 兼容 | 直接请求 {baseUrl}/chat/completions(需 HTTPS,禁止本机/内网地址) |
| Anthropic | 直接请求 {baseUrl}/v1/messages(同上) |
三种优化风格(简洁 / 结构化 / 编程)各带可编辑的 system prompt,可一键恢复默认。
外部模式的 API Key / Base URL 只存在浏览器 localStorage,随请求参数一次性传给
host 半(/prompt-optimize/api/optimize),host 侧不落盘。
dsh-prompt-optimize/
├── package.json # 清单:dsh.bundle.patch + dsh.client(bundle 型)
│ # exports 必须含 "./client"(客户端 bundle 路径,client-modules 依赖)
│ # 与 "./package.json"(client-modules 用 require.resolve('<pkg>/package.json') 读元数据)
│ # exports 必须含 "./client"(客户端 bundle 路径,client-modules 依赖)
│ # 与 "./package.json"(client-modules 用 require.resolve('<pkg>/package.json') 读元数据)
├── cordis.patch.yml # bundle patch:要插入的 loader 行
├── dsh.plugin.json # 插件注册表清单(client.main = lib/client.js)
├── lib/
│ ├── index.js # host 半:/prompt-optimize/api/* JSON 路由(LLM 优化)
│ └── client.js # client 半:✨ 按钮(conversation.input.right 槽位)
└── README.md
name / inject(['webServer','llm']) / apply(ctx) 的 cordis 插件,
用 ctx.webServer.register({kind:'prefix', path:'/prompt-optimize/api'}) 挂一条
同源 JSON 路由(仅接受带同源 Origin 的 POST,CSRF 防护)。window.__ModuleLoader__.load({id:'dsh-prompt-optimize', factory})(bundle id 必须等于 package name,client-modules 以包名为条目 id)(bundle id 必须等于 package name,client-modules 以包名为条目 id)
纯 JS bundle;在 conversation.input.right(list / session 作用域)注册 ✨ 按钮,
通过槽位 owner 快照(session / input.draft)与标准 kit(inputActions.setDraft)读写草稿。# 1. 本地目录(开发推荐)
dsh plugin --profile web add link:C:/Git/dsh-prompt-optimize
# 2. 手动改 profile(~/.dsh/profiles/web/)
# package.json dependencies 加 "dsh-prompt-optimize": "link:C:/Git/dsh-prompt-optimize"
# dsh.profile.bundles 追加 "dsh-prompt-optimize"
# cordis.patch.yml 追加:
# - insert:
# - id: prompt-optimize
# name: 'dsh-prompt-optimize'
# 3. 发布后 git 源一行
# dsh plugin --profile web add "github:<you>/dsh-prompt-optimize#main"
挂载后 pnpm install(profile 目录),完全退出并重开 DSH web(bundle 型插件
需要重启加载客户端模块),硬刷新浏览器。
dsh web --dump-config | grep prompt-optimize # 组合里能看到插件行
重启后在任意会话的输入框右侧应看到 ✨ 按钮;点它即可优化,再点还原。
打开浏览器控制台可查看 window.__ModuleLoader__ 的加载错误(若有)。
# 改 lib/index.js / lib/client.js 后(纯 JS,无构建步骤):
# host 半改动 → 重启 dsh web;client 半改动 → 硬刷新浏览器即可
FAQs
DSH web 插件:输入框右侧 ✨ 按钮,用 DSH 内置模型或外部 LLM 一键优化提示词,再次点击还原原文(market-prompt-optimize 的 DSH 同款移植)。
The npm package dsh-prompt-optimize receives a total of 23 weekly downloads. As such, dsh-prompt-optimize popularity was classified as not popular.
We found that dsh-prompt-optimize demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.