Dex Web
Dex Web has two URL prefixes. v1 is the existing Flows search, run details, and Flow Rendering workspace. v2 is the operator workspace: a run list and filters on the left, and the Flow Definition Graph on the right.
Start Dex without a JSON directory to open v1 at /v1/flows. Start Dex with --flow-rendering-dir to open v2 at /v2. The top-right Version menu switches back to v1.
dexcli visualize ./refund_flow.go --schema-version 2.0 --json --out ./build/refund
dexcli dev --flow-rendering-dir ./build
v2 searches current runs for one Flow type. The canvas uses that Flow type's generated definition, so you do not pick a JSON file again. Historical runs stay on v1.
Version 1 remains the default analyzer schema and supports Go and Python. Version 2 currently supports Go only. Version 1 and Version 2 definition files can coexist. Dex Web rejects malformed Version 2 files and duplicate valid definitions for the same Flow type at startup. An analyzer result with valid: false remains available on v1 Flow Rendering but does not appear as a v2 Flow type.
Named directives
Version 2 directives use named values. Parameter position within one line has no meaning. Quote strings containing spaces as JSON strings, and write multiple values as a JSON array.
// dex:group group-id:control group-label:"Control"
// dex:explanation text:"Apply refund guardrails and set the recommended action."
// dex:indexed-attribute value-type:string attribute-key:case-status description:"Current case status" index-type:keyword index-key:case-status
// dex:field attribute-key:operator-note value-type:string editable:true description:"Operator note"
// dex:action action-label:"Reject"
// dex:when attribute-key:case-status operator:in values:["awaiting-manager-rule","awaiting-manager-agent"]
// dex:input field-name:reason value-type:string source:user required:true description:"Rejection reason"
Example: examples/go/products/customer-refund/agentic/workflow.go
Unknown or repeated parameters, missing required parameters, and invalid JSON are blocking diagnostics. Separate indexed Attribute, field, Action, and input lines keep source order. This order becomes column, detail-field, Action, and form order. There is no separate order property.
Every registered Step has one group declaration and one explanation declaration. The explanation is one sentence that states what the Step does. Group order follows the first member's registration position in GetSteps. Step order within a group also follows GetSteps.
Search and Summary
An indexed Attribute declaration binds the Dex Attribute key, physical search index key, index type, application value type, and description. The analyzer compares every value with the Go definition and the SDK's effective index configuration.
The v2 list searches one Flow type at a time. Filters include Flow ID, execution status, start and close time, and the declared indexed Attributes. Dex Web compiles these controls into a visibility query. It does not accept a raw query from the browser. Different fields use AND; multiple values for one field use OR.
Each row calls GetDexSummary for the logical Flow ID's current run. The RPC accepts dex.None and returns a map[string]any. Dex Web loads at most eight summaries concurrently, applies a five-second timeout to each call, and isolates a failure to its row. Indexed Attributes appear before Summary fields.
Display and edits
Selecting a row keeps the Flow ID in the URL, not a run ID. GetDexDisplay, Attribute reads, edits, and Actions omit the run ID, so Dex resolves the current run. After Continue-as-New, refreshing the same URL automatically addresses the new run.
On v2, selecting a Step opens a panel split into Definition and Execution. Definition shows the Step explanation, WaitFor, and Execute branches from the Flow Definition Graph. Long Definition content scrolls so Execution stays visible. When a Step has more than three Execute branches, the branch list starts collapsed. Execution has a dropdown when the Step ran more than once, then Input, Output, and Context for the selected WaitFor or Execute history event in the same structured form as v1 Selected event. The execution payload defaults to Details and can switch to Raw JSON of the hydrated payload. AttributeMap and ChannelMap instances that are decimal numbers sort by numeric value, matching v1. Execute shows the live next Steps from that run's decision, not every FDG exit. When Continue-as-New moved a Step into a previous run, use Load more from previous run.
Display fields are ordered by their directive lines. Primitive string, integer, double, boolean, and datetime fields can be editable. JSON, objects, arrays, and AttributeMap values remain read-only. Missing fields must be returned as null. The backend rejects omitted, undeclared, or mistyped values.
Edits are available only while the current run is active. Dex Web writes the Attribute through SetAttributes and includes its declared index configuration when the Attribute is indexed.
Actions
An Action is an RPC with an Action directive and one condition. The first version supports the in operator. Dex Web re-reads the condition Attribute before invoking the RPC.
An Action without input accepts dex.None and renders as a direct button. An Action with input accepts a named Go struct. User-sourced fields render controls in directive order. Attribute-sourced fields stay hidden and use the selected run's Attribute snapshot.
The browser condition only controls presentation. Every Action RPC must check the current state again before changing durable state or publishing a Channel message. Use locks when that check and the effect must be atomic.
The first version adds no login or role system. Deploy it behind the same trusted network or reverse-proxy boundary used for Dex Web.