Skip to content

chore: sync release 2.7.0 and desktop 1.4.0 back to main - #5158

Closed
kimi-agent-bot wants to merge 4 commits into
mainfrom
chore/sync-release-2026-11-19-back-to-main
Closed

kimi-agent-bot wants to merge 4 commits into
mainfrom
chore/sync-release-2026-11-19-back-to-main

Conversation

@kimi-agent-bot

@kimi-agent-bot kimi-agent-bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Requirement or Bug

关联 #5094。CLI 2.7.0、Desktop 1.4.0 已从 release/2026-11-19@a5e355e2718a2ebf70d8229fa5a05fe35d5f98a1 发布;本 PR 将本批 release-only 修复与发布元数据选择性回同步到 main,保留 main 后续提交、未消费 changesets 以及已独立合入的 #5121、#5131、#5134。

  • Base:main(当前 9364a3f8b07ec085ef4f96cf586270659ca7d79b;初始为 094771711c4d82b42c579936bc2daa7b1ae1040c,后续 main 已无冲突合入)
  • Head:chore/sync-release-2026-11-19-back-to-main(574c46b4409ceb929da281f50f03327b84b9c5b6)
  • release 与 main 的 merge-base:08997afe2b49b67f790cecb7c2c6a8fab86c40af
  • 分支性质:正式版。merge-base 只有 canary tag;上一正式版 tag 不满足 hotfix 的 merge-base 或回退判据,不按分支名称推断。
  • 最终 diff:71 个文件,546 行新增、294 行删除;其中 52 个为已消费 changeset 删除,19 个为修复、回归测试与发布元数据。

本 PR 只回同步,不合入整个 release 分支,不触发正式版/npm/VS Code/Desktop/CDN。请人工 review 后按门禁⑥合并。

Bug Reproduction Steps

N/A — 已发布正式版的回同步;各项修复的回归覆盖随本 PR 一并同步。

Root Cause

N/A — 本 PR 不引入新的修复机理,而是将已经发布验证的修复移植到最新 main,并保留 main 的后续架构与行为。

Code Changes

核心思路是逐项移植 release-only 差异,而不是用 release 覆盖 main。git cherry 的 patch 等价结果显示 #5092、#5100 已在 main;本 PR 只移植 #5096、#5099、#5098、#5102 和 #5094 的发布元数据。

flowchart LR
  R[release-only fixes and metadata] --> S[selective three-way backsync]
  M[latest main changes] --> S
  S --> P[PR to main]
  D[Flow A/B and cleanup PRs] --> M
  D -. not duplicated .-> S
Loading

这样组织是因为 Flow A/B 与 #5134 已经有独立合入路径;完整回同步只补齐代码、版本和已消费 changesets,不重复改文档或 release-notes。

修复与回归测试

与 main 后续改动重叠处采用三方适配:

  • packages/app-core/src/api/daemon/client.ts 同时保留 localOnly 本机搜索与 workspace cursor 条件:localOnly 始终不跨 host;cursor 仅在 includeHosts !== true 的所属 daemon 上省略 hosts。
  • packages/app-core/src/api/hostRouting.ts 显式记录已知本机工作区;已知本机 cursor 使用 localOnly,真正未知归属才 fanout,避免远程工作区误回本机空页,也避免本机分页无谓等待 SSH。
  • packages/app-core/test/daemon-client.test.ts 同时保留 main 的 local-only 回归和 release 的 cursor 回归,并分别覆盖已知远程、已知本机与未知归属。
  • packages/core/test/llm/anthropic/anthropic.test.ts 保留 main transport harness 的 anthropic 参数,再追加 output ceiling 用例。
  • 其余重叠测试文件由三方补丁保留 main 新增用例;非重叠代码文件已与 release 逐字节核对一致。

