Expand description
Consent: the question a capability gate asks a human, and the channel it travels on.
§Two layers of prompt text
The builders here (prompt_line, and credentials’ consent_summary)
are the inner layer: they assemble one readable sentence, attribute the
component’s own words to it, and keep guest text from forging a second
question. consent_line is the outer layer, applied by every prompter
just before display, and it escapes the finished line rather than keeping
it readable. Both are needed: the inner one is what a human can actually
read, the outer one is what makes the whole line unforgeable.
[sanitize_hint] and [HINT_LIMIT] live here rather than in one gate,
because act:credentials’ hint and act:consent’s summary are the
same problem — free text the guest wrote, shown to a human about to answer
yes or no — and two copies of that helper are two helpers that drift.
Structs§
- Consent
Request - A consent question travelling from the component actor task to the MCP request handler task, with the channel to answer it on.
- Current
Consent Sink - Slot holding the sink of the call the actor is currently executing.
Functions§
- consent_
line - Render one consent question as the single line a human answers.
- prompt_
line - Build the one line a human is asked to approve for a semantic class.
Type Aliases§
- Consent
Sink - Handler-side sender, carried on
ComponentRequest::CallTool. Each in-flight call gets its own, so an ask always reaches the handler whose request caused it — no correlation id needed.