Skip to content

Type Alias: IdempotentAnswer

@kortexya/reasoninglayer


@kortexya/reasoninglayer / IdempotentAnswer

IdempotentAnswer<T> = T & object

Defined in: src/types/common.ts:275

The answer of a route that holds its request under an Idempotency-Key and states the replay only in the Idempotency-Replayed response header, because its body schema has no replay flag (the attribute-exploration transitions: confirm, refute, advance). The SDK adds replayed from that header.

replayed: boolean

Whether this answer replays an earlier identical request (Idempotency-Replayed: true).

T

replayed is true when the engine answered a repeat of a committed request from its receipt (nothing applied again), false on a first answer. Every other keyed route carries replayed in its body, and its own answer type declares it (engine #981, one replay contract).

const next = await client.analysis.confirmImplication(sessionId, { questionId, idempotencyKey });
if (next.replayed) console.log('already confirmed under this key');