Saxonberg Server API
    Preparing search index...

    What a brain receives when a trigger fires. The host is the actor (emission is host.say(...) etc. — the actor is the receiver, never an argument); config is the spec's config; state is a per-(host, spec) runtime scratch bag the framework owns (NOT persisted — patrol index, greet seen-set, etc. live here so brains stay stateless); perceived is present only for witness triggers.

    interface BrainContext {
        config: Record<string, unknown>;
        host: Stuff;
        perceived?: { frame: MessageFrame; subject?: Stuff };
        state: Record<string, unknown>;
        trigger: { raw: string; source: "witness" | "cadence" };
        emote(verb: string, target?: Stuff): Promise<void>;
        emoteFree(text: string, target?: Stuff): void;
        say(text: string, target?: Stuff): void;
    }
    Index

    Properties

    config: Record<string, unknown>
    host: Stuff
    perceived?: { frame: MessageFrame; subject?: Stuff }
    state: Record<string, unknown>
    trigger: { raw: string; source: "witness" | "cadence" }

    Methods