kap-server: expose parent turn/prompt correlation on public WS and history records for steered inputs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, typescript
Research direction
Start in packages/kap-server/src/routes/prompts.ts, where the internal prompt.steered signal already carries activePromptId and promptIds, and trace from there to where public WebSocket turn events are emitted and where session history records are persisted. The open work is a schema decision plus threading the parent turn/prompt id through both the live event path and the stored record path so it survives a kimi web restart, which also relates to the queue work in #4959. Done looks like a steered input appearing on the public stream and in reloaded history with an explicit parent reference, covered by the held-tool live and replay tests the reporter offers.
Written by the indexing model from the issue text.
Description
What feature would you like to see?
When a client steers an active turn via POST /api/v1/sessions/{session_id}/steer or promotes a queued prompt via POST /api/v1/sessions/{session_id}/prompts::steer, expose the relationship to the active parent turn/prompt on public KAP WebSocket events and persisted session history records (preserved across server restarts).
Additional information
We tested @moonshot-ai/[email protected] (1781dbd7) on Linux x64, Windows x64, and macOS arm64 against a local model provider while holding a shell tool open:
- Both
POST /api/v1/sessions/{session_id}/steerandPOST /api/v1/sessions/{session_id}/prompts::steerinject the steered input into the very next provider request and execute its action once. - On the public KAP WebSocket stream and in persisted session history (
packages/kap-server/src/routes/prompts.ts), however, the active turn closes and the steered input is emitted and stored as a separate completed turn (turn 0original,turn 1steered,turn 2next ordinary prompt) with no field linking the steered turn back to the parent turn it steered. The same unlinked records appear when reloading after restartingkimi web. packages/kap-server/src/routes/prompts.tsalready consumes an internalprompt.steeredsignal carryingactivePromptIdandpromptIds. Exposing that parent turn/prompt reference on public WS events and persisted history records would allow KAP clients (such as OAR) to project mid-turn steering accurately both live and on replay without heuristics, and could fit alongside ongoing queue work such as#4959.
Per CONTRIBUTING.md, we are not opening an unsolicited feature PR. We would be glad to submit a focused PR with held-tool live and replay tests if maintainers accept this direction and invite a contribution.
Agent Cindy for @xxchan via Stamp (grant cgr_0a427a0749428a5c521774a30edf08b7)
- Dominant language
- TypeScript
- Stars
- 8.3k
- Forks
- 1.4k
- Avg merge
- 12h 6m
- Merged PRs (30d)
- 596
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MoonshotAI/kimi-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MoonshotAI/kimi-code#5539 ·
Maintainers usually reply within 1 day
-
[Bug] Kimi RC workspace folder picker does not display symbolic link directoriesPossibly taken @markankamaransheogarat-sys claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MoonshotAI/kimi-code#5296 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MoonshotAI/kimi-code#5256 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MoonshotAI/kimi-code#5062 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
MoonshotAI/kimi-code#5057 ·
Maintainers usually reply within 1 day
All issues in MoonshotAI/kimi-code
Similar issues
-
Add Alice&BotOpen
Difficulty 1/5 Under an hour Newbie friendliness 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
bot:ai-assisted component:faucet github_actions security status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
midnightntwrk/midnight-faucet-api#215 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NanmiCoder/cc-haha#2034 · 1 comment ·
Maintainers usually reply within 1 day
-
mobile prio:low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
digitalfabrik/entitlementcard#3324 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day