Skip to main content

Module consent

Module consent 

Source
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 credentialsconsent_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:credentialshint 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§

ConsentRequest
A consent question travelling from the component actor task to the MCP request handler task, with the channel to answer it on.
CurrentConsentSink
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§

ConsentSink
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.