Add two observer hooks, on_session_prompt and on_session_prompt_settled,
fired by the gateway session owner for each prompt a person answers for a
session's viewers, with the id that answers it:
- approval / clarify: when SessionAuthority.register_approval /
register_clarify has published the approval.request / clarify.request
event (prompt_id = the event's prompt_id); settled whenever the prompt
leaves PendingControls.pending (snapshot, a remote_responders answer, a
managed worker's prompt_settled frame), reason "settled".
- request frames: when session_server_requests._ask has opened and written a
sudo, secret, clarify (batch), vault.unlock_prompt, vault.code or
vault.save_login frame (prompt_id = the srq- id); settled after its
request.cancel with that event's reason. Window requests, replay=False
requests and an _ask that returns early never fire.
params is a deep copy of what the viewers received with every string
force-redacted through redact_approval_display(force=True); it never holds
an answer. Calls are queued to one FIFO worker thread, so plugin code never
runs under event_stream.lock or the request registry lock, on the agent
thread or on the event loop, and each runs in the owning profile's
owner_scope (for a request frame: the served authority whose live session
owns the stream, else the asker's context). Plugin exceptions are logged
at debug and swallowed. Event payloads, publish order, open_requests
replay, return values and on_human_input_* are unchanged.
Both names join VALID_HOOKS and are documented in the observer-hooks,
hooks, plugins and plugin developer guide pages.