mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4245] [GUI] Add opt-in answerer for the agent's ask_user_question events #4970
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4970
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4245
Author: @devplex69
Created: 10/26/2026
Status: 🔄 Open
Base:
main← Head:ask-user-answerer📝 Commits (1)
134ccdd[GUI] give the agent's own questions an answerer surface (opt-in)📊 Changes
8 files changed (+222 additions, -10 deletions)
View changed files
📝
apps/host/server/agent/agent-bridge.mjs(+49 -3)📝
apps/host/server/agent/gateway-client.mjs(+7 -3)📝
apps/host/server/agent/preset.mjs(+6 -1)📝
apps/host/server/agent/profile.mjs(+2 -2)📝
apps/host/server/agent/tools-settings.mjs(+5 -0)➕
apps/host/server/agent/user-questions.mjs(+50 -0)📝
apps/host/server/index.mjs(+16 -1)➕
apps/host/tests/user-questions.test.mjs(+87 -0)📄 Description
Draft PR. Scope issue: #4244.
Problem
The host bridge auto-dismisses the Harness's
user-questions/requestevent withoutcome:'next', so the agent can never actually ask the user a question mid-run — a capability Qoder / OpenAI Codex desktop / Claude desktop all have. See #4244 for the full scope discussion.Approach
An opt-in answerer that reuses the existing approval round-trip. The default path is byte-identical: the
askUserQuestionstoggle defaults tofalse, and when off, questions are still auto-dismissed exactly as before.apps/host/server/agent/user-questions.mjs(new): adapter isolating the two unconfirmed Harness wire-shapes (parseQuestions,answerWire).apps/host/server/agent/gateway-client.mjs:answerEventnow carries an optional structuredvalue(backward-compatible —outcome:'next'still sends{kind:'next'}).apps/host/server/agent/agent-bridge.mjs:askUserflag,pendingQuestionsmap,questionsFor(chatId),answerQuestion(...).apps/host/server/agent/preset.mjs,profile.mjs,tools-settings.mjs:askUserQuestionstoggle; thetool-ask-userplugin is added only when it is on.apps/host/server/index.mjs:GET /api/agent/pendingreturnsquestionsonly when non-empty; newPOST /api/chat/answer.apps/host/tests/user-questions.test.mjs(new): 5 harness-free pure tests.Validation
Passed
npm testinapps/host— 5 new pure tests plus the existing preset drift test, all green.Failed
Not run
STRATA_HARNESS_DIRhere). This is the reason the PR is kept as a draft.Limits
Two parts of the Harness wire contract are unconfirmed static analysis (the pinned Harness is not in this repo):
$events/resultanswer payload shape (I send{ answers: [{ question, answer }] });@deepseek-ai/dsh-tool-ask-user).Both are isolated in
user-questions.mjsso each is a one-line fix once a maintainer confirms the real shape. No React question-card UI is included yet — the endpoint and round-trip are in place; the front-end surface is a follow-up.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.