NeedsClarification
Defined in: packages/protocol/src/lib/needs-clarification.ts:29
A Planner result that asks the user a question. It may also carry the
changes the Planner could already make alongside the question: for “Show
Apple and Alphabet stock” it can lay out Apple and ask which Alphabet share
class the user means. Without layout and executionPlan it leaves the
screen unchanged.
M is the request’s layout mode and picks the layout shape, as
GridResponse and TilingResponse do for a plan result. The default
accepts either shape.
Only valid when the chart request set skipReply: true. A caller that
leaves skipReply unset expects a reply-bearing response, so the Engine
rejects this result on that path. Engine validation accepts it when the
flag is set, but Engine.handle currently refuses it even then with
Err(ValidationError) on field skipReply.
Type Parameters
Section titled “Type Parameters”M extends LayoutMode = LayoutMode
Properties
Section titled “Properties”executionPlan?
Section titled “executionPlan?”
readonlyoptionalexecutionPlan?: readonlyobject[]
Defined in: packages/protocol/src/lib/needs-clarification.ts:45
Actions the Planner could already plan, in order, with the same shape and limit as a plan result’s execution plan. Absent means no Actions.
layout?
Section titled “layout?”
readonlyoptionallayout?:ClarificationLayoutFor<M>
Defined in: packages/protocol/src/lib/needs-clarification.ts:40
Layout the Planner could already settle, in the request’s mode. Absent means the current layout stays as it is.
options?
Section titled “options?”
readonlyoptionaloptions?: readonlystring[]
Defined in: packages/protocol/src/lib/needs-clarification.ts:35
Suggested answers the caller may offer the user. Each one is non-blank.
question
Section titled “question”
readonlyquestion:string
Defined in: packages/protocol/src/lib/needs-clarification.ts:33
The question the Planner needs answered before it can proceed. Never blank.
readonlytype:"needs_clarification"
Defined in: packages/protocol/src/lib/needs-clarification.ts:31
Discriminant that tells this result apart from a plan result.