Functions

isCheckInPause

Function: isCheckInPause()

isCheckInPause(result): result is RunnerPauseOutcome & { checkIn: CheckInRequest }

Defined in: src/core/pause.ts:97

Type guard — is this a check-in pause (evidence-carrying human consent), as opposed to a plain askHuman pause? Narrows checkIn to present.

Parameters

result

unknown

Returns

result is RunnerPauseOutcome & { checkIn: CheckInRequest }

Example

const out = await agent.run({ message });
  if (isCheckInPause(out)) {
    showToHuman(out.checkIn.evidence);       // the receipts
    const decision = checkInApproved({ by: 'alice' });
    await agent.resume(out.checkpoint, decision);
  }

On this page