发布元数据与文案边界

  • CLI 2.6.3 → 2.7.0,Desktop 1.3.7 → 1.4.0,内部 kap-server 0.3.0 → 0.3.1;VSCode 保持 0.9.0。
  • release 的 59 个已消费 changesets 中,54 个仍存在于 main;按本批明确边界保留 kap-agent-collaboration.md 与 kap-agent-http-and-json-boot.md,因此最终删除 52 个。其余 5 个只在 release 产生并已消费,不在 main 伪造新增/删除。
  • merge-base 后 main 新增的 10 个 changesets 全部原样保留。两个暂缓清理的 KAP changesets 也原样保留,需另行处理,不属于本 PR。
  • apps/kimi-code/CHANGELOG.md 2.7.0 按已审口径删除 feat(kap): add agent-to-agent HTTP wait/interactions/kap.md, web --json, and KAP guide #4966 与两条 refactor(kap-server): converge sessions and mcp APIs onto /api/v1 #4891 API 迁移项。
  • apps/desktop/CHANGELOG.md 1.4.0 删除外部 Agent 会话协作的 Minor 条目及空标题,并删除 Qwen Coding Plan 条目。
  • .changeset/release-plan.json、pnpm-lock.yaml、Flow A docs、Flow B release-notes、docs(changelog): remove KAP commitments from 2.7.0 and 1.4.0 #5134 清理结果均不修改;版本提交本身没有锁文件差异,pnpm install --frozen-lockfile 已验证。
  • 不涉及 submodule、web dist、GitHub Release 正文、tag、release 分支、CDN 或广播。

阅读指南

先读 packages/app-core/src/api/daemon/client.ts 与 packages/kap-server/src/services/hosts/hostFanout.ts 看两处 main/release 行为如何共存,再读 packages/core/src/llm/builtin/protocol/anthropic/legalize.ts 和 packages/app-markdown/src/lib/tableWide.ts。其余为对应回归测试、发布元数据和已消费 changeset 清理。

Behavior Changes and Affected Users

Behavior Before After Who relies on the old behavior Escape hatch
Claude 5 compaction 输出预算 main 未识别 Opus 5 / Haiku 5 的 128000 上限,可能按过大预算请求 与已发布 2.7.0 一致,较大预算收敛到 128000;较小显式预算和未知模型不变 使用 Claude Opus 5 / Haiku 5 的 CLI/Desktop 模型请求 无需,属于已发布缺陷修复
空闲 SSH host 的跨主机聚合 host session 空闲退出后,列表可能把 host 判为不可用 按需重连并复用并发连接;慢启动有 2 秒恢复窗口 配置 SSH 项目的 Desktop/Web/CLI 用户 无需,属于已发布缺陷修复
SSH 项目与历史会话列表 无响应 host 可能拖住项目发现;cursor 可能错误跨 host,未知归属可能误关 fanout,已知本机也可能被误当未知 恢复与发现合计单 host 上限 5 秒;已知远程直连、已知本机 localOnly、未知归属 fanout,本地项目继续可见 SSH host 不稳定时访问项目侧栏和历史会话的 Desktop/Web 用户 无需,属于已发布缺陷修复
本机搜索 localOnly 只查本机 保持 main 行为;与 cursor 条件互不影响 使用本机会话搜索的 Desktop/Web 用户 原有行为保留
Markdown 表格操作按钮 side chat 等 clipping container 可能裁切按钮 按可见右边界放置并监听 clipping ancestors Desktop/Web Markdown 表格用户 无需,属于已发布缺陷修复
发布元数据 main 为 CLI 2.6.3 / Desktop 1.3.7 / kap-server 0.3.0 对齐已发布 CLI 2.7.0 / Desktop 1.4.0 / kap-server 0.3.1;VSCode 不变 后续 changeset 与 release 工具 无需
对外 changelog release 原始版本节含本批明确撤回的外宣条目 main 获得清理后的版本节;代码能力和已发布 Release 正文不被本 PR 改写 阅读 main 上 CLI/Desktop changelog 的用户与后续策展 按本批审稿结论执行

