dsh-codex-harness
其他 活跃维护

dsh-codex-harness

shuind/dsh-codex-harness

dsh-codex-harness

2
Stars 标星
0
Forks 分支
2
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
159 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:shuind/dsh-codex-harness
git clone https://github.com/shuind/dsh-codex-harness.git
git clone git@github.com:shuind/dsh-codex-harness.git
README.md main

@shuind/dsh-codex-harness

在 DSH 中提供 Codex preset:引入 Codex 风格的系统提示词与工具契约,支持图片输入、可选思考强度、Fast 优先级请求、OpenAI Responses 网页搜索与远程压缩,以及在 Web 设置上下文容量;旨在给来源于Codex的token提供适配harness,并兼容享受DSH生态。

功能

  • Codex coding-agent 提示词:提供 Codex 风格的系统提示词、工具契约和编码工作流。
  • Codex 工具exec_commandwrite_stdinapply_patchupdate_plan
  • GPT 能力补全:为 GPT 系列模型补充图片输入和思考强度选项;不会覆盖用户已有的显式配置。
  • Fast:仅在 Codex preset 的模型选择菜单中显示,开启后向 Responses 请求发送 service_tier: "priority"
  • 远程搜索与压缩:OpenAI Responses 请求默认优先使用 hosted web_search/responses/compact;失败时回退到 DSH 的本地实现。
  • 上下文容量:在 Web 中设置 1K1000K tokens,设置值作用于下一次请求。

安装

dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.12

重启 Web,创建新会话,在模式菜单中选择 Codex 模式

配置

在 DSH 的 Models / llm-pi-ai 中配置 Responses provider、endpoint、API key 和模型。例如:

api: openai-responses
baseURL: https://your-responses-endpoint.example.com
apiKeyEnv: OPENAI_API_KEY

模型列表中填写中转站实际支持的 GPT 模型。

请求设置

Fast

Fast 与 reasoning_effort 独立。开启 Fast 后,GPT Responses 请求会携带:

{
  "service_tier": "priority"
}

Fast 设置保存在 codex 命名空间,只对 Codex preset 生效。

上下文容量

点击 Web 顶部的上下文使用量指示器,可以设置下一次请求的上下文容量。上方 meter 显示当前请求的实际容量;修改设置后,需要发送下一次请求才会更新。

上下文容量使用整数 K tokens,范围为 1K1000K。实际可用上限仍取决于模型和中转站支持情况。

自定义 preset

在自定义 agent.cordis.yml 中挂载 Codex 工具层:

- id: codex-tools
  name: '@shuind/dsh-codex-harness'

如果需要保留 Codex preset 的完整工具、搜索、压缩和 Skills 组合,建议直接使用随包提供的 presets/codex

注意事项

  • preset 在创建会话时确定;已有会话不会自动切换到 Codex 模式。
  • GPT 模型的图片输入和思考强度属于能力补全;用户已明确配置的字段会被保留。
  • hosted search、远程压缩以及 reasoning 参数的可用性取决于实际 Responses 中转站和模型。

License

MIT