Saxonberg Server API
    Preparing search index...

    Interface CommandView

    Command View - YAML command definition (the "View" in MVC).

    args and subcommands are mutually exclusive at the top level; having both is a load-time error. Either may be absent (a verb with no positionals and no subcommands is a zero-arg command like ping or inventory).

    validators is the verb-level validator list — fires before field validators with context.commandGiver populated. Used for command-shape preconditions (animacy, future mobility / vocal checks).

    interface CommandView {
        args?: PositionalDefinition[];
        async?: boolean;
        controller?: string;
        description: string;
        examples?: ExampleDefinition[];
        fallthrough?: boolean;
        help?: string;
        options?: Record<string, OptionDefinition>;
        payload?: Record<string, OptionDefinition>;
        subcommands?: Record<string, SubcommandDefinition>;
        validators?: string[];
        verbs: string[];
    }
    Index

    Properties

    async?: boolean

    Default async-dispatch mode for this verb (default false). When true, the controller body detaches from the giver's own input chain at accept-time — see AssembleSuccess.reservedAsync for the per-invocation --async / --sync override and command-routing.md for the detach seam.

    controller?: string

    Verb-level controller template name. Optional only when every subcommand declares its own controller: (Option E — the verb has no meaningful bare-verb behavior).

    description: string
    examples?: ExampleDefinition[]

    Worked invocations shown under an Examples heading.

    fallthrough?: boolean

    Opt-in flag permitting top-level args: AND subcommands: to coexist. The matcher tries subcommands first; on an unknown first token, it falls through to Phase 3a — binding the token + remaining tokens against the top-level args:. Required together with both fields; the YAML validator refuses any other combination.

    Used by chat <channel> <message> so the reserved-subcommand check (mute/who/make/...) takes precedence while bare posts (chat gossip hi) still bind through the top-level args.

    help?: string

    Multi-line authored help prose for the verb — rendered below the synthesized syntax block by CommandDefinition.getHelpText().

    options?: Record<string, OptionDefinition>
    payload?: Record<string, OptionDefinition>

    Structured-form-only fields. Populated exclusively through CommandApi.assembleFromStructured (the msh text-input path doesn't see these). Use for content the client composes via a GUI / editor buffer / non-textual UI — code bodies, JSON blobs, anything that doesn't ride well through tokenization.

    Field shape mirrors OptionDefinition (type / schema / validators / scope / multiple / default / field). The short / prepositions / greedy ergonomics don't apply here — payload fields aren't keyboardable.

    subcommands?: Record<string, SubcommandDefinition>
    validators?: string[]
    verbs: string[]