Saxonberg Server API
    Preparing search index...

    PromptApi — owns the per-Interactive prompt stack server-side (state lives in the PromptLogic singleton).

    Five Tier 1 methods (choice/confirm/text/mqlObject/mqlMany), inbound entry points (handleResponse/handleCancel), and server-side cancellation (cancel/cancelAll). Outbound envelopes ride MessageApi.sendEnvelope. Tests reset via _clearAllForTesting.

    Index

    Constructors

    Methods

    • Server-side single-prompt cancel. Returns true if a record was found and cancelled; false for unknown ids.

      Parameters

      • promptId: string
      • reason: "cancelled" | "host-disconnected" = 'cancelled'

      Returns boolean

    • Server-side wholesale cancel — every prompt held by interactive. Returns the count cancelled. Called from the prompt cancel verb controller and Application.handleUserDisconnect.

      Parameters

      • interactive: default
      • reason: "cancelled" | "host-disconnected"

      Returns number

    • Multiline body-composition prompt — the interactive route to a post body. The client renders a <textarea> (markdown; optional live MML preview). A shared capability (forums first; CMS/wiki later); the response is the raw markdown string.

      Parameters

      Returns Promise<string>

    • Route a prompt-cancel wire message. Reject the await with PromptCancelledError { reason: 'cancelled' } and emit a prompt-dismissed envelope.

      Parameters

      • interactive: default
      • payload: { promptId: string }

      Returns void

    • Route a prompt-response wire message. Looks up the resolver, decodes the response per the prompt kind, runs the validator (if any), and either resolves the await or emits prompt-validation-failed and keeps the prompt alive.

      Parameters

      • interactive: default
      • payload: { promptId: string; response: string }

      Returns void

    • Render the giver's prompt.format template into a PromptRefreshNote for inclusion in a DispatchResponseEnvelope. Reads the template via giver.getSetting('prompt.format') when the giver composes EnvironmentMixin; otherwise the bare default ('{{ focus }}>'). Render failures fall through to the default.

      Parameters

      Returns PromptRefreshNote