以上修复均已在 CLI 2.7.0 / Desktop 1.4.0 发布;本 PR 不新增默认开关、不实施代码层面的 KAP 移除,也不改变 release/tag 已发布内容。

验证详情
  • Node.js 24.15.0、pnpm 10.33.0 下 pnpm install --frozen-lockfile:通过,锁文件无差异。
  • 全仓 pnpm typecheck:首轮通过;审稿增量修改后 Desktop 与 kap-server typecheck 再次通过。
  • pnpm lint:通过;先清理了 typecheck 构建产生的 325 个未跟踪 .d.ts 临时文件,未改 lint 规则或基线。
  • 定向 Vitest:6 个文件、231/231 通过,覆盖 Anthropic、host aggregation/hosts、Markdown table、daemon client 与 HostRouter;包含已知远程、已知本机、未知归属 fanout 和恢复计入 5 秒总预算的回归。
  • git diff --check:通过;无未解决冲突、无未跟踪文件进入提交。
  • 范围核验:版本号正确;两个暂缓处理的 KAP changesets 与 main 新增 10 个 changesets 均在;Flow A/B、docs(changelog): remove KAP commitments from 2.7.0 and 1.4.0 #5134、锁文件和 release-plan 零 diff;本期 changelog 禁止条目扫描通过。
  • 独立只读 diff 审查:无阻断发现;敏感信息、两个保留 changesets、changelog 禁止条目、禁改文件和回同步范围均通过。
  • 当前 HEAD CI:run 44670716453:全部通过;test-windows 按既有设计 SKIPPED。
  • Codex:当前 merge commit 干净判决:Didn't find any major issues;未决线程 0。

未在本机重跑完整 monorepo 测试、Windows 专项或完整 Desktop E2E;这些由 PR CI 与人工 review 继续覆盖。未做 npm/VSCode/Desktop 发布、手动 dispatch、CDN 或广播。

合并前风险:main 可能继续前进,合并前需重新确认 mergeable 与最新 CI。两个 KAP changesets 按本批要求暂缓清理,后续版本 PR 前需按独立指令处理,避免相关文案再次进入版本节。

最终 diff 文件清单(71)

修复与回归测试(13)

packages/app-core/src/api/hostRouting.ts
packages/app-core/src/api/daemon/client.ts
packages/app-core/test/daemon-client.test.ts
packages/app-markdown/src/lib/tableWide.test.ts
packages/app-markdown/src/lib/tableWide.ts
packages/core/src/llm/builtin/protocol/anthropic/legalize.ts
packages/core/test/llm/anthropic/anthropic.test.ts
packages/kap-server/src/routes/sessionsAcrossHosts.ts
packages/kap-server/src/routes/workspaces.ts
packages/kap-server/src/services/hosts/hostFanout.ts
packages/kap-server/src/services/hosts/sshKapBridge.ts
packages/kap-server/test/hostAggregation.test.ts
packages/kap-server/test/hosts.test.ts

发布元数据(6)

apps/desktop/CHANGELOG.md
apps/desktop/package.json
apps/kimi-code/CHANGELOG.md
apps/kimi-code/package.json
packages/kap-server/CHANGELOG.md
packages/kap-server/package.json

已消费 changeset 删除(52)

