Briyah SDK - v2.0.18
    Preparing search index...

    Interface Artifact

    Represents an artifact created in a room

    interface Artifact {
        body: string;
        createdAt?: string;
        creator: string;
        name: string;
        transient?: boolean;
        updatedAt?: string;
        viewers?: string[];
    }
    Index
    body: string
    createdAt?: string

    When the artifact was first published, as an ISO string. Absent on artifacts saved before timestamps existed — nothing invents one for them, since a made-up creation date is worse than an honest blank.

    creator: string
    name: string
    transient?: boolean

    Deliver this artifact in the transient prompt rather than the cached one.

    An ordinary artifact renders into {{visibleArtifacts}}, which sits in the cached system block ahead of any attached documents — so every write throws away the cached prefix of every viewer, including their rule documents. A transient artifact is left out of that block and injected into the uncached per-turn prompt instead (see Room.buildTransientPrompt), which is also not written to history.

    The trade is exact: a transient artifact is re-sent in full on every one of its viewers' turns and never cached, so it suits state that is small and changes often — a character sheet whose hit points move every round. An artifact that is large and stable is cheaper left cached.

    updatedAt?: string

    When the artifact was last written, as an ISO string.

    viewers?: string[]