Skip to content

toolmark-monorepo / @toolmark/tour / TourState

Interface: TourState ​

Defined in: packages/tour/src/types.ts:64

Snapshot of a running tour. A new frozen object on every change.

Properties ​

anchor ​

anchor: Element | null

Defined in: packages/tour/src/types.ts:85

The current step's anchor element, or null.


busy ​

busy: boolean

Defined in: packages/tour/src/types.ts:92

do mode: the step's call is in flight (next()/back() are ignored). The overlay marks Next/Back aria-disabled and announces it.


highlight? ​

optional highlight?: Element | null

Defined in: packages/tour/src/types.ts:87

do mode: the changed field being highlighted, else null.


index ​

index: number

Defined in: packages/tour/src/types.ts:81

Index of the current step in steps.


message? ​

optional message?: string

Defined in: packages/tour/src/types.ts:94

waiting: the first issue of the field; stopped: why the tour stopped.


mode ​

mode: TourMode

Defined in: packages/tour/src/types.ts:79

The tour's mode.


status ​

status: "done" | "stopped" | "waiting" | "idle" | "running" | "confirming"

Defined in: packages/tour/src/types.ts:77

  • idle — not started yet.
  • running — on a step (in do mode: its call may be in flight).
  • waiting — guide mode: the user's input has issues (see message).
  • confirming — any inline confirmation is pending, per the registry's confirm events: the step's own do call (a consequential/destructive tool, or ctx.confirm inside its run) or any other tool and caller (e.g. an MCP/WebMCP agent) while the tour runs. The app's confirmation UI must stay usable; the status returns to running/waiting once none is pending.
  • done — every step completed.
  • stopped — stop(), an aborted signal, a failed do call or no valid steps.

steps ​

steps: readonly TourStep[]

Defined in: packages/tour/src/types.ts:83

The (validated) steps.