.changeset/allow-resume-occupied-sessions.md
.changeset/background-notification-tool-row.md
.changeset/background-task-tail-utf8.md
.changeset/bash-session-workspace-env-desktop.md
.changeset/bash-session-workspace-env.md
.changeset/bedrock-provider.md
.changeset/browser-file-annotations.md
.changeset/browser-google-sign-in.md
.changeset/browser-tab-title-and-favicon.md
.changeset/calm-tables-select.md
.changeset/compact-browser-tab-preview.md
.changeset/compact-own-line-calls.md
.changeset/compact-screenshot-loupe.md
.changeset/converge-mcp-api-v1.md
.changeset/converge-sessions-api-v1.md
.changeset/curvy-pandas-cheer.md
.changeset/feat-prompt-prediction.md
.changeset/feedback-multiline-input.md
.changeset/fix-acp-preview-environment.md
.changeset/fix-auth-media-rate-limit.md
.changeset/fix-btw-stale-session.md
.changeset/fix-composer-menu-viewport-clamp.md
.changeset/fix-consecutive-steer-unread.md
.changeset/fix-core-2.6.3-backsync.md
.changeset/fix-grouped-sessions-across-hosts.md
.changeset/fix-host-unpaginated-session-lists.md
.changeset/fix-provider-refresh-toast.md
.changeset/fix-subagent-zero-timeout.md
.changeset/fix-tui-transcript-history.md
.changeset/fix-vertex-adc.md
.changeset/fix-webbridge-partial-update.md
.changeset/follow-up-behavior.md
.changeset/foreground-agent-activity.md
.changeset/fresh-math-cjk.md
.changeset/highlight-running-send-setting.md
.changeset/kap-instance-host-product.md
.changeset/kimi-server-command.md
.changeset/mark-session-unread.md
.changeset/pinned-rename-tooltip-dot.md
.changeset/pinned-workspaces.md
.changeset/remote-control-websocket-proxy.md
.changeset/restore-workspace-directory-actions.md
.changeset/running-send-mode-steer.md
.changeset/screenshot-macos-ime-window-level.md
.changeset/ssh-remote-devices.md
.changeset/ssh-shared-account.md
.changeset/status-session-id.md
.changeset/task-stop-state-icons.md
.changeset/tidy-rooms-stop.md
.changeset/unify-button-variants.md
.changeset/unify-toast-feedback.md
.changeset/web-add-workspace-mkdir.md

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue(ci: release packages #5094 及本批修复 PR)。
  • I have added tests that prove my feature works(同步并适配本批已发布回归测试)。
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill;这是已发布版本回同步,不新增未消费 changeset,两个明确暂缓处理的 KAP changesets 保留。
  • Ran gen-docs skill;Flow A/B 与 docs(changelog): remove KAP commitments from 2.7.0 and 1.4.0 #5134 已独立合入,本 PR 不重复更新 docs 或 release-notes。

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 574c46b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T03:54:56.589905Z 574c46b 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.

@kimi-agent-bot

Copy link
Copy Markdown
Collaborator Author

@codex review
评审约定:

  1. 只审本 PR 相对 base 的 diff;base 存量问题请单列为 note,不作阻塞意见。
  2. 同类问题请一次性列出 diff 内全部位置,不逐轮分批提出。
  3. 纯风格/个人偏好意见不发;每条意见标注严重度(P0 阻断 / P1 应修 / P2 建议)。

@pkg-pr-new

pkg-pr-new Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@574c46b
npx https://pkg.pr.new/@moonshot-ai/kimi-code@574c46b

commit: 574c46b

@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: 5e2d0c7d40

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@kimi-agent-bot

Copy link
Copy Markdown
Collaborator Author

@codex review
增量评审:请只审自上次评审以来的新增 commit;未变更代码请勿重复提出;已 resolve 的主题仅当核实现状代码确已修复或不再成立时才抑制(其余约定同首轮)。

@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: 2186eb23c5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@wbxl2000

Copy link
Copy Markdown
Collaborator

@codex review
增量评审:请只审自上次评审以来的新增 commit;未变更代码请勿重复提出;已 resolve 的主题仅当核实现状代码确已修复或不再成立时才抑制(其余约定同首轮)。

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: d3370b46b8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@wbxl2000

Copy link
Copy Markdown
Collaborator

@codex review
增量评审:请只审自上次评审以来的新增 commit;未变更代码请勿重复提出;已 resolve 的主题仅当核实现状代码确已修复或不再成立时才抑制(其余约定同首轮)。

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 574c46b440

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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.

3 participants