Skip to content

feat: questions from bots to the owner - #133

Merged
httpsphl merged 4 commits into
mainfrom
feat/owner-questions
Oct 3, 2026
Merged

httpsphl merged 4 commits into
mainfrom
feat/owner-questions

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Questions to the owner (spec section 23, roadmap item 18.2).

A bot that needs the owner's decision calls the new ask_owner MCP tool and does not wait: the question goes to a card in its chat and to a question box on the left, and the owner's answer reaches the bot later as the owner's message, quoting the question. Unlike an approval it has no deadline, so a routine can ask at night and get the answer in the morning.

Daemon (P1)

  • Question / QuestionId (qst_), chat item question, activity kind question.
  • Migration 0015: questions table and messages.question_id; deleting a bot takes its questions.
  • ask_owner {question, options?}: up to 2,000 characters, 2-5 ready answers, at most 5 open questions per bot; mistakes come back to the bot as tool errors.
  • questions.list, questions.answer (answer saved, question closed and message queued in one transaction), questions.dismiss (closes without telling the bot), question.changed.
  • The courier writes the answer as Answer to your question qst_...: "<question>" followed by the answer, without the [botloft] envelope.
  • The bot rules say when to ask.

App (P2)

  • A question card in the chat, with ready answers as buttons, a free answer field, Answer and Dismiss; it shrinks to one line once closed. The ask_owner tool line is hidden behind the card.
  • Questions entry at the top of the sidebar, with a count, opening the box of open questions from every bot.
  • Open questions count as something waiting for the owner (taskbar mark, hidden-sidebar dot).
  • Texts in en, pt-BR and es; two sample questions in the pnpm dev preview.

Checks

  • cargo fmt, clippy -D warnings, cargo test --workspace and pnpm check (301 tests) pass.
  • New tests: store (questions/tests.rs, deletion), daemon (tests/questions.rs with FakeRuntime), app (features/questions/questions.test.tsx).

Real Claude Code (done)

A Haiku bot on a scratch dev daemon was told to ask "sea or mountains" with ask_owner and end its turn. It loaded the tool through ToolSearch, asked with two options, and ended the turn without guessing. After questions.answer it wrote the mountain poem. The daemon log had none of the message text.

Still to check by hand

  • In the real app (pnpm tauri dev): have a bot ask, answer from the Questions box, and see the bot carry on; check the taskbar mark comes and goes.

Adds the Question type and QuestionId (qst_), the question chat item and
activity kind, migration 0015 with the questions table and
messages.question_id, and deleting a bot's questions with it. Spec
section 23 describes the feature.
A bot asks with ask_owner and carries on; the question waits in its chat
and in questions.list. questions.answer sends the answer to the bot as the
owner's message, quoting the question; questions.dismiss closes it without
telling the bot. The bot rules say when to ask.
A bot's question shows as a card in its chat, with its ready answers as
buttons and a field for any other answer; answered or dismissed, it
shrinks to one line, and the ask_owner tool line is hidden. Questions on
the left opens the box of open questions from every bot, with a count;
open questions also mark the taskbar. Texts in the three languages, and
two questions in the dev preview.
@httpsphl
httpsphl enabled auto-merge October 3, 2026 16:19
@httpsphl
httpsphl merged commit 651ffd9 into main Oct 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant