Feature request: let the interactive TUI answer approvals and questions through KAP, like Desktop and kimi web
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
Start by tracing the interactive TUI session lifecycle, its pending interaction handling, the existing interactions routes, and registration under server/instances/. The issue specifies a loopback server, the existing token, and product: "kimi-code-cli", with an optional config key. Done means external clients can list and answer the TUI session’s pending interactions through those routes, while the native panel remains usable and the first answer wins.
由索引模型根据 Issue 内容生成。
描述
What feature would you like to see?
Let the interactive TUI (kimi) answer pending approvals and questions through KAP, the same way Kimi Code Desktop and kimi web / kimi rc already do.
When Desktop or kimi web hosts a session, an external tool can list its pending interactions with GET /api/v1/sessions/{id}/interactions and answer one with POST /api/v1/sessions/{id}/interactions/{interaction_id}. I build Vibe Island, a macOS notch panel for coding agents, and we use this to show approve / reject / answer buttons there next to the native card. Whichever side answers first wins, and the other side gets 40902. It works well.
The TUI has no equivalent:
- It doesn't start a server or register anything under
server/instances/. - Its pending interactions live only in its own process, so the Desktop server returns an empty list for a session the TUI is running.
:takeovermoves the lock, not the pending approval. PermissionRequesthooks are fire-and-forget, so a hook can't answer either.
The only thing an external tool can do today is type keys into the terminal, which has no request identity and can land in the wrong place.
Proposal: while a TUI session is running, expose only the existing interactions routes (GET .../interactions, POST .../interactions/{interaction_id}) on a loopback server, using the same token. Register it in server/instances/ with product: "kimi-code-cli". The native TUI panel stays exactly as it is, and the first answer wins, as on Desktop. Opt-in behind a config key is fine.
External tools could then use one client for Desktop, kimi web and the TUI.
Additional information
- Related: #1326 and #2960 (let hooks decide approvals), #2736 (attach to a live session).
- This request is narrower. It adds no new protocol and no new decision semantics; it reuses the KAP interaction schema.
- The answer is bound to the exact pending request (
interaction_idis the sameapproval_<uuid>asPermissionRequest.id), which is the binding concern raised in #1326. - It doesn't touch prompts, shell or files.
- Tested on macOS with Kimi Code Desktop 1.5.0 (core 2.8.0) and Kimi Code CLI 2.7.3.
- 主要语言
- TypeScript
- 星标
- 8.3k
- 派生
- 1.4k
- 平均合并
- 12 小时 6 分钟
- 30 天内合并 PR
- 596
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MoonshotAI/kimi-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
MoonshotAI/kimi-code#5539 ·
维护者通常 1 天内回复
-
[Bug] Kimi RC workspace folder picker does not display symbolic link directories可能已有人在做 @markankamaransheogarat-sys 于 2 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 62/100
MoonshotAI/kimi-code#5296 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
MoonshotAI/kimi-code#5256 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
MoonshotAI/kimi-code#5062 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
MoonshotAI/kimi-code#5057 ·
维护者通常 1 天内回复
查看 MoonshotAI/kimi-code 的全部 Issue
相似的 Issue
-
Add Alice&Bot未关闭
难度 1/5 1 小时以内 新手友好度 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
bot:ai-assisted component:faucet github_actions security status:untriaged
难度 2/5 1-3 小时 新手友好度 86/100
midnightntwrk/midnight-faucet-api#215 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 82/100
NanmiCoder/cc-haha#2034 · 1 条评论 ·
维护者通常 1 天内回复
-
mobile prio:low
难度 2/5 1-3 小时 新手友好度 70/100
digitalfabrik/entitlementcard#3324 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复