* feat(agent): let triggered runs ask a person
A trigger-started reply gets a built-in ask_person tool when the trigger's
may_ask_person is on (default). The call is held like an ask-first call:
the run pauses, counts as going for the overlap rule, and resumes with the
answer of someone who may approve tool calls, or is told nobody will
answer when the question is dismissed. Unattended replies are told that
nobody reads them and whether they may ask; follow-ups keep the
outside-data instruction. Later replies replay each decided question and
its answer as plain turns in their history.
* feat(agent): answer an agent's question in the conversation
A held ask_person call shows as its own card with an answer field, Send
answer and Dismiss, kept out of the approval card's batch actions. Only
people without the approve permission see it read-only. The trigger card
gets a switch to let the agent ask a person, and approval wording now
covers questions too.
* test(agent): cover asking a person end to end and record it in ADR 014
* refactor(agent): build the question tool like web fetch and tell it from actions
The question tool is a plain Pydantic AI tool in agent/tools.py that the
reply runner wraps in a FunctionToolset, like web fetch. A held call is a
question only when it has no tool key, so an action saved as ask_person
before the name was reserved keeps its normal approval. History prefetches
only the decided questions, and the pending approvals menu links to the
conversation only for a pending question.
* test(agent): cover Ask first in a triggered run end to end
With changes set to not ask first, a triggered run creates a database without waiting; turned back on, the same run waits for approval and finishes once approved.
* test(agent): open the Triggers section in the ask-a-person spec
The section was renamed on develop.
* fix(agent): keep web search off next to the question tool on older Gemini
Gemini before 3 refuses web search next to function tools. The question
tool now counts as one, so a triggered run that may ask a person no longer
sends both, gets a 400 and records a failed search on every run.
* fix(agent): keep the ask-a-person switch of a license-locked trigger read-only
The API refuses the change like the trigger's other locked settings, and
the card makes the section inert and the switch read-only, like the
overlap rule.
* fix(agent): reserve the web_fetch action name
An action named web_fetch on an agent with web fetch on gave two tools
with the same name, so every reply failed when its toolsets were built.
* refactor(agent): drop the special case for an action named ask_person
Agents are behind a flag with no production users, so the name is simply
reserved like the other built-in tools: a held ask_person call is always
a question, on the backend and in the conversation.
* fix(agent): answer a waiting question after asking is turned off
ask_person now defers its call, and the resumed run gets the answer, or
the dismissal note, as the call's result. Turning the trigger's switch off
only stops new questions, instead of telling the agent that an answered
question is no longer allowed while the card shows it as answered.
* fix(agent): decide calls held with a question from the pending approvals menu
The question shows as its link row to the conversation, and the other
held calls stay in a card below it, so they can still be approved or
rejected from the menu.