Skip to content

feat: 适配 DeepSeek Harness goal 与 plan 文本命令 - #71

Draft
omsd512-W wants to merge 5 commits into
BytePioneer-AI:mainfrom
omsd512-W:feat/deepseek-feedback-goal-plan
Draft

feat: 适配 DeepSeek Harness goal 与 plan 文本命令#71
omsd512-W wants to merge 5 commits into
BytePioneer-AI:mainfrom
omsd512-W:feat/deepseek-feedback-goal-plan

Conversation

@omsd512-W

@omsd512-W omsd512-W commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

目标

为 DeepSeek Harness 接入 codexhost 现有 Harness Command 流程,支持通过 Composer 的 Harness 命令入口调用 DSH 原生 /goal/plan,同时保留动态发现的 /compact。codexhost 只负责能力发现、路由和结果投影,DSH 继续拥有 goal、plan 与会话状态。

实现

  • 按当前 Native Session 的 commands/list 动态生成命令目录,并在执行前重新确认能力。
  • 仅映射经过审查的 compactgoalplan;目录缺失、不兼容或畸形时失败关闭。
  • 公开 /dsh-goal [<objective>|clear|edit <objective>|pause|resume],在 DeepSeek Adapter 内映射为原生 /goal,避免进入 Codex Desktop 内置 /goal 流程。
  • 公开 /plan [off|message],直接映射为 DSH 原生 /plan
  • Renderer 使用独立的 Harness Commands Popover;选择文本命令后写入 Composer,并通过现有提交事务路由。
  • Host 重新校验当前目录、参数和 Session 状态;Adapter 使用原生 commands/execute,并复用现有 Command Execution Item、Turn 生命周期、取消和错误投影。
  • DSH 特有 descriptor、wire 与结果解析仅存在于 DeepSeek Adapter;Shared、Host 与 Renderer 保持 Harness 中立。

边界

  • /dsh-goal/plan 仅支持文本输入。External Harness 文本 Turn 携带 imagelocalImage 时,Host 会在 Adapter 执行前明确拒绝,不会静默丢图。
  • 不公开 DSH 原生 /feedback,因为它与 Codex Desktop 内置 /feedback 冲突。
  • 不公开 /permission/model/export 或未知命令;权限与模型继续使用 codexhost 现有一级控件。
  • 不复制或重建 DSH 的 goal、plan 状态。
  • 本 PR 不修改 README,也不建立新的通用命令抽象。

提交

  1. d7a3dc7 feat: 扩展 DeepSeek Harness 文本命令适配
  2. 6900461 feat: 路由 Harness 文本命令提交
  3. 4f7062b feat: 添加 Harness 文本命令编辑器入口
  4. 9f79f7d docs: 更新 DeepSeek Harness 命令规范
  5. 05e6e9f chore: 修复上游格式检查

05e6e9f 仅格式化上游带入的 remote-host-lifecycle.test.ts,并将生成型 windows-update.preview.html 加入 .prettierignore,没有修改相关运行逻辑。

验证

  • npm ci
  • 聚焦 Adapter、Host、Renderer、Shared Contracts 测试
  • npm run check:Prettier、ESLint、boundary、TypeScript typecheck、TypeScript tests、Clippy 与全部 Rust tests 本地通过
  • TypeScript:1528 项通过,15 项跳过
  • npx openspec validate --all --strict --no-interactive:53/53 通过
  • git diff --check
  • GitHub CI:Linux ARM64、macOS、Ubuntu 通过
  • GitHub CI:Windows 的上游 Shim 进程生命周期测试 replacement_does_not_signal_a_reused_owner_process_id 偶发收到 Access is denied (os error 5);本 PR 未修改该测试及其实现,本机连续重跑 10 次全部通过,等待仓库 Owner 重跑失败 Job
  • 最终版本的真实 DSH 文本命令流程待人工复测

当前保持 Draft,不请求合并。

@omsd512-W

Copy link
Copy Markdown
Contributor Author

暂不合并

@BytePioneer-AI

Copy link
Copy Markdown
Owner

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T02:26:19.399754Z 6945533 Manual request
🔒 Security Review Completed 2026-08-31T02:26:35.966848Z 6945533 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6945533577

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +855 to +858
if (
!this.#active &&
this.#bufferAutonomousEvent(frame.event.type, frame.event.data, frame.event.seq)
) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Buffer interactions alongside autonomous command turns

When /goal or /plan starts a native Turn before commands/execute settles, this branch buffers only session/event frames while #active remains null. Any approval/requested or question/requested arriving during that interval bypasses the buffer and is immediately rejected or cancelled by #approval/#question because there is no active Host Turn. Consequently, command-triggered model work that needs a tool approval or user answer cannot complete correctly; preserve these interaction frames with the pending autonomous Turn and replay them after it is activated.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6945533577

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@BytePioneer-AI

Copy link
Copy Markdown
Owner

@omsd512-W 合并吗 ,或者优化完毕后@ 我一下

@omsd512-W
omsd512-W force-pushed the feat/deepseek-feedback-goal-plan branch from 5267bb5 to f7bed4d Compare August 31, 2026 12:44
@omsd512-W
omsd512-W force-pushed the feat/deepseek-feedback-goal-plan branch from f7bed4d to 05e6e9f Compare August 31, 2026 12:54
@omsd512-W omsd512-W changed the title feat: 适配 DeepSeek Harness feedback、goal 与 plan 命令 feat: 适配 DeepSeek Harness goal 与 plan 文本命令 Aug 31, 2026
@omsd512-W

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05e6e9f743

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2881 to +2883
this.#pendingExternalCommandRequests.add(thread.id);
try {
const catalog = await thread.session.commands.list();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Recheck Thread state after catalog admission

When an autonomous Harness Turn arrives while this catalog request is awaiting, its handler sets thread.running and activeTurnId, but a normal non-slash submission falls through after the finally without rechecking either value. It then overwrites that state with a new projection; if the Adapter rejects the second start as busy, its cleanup sets the Thread back to idle while the autonomous Turn is still running. Reject or restart the request after discovery when the Thread became active.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants