Skip to main content

Module elicitation

Module elicitation 

Source
Expand description

Elicitation — the one way the engine asks a human something.

Three questions in this engine need a person: may this tool call proceed, what did you mean, and shall I import the configuration I found. Each grew its own mechanism — a channel protocol for the first, a process-level callback trait for the third, and for the second a tool that hands its own question back to the model and calls that an answer. A host wanting to answer all three had to learn all three, and a host that could answer none of them got a different failure from each.

With no implementation registered, every kind of question is declined with a reason, never granted. That is the whole reason this is a trait with a default rather than an Option each caller interprets: the fallback is written once, here, and it fails closed.

§Why the answer is a Value

The three questions have genuinely different answers — a permission decision, a chosen option or free text, an import choice — and a trait object cannot be generic over them. So the payload is serde-shaped and ElicitKind documents which type belongs to it. Every call site parses with the type it expects and treats a parse failure exactly like a decline, which keeps a confused implementation from being read as consent.

Structs§

DeclineAll
Declines everything, with a reason naming the absence.
ElicitOption
One offered answer.
ElicitRequest
One question put to a human.
FixedElicitation
Answers every question the same way, and remembers what it was asked.
PromptOrigin
The RunExt call a sub-call belongs to: what a host answering for the command, not for the model, judges by.

Enums§

ElicitKind
What is being asked, and how the answer will be read.
ElicitOutcome
What came back.
McpElicitMode
What an MCP server’s question wants back.
McpElicitationAnswer
The answer to ElicitKind::McpServer, as it goes back to the server. decline is a person saying no; cancel is nobody choosing.

Traits§

Elicitation
The host’s ability to ask a person something.