Cotal TypeScript packages
    Preparing search index...

    Function journalStepRow

    • Build the one step-row view used by both hosted status reads and the local journal command.

      Parameters

      Returns {
          addressee?: string;
          amendments?: readonly {
              answerId: string;
              artifact?: string;
              at: number;
              by: string;
              supersedes: string;
              value?: unknown;
          }[];
          answer?: {
              answerId: string;
              artifact?: string;
              at?: number;
              by?: string;
              value?: unknown;
          };
          asks?: string;
          deadlineAt?: number;
          effect: string;
          endedAt?: number;
          errorCode?: string;
          errorMessage?: string;
          kind: "step";
          lostRace?: string;
          n: number;
          name: string;
          onExpiry?: string;
          outcome: string;
          schema?: unknown;
          startedAt: number;
          state: "pending"
          | "settled";
          status?: string;
          step: string;
          winner?: string;
      }

      • Optional Readonlyaddressee?: string
      • Optional Readonlyamendments?: readonly {
            answerId: string;
            artifact?: string;
            at: number;
            by: string;
            supersedes: string;
            value?: unknown;
        }[]

        Answers filed after the pause settled, in the order the store committed them, each naming the accepted answer it supersedes. The program acted on the accepted answer; these record later positions, and the last is the current one.

      • Optional Readonlyanswer?: {
            answerId: string;
            artifact?: string;
            at?: number;
            by?: string;
            value?: unknown;
        }

        The accepted answer of a settled pause: named by a checkpoint's settled result, and for an ask, whose result is the value alone, read from the answer record its last attempt's settle named. A pause cancelled after it accepted an answer carries that answer too, read the same way. Absent for open and expired pauses and ordinary steps.

      • Optional Readonlyasks?: string

        What an open pause asks, present only while it is open.

      • Optional ReadonlydeadlineAt?: number

        When an open pause expires, as its entry records it.

      • Readonlyeffect: string

        The entry's effect kind (checkpoint, fanOut, ...) and name, as the journal records them.

      • Optional ReadonlyendedAt?: number
      • Optional ReadonlyerrorCode?: string
      • Optional ReadonlyerrorMessage?: string

        The recorded error's message, on a settled failed or refused step.

      • Readonlykind: "step"
      • Optional ReadonlylostRace?: string

        On a step in a branch that lost a race, that race's step key. The program never read what the step settled with, so an answer it holds was not acted on.

      • Readonlyn: number
      • Readonlyname: string
      • Optional ReadonlyonExpiry?: string

        What an open checkpoint does on expiry (fail, proceed, escalate), as it was armed. Absent where the entry records none, as on a checkpoint opened before it was recorded.

      • Readonlyoutcome: string

        pending, or the checkpoint disposition the settled result names (resolved / expired); otherwise the settled status with its error code when there is one.

      • Optional Readonlyschema?: unknown

        The schema recorded for an open checkpoint, passed through without interpretation.

      • ReadonlystartedAt: number

        When the step began and, once settled, ended (epoch ms).

      • Readonlystate: "pending" | "settled"
      • Optional Readonlystatus?: string

        The settled status and error code as recorded; outcome is their presentation.

      • Readonlystep: string
      • Optional Readonlywinner?: string

        On a settled race that took a branch's value, that branch.