@remoraflow/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +674 -0
  2. package/dist/edges/workflow-edge.d.ts +3 -0
  3. package/dist/edges/workflow-edge.d.ts.map +1 -0
  4. package/dist/execution-state.d.ts +34 -0
  5. package/dist/execution-state.d.ts.map +1 -0
  6. package/dist/graph-layout.d.ts +17 -0
  7. package/dist/graph-layout.d.ts.map +1 -0
  8. package/dist/index.d.ts +10 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2708 -0
  11. package/dist/index.js.map +28 -0
  12. package/dist/nodes/agent-loop-node.d.ts +3 -0
  13. package/dist/nodes/agent-loop-node.d.ts.map +1 -0
  14. package/dist/nodes/base-node.d.ts +20 -0
  15. package/dist/nodes/base-node.d.ts.map +1 -0
  16. package/dist/nodes/end-node.d.ts +3 -0
  17. package/dist/nodes/end-node.d.ts.map +1 -0
  18. package/dist/nodes/extract-data-node.d.ts +3 -0
  19. package/dist/nodes/extract-data-node.d.ts.map +1 -0
  20. package/dist/nodes/for-each-node.d.ts +3 -0
  21. package/dist/nodes/for-each-node.d.ts.map +1 -0
  22. package/dist/nodes/group-header-node.d.ts +3 -0
  23. package/dist/nodes/group-header-node.d.ts.map +1 -0
  24. package/dist/nodes/llm-prompt-node.d.ts +3 -0
  25. package/dist/nodes/llm-prompt-node.d.ts.map +1 -0
  26. package/dist/nodes/sleep-node.d.ts +3 -0
  27. package/dist/nodes/sleep-node.d.ts.map +1 -0
  28. package/dist/nodes/start-node.d.ts +3 -0
  29. package/dist/nodes/start-node.d.ts.map +1 -0
  30. package/dist/nodes/start-step-node.d.ts +3 -0
  31. package/dist/nodes/start-step-node.d.ts.map +1 -0
  32. package/dist/nodes/switch-case-node.d.ts +3 -0
  33. package/dist/nodes/switch-case-node.d.ts.map +1 -0
  34. package/dist/nodes/tool-call-node.d.ts +3 -0
  35. package/dist/nodes/tool-call-node.d.ts.map +1 -0
  36. package/dist/nodes/wait-for-condition-node.d.ts +3 -0
  37. package/dist/nodes/wait-for-condition-node.d.ts.map +1 -0
  38. package/dist/panels/step-detail-panel.d.ts +11 -0
  39. package/dist/panels/step-detail-panel.d.ts.map +1 -0
  40. package/dist/theme.d.ts +17 -0
  41. package/dist/theme.d.ts.map +1 -0
  42. package/dist/workflow-viewer.d.ts +41 -0
  43. package/dist/workflow-viewer.d.ts.map +1 -0
  44. package/package.json +48 -0
