@memberjunction/ng-task-graph-editor 6.1.0-edge.1 → 6.1.0-edge.3

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 (59) hide show
  1. package/LICENSE +180 -4
  2. package/README.md +197 -0
  3. package/dist/lib/debug-variables.d.ts +27 -0
  4. package/dist/lib/debug-variables.d.ts.map +1 -0
  5. package/dist/lib/debug-variables.js +96 -0
  6. package/dist/lib/debug-variables.js.map +1 -0
  7. package/dist/lib/pane-split.d.ts +11 -0
  8. package/dist/lib/pane-split.d.ts.map +1 -0
  9. package/dist/lib/pane-split.js +36 -0
  10. package/dist/lib/pane-split.js.map +1 -0
  11. package/dist/lib/task-graph-canvas-adapter.d.ts +142 -7
  12. package/dist/lib/task-graph-canvas-adapter.d.ts.map +1 -1
  13. package/dist/lib/task-graph-canvas-adapter.js +319 -44
  14. package/dist/lib/task-graph-canvas-adapter.js.map +1 -1
  15. package/dist/lib/task-graph-debug-toolbar.component.d.ts +27 -0
  16. package/dist/lib/task-graph-debug-toolbar.component.d.ts.map +1 -0
  17. package/dist/lib/task-graph-debug-toolbar.component.js +153 -0
  18. package/dist/lib/task-graph-debug-toolbar.component.js.map +1 -0
  19. package/dist/lib/task-graph-debugger.component.d.ts +96 -0
  20. package/dist/lib/task-graph-debugger.component.d.ts.map +1 -0
  21. package/dist/lib/task-graph-debugger.component.js +371 -0
  22. package/dist/lib/task-graph-debugger.component.js.map +1 -0
  23. package/dist/lib/task-graph-editor.component.d.ts +144 -5
  24. package/dist/lib/task-graph-editor.component.d.ts.map +1 -1
  25. package/dist/lib/task-graph-editor.component.js +321 -26
  26. package/dist/lib/task-graph-editor.component.js.map +1 -1
  27. package/dist/lib/task-graph-editor.module.d.ts +10 -5
  28. package/dist/lib/task-graph-editor.module.d.ts.map +1 -1
  29. package/dist/lib/task-graph-editor.module.js +53 -5
  30. package/dist/lib/task-graph-editor.module.js.map +1 -1
  31. package/dist/lib/task-graph-properties-panel.component.d.ts +34 -8
  32. package/dist/lib/task-graph-properties-panel.component.d.ts.map +1 -1
  33. package/dist/lib/task-graph-properties-panel.component.js +164 -45
  34. package/dist/lib/task-graph-properties-panel.component.js.map +1 -1
  35. package/dist/lib/task-graph-run-prefs.d.ts +34 -0
  36. package/dist/lib/task-graph-run-prefs.d.ts.map +1 -0
  37. package/dist/lib/task-graph-run-prefs.js +67 -0
  38. package/dist/lib/task-graph-run-prefs.js.map +1 -0
  39. package/dist/lib/task-graph-run-view.component.d.ts +290 -0
  40. package/dist/lib/task-graph-run-view.component.d.ts.map +1 -0
  41. package/dist/lib/task-graph-run-view.component.js +826 -0
  42. package/dist/lib/task-graph-run-view.component.js.map +1 -0
  43. package/dist/lib/task-graph-runtime-source.d.ts +7 -1
  44. package/dist/lib/task-graph-runtime-source.d.ts.map +1 -1
  45. package/dist/lib/task-graph-runtime-source.js +14 -2
  46. package/dist/lib/task-graph-runtime-source.js.map +1 -1
  47. package/dist/lib/task-graph-variables.component.d.ts +23 -0
  48. package/dist/lib/task-graph-variables.component.d.ts.map +1 -0
  49. package/dist/lib/task-graph-variables.component.js +192 -0
  50. package/dist/lib/task-graph-variables.component.js.map +1 -0
  51. package/dist/lib/workflow-debug-host.d.ts +23 -0
  52. package/dist/lib/workflow-debug-host.d.ts.map +1 -0
  53. package/dist/lib/workflow-debug-host.js +101 -0
  54. package/dist/lib/workflow-debug-host.js.map +1 -0
  55. package/dist/public-api.d.ts +8 -0
  56. package/dist/public-api.d.ts.map +1 -1
  57. package/dist/public-api.js +8 -0
  58. package/dist/public-api.js.map +1 -1
  59. package/package.json +11 -9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-graph-run-view.component.js","sourceRoot":"","sources":["../../src/lib/task-graph-run-view.component.ts","../../src/lib/task-graph-run-view.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACH,uBAAuB,EAEvB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,K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AAK;;kBAYL,KAAK;;kBAYL,KAAK;;kBAcL,KAAK;;kBASL,KAAK;;kBAaL,KAAK;;kBASL,KAAK;;kBAYL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBA4ON,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFApYnC,yBAAyB;AA4nBtC,SAAS,cAAc,CAAC,MAA0B;IAC9C,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC;QAAE,OAAO,KAAK,CAAC;IACnD,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;IAC3B,OAAO,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,UAAU,IAAI,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,iBAAiB,CAAC;AACjG,CAAC","sourcesContent":["/**\n * @fileoverview Watching a graph that is running, on the canvas its author drew on.\n *\n * **Why this is a component and not three.** A run needs rendering in at least three places — inside\n * an Agent Run, inside the test harness, and on a standalone workflow-runs screen — and every one of\n * them wants the identical thing: the graph, with live status, laid out legibly, with a node you can\n * click. Three implementations would be three chances to render the same run differently, and the\n * one that matters most (is that branch grey because it was *not taken*, or because it *broke*?) is\n * exactly the distinction a second implementation gets wrong.\n *\n * **What it owns and what it doesn't.** It owns data acquisition — reading `MJ: Tasks` and\n * `MJ: Task Dependencies` through the host's provider — and geometry. It does not navigate: a\n * widgets-layer component cannot know whether it sits inside Explorer, so selecting a node emits an\n * event and the host decides what \"open the agent run\" means. That boundary is the whole reason\n * this can live beside the editor rather than in Explorer.\n *\n * @module @memberjunction/ng-task-graph-editor\n */\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnDestroy,\n Output,\n} from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { LogError, RunView } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { MJTaskEntity, MJTaskDependencyEntity, UserInfoEngine } from '@memberjunction/core-entities';\nimport { ToPaneSizePair } from './pane-split';\nimport { TaskGraphRunPrefsStore, type TaskGraphRunPrefs } from './task-graph-run-prefs';\nimport {\n GraphLayoutBounds,\n LayoutGraphNodes,\n ProjectTaskRowsToSpec,\n type GraphLayoutEdge,\n type GraphNodePosition,\n type TaskGraphSpec,\n} from '@memberjunction/ai-core-plus';\nimport { BuildRuntimeStatus, IsRuntimeSettled, NormalizeRuntimeState } from './task-graph-runtime-source';\nimport type { TaskGraphDebugOverlay, TaskGraphRuntimeStatus } from './task-graph-canvas-adapter';\nimport type { TaskGraphSelectionChangedEventArgs } from './task-graph-editor-events';\nimport type {\n FlowAfterContextMenuActionEventArgs,\n FlowBeforeContextMenuEventArgs,\n FlowConnection,\n FlowToolbarAlign,\n FlowToolbarVisibility,\n} from '@memberjunction/ng-flow-editor';\n\n/** What the host learns when someone clicks a step. */\nexport type TaskGraphRunNodeSelectedEvent = {\n /** The `MJ: Tasks` row id. */\n TaskID: string;\n Task: MJTaskEntity | null;\n};\n\n/** What the host learns when someone clicks a path. */\nexport type TaskGraphRunConnectionSelectedEvent = {\n /** The `MJ: Task Dependencies` row id, when the projection carried one. */\n EdgeID: string | null;\n FromTaskID: string;\n ToTaskID: string;\n Condition?: string;\n};\n\n/**\n * One live dispatcher frame, as the HOST hands it in.\n *\n * Structural on purpose: the widget must not import the transport (`GraphQLDataProvider`'s\n * `TaskGraphFrameEvent` satisfies this shape as-is), and the host owns the subscription — this\n * component only renders what it is handed, which is the widgets-layer rule that keeps it embeddable\n * anywhere. Fields beyond these are ignored, so a newer server cannot break an older widget.\n */\nexport type TaskGraphRunFrame = {\n kind: string;\n taskId?: string;\n taskName?: string;\n status?: string;\n progressMessage?: string;\n progressPercent?: number;\n reason?: string;\n edgeId?: string;\n dependsOnTaskId?: string;\n conditionText?: string;\n claimEvent?: string;\n claimedBy?: string;\n verdict?: string;\n passNumber?: number;\n eligibleCount?: number;\n heldCount?: number;\n claimedCount?: number;\n};\n\n/** Statuses at which a graph has stopped moving, so polling can stop with it. */\nconst SETTLED = new Set<MJTaskEntity['Status']>(['Complete', 'Failed', 'Cancelled', 'Skipped']);\n\n@Component({\n standalone: false,\n selector: 'mj-task-graph-run-view',\n templateUrl: './task-graph-run-view.component.html',\n styleUrls: ['./task-graph-run-view.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TaskGraphRunViewComponent extends BaseAngularComponent implements OnDestroy {\n /**\n * The graph to watch — the parent `MJ: Tasks` row that represents it.\n *\n * Setter-based rather than `ngOnChanges`, matching the editor beside it: the reaction is\n * explicit and costs nothing on unrelated change-detection passes.\n */\n @Input()\n public set ParentTaskID(value: string | null) {\n if (value === this.parentTaskID) return;\n this.parentTaskID = value;\n this.settledEmitted = false;\n void this.load();\n }\n public get ParentTaskID(): string | null {\n return this.parentTaskID;\n }\n\n /** Name shown on the compiled graph. Purely cosmetic; the rows carry the truth. */\n @Input() public WorkflowName: string = 'Workflow';\n\n /**\n * Keep re-reading while the graph is still moving.\n *\n * Off by default: most hosts show a finished run, and a component that polls by default would\n * have every historical run quietly issuing queries forever.\n */\n @Input() public LiveUpdates: boolean = false;\n\n /** How often to re-read while live. Seconds, not milliseconds — this is a human-scale view. */\n @Input() public PollIntervalSeconds: number = 3;\n\n /** Height of the canvas. Hosts embed this in very different amounts of space. */\n @Input() public Height: string = '320px';\n\n /**\n * Whether the canvas legend shows. **Off by default here**, unlike the editor.\n *\n * The legend explains the authoring vocabulary — what a conditional edge means, what a duplicate\n * default looks like. That is what someone drawing a graph needs. A run view answers a different\n * question, \"what happened\", which the legend helps with not at all while covering a corner of\n * the canvas the graph is usually occupying.\n */\n @Input() public ShowLegend: boolean = false;\n\n /**\n * Whether the canvas toolbar rides above the graph.\n *\n * Debug and other run hosts leave this on and set `ToolbarVisibility` to `minimized` so the\n * graph is the picture, not a floating tool strip. The chip in the corner restores the bar.\n */\n @Input() public ShowToolbar: boolean = true;\n @Input() public ToolbarVisibility: FlowToolbarVisibility = 'minimized';\n @Input() public ToolbarAlign: FlowToolbarAlign = 'left';\n\n /**\n * The latest live dispatcher frame, handed in by the host.\n *\n * The host owns the subscription (`GraphQLDataProvider.TaskGraphFrames` or anything shaped like\n * it) and binds each arrival here; the widget folds it into the overlay. Frames are advisory —\n * a task frame patches the node's status in place for sub-second feedback, and the frames that\n * imply CASCADES (a skip, a block, settlement) trigger a debounced row reload, because the\n * dispatcher's propagation writes rows this component cannot infer from one frame. Rows remain\n * the truth; the existing poll (if enabled) remains the safety net.\n */\n @Input()\n public set LiveFrame(frame: TaskGraphRunFrame | null) {\n if (!frame) return;\n this.foldFrame(frame);\n }\n\n /**\n * Replay: render the run as it stood at this moment, reconstructed from each step's\n * `StartedAt`/`CompletedAt`. Null (the default) renders the present. A step that had not\n * started reads Pending; one mid-flight reads In Progress; one already finished reads its\n * final status — the same three answers the rows would have given a viewer at that time.\n */\n @Input()\n public set ReplayAt(value: Date | null) {\n if (value?.getTime() === this.replayAt?.getTime()) return;\n this.replayAt = value;\n this.applyReplay();\n }\n public get ReplayAt(): Date | null {\n return this.replayAt;\n }\n\n /**\n * Armed breakpoint task IDs, from the parent row's `$.debug.breakpoints`. Empty by default so\n * embeds (agent-run timeline, test harness) never grow debugger chrome they did not ask for.\n */\n @Input()\n public set Breakpoints(value: readonly string[]) {\n this.breakpoints = value ?? [];\n this.rebuildOverlay();\n }\n public get Breakpoints(): readonly string[] {\n return this.breakpoints;\n }\n /** The step a breakpoint actually stopped on. */\n @Input()\n public set PausedAtTaskID(value: string | null) {\n this.pausedAtTaskID = value;\n if (value) this.SelectedTaskID = value;\n this.rebuildOverlay();\n }\n public get PausedAtTaskID(): string | null {\n return this.pausedAtTaskID;\n }\n /**\n * The graph is claim-gated. Combined with `PausedAtTaskID` so start-paused (no specific\n * step yet) can still light the entry node as waiting.\n */\n @Input()\n public set GraphPaused(value: boolean) {\n this.graphPaused = value;\n this.rebuildOverlay();\n }\n public get GraphPaused(): boolean {\n return this.graphPaused;\n }\n /** Operator-forced edge verdicts, keyed by `MJ: Task Dependencies` row ID. */\n @Input()\n public set EdgeOverrides(value: Readonly<Record<string, 'true' | 'false'>>) {\n this.edgeOverrides = value ?? {};\n this.rebuildOverlay();\n }\n public get EdgeOverrides(): Readonly<Record<string, 'true' | 'false'>> {\n return this.edgeOverrides;\n }\n /**\n * Whether this host may arm/disarm breakpoints from the selected-step control.\n * Off by default — the run view also renders where those controls would be wrong.\n */\n @Input() public AllowBreakpointEditing: boolean = false;\n /** Compact debug key under the summary line. Off unless the host is a debugger. */\n @Input() public ShowDebugLegend: boolean = false;\n /** VS Code VARIABLES pane to the left of the canvas. Off unless the host is debugging. */\n @Input() public ShowVariables: boolean = false;\n /** The parent bag's `data` / `context` roots, for the Invocation scope. */\n @Input() public Invocation: { data?: unknown; context?: unknown } | null = null;\n\n @Output() public NodeSelected = new EventEmitter<TaskGraphRunNodeSelectedEvent>();\n /** The legend was toggled from the toolbar, so a host can remember the choice. */\n @Output() public LegendToggled = new EventEmitter<boolean>();\n /** Emitted once, when every step has reached a terminal status. */\n @Output() public Settled = new EventEmitter<void>();\n /** A connection was clicked. `EdgeID` is the dependency row id when the projection carried one. */\n @Output() public ConnectionSelected = new EventEmitter<TaskGraphRunConnectionSelectedEvent>();\n /** Intent only — the host owns `SetBreakpoints`. */\n @Output() public BreakpointToggled = new EventEmitter<{ TaskID: string; Enabled: boolean }>();\n /** Intent only — the host owns `OverrideEdge`. */\n @Output() public EdgeOverrideRequested = new EventEmitter<{\n EdgeID: string;\n Verdict: 'true' | 'false' | null;\n }>();\n\n /** What each running step says it is doing, from `NodeProgress` frames. Keyed by task row id. */\n public LiveActivity = new Map<string, { Message: string; Percent?: number }>();\n\n /** The last step the person selected, so the breakpoint control has a target. */\n public SelectedTaskID: string | null = null;\n /** Stable overlay object — rebuilt only when debug inputs change, so the editor does not re-project every CD cycle. */\n public Overlay: TaskGraphDebugOverlay = { showConditions: true };\n\n private breakpoints: readonly string[] = [];\n private pausedAtTaskID: string | null = null;\n private graphPaused = false;\n private edgeOverrides: Readonly<Record<string, 'true' | 'false'>> = {};\n /** `Settled` is once-per-parent — a finished poll must not re-fire the host. */\n private settledEmitted = false;\n\n /** Left data pane + split sizes. One JSON bag in `MJ: User Settings`. */\n public get Prefs(): TaskGraphRunPrefs {\n return this.prefsStore.Value;\n }\n private prefsStore = new TaskGraphRunPrefsStore({\n Get: () => undefined,\n Set: () => { /* unit tests / pre-bootstrap */ },\n });\n\n public Spec: TaskGraphSpec | null = null;\n public RuntimeStatus: TaskGraphRuntimeStatus | null = null;\n public Positions: Map<string, GraphNodePosition> = new Map();\n public IsLoading = false;\n public ErrorMessage: string | null = null;\n\n /** Rows by id, so a selection event can hand the host the whole task rather than an id. */\n private taskByID = new Map<string, MJTaskEntity>();\n private parentTaskID: string | null = null;\n private replayAt: Date | null = null;\n private pollTimer: ReturnType<typeof setTimeout> | null = null;\n private frameReloadTimer: ReturnType<typeof setTimeout> | null = null;\n private destroyed = false;\n\n constructor(private cdr: ChangeDetectorRef) {\n super();\n try {\n this.prefsStore = new TaskGraphRunPrefsStore({\n Get: (key) => UserInfoEngine.Instance.GetSetting(key),\n Set: (key, value) => UserInfoEngine.Instance.SetSettingDebounced(key, value),\n });\n this.prefsStore.Restore();\n } catch {\n // Engine not configured yet (unit tests, pre-bootstrap) — keep the default.\n }\n }\n\n public get InvocationPaneOpen(): boolean {\n return this.ShowVariables && this.Prefs.InvocationOpen;\n }\n\n public get InvocationPaneSize(): number {\n return this.InvocationPaneOpen ? this.Prefs.InvocationSplit[0] : 0;\n }\n\n public get CanvasPaneSize(): number {\n return this.InvocationPaneOpen ? this.Prefs.InvocationSplit[1] : 100;\n }\n\n public OnToggleInvocation(): void {\n this.prefsStore.SetInvocationOpen(!this.Prefs.InvocationOpen);\n this.cdr.markForCheck();\n }\n\n public OnInvocationSplitDragEnd(sizes: readonly (number | '*')[]): void {\n const pair = ToPaneSizePair(sizes);\n if (!pair) return;\n this.prefsStore.SetInvocationSplit(pair);\n this.cdr.markForCheck();\n }\n\n public ngOnDestroy(): void {\n this.destroyed = true;\n this.stopPolling();\n if (this.frameReloadTimer) {\n clearTimeout(this.frameReloadTimer);\n this.frameReloadTimer = null;\n }\n }\n\n /** Steps in a terminal state, for the host's summary line. Uses the same map the canvas paints. */\n public get CompletedCount(): number {\n return this.countRuntime('Complete');\n }\n\n public get TotalCount(): number {\n return this.Spec?.tasks.length ?? this.taskByID.size;\n }\n\n public get SkippedCount(): number {\n return this.countRuntime('Skipped');\n }\n\n public get RunningCount(): number {\n return this.countRuntime('In Progress');\n }\n\n public get IsSettled(): boolean {\n if (!this.Spec || this.Spec.tasks.length === 0) return false;\n return IsRuntimeSettled(this.RuntimeStatus ?? {}, this.Spec.tasks.map((t) => t.tempId));\n }\n\n /**\n * A node was selected on the canvas.\n *\n * The projected `tempId` IS the task id, so the row lookup is exact — and handing the host the\n * whole task rather than an id spares every host from re-reading a row this component already\n * holds.\n */\n public OnSelectionChanged(args: TaskGraphSelectionChangedEventArgs): void {\n const tempId = args?.Task?.tempId;\n if (!tempId) return;\n this.SelectedTaskID = tempId;\n this.NodeSelected.emit({ TaskID: tempId, Task: this.taskByID.get(tempId) ?? null });\n this.cdr.markForCheck();\n }\n\n public OnConnectionSelected(connection: FlowConnection | null): void {\n if (!connection) {\n this.ConnectionSelected.emit({ EdgeID: null, FromTaskID: '', ToTaskID: '' });\n return;\n }\n const data = connection.Data ?? {};\n const edgeID = typeof data['EdgeID'] === 'string' ? data['EdgeID'] : null;\n const from = typeof data['FromTempId'] === 'string' ? data['FromTempId'] : connection.SourceNodeID;\n const to = typeof data['ToTempId'] === 'string' ? data['ToTempId'] : connection.TargetNodeID;\n this.ConnectionSelected.emit({\n EdgeID: edgeID,\n FromTaskID: from,\n ToTaskID: to,\n Condition: connection.Condition,\n });\n }\n\n private countRuntime(state: TaskGraphRuntimeStatus[string]): number {\n if (!this.RuntimeStatus) {\n return [...this.taskByID.values()].filter((t) => NormalizeRuntimeState(t.Status) === state).length;\n }\n return Object.values(this.RuntimeStatus).filter((s) => s === state).length;\n }\n\n public get HasSelectedBreakpoint(): boolean {\n return !!this.SelectedTaskID && this.hasBreakpoint(this.SelectedTaskID);\n }\n\n public get SelectedTaskName(): string {\n if (!this.SelectedTaskID) return '';\n return this.taskByID.get(this.SelectedTaskID)?.Name ?? 'this step';\n }\n\n public get WaitingStepName(): string {\n if (this.pausedAtTaskID) {\n return this.taskByID.get(this.pausedAtTaskID)?.Name\n ?? this.Spec?.tasks.find((t) => t.tempId === this.pausedAtTaskID)?.name\n ?? 'this step';\n }\n const entry = this.Spec?.tasks.find((t) => (t.dependsOn?.length ?? 0) === 0);\n return entry?.name ?? 'the first step';\n }\n\n public get SelectedTask(): MJTaskEntity | null {\n return this.SelectedTaskID ? this.taskByID.get(this.SelectedTaskID) ?? null : null;\n }\n\n public OnToggleSelectedBreakpoint(): void {\n if (!this.AllowBreakpointEditing || !this.SelectedTaskID) return;\n this.BreakpointToggled.emit({\n TaskID: this.SelectedTaskID,\n Enabled: !this.HasSelectedBreakpoint,\n });\n }\n\n /** Debug attaches here: replace Edit/Remove with breakpoint / path-override items. */\n public OnBeforeContextMenu(event: FlowBeforeContextMenuEventArgs): void {\n if (!this.AllowBreakpointEditing) {\n event.Cancel = true;\n return;\n }\n if (event.Target === 'node' && event.Node) {\n const on = this.hasBreakpoint(event.Node.ID);\n event.Items = [{\n ID: 'toggle-breakpoint',\n Label: on ? 'Remove Breakpoint' : 'Add Breakpoint',\n Icon: 'fa-circle',\n Shortcut: 'F9',\n }];\n return;\n }\n if (event.Target === 'connection' && event.Connection?.Condition?.trim()) {\n const edgeID = typeof event.Connection.Data?.['EdgeID'] === 'string'\n ? event.Connection.Data['EdgeID']\n : null;\n if (!edgeID) {\n event.Cancel = true;\n return;\n }\n event.Items = [\n { ID: 'force-true', Label: 'Take this path', Icon: 'fa-check' },\n { ID: 'force-false', Label: 'Skip this path', Icon: 'fa-xmark' },\n { ID: 'force-clear', Label: 'Clear override', Icon: 'fa-rotate-left' },\n ];\n return;\n }\n event.Cancel = true;\n }\n\n public OnAfterContextMenuAction(event: FlowAfterContextMenuActionEventArgs): void {\n if (event.ActionID === 'toggle-breakpoint' && event.Node) {\n this.BreakpointToggled.emit({\n TaskID: event.Node.ID,\n Enabled: !this.hasBreakpoint(event.Node.ID),\n });\n return;\n }\n const edgeID = typeof event.Connection?.Data?.['EdgeID'] === 'string'\n ? event.Connection.Data['EdgeID']\n : null;\n if (!edgeID) return;\n if (event.ActionID === 'force-true') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: 'true' });\n if (event.ActionID === 'force-false') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: 'false' });\n if (event.ActionID === 'force-clear') this.EdgeOverrideRequested.emit({ EdgeID: edgeID, Verdict: null });\n }\n\n private hasBreakpoint(taskID: string): boolean {\n return this.breakpoints.some((id) => UUIDsEqual(id, taskID));\n }\n\n @HostListener('document:keydown', ['$event'])\n public OnDebugHotkey(event: KeyboardEvent): void {\n if (!this.AllowBreakpointEditing) return;\n if (isTypingTarget(event.target)) return;\n if (event.key === 'F9') {\n event.preventDefault();\n this.OnToggleSelectedBreakpoint();\n }\n }\n\n private rebuildOverlay(): void {\n this.Overlay = {\n breakpoints: this.breakpoints,\n // A finished graph is not \"paused here\" — the durable bag can still name the last\n // breakpoint after every step is terminal.\n pausedAtTaskID: this.IsSettled ? null : this.pausedAtTaskID,\n paused: !this.IsSettled && this.graphPaused,\n edgeOverrides: this.edgeOverrides,\n showConditions: true,\n };\n }\n\n private emitSettledOnce(): void {\n if (this.settledEmitted || !this.IsSettled) return;\n this.settledEmitted = true;\n this.Settled.emit();\n }\n\n /**\n * Reads the graph and projects it onto the canvas.\n *\n * `BypassCache` throughout: a run view exists to show what is true *now*, and the whole point of\n * the poll is to see a status that changed a second ago. A cached read would render a stale graph\n * that looks authoritative.\n */\n private async load(): Promise<void> {\n this.stopPolling();\n if (!this.parentTaskID) {\n this.Spec = null;\n this.cdr.markForCheck();\n return;\n }\n\n this.IsLoading = this.Spec === null; // only show the spinner on first load, not on every poll\n this.ErrorMessage = null;\n\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const [tasks, deps] = await rv.RunViews<MJTaskEntity | MJTaskDependencyEntity>([\n {\n EntityName: 'MJ: Tasks',\n ExtraFilter: `ParentID='${this.parentTaskID}'`,\n // Started work in the order it ran, unstarted last, persist order as the\n // tiebreak — the same rule GetAgentRunTree uses, so a graph reads identically\n // wherever it is shown.\n //\n // `__mj_CreatedAt ASC` alone was persist order, which is the COMPILER's walk\n // order, not the author's numbering and not what actually happened: a settled\n // graph listed its steps in an order unrelated to their execution, and a skipped\n // step could sit above work that ran.\n OrderBy: 'CASE WHEN StartedAt IS NULL THEN 1 ELSE 0 END, StartedAt, __mj_CreatedAt',\n ResultType: 'entity_object',\n BypassCache: true,\n },\n {\n EntityName: 'MJ: Task Dependencies',\n ExtraFilter: `TaskID IN (SELECT ID FROM __mj.Task WHERE ParentID='${this.parentTaskID}')`,\n ResultType: 'entity_object',\n BypassCache: true,\n },\n ]);\n\n if (this.destroyed) return;\n\n if (!tasks.Success) {\n this.fail(`The workflow's steps could not be loaded: ${tasks.ErrorMessage}`);\n return;\n }\n\n const taskRows = (tasks.Results ?? []) as MJTaskEntity[];\n const depRows = (deps.Success ? (deps.Results ?? []) : []) as MJTaskDependencyEntity[];\n this.project(taskRows, depRows);\n this.rebuildOverlay();\n this.emitSettledOnce();\n\n if (this.LiveUpdates && !this.isSettled(taskRows)) this.schedulePoll();\n } catch (e) {\n this.fail(e instanceof Error ? e.message : String(e));\n } finally {\n this.IsLoading = false;\n this.cdr.markForCheck();\n }\n }\n\n /** Rows → spec + runtime + geometry. */\n private project(taskRows: MJTaskEntity[], depRows: MJTaskDependencyEntity[]): void {\n this.taskByID = new Map(taskRows.map((t) => [t.ID, t]));\n\n const projection = ProjectTaskRowsToSpec(this.WorkflowName, taskRows, depRows);\n this.Spec = projection.Spec;\n\n // Correlate by ID, not by name: a projected node's tempId IS the task id, which is the one\n // case where an id match is exact. Name correlation exists for specs whose tempIds were\n // never real, and would be needlessly lossy here.\n const knownIDs = new Set(taskRows.map((t) => t.ID));\n this.RuntimeStatus = this.replayAt\n ? this.statusAt(this.replayAt)\n : BuildRuntimeStatus(taskRows, new Map(), knownIDs);\n\n this.Positions = this.resolvePositions(projection.AuthoredPositions, taskRows, depRows);\n }\n\n /** Re-derives the overlay for the current replay position (or the present) from held rows. */\n private applyReplay(): void {\n if (this.taskByID.size === 0) return;\n const rows = [...this.taskByID.values()];\n this.RuntimeStatus = this.replayAt\n ? this.statusAt(this.replayAt)\n : BuildRuntimeStatus(rows, new Map(), new Set(rows.map((t) => t.ID)));\n this.cdr.markForCheck();\n }\n\n /** The overlay as it stood at `moment`, from each row's own timestamps. */\n private statusAt(moment: Date): TaskGraphRuntimeStatus {\n const at = moment.getTime();\n const status: TaskGraphRuntimeStatus = {};\n for (const [id, row] of this.taskByID) {\n const started = row.StartedAt?.getTime?.() ?? (row.StartedAt ? new Date(row.StartedAt).getTime() : null);\n const completed = row.CompletedAt?.getTime?.() ?? (row.CompletedAt ? new Date(row.CompletedAt).getTime() : null);\n if (started == null || started > at) status[id] = 'Pending';\n else if (completed == null || completed > at) status[id] = 'In Progress';\n else status[id] = NormalizeRuntimeState(row.Status);\n }\n return status;\n }\n\n /**\n * The author's arrangement where there is one, a computed layout everywhere else.\n *\n * Mixing the two per-node rather than choosing one for the whole graph: a workflow whose author\n * positioned some steps and left others where they fell should keep the positions they chose.\n * A wholly unpositioned graph — the normal case for anything an agent emitted — is laid out\n * entirely by the algorithm.\n */\n private resolvePositions(\n authored: Map<string, GraphNodePosition>,\n taskRows: MJTaskEntity[],\n depRows: MJTaskDependencyEntity[],\n ): Map<string, GraphNodePosition> {\n const missing = taskRows.filter((t) => !authored.has(t.ID)).map((t) => t.ID);\n if (missing.length === 0) return authored;\n\n const edges: GraphLayoutEdge[] = depRows.map((d) => ({ From: d.DependsOnTaskID, To: d.TaskID }));\n const computed = LayoutGraphNodes(taskRows.map((t) => t.ID), edges, { Direction: 'LR' });\n\n const resolved = new Map(computed);\n for (const [id, position] of authored) resolved.set(id, position);\n return resolved;\n }\n\n private isSettled(taskRows: MJTaskEntity[]): boolean {\n return taskRows.length > 0 && taskRows.every((t) => SETTLED.has(t.Status));\n }\n\n /**\n * Folds one live frame into the overlay.\n *\n * Direct status frames patch in place — a new `RuntimeStatus` object, because the canvas is\n * OnPush and mutation would render nothing. Frames whose consequences the dispatcher computes\n * across the whole graph (skips cascade, blocks propagate, settlement rolls up) reload the rows\n * instead: inferring a cascade client-side would be a second implementation of the engine's\n * rules, free to drift.\n */\n private foldFrame(frame: TaskGraphRunFrame): void {\n switch (frame.kind) {\n case 'TaskStarted':\n case 'TaskCompleted':\n case 'TaskFailed':\n if (frame.taskId && frame.status && this.RuntimeStatus) {\n const row = this.taskByID.get(frame.taskId);\n if (row) row.Status = frame.status as MJTaskEntity['Status'];\n this.RuntimeStatus = { ...this.RuntimeStatus, [frame.taskId]: NormalizeRuntimeState(frame.status) };\n if (frame.kind !== 'TaskStarted') this.LiveActivity.delete(frame.taskId);\n this.rebuildOverlay();\n this.emitSettledOnce();\n this.cdr.markForCheck();\n }\n break;\n case 'NodeProgress':\n if (frame.taskId && frame.progressMessage) {\n this.LiveActivity.set(frame.taskId, { Message: frame.progressMessage, Percent: frame.progressPercent });\n this.cdr.markForCheck();\n }\n break;\n case 'GraphSettled':\n this.scheduleFrameReload();\n // The engine said the graph is done — do not wait for the row reload to tell the host.\n if (!this.settledEmitted) {\n this.settledEmitted = true;\n this.Settled.emit();\n }\n break;\n case 'TaskSkipped':\n case 'TaskBlocked':\n case 'TaskAwaitingHuman':\n case 'GraphResumed':\n this.scheduleFrameReload();\n break;\n default:\n // GateDecision / ClaimChanged / PassCompleted / GraphPaused / BreakpointHit are\n // console-chrome concerns the HOST renders; unknown kinds are a newer server.\n break;\n }\n }\n\n /** One reload per burst of cascade frames, not one per frame. */\n private scheduleFrameReload(): void {\n if (this.frameReloadTimer) return;\n this.frameReloadTimer = setTimeout(() => {\n this.frameReloadTimer = null;\n void this.load();\n }, 250);\n }\n\n private schedulePoll(): void {\n this.pollTimer = setTimeout(() => void this.load(), Math.max(1, this.PollIntervalSeconds) * 1000);\n }\n\n private stopPolling(): void {\n if (this.pollTimer) {\n clearTimeout(this.pollTimer);\n this.pollTimer = null;\n }\n }\n\n private fail(message: string): void {\n LogError(`[TaskGraphRunView] ${message}`);\n this.ErrorMessage = message;\n this.cdr.markForCheck();\n }\n\n /** Canvas extent, so a host can size its container to the graph rather than guessing. */\n public get GraphBounds(): { Width: number; Height: number } {\n const box = GraphLayoutBounds(this.Positions);\n return { Width: box.Width, Height: box.Height };\n }\n}\n\nfunction isTypingTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n const tag = target.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable;\n}\n","@if (ErrorMessage) {\n <mj-alert Variant=\"error\" [Message]=\"ErrorMessage\"></mj-alert>\n} @else if (IsLoading) {\n <div class=\"run-view-loading\">Loading the workflow&rsquo;s steps&hellip;</div>\n} @else if (!Spec || Spec.tasks.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-diagram-project\"\n Title=\"No steps yet\"\n Message=\"This workflow has not created any steps.\">\n </mj-empty-state>\n} @else {\n <div class=\"run-view\" [style.height]=\"Height\">\n <div class=\"run-view-summary\">\n <span class=\"run-view-count\">{{ CompletedCount }} of {{ TotalCount }} complete</span>\n @if (SkippedCount > 0) {\n <span class=\"run-view-skipped\">{{ SkippedCount }} not taken</span>\n }\n @if (IsSettled) {\n <span class=\"run-view-done\">Finished</span>\n } @else if (GraphPaused) {\n <span class=\"run-view-waiting\">\n @if (PausedAtTaskID) { Waiting on {{ WaitingStepName }} }\n @else { Waiting to start — Continue or Step }\n </span>\n } @else if (RunningCount > 0) {\n <span class=\"run-view-running\">{{ RunningCount }} running</span>\n }\n @if (AllowBreakpointEditing && SelectedTaskID) {\n <button\n type=\"button\"\n class=\"run-view-bp\"\n [class.run-view-bp-on]=\"HasSelectedBreakpoint\"\n (click)=\"OnToggleSelectedBreakpoint()\"\n [attr.aria-pressed]=\"HasSelectedBreakpoint\"\n [attr.aria-label]=\"HasSelectedBreakpoint ? 'Remove breakpoint from ' + SelectedTaskName : 'Add breakpoint on ' + SelectedTaskName\"\n [title]=\"HasSelectedBreakpoint ? 'Remove breakpoint' : 'Break before this step'\">\n <i class=\"fa-circle\" [class.fa-solid]=\"HasSelectedBreakpoint\" [class.fa-regular]=\"!HasSelectedBreakpoint\" aria-hidden=\"true\"></i>\n </button>\n <span class=\"run-view-bp-name\">{{ SelectedTaskName }}</span>\n }\n </div>\n\n <div class=\"run-view-body\">\n @if (ShowVariables && !Prefs.InvocationOpen) {\n <button type=\"button\" class=\"run-view-vars-rail\"\n (click)=\"OnToggleInvocation()\"\n title=\"Show invocation and output\"\n aria-label=\"Show invocation and output\">\n <i class=\"fa-solid fa-code\" aria-hidden=\"true\"></i>\n <span>Data</span>\n </button>\n }\n <as-split class=\"run-view-split\" direction=\"horizontal\" unit=\"percent\"\n [gutterSize]=\"8\" (dragEnd)=\"OnInvocationSplitDragEnd($event.sizes)\">\n <as-split-area [size]=\"InvocationPaneSize\" [minSize]=\"14\" [visible]=\"InvocationPaneOpen\">\n <div class=\"run-view-vars\">\n <div class=\"run-view-vars-bar\">\n <span>Data</span>\n <button type=\"button\" class=\"run-view-vars-min\"\n (click)=\"OnToggleInvocation()\"\n title=\"Minimize\"\n aria-label=\"Minimize invocation and output\">\n <i class=\"fa-solid fa-chevron-left\" aria-hidden=\"true\"></i>\n </button>\n </div>\n <mj-task-graph-variables\n [InputPayload]=\"SelectedTask?.InputPayload\"\n [OutputPayload]=\"SelectedTask?.OutputPayload\"\n [Invocation]=\"Invocation\">\n </mj-task-graph-variables>\n </div>\n </as-split-area>\n <as-split-area [size]=\"CanvasPaneSize\" [minSize]=\"40\">\n <div class=\"run-view-canvas\">\n <mj-task-graph-editor\n [Spec]=\"Spec\"\n [RuntimeStatus]=\"RuntimeStatus\"\n [NodePositions]=\"Positions\"\n [DebugOverlay]=\"Overlay\"\n [ReadOnly]=\"true\"\n [ShowToolbar]=\"ShowToolbar\"\n [ToolbarVisibility]=\"ToolbarVisibility\"\n [ToolbarAlign]=\"ToolbarAlign\"\n [ShowPalette]=\"false\"\n [ShowProperties]=\"false\"\n [ShowMinimap]=\"false\"\n [ShowStatusBar]=\"false\"\n [ShowLegend]=\"ShowLegend\"\n (SelectionChanged)=\"OnSelectionChanged($event)\"\n (ConnectionSelected)=\"OnConnectionSelected($event)\"\n (LegendToggled)=\"LegendToggled.emit($event)\"\n (BeforeContextMenu)=\"OnBeforeContextMenu($event)\"\n (AfterContextMenuAction)=\"OnAfterContextMenuAction($event)\">\n </mj-task-graph-editor>\n </div>\n </as-split-area>\n </as-split>\n </div>\n </div>\n}\n"]}
@@ -48,7 +48,13 @@ export declare function BuildNameIndex(tasks: readonly {
48
48
  tempId: string;
49
49
  name: string;
50
50
  }[]): Map<string, string>;
51
- /** True once every task has reached a state nothing will move it out of. */
51
+ /**
52
+ * True once every task has reached a state nothing will move it out of.
53
+ *
54
+ * `Skipped` is terminal — a branch that was not taken is not going to be taken later — and its
55
+ * absence here meant a graph containing one never reported as settled, so a host polling on this
56
+ * would poll a finished workflow forever.
57
+ */
52
58
  export declare function IsRuntimeSettled(status: TaskGraphRuntimeStatus, tempIds: readonly string[]): boolean;
53
59
  /** A one-line progress summary, for hosts that show one beside the canvas. */
54
60
  export declare function SummarizeRuntime(status: TaskGraphRuntimeStatus, tempIds: readonly string[]): string;
@@ -1 +1 @@
1
- {"version":3,"file":"task-graph-runtime-source.d.ts","sourceRoot":"","sources":["../../src/lib/task-graph-runtime-source.ts"],"names":[],"mappings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B,GAAG;IAC9B,sFAAsF;IACtF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,SAAS,mBAAmB,EAAE,EACpC,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,GAClC,sBAAsB,CASxB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,qBAAqB,CAmB9F;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAItG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAGpG;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAQnG"}
@@ -37,6 +37,12 @@ export function NormalizeRuntimeState(status) {
37
37
  case 'Cancelled':
38
38
  case 'Deferred':
39
39
  case 'Pending':
40
+ // A branch the workflow declined. Absent from this list until now, so it fell to the default
41
+ // and was reported to the canvas as **Pending** — which is not a near-miss, it is the
42
+ // opposite: "still waiting to run" for a step that will never run. Everything downstream
43
+ // believed it. The node drew as an ordinary pending step, the edges into and out of it drew
44
+ // as live routes, and a settled graph could never satisfy `IsRuntimeSettled`.
45
+ case 'Skipped':
40
46
  return status;
41
47
  default:
42
48
  return 'Pending';
@@ -48,9 +54,15 @@ export function BuildNameIndex(tasks) {
48
54
  // a duplicated name is inherently ambiguous; picking one deterministically beats dropping both.
49
55
  return new Map(tasks.map((t) => [t.name, t.tempId]));
50
56
  }
51
- /** True once every task has reached a state nothing will move it out of. */
57
+ /**
58
+ * True once every task has reached a state nothing will move it out of.
59
+ *
60
+ * `Skipped` is terminal — a branch that was not taken is not going to be taken later — and its
61
+ * absence here meant a graph containing one never reported as settled, so a host polling on this
62
+ * would poll a finished workflow forever.
63
+ */
52
64
  export function IsRuntimeSettled(status, tempIds) {
53
- const terminal = new Set(['Complete', 'Failed', 'Cancelled']);
65
+ const terminal = new Set(['Complete', 'Failed', 'Cancelled', 'Skipped']);
54
66
  return tempIds.length > 0 && tempIds.every((id) => terminal.has(status[id] ?? 'Pending'));
55
67
  }
56
68
  /** A one-line progress summary, for hosts that show one beside the canvas. */
@@ -1 +1 @@
1
- {"version":3,"file":"task-graph-runtime-source.js","sourceRoot":"","sources":["../../src/lib/task-graph-runtime-source.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAC9B,IAAoC,EACpC,iBAA8C,EAC9C,YAAiC;IAEjC,MAAM,MAAM,GAA2B,EAAE,CAAC;IAE1C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnF,IAAI,CAAC,MAAM;YAAE,SAAS;QACtB,MAAM,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAiC;IACnE,QAAQ,MAAM,EAAE,CAAC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AK,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACvF,OAAO,GAAG,OAAO,CAAC,MAAM,QAAQ,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5F,CAAC","sourcesContent":["/**\n * @fileoverview Turning live `MJ: Tasks` rows into the canvas's runtime overlay.\n *\n * **Why this is a pure mapper and not a subscription.** A `widgets`-layer component must not own a\n * data subscription: it cannot know which provider it is on, whose rows it may read, or when the\n * host wants to start and stop watching. The host owns the subscription — it already has the\n * `BaseEntity` event stream or a `RunView` — and passes the rows here to be shaped for the canvas.\n *\n * That split is also what makes the runtime overlay work for **both** provenances. A durable graph\n * is watched through `MJ: Tasks` rows; an in-run flow through `AIAgentRunStep` rows. Different\n * sources, same shape by the time they reach the canvas, so one renderer serves both — which is the\n * whole point of the convergence.\n *\n * @module @memberjunction/ng-task-graph-editor\n */\nimport type { TaskGraphRuntimeState, TaskGraphRuntimeStatus } from './task-graph-canvas-adapter';\n\n/** The minimum a row must expose to drive the overlay. Structural, so any source can satisfy it. */\nexport type TaskGraphRuntimeRow = {\n /** Correlates the row back to a spec node. See {@link BuildRuntimeStatus} for how. */\n ID: string;\n Name: string;\n Status: string;\n};\n\n/**\n * Shapes live rows into the canvas's `RuntimeStatus` map.\n *\n * **Correlation is by name, with an ID fallback, and that ordering is deliberate.** A submitted\n * graph's Task rows carry database IDs, while the spec on the canvas carries producer-assigned\n * `tempId`s — the two never match, because the producer could not know real IDs at authoring time.\n * The task's *name* is the only value that survives submission unchanged, so it is the join key. An\n * ID match is still honored first for the case where a host is showing a graph whose `tempId`s\n * genuinely are row IDs — which is exactly what `ConvertAgentSpecToTaskGraph` produces.\n *\n * Rows that match nothing are skipped rather than guessed at: a wrong node lighting up green is\n * worse than a node that stays grey, because the first is believed.\n */\nexport function BuildRuntimeStatus(\n rows: readonly TaskGraphRuntimeRow[],\n specTempIdsByName: ReadonlyMap<string, string>,\n knownTempIds: ReadonlySet<string>,\n): TaskGraphRuntimeStatus {\n const status: TaskGraphRuntimeStatus = {};\n\n for (const row of rows) {\n const tempId = knownTempIds.has(row.ID) ? row.ID : specTempIdsByName.get(row.Name);\n if (!tempId) continue;\n status[tempId] = NormalizeRuntimeState(row.Status);\n }\n return status;\n}\n\n/**\n * Coerces a row's status string into the canvas vocabulary.\n *\n * Unknown values fall back to `Pending` rather than throwing. A status the UI has not heard of is a\n * schema that moved ahead of the client — which must degrade to \"we don't know yet\", not to a blank\n * canvas or an exception in a render path.\n */\nexport function NormalizeRuntimeState(status: string | null | undefined): TaskGraphRuntimeState {\n switch (status) {\n case 'In Progress':\n case 'Complete':\n case 'Failed':\n case 'Blocked':\n case 'Cancelled':\n case 'Deferred':\n case 'Pending':\n return status;\n default:\n return 'Pending';\n }\n}\n\n/** Index of task name → `tempId`, for the name-based correlation above. */\nexport function BuildNameIndex(tasks: readonly { tempId: string; name: string }[]): Map<string, string> {\n // Last writer wins on a duplicate name. Names are not unique in a spec — only `tempId` is — so\n // a duplicated name is inherently ambiguous; picking one deterministically beats dropping both.\n return new Map(tasks.map((t) => [t.name, t.tempId]));\n}\n\n/** True once every task has reached a state nothing will move it out of. */\nexport function IsRuntimeSettled(status: TaskGraphRuntimeStatus, tempIds: readonly string[]): boolean {\n const terminal = new Set<TaskGraphRuntimeState>(['Complete', 'Failed', 'Cancelled']);\n return tempIds.length > 0 && tempIds.every((id) => terminal.has(status[id] ?? 'Pending'));\n}\n\n/** A one-line progress summary, for hosts that show one beside the canvas. */\nexport function SummarizeRuntime(status: TaskGraphRuntimeStatus, tempIds: readonly string[]): string {\n const counts = new Map<TaskGraphRuntimeState, number>();\n for (const id of tempIds) {\n const state = status[id] ?? 'Pending';\n counts.set(state, (counts.get(state) ?? 0) + 1);\n }\n const parts = [...counts.entries()].map(([state, n]) => `${n} ${state.toLowerCase()}`);\n return `${tempIds.length} step${tempIds.length === 1 ? '' : 's'} — ${parts.join(', ')}`;\n}\n"]}
1
+ {"version":3,"file":"task-graph-runtime-source.js","sourceRoot":"","sources":["../../src/lib/task-graph-runtime-source.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAC9B,IAAoC,EACpC,iBAA8C,EAC9C,YAAiC;IAEjC,MAAM,MAAM,GAA2B,EAAE,CAAC;IAE1C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnF,IAAI,CAAC,MAAM;YAAE,SAAS;QACtB,MAAM,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAiC;IACnE,QAAQ,MAAM,EAAE,CAAC;QACb,KAAK,aAAa,CAAC;QACnB,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS,CAAC;QACf,KAAK,WAAW,CAAC;QACjB,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS,CAAC;QACf,6FAA6F;QAC7F,sFAAsF;QACtF,yFAAyF;QACzF,4FAA4F;QAC5F,8EAA8E;QAC9E,KAAK,SAAS;YACV,OAAO,MAAM,CAAC;QAClB;YACI,OAAO,SAAS,CAAC;IACzB,CAAC;AACL,CAAC;AA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,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5F,CAAC","sourcesContent":["/**\n * @fileoverview Turning live `MJ: Tasks` rows into the canvas's runtime overlay.\n *\n * **Why this is a pure mapper and not a subscription.** A `widgets`-layer component must not own a\n * data subscription: it cannot know which provider it is on, whose rows it may read, or when the\n * host wants to start and stop watching. The host owns the subscription — it already has the\n * `BaseEntity` event stream or a `RunView` — and passes the rows here to be shaped for the canvas.\n *\n * That split is also what makes the runtime overlay work for **both** provenances. A durable graph\n * is watched through `MJ: Tasks` rows; an in-run flow through `AIAgentRunStep` rows. Different\n * sources, same shape by the time they reach the canvas, so one renderer serves both — which is the\n * whole point of the convergence.\n *\n * @module @memberjunction/ng-task-graph-editor\n */\nimport type { TaskGraphRuntimeState, TaskGraphRuntimeStatus } from './task-graph-canvas-adapter';\n\n/** The minimum a row must expose to drive the overlay. Structural, so any source can satisfy it. */\nexport type TaskGraphRuntimeRow = {\n /** Correlates the row back to a spec node. See {@link BuildRuntimeStatus} for how. */\n ID: string;\n Name: string;\n Status: string;\n};\n\n/**\n * Shapes live rows into the canvas's `RuntimeStatus` map.\n *\n * **Correlation is by name, with an ID fallback, and that ordering is deliberate.** A submitted\n * graph's Task rows carry database IDs, while the spec on the canvas carries producer-assigned\n * `tempId`s — the two never match, because the producer could not know real IDs at authoring time.\n * The task's *name* is the only value that survives submission unchanged, so it is the join key. An\n * ID match is still honored first for the case where a host is showing a graph whose `tempId`s\n * genuinely are row IDs — which is exactly what `ConvertAgentSpecToTaskGraph` produces.\n *\n * Rows that match nothing are skipped rather than guessed at: a wrong node lighting up green is\n * worse than a node that stays grey, because the first is believed.\n */\nexport function BuildRuntimeStatus(\n rows: readonly TaskGraphRuntimeRow[],\n specTempIdsByName: ReadonlyMap<string, string>,\n knownTempIds: ReadonlySet<string>,\n): TaskGraphRuntimeStatus {\n const status: TaskGraphRuntimeStatus = {};\n\n for (const row of rows) {\n const tempId = knownTempIds.has(row.ID) ? row.ID : specTempIdsByName.get(row.Name);\n if (!tempId) continue;\n status[tempId] = NormalizeRuntimeState(row.Status);\n }\n return status;\n}\n\n/**\n * Coerces a row's status string into the canvas vocabulary.\n *\n * Unknown values fall back to `Pending` rather than throwing. A status the UI has not heard of is a\n * schema that moved ahead of the client — which must degrade to \"we don't know yet\", not to a blank\n * canvas or an exception in a render path.\n */\nexport function NormalizeRuntimeState(status: string | null | undefined): TaskGraphRuntimeState {\n switch (status) {\n case 'In Progress':\n case 'Complete':\n case 'Failed':\n case 'Blocked':\n case 'Cancelled':\n case 'Deferred':\n case 'Pending':\n // A branch the workflow declined. Absent from this list until now, so it fell to the default\n // and was reported to the canvas as **Pending** — which is not a near-miss, it is the\n // opposite: \"still waiting to run\" for a step that will never run. Everything downstream\n // believed it. The node drew as an ordinary pending step, the edges into and out of it drew\n // as live routes, and a settled graph could never satisfy `IsRuntimeSettled`.\n case 'Skipped':\n return status;\n default:\n return 'Pending';\n }\n}\n\n/** Index of task name → `tempId`, for the name-based correlation above. */\nexport function BuildNameIndex(tasks: readonly { tempId: string; name: string }[]): Map<string, string> {\n // Last writer wins on a duplicate name. Names are not unique in a spec — only `tempId` is — so\n // a duplicated name is inherently ambiguous; picking one deterministically beats dropping both.\n return new Map(tasks.map((t) => [t.name, t.tempId]));\n}\n\n/**\n * True once every task has reached a state nothing will move it out of.\n *\n * `Skipped` is terminal — a branch that was not taken is not going to be taken later — and its\n * absence here meant a graph containing one never reported as settled, so a host polling on this\n * would poll a finished workflow forever.\n */\nexport function IsRuntimeSettled(status: TaskGraphRuntimeStatus, tempIds: readonly string[]): boolean {\n const terminal = new Set<TaskGraphRuntimeState>(['Complete', 'Failed', 'Cancelled', 'Skipped']);\n return tempIds.length > 0 && tempIds.every((id) => terminal.has(status[id] ?? 'Pending'));\n}\n\n/** A one-line progress summary, for hosts that show one beside the canvas. */\nexport function SummarizeRuntime(status: TaskGraphRuntimeStatus, tempIds: readonly string[]): string {\n const counts = new Map<TaskGraphRuntimeState, number>();\n for (const id of tempIds) {\n const state = status[id] ?? 'Pending';\n counts.set(state, (counts.get(state) ?? 0) + 1);\n }\n const parts = [...counts.entries()].map(([state, n]) => `${n} ${state.toLowerCase()}`);\n return `${tempIds.length} step${tempIds.length === 1 ? '' : 's'} — ${parts.join(', ')}`;\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { type DebugVariable, type DebugVariableScope } from './debug-variables';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TaskGraphVariablesComponent {
4
+ set InputPayload(value: string | null | undefined);
5
+ set OutputPayload(value: string | null | undefined);
6
+ set Invocation(value: {
7
+ data?: unknown;
8
+ context?: unknown;
9
+ } | null);
10
+ Scopes: DebugVariableScope[];
11
+ Expanded: Set<string>;
12
+ private inputRaw;
13
+ private outputRaw;
14
+ private invocation;
15
+ Toggle(path: string): void;
16
+ IsExpanded(path: string): boolean;
17
+ Path(scope: string, name: string, parent?: string): string;
18
+ HasChildren(variable: DebugVariable): boolean;
19
+ private rebuild;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<TaskGraphVariablesComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<TaskGraphVariablesComponent, "mj-task-graph-variables", never, { "InputPayload": { "alias": "InputPayload"; "required": false; }; "OutputPayload": { "alias": "OutputPayload"; "required": false; }; "Invocation": { "alias": "Invocation"; "required": false; }; }, {}, never, never, true, never>;
22
+ }
23
+ //# sourceMappingURL=task-graph-variables.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-graph-variables.component.d.ts","sourceRoot":"","sources":["../../src/lib/task-graph-variables.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAGH,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAC1B,MAAM,mBAAmB,CAAC;;AAE3B,qBAQa,2BAA2B;IACpC,IACW,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAGvD;IACD,IACW,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAGxD;IACD,IACW,UAAU,CAAC,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,EAGxE;IAEM,MAAM,EAAE,kBAAkB,EAAE,CAAM;IAClC,QAAQ,cAAqB;IAEpC,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,UAAU,CAAsD;IAEjE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM1B,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIjC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAI1D,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO;IAIpD,OAAO,CAAC,OAAO;yCA1CN,2BAA2B;2CAA3B,2BAA2B;CAkDvC"}
@@ -0,0 +1,192 @@
1
+ /**
2
+ * VS Code VARIABLES pane for a selected workflow step.
3
+ *
4
+ * Paint only. Expanding a row is local UI state. The host owns which step is selected.
5
+ */
6
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
7
+ import { NgTemplateOutlet } from '@angular/common';
8
+ import { BuildVariableScopes, DecodePayload, } from './debug-variables';
9
+ import * as i0 from "@angular/core";
10
+ const _c0 = (a0, a1) => ({ $implicit: a0, path: a1, depth: 0 });
11
+ const _c1 = (a0, a1, a2) => ({ $implicit: a0, path: a1, depth: a2 });
12
+ const _forTrack0 = ($index, $item) => $item.Name;
13
+ function TaskGraphVariablesComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
14
+ i0.ɵɵelementStart(0, "div", 2);
15
+ i0.ɵɵtext(1, "Select a step to inspect its input and output.");
16
+ i0.ɵɵelementEnd();
17
+ } }
18
+ function TaskGraphVariablesComponent_For_3_Conditional_4_For_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵelementContainer(0);
20
+ } }
21
+ function TaskGraphVariablesComponent_For_3_Conditional_4_For_2_Template(rf, ctx) { if (rf & 1) {
22
+ i0.ɵɵtemplate(0, TaskGraphVariablesComponent_For_3_Conditional_4_For_2_ng_container_0_Template, 1, 0, "ng-container", 7);
23
+ } if (rf & 2) {
24
+ const variable_r4 = ctx.$implicit;
25
+ const scope_r2 = i0.ɵɵnextContext(2).$implicit;
26
+ const ctx_r2 = i0.ɵɵnextContext();
27
+ const row_r5 = i0.ɵɵreference(5);
28
+ i0.ɵɵproperty("ngTemplateOutlet", row_r5)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c0, variable_r4, ctx_r2.Path(scope_r2.Name, variable_r4.Name)));
29
+ } }
30
+ function TaskGraphVariablesComponent_For_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
31
+ i0.ɵɵelementStart(0, "ul", 6);
32
+ i0.ɵɵrepeaterCreate(1, TaskGraphVariablesComponent_For_3_Conditional_4_For_2_Template, 1, 5, "ng-container", null, _forTrack0);
33
+ i0.ɵɵelementEnd();
34
+ } if (rf & 2) {
35
+ const scope_r2 = i0.ɵɵnextContext().$implicit;
36
+ i0.ɵɵadvance();
37
+ i0.ɵɵrepeater(scope_r2.Variables);
38
+ } }
39
+ function TaskGraphVariablesComponent_For_3_Template(rf, ctx) { if (rf & 1) {
40
+ const _r1 = i0.ɵɵgetCurrentView();
41
+ i0.ɵɵelementStart(0, "div", 3)(1, "button", 4);
42
+ i0.ɵɵlistener("click", function TaskGraphVariablesComponent_For_3_Template_button_click_1_listener() { const scope_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.Toggle(scope_r2.Name)); });
43
+ i0.ɵɵelement(2, "i", 5);
44
+ i0.ɵɵtext(3);
45
+ i0.ɵɵelementEnd();
46
+ i0.ɵɵconditionalCreate(4, TaskGraphVariablesComponent_For_3_Conditional_4_Template, 3, 0, "ul", 6);
47
+ i0.ɵɵelementEnd();
48
+ } if (rf & 2) {
49
+ const scope_r2 = ctx.$implicit;
50
+ const ctx_r2 = i0.ɵɵnextContext();
51
+ i0.ɵɵadvance();
52
+ i0.ɵɵattribute("aria-expanded", ctx_r2.IsExpanded(scope_r2.Name));
53
+ i0.ɵɵadvance();
54
+ i0.ɵɵclassProp("fa-chevron-down", ctx_r2.IsExpanded(scope_r2.Name))("fa-chevron-right", !ctx_r2.IsExpanded(scope_r2.Name));
55
+ i0.ɵɵadvance();
56
+ i0.ɵɵtextInterpolate1(" ", scope_r2.Name, " ");
57
+ i0.ɵɵadvance();
58
+ i0.ɵɵconditional(ctx_r2.IsExpanded(scope_r2.Name) ? 4 : -1);
59
+ } }
60
+ function TaskGraphVariablesComponent_ng_template_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
61
+ i0.ɵɵelement(0, "i", 5);
62
+ } if (rf & 2) {
63
+ const path_r7 = i0.ɵɵnextContext().path;
64
+ const ctx_r2 = i0.ɵɵnextContext();
65
+ i0.ɵɵclassProp("fa-chevron-down", ctx_r2.IsExpanded(path_r7))("fa-chevron-right", !ctx_r2.IsExpanded(path_r7));
66
+ } }
67
+ function TaskGraphVariablesComponent_ng_template_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
68
+ i0.ɵɵelement(0, "span", 11);
69
+ } }
70
+ function TaskGraphVariablesComponent_ng_template_4_Conditional_8_For_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
71
+ i0.ɵɵelementContainer(0);
72
+ } }
73
+ function TaskGraphVariablesComponent_ng_template_4_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
74
+ i0.ɵɵtemplate(0, TaskGraphVariablesComponent_ng_template_4_Conditional_8_For_2_ng_container_0_Template, 1, 0, "ng-container", 7);
75
+ } if (rf & 2) {
76
+ const child_r8 = ctx.$implicit;
77
+ const ctx_r8 = i0.ɵɵnextContext(2);
78
+ const path_r7 = ctx_r8.path;
79
+ const depth_r10 = ctx_r8.depth;
80
+ const ctx_r2 = i0.ɵɵnextContext();
81
+ const row_r5 = i0.ɵɵreference(5);
82
+ i0.ɵɵproperty("ngTemplateOutlet", row_r5)("ngTemplateOutletContext", i0.ɵɵpureFunction3(2, _c1, child_r8, ctx_r2.Path("", child_r8.Name, path_r7), depth_r10 + 1));
83
+ } }
84
+ function TaskGraphVariablesComponent_ng_template_4_Conditional_8_Template(rf, ctx) { if (rf & 1) {
85
+ i0.ɵɵelementStart(0, "ul", 6);
86
+ i0.ɵɵrepeaterCreate(1, TaskGraphVariablesComponent_ng_template_4_Conditional_8_For_2_Template, 1, 6, "ng-container", null, _forTrack0);
87
+ i0.ɵɵelementEnd();
88
+ } if (rf & 2) {
89
+ const variable_r11 = i0.ɵɵnextContext().$implicit;
90
+ i0.ɵɵadvance();
91
+ i0.ɵɵrepeater(variable_r11.Children);
92
+ } }
93
+ function TaskGraphVariablesComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
94
+ const _r6 = i0.ɵɵgetCurrentView();
95
+ i0.ɵɵelementStart(0, "li", 8)(1, "button", 9);
96
+ i0.ɵɵlistener("click", function TaskGraphVariablesComponent_ng_template_4_Template_button_click_1_listener() { const path_r7 = i0.ɵɵrestoreView(_r6).path; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.Toggle(path_r7)); });
97
+ i0.ɵɵconditionalCreate(2, TaskGraphVariablesComponent_ng_template_4_Conditional_2_Template, 1, 4, "i", 10)(3, TaskGraphVariablesComponent_ng_template_4_Conditional_3_Template, 1, 0, "span", 11);
98
+ i0.ɵɵelementStart(4, "span");
99
+ i0.ɵɵtext(5);
100
+ i0.ɵɵelementEnd()();
101
+ i0.ɵɵelementStart(6, "span", 12);
102
+ i0.ɵɵtext(7);
103
+ i0.ɵɵelementEnd()();
104
+ i0.ɵɵconditionalCreate(8, TaskGraphVariablesComponent_ng_template_4_Conditional_8_Template, 3, 0, "ul", 6);
105
+ } if (rf & 2) {
106
+ const variable_r11 = ctx.$implicit;
107
+ const path_r7 = ctx.path;
108
+ const depth_r10 = ctx.depth;
109
+ const ctx_r2 = i0.ɵɵnextContext();
110
+ i0.ɵɵstyleProp("--vars-depth", depth_r10);
111
+ i0.ɵɵattribute("aria-expanded", ctx_r2.HasChildren(variable_r11) ? ctx_r2.IsExpanded(path_r7) : null);
112
+ i0.ɵɵadvance();
113
+ i0.ɵɵproperty("disabled", !ctx_r2.HasChildren(variable_r11));
114
+ i0.ɵɵadvance();
115
+ i0.ɵɵconditional(ctx_r2.HasChildren(variable_r11) ? 2 : 3);
116
+ i0.ɵɵadvance(3);
117
+ i0.ɵɵtextInterpolate(variable_r11.Name);
118
+ i0.ɵɵadvance();
119
+ i0.ɵɵattribute("data-kind", variable_r11.Kind);
120
+ i0.ɵɵadvance();
121
+ i0.ɵɵtextInterpolate(variable_r11.Preview);
122
+ i0.ɵɵadvance();
123
+ i0.ɵɵconditional(ctx_r2.HasChildren(variable_r11) && ctx_r2.IsExpanded(path_r7) ? 8 : -1);
124
+ } }
125
+ export class TaskGraphVariablesComponent {
126
+ set InputPayload(value) {
127
+ this.inputRaw = value;
128
+ this.rebuild();
129
+ }
130
+ set OutputPayload(value) {
131
+ this.outputRaw = value;
132
+ this.rebuild();
133
+ }
134
+ set Invocation(value) {
135
+ this.invocation = value;
136
+ this.rebuild();
137
+ }
138
+ Scopes = [];
139
+ Expanded = new Set();
140
+ inputRaw;
141
+ outputRaw;
142
+ invocation = null;
143
+ Toggle(path) {
144
+ if (this.Expanded.has(path))
145
+ this.Expanded.delete(path);
146
+ else
147
+ this.Expanded.add(path);
148
+ this.Expanded = new Set(this.Expanded);
149
+ }
150
+ IsExpanded(path) {
151
+ return this.Expanded.has(path);
152
+ }
153
+ Path(scope, name, parent) {
154
+ return parent ? `${parent}.${name}` : `${scope}.${name}`;
155
+ }
156
+ HasChildren(variable) {
157
+ return variable.Children.length > 0;
158
+ }
159
+ rebuild() {
160
+ this.Scopes = BuildVariableScopes({
161
+ input: DecodePayload(this.inputRaw),
162
+ output: DecodePayload(this.outputRaw),
163
+ invocation: this.invocation,
164
+ });
165
+ this.Expanded = new Set(this.Scopes.map((s) => s.Name));
166
+ }
167
+ static ɵfac = function TaskGraphVariablesComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TaskGraphVariablesComponent)(); };
168
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TaskGraphVariablesComponent, selectors: [["mj-task-graph-variables"]], inputs: { InputPayload: "InputPayload", OutputPayload: "OutputPayload", Invocation: "Invocation" }, decls: 6, vars: 1, consts: [["row", ""], ["role", "tree", "aria-label", "Variables", 1, "vars"], [1, "vars-empty"], [1, "vars-scope"], ["type", "button", 1, "vars-scope-head", 3, "click"], ["aria-hidden", "true", 1, "fa-solid"], [1, "vars-list"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["role", "treeitem", 1, "vars-row"], ["type", "button", 1, "vars-name", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", 3, "fa-chevron-down", "fa-chevron-right"], ["aria-hidden", "true", 1, "vars-leaf"], [1, "vars-preview"]], template: function TaskGraphVariablesComponent_Template(rf, ctx) { if (rf & 1) {
169
+ i0.ɵɵelementStart(0, "div", 1);
170
+ i0.ɵɵconditionalCreate(1, TaskGraphVariablesComponent_Conditional_1_Template, 2, 0, "div", 2);
171
+ i0.ɵɵrepeaterCreate(2, TaskGraphVariablesComponent_For_3_Template, 5, 7, "div", 3, _forTrack0);
172
+ i0.ɵɵelementEnd();
173
+ i0.ɵɵtemplate(4, TaskGraphVariablesComponent_ng_template_4_Template, 9, 9, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
174
+ } if (rf & 2) {
175
+ i0.ɵɵadvance();
176
+ i0.ɵɵconditional(ctx.Scopes.length === 0 ? 1 : -1);
177
+ i0.ɵɵadvance();
178
+ i0.ɵɵrepeater(ctx.Scopes);
179
+ } }, dependencies: [NgTemplateOutlet], styles: ["[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n}\n\n.vars[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1 1 auto;\n min-height: 0;\n overflow-x: hidden;\n overflow-y: auto;\n font-family: var(--mj-font-mono, ui-monospace, monospace);\n font-size: var(--mj-font-size-xs);\n background: var(--mj-bg-surface-sunken);\n}\n\n.vars-empty[_ngcontent-%COMP%] {\n padding: var(--mj-space-3);\n color: var(--mj-text-muted);\n font-family: var(--mj-font-sans, inherit);\n}\n\n.vars-scope-head[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 4px 8px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n font: inherit;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n text-align: left;\n cursor: pointer;\n}\n.vars-scope-head[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); }\n.vars-scope-head[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 8px; width: 10px; }\n\n.vars-list[_ngcontent-%COMP%] { list-style: none; margin: 0; padding: 0; }\n\n.vars-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);\n gap: var(--mj-space-2);\n align-items: baseline;\n padding: 1px 8px 1px calc(8px + (var(--vars-depth, 0) * 12px));\n}\n.vars-row[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); }\n\n.vars-name[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n padding: 0;\n border: none;\n background: transparent;\n color: var(--mj-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n.vars-name[_ngcontent-%COMP%]:disabled { cursor: default; }\n.vars-name[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 8px; width: 10px; color: var(--mj-text-muted); }\n.vars-leaf[_ngcontent-%COMP%] { display: inline-block; width: 10px; }\n.vars-name[_ngcontent-%COMP%] span[_ngcontent-%COMP%] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n.vars-preview[_ngcontent-%COMP%] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--mj-text-muted);\n}\n.vars-preview[data-kind='string'][_ngcontent-%COMP%] { color: var(--mj-status-success); }\n.vars-preview[data-kind='number'][_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n.vars-preview[data-kind='boolean'][_ngcontent-%COMP%] { color: var(--mj-status-warning); }\n.vars-preview[data-kind='null'][_ngcontent-%COMP%] { color: var(--mj-text-disabled); font-style: italic; }"], changeDetection: 0 });
180
+ }
181
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskGraphVariablesComponent, [{
182
+ type: Component,
183
+ args: [{ standalone: true, selector: 'mj-task-graph-variables', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"vars\" role=\"tree\" aria-label=\"Variables\">\n @if (Scopes.length === 0) {\n <div class=\"vars-empty\">Select a step to inspect its input and output.</div>\n }\n @for (scope of Scopes; track scope.Name) {\n <div class=\"vars-scope\">\n <button type=\"button\" class=\"vars-scope-head\" (click)=\"Toggle(scope.Name)\"\n [attr.aria-expanded]=\"IsExpanded(scope.Name)\">\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"IsExpanded(scope.Name)\"\n [class.fa-chevron-right]=\"!IsExpanded(scope.Name)\" aria-hidden=\"true\"></i>\n {{ scope.Name }}\n </button>\n @if (IsExpanded(scope.Name)) {\n <ul class=\"vars-list\">\n @for (variable of scope.Variables; track variable.Name) {\n <ng-container\n *ngTemplateOutlet=\"row; context: { $implicit: variable, path: Path(scope.Name, variable.Name), depth: 0 }\">\n </ng-container>\n }\n </ul>\n }\n </div>\n }\n</div>\n\n<ng-template #row let-variable let-path=\"path\" let-depth=\"depth\">\n <li class=\"vars-row\" [style.--vars-depth]=\"depth\" role=\"treeitem\"\n [attr.aria-expanded]=\"HasChildren(variable) ? IsExpanded(path) : null\">\n <button type=\"button\" class=\"vars-name\" [disabled]=\"!HasChildren(variable)\" (click)=\"Toggle(path)\">\n @if (HasChildren(variable)) {\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"IsExpanded(path)\"\n [class.fa-chevron-right]=\"!IsExpanded(path)\" aria-hidden=\"true\"></i>\n } @else {\n <span class=\"vars-leaf\" aria-hidden=\"true\"></span>\n }\n <span>{{ variable.Name }}</span>\n </button>\n <span class=\"vars-preview\" [attr.data-kind]=\"variable.Kind\">{{ variable.Preview }}</span>\n </li>\n @if (HasChildren(variable) && IsExpanded(path)) {\n <ul class=\"vars-list\">\n @for (child of variable.Children; track child.Name) {\n <ng-container\n *ngTemplateOutlet=\"row; context: { $implicit: child, path: Path('', child.Name, path), depth: depth + 1 }\">\n </ng-container>\n }\n </ul>\n }\n</ng-template>\n", styles: [":host {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n}\n\n.vars {\n display: flex;\n flex-direction: column;\n gap: 2px;\n flex: 1 1 auto;\n min-height: 0;\n overflow-x: hidden;\n overflow-y: auto;\n font-family: var(--mj-font-mono, ui-monospace, monospace);\n font-size: var(--mj-font-size-xs);\n background: var(--mj-bg-surface-sunken);\n}\n\n.vars-empty {\n padding: var(--mj-space-3);\n color: var(--mj-text-muted);\n font-family: var(--mj-font-sans, inherit);\n}\n\n.vars-scope-head {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 4px 8px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n font: inherit;\n font-weight: 700;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n text-align: left;\n cursor: pointer;\n}\n.vars-scope-head:hover { background: var(--mj-bg-surface-hover); }\n.vars-scope-head i { font-size: 8px; width: 10px; }\n\n.vars-list { list-style: none; margin: 0; padding: 0; }\n\n.vars-row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);\n gap: var(--mj-space-2);\n align-items: baseline;\n padding: 1px 8px 1px calc(8px + (var(--vars-depth, 0) * 12px));\n}\n.vars-row:hover { background: var(--mj-bg-surface-hover); }\n\n.vars-name {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n padding: 0;\n border: none;\n background: transparent;\n color: var(--mj-text-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n.vars-name:disabled { cursor: default; }\n.vars-name i { font-size: 8px; width: 10px; color: var(--mj-text-muted); }\n.vars-leaf { display: inline-block; width: 10px; }\n.vars-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n.vars-preview {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--mj-text-muted);\n}\n.vars-preview[data-kind='string'] { color: var(--mj-status-success); }\n.vars-preview[data-kind='number'] { color: var(--mj-brand-primary); }\n.vars-preview[data-kind='boolean'] { color: var(--mj-status-warning); }\n.vars-preview[data-kind='null'] { color: var(--mj-text-disabled); font-style: italic; }\n"] }]
184
+ }], null, { InputPayload: [{
185
+ type: Input
186
+ }], OutputPayload: [{
187
+ type: Input
188
+ }], Invocation: [{
189
+ type: Input
190
+ }] }); })();
191
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TaskGraphVariablesComponent, { className: "TaskGraphVariablesComponent", filePath: "src/lib/task-graph-variables.component.ts", lineNumber: 23 }); })();
192
+ //# sourceMappingURL=task-graph-variables.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-graph-variables.component.js","sourceRoot":"","sources":["../../src/lib/task-graph-variables.component.ts","../../src/lib/task-graph-variables.component.html"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAE,SAAS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AAa,CAAC,IAAI,CAAC,QAAQ,CAAC;YACnC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC;YACrC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC9B,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC;qHAjDQ,2BAA2B;6DAA3B,2BAA2B;YCtBxC,8BAAqD;YACnD,6FAA2B;YAG3B,8FAkBC;YACH,iBAAM;YAEN,6HAAiE;;YAxB/D,cAEC;YAFD,kDAEC;YACD,cAkBC;YAlBD,yBAkBC;4BDLW,gBAAgB;;iFAKjB,2BAA2B;cARvC,SAAS;6BACM,IAAI,YACN,yBAAyB,WAC1B,CAAC,gBAAgB,CAAC,mBAGV,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBAKL,KAAK;;kBAKL,KAAK;;kFAXG,2BAA2B","sourcesContent":["/**\n * VS Code VARIABLES pane for a selected workflow step.\n *\n * Paint only. Expanding a row is local UI state. The host owns which step is selected.\n */\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n BuildVariableScopes,\n DecodePayload,\n type DebugVariable,\n type DebugVariableScope,\n} from './debug-variables';\n\n@Component({\n standalone: true,\n selector: 'mj-task-graph-variables',\n imports: [NgTemplateOutlet],\n templateUrl: './task-graph-variables.component.html',\n styleUrls: ['./task-graph-variables.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TaskGraphVariablesComponent {\n @Input()\n public set InputPayload(value: string | null | undefined) {\n this.inputRaw = value;\n this.rebuild();\n }\n @Input()\n public set OutputPayload(value: string | null | undefined) {\n this.outputRaw = value;\n this.rebuild();\n }\n @Input()\n public set Invocation(value: { data?: unknown; context?: unknown } | null) {\n this.invocation = value;\n this.rebuild();\n }\n\n public Scopes: DebugVariableScope[] = [];\n public Expanded = new Set<string>();\n\n private inputRaw: string | null | undefined;\n private outputRaw: string | null | undefined;\n private invocation: { data?: unknown; context?: unknown } | null = null;\n\n public Toggle(path: string): void {\n if (this.Expanded.has(path)) this.Expanded.delete(path);\n else this.Expanded.add(path);\n this.Expanded = new Set(this.Expanded);\n }\n\n public IsExpanded(path: string): boolean {\n return this.Expanded.has(path);\n }\n\n public Path(scope: string, name: string, parent?: string): string {\n return parent ? `${parent}.${name}` : `${scope}.${name}`;\n }\n\n public HasChildren(variable: DebugVariable): boolean {\n return variable.Children.length > 0;\n }\n\n private rebuild(): void {\n this.Scopes = BuildVariableScopes({\n input: DecodePayload(this.inputRaw),\n output: DecodePayload(this.outputRaw),\n invocation: this.invocation,\n });\n this.Expanded = new Set(this.Scopes.map((s) => s.Name));\n }\n}\n","<div class=\"vars\" role=\"tree\" aria-label=\"Variables\">\n @if (Scopes.length === 0) {\n <div class=\"vars-empty\">Select a step to inspect its input and output.</div>\n }\n @for (scope of Scopes; track scope.Name) {\n <div class=\"vars-scope\">\n <button type=\"button\" class=\"vars-scope-head\" (click)=\"Toggle(scope.Name)\"\n [attr.aria-expanded]=\"IsExpanded(scope.Name)\">\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"IsExpanded(scope.Name)\"\n [class.fa-chevron-right]=\"!IsExpanded(scope.Name)\" aria-hidden=\"true\"></i>\n {{ scope.Name }}\n </button>\n @if (IsExpanded(scope.Name)) {\n <ul class=\"vars-list\">\n @for (variable of scope.Variables; track variable.Name) {\n <ng-container\n *ngTemplateOutlet=\"row; context: { $implicit: variable, path: Path(scope.Name, variable.Name), depth: 0 }\">\n </ng-container>\n }\n </ul>\n }\n </div>\n }\n</div>\n\n<ng-template #row let-variable let-path=\"path\" let-depth=\"depth\">\n <li class=\"vars-row\" [style.--vars-depth]=\"depth\" role=\"treeitem\"\n [attr.aria-expanded]=\"HasChildren(variable) ? IsExpanded(path) : null\">\n <button type=\"button\" class=\"vars-name\" [disabled]=\"!HasChildren(variable)\" (click)=\"Toggle(path)\">\n @if (HasChildren(variable)) {\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"IsExpanded(path)\"\n [class.fa-chevron-right]=\"!IsExpanded(path)\" aria-hidden=\"true\"></i>\n } @else {\n <span class=\"vars-leaf\" aria-hidden=\"true\"></span>\n }\n <span>{{ variable.Name }}</span>\n </button>\n <span class=\"vars-preview\" [attr.data-kind]=\"variable.Kind\">{{ variable.Preview }}</span>\n </li>\n @if (HasChildren(variable) && IsExpanded(path)) {\n <ul class=\"vars-list\">\n @for (child of variable.Children; track child.Name) {\n <ng-container\n *ngTemplateOutlet=\"row; context: { $implicit: child, path: Path('', child.Name, path), depth: depth + 1 }\">\n </ng-container>\n }\n </ul>\n }\n</ng-template>\n"]}
@@ -0,0 +1,23 @@
1
+ export type WorkflowDebugOverlayState = {
2
+ paused: boolean;
3
+ pausedAtTaskID: string | null;
4
+ breakpoints: string[];
5
+ edgeOverrides: Record<string, 'true' | 'false'>;
6
+ };
7
+ export declare function EmptyWorkflowDebugOverlay(): WorkflowDebugOverlayState;
8
+ export type WorkflowInvocationRoots = {
9
+ data?: unknown;
10
+ context?: unknown;
11
+ };
12
+ /** The parent task id a TaskGraph step records when Submit succeeds. */
13
+ export declare function ParentTaskIDFromStepOutput(outputData: string | Record<string, unknown> | null | undefined): string | null;
14
+ /** The flow dialect's `data` / `context` roots, from the parent bag. */
15
+ export declare function ParseWorkflowInvocation(raw: string | null | undefined): WorkflowInvocationRoots;
16
+ /**
17
+ * Reads `$.debug` from a parent task's `InputPayload`. Unparseable input is "not being
18
+ * debugged" — never a throw.
19
+ */
20
+ export declare function ParseWorkflowDebugOverlay(raw: string | null | undefined): WorkflowDebugOverlayState;
21
+ /** Union / difference for the next `SetBreakpoints` payload. UUID-case insensitive. */
22
+ export declare function ComposeBreakpointSet(current: readonly string[], taskID: string, enabled: boolean): string[];
23
+ //# sourceMappingURL=workflow-debug-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-debug-host.d.ts","sourceRoot":"","sources":["../../src/lib/workflow-debug-host.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,yBAAyB,GAAG;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;CACnD,CAAC;AAWF,wBAAgB,yBAAyB,IAAI,yBAAyB,CAErE;AAED,MAAM,MAAM,uBAAuB,GAAG;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,0BAA0B,CACtC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAChE,MAAM,GAAG,IAAI,CAef;AAED,wEAAwE;AACxE,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,uBAAuB,CAe/F;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,yBAAyB,CA2BnG;AAED,uFAAuF;AACvF,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,GACjB,MAAM,EAAE,CAIV"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Host-side debug helpers for a live graph. Paint + intent only — no Remote Operations.
3
+ *
4
+ * Both the test harness and the Explorer run console compose a breakpoint set and read `$.debug`
5
+ * off the parent row. The math lives here so those hosts cannot drift, and so a widgets-layer
6
+ * embed never has to import Explorer.
7
+ */
8
+ import { UUIDsEqual } from '@memberjunction/global';
9
+ const EMPTY = {
10
+ paused: false,
11
+ pausedAtTaskID: null,
12
+ breakpoints: [],
13
+ edgeOverrides: {},
14
+ };
15
+ const UUID_SHAPE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
16
+ export function EmptyWorkflowDebugOverlay() {
17
+ return { ...EMPTY, breakpoints: [], edgeOverrides: {} };
18
+ }
19
+ /** The parent task id a TaskGraph step records when Submit succeeds. */
20
+ export function ParentTaskIDFromStepOutput(outputData) {
21
+ if (outputData == null)
22
+ return null;
23
+ if (typeof outputData === 'object' && !Array.isArray(outputData)) {
24
+ const id = outputData['parentTaskID'];
25
+ return typeof id === 'string' && id.length > 0 ? id : null;
26
+ }
27
+ if (typeof outputData !== 'string' || outputData.length === 0)
28
+ return null;
29
+ try {
30
+ const parsed = JSON.parse(outputData);
31
+ return typeof parsed?.parentTaskID === 'string' && parsed.parentTaskID.length > 0
32
+ ? parsed.parentTaskID
33
+ : null;
34
+ }
35
+ catch {
36
+ return null;
37
+ }
38
+ }
39
+ /** The flow dialect's `data` / `context` roots, from the parent bag. */
40
+ export function ParseWorkflowInvocation(raw) {
41
+ if (!raw)
42
+ return {};
43
+ try {
44
+ const parsed = JSON.parse(raw);
45
+ if (!parsed || typeof parsed !== 'object' || !parsed.invocation || typeof parsed.invocation !== 'object') {
46
+ return {};
47
+ }
48
+ const inv = parsed.invocation;
49
+ const out = {};
50
+ if ('data' in inv)
51
+ out.data = inv['data'];
52
+ if ('context' in inv)
53
+ out.context = inv['context'];
54
+ return out;
55
+ }
56
+ catch {
57
+ return {};
58
+ }
59
+ }
60
+ /**
61
+ * Reads `$.debug` from a parent task's `InputPayload`. Unparseable input is "not being
62
+ * debugged" — never a throw.
63
+ */
64
+ export function ParseWorkflowDebugOverlay(raw) {
65
+ const state = EmptyWorkflowDebugOverlay();
66
+ if (!raw)
67
+ return state;
68
+ try {
69
+ const parsed = JSON.parse(raw);
70
+ if (!parsed || typeof parsed !== 'object' || !parsed.debug || typeof parsed.debug !== 'object') {
71
+ return state;
72
+ }
73
+ const d = parsed.debug;
74
+ if (d['paused'] === true || d['paused'] === 'true')
75
+ state.paused = true;
76
+ if (typeof d['pausedAtTaskID'] === 'string')
77
+ state.pausedAtTaskID = d['pausedAtTaskID'];
78
+ if (Array.isArray(d['breakpoints'])) {
79
+ state.breakpoints = d['breakpoints'].filter((b) => typeof b === 'string' && UUID_SHAPE.test(b));
80
+ }
81
+ if (d['edgeOverrides'] && typeof d['edgeOverrides'] === 'object') {
82
+ for (const [edgeID, verdict] of Object.entries(d['edgeOverrides'])) {
83
+ if (UUID_SHAPE.test(edgeID) && (verdict === 'true' || verdict === 'false')) {
84
+ state.edgeOverrides[edgeID] = verdict;
85
+ }
86
+ }
87
+ }
88
+ return state;
89
+ }
90
+ catch {
91
+ return state;
92
+ }
93
+ }
94
+ /** Union / difference for the next `SetBreakpoints` payload. UUID-case insensitive. */
95
+ export function ComposeBreakpointSet(current, taskID, enabled) {
96
+ const has = current.some((id) => UUIDsEqual(id, taskID));
97
+ if (enabled)
98
+ return has ? [...current] : [...current, taskID];
99
+ return current.filter((id) => !UUIDsEqual(id, taskID));
100
+ }
101
+ //# sourceMappingURL=workflow-debug-host.js.map