← Back to Pull requests

feat: add Kimi hybrid profile #478

Closed
unknown closed this pull request without merging on Nov 10, 2026 02:51 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 19:13 UTC
Author

摘要

  • 新增 Kimi Code CLI hybrid 档案,支持 kimi acp、kimi --session <id>、OSC 7501 app=kimi-code 和 session/list 候选识别。

  • 支持模型与模式映射、冷恢复后仅重应用 mode、冷恢复与手动设置的 Already in <mode> mode 幂等错误;浏览器草稿和 API 的混合/普通 Kimi 输入都使用 200ms 文本/Enter 分隔,空 Enter 不等待。

  • 新安装的 Kimi 预置使用 --auto 并默认启用混合模式;已有 launch-configs.json 不改写。

  • agent_pretrust 为 Kimi 注入进程级 KIMI_CODE_TRUST_WORKSPACE=1,只信任当前工作区,不写持久配置;恢复 TUI 与 ACP 继承同一环境。

  • 扩展 fakeagent、Go/Wire 快照、桌面与手机 E2E,以及接入/协议/用户故事文档。
  • OpenSpec:add-kimi-hybrid-profile。

    受影响故事:US-B01、US-B08、US-B09、US-Q01、US-Q03、US-Q04、US-Q07、US-Q08。

    验证

  • make check:通过。

  • make test:通过。

  • 真实 kimi 2.5.2 ACP 基线:initialize/new/set_config_option/prompt/list/resume/load/close/cancel 全部通过;resume 无回放、load 有回放,model/thinking 保留。

  • 隔离 WebMux + 真实 Kimi:trust 无启动阻塞,TUI 首条消息进入 session/list,完成 TUI→ACP→TUI→ACP、取消、恢复 ID、最终 mode=plan/thinking=low/模型保留;Kimi config.toml mtime 未变。

  • 桌面与 iPhone SE Playwright:Kimi 预置混合开关和 fakeagent 双向往返通过。
  • 截图

    浅色主题、隔离启动配置预置。每张均为基线(before)与当前实现(after)的相同页面。

    Desktop(1280×900)

    | 状态 | Before | After |
    |---|---|---|
    | 启动配置卡片 | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/before-desktop-card.png) | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/after-desktop-card.png) |
    | 编辑对话框 | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/before-desktop-dialog.png) | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/after-desktop-dialog.png) |

    Tablet(768×800)

    | 状态 | Before | After |
    |---|---|---|
    | 启动配置卡片 | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/before-tablet-card.png) | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/after-tablet-card.png) |
    | 编辑对话框 | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/before-tablet-dialog.png) | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/after-tablet-dialog.png) |

    Phone(390×844)

    | 状态 | Before | After |
    |---|---|---|
    | 启动配置卡片 | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/before-phone-card.png) | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/after-phone-card.png) |
    | 编辑对话框 | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/before-phone-dialog.png) | ![](https://raw.githubusercontent.com/mzdluo123/webmux/wt/mellow-otter/docs/images/cli-agents/kimi-hybrid/after-phone-dialog.png) |

    视觉检查:三种视口均无页面级横向溢出;未验证真机、触屏常驻与 hover 行为。

    Diff: 360 lines (+270 / -90) across 4 files Reviewer: mzdluo123 Review duration: 457m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 360 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.352
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #478"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.6% (MEDIUM) · Higher = larger blast radius
    42.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.8% · Safe to merge
    16.8%