@@ -0,0 +1,28 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/execution-state.ts", "../src/graph-layout.ts", "../src/panels/step-detail-panel.tsx", "../src/theme.tsx", "../src/workflow-viewer.tsx", "../src/edges/workflow-edge.tsx", "../src/nodes/base-node.tsx", "../src/nodes/agent-loop-node.tsx", "../src/nodes/end-node.tsx", "../src/nodes/extract-data-node.tsx", "../src/nodes/for-each-node.tsx", "../src/nodes/group-header-node.tsx", "../src/nodes/llm-prompt-node.tsx", "../src/nodes/sleep-node.tsx", "../src/nodes/start-node.tsx", "../src/nodes/start-step-node.tsx", "../src/nodes/switch-case-node.tsx", "../src/nodes/tool-call-node.tsx", "../src/nodes/wait-for-condition-node.tsx"],
4
+ "sourcesContent": [
5
+ "import type {\n\tExecutionState,\n\tStepExecutionRecord,\n\tStepStatus,\n\tTraceEntry,\n} from \"@remoraflow/core\";\n\n/** Aggregated execution summary for a single step across all its executions. */\nexport interface StepExecutionSummary {\n\tstatus: StepStatus;\n\t/** Total number of executions (>1 for steps in for-each loops). */\n\texecutionCount: number;\n\t/** Number of completed executions. */\n\tcompletedCount: number;\n\t/** Number of failed executions. */\n\tfailedCount: number;\n\t/** Total retries across all executions. */\n\ttotalRetries: number;\n\t/** Output from the most recent successful execution. */\n\tlatestOutput?: unknown;\n\t/** Error from the most recent failed execution. */\n\tlatestError?: { code: string; message: string };\n\t/** Duration of the most recent execution in milliseconds. */\n\tlatestDurationMs?: number;\n\t/** Resolved input values from the most recent execution. */\n\tlatestResolvedInputs?: unknown;\n\t/** Trace entries from the most recent execution. */\n\tlatestTrace?: TraceEntry[];\n}\n\nconst STATUS_PRIORITY: Record<StepStatus, number> = {\n\tfailed: 4,\n\trunning: 3,\n\tcompleted: 2,\n\tskipped: 1,\n\tpending: 0,\n};\n\nfunction worstStatus(a: StepStatus, b: StepStatus): StepStatus {\n\treturn STATUS_PRIORITY[a] >= STATUS_PRIORITY[b] ? a : b;\n}\n\n/**\n * Filter step records to only the latest iteration of each for-each loop.\n * This ensures the viewer shows only the current/most-recent iteration's\n * execution path, clearing previous iterations' branch states.\n */\nfunction filterToLatestIteration(\n\trecords: StepExecutionRecord[],\n): StepExecutionRecord[] {\n\t// Find the latest iteration index for each for-each step\n\tconst latestIteration = new Map<string, number>();\n\tfor (const record of records) {\n\t\tfor (const seg of record.path) {\n\t\t\tif (seg.type === \"for-each\") {\n\t\t\t\tconst prev = latestIteration.get(seg.stepId) ?? -1;\n\t\t\t\tif (seg.iterationIndex > prev) {\n\t\t\t\t\tlatestIteration.set(seg.stepId, seg.iterationIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (latestIteration.size === 0) return records;\n\n\treturn records.filter((record) => {\n\t\tfor (const seg of record.path) {\n\t\t\tif (seg.type === \"for-each\") {\n\t\t\t\tconst latest = latestIteration.get(seg.stepId);\n\t\t\t\tif (latest !== undefined && seg.iterationIndex !== latest) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n}\n\n/**\n * Derives a per-step summary map from the full execution state.\n * Groups step records by stepId and computes an aggregate status.\n * For steps inside for-each loops, only the latest iteration is shown.\n * Priority: failed > running > completed > skipped > pending.\n */\nexport function deriveStepSummaries(\n\tstate: ExecutionState,\n): Map<string, StepExecutionSummary> {\n\tconst filtered = filterToLatestIteration(state.stepRecords);\n\n\tconst grouped = new Map<string, StepExecutionRecord[]>();\n\tfor (const record of filtered) {\n\t\tconst existing = grouped.get(record.stepId);\n\t\tif (existing) {\n\t\t\texisting.push(record);\n\t\t} else {\n\t\t\tgrouped.set(record.stepId, [record]);\n\t\t}\n\t}\n\n\tconst summaries = new Map<string, StepExecutionSummary>();\n\n\tfor (const [stepId, records] of grouped) {\n\t\tlet status: StepStatus = \"pending\";\n\t\tlet completedCount = 0;\n\t\tlet failedCount = 0;\n\t\tlet totalRetries = 0;\n\t\tlet latestOutput: unknown;\n\t\tlet latestError: { code: string; message: string } | undefined;\n\t\tlet latestDurationMs: number | undefined;\n\t\tlet latestResolvedInputs: unknown;\n\t\tlet latestTrace: TraceEntry[] | undefined;\n\n\t\tfor (const record of records) {\n\t\t\tstatus = worstStatus(status, record.status);\n\t\t\tif (record.status === \"completed\") completedCount++;\n\t\t\tif (record.status === \"failed\") failedCount++;\n\t\t\ttotalRetries += record.retries.length;\n\n\t\t\tif (record.output !== undefined) latestOutput = record.output;\n\t\t\tif (record.error) {\n\t\t\t\tlatestError = {\n\t\t\t\t\tcode: record.error.code,\n\t\t\t\t\tmessage: record.error.message,\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (record.durationMs !== undefined) {\n\t\t\t\tlatestDurationMs = record.durationMs;\n\t\t\t}\n\t\t\tif (record.resolvedInputs !== undefined) {\n\t\t\t\tlatestResolvedInputs = record.resolvedInputs;\n\t\t\t}\n\t\t\tif (record.trace !== undefined) {\n\t\t\t\tlatestTrace = record.trace;\n\t\t\t}\n\t\t}\n\n\t\tsummaries.set(stepId, {\n\t\t\tstatus,\n\t\t\texecutionCount: records.length,\n\t\t\tcompletedCount,\n\t\t\tfailedCount,\n\t\t\ttotalRetries,\n\t\t\tlatestOutput,\n\t\t\tlatestError,\n\t\t\tlatestDurationMs,\n\t\t\tlatestResolvedInputs,\n\t\t\tlatestTrace,\n\t\t});\n\t}\n\n\treturn summaries;\n}\n",
6
+ "import dagre from \"@dagrejs/dagre\";\nimport type {\n\tDiagnostic,\n\tExecutionState,\n\tWorkflowDefinition,\n\tWorkflowStep,\n} from \"@remoraflow/core\";\nimport type { Edge, Node } from \"@xyflow/react\";\nimport {\n\tderiveStepSummaries,\n\ttype StepExecutionSummary,\n} from \"./execution-state\";\n\nexport interface StepNodeData {\n\tstep: WorkflowStep;\n\tdiagnostics: Diagnostic[];\n\thasSourceEdge?: boolean;\n\tinputSchema?: object;\n\toutputSchema?: object;\n\t/** Execution summary for this step, when executionState is provided. */\n\texecutionSummary?: StepExecutionSummary;\n}\n\nconst NODE_WIDTH = 300;\nconst NODE_HEIGHT = 180;\nconst END_NODE_SIZE = 60;\nconst START_NODE_SIZE = 60;\nconst GROUP_HEADER_WIDTH = 280;\nconst GROUP_HEADER_HEIGHT = 80;\nconst GROUP_PADDING = 30;\nconst GROUP_HEADER = 40;\n\nconst START_NODE_ID = \"__start__\";\n\nfunction getOrThrow<K, V>(map: Map<K, V>, key: K): V {\n\tconst val = map.get(key);\n\tif (val === undefined) throw new Error(`Missing map key: ${String(key)}`);\n\treturn val;\n}\n\nfunction stepNodeType(step: WorkflowStep): string | undefined {\n\tswitch (step.type) {\n\t\tcase \"tool-call\":\n\t\t\treturn \"toolCall\";\n\t\tcase \"llm-prompt\":\n\t\t\treturn \"llmPrompt\";\n\t\tcase \"extract-data\":\n\t\t\treturn \"extractData\";\n\t\tcase \"switch-case\":\n\t\t\treturn \"switchCase\";\n\t\tcase \"for-each\":\n\t\t\treturn \"forEach\";\n\t\tcase \"start\":\n\t\t\treturn \"startStep\";\n\t\tcase \"end\":\n\t\t\treturn \"end\";\n\t\tcase \"sleep\":\n\t\t\treturn \"sleep\";\n\t\tcase \"wait-for-condition\":\n\t\t\treturn \"waitForCondition\";\n\t\tcase \"agent-loop\":\n\t\t\treturn \"agentLoop\";\n\t}\n}\n\nfunction renderExpression(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nfunction nodeSize(\n\tstep: WorkflowStep,\n\tworkflow?: WorkflowDefinition,\n): { w: number; h: number } {\n\tif (step.type === \"end\" && !step.params?.output && !workflow?.outputSchema) {\n\t\treturn { w: END_NODE_SIZE, h: END_NODE_SIZE };\n\t}\n\treturn { w: NODE_WIDTH, h: NODE_HEIGHT };\n}\n\nfunction collectChildSteps(\n\tstep: WorkflowStep,\n\tstepMap: Map<string, WorkflowStep>,\n): Set<string> {\n\tconst children = new Set<string>();\n\tconst continuation = step.nextStepId;\n\n\tconst seeds: string[] = [];\n\tif (step.type === \"for-each\") {\n\t\tseeds.push(step.params.loopBodyStepId);\n\t} else if (step.type === \"switch-case\") {\n\t\tfor (const c of step.params.cases) {\n\t\t\tseeds.push(c.branchBodyStepId);\n\t\t}\n\t} else if (step.type === \"wait-for-condition\") {\n\t\tseeds.push(step.params.conditionStepId);\n\t} else {\n\t\treturn children;\n\t}\n\n\tconst queue = [...seeds];\n\twhile (queue.length > 0) {\n\t\tconst id = queue.shift();\n\t\tif (id === undefined) continue;\n\t\tif (children.has(id) || id === continuation) continue;\n\t\tconst s = stepMap.get(id);\n\t\tif (!s) continue;\n\t\tchildren.add(id);\n\t\tif (s.nextStepId) queue.push(s.nextStepId);\n\t\tif (s.type === \"switch-case\") {\n\t\t\tfor (const c of s.params.cases) queue.push(c.branchBodyStepId);\n\t\t}\n\t\tif (s.type === \"for-each\") {\n\t\t\tqueue.push(s.params.loopBodyStepId);\n\t\t}\n\t\tif (s.type === \"wait-for-condition\") {\n\t\t\tqueue.push(s.params.conditionStepId);\n\t\t}\n\t}\n\treturn children;\n}\n\nfunction buildParentMap(\n\tworkflow: WorkflowDefinition,\n\tstepMap: Map<string, WorkflowStep>,\n): Map<string, string> {\n\tconst parentMap = new Map<string, string>();\n\tconst allGroupChildren = new Map<string, Set<string>>();\n\n\tfor (const step of workflow.steps) {\n\t\tif (\n\t\t\tstep.type === \"for-each\" ||\n\t\t\tstep.type === \"switch-case\" ||\n\t\t\tstep.type === \"wait-for-condition\"\n\t\t) {\n\t\t\tallGroupChildren.set(step.id, collectChildSteps(step, stepMap));\n\t\t}\n\t}\n\n\tfor (const [groupId, children] of allGroupChildren) {\n\t\tfor (const childId of children) {\n\t\t\tconst currentParent = parentMap.get(childId);\n\t\t\tif (!currentParent) {\n\t\t\t\tparentMap.set(childId, groupId);\n\t\t\t} else {\n\t\t\t\tconst currentParentChildren = allGroupChildren.get(currentParent);\n\t\t\t\tif (currentParentChildren?.has(groupId)) {\n\t\t\t\t\tparentMap.set(childId, groupId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn parentMap;\n}\n\nfunction getDirectChildren(\n\tgroupId: string,\n\tparentMap: Map<string, string>,\n): Set<string> {\n\tconst direct = new Set<string>();\n\tfor (const [childId, pid] of parentMap) {\n\t\tif (pid === groupId) direct.add(childId);\n\t}\n\treturn direct;\n}\n\nfunction groupProcessingOrder(\n\tgroupIds: Set<string>,\n\tparentMap: Map<string, string>,\n): string[] {\n\tconst order: string[] = [];\n\tconst visited = new Set<string>();\n\n\tfunction visit(id: string) {\n\t\tif (visited.has(id)) return;\n\t\tvisited.add(id);\n\t\tfor (const [childId, pid] of parentMap) {\n\t\t\tif (pid === id && groupIds.has(childId)) {\n\t\t\t\tvisit(childId);\n\t\t\t}\n\t\t}\n\t\torder.push(id);\n\t}\n\n\tfor (const id of groupIds) {\n\t\tvisit(id);\n\t}\n\treturn order;\n}\n\nfunction groupHeaderId(groupId: string): string {\n\treturn `__header__${groupId}`;\n}\n\nfunction getNodeDimensions(\n\tnodeId: string,\n\tgroupIds: Set<string>,\n\tcomputedSizes: Map<string, { w: number; h: number }>,\n\tstepMap: Map<string, WorkflowStep>,\n\tworkflow?: WorkflowDefinition,\n): { w: number; h: number } {\n\tif (groupIds.has(nodeId)) {\n\t\treturn getOrThrow(computedSizes, nodeId);\n\t}\n\treturn nodeSize(getOrThrow(stepMap, nodeId), workflow);\n}\n\nexport function buildLayout(\n\tworkflow: WorkflowDefinition,\n\tdiagnostics: Diagnostic[] = [],\n\texecutionState?: ExecutionState,\n): { nodes: Node[]; edges: Edge[] } {\n\t// --- Step 1: Build maps ---\n\tconst stepSummaries = executionState\n\t\t? deriveStepSummaries(executionState)\n\t\t: undefined;\n\tconst diagnosticsByStep = new Map<string, Diagnostic[]>();\n\tfor (const d of diagnostics) {\n\t\tif (d.location.stepId) {\n\t\t\tconst existing = diagnosticsByStep.get(d.location.stepId) ?? [];\n\t\t\texisting.push(d);\n\t\t\tdiagnosticsByStep.set(d.location.stepId, existing);\n\t\t}\n\t}\n\n\tconst stepMap = new Map<string, WorkflowStep>();\n\tfor (const step of workflow.steps) {\n\t\tstepMap.set(step.id, step);\n\t}\n\n\tconst parentMap = buildParentMap(workflow, stepMap);\n\n\t// --- Step 2: Identify groups ---\n\tconst groupIds = new Set<string>();\n\tfor (const step of workflow.steps) {\n\t\tif (\n\t\t\tstep.type === \"for-each\" ||\n\t\t\tstep.type === \"switch-case\" ||\n\t\t\tstep.type === \"wait-for-condition\"\n\t\t) {\n\t\t\tconst hasChildren = [...parentMap.values()].some(\n\t\t\t\t(pid) => pid === step.id,\n\t\t\t);\n\t\t\tif (hasChildren) groupIds.add(step.id);\n\t\t}\n\t}\n\n\t// --- Step 3: Compute group sizes bottom-up ---\n\tconst processOrder = groupProcessingOrder(groupIds, parentMap);\n\tconst computedSizes = new Map<string, { w: number; h: number }>();\n\tconst groupChildPositions = new Map<\n\t\tstring,\n\t\tMap<string, { x: number; y: number }>\n\t>();\n\n\tfor (const groupId of processOrder) {\n\t\tconst groupStep = getOrThrow(stepMap, groupId);\n\t\tconst directChildren = getDirectChildren(groupId, parentMap);\n\t\tif (directChildren.size === 0) {\n\t\t\tgroupIds.delete(groupId);\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst subG = new dagre.graphlib.Graph();\n\t\tsubG.setGraph({ rankdir: \"TB\", ranksep: 60, nodesep: 40 });\n\t\tsubG.setDefaultEdgeLabel(() => ({}));\n\n\t\t// Add a synthetic header node for this group\n\t\tconst headerId = groupHeaderId(groupId);\n\t\tsubG.setNode(headerId, {\n\t\t\twidth: GROUP_HEADER_WIDTH,\n\t\t\theight: GROUP_HEADER_HEIGHT,\n\t\t});\n\n\t\t// Add child nodes\n\t\tfor (const childId of directChildren) {\n\t\t\tconst { w, h } = getNodeDimensions(\n\t\t\t\tchildId,\n\t\t\t\tgroupIds,\n\t\t\t\tcomputedSizes,\n\t\t\t\tstepMap,\n\t\t\t\tworkflow,\n\t\t\t);\n\t\t\tsubG.setNode(childId, { width: w, height: h });\n\t\t}\n\n\t\t// Edges from header to entry points\n\t\tif (groupStep.type === \"switch-case\") {\n\t\t\tfor (const c of groupStep.params.cases) {\n\t\t\t\tif (directChildren.has(c.branchBodyStepId)) {\n\t\t\t\t\tsubG.setEdge(headerId, c.branchBodyStepId);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (groupStep.type === \"for-each\") {\n\t\t\tif (directChildren.has(groupStep.params.loopBodyStepId)) {\n\t\t\t\tsubG.setEdge(headerId, groupStep.params.loopBodyStepId);\n\t\t\t}\n\t\t} else if (groupStep.type === \"wait-for-condition\") {\n\t\t\tif (directChildren.has(groupStep.params.conditionStepId)) {\n\t\t\t\tsubG.setEdge(headerId, groupStep.params.conditionStepId);\n\t\t\t}\n\t\t}\n\n\t\t// Edges between direct children\n\t\tfor (const childId of directChildren) {\n\t\t\tconst step = getOrThrow(stepMap, childId);\n\t\t\tif (step.nextStepId && directChildren.has(step.nextStepId)) {\n\t\t\t\tsubG.setEdge(childId, step.nextStepId);\n\t\t\t}\n\t\t\tif (step.type === \"switch-case\") {\n\t\t\t\tfor (const c of step.params.cases) {\n\t\t\t\t\tif (directChildren.has(c.branchBodyStepId)) {\n\t\t\t\t\t\tsubG.setEdge(childId, c.branchBodyStepId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (step.type === \"for-each\") {\n\t\t\t\tif (directChildren.has(step.params.loopBodyStepId)) {\n\t\t\t\t\tsubG.setEdge(childId, step.params.loopBodyStepId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (step.type === \"wait-for-condition\") {\n\t\t\t\tif (directChildren.has(step.params.conditionStepId)) {\n\t\t\t\t\tsubG.setEdge(childId, step.params.conditionStepId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdagre.layout(subG);\n\n\t\tlet minX = Number.POSITIVE_INFINITY;\n\t\tlet minY = Number.POSITIVE_INFINITY;\n\t\tlet maxX = Number.NEGATIVE_INFINITY;\n\t\tlet maxY = Number.NEGATIVE_INFINITY;\n\n\t\tconst allSubNodes = new Set(directChildren);\n\t\tallSubNodes.add(headerId);\n\n\t\tconst rawPositions = new Map<string, { x: number; y: number }>();\n\t\tfor (const nodeId of allSubNodes) {\n\t\t\tconst pos = subG.node(nodeId);\n\t\t\tlet w: number;\n\t\t\tlet h: number;\n\t\t\tif (nodeId === headerId) {\n\t\t\t\tw = GROUP_HEADER_WIDTH;\n\t\t\t\th = GROUP_HEADER_HEIGHT;\n\t\t\t} else {\n\t\t\t\tconst dims = getNodeDimensions(\n\t\t\t\t\tnodeId,\n\t\t\t\t\tgroupIds,\n\t\t\t\t\tcomputedSizes,\n\t\t\t\t\tstepMap,\n\t\t\t\t\tworkflow,\n\t\t\t\t);\n\t\t\t\tw = dims.w;\n\t\t\t\th = dims.h;\n\t\t\t}\n\t\t\tconst x = pos.x - w / 2;\n\t\t\tconst y = pos.y - h / 2;\n\t\t\trawPositions.set(nodeId, { x, y });\n\t\t\tminX = Math.min(minX, x);\n\t\t\tminY = Math.min(minY, y);\n\t\t\tmaxX = Math.max(maxX, x + w);\n\t\t\tmaxY = Math.max(maxY, y + h);\n\t\t}\n\n\t\tconst positions = new Map<string, { x: number; y: number }>();\n\t\tfor (const [nodeId, pos] of rawPositions) {\n\t\t\tpositions.set(nodeId, {\n\t\t\t\tx: pos.x - minX + GROUP_PADDING,\n\t\t\t\ty: pos.y - minY + GROUP_HEADER,\n\t\t\t});\n\t\t}\n\t\tgroupChildPositions.set(groupId, positions);\n\n\t\tconst contentWidth = maxX - minX;\n\t\tconst contentHeight = maxY - minY;\n\t\tcomputedSizes.set(groupId, {\n\t\t\tw: contentWidth + GROUP_PADDING * 2,\n\t\t\th: contentHeight + GROUP_HEADER + GROUP_PADDING,\n\t\t});\n\t}\n\n\t// --- Step 4: Top-level dagre layout ---\n\tconst topG = new dagre.graphlib.Graph();\n\ttopG.setGraph({ rankdir: \"TB\", ranksep: 80, nodesep: 60 });\n\ttopG.setDefaultEdgeLabel(() => ({}));\n\n\t// Start node — skip pseudo-node when initialStepId is a \"start\" step\n\tconst initialStep = stepMap.get(workflow.initialStepId);\n\tconst hasStartStep = initialStep?.type === \"start\";\n\n\tif (!hasStartStep) {\n\t\ttopG.setNode(START_NODE_ID, {\n\t\t\twidth: START_NODE_SIZE,\n\t\t\theight: START_NODE_SIZE,\n\t\t});\n\t}\n\n\tconst topLevelStepIds: string[] = [];\n\tfor (const step of workflow.steps) {\n\t\tif (!parentMap.has(step.id)) {\n\t\t\ttopLevelStepIds.push(step.id);\n\t\t\tconst { w, h } = getNodeDimensions(\n\t\t\t\tstep.id,\n\t\t\t\tgroupIds,\n\t\t\t\tcomputedSizes,\n\t\t\t\tstepMap,\n\t\t\t\tworkflow,\n\t\t\t);\n\t\t\ttopG.setNode(step.id, { width: w, height: h });\n\t\t}\n\t}\n\n\t// Start → initial step\n\tif (!hasStartStep) {\n\t\ttopG.setEdge(START_NODE_ID, workflow.initialStepId);\n\t}\n\n\tconst topLevelSet = new Set(topLevelStepIds);\n\tfor (const stepId of topLevelStepIds) {\n\t\tconst step = getOrThrow(stepMap, stepId);\n\t\tif (step.nextStepId && topLevelSet.has(step.nextStepId)) {\n\t\t\ttopG.setEdge(stepId, step.nextStepId);\n\t\t}\n\t\tif (step.type === \"switch-case\") {\n\t\t\tfor (const c of step.params.cases) {\n\t\t\t\tif (topLevelSet.has(c.branchBodyStepId)) {\n\t\t\t\t\ttopG.setEdge(stepId, c.branchBodyStepId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (step.type === \"for-each\") {\n\t\t\tif (topLevelSet.has(step.params.loopBodyStepId)) {\n\t\t\t\ttopG.setEdge(stepId, step.params.loopBodyStepId);\n\t\t\t}\n\t\t}\n\t\tif (step.type === \"wait-for-condition\") {\n\t\t\tif (topLevelSet.has(step.params.conditionStepId)) {\n\t\t\t\ttopG.setEdge(stepId, step.params.conditionStepId);\n\t\t\t}\n\t\t}\n\t}\n\n\tdagre.layout(topG);\n\n\tconst topLevelPositions = new Map<string, { x: number; y: number }>();\n\n\tif (!hasStartStep) {\n\t\tconst startPos = topG.node(START_NODE_ID);\n\t\ttopLevelPositions.set(START_NODE_ID, {\n\t\t\tx: startPos.x - START_NODE_SIZE / 2,\n\t\t\ty: startPos.y - START_NODE_SIZE / 2,\n\t\t});\n\t}\n\n\tfor (const stepId of topLevelStepIds) {\n\t\tconst pos = topG.node(stepId);\n\t\tconst { w, h } = getNodeDimensions(\n\t\t\tstepId,\n\t\t\tgroupIds,\n\t\t\tcomputedSizes,\n\t\t\tstepMap,\n\t\t\tworkflow,\n\t\t);\n\t\ttopLevelPositions.set(stepId, {\n\t\t\tx: pos.x - w / 2,\n\t\t\ty: pos.y - h / 2,\n\t\t});\n\t}\n\n\t// --- Step 5: Build React Flow nodes ---\n\tconst nodes: Node[] = [];\n\n\t// Start pseudo-node (only when no explicit start step exists)\n\tif (!hasStartStep) {\n\t\tconst startNodePos = getOrThrow(topLevelPositions, START_NODE_ID);\n\t\tnodes.push({\n\t\t\tid: START_NODE_ID,\n\t\t\ttype: \"start\",\n\t\t\tposition: startNodePos,\n\t\t\tdata: {},\n\t\t\tselectable: false,\n\t\t});\n\t}\n\n\tfunction addNodesForContext(\n\t\tnodeIds: Iterable<string>,\n\t\tgetPosition: (id: string) => { x: number; y: number },\n\t\tparentId?: string,\n\t) {\n\t\tconst groups: string[] = [];\n\t\tconst headers: string[] = [];\n\t\tconst nonGroups: string[] = [];\n\t\tfor (const id of nodeIds) {\n\t\t\tif (groupIds.has(id)) groups.push(id);\n\t\t\telse if (id.startsWith(\"__header__\")) headers.push(id);\n\t\t\telse nonGroups.push(id);\n\t\t}\n\n\t\tfor (const id of groups) {\n\t\t\tconst step = getOrThrow(stepMap, id);\n\t\t\tconst pos = getPosition(id);\n\t\t\tconst size = getOrThrow(computedSizes, id);\n\n\t\t\tnodes.push({\n\t\t\t\tid,\n\t\t\t\ttype: stepNodeType(step),\n\t\t\t\tposition: pos,\n\t\t\t\tdata: {\n\t\t\t\t\tstep,\n\t\t\t\t\tdiagnostics: diagnosticsByStep.get(id) ?? [],\n\t\t\t\t\tisGroup: true,\n\t\t\t\t\tgroupWidth: size.w,\n\t\t\t\t\tgroupHeight: size.h,\n\t\t\t\t\thasSourceEdge: !!step.nextStepId,\n\t\t\t\t\texecutionSummary: stepSummaries?.get(id),\n\t\t\t\t},\n\t\t\t\tstyle: { width: size.w, height: size.h },\n\t\t\t\t...(parentId ? { parentId, extent: \"parent\" as const } : {}),\n\t\t\t});\n\n\t\t\tconst childPositions = getOrThrow(groupChildPositions, id);\n\t\t\taddNodesForContext(\n\t\t\t\tchildPositions.keys(),\n\t\t\t\t(childId) => getOrThrow(childPositions, childId),\n\t\t\t\tid,\n\t\t\t);\n\t\t}\n\n\t\tfor (const id of headers) {\n\t\t\tconst pos = getPosition(id);\n\t\t\tconst gid = id.replace(\"__header__\", \"\");\n\t\t\tconst step = getOrThrow(stepMap, gid);\n\n\t\t\tconst summary = stepSummaries?.get(gid);\n\t\t\tconst resolvedInputs = summary?.latestResolvedInputs as\n\t\t\t\t| Record<string, unknown>\n\t\t\t\t| undefined;\n\n\t\t\tif (step.type === \"switch-case\") {\n\t\t\t\tnodes.push({\n\t\t\t\t\tid,\n\t\t\t\t\ttype: \"groupHeader\",\n\t\t\t\t\tposition: pos,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tvariant: \"switch\",\n\t\t\t\t\t\tdescription: step.description,\n\t\t\t\t\t\texpression: renderExpression(step.params.switchOn),\n\t\t\t\t\t\tresolvedExpression: resolvedInputs?.switchOn,\n\t\t\t\t\t\tstep,\n\t\t\t\t\t\tdiagnostics: diagnosticsByStep.get(gid) ?? [],\n\t\t\t\t\t},\n\t\t\t\t\t...(parentId ? { parentId, extent: \"parent\" as const } : {}),\n\t\t\t\t});\n\t\t\t} else if (step.type === \"for-each\") {\n\t\t\t\tnodes.push({\n\t\t\t\t\tid,\n\t\t\t\t\ttype: \"groupHeader\",\n\t\t\t\t\tposition: pos,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tvariant: \"loop\",\n\t\t\t\t\t\tdescription: step.description,\n\t\t\t\t\t\ttarget: renderExpression(step.params.target),\n\t\t\t\t\t\tresolvedTarget: resolvedInputs?.target,\n\t\t\t\t\t\titemName: step.params.itemName,\n\t\t\t\t\t\tstep,\n\t\t\t\t\t\tdiagnostics: diagnosticsByStep.get(gid) ?? [],\n\t\t\t\t\t},\n\t\t\t\t\t...(parentId ? { parentId, extent: \"parent\" as const } : {}),\n\t\t\t\t});\n\t\t\t} else if (step.type === \"wait-for-condition\") {\n\t\t\t\tnodes.push({\n\t\t\t\t\tid,\n\t\t\t\t\ttype: \"groupHeader\",\n\t\t\t\t\tposition: pos,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tvariant: \"condition\",\n\t\t\t\t\t\tdescription: step.description,\n\t\t\t\t\t\tcondition: renderExpression(step.params.condition),\n\t\t\t\t\t},\n\t\t\t\t\t...(parentId ? { parentId, extent: \"parent\" as const } : {}),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfor (const id of nonGroups) {\n\t\t\tconst step = getOrThrow(stepMap, id);\n\t\t\tconst pos = getPosition(id);\n\n\t\t\tconst nodeData: Record<string, unknown> = {\n\t\t\t\tstep,\n\t\t\t\tdiagnostics: diagnosticsByStep.get(id) ?? [],\n\t\t\t\thasSourceEdge: !!step.nextStepId,\n\t\t\t\texecutionSummary: stepSummaries?.get(id),\n\t\t\t};\n\t\t\tif (step.type === \"start\" && workflow.inputSchema) {\n\t\t\t\tnodeData.inputSchema = workflow.inputSchema;\n\t\t\t}\n\t\t\tif (step.type === \"end\" && workflow.outputSchema) {\n\t\t\t\tnodeData.outputSchema = workflow.outputSchema;\n\t\t\t}\n\n\t\t\tnodes.push({\n\t\t\t\tid,\n\t\t\t\ttype: stepNodeType(step),\n\t\t\t\tposition: pos,\n\t\t\t\tdata: nodeData,\n\t\t\t\t...(parentId ? { parentId, extent: \"parent\" as const } : {}),\n\t\t\t});\n\t\t}\n\t}\n\n\taddNodesForContext(topLevelStepIds, (id) =>\n\t\tgetOrThrow(topLevelPositions, id),\n\t);\n\n\t// --- Step 6: Build edges ---\n\tconst edges: Edge[] = [];\n\tconst hasExecState = !!stepSummaries;\n\n\tfunction isStepExecuted(stepId: string): boolean {\n\t\tconst s = stepSummaries?.get(stepId);\n\t\treturn s?.status === \"completed\" || s?.status === \"running\";\n\t}\n\n\t// Start → initial step (only when no explicit start step exists)\n\tif (!hasStartStep) {\n\t\tedges.push({\n\t\t\tid: `${START_NODE_ID}->${workflow.initialStepId}`,\n\t\t\tsource: START_NODE_ID,\n\t\t\ttarget: workflow.initialStepId,\n\t\t\ttype: \"workflow\",\n\t\t\tdata: {\n\t\t\t\tedgeKind: \"sequential\",\n\t\t\t\texecuted: hasExecState && isStepExecuted(workflow.initialStepId),\n\t\t\t\thasExecutionState: hasExecState,\n\t\t\t},\n\t\t});\n\t}\n\n\tfor (const step of workflow.steps) {\n\t\tif (step.type === \"switch-case\") {\n\t\t\tif (groupIds.has(step.id)) {\n\t\t\t\tconst headerId = groupHeaderId(step.id);\n\t\t\t\tfor (const c of step.params.cases) {\n\t\t\t\t\tconst label =\n\t\t\t\t\t\tc.value.type === \"default\" ? \"default\" : renderExpression(c.value);\n\t\t\t\t\tedges.push({\n\t\t\t\t\t\tid: `${headerId}->${c.branchBodyStepId}`,\n\t\t\t\t\t\tsource: headerId,\n\t\t\t\t\t\ttarget: c.branchBodyStepId,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\ttype: \"workflow\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tedgeKind: \"branch\",\n\t\t\t\t\t\t\texecuted: hasExecState && isStepExecuted(c.branchBodyStepId),\n\t\t\t\t\t\t\thasExecutionState: hasExecState,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (step.nextStepId) {\n\t\t\t\tedges.push({\n\t\t\t\t\tid: `${step.id}->${step.nextStepId}`,\n\t\t\t\t\tsource: step.id,\n\t\t\t\t\ttarget: step.nextStepId,\n\t\t\t\t\ttype: \"workflow\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tedgeKind: \"sequential\",\n\t\t\t\t\t\texecuted: hasExecState && isStepExecuted(step.nextStepId),\n\t\t\t\t\t\thasExecutionState: hasExecState,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (step.type === \"for-each\") {\n\t\t\tif (groupIds.has(step.id)) {\n\t\t\t\tconst headerId = groupHeaderId(step.id);\n\t\t\t\tedges.push({\n\t\t\t\t\tid: `${headerId}->${step.params.loopBodyStepId}`,\n\t\t\t\t\tsource: headerId,\n\t\t\t\t\ttarget: step.params.loopBodyStepId,\n\t\t\t\t\ttype: \"workflow\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tedgeKind: \"sequential\",\n\t\t\t\t\t\texecuted:\n\t\t\t\t\t\t\thasExecState && isStepExecuted(step.params.loopBodyStepId),\n\t\t\t\t\t\thasExecutionState: hasExecState,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (step.nextStepId) {\n\t\t\t\tedges.push({\n\t\t\t\t\tid: `${step.id}->${step.nextStepId}`,\n\t\t\t\t\tsource: step.id,\n\t\t\t\t\ttarget: step.nextStepId,\n\t\t\t\t\ttype: \"workflow\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tedgeKind: \"sequential\",\n\t\t\t\t\t\texecuted: hasExecState && isStepExecuted(step.nextStepId),\n\t\t\t\t\t\thasExecutionState: hasExecState,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (step.type === \"wait-for-condition\") {\n\t\t\tif (groupIds.has(step.id)) {\n\t\t\t\tconst headerId = groupHeaderId(step.id);\n\t\t\t\tedges.push({\n\t\t\t\t\tid: `${headerId}->${step.params.conditionStepId}`,\n\t\t\t\t\tsource: headerId,\n\t\t\t\t\ttarget: step.params.conditionStepId,\n\t\t\t\t\ttype: \"workflow\",\n\t\t\t\t\tdata: { edgeKind: \"sequential\" },\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (step.nextStepId) {\n\t\t\t\tedges.push({\n\t\t\t\t\tid: `${step.id}->${step.nextStepId}`,\n\t\t\t\t\tsource: step.id,\n\t\t\t\t\ttarget: step.nextStepId,\n\t\t\t\t\ttype: \"workflow\",\n\t\t\t\t\tdata: { edgeKind: \"sequential\" },\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (step.nextStepId) {\n\t\t\tedges.push({\n\t\t\t\tid: `${step.id}->${step.nextStepId}`,\n\t\t\t\tsource: step.id,\n\t\t\t\ttarget: step.nextStepId,\n\t\t\t\ttype: \"workflow\",\n\t\t\t\tdata: {\n\t\t\t\t\tedgeKind: \"sequential\",\n\t\t\t\t\texecuted: hasExecState && isStepExecuted(step.nextStepId),\n\t\t\t\t\thasExecutionState: hasExecState,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n\n\treturn { nodes, edges };\n}\n",
7
+ "import type {\n\tDiagnostic,\n\tExecutionPathSegment,\n\tStepExecutionRecord,\n\tWorkflowStep,\n} from \"@remoraflow/core\";\nimport type React from \"react\";\nimport type { StepExecutionSummary } from \"../execution-state\";\n\nexport interface StepDetailPanelProps {\n\tstep: WorkflowStep;\n\tdiagnostics: Diagnostic[];\n\texecutionSummary?: StepExecutionSummary;\n\texecutionRecords?: StepExecutionRecord[];\n\tonClose: () => void;\n}\n\nfunction renderExpression(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nfunction TypeBadge({ type }: { type: string }) {\n\tconst colors: Record<string, string> = {\n\t\t\"tool-call\":\n\t\t\t\"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-400\",\n\t\t\"llm-prompt\":\n\t\t\t\"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-400\",\n\t\t\"extract-data\":\n\t\t\t\"bg-purple-100 text-purple-700 dark:bg-purple-900/50 dark:text-purple-400\",\n\t\t\"switch-case\":\n\t\t\t\"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-400\",\n\t\t\"for-each\":\n\t\t\t\"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/50 dark:text-emerald-400\",\n\t\t\"agent-loop\":\n\t\t\t\"bg-teal-100 text-teal-700 dark:bg-teal-900/50 dark:text-teal-400\",\n\t\tsleep:\n\t\t\t\"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-400\",\n\t\t\"wait-for-condition\":\n\t\t\t\"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-400\",\n\t\tstart:\n\t\t\t\"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-400\",\n\t\tend: \"bg-muted text-muted-foreground\",\n\t};\n\tconst fallback = \"bg-muted text-muted-foreground\";\n\treturn (\n\t\t<span\n\t\t\tclassName={`text-[11px] font-medium px-2 py-0.5 rounded-full ${colors[type] ?? fallback}`}\n\t\t>\n\t\t\t{type}\n\t\t</span>\n\t);\n}\n\nfunction StatusBadge({ summary }: { summary: StepExecutionSummary }) {\n\tconst colors: Record<string, string> = {\n\t\tpending: \"bg-muted text-muted-foreground\",\n\t\trunning: \"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-400\",\n\t\tcompleted:\n\t\t\t\"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-400\",\n\t\tfailed: \"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400\",\n\t\tskipped: \"bg-muted text-muted-foreground\",\n\t};\n\treturn (\n\t\t<span\n\t\t\tclassName={`text-[11px] font-medium px-2 py-0.5 rounded-full ${colors[summary.status]}`}\n\t\t>\n\t\t\t{summary.status}\n\t\t</span>\n\t);\n}\n\nfunction ResolvedCode({\n\tvalue,\n\texpression,\n}: {\n\tvalue: unknown;\n\texpression?: string;\n}) {\n\tconst display =\n\t\ttypeof value === \"string\" ? value : JSON.stringify(value, null, 2);\n\treturn (\n\t\t<pre\n\t\t\tclassName=\"text-xs text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/50 rounded p-2 whitespace-pre-wrap font-mono overflow-auto max-h-[200px] cursor-default\"\n\t\t\ttitle={expression}\n\t\t>\n\t\t\t{display}\n\t\t</pre>\n\t);\n}\n\nfunction StepParams({\n\tstep,\n\tresolvedInputs,\n}: {\n\tstep: WorkflowStep;\n\tresolvedInputs?: unknown;\n}) {\n\tconst resolved = resolvedInputs as Record<string, unknown> | undefined;\n\n\tswitch (step.type) {\n\t\tcase \"tool-call\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Tool</Label>\n\t\t\t\t\t\t<Code>{step.params.toolName}</Code>\n\t\t\t\t\t</div>\n\t\t\t\t\t{Object.keys(step.params.toolInput).length > 0 && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Label>Inputs</Label>\n\t\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t\t{Object.entries(step.params.toolInput).map(([key, val]) => {\n\t\t\t\t\t\t\t\t\tconst resolvedVal = resolved?.[key];\n\t\t\t\t\t\t\t\t\tconst hasResolved = resolvedVal !== undefined;\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<div key={key} className=\"flex gap-2 text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t\t\t{key}:\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={`font-mono ${hasResolved ? \"text-emerald-700 dark:text-emerald-400\" : \"text-foreground\"}`}\n\t\t\t\t\t\t\t\t\t\t\t\ttitle={hasResolved ? renderExpression(val) : undefined}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{hasResolved\n\t\t\t\t\t\t\t\t\t\t\t\t\t? typeof resolvedVal === \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? resolvedVal\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: JSON.stringify(resolvedVal)\n\t\t\t\t\t\t\t\t\t\t\t\t\t: renderExpression(val)}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"llm-prompt\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Prompt</Label>\n\t\t\t\t\t\t{resolved?.prompt ? (\n\t\t\t\t\t\t\t<ResolvedCode\n\t\t\t\t\t\t\t\tvalue={resolved.prompt}\n\t\t\t\t\t\t\t\texpression={step.params.prompt}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<pre className=\"text-xs rounded p-2 whitespace-pre-wrap font-mono text-foreground bg-muted\">\n\t\t\t\t\t\t\t\t{step.params.prompt}\n\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Output Format</Label>\n\t\t\t\t\t\t<Code>{JSON.stringify(step.params.outputFormat, null, 2)}</Code>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"extract-data\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Source</Label>\n\t\t\t\t\t\t{resolved?.sourceData !== undefined ? (\n\t\t\t\t\t\t\t<ResolvedCode\n\t\t\t\t\t\t\t\tvalue={resolved.sourceData}\n\t\t\t\t\t\t\t\texpression={renderExpression(step.params.sourceData)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.sourceData)}</Code>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Output Format</Label>\n\t\t\t\t\t\t<Code>{JSON.stringify(step.params.outputFormat, null, 2)}</Code>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"switch-case\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Switch On</Label>\n\t\t\t\t\t\t{resolved?.switchOn !== undefined ? (\n\t\t\t\t\t\t\t<ResolvedCode\n\t\t\t\t\t\t\t\tvalue={resolved.switchOn}\n\t\t\t\t\t\t\t\texpression={renderExpression(step.params.switchOn)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.switchOn)}</Code>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Cases</Label>\n\t\t\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t\t\t{step.params.cases.map((c) => (\n\t\t\t\t\t\t\t\t<div key={c.branchBodyStepId} className=\"text-xs flex gap-2\">\n\t\t\t\t\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t{c.value.type === \"default\"\n\t\t\t\t\t\t\t\t\t\t\t? \"default\"\n\t\t\t\t\t\t\t\t\t\t\t: renderExpression(c.value)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground/50\">&rarr;</span>\n\t\t\t\t\t\t\t\t\t<span className=\"font-mono text-foreground\">\n\t\t\t\t\t\t\t\t\t\t{c.branchBodyStepId}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"for-each\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Target</Label>\n\t\t\t\t\t\t{resolved?.target !== undefined ? (\n\t\t\t\t\t\t\t<ResolvedCode\n\t\t\t\t\t\t\t\tvalue={resolved.target}\n\t\t\t\t\t\t\t\texpression={renderExpression(step.params.target)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.target)}</Code>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Item Variable</Label>\n\t\t\t\t\t\t<Code>{step.params.itemName}</Code>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Loop Body</Label>\n\t\t\t\t\t\t<Code>{step.params.loopBodyStepId}</Code>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"sleep\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Duration</Label>\n\t\t\t\t\t\t{resolved?.durationMs !== undefined ? (\n\t\t\t\t\t\t\t<ResolvedCode\n\t\t\t\t\t\t\t\tvalue={`${resolved.durationMs}ms`}\n\t\t\t\t\t\t\t\texpression={renderExpression(step.params.durationMs)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.durationMs)}ms</Code>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"wait-for-condition\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Condition</Label>\n\t\t\t\t\t\t{resolved?.condition !== undefined ? (\n\t\t\t\t\t\t\t<ResolvedCode\n\t\t\t\t\t\t\t\tvalue={resolved.condition}\n\t\t\t\t\t\t\t\texpression={renderExpression(step.params.condition)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.condition)}</Code>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Condition Step</Label>\n\t\t\t\t\t\t<Code>{step.params.conditionStepId}</Code>\n\t\t\t\t\t</div>\n\t\t\t\t\t{step.params.maxAttempts && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Label>Max Attempts</Label>\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.maxAttempts)}</Code>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{step.params.intervalMs && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Label>Interval</Label>\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.intervalMs)}ms</Code>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{step.params.timeoutMs && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Label>Timeout</Label>\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.timeoutMs)}ms</Code>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"agent-loop\":\n\t\t\treturn (\n\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Instructions</Label>\n\t\t\t\t\t\t<pre className=\"text-xs rounded p-2 whitespace-pre-wrap font-mono text-foreground bg-muted\">\n\t\t\t\t\t\t\t{step.params.instructions}\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</div>\n\t\t\t\t\t{step.params.tools.length > 0 && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Label>Tools</Label>\n\t\t\t\t\t\t\t<Code>{step.params.tools.join(\", \")}</Code>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Output Format</Label>\n\t\t\t\t\t\t<Code>{JSON.stringify(step.params.outputFormat, null, 2)}</Code>\n\t\t\t\t\t</div>\n\t\t\t\t\t{step.params.maxSteps && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Label>Max Steps</Label>\n\t\t\t\t\t\t\t<Code>{renderExpression(step.params.maxSteps)}</Code>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\tcase \"start\":\n\t\t\treturn null;\n\n\t\tcase \"end\":\n\t\t\tif (step.params?.output) {\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Label>Output</Label>\n\t\t\t\t\t\t\t{resolved?.output !== undefined ? (\n\t\t\t\t\t\t\t\t<ResolvedCode\n\t\t\t\t\t\t\t\t\tvalue={resolved.output}\n\t\t\t\t\t\t\t\t\texpression={renderExpression(step.params.output)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Code>{renderExpression(step.params.output)}</Code>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t}\n}\n\nfunction Label({ children }: { children: React.ReactNode }) {\n\treturn (\n\t\t<div className=\"text-[11px] font-medium uppercase tracking-wide mb-0.5 text-muted-foreground\">\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\nfunction Code({ children }: { children: React.ReactNode }) {\n\treturn (\n\t\t<pre className=\"text-xs rounded p-2 whitespace-pre-wrap font-mono overflow-auto max-h-[200px] text-foreground bg-muted\">\n\t\t\t{children}\n\t\t</pre>\n\t);\n}\n\nfunction formatPathSegment(seg: ExecutionPathSegment): string {\n\tswitch (seg.type) {\n\t\tcase \"for-each\":\n\t\t\treturn `Iteration ${seg.iterationIndex}: ${formatValue(seg.itemValue)}`;\n\t\tcase \"switch-case\":\n\t\t\treturn `Case ${seg.matchedCaseIndex}: ${formatValue(seg.matchedValue)}`;\n\t\tcase \"wait-for-condition\":\n\t\t\treturn `Poll attempt ${seg.pollAttempt}`;\n\t}\n}\n\nfunction formatValue(value: unknown): string {\n\tif (typeof value === \"string\") return value;\n\treturn JSON.stringify(value);\n}\n\nconst recordStatusColors: Record<string, string> = {\n\tpending: \"bg-muted text-muted-foreground\",\n\trunning: \"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-400\",\n\tcompleted:\n\t\t\"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-400\",\n\tfailed: \"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400\",\n\tskipped: \"bg-muted text-muted-foreground\",\n};\n\nfunction ExecutionRecordCard({ record }: { record: StepExecutionRecord }) {\n\tconst pathLabel =\n\t\trecord.path.length > 0\n\t\t\t? record.path.map(formatPathSegment).join(\" > \")\n\t\t\t: null;\n\n\treturn (\n\t\t<div className=\"border border-border rounded-md p-2 space-y-1.5\">\n\t\t\t{pathLabel && (\n\t\t\t\t<div className=\"text-[11px] font-medium text-muted-foreground\">\n\t\t\t\t\t{pathLabel}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t<span\n\t\t\t\t\tclassName={`text-[11px] font-medium px-2 py-0.5 rounded-full ${recordStatusColors[record.status]}`}\n\t\t\t\t>\n\t\t\t\t\t{record.status}\n\t\t\t\t</span>\n\t\t\t\t{record.durationMs !== undefined && (\n\t\t\t\t\t<span className=\"text-[11px] text-muted-foreground\">\n\t\t\t\t\t\t{record.durationMs}ms\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t{record.retries.length > 0 && (\n\t\t\t\t\t<span className=\"text-[11px] text-amber-600 dark:text-amber-400\">\n\t\t\t\t\t\t{record.retries.length}{\" \"}\n\t\t\t\t\t\t{record.retries.length === 1 ? \"retry\" : \"retries\"}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{record.resolvedInputs !== undefined && (\n\t\t\t\t<details className=\"text-xs\">\n\t\t\t\t\t<summary className=\"text-[11px] font-medium text-muted-foreground uppercase tracking-wide cursor-pointer select-none\">\n\t\t\t\t\t\tResolved Inputs\n\t\t\t\t\t</summary>\n\t\t\t\t\t<ResolvedCode value={record.resolvedInputs} />\n\t\t\t\t</details>\n\t\t\t)}\n\t\t\t{record.output !== undefined && (\n\t\t\t\t<details className=\"text-xs\">\n\t\t\t\t\t<summary className=\"text-[11px] font-medium text-muted-foreground uppercase tracking-wide cursor-pointer select-none\">\n\t\t\t\t\t\tOutput\n\t\t\t\t\t</summary>\n\t\t\t\t\t<Code>\n\t\t\t\t\t\t{typeof record.output === \"string\"\n\t\t\t\t\t\t\t? record.output\n\t\t\t\t\t\t\t: JSON.stringify(record.output, null, 2)}\n\t\t\t\t\t</Code>\n\t\t\t\t</details>\n\t\t\t)}\n\t\t\t{record.error && (\n\t\t\t\t<div className=\"text-xs p-2 rounded bg-red-50 text-red-700 border border-red-200 dark:bg-red-900/30 dark:text-red-400 dark:border-red-800\">\n\t\t\t\t\t<div className=\"font-medium font-mono\">{record.error.code}</div>\n\t\t\t\t\t<div className=\"mt-0.5\">{record.error.message}</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport function StepDetailPanel({\n\tstep,\n\tdiagnostics,\n\texecutionSummary,\n\texecutionRecords,\n\tonClose,\n}: StepDetailPanelProps) {\n\treturn (\n\t\t<div className=\"w-[340px] border-l h-full min-h-0 overflow-y-auto shadow-lg bg-card border-border\">\n\t\t\t<div className=\"sticky top-0 border-b px-4 py-3 flex items-center justify-between bg-card border-border\">\n\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t<TypeBadge type={step.type} />\n\t\t\t\t\t<span className=\"font-medium text-sm truncate text-foreground\">\n\t\t\t\t\t\t{step.name}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonClick={onClose}\n\t\t\t\t\tclassName=\"text-lg leading-none text-muted-foreground hover:text-foreground\"\n\t\t\t\t>\n\t\t\t\t\t&times;\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div className=\"px-4 py-3 space-y-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<Label>Step ID</Label>\n\t\t\t\t\t<div className=\"text-xs font-mono text-muted-foreground\">\n\t\t\t\t\t\t{step.id}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div>\n\t\t\t\t\t<Label>Description</Label>\n\t\t\t\t\t<div className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\t{step.description}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{step.nextStepId && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Label>Next Step</Label>\n\t\t\t\t\t\t<div className=\"text-xs font-mono text-muted-foreground\">\n\t\t\t\t\t\t\t{step.nextStepId}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"border-t pt-3 border-border\">\n\t\t\t\t\t<Label>Parameters</Label>\n\t\t\t\t\t<div className=\"mt-1\">\n\t\t\t\t\t\t<StepParams\n\t\t\t\t\t\t\tstep={step}\n\t\t\t\t\t\t\tresolvedInputs={\n\t\t\t\t\t\t\t\texecutionRecords?.length\n\t\t\t\t\t\t\t\t\t? executionRecords[executionRecords.length - 1]\n\t\t\t\t\t\t\t\t\t\t\t?.resolvedInputs\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{executionSummary && (\n\t\t\t\t\t<div className=\"border-t border-border pt-3\">\n\t\t\t\t\t\t<Label>Execution</Label>\n\t\t\t\t\t\t<div className=\"mt-1 space-y-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t<StatusBadge summary={executionSummary} />\n\t\t\t\t\t\t\t\t{executionSummary.latestDurationMs !== undefined && (\n\t\t\t\t\t\t\t\t\t<span className=\"text-[11px] text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t{executionSummary.latestDurationMs}ms\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{executionSummary.executionCount > 1 && (\n\t\t\t\t\t\t\t\t\t<span className=\"text-[11px] text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t\t({executionSummary.completedCount}/\n\t\t\t\t\t\t\t\t\t\t{executionSummary.executionCount} iterations)\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{executionSummary.latestOutput !== undefined && (\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<Label>Output</Label>\n\t\t\t\t\t\t\t\t\t<Code>\n\t\t\t\t\t\t\t\t\t\t{typeof executionSummary.latestOutput === \"string\"\n\t\t\t\t\t\t\t\t\t\t\t? executionSummary.latestOutput\n\t\t\t\t\t\t\t\t\t\t\t: JSON.stringify(executionSummary.latestOutput, null, 2)}\n\t\t\t\t\t\t\t\t\t</Code>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{executionSummary.latestError && (\n\t\t\t\t\t\t\t\t<div className=\"text-xs p-2 rounded bg-red-50 text-red-700 border border-red-200 dark:bg-red-900/30 dark:text-red-400 dark:border-red-800\">\n\t\t\t\t\t\t\t\t\t<div className=\"font-medium font-mono\">\n\t\t\t\t\t\t\t\t\t\t{executionSummary.latestError.code}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"mt-0.5\">\n\t\t\t\t\t\t\t\t\t\t{executionSummary.latestError.message}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{executionSummary.totalRetries > 0 && (\n\t\t\t\t\t\t\t\t<div className=\"text-[11px] text-amber-600 dark:text-amber-400\">\n\t\t\t\t\t\t\t\t\t{executionSummary.totalRetries}{\" \"}\n\t\t\t\t\t\t\t\t\t{executionSummary.totalRetries === 1 ? \"retry\" : \"retries\"}{\" \"}\n\t\t\t\t\t\t\t\t\tattempted\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{executionRecords && executionRecords.length > 0 && (\n\t\t\t\t\t<div className=\"border-t border-border pt-3\">\n\t\t\t\t\t\t<Label>Execution History</Label>\n\t\t\t\t\t\t<div className=\"space-y-2 mt-1\">\n\t\t\t\t\t\t\t{executionRecords.map((record, i) => (\n\t\t\t\t\t\t\t\t<ExecutionRecordCard\n\t\t\t\t\t\t\t\t\tkey={`${record.stepId}-${i}`}\n\t\t\t\t\t\t\t\t\trecord={record}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{diagnostics.length > 0 && (\n\t\t\t\t\t<div className=\"border-t pt-3 border-border\">\n\t\t\t\t\t\t<Label>Diagnostics</Label>\n\t\t\t\t\t\t<div className=\"space-y-2 mt-1\">\n\t\t\t\t\t\t\t{diagnostics.map((d) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={`${d.code}-${d.message}`}\n\t\t\t\t\t\t\t\t\tclassName={`text-xs p-2 rounded ${\n\t\t\t\t\t\t\t\t\t\td.severity === \"error\"\n\t\t\t\t\t\t\t\t\t\t\t? \"bg-red-50 text-red-700 border border-red-200 dark:bg-red-900/30 dark:text-red-400 dark:border-red-800\"\n\t\t\t\t\t\t\t\t\t\t\t: \"bg-amber-50 text-amber-700 border border-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:border-amber-800\"\n\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"font-medium font-mono\">{d.code}</div>\n\t\t\t\t\t\t\t\t\t<div className=\"mt-0.5\">{d.message}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n",
8
+ "import { useEffect, useMemo, useState } from \"react\";\n\n/**\n * Detects dark mode by observing the `dark` class on `<html>`,\n * following the shadcn/Tailwind convention (`darkMode: \"class\"`).\n */\nexport function useDarkMode(): boolean {\n\tconst [dark, setDark] = useState(\n\t\t() =>\n\t\t\ttypeof document !== \"undefined\" &&\n\t\t\tdocument.documentElement.classList.contains(\"dark\"),\n\t);\n\n\tuseEffect(() => {\n\t\tconst el = document.documentElement;\n\t\tconst observer = new MutationObserver(() => {\n\t\t\tsetDark(el.classList.contains(\"dark\"));\n\t\t});\n\t\tobserver.observe(el, { attributes: true, attributeFilter: [\"class\"] });\n\t\tsetDark(el.classList.contains(\"dark\"));\n\t\treturn () => observer.disconnect();\n\t}, []);\n\n\treturn dark;\n}\n\n/**\n * Resolves a CSS custom property to a usable color string.\n * Handles both shadcn v0 (space-separated HSL components) and\n * v2 (complete color values) formats.\n */\nfunction resolveCssColor(varName: string, fallback: string): string {\n\tif (typeof document === \"undefined\") return fallback;\n\tconst raw = getComputedStyle(document.documentElement)\n\t\t.getPropertyValue(varName)\n\t\t.trim();\n\tif (!raw) return fallback;\n\tif (/^\\d/.test(raw) && !raw.startsWith(\"0x\")) {\n\t\treturn `hsl(${raw})`;\n\t}\n\treturn raw;\n}\n\n/**\n * Returns resolved theme colors from shadcn CSS custom properties,\n * with sensible fallbacks for apps that don't define them.\n * Re-resolves automatically when dark mode toggles.\n */\nexport function useThemeColors() {\n\tconst dark = useDarkMode();\n\n\treturn useMemo(() => {\n\t\tconst resolve = (v: string, fb: string) => resolveCssColor(v, fb);\n\t\treturn {\n\t\t\tdark,\n\t\t\tborder: resolve(\"--border\", dark ? \"#374151\" : \"#e5e7eb\"),\n\t\t\tmutedForeground: resolve(\n\t\t\t\t\"--muted-foreground\",\n\t\t\t\tdark ? \"#9ca3af\" : \"#6b7280\",\n\t\t\t),\n\t\t\tcard: resolve(\"--card\", dark ? \"#1f2937\" : \"#ffffff\"),\n\t\t};\n\t}, [dark]);\n}\n",
9
+ "import type {\n\tDiagnostic,\n\tExecutionState,\n\tStepExecutionRecord,\n\tWorkflowDefinition,\n\tWorkflowStep,\n} from \"@remoraflow/core\";\nimport {\n\tBackground,\n\tControls,\n\ttype EdgeTypes,\n\tMiniMap,\n\ttype NodeTypes,\n\tReactFlow,\n\tuseEdgesState,\n\tuseNodesState,\n} from \"@xyflow/react\";\nimport type React from \"react\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { WorkflowEdge } from \"./edges/workflow-edge\";\nimport type { StepExecutionSummary } from \"./execution-state\";\nimport { buildLayout, type StepNodeData } from \"./graph-layout\";\nimport { AgentLoopNode } from \"./nodes/agent-loop-node\";\nimport { EndNode } from \"./nodes/end-node\";\nimport { ExtractDataNode } from \"./nodes/extract-data-node\";\nimport { ForEachNode } from \"./nodes/for-each-node\";\nimport { GroupHeaderNode } from \"./nodes/group-header-node\";\nimport { LlmPromptNode } from \"./nodes/llm-prompt-node\";\nimport { SleepNode } from \"./nodes/sleep-node\";\nimport { StartNode } from \"./nodes/start-node\";\nimport { StartStepNode } from \"./nodes/start-step-node\";\nimport { SwitchCaseNode } from \"./nodes/switch-case-node\";\nimport { ToolCallNode } from \"./nodes/tool-call-node\";\nimport { WaitForConditionNode } from \"./nodes/wait-for-condition-node\";\nimport { StepDetailPanel } from \"./panels/step-detail-panel\";\nimport { useThemeColors } from \"./theme\";\n\nconst nodeTypes: NodeTypes = {\n\ttoolCall: ToolCallNode,\n\tllmPrompt: LlmPromptNode,\n\textractData: ExtractDataNode,\n\tswitchCase: SwitchCaseNode,\n\tgroupHeader: GroupHeaderNode,\n\tforEach: ForEachNode,\n\tend: EndNode,\n\tstart: StartNode,\n\tstartStep: StartStepNode,\n\tsleep: SleepNode,\n\twaitForCondition: WaitForConditionNode,\n\tagentLoop: AgentLoopNode,\n};\n\nconst edgeTypes: EdgeTypes = {\n\tworkflow: WorkflowEdge,\n};\n\nconst EMPTY_DIAGNOSTICS: Diagnostic[] = [];\n\n/** Props for the {@link WorkflowViewer} component. */\nexport interface WorkflowViewerProps {\n\t/** The workflow definition to visualize. */\n\tworkflow: WorkflowDefinition;\n\t/** Compiler diagnostics to display on affected nodes. */\n\tdiagnostics?: Diagnostic[];\n\t/** Called when a step node is clicked (with the step and its diagnostics) or when the selection is cleared (with `null`). */\n\tonStepSelect?: (step: WorkflowStep | null, diagnostics: Diagnostic[]) => void;\n\t/** Execution state to visualize on the workflow DAG. */\n\texecutionState?: ExecutionState;\n\t/** Whether to show the minimap. @default true */\n\tshowMinimap?: boolean;\n\t/** Width of the minimap in pixels (capped at 25% of viewer width). @default 200 */\n\tminimapWidth?: number;\n\t/** Height of the minimap in pixels. @default 150 */\n\tminimapHeight?: number;\n}\n\n/**\n * React component that renders a workflow as an interactive DAG using React Flow.\n * Supports step selection via callback, minimap, and zoom controls.\n *\n * Dark mode is detected automatically via the `dark` class on `<html>`,\n * following the shadcn/Tailwind convention (`darkMode: \"class\"`).\n *\n * Requires `@xyflow/react` as a peer dependency.\n *\n * @example\n * ```tsx\n * import { WorkflowViewer } from \"remora/viewer\";\n *\n * <WorkflowViewer\n * workflow={myWorkflow}\n * diagnostics={compileResult.diagnostics}\n * executionState={executionState}\n * onStepSelect={(step, diagnostics) => console.log(\"Selected:\", step?.id)}\n * />\n * ```\n */\nexport function WorkflowViewer({\n\tworkflow,\n\tdiagnostics = EMPTY_DIAGNOSTICS,\n\tonStepSelect,\n\texecutionState,\n\tshowMinimap = true,\n\tminimapWidth = 200,\n\tminimapHeight = 150,\n}: WorkflowViewerProps) {\n\tconst theme = useThemeColors();\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst [containerWidth, setContainerWidth] = useState(0);\n\tconst layout = useMemo(\n\t\t() => buildLayout(workflow, diagnostics, executionState),\n\t\t[workflow, diagnostics, executionState],\n\t);\n\n\tconst [nodes, setNodes, onNodesChange] = useNodesState(layout.nodes);\n\tconst [edges, setEdges, onEdgesChange] = useEdgesState(layout.edges);\n\tconst [selectedStep, setSelectedStep] = useState<WorkflowStep | null>(null);\n\tconst [selectedDiagnostics, setSelectedDiagnostics] =\n\t\tuseState<Diagnostic[]>(EMPTY_DIAGNOSTICS);\n\tconst [selectedExecutionSummary, setSelectedExecutionSummary] = useState<\n\t\tStepExecutionSummary | undefined\n\t>();\n\tconst [selectedExecutionRecords, setSelectedExecutionRecords] = useState<\n\t\tStepExecutionRecord[] | undefined\n\t>();\n\n\tuseEffect(() => {\n\t\tsetNodes(layout.nodes);\n\t\tsetEdges(layout.edges);\n\t}, [layout, setNodes, setEdges]);\n\n\tuseEffect(() => {\n\t\tconst el = containerRef.current;\n\t\tif (!el) return;\n\t\tconst observer = new ResizeObserver((entries) => {\n\t\t\tconst entry = entries[0];\n\t\t\tif (entry) setContainerWidth(entry.contentRect.width);\n\t\t});\n\t\tobserver.observe(el);\n\t\treturn () => observer.disconnect();\n\t}, []);\n\n\tconst effectiveMinimapWidth =\n\t\tcontainerWidth > 0\n\t\t\t? Math.min(minimapWidth, containerWidth * 0.25)\n\t\t\t: minimapWidth;\n\tconst effectiveMinimapHeight =\n\t\tminimapHeight * (effectiveMinimapWidth / minimapWidth);\n\n\tconst onNodeClick = useCallback(\n\t\t(_: React.MouseEvent, node: { id: string; data: unknown }) => {\n\t\t\tconst data = node.data as StepNodeData;\n\t\t\tif (!data.step) return;\n\t\t\tsetSelectedStep(data.step);\n\t\t\tsetSelectedDiagnostics(data.diagnostics);\n\t\t\tsetSelectedExecutionSummary(data.executionSummary);\n\t\t\tsetSelectedExecutionRecords(\n\t\t\t\texecutionState?.stepRecords.filter(\n\t\t\t\t\t(r: StepExecutionRecord) => r.stepId === data.step.id,\n\t\t\t\t),\n\t\t\t);\n\t\t\tonStepSelect?.(data.step, data.diagnostics);\n\t\t},\n\t\t[onStepSelect, executionState],\n\t);\n\n\tconst onPaneClick = useCallback(() => {\n\t\tsetSelectedStep(null);\n\t\tsetSelectedDiagnostics([]);\n\t\tsetSelectedExecutionSummary(undefined);\n\t\tsetSelectedExecutionRecords(undefined);\n\t\tonStepSelect?.(null, []);\n\t}, [onStepSelect]);\n\n\treturn (\n\t\t<div className=\"flex h-full w-full min-h-0\">\n\t\t\t<div ref={containerRef} className=\"flex-1 relative\">\n\t\t\t\t<ReactFlow\n\t\t\t\t\tnodes={nodes}\n\t\t\t\t\tedges={edges}\n\t\t\t\t\tonNodesChange={onNodesChange}\n\t\t\t\t\tonEdgesChange={onEdgesChange}\n\t\t\t\t\tonNodeClick={onNodeClick}\n\t\t\t\t\tonPaneClick={onPaneClick}\n\t\t\t\t\tnodeTypes={nodeTypes}\n\t\t\t\t\tedgeTypes={edgeTypes}\n\t\t\t\t\tfitView\n\t\t\t\t\tfitViewOptions={{ padding: 0.2 }}\n\t\t\t\t\tnodesDraggable={false}\n\t\t\t\t\tdefaultEdgeOptions={{\n\t\t\t\t\t\ttype: \"workflow\",\n\t\t\t\t\t}}\n\t\t\t\t\tproOptions={{ hideAttribution: true }}\n\t\t\t\t\tcolorMode={theme.dark ? \"dark\" : \"light\"}\n\t\t\t\t>\n\t\t\t\t\t<Background color={theme.border} gap={16} />\n\t\t\t\t\t<Controls showInteractive={false} />\n\t\t\t\t\t{showMinimap && (\n\t\t\t\t\t\t<MiniMap\n\t\t\t\t\t\t\tnodeStrokeWidth={2}\n\t\t\t\t\t\t\tpannable\n\t\t\t\t\t\t\tzoomable\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\twidth: effectiveMinimapWidth,\n\t\t\t\t\t\t\t\theight: effectiveMinimapHeight,\n\t\t\t\t\t\t\t\tborder: `1px solid ${theme.border}`,\n\t\t\t\t\t\t\t\tbackgroundColor: theme.card,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tnodeColor={theme.mutedForeground}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</ReactFlow>\n\t\t\t</div>\n\t\t\t{selectedStep && (\n\t\t\t\t<StepDetailPanel\n\t\t\t\t\tstep={selectedStep}\n\t\t\t\t\tdiagnostics={selectedDiagnostics}\n\t\t\t\t\texecutionSummary={selectedExecutionSummary}\n\t\t\t\t\texecutionRecords={selectedExecutionRecords}\n\t\t\t\t\tonClose={() => {\n\t\t\t\t\t\tsetSelectedStep(null);\n\t\t\t\t\t\tsetSelectedDiagnostics([]);\n\t\t\t\t\t\tsetSelectedExecutionSummary(undefined);\n\t\t\t\t\t\tsetSelectedExecutionRecords(undefined);\n\t\t\t\t\t\tonStepSelect?.(null, []);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n",
10
+ "import {\n\tBaseEdge,\n\tEdgeLabelRenderer,\n\ttype EdgeProps,\n\tgetBezierPath,\n} from \"@xyflow/react\";\nimport { useThemeColors } from \"../theme\";\n\nexport function WorkflowEdge({\n\tid,\n\tsourceX,\n\tsourceY,\n\ttargetX,\n\ttargetY,\n\tsourcePosition,\n\ttargetPosition,\n\tlabel,\n\tdata,\n\tmarkerEnd,\n\tstyle,\n}: EdgeProps) {\n\tconst theme = useThemeColors();\n\tconst edgeKind = (data?.edgeKind as string) ?? \"sequential\";\n\tconst isContinuation = edgeKind === \"continuation\";\n\tconst isExecuted = data?.executed === true;\n\tconst hasExecutionState = data?.hasExecutionState === true;\n\n\tconst [edgePath, labelX, labelY] = getBezierPath({\n\t\tsourceX,\n\t\tsourceY,\n\t\tsourcePosition,\n\t\ttargetX,\n\t\ttargetY,\n\t\ttargetPosition,\n\t});\n\n\tlet stroke = theme.mutedForeground;\n\tlet strokeWidth = 1.5;\n\tlet opacity = isContinuation ? 0.5 : 1;\n\n\tif (hasExecutionState) {\n\t\tif (isExecuted) {\n\t\t\tstroke = \"#22c55e\";\n\t\t\tstrokeWidth = 2.5;\n\t\t\topacity = 1;\n\t\t} else {\n\t\t\topacity = 0.3;\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BaseEdge\n\t\t\t\tid={id}\n\t\t\t\tpath={edgePath}\n\t\t\t\tmarkerEnd={markerEnd}\n\t\t\t\tstyle={{\n\t\t\t\t\t...style,\n\t\t\t\t\tstrokeDasharray: isContinuation ? \"6 3\" : undefined,\n\t\t\t\t\tstroke,\n\t\t\t\t\tstrokeWidth,\n\t\t\t\t\topacity,\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{label && (\n\t\t\t\t<EdgeLabelRenderer>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\t\ttransform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,\n\t\t\t\t\t\t\tpointerEvents: \"all\",\n\t\t\t\t\t\t\tzIndex: 10,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tclassName=\"px-1.5 py-0.5 rounded text-[10px] font-medium border-2 shadow whitespace-nowrap transition-colors duration-150 bg-card text-foreground border-border hover:border-foreground\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{label}\n\t\t\t\t\t</div>\n\t\t\t\t</EdgeLabelRenderer>\n\t\t\t)}\n\t\t</>\n\t);\n}\n",
11
+ "import type { Diagnostic } from \"@remoraflow/core\";\nimport { Handle, Position } from \"@xyflow/react\";\nimport type { ReactNode } from \"react\";\nimport type { StepExecutionSummary } from \"../execution-state\";\n\ninterface BaseNodeProps {\n\tid: string;\n\tname: string;\n\ttypeLabel: string;\n\ttypeLabelColor: string;\n\taccent: string;\n\tdescription: string;\n\tdiagnostics: Diagnostic[];\n\tchildren?: ReactNode;\n\tselected?: boolean;\n\thasSourceEdge?: boolean;\n\thasTargetEdge?: boolean;\n\texecutionSummary?: StepExecutionSummary;\n}\n\nfunction StatusIcon({ status }: { status: string }) {\n\tswitch (status) {\n\t\tcase \"running\":\n\t\t\treturn (\n\t\t\t\t<span className=\"inline-block w-3.5 h-3.5 rounded-full border-2 border-blue-400 border-t-transparent animate-spin shrink-0\" />\n\t\t\t);\n\t\tcase \"completed\":\n\t\t\treturn (\n\t\t\t\t<svg\n\t\t\t\t\tclassName=\"w-3.5 h-3.5 text-green-500 shrink-0\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t>\n\t\t\t\t\t<title>Completed</title>\n\t\t\t\t\t<path d=\"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z\" />\n\t\t\t\t</svg>\n\t\t\t);\n\t\tcase \"failed\":\n\t\t\treturn (\n\t\t\t\t<svg\n\t\t\t\t\tclassName=\"w-3.5 h-3.5 text-red-500 shrink-0\"\n\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t>\n\t\t\t\t\t<title>Failed</title>\n\t\t\t\t\t<path d=\"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.75.75 0 1 1 1.06 1.06L9.06 8l3.22 3.22a.75.75 0 1 1-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 0 1-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z\" />\n\t\t\t\t</svg>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\nexport function BaseNode({\n\tid,\n\tname,\n\ttypeLabel,\n\ttypeLabelColor,\n\taccent,\n\tdescription,\n\tdiagnostics,\n\tchildren,\n\tselected,\n\thasSourceEdge = true,\n\thasTargetEdge = true,\n\texecutionSummary,\n}: BaseNodeProps) {\n\tconst hasErrors = diagnostics.some((d) => d.severity === \"error\");\n\tconst hasWarnings =\n\t\t!hasErrors && diagnostics.some((d) => d.severity === \"warning\");\n\n\tlet ringClass = \"\";\n\tlet opacityClass = \"\";\n\tif (executionSummary) {\n\t\tswitch (executionSummary.status) {\n\t\t\tcase \"running\":\n\t\t\t\tringClass = \"ring-2 ring-blue-400 animate-pulse\";\n\t\t\t\tbreak;\n\t\t\tcase \"completed\":\n\t\t\t\tringClass = \"ring-2 ring-green-400\";\n\t\t\t\tbreak;\n\t\t\tcase \"failed\":\n\t\t\t\tringClass = \"ring-2 ring-red-500\";\n\t\t\t\tbreak;\n\t\t\tcase \"skipped\":\n\t\t\t\topacityClass = \"opacity-50\";\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\tif (hasErrors) ringClass = \"ring-2 ring-red-500\";\n\t\telse if (hasWarnings) ringClass = \"ring-2 ring-amber-400\";\n\t\telse if (selected) ringClass = \"ring-2 ring-blue-400\";\n\t}\n\n\tconst hasRing = hasErrors || hasWarnings || selected || !!executionSummary;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`rounded-lg shadow-md border-l-4 w-[300px] transition-shadow duration-150 bg-card ${ringClass} ${opacityClass} ${hasRing ? \"\" : \"hover:ring-2 hover:ring-ring\"}`}\n\t\t\tstyle={{ borderLeftColor: accent }}\n\t\t>\n\t\t\t{hasTargetEdge && (\n\t\t\t\t<Handle\n\t\t\t\t\ttype=\"target\"\n\t\t\t\t\tposition={Position.Top}\n\t\t\t\t\tclassName=\"!w-2 !h-2 !bg-muted-foreground\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div className=\"px-3 py-2.5\">\n\t\t\t\t<div className=\"flex items-center justify-between gap-2\">\n\t\t\t\t\t<div className=\"flex items-center gap-2 min-w-0\">\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-[10px] font-semibold uppercase tracking-wide shrink-0 ${typeLabelColor}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{typeLabel}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div className=\"font-medium text-sm truncate text-foreground\">\n\t\t\t\t\t\t\t{name}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex items-center gap-1.5 shrink-0\">\n\t\t\t\t\t\t{executionSummary && executionSummary.totalRetries > 0 && (\n\t\t\t\t\t\t\t<span className=\"text-[10px] px-1 py-0.5 rounded bg-amber-100 text-amber-600 dark:bg-amber-900/50 dark:text-amber-400 font-medium\">\n\t\t\t\t\t\t\t\t{executionSummary.totalRetries}{\" \"}\n\t\t\t\t\t\t\t\t{executionSummary.totalRetries === 1 ? \"retry\" : \"retries\"}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{executionSummary && (\n\t\t\t\t\t\t\t<StatusIcon status={executionSummary.status} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(hasErrors || hasWarnings) && (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={`text-xs px-1.5 py-0.5 rounded-full font-medium ${\n\t\t\t\t\t\t\t\t\thasErrors\n\t\t\t\t\t\t\t\t\t\t? \"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400\"\n\t\t\t\t\t\t\t\t\t\t: \"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-400\"\n\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{diagnostics.length}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"text-[11px] font-mono text-muted-foreground\">{id}</div>\n\t\t\t\t<div className=\"text-[11px] mt-1 text-muted-foreground\">\n\t\t\t\t\t{description}\n\t\t\t\t</div>\n\t\t\t\t{children && (\n\t\t\t\t\t<div className=\"mt-2 border-t pt-2 border-border\">{children}</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{hasSourceEdge && (\n\t\t\t\t<Handle\n\t\t\t\t\ttype=\"source\"\n\t\t\t\t\tposition={Position.Bottom}\n\t\t\t\t\tclassName=\"!w-2 !h-2 !bg-muted-foreground\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n",
12
+ "import type { NodeProps } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nexport function AgentLoopNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, hasSourceEdge } = data as unknown as StepNodeData;\n\tif (step.type !== \"agent-loop\") return null;\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"Agent\"\n\t\t\ttypeLabelColor=\"text-teal-500\"\n\t\t\taccent=\"#14b8a6\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t>\n\t\t\t<div className=\"text-[11px] text-muted-foreground italic line-clamp-2 bg-muted rounded p-1.5 font-mono\">\n\t\t\t\t{step.params.instructions}\n\t\t\t</div>\n\t\t\t{step.params.tools.length > 0 && (\n\t\t\t\t<div className=\"mt-1.5 flex gap-1.5 text-[11px]\">\n\t\t\t\t\t<span className=\"text-muted-foreground shrink-0\">tools:</span>\n\t\t\t\t\t<span className=\"font-mono text-muted-foreground truncate\">\n\t\t\t\t\t\t{step.params.tools.join(\", \")}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</BaseNode>\n\t);\n}\n",
13
+ "import type { NodeProps } from \"@xyflow/react\";\nimport { Handle, Position } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nfunction renderExpr(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nexport function EndNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, executionSummary, outputSchema } =\n\t\tdata as unknown as StepNodeData;\n\n\tconst schema = outputSchema as\n\t\t| { properties?: Record<string, { type?: string }> }\n\t\t| undefined;\n\tconst schemaProperties = schema?.properties\n\t\t? Object.entries(schema.properties)\n\t\t: [];\n\n\tif (\n\t\tstep?.type === \"end\" &&\n\t\t(step.params?.output || schemaProperties.length > 0)\n\t) {\n\t\treturn (\n\t\t\t<BaseNode\n\t\t\t\tid={step.id}\n\t\t\t\tname={step.name}\n\t\t\t\ttypeLabel=\"End\"\n\t\t\t\ttypeLabelColor=\"text-muted-foreground\"\n\t\t\t\taccent=\"#6b7280\"\n\t\t\t\tdescription={step.description}\n\t\t\t\tdiagnostics={diagnostics}\n\t\t\t\tselected={selected}\n\t\t\t\thasSourceEdge={false}\n\t\t\t\texecutionSummary={executionSummary}\n\t\t\t>\n\t\t\t\t{step.params?.output && (\n\t\t\t\t\t<div className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t\t\t<span className=\"text-muted-foreground shrink-0\">output:</span>\n\t\t\t\t\t\t<span className=\"font-mono text-muted-foreground truncate\">\n\t\t\t\t\t\t\t{renderExpr(step.params.output)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{schemaProperties.length > 0 && (\n\t\t\t\t\t<div className=\"mt-1 space-y-0.5\">\n\t\t\t\t\t\t<div className=\"text-[10px] text-muted-foreground uppercase tracking-wide font-semibold\">\n\t\t\t\t\t\t\tOutput Schema\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{schemaProperties.map(([key, val]) => (\n\t\t\t\t\t\t\t<div key={key} className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground font-medium shrink-0\">\n\t\t\t\t\t\t\t\t\t{key}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t\t\t\t{val?.type}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</BaseNode>\n\t\t);\n\t}\n\n\tconst hasErrors = diagnostics?.some((d) => d.severity === \"error\");\n\n\tlet ringClass = \"\";\n\tif (executionSummary) {\n\t\tswitch (executionSummary.status) {\n\t\t\tcase \"running\":\n\t\t\t\tringClass = \"ring-2 ring-blue-400 animate-pulse\";\n\t\t\t\tbreak;\n\t\t\tcase \"completed\":\n\t\t\t\tringClass = \"ring-2 ring-green-400\";\n\t\t\t\tbreak;\n\t\t\tcase \"failed\":\n\t\t\t\tringClass = \"ring-2 ring-red-500\";\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\tif (hasErrors) ringClass = \"ring-2 ring-red-500\";\n\t\telse if (selected) ringClass = \"ring-2 ring-blue-400\";\n\t}\n\n\tconst hasRing = hasErrors || selected || !!executionSummary;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`rounded-full w-[60px] h-[60px] flex items-center justify-center shadow-sm border transition-all duration-150 bg-muted border-border hover:bg-accent ${hasRing ? ringClass : \"hover:ring-2 hover:ring-ring\"}`}\n\t\t>\n\t\t\t<Handle\n\t\t\t\ttype=\"target\"\n\t\t\t\tposition={Position.Top}\n\t\t\t\tclassName=\"!w-2 !h-2 !bg-muted-foreground\"\n\t\t\t/>\n\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">End</span>\n\t\t</div>\n\t);\n}\n",
14
+ "import type { NodeProps } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nfunction renderExpr(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nexport function ExtractDataNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, hasSourceEdge, executionSummary } =\n\t\tdata as unknown as StepNodeData;\n\tif (step.type !== \"extract-data\") return null;\n\n\tconst outputFormat = step.params.outputFormat as\n\t\t| { properties?: Record<string, unknown> }\n\t\t| undefined;\n\tconst outputKeys = outputFormat?.properties\n\t\t? Object.keys(outputFormat.properties)\n\t\t: [];\n\n\tconst resolved = executionSummary?.latestResolvedInputs as\n\t\t| Record<string, unknown>\n\t\t| undefined;\n\tconst hasSourceResolved = resolved?.sourceData !== undefined;\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"Extract\"\n\t\t\ttypeLabelColor=\"text-purple-500\"\n\t\t\taccent=\"#a855f7\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t\texecutionSummary={executionSummary}\n\t\t>\n\t\t\t<div className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t<span className=\"text-muted-foreground shrink-0\">source:</span>\n\t\t\t\t<span\n\t\t\t\t\tclassName={`font-mono truncate ${hasSourceResolved ? \"text-emerald-700 dark:text-emerald-400\" : \"text-muted-foreground\"}`}\n\t\t\t\t\ttitle={\n\t\t\t\t\t\thasSourceResolved ? renderExpr(step.params.sourceData) : undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{hasSourceResolved\n\t\t\t\t\t\t? typeof resolved.sourceData === \"string\"\n\t\t\t\t\t\t\t? resolved.sourceData\n\t\t\t\t\t\t\t: JSON.stringify(resolved.sourceData)\n\t\t\t\t\t\t: renderExpr(step.params.sourceData)}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t{outputKeys.length > 0 && (\n\t\t\t\t<div className=\"mt-1 flex gap-1.5 text-[11px]\">\n\t\t\t\t\t<span className=\"text-muted-foreground shrink-0\">output:</span>\n\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t{outputKeys.join(\", \")}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</BaseNode>\n\t);\n}\n",
15
+ "import type { NodeProps } from \"@xyflow/react\";\nimport { Handle, Position } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nfunction renderExpr(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nexport function ForEachNode({ data, selected }: NodeProps) {\n\tconst {\n\t\tstep,\n\t\tdiagnostics,\n\t\tisGroup,\n\t\tgroupWidth,\n\t\tgroupHeight,\n\t\thasSourceEdge,\n\t\texecutionSummary,\n\t} = data as unknown as StepNodeData & {\n\t\tisGroup?: boolean;\n\t\tgroupWidth?: number;\n\t\tgroupHeight?: number;\n\t};\n\tif (step.type !== \"for-each\") return null;\n\n\tif (isGroup) {\n\t\tconst hasErrors = diagnostics.some((d) => d.severity === \"error\");\n\t\tconst hasWarnings =\n\t\t\t!hasErrors && diagnostics.some((d) => d.severity === \"warning\");\n\n\t\tlet ringClass = \"\";\n\t\tlet borderColor = \"border-emerald-300 dark:border-emerald-700\";\n\t\tif (executionSummary) {\n\t\t\tswitch (executionSummary.status) {\n\t\t\t\tcase \"running\":\n\t\t\t\t\tringClass = \"ring-2 ring-blue-400 animate-pulse\";\n\t\t\t\t\tborderColor = \"border-blue-300 dark:border-blue-700\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"completed\":\n\t\t\t\t\tringClass = \"ring-2 ring-green-400\";\n\t\t\t\t\tborderColor = \"border-green-400 dark:border-green-600\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"failed\":\n\t\t\t\t\tringClass = \"ring-2 ring-red-500\";\n\t\t\t\t\tborderColor = \"border-red-300 dark:border-red-700\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tif (hasErrors) ringClass = \"ring-2 ring-red-500\";\n\t\t\telse if (hasWarnings) ringClass = \"ring-2 ring-amber-400\";\n\t\t\telse if (selected) ringClass = \"ring-2 ring-emerald-400\";\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={`rounded-xl border-2 border-dashed transition-colors duration-150 ${borderColor} bg-emerald-50/30 hover:bg-emerald-50/60 hover:border-emerald-500 dark:bg-emerald-950/30 dark:hover:bg-emerald-950/50 dark:hover:border-emerald-500 ${ringClass}`}\n\t\t\t\tstyle={{ width: groupWidth, height: groupHeight }}\n\t\t\t>\n\t\t\t\t<Handle\n\t\t\t\t\ttype=\"target\"\n\t\t\t\t\tposition={Position.Top}\n\t\t\t\t\tclassName=\"!bg-emerald-500 !w-2.5 !h-2.5\"\n\t\t\t\t/>\n\t\t\t\t<div className=\"px-3 py-2 flex items-center gap-2\">\n\t\t\t\t\t<span className=\"text-[10px] font-semibold uppercase tracking-wide text-emerald-500\">\n\t\t\t\t\t\tLoop\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"text-sm font-medium truncate text-foreground\">\n\t\t\t\t\t\t{step.name}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t{hasSourceEdge && (\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"source\"\n\t\t\t\t\t\tposition={Position.Bottom}\n\t\t\t\t\t\tclassName=\"!bg-emerald-500 !w-2.5 !h-2.5\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Non-group fallback (for-each with no resolvable children)\n\tconst resolved = executionSummary?.latestResolvedInputs as\n\t\t| Record<string, unknown>\n\t\t| undefined;\n\tconst hasTargetResolved = resolved?.target !== undefined;\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"ForEach\"\n\t\t\ttypeLabelColor=\"text-emerald-500\"\n\t\t\taccent=\"#10b981\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t\texecutionSummary={executionSummary}\n\t\t>\n\t\t\t<div className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t<span className=\"text-muted-foreground shrink-0\">target:</span>\n\t\t\t\t<span\n\t\t\t\t\tclassName={`font-mono truncate ${hasTargetResolved ? \"text-emerald-700 dark:text-emerald-400\" : \"text-muted-foreground\"}`}\n\t\t\t\t\ttitle={hasTargetResolved ? renderExpr(step.params.target) : undefined}\n\t\t\t\t>\n\t\t\t\t\t{hasTargetResolved\n\t\t\t\t\t\t? `[${Array.isArray(resolved.target) ? resolved.target.length : \"?\"} items]`\n\t\t\t\t\t\t: renderExpr(step.params.target)}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div className=\"mt-0.5 flex gap-1.5 text-[11px]\">\n\t\t\t\t<span className=\"text-muted-foreground shrink-0\">as:</span>\n\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t{step.params.itemName}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</BaseNode>\n\t);\n}\n",
16
+ "import type { NodeProps } from \"@xyflow/react\";\nimport { Handle, Position } from \"@xyflow/react\";\n\ninterface GroupHeaderData {\n\tvariant: \"switch\" | \"loop\" | \"condition\";\n\tdescription: string;\n\t// switch\n\texpression?: string;\n\tresolvedExpression?: unknown;\n\t// loop\n\ttarget?: string;\n\tresolvedTarget?: unknown;\n\titemName?: string;\n\t// condition\n\tcondition?: string;\n}\n\nconst variantStyles = {\n\tswitch: {\n\t\tcontainer:\n\t\t\t\"bg-amber-50 dark:bg-amber-950/50 border-amber-300 dark:border-amber-700 hover:border-amber-500\",\n\t\tlabel: \"text-amber-600 dark:text-amber-400\",\n\t\tmono: \"text-amber-800 dark:text-amber-300\",\n\t\tresolved: \"text-emerald-700 dark:text-emerald-400\",\n\t\tdesc: \"text-amber-700/70 dark:text-amber-400/60\",\n\t\thandle: \"!bg-amber-500\",\n\t\tring: \"ring-amber-400\",\n\t},\n\tloop: {\n\t\tcontainer:\n\t\t\t\"bg-emerald-50 dark:bg-emerald-950/50 border-emerald-300 dark:border-emerald-700 hover:border-emerald-500\",\n\t\tlabel: \"text-emerald-600 dark:text-emerald-400\",\n\t\tmono: \"text-emerald-800 dark:text-emerald-300\",\n\t\tresolved: \"text-emerald-700 dark:text-emerald-400\",\n\t\tdesc: \"text-emerald-700/70 dark:text-emerald-400/60\",\n\t\thandle: \"!bg-emerald-500\",\n\t\tring: \"ring-emerald-400\",\n\t},\n\tcondition: {\n\t\tcontainer:\n\t\t\t\"bg-orange-50 dark:bg-orange-950/50 border-orange-300 dark:border-orange-700 hover:border-orange-500\",\n\t\tlabel: \"text-orange-600 dark:text-orange-400\",\n\t\tmono: \"text-orange-800 dark:text-orange-300\",\n\t\tresolved: \"text-emerald-700 dark:text-emerald-400\",\n\t\tdesc: \"text-orange-700/70 dark:text-orange-400/60\",\n\t\thandle: \"!bg-orange-500\",\n\t\tring: \"ring-orange-400\",\n\t},\n};\n\nfunction formatValue(value: unknown): string {\n\tif (typeof value === \"string\") return value;\n\treturn JSON.stringify(value);\n}\n\nexport function GroupHeaderNode({ data, selected }: NodeProps) {\n\tconst {\n\t\tvariant,\n\t\tdescription,\n\t\texpression,\n\t\tresolvedExpression,\n\t\ttarget,\n\t\tresolvedTarget,\n\t\titemName,\n\t\tcondition,\n\t} = data as unknown as GroupHeaderData;\n\tconst s = variantStyles[variant];\n\n\treturn (\n\t\t<div\n\t\t\tclassName={`border-2 rounded-lg w-[280px] shadow-sm transition-colors duration-150 ${s.container} ${\n\t\t\t\tselected ? `ring-2 ${s.ring}` : \"\"\n\t\t\t}`}\n\t\t>\n\t\t\t<div className=\"px-3 py-2\">\n\t\t\t\t{variant === \"switch\" && (\n\t\t\t\t\t<div className=\"flex items-baseline gap-1.5\">\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-[10px] font-bold uppercase tracking-wide ${s.label} shrink-0`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tswitch\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className={`text-[11px] ${s.label}`}>on</span>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-xs font-mono font-medium truncate ${\n\t\t\t\t\t\t\t\tresolvedExpression !== undefined ? s.resolved : s.mono\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\ttitle={resolvedExpression !== undefined ? expression : undefined}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{resolvedExpression !== undefined\n\t\t\t\t\t\t\t\t? formatValue(resolvedExpression)\n\t\t\t\t\t\t\t\t: expression}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{variant === \"loop\" && (\n\t\t\t\t\t<div className=\"flex items-baseline gap-1.5 flex-wrap\">\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-[10px] font-bold uppercase tracking-wide ${s.label} shrink-0`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tforeach\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className={`text-xs font-mono font-medium ${s.mono}`}>\n\t\t\t\t\t\t\t{itemName}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className={`text-[11px] ${s.label}`}>in</span>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-xs font-mono font-medium truncate ${\n\t\t\t\t\t\t\t\tresolvedTarget !== undefined ? s.resolved : s.mono\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\ttitle={resolvedTarget !== undefined ? target : undefined}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{resolvedTarget !== undefined\n\t\t\t\t\t\t\t\t? `[${Array.isArray(resolvedTarget) ? resolvedTarget.length : \"?\"} items]`\n\t\t\t\t\t\t\t\t: target}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{variant === \"condition\" && (\n\t\t\t\t\t<div className=\"flex items-baseline gap-1.5\">\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-[10px] font-bold uppercase tracking-wide ${s.label} shrink-0`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\twait until\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={`text-xs font-mono font-medium ${s.mono} truncate`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{condition}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{description && (\n\t\t\t\t\t<div className={`text-[11px] ${s.desc} mt-0.5 line-clamp-1`}>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<Handle\n\t\t\t\ttype=\"source\"\n\t\t\t\tposition={Position.Bottom}\n\t\t\t\tclassName={`${s.handle} !w-2 !h-2`}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n",
17
+ "import type { NodeProps } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nexport function LlmPromptNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, hasSourceEdge, executionSummary } =\n\t\tdata as unknown as StepNodeData;\n\tif (step.type !== \"llm-prompt\") return null;\n\n\tconst outputFormat = step.params.outputFormat as\n\t\t| { properties?: Record<string, unknown> }\n\t\t| undefined;\n\tconst outputKeys = outputFormat?.properties\n\t\t? Object.keys(outputFormat.properties)\n\t\t: [];\n\n\tconst resolved = executionSummary?.latestResolvedInputs as\n\t\t| Record<string, unknown>\n\t\t| undefined;\n\tconst resolvedPrompt = resolved?.prompt as string | undefined;\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"LLM\"\n\t\t\ttypeLabelColor=\"text-violet-500\"\n\t\t\taccent=\"#8b5cf6\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t\texecutionSummary={executionSummary}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={`text-[11px] italic line-clamp-3 rounded p-1.5 font-mono ${\n\t\t\t\t\tresolvedPrompt\n\t\t\t\t\t\t? \"text-emerald-700 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/50\"\n\t\t\t\t\t\t: \"text-muted-foreground bg-muted\"\n\t\t\t\t}`}\n\t\t\t\ttitle={resolvedPrompt ? step.params.prompt : undefined}\n\t\t\t>\n\t\t\t\t{resolvedPrompt ?? step.params.prompt}\n\t\t\t</div>\n\t\t\t{outputKeys.length > 0 && (\n\t\t\t\t<div className=\"mt-1.5 text-[11px] text-muted-foreground\">\n\t\t\t\t\t<span>output: </span>\n\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t{outputKeys.join(\", \")}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</BaseNode>\n\t);\n}\n",
18
+ "import type { NodeProps } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nfunction renderExpr(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nexport function SleepNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, hasSourceEdge } = data as unknown as StepNodeData;\n\tif (step.type !== \"sleep\") return null;\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"Sleep\"\n\t\t\ttypeLabelColor=\"text-amber-500\"\n\t\t\taccent=\"#f59e0b\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t>\n\t\t\t<div className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t<span className=\"text-muted-foreground shrink-0\">duration:</span>\n\t\t\t\t<span className=\"font-mono text-muted-foreground truncate\">\n\t\t\t\t\t{renderExpr(step.params.durationMs)}ms\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</BaseNode>\n\t);\n}\n",
19
+ "import type { NodeProps } from \"@xyflow/react\";\nimport { Handle, Position } from \"@xyflow/react\";\n\nexport function StartNode({ selected }: NodeProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={`rounded-full w-[60px] h-[60px] flex items-center justify-center shadow-sm border transition-all duration-150 bg-muted border-border hover:bg-accent ${selected ? \"ring-2 ring-blue-400\" : \"hover:ring-2 hover:ring-ring\"}`}\n\t\t>\n\t\t\t<span className=\"text-xs font-medium text-muted-foreground\">Start</span>\n\t\t\t<Handle\n\t\t\t\ttype=\"source\"\n\t\t\t\tposition={Position.Bottom}\n\t\t\t\tclassName=\"!w-2 !h-2 !bg-muted-foreground\"\n\t\t\t/>\n\t\t</div>\n\t);\n}\n",
20
+ "import type { NodeProps } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nexport function StartStepNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, hasSourceEdge, executionSummary, inputSchema } =\n\t\tdata as unknown as StepNodeData;\n\tif (step.type !== \"start\") return null;\n\n\tconst schema = inputSchema as\n\t\t| { properties?: Record<string, { type?: string }> }\n\t\t| undefined;\n\tconst properties = schema?.properties\n\t\t? Object.entries(schema.properties)\n\t\t: [];\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"Start\"\n\t\t\ttypeLabelColor=\"text-green-500\"\n\t\t\taccent=\"#22c55e\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t\thasTargetEdge={false}\n\t\t\texecutionSummary={executionSummary}\n\t\t>\n\t\t\t{properties.length > 0 && (\n\t\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t\t<div className=\"text-[10px] text-muted-foreground uppercase tracking-wide font-semibold\">\n\t\t\t\t\t\tInputs\n\t\t\t\t\t</div>\n\t\t\t\t\t{properties.map(([key, val]) => (\n\t\t\t\t\t\t<div key={key} className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t\t\t\t<span className=\"text-muted-foreground font-medium shrink-0\">\n\t\t\t\t\t\t\t\t{key}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t\t\t{val?.type}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</BaseNode>\n\t);\n}\n",
21
+ "import type { NodeProps } from \"@xyflow/react\";\nimport { Handle, Position } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nfunction renderExpr(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nexport function SwitchCaseNode({ data, selected }: NodeProps) {\n\tconst {\n\t\tstep,\n\t\tdiagnostics,\n\t\tisGroup,\n\t\tgroupWidth,\n\t\tgroupHeight,\n\t\thasSourceEdge,\n\t\texecutionSummary,\n\t} = data as unknown as StepNodeData & {\n\t\tisGroup?: boolean;\n\t\tgroupWidth?: number;\n\t\tgroupHeight?: number;\n\t};\n\tif (step.type !== \"switch-case\") return null;\n\n\tif (isGroup) {\n\t\tconst hasErrors = diagnostics.some((d) => d.severity === \"error\");\n\t\tconst hasWarnings =\n\t\t\t!hasErrors && diagnostics.some((d) => d.severity === \"warning\");\n\n\t\tlet ringClass = \"\";\n\t\tlet borderColor = \"border-amber-300 dark:border-amber-700\";\n\t\tif (executionSummary) {\n\t\t\tswitch (executionSummary.status) {\n\t\t\t\tcase \"running\":\n\t\t\t\t\tringClass = \"ring-2 ring-blue-400 animate-pulse\";\n\t\t\t\t\tborderColor = \"border-blue-300 dark:border-blue-700\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"completed\":\n\t\t\t\t\tringClass = \"ring-2 ring-green-400\";\n\t\t\t\t\tborderColor = \"border-green-400 dark:border-green-600\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"failed\":\n\t\t\t\t\tringClass = \"ring-2 ring-red-500\";\n\t\t\t\t\tborderColor = \"border-red-300 dark:border-red-700\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else {\n\t\t\tif (hasErrors) ringClass = \"ring-2 ring-red-500\";\n\t\t\telse if (hasWarnings) ringClass = \"ring-2 ring-amber-400\";\n\t\t\telse if (selected) ringClass = \"ring-2 ring-amber-400\";\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={`rounded-xl border-2 border-dashed transition-colors duration-150 ${borderColor} bg-amber-50/30 hover:bg-amber-50/60 hover:border-amber-500 dark:bg-amber-950/30 dark:hover:bg-amber-950/50 dark:hover:border-amber-500 ${ringClass}`}\n\t\t\t\tstyle={{ width: groupWidth, height: groupHeight }}\n\t\t\t>\n\t\t\t\t<Handle\n\t\t\t\t\ttype=\"target\"\n\t\t\t\t\tposition={Position.Top}\n\t\t\t\t\tclassName=\"!bg-amber-500 !w-2.5 !h-2.5\"\n\t\t\t\t/>\n\t\t\t\t<div className=\"px-3 py-2 flex items-center gap-2\">\n\t\t\t\t\t<span className=\"text-[10px] font-semibold uppercase tracking-wide text-amber-500\">\n\t\t\t\t\t\tBranch\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"text-sm font-medium truncate text-foreground\">\n\t\t\t\t\t\t{step.name}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t{hasSourceEdge && (\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"source\"\n\t\t\t\t\t\tposition={Position.Bottom}\n\t\t\t\t\t\tclassName=\"!bg-amber-500 !w-2.5 !h-2.5\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Non-group fallback\n\tconst resolved = executionSummary?.latestResolvedInputs as\n\t\t| Record<string, unknown>\n\t\t| undefined;\n\tconst hasSwitchResolved = resolved?.switchOn !== undefined;\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"Switch\"\n\t\t\ttypeLabelColor=\"text-amber-500\"\n\t\t\taccent=\"#f59e0b\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t\texecutionSummary={executionSummary}\n\t\t>\n\t\t\t<div className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t<span className=\"text-muted-foreground shrink-0\">on:</span>\n\t\t\t\t<span\n\t\t\t\t\tclassName={`font-mono truncate ${hasSwitchResolved ? \"text-emerald-700 dark:text-emerald-400\" : \"text-muted-foreground\"}`}\n\t\t\t\t\ttitle={\n\t\t\t\t\t\thasSwitchResolved ? renderExpr(step.params.switchOn) : undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{hasSwitchResolved\n\t\t\t\t\t\t? JSON.stringify(resolved.switchOn)\n\t\t\t\t\t\t: renderExpr(step.params.switchOn)}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div className=\"mt-1.5 space-y-0.5\">\n\t\t\t\t{step.params.cases.map((c) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={c.branchBodyStepId}\n\t\t\t\t\t\tclassName=\"flex items-center gap-1.5 text-[11px]\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t\t{c.value.type === \"default\" ? \"default\" : renderExpr(c.value)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"text-muted-foreground/50\">&rarr;</span>\n\t\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t\t{c.branchBodyStepId}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</BaseNode>\n\t);\n}\n",
22
+ "import type { NodeProps } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nfunction renderExpr(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nfunction formatValue(value: unknown): string {\n\tif (typeof value === \"string\") return value;\n\treturn JSON.stringify(value);\n}\n\nexport function ToolCallNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, hasSourceEdge, executionSummary } =\n\t\tdata as unknown as StepNodeData;\n\tif (step.type !== \"tool-call\") return null;\n\n\tconst entries = Object.entries(step.params.toolInput);\n\tconst resolved = executionSummary?.latestResolvedInputs as\n\t\t| Record<string, unknown>\n\t\t| undefined;\n\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"Tool\"\n\t\t\ttypeLabelColor=\"text-blue-500\"\n\t\t\taccent=\"#3b82f6\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t\texecutionSummary={executionSummary}\n\t\t>\n\t\t\t<div className=\"text-xs font-mono font-medium text-foreground\">\n\t\t\t\t{step.params.toolName}\n\t\t\t</div>\n\t\t\t{entries.length > 0 && (\n\t\t\t\t<div className=\"mt-1.5 space-y-0.5\">\n\t\t\t\t\t{entries.map(([key, val]) => {\n\t\t\t\t\t\tconst resolvedVal = resolved?.[key];\n\t\t\t\t\t\tconst hasResolved = resolvedVal !== undefined;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div key={key} className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground shrink-0\">{key}:</span>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName={`font-mono truncate ${hasResolved ? \"text-emerald-700 dark:text-emerald-400\" : \"text-muted-foreground\"}`}\n\t\t\t\t\t\t\t\t\ttitle={hasResolved ? renderExpr(val) : undefined}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{hasResolved ? formatValue(resolvedVal) : renderExpr(val)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</BaseNode>\n\t);\n}\n",
23
+ "import type { NodeProps } from \"@xyflow/react\";\nimport { Handle, Position } from \"@xyflow/react\";\nimport type { StepNodeData } from \"../graph-layout\";\nimport { BaseNode } from \"./base-node\";\n\nfunction renderExpr(\n\texpr:\n\t\t| { type: \"literal\"; value: unknown }\n\t\t| { type: \"jmespath\"; expression: string }\n\t\t| { type: \"template\"; template: string },\n): string {\n\tif (expr.type === \"literal\") return JSON.stringify(expr.value);\n\tif (expr.type === \"template\") return expr.template;\n\treturn expr.expression;\n}\n\nexport function WaitForConditionNode({ data, selected }: NodeProps) {\n\tconst { step, diagnostics, isGroup, groupWidth, groupHeight, hasSourceEdge } =\n\t\tdata as unknown as StepNodeData & {\n\t\t\tisGroup?: boolean;\n\t\t\tgroupWidth?: number;\n\t\t\tgroupHeight?: number;\n\t\t};\n\tif (step.type !== \"wait-for-condition\") return null;\n\n\tif (isGroup) {\n\t\tconst hasErrors = diagnostics.some((d) => d.severity === \"error\");\n\t\tconst hasWarnings =\n\t\t\t!hasErrors && diagnostics.some((d) => d.severity === \"warning\");\n\n\t\tlet ringClass = \"\";\n\t\tif (hasErrors) ringClass = \"ring-2 ring-red-500\";\n\t\telse if (hasWarnings) ringClass = \"ring-2 ring-amber-400\";\n\t\telse if (selected) ringClass = \"ring-2 ring-orange-400\";\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={`rounded-xl border-2 border-dashed transition-colors duration-150 border-orange-300 bg-orange-50/30 dark:border-orange-700 dark:bg-orange-950/30 ${ringClass}`}\n\t\t\t\tstyle={{ width: groupWidth, height: groupHeight }}\n\t\t\t>\n\t\t\t\t<Handle\n\t\t\t\t\ttype=\"target\"\n\t\t\t\t\tposition={Position.Top}\n\t\t\t\t\tclassName=\"!bg-orange-500 !w-2.5 !h-2.5\"\n\t\t\t\t/>\n\t\t\t\t<div className=\"px-3 py-2 flex items-center gap-2\">\n\t\t\t\t\t<span className=\"text-[10px] font-semibold uppercase tracking-wide text-orange-500\">\n\t\t\t\t\t\tWait\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"text-sm font-medium text-foreground truncate\">\n\t\t\t\t\t\t{step.name}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t{hasSourceEdge && (\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"source\"\n\t\t\t\t\t\tposition={Position.Bottom}\n\t\t\t\t\t\tclassName=\"!bg-orange-500 !w-2.5 !h-2.5\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Non-group fallback\n\treturn (\n\t\t<BaseNode\n\t\t\tid={step.id}\n\t\t\tname={step.name}\n\t\t\ttypeLabel=\"Wait\"\n\t\t\ttypeLabelColor=\"text-orange-500\"\n\t\t\taccent=\"#f97316\"\n\t\t\tdescription={step.description}\n\t\t\tdiagnostics={diagnostics}\n\t\t\tselected={selected}\n\t\t\thasSourceEdge={hasSourceEdge}\n\t\t>\n\t\t\t<div className=\"flex gap-1.5 text-[11px]\">\n\t\t\t\t<span className=\"text-muted-foreground shrink-0\">until:</span>\n\t\t\t\t<span className=\"font-mono text-muted-foreground truncate\">\n\t\t\t\t\t{renderExpr(step.params.condition)}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t{step.params.maxAttempts && (\n\t\t\t\t<div className=\"mt-0.5 flex gap-1.5 text-[11px]\">\n\t\t\t\t\t<span className=\"text-muted-foreground shrink-0\">max attempts:</span>\n\t\t\t\t\t<span className=\"font-mono text-muted-foreground\">\n\t\t\t\t\t\t{renderExpr(step.params.maxAttempts)}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</BaseNode>\n\t);\n}\n"
24
+ ],
25
+ "mappings": ";AA8BA,IAAM,kBAA8C;AAAA,EACnD,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACV;AAEA,SAAS,WAAW,CAAC,GAAe,GAA2B;AAAA,EAC9D,OAAO,gBAAgB,MAAM,gBAAgB,KAAK,IAAI;AAAA;AAQvD,SAAS,uBAAuB,CAC/B,SACwB;AAAA,EAExB,MAAM,kBAAkB,IAAI;AAAA,EAC5B,WAAW,UAAU,SAAS;AAAA,IAC7B,WAAW,OAAO,OAAO,MAAM;AAAA,MAC9B,IAAI,IAAI,SAAS,YAAY;AAAA,QAC5B,MAAM,OAAO,gBAAgB,IAAI,IAAI,MAAM,KAAK;AAAA,QAChD,IAAI,IAAI,iBAAiB,MAAM;AAAA,UAC9B,gBAAgB,IAAI,IAAI,QAAQ,IAAI,cAAc;AAAA,QACnD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,IAAI,gBAAgB,SAAS;AAAA,IAAG,OAAO;AAAA,EAEvC,OAAO,QAAQ,OAAO,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BAAkB;AAAA,QAClB,SAAS,MAAM;AAAA,UACd,gBAAgB,IAAI;AAAA,UACpB,uBAAuB,CAAC,CAAC;AAAA,UACzB,4BAA4B,SAAS;AAAA,UACrC,4BAA4B,SAAS;AAAA,UACrC,eAAe,MAAM,CAAC,CAAC;AAAA;AAAA,SAVzB,iCAYA;AAAA;AAAA,KAnDF,gCAqDE;AAAA;",
26
+ "debugId": "67D796A55E18E22964756E2164756E21",
27
+ "names": []
28
+ }
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function AgentLoopNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=agent-loop-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-loop-node.d.ts","sourceRoot":"","sources":["../../src/nodes/agent-loop-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDA6B1D"}
@@ -0,0 +1,20 @@
1
+ import type { Diagnostic } from "@remoraflow/core";
2
+ import type { ReactNode } from "react";
3
+ import type { StepExecutionSummary } from "../execution-state";
4
+ interface BaseNodeProps {
5
+ id: string;
6
+ name: string;
7
+ typeLabel: string;
8
+ typeLabelColor: string;
9
+ accent: string;
10
+ description: string;
11
+ diagnostics: Diagnostic[];
12
+ children?: ReactNode;
13
+ selected?: boolean;
14
+ hasSourceEdge?: boolean;
15
+ hasTargetEdge?: boolean;
16
+ executionSummary?: StepExecutionSummary;
17
+ }
18
+ export declare function BaseNode({ id, name, typeLabel, typeLabelColor, accent, description, diagnostics, children, selected, hasSourceEdge, hasTargetEdge, executionSummary, }: BaseNodeProps): import("react/jsx-runtime").JSX.Element;
19
+ export {};
20
+ //# sourceMappingURL=base-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-node.d.ts","sourceRoot":"","sources":["../../src/nodes/base-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,UAAU,aAAa;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;CACxC;AAuCD,wBAAgB,QAAQ,CAAC,EACxB,EAAE,EACF,IAAI,EACJ,SAAS,EACT,cAAc,EACd,MAAM,EACN,WAAW,EACX,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,aAAoB,EACpB,aAAoB,EACpB,gBAAgB,GAChB,EAAE,aAAa,2CA8Ff"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function EndNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=end-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-node.d.ts","sourceRoot":"","sources":["../../src/nodes/end-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAgB/C,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,2CA2FpD"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function ExtractDataNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=extract-data-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-data-node.d.ts","sourceRoot":"","sources":["../../src/nodes/extract-data-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAe/C,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDAuD5D"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function ForEachNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=for-each-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"for-each-node.d.ts","sourceRoot":"","sources":["../../src/nodes/for-each-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAgB/C,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDA+GxD"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function GroupHeaderNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=group-header-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-header-node.d.ts","sourceRoot":"","sources":["../../src/nodes/group-header-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAuD/C,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,2CA0F5D"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function LlmPromptNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=llm-prompt-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-prompt-node.d.ts","sourceRoot":"","sources":["../../src/nodes/llm-prompt-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDAkD1D"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function SleepNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=sleep-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sleep-node.d.ts","sourceRoot":"","sources":["../../src/nodes/sleep-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAe/C,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDAwBtD"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function StartNode({ selected }: NodeProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=start-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-node.d.ts","sourceRoot":"","sources":["../../src/nodes/start-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,2CAahD"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function StartStepNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=start-step-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-step-node.d.ts","sourceRoot":"","sources":["../../src/nodes/start-step-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDA6C1D"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function SwitchCaseNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=switch-case-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch-case-node.d.ts","sourceRoot":"","sources":["../../src/nodes/switch-case-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAgB/C,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDA2H3D"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function ToolCallNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=tool-call-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call-node.d.ts","sourceRoot":"","sources":["../../src/nodes/tool-call-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAoB/C,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDA+CzD"}
@@ -0,0 +1,3 @@
1
+ import type { NodeProps } from "@xyflow/react";
2
+ export declare function WaitForConditionNode({ data, selected }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=wait-for-condition-node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait-for-condition-node.d.ts","sourceRoot":"","sources":["../../src/nodes/wait-for-condition-node.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAgB/C,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,SAAS,kDA6EjE"}
@@ -0,0 +1,11 @@
1
+ import type { Diagnostic, StepExecutionRecord, WorkflowStep } from "@remoraflow/core";
2
+ import type { StepExecutionSummary } from "../execution-state";
3
+ export interface StepDetailPanelProps {
4
+ step: WorkflowStep;
5
+ diagnostics: Diagnostic[];
6
+ executionSummary?: StepExecutionSummary;
7
+ executionRecords?: StepExecutionRecord[];
8
+ onClose: () => void;
9
+ }
10
+ export declare function StepDetailPanel({ step, diagnostics, executionSummary, executionRecords, onClose, }: StepDetailPanelProps): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=step-detail-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-detail-panel.d.ts","sourceRoot":"","sources":["../../src/panels/step-detail-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EAEV,mBAAmB,EACnB,YAAY,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,oBAAoB;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,gBAAgB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AA6bD,wBAAgB,eAAe,CAAC,EAC/B,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,GACP,EAAE,oBAAoB,2CAmJtB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Detects dark mode by observing the `dark` class on `<html>`,
3
+ * following the shadcn/Tailwind convention (`darkMode: "class"`).
4
+ */
5
+ export declare function useDarkMode(): boolean;
6
+ /**
7
+ * Returns resolved theme colors from shadcn CSS custom properties,
8
+ * with sensible fallbacks for apps that don't define them.
9
+ * Re-resolves automatically when dark mode toggles.
10
+ */
11
+ export declare function useThemeColors(): {
12
+ dark: boolean;
13
+ border: string;
14
+ mutedForeground: string;
15
+ card: string;
16
+ };
17
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAkBrC;AAmBD;;;;GAIG;AACH,wBAAgB,cAAc;;;;;EAe7B"}