vigiles API reference
    Preparing search index...

    Function record

    • Declare that a named fact just became true: record("calendar.synced").

      The hook performs no write — it returns this, attached to whatever it was already returning, and the trusted runtime stores it. An optional value lets a hook remember WHAT as well as WHEN (record("merge.nagged", branch)), which is how a nudge avoids repeating itself about the same thing.

      Throws on an invalid key rather than returning a value that fails somewhere later: a compiled hook's decision is a pure function that its own test calls in-process, so this surfaces at the cheapest possible tier.

      Parameters

      • name: string
      • value: string = ""

      Returns StateWrite