Cotal TypeScript packages
    Preparing search index...

    Interface PrimitiveSpec

    Which of a call's inputs decide whether a recorded result is still valid (design doc 5.12).

    interface PrimitiveSpec {
        doc: string;
        example: string;
        functionOptions?: readonly string[];
        hashedOptions: readonly string[];
        hashedValues?: Readonly<Record<string, readonly unknown[]>>;
        hashesSubject: boolean;
        kind:
            | "conclave"
            | "waitUntil"
            | "spawn"
            | "participant"
            | "turn"
            | "ask"
            | "checkpoint"
            | "sleep"
            | "wait"
            | "notify"
            | "monitor"
            | null;
        nameRequired: boolean;
        options: readonly string[];
        optionsAt: number;
        probeAt?: number;
        scope: ScopeKind
        | null;
        signature: string;
    }

    Hierarchy (View Summary)

    Index
    doc: string
    example: string
    functionOptions?: readonly string[]

    Option keys whose value is a program FUNCTION rather than data, for the same reason PrimitiveSpec.probeAt exists: the options bag is held to the crossing rule as a whole, and a predicate sitting in it is code the interpreter calls, not a value that crosses to a handler or a journal. Named here so the exemption is a property of the primitive rather than a key spelled at the check.

    hashedOptions: readonly string[]

    Option keys folded into the input hash. Everything else only steered live execution.

    NORMATIVE AND EXECUTED. This was documentation for a while, and drifted: the interpreter grew a projection per primitive and this table stayed at whatever it said on the day it was written, so "align interpret to the table" was a change that would have reintroduced the very holes the projections closed. options.smoke now edits each key on a resumed run and requires exactly the keys listed here to raise L5001, which is what makes the table a claim rather than a note.

    hashedValues?: Readonly<Record<string, readonly unknown[]>>

    Keys whose VALUE decides whether they are hashed: listed here with the values that put them into the projection, absent from hashedOptions because they are not always in it.

    There is exactly one of these and it is the subtlest rule in the table. onExpiry chooses how to READ a recorded expiry at fail and proceed, which is a reapply and must replay clean; at escalate it MINTS A SECOND EFFECT, which is a different question being asked and must diverge. Flattening that either way breaks something real: hash it always and editing fail to proceed stops working, hash it never and switching an answered checkpoint to escalate silently keeps the old answer.

    hashesSubject: boolean

    True when the positional subject is part of the input hash.

    kind:
        | "conclave"
        | "waitUntil"
        | "spawn"
        | "participant"
        | "turn"
        | "ask"
        | "checkpoint"
        | "sleep"
        | "wait"
        | "notify"
        | "monitor"
        | null

    The effect kind journalled, or null for a pure primitive that writes no entry.

    nameRequired: boolean

    A step name is required, not merely allowed.

    options: readonly string[]

    Every accepted option key. Bags are closed: anything else is L3011.

    optionsAt: number

    The argument index the option bag occupies. Fixed per primitive, never "the last record": notify(agents, fact, opts) and checkpoint(name, prompt, opts) both take a record in an earlier position, and treating that as options would reject perfectly good data.

    probeAt?: number

    This primitive takes a PROBE: a program function the runtime calls, repeatedly, to observe something outside the run.

    It is in the table rather than spelled as a name at each site for the reason scope is: the emitter has to hand that argument over unevaluated, the validator has to know the position is a function rather than data, and a second primitive that takes one must not be able to arrive with any of those silently wrong. The value is the argument INDEX, so nothing downstream has to re-derive which position it is.

    scope: ScopeKind | null

    The concurrency scope this primitive opens and journals, or null when it pushes no scope frame. A kind rather than a flag, so a scope row the engines and the journal cannot classify does not compile.

    signature: string