remora-monorepo / viewer / WorkflowViewerProps
Interface: WorkflowViewerProps
Defined in: packages/ui/src/workflow-viewer.tsx:80
Props for the WorkflowViewer component.
Properties
diagnostics?
optionaldiagnostics:Diagnostic[]
Defined in: packages/ui/src/workflow-viewer.tsx:84
Compiler diagnostics to display on affected nodes.
executionState?
optionalexecutionState:object
Defined in: packages/ui/src/workflow-viewer.tsx:88
Execution state to visualize on the workflow DAG.
completedAt?
optionalcompletedAt:string
durationMs?
optionaldurationMs:number
error?
optionalerror:object
error.category
category:
string
error.code
code:
string
error.isRetryable?
optionalisRetryable:boolean
error.message
message:
string
error.statusCode?
optionalstatusCode:number
error.stepId?
optionalstepId:string
output?
optionaloutput:unknown
runId
runId:
string
startedAt
startedAt:
string
status
status:
"pending"|"running"|"completed"|"failed"
stepRecords
stepRecords:
object[]
workflowHash?
optionalworkflowHash:string
isEditing?
optionalisEditing:boolean
Defined in: packages/ui/src/workflow-viewer.tsx:98
Enable editing mode. When true, nodes are draggable and editable.
minimapHeight?
optionalminimapHeight:number
Defined in: packages/ui/src/workflow-viewer.tsx:94
Height of the minimap in pixels.
Default
150minimapWidth?
optionalminimapWidth:number
Defined in: packages/ui/src/workflow-viewer.tsx:92
Width of the minimap in pixels (capped at 25% of viewer width).
Default
200onStepSelect()?
optionalonStepSelect: (step,diagnostics) =>void
Defined in: packages/ui/src/workflow-viewer.tsx:86
Called when a step node is clicked (with the step and its diagnostics) or when the selection is cleared (with null).
Parameters
step
{ description: string; id: string; name: string; nextStepId?: string; params: { toolInput: {[x: string]: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; toolName: string; }; type: "tool-call"; } | { description: string; id: string; name: string; nextStepId?: string; params: { cases: object[]; switchOn: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "switch-case"; } | { description: string; id: string; name: string; nextStepId?: string; params: { itemName: string; loopBodyStepId: string; target: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "for-each"; } | { description: string; id: string; name: string; nextStepId?: string; params: { outputFormat: object; prompt: string; }; type: "llm-prompt"; } | { description: string; id: string; name: string; nextStepId?: string; params: { outputFormat: object; sourceData: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "extract-data"; } | { description: string; id: string; name: string; nextStepId?: string; params: { durationMs: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "sleep"; } | { description: string; id: string; name: string; nextStepId?: string; params: { backoffMultiplier?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; condition: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; conditionStepId: string; intervalMs?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; maxAttempts?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; timeoutMs?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "wait-for-condition"; } | { description: string; id: string; name: string; nextStepId?: string; params: { instructions: string; maxSteps?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; outputFormat: object; tools: string[]; }; type: "agent-loop"; } | { description: string; id: string; name: string; nextStepId?: string; type: "start"; } | { description: string; id: string; name: string; nextStepId?: string; params?: { output: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "end"; } | null
diagnostics
Diagnostic[]
Returns
void
onWorkflowChange()?
optionalonWorkflowChange: (workflow) =>void
Defined in: packages/ui/src/workflow-viewer.tsx:100
Called when the workflow is modified in edit mode.
Parameters
workflow
initialStepId
string
inputSchema?
object
outputSchema?
object
steps
({ description: string; id: string; name: string; nextStepId?: string; params: { toolInput: {[x: string]: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; toolName: string; }; type: "tool-call"; } | { description: string; id: string; name: string; nextStepId?: string; params: { cases: object[]; switchOn: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "switch-case"; } | { description: string; id: string; name: string; nextStepId?: string; params: { itemName: string; loopBodyStepId: string; target: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "for-each"; } | { description: string; id: string; name: string; nextStepId?: string; params: { outputFormat: object; prompt: string; }; type: "llm-prompt"; } | { description: string; id: string; name: string; nextStepId?: string; params: { outputFormat: object; sourceData: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "extract-data"; } | { description: string; id: string; name: string; nextStepId?: string; params: { durationMs: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "sleep"; } | { description: string; id: string; name: string; nextStepId?: string; params: { backoffMultiplier?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; condition: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; conditionStepId: string; intervalMs?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; maxAttempts?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; timeoutMs?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "wait-for-condition"; } | { description: string; id: string; name: string; nextStepId?: string; params: { instructions: string; maxSteps?: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; outputFormat: object; tools: string[]; }; type: "agent-loop"; } | { description: string; id: string; name: string; nextStepId?: string; type: "start"; } | { description: string; id: string; name: string; nextStepId?: string; params?: { output: { type: "literal"; value: unknown; } | { expression: string; type: "jmespath"; } | { template: string; type: "template"; }; }; type: "end"; })[]
Returns
void
paused?
optionalpaused:boolean
Defined in: packages/ui/src/workflow-viewer.tsx:96
Whether the workflow execution is currently paused.
showMinimap?
optionalshowMinimap:boolean
Defined in: packages/ui/src/workflow-viewer.tsx:90
Whether to show the minimap.
Default
truetools?
optionaltools:ToolSet
Defined in: packages/ui/src/workflow-viewer.tsx:102
Tool definitions (AI SDK ToolSet). Used for tool name autocomplete in the editor. Execute functions are optional.
toolSchemas?
optionaltoolSchemas:ToolDefinitionMap
Defined in: packages/ui/src/workflow-viewer.tsx:104
Pre-extracted tool schemas. When provided, skips extracting schemas from tools.
workflow
workflow: {
initialStepId:string;inputSchema?:object;outputSchema?:object;steps: ({description:string;id:string;name:string;nextStepId?:string;params: {toolInput: {[x:string]: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; }; };toolName:string; };type:"tool-call"; } | {description:string;id:string;name:string;nextStepId?:string;params: {cases:object[];switchOn: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; }; };type:"switch-case"; } | {description:string;id:string;name:string;nextStepId?:string;params: {itemName:string;loopBodyStepId:string;target: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; }; };type:"for-each"; } | {description:string;id:string;name:string;nextStepId?:string;params: {outputFormat:object;prompt:string; };type:"llm-prompt"; } | {description:string;id:string;name:string;nextStepId?:string;params: {outputFormat:object;sourceData: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; }; };type:"extract-data"; } | {description:string;id:string;name:string;nextStepId?:string;params: {durationMs: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; }; };type:"sleep"; } | {description:string;id:string;name:string;nextStepId?:string;params: {backoffMultiplier?: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; };condition: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; };conditionStepId:string;intervalMs?: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; };maxAttempts?: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; };timeoutMs?: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; }; };type:"wait-for-condition"; } | {description:string;id:string;name:string;nextStepId?:string;params: {instructions:string;maxSteps?: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; };outputFormat:object;tools:string[]; };type:"agent-loop"; } | {description:string;id:string;name:string;nextStepId?:string;type:"start"; } | {description:string;id:string;name:string;nextStepId?:string;params?: {output: {type:"literal";value:unknown; } | {expression:string;type:"jmespath"; } | {template:string;type:"template"; }; };type:"end"; })[]; } |null
Defined in: packages/ui/src/workflow-viewer.tsx:82
The workflow definition to visualize. Pass null to start with an empty canvas (requires isEditing).