Creating Plot Twists
    Preparing search index...

    Class OptionsAbstract

    Built-in marker class for twist configuration options.

    Declare options in your twist's build() method to expose configurable settings to users. The schema is introspected at deploy time and stored alongside permissions. At runtime, user values are merged with defaults.

    import { Options, type OptionsSchema } from "@plotday/twister/options";

    export default class MyTwist extends Twist<MyTwist> {
    build(build: ToolBuilder) {
    return {
    options: build(Options, {
    model: {
    type: 'select',
    label: 'AI Model',
    choices: [
    { value: 'fast', label: 'Fast' },
    { value: 'smart', label: 'Smart' },
    ],
    default: 'fast',
    },
    }),
    // ... other tools
    };
    }

    async respond(note: Note) {
    const model = this.tools.options.model; // typed as string
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    Properties

    toolId: "Options"