feat(kap-server): add steer flag to submit a prompt directly into the running turn - #3705
Conversation
|
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e71090de79
ℹ️ 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".
| goal_control: z.enum(['pause', 'resume', 'cancel']).optional(), | ||
| disabled_tools: z.array(z.string()).optional(), | ||
| prompt_id: z.string().min(1).optional(), | ||
| steer: z.boolean().optional(), |
There was a problem hiding this comment.
Add a changeset for the new REST capability
This introduces and documents a user-visible REST API capability, but the commit contains no .changeset/ entry. Without one, the release changelog will omit the new steer option; add a user-facing changeset for the shipped CLI package as required by the repository workflow.
AGENTS.md reference: AGENTS.md:L86-L88
Useful? React with 👍 / 👎.
|
No changeset for this one: the steer flag is an additive, opt-in parameter on the server-side protocol surface — it changes no existing behavior and is not perceivable by CLI end users, consistent with previous server-protocol additions in this repo. |
Related Issue
Internal feature request (no linked issue).
Problem
API clients that want to steer a fresh message into the active turn must use a two-step flow: submit a prompt (which lands in the queue on a busy session), then call
POST /api/v1/sessions/{session_id}/prompts:steerwith the returned prompt id. The engine (IAgentPromptService.submitSteer) and the internal node-sdk RPC lane (session.steer) already support one-shot steering, but the public REST surface does not.What changed
POST /api/v1/sessions/{session_id}/promptsaccepts a new optionalsteerboolean. Withsteer: true, a prompt submitted while the session is busy is steered directly into the running turn — the one-call form of submitting and then steering; on an idle session the prompt starts a new turn as usual. The submit response keeps its shape and reports the prompt's real state (running/queued).submitSteerhandles it: the prompt simply stays queued instead of failing the request.steercombined withskillsis rejected with40001, matching the existingprompt_id+skillsrule.docs/en/reference/server-api.mdanddocs/zh/reference/server-api.md.Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.