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

    Interface StoryState

    interface StoryState {
        currentSpeaker?: string;
        humanPrompt: string;
        latestRoomMessage: Message;
        storyId: string;
        totalCost: number;
        totalInputTokens: number;
        totalOutputTokens: number;
        userAgentName: string;
    }
    Index
    currentSpeaker?: string

    Agent name of whoever is next to act, or null if no specific speaker is designated

    humanPrompt: string

    UI display string for the player prompt, e.g. "What does Elena do next?". Do not use this to detect whether it is the player's turn — use currentSpeaker === userAgentName instead.

    latestRoomMessage: Message

    The most recent message added to the room

    storyId: string
    totalCost: number
    totalInputTokens: number
    totalOutputTokens: number
    userAgentName: string

    Agent name of the human player's character — compare to currentSpeaker to detect player turns