waygraph / WaygraphInstanceOption
Interface: WaygraphInstanceOption<T>
Defined in: src/engine/block/action-page.ts:43
One selectable option for a Block whose real choices depend on the live page - "which of these items to add to cart" is only knowable by looking at the DOM, not from static analysis. waygraph auto calls Block.instanceOptions while building its menu and lists one row per option (via label) instead of a single generic "block -> checkpoint" row; picking a row does mem.set(key, value) before that Block's own act() runs, so act() just reads mem exactly like any other required key - it never needs to know whether it was driven by a human-authored Flow or a dynamic auto-explore menu.
Example
{ id: "sauce-labs-backpack", label: 'Add "Sauce Labs Backpack" to cart', key: SelectedItem.key, value: { id: "sauce-labs-backpack", name: "Sauce Labs Backpack" } }Type Parameters
T
T = unknown
Properties
highlight?
optionalhighlight?:string
Defined in: src/engine/block/action-page.ts:57
Optional CSS selector for the element this option will act on. waygraph auto (headful) rings that element while the menu row is hovered so you can see what a pick would click before committing.
id
id:
string
Defined in: src/engine/block/action-page.ts:45
Stable id for this option - used to dedupe menu rows across rebuilds.
key
key:
MemKey<T>
Defined in: src/engine/block/action-page.ts:49
Must be one of this Block's own requires keys.
label
label:
string
Defined in: src/engine/block/action-page.ts:47
Shown in the menu instead of a generic "block -> checkpoint" line.
value
value:
T
Defined in: src/engine/block/action-page.ts:51
mem.set(key, value) right before this Block's act() runs.