Skip to content

card.answer

Ends the wait of a thread’s omfp_card call with a submitted value or a cancel; already_resolved when the call does not wait (PRT-224).

/** `card.answer` params (PRT-224): the answer to the thread's waiting `omfp_card` call `tool_call_id` (AGT-346). */
export type CardAnswerParams = {
answer: CardAnswer;
threadId: string;
toolCallId: string;
};
/** No params, or the `{}` result. */
export type Empty = Record<string, never>;
/** What the user answered a waiting card (PRT-224). */
export type CardAnswer =
/** The card's value, any JSON: the tool answers `{"status":"submitted","value":…}`. */
| {
kind: "submit";
value: unknown;
}
/** The user declined: the tool answers `{"status":"cancelled"}`. */
| {
kind: "cancel";
};