@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.
- package/LICENSE +180 -4
- package/README.md +197 -0
- package/dist/lib/debug-variables.d.ts +27 -0
- package/dist/lib/debug-variables.d.ts.map +1 -0
- package/dist/lib/debug-variables.js +96 -0
- package/dist/lib/debug-variables.js.map +1 -0
- package/dist/lib/pane-split.d.ts +11 -0
- package/dist/lib/pane-split.d.ts.map +1 -0
- package/dist/lib/pane-split.js +36 -0
- package/dist/lib/pane-split.js.map +1 -0
- package/dist/lib/task-graph-canvas-adapter.d.ts +142 -7
- package/dist/lib/task-graph-canvas-adapter.d.ts.map +1 -1
- package/dist/lib/task-graph-canvas-adapter.js +319 -44
- package/dist/lib/task-graph-canvas-adapter.js.map +1 -1
- package/dist/lib/task-graph-debug-toolbar.component.d.ts +27 -0
- package/dist/lib/task-graph-debug-toolbar.component.d.ts.map +1 -0
- package/dist/lib/task-graph-debug-toolbar.component.js +153 -0
- package/dist/lib/task-graph-debug-toolbar.component.js.map +1 -0
- package/dist/lib/task-graph-debugger.component.d.ts +96 -0
- package/dist/lib/task-graph-debugger.component.d.ts.map +1 -0
- package/dist/lib/task-graph-debugger.component.js +371 -0
- package/dist/lib/task-graph-debugger.component.js.map +1 -0
- package/dist/lib/task-graph-editor.component.d.ts +144 -5
- package/dist/lib/task-graph-editor.component.d.ts.map +1 -1
- package/dist/lib/task-graph-editor.component.js +321 -26
- package/dist/lib/task-graph-editor.component.js.map +1 -1
- package/dist/lib/task-graph-editor.module.d.ts +10 -5
- package/dist/lib/task-graph-editor.module.d.ts.map +1 -1
- package/dist/lib/task-graph-editor.module.js +53 -5
- package/dist/lib/task-graph-editor.module.js.map +1 -1
- package/dist/lib/task-graph-properties-panel.component.d.ts +34 -8
- package/dist/lib/task-graph-properties-panel.component.d.ts.map +1 -1
- package/dist/lib/task-graph-properties-panel.component.js +164 -45
- package/dist/lib/task-graph-properties-panel.component.js.map +1 -1
- package/dist/lib/task-graph-run-prefs.d.ts +34 -0
- package/dist/lib/task-graph-run-prefs.d.ts.map +1 -0
- package/dist/lib/task-graph-run-prefs.js +67 -0
- package/dist/lib/task-graph-run-prefs.js.map +1 -0
- package/dist/lib/task-graph-run-view.component.d.ts +290 -0
- package/dist/lib/task-graph-run-view.component.d.ts.map +1 -0
- package/dist/lib/task-graph-run-view.component.js +826 -0
- package/dist/lib/task-graph-run-view.component.js.map +1 -0
- package/dist/lib/task-graph-runtime-source.d.ts +7 -1
- package/dist/lib/task-graph-runtime-source.d.ts.map +1 -1
- package/dist/lib/task-graph-runtime-source.js +14 -2
- package/dist/lib/task-graph-runtime-source.js.map +1 -1
- package/dist/lib/task-graph-variables.component.d.ts +23 -0
- package/dist/lib/task-graph-variables.component.d.ts.map +1 -0
- package/dist/lib/task-graph-variables.component.js +192 -0
- package/dist/lib/task-graph-variables.component.js.map +1 -0
- package/dist/lib/workflow-debug-host.d.ts +23 -0
- package/dist/lib/workflow-debug-host.d.ts.map +1 -0
- package/dist/lib/workflow-debug-host.js +101 -0
- package/dist/lib/workflow-debug-host.js.map +1 -0
- package/dist/public-api.d.ts +8 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +8 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +11 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-graph-canvas-adapter.js","sourceRoot":"","sources":["../../src/lib/task-graph-canvas-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACH,mBAAmB,GAItB,MAAM,8BAA8B,CAAC;AAGtC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,qBAAqB,GAAyB;IACvD;QACI,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,OAAO;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CAAC;AAC3B,CAAC","sourcesContent":["/**\n * @fileoverview Projects a `TaskGraphSpec` onto the generic canvas shapes, and back.\n *\n * **Kept pure and separate from the component on purpose.** Everything interesting about rendering a\n * task graph — which node is an entry point, which edge is conditional, how a runtime status maps to\n * a visual one, whether removing a node orphans an edge — is decidable from data alone. Putting it\n * in a component would make it reachable only through a TestBed, and the resulting tests would be\n * about Angular rather than about graphs.\n *\n * **The direction flip, again.** A `TaskGraphSpec` edge points *backwards* (`dependsOn`: \"I wait for\n * X\"); a canvas connection points *forwards* (source → target). Same edge, opposite authoring\n * convention — the graph is written by whoever knows the prerequisites, the canvas drawn by whoever\n * follows the arrows. This is the second place in the program that inversion appears (Save as\n * Workflow is the first), which is why it is stated rather than left implicit.\n *\n * @module @memberjunction/ng-task-graph-editor\n */\nimport {\n NormalizeDependency,\n type TaskGraphSpec,\n type TaskGraphSpecNode,\n type TaskGraphDependency,\n} from '@memberjunction/ai-core-plus';\nimport type { FlowConnection, FlowNode, FlowNodeStatus, FlowNodeTypeConfig } from '@memberjunction/ng-flow-editor';\n\n/** Node types the palette offers. Two, because a task is either an agent's or a person's. */\nexport const TASK_GRAPH_NODE_TYPES: FlowNodeTypeConfig[] = [\n {\n Type: 'AgentTask',\n Label: 'Agent Step',\n Icon: 'fa-robot',\n Color: '#4A6FA5',\n Category: 'Steps',\n DefaultPorts: [\n { ID: 'in', Direction: 'input', Side: 'top', Multiple: true },\n { ID: 'out', Direction: 'output', Side: 'bottom', Multiple: true },\n ],\n },\n {\n Type: 'HumanTask',\n Label: 'Person Step',\n Icon: 'fa-user-check',\n Color: '#7B1FA2',\n Category: 'Steps',\n DefaultPorts: [\n { ID: 'in', Direction: 'input', Side: 'top', Multiple: true },\n { ID: 'out', Direction: 'output', Side: 'bottom', Multiple: true },\n ],\n },\n];\n\n/** Live per-task state for the runtime overlay, keyed by `tempId`. */\nexport type TaskGraphRuntimeStatus = Record<string, TaskGraphRuntimeState>;\n\n/** What a task is doing right now, in the durable engine's own vocabulary. */\nexport type TaskGraphRuntimeState =\n | 'Pending'\n | 'In Progress'\n | 'Complete'\n | 'Failed'\n | 'Blocked'\n | 'Cancelled'\n | 'Deferred';\n\n/**\n * Maps a durable task state onto the canvas's visual vocabulary.\n *\n * Two mappings are worth explaining. `Blocked` renders as a **warning**, not an error: nothing went\n * wrong, the graph simply cannot reach it — showing it as a failure would send someone hunting for a\n * bug that does not exist. `Deferred` renders as `pending` because, to the person watching, waiting\n * on a schedule and waiting on a prerequisite look and mean the same thing.\n */\nexport function RuntimeStateToNodeStatus(state: TaskGraphRuntimeState | undefined): FlowNodeStatus {\n switch (state) {\n case 'In Progress': return 'running';\n case 'Complete': return 'success';\n case 'Failed': return 'error';\n case 'Blocked': return 'warning';\n case 'Cancelled': return 'disabled';\n case 'Deferred': return 'pending';\n case 'Pending': return 'pending';\n default: return 'default';\n }\n}\n\n/** True when the node is a person's step rather than an agent's. */\nexport function IsHumanTask(node: TaskGraphSpecNode): boolean {\n return !node.agentName;\n}\n\n/** Entry points: nodes nothing else has to finish first. Same rule the traversal engine uses. */\nexport function GetEntryTempIds(spec: TaskGraphSpec): string[] {\n return (spec.tasks ?? []).filter((t) => (t.dependsOn ?? []).length === 0).map((t) => t.tempId);\n}\n\n/** Every dependency of a node, in normalized object form. */\nexport function GetDependencies(node: TaskGraphSpecNode): TaskGraphDependency[] {\n return (node.dependsOn ?? []).map(NormalizeDependency);\n}\n\n/** The `tempId`s that depend on `tempId` — i.e. what breaks if it is removed. */\nexport function GetDependents(spec: TaskGraphSpec, tempId: string): string[] {\n return (spec.tasks ?? [])\n .filter((t) => GetDependencies(t).some((d) => d.tempId === tempId))\n .map((t) => t.tempId);\n}\n\n/** Deterministic id for a canvas edge, so re-renders don't churn selection. */\nfunction edgeId(fromTempId: string, toTempId: string): string {\n return `${fromTempId}->${toTempId}`;\n}\n\n/**\n * Projects the spec onto canvas nodes.\n *\n * Positions are left at the origin: layout is the canvas's job (Dagre), and a spec carries no\n * geometry precisely because a task graph is a *logical* structure. An agent that emitted one never\n * had an opinion about where the boxes go.\n */\nexport function SpecToNodes(spec: TaskGraphSpec, runtime?: TaskGraphRuntimeStatus): FlowNode[] {\n const entryIds = new Set(GetEntryTempIds(spec));\n\n return (spec.tasks ?? []).map((task) => {\n const human = IsHumanTask(task);\n return {\n ID: task.tempId,\n Type: human ? 'HumanTask' : 'AgentTask',\n Label: task.name,\n Subtitle: human ? 'Waiting on a person' : task.agentName,\n Icon: human ? 'fa-user-check' : 'fa-robot',\n Status: RuntimeStateToNodeStatus(runtime?.[task.tempId]),\n StatusMessage: task.description,\n IsStartNode: entryIds.has(task.tempId),\n Position: { X: 0, Y: 0 },\n Ports: [\n { ID: 'in', Direction: 'input', Side: 'top', Multiple: true },\n { ID: 'out', Direction: 'output', Side: 'bottom', Multiple: true },\n ],\n Data: { TempId: task.tempId },\n };\n });\n}\n\n/**\n * Projects the spec's dependencies onto canvas connections, reversing their direction.\n *\n * A conditional edge is drawn dashed and labeled with its condition, because the difference between\n * \"always\" and \"only sometimes\" is the single most consequential thing about an edge and the one a\n * reader is most likely to miss when scanning a diagram.\n *\n * Edges naming a task that is not in the graph are skipped rather than drawn dangling — the\n * validator reports them as `UnknownDependency`, and rendering a connection to nowhere would be a\n * second, worse way of saying the same thing.\n */\nexport function SpecToConnections(spec: TaskGraphSpec): FlowConnection[] {\n const known = new Set((spec.tasks ?? []).map((t) => t.tempId));\n const connections: FlowConnection[] = [];\n\n for (const task of spec.tasks ?? []) {\n for (const dep of GetDependencies(task)) {\n if (!known.has(dep.tempId)) continue;\n\n const conditional = !!dep.condition?.trim();\n connections.push({\n ID: edgeId(dep.tempId, task.tempId),\n // Reversed: dependsOn points back at the prerequisite, the drawn arrow points forward.\n SourceNodeID: dep.tempId,\n SourcePortID: 'out',\n TargetNodeID: task.tempId,\n TargetPortID: 'in',\n Label: conditional ? 'if' : undefined,\n LabelDetail: dep.condition ?? undefined,\n LabelIcon: conditional ? 'fa-code-branch' : undefined,\n Condition: dep.condition ?? undefined,\n Style: conditional ? 'dashed' : 'solid',\n Data: { FromTempId: dep.tempId, ToTempId: task.tempId },\n });\n }\n }\n return connections;\n}\n\n/**\n * Adds a dependency to the spec, returning a NEW spec.\n *\n * Immutable because the component emits the result to a host that may keep it, diff it, or reject\n * it; mutating the input would let a canceled edit leak into the host's copy anyway. A duplicate\n * edge is a no-op rather than an error — dragging the same connection twice is a slip, not a\n * request to corrupt the graph.\n */\nexport function AddDependency(spec: TaskGraphSpec, fromTempId: string, toTempId: string, condition?: string): TaskGraphSpec {\n return {\n ...spec,\n tasks: (spec.tasks ?? []).map((task) => {\n if (task.tempId !== toTempId) return task;\n const existing = GetDependencies(task);\n if (existing.some((d) => d.tempId === fromTempId)) return task;\n const next: TaskGraphDependency | string = condition?.trim()\n ? { tempId: fromTempId, condition }\n : fromTempId;\n return { ...task, dependsOn: [...(task.dependsOn ?? []), next] };\n }),\n };\n}\n\n/** Removes a dependency, returning a NEW spec. */\nexport function RemoveDependency(spec: TaskGraphSpec, fromTempId: string, toTempId: string): TaskGraphSpec {\n return {\n ...spec,\n tasks: (spec.tasks ?? []).map((task) =>\n task.tempId !== toTempId\n ? task\n : { ...task, dependsOn: (task.dependsOn ?? []).filter((d) => NormalizeDependency(d).tempId !== fromTempId) },\n ),\n };\n}\n\n/**\n * Removes a task AND every edge into it, returning a NEW spec.\n *\n * Severing the inbound edges is not a convenience — leaving them would produce a graph whose\n * `dependsOn` names a task that no longer exists, which the validator rejects as\n * `UnknownDependency`. Deleting a box on a canvas should not make the graph invalid.\n */\nexport function RemoveTask(spec: TaskGraphSpec, tempId: string): TaskGraphSpec {\n return {\n ...spec,\n tasks: (spec.tasks ?? [])\n .filter((t) => t.tempId !== tempId)\n .map((t) => ({ ...t, dependsOn: (t.dependsOn ?? []).filter((d) => NormalizeDependency(d).tempId !== tempId) })),\n };\n}\n\n/** Adds a task, returning a NEW spec. */\nexport function AddTask(spec: TaskGraphSpec, task: TaskGraphSpecNode): TaskGraphSpec {\n return { ...spec, tasks: [...(spec.tasks ?? []), task] };\n}\n\n/** Replaces a task in place by `tempId`, returning a NEW spec. */\nexport function UpdateTask(spec: TaskGraphSpec, tempId: string, next: TaskGraphSpecNode): TaskGraphSpec {\n return { ...spec, tasks: (spec.tasks ?? []).map((t) => (t.tempId === tempId ? next : t)) };\n}\n\n/**\n * Would adding `from → to` create a cycle?\n *\n * Answered before the edge exists, so the canvas can refuse it rather than create an invalid graph\n * and report it afterwards. A self-edge is the degenerate case and is caught first.\n *\n * Iterative rather than recursive: the graph may come from an LLM, and a deeply-chained spec should\n * produce a refusal, not a stack overflow.\n */\nexport function WouldCreateCycle(spec: TaskGraphSpec, fromTempId: string, toTempId: string): boolean {\n if (fromTempId === toTempId) return true;\n\n // A cycle appears iff `from` is already reachable from `to` by following dependsOn edges —\n // i.e. `to` already (transitively) waits on `from`.\n const dependenciesOf = new Map<string, string[]>(\n (spec.tasks ?? []).map((t) => [t.tempId, GetDependencies(t).map((d) => d.tempId)]),\n );\n\n const stack = [...(dependenciesOf.get(fromTempId) ?? [])];\n const seen = new Set<string>();\n while (stack.length > 0) {\n const current = stack.pop()!;\n if (current === toTempId) return true;\n if (seen.has(current)) continue;\n seen.add(current);\n stack.push(...(dependenciesOf.get(current) ?? []));\n }\n return false;\n}\n\n/** A unique `tempId` for a newly added task, stable and readable. */\nexport function NextTempId(spec: TaskGraphSpec, prefix = 'task'): string {\n const taken = new Set((spec.tasks ?? []).map((t) => t.tempId));\n let n = (spec.tasks ?? []).length + 1;\n while (taken.has(`${prefix}${n}`)) n++;\n return `${prefix}${n}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"task-graph-canvas-adapter.js","sourceRoot":"","sources":["../../src/lib/task-graph-canvas-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACH,QAAQ,EACR,mBAAmB,EACnB,QAAQ,GAKX,MAAM,8BAA8B,CAAC;AA6BtC;;;;;;GAMG;AACH,MAAM,UA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\n * @fileoverview Projects a `TaskGraphSpec` onto the generic canvas shapes, and back.\n *\n * **Kept pure and separate from the component on purpose.** Everything interesting about rendering a\n * task graph — which node is an entry point, which edge is conditional, how a runtime status maps to\n * a visual one, whether removing a node orphans an edge — is decidable from data alone. Putting it\n * in a component would make it reachable only through a TestBed, and the resulting tests would be\n * about Angular rather than about graphs.\n *\n * **The direction flip, again.** A `TaskGraphSpec` edge points *backwards* (`dependsOn`: \"I wait for\n * X\"); a canvas connection points *forwards* (source → target). Same edge, opposite authoring\n * convention — the graph is written by whoever knows the prerequisites, the canvas drawn by whoever\n * follows the arrows. This is the second place in the program that inversion appears (Save as\n * Workflow is the first), which is why it is stated rather than left implicit.\n *\n * @module @memberjunction/ng-task-graph-editor\n */\nimport {\n ConfigOf,\n NormalizeDependency,\n TaskNode,\n type TaskNodeBase,\n type TaskGraphSpec,\n type TaskGraphSpecNode,\n type TaskGraphDependency,\n} from '@memberjunction/ai-core-plus';\nimport type { FlowConnection, FlowNode, FlowNodeStatus, FlowNodeTypeConfig, FlowPosition } from '@memberjunction/ng-flow-editor';\n\n/**\n * The shapes this canvas can DRAW.\n *\n * Three of the spec's seven `kind`s, and the choice is the canvas's: these are the shapes a person\n * authors. `Prompt`, `ForEach`, `While` and `External` are expressible in the spec but have no\n * authoring affordance here — a palette entry that cannot be configured would be worse than none.\n *\n * **Drawing and RENDERING are different questions**, which this type used to conflate. A run's\n * graph is displayed on the same canvas, and it contains kinds nobody can draw — so mapping them\n * all to `AgentTask` made a fully-configured ForEach render as \"AGENT STEP · No agent chosen yet\",\n * which is not merely imprecise: it says the step is broken. See {@link TaskGraphRenderType}.\n */\nexport type TaskGraphNodeType = 'AgentTask' | 'ActionTask' | 'HumanTask';\n\n/**\n * The shapes this canvas can SHOW — a superset of what it can draw.\n *\n * Display-only kinds exist because a task graph is rendered in two places: the editor, where a\n * person builds one, and a run view, where one that already ran is shown. The second must be able\n * to depict every kind the dispatcher can execute, whether or not the palette offers it.\n */\nexport type TaskGraphRenderType = TaskGraphNodeType | 'PromptTask' | 'ForEachTask' | 'WhileTask' | 'ExternalTask';\n\n/** A palette entry, pinned to one of the three authorable shapes. */\nexport type TaskGraphNodeTypeConfig = FlowNodeTypeConfig & { Type: TaskGraphNodeType };\n\n/**\n * Whether a shape is one a person can actually author here.\n *\n * The authoring paths — the palette, `NewTaskFromNodeType`, the properties panel — only handle the\n * three drawable shapes. Rendering handles more. This is the seam between the two, stated as a type\n * guard so the compiler enforces it rather than a cast pretending the distinction does not exist.\n */\nexport function IsAuthorableNodeType(type: TaskGraphRenderType): type is TaskGraphNodeType {\n return type === 'AgentTask' || type === 'ActionTask' || type === 'HumanTask';\n}\n\n/** A rendering entry — every shape the canvas can depict, authorable or not. */\nexport type TaskGraphRenderTypeConfig = FlowNodeTypeConfig & { Type: TaskGraphRenderType };\n\n/**\n * Port ids are scoped to their NODE, and must be.\n *\n * The canvas resolves a connection by looking its `fOutputId` / `fInputId` up among all registered\n * ports — a flat, graph-wide namespace. Giving every node ports literally called `in` and `out` made\n * every node's ports collide with every other node's, so a connection could not name which node's\n * port it meant. The result was a workflow that drew its boxes correctly and **no edges at all**:\n * nothing errored, because an unresolvable port is simply a connection with nowhere to attach.\n *\n * The Flow Agent editor — the other consumer of this canvas, whose edges have always drawn — scopes\n * its ports the same way (`${stepId}-input` / `${stepId}-output`). This is that convention, named,\n * so a future producer cannot reintroduce the collision by writing the obvious literal.\n */\nexport function InputPortID(tempId: string): string {\n return `${tempId}-in`;\n}\n\nexport function OutputPortID(tempId: string): string {\n return `${tempId}-out`;\n}\n\n/**\n * Palette defaults. These carry the bare names because a palette entry describes a node TYPE, not a\n * placed node — there is no id to scope them to yet. {@link SpecToNodes} assigns the real, scoped\n * ids when a node is actually placed on the canvas.\n */\nconst TASK_GRAPH_PORTS: FlowNodeTypeConfig['DefaultPorts'] = [\n { ID: 'in', Direction: 'input', Side: 'top', Multiple: true },\n { ID: 'out', Direction: 'output', Side: 'bottom', Multiple: true },\n];\n\n/** What the palette offers — one entry per assignment shape the spec supports. */\nexport const TASK_GRAPH_NODE_TYPES: readonly TaskGraphNodeTypeConfig[] = [\n {\n Type: 'AgentTask',\n Label: 'Agent Step',\n Icon: 'fa-robot',\n Color: '#4A6FA5',\n Category: 'Steps',\n DefaultPorts: TASK_GRAPH_PORTS,\n },\n {\n Type: 'ActionTask',\n Label: 'Action Step',\n Icon: 'fa-bolt',\n Color: '#3B82F6',\n Category: 'Steps',\n DefaultPorts: TASK_GRAPH_PORTS,\n },\n {\n Type: 'HumanTask',\n Label: 'Person Step',\n Icon: 'fa-user-check',\n Color: '#7B1FA2',\n Category: 'Steps',\n DefaultPorts: TASK_GRAPH_PORTS,\n },\n];\n\n/**\n * Everything the canvas can DEPICT: the palette, plus the kinds that only ever arrive from a run.\n *\n * Deliberately a superset rather than an extension of the palette — adding these to\n * `TASK_GRAPH_NODE_TYPES` would put un-configurable entries in the authoring toolbox.\n */\nexport const TASK_GRAPH_RENDER_TYPES: readonly TaskGraphRenderTypeConfig[] = [\n ...TASK_GRAPH_NODE_TYPES,\n { Type: 'PromptTask', Label: 'Prompt Step', Icon: 'fa-comment-dots', Color: '#8B5CF6', Category: 'Steps', DefaultPorts: TASK_GRAPH_PORTS },\n { Type: 'ForEachTask', Label: 'For Each Step', Icon: 'fa-repeat', Color: '#D97706', Category: 'Steps', DefaultPorts: TASK_GRAPH_PORTS },\n { Type: 'WhileTask', Label: 'While Step', Icon: 'fa-rotate', Color: '#D97706', Category: 'Steps', DefaultPorts: TASK_GRAPH_PORTS },\n { Type: 'ExternalTask', Label: 'External Step', Icon: 'fa-arrow-up-right-from-square', Color: '#0891B2', Category: 'Steps', DefaultPorts: TASK_GRAPH_PORTS },\n];\n\n/**\n * The config for a node type, or null when the type is not one of ours.\n *\n * Searches the RENDER set, so a run's ForEach resolves to its own icon and label instead of\n * silently falling back to the agent shape.\n */\nexport function GetNodeTypeConfig(type: string): TaskGraphRenderTypeConfig | null {\n return TASK_GRAPH_RENDER_TYPES.find((c) => c.Type === type) ?? null;\n}\n\n/** Live per-task state for the runtime overlay, keyed by `tempId`. */\nexport type TaskGraphRuntimeStatus = Record<string, TaskGraphRuntimeState>;\n\n/** What a task is doing right now, in the durable engine's own vocabulary. */\nexport type TaskGraphRuntimeState =\n | 'Pending'\n | 'In Progress'\n | 'Complete'\n | 'Failed'\n | 'Blocked'\n | 'Cancelled'\n | 'Deferred'\n // A branch the workflow did not take. Absent from this union until now, which is why it fell\n // through to the default rendering and a not-taken step drew as an ordinary one.\n | 'Skipped';\n\n/**\n * Maps a durable task state onto the canvas's visual vocabulary.\n *\n * Two mappings are worth explaining. `Blocked` renders as a **warning**, not an error: nothing went\n * wrong, the graph simply cannot reach it — showing it as a failure would send someone hunting for a\n * bug that does not exist. `Deferred` renders as `pending` because, to the person watching, waiting\n * on a schedule and waiting on a prerequisite look and mean the same thing.\n */\nexport function RuntimeStateToNodeStatus(state: TaskGraphRuntimeState | undefined): FlowNodeStatus {\n switch (state) {\n case 'In Progress': return 'running';\n case 'Complete': return 'success';\n case 'Failed': return 'error';\n case 'Blocked': return 'warning';\n case 'Cancelled': return 'disabled';\n // Its own state, not a shade of disabled: a branch the workflow did not take is a normal\n // outcome. Falling through to 'default' — which is what happened before — drew it as an\n // ordinary node, so a conditional workflow looked like it had run every branch.\n case 'Skipped': return 'skipped';\n case 'Deferred': return 'pending';\n case 'Pending': return 'pending';\n default: return 'default';\n }\n}\n\n/**\n * True when the node is a person's step.\n *\n * One field decides it now: spec v2 gives every node exactly one `kind`, so \"is this a person's\n * step\" stopped being an inference over three optional flags and became a comparison.\n */\nexport function IsHumanTask(node: TaskGraphSpecNode): boolean {\n return node.kind === 'Human';\n}\n\n/**\n * Which of the three shapes a node is, for rendering.\n *\n * An unassigned node (just added, nothing picked yet) reads as an agent step: it is the commonest\n * intent, and the validator is already telling the author, in words, that it needs an assignee.\n * Guessing \"person\" instead — which is what the old `!agentName` rule did — put a step in the\n * graph that claimed to be waiting on someone when nobody had said so.\n */\nexport function GetTaskNodeType(node: TaskGraphSpecNode): TaskGraphRenderType {\n switch (node.kind) {\n case 'Human': return 'HumanTask';\n case 'Action': return 'ActionTask';\n case 'Prompt': return 'PromptTask';\n case 'ForEach': return 'ForEachTask';\n case 'While': return 'WhileTask';\n case 'External': return 'ExternalTask';\n // An unassigned node — just added, nothing picked — reads as an agent step: the commonest\n // intent, and the validator is already saying in words that it needs an assignee.\n default: return 'AgentTask';\n }\n}\n\n/**\n * Builds the task a palette entry stands for.\n *\n * Pure, and here rather than in the component, because \"what does clicking *Person Step* actually\n * put in the graph\" is a fact about the spec — testable without a TestBed, and the one place the\n * assignment xor is honoured on creation.\n *\n * `defaultAgentName` / `defaultActionName` are what the host has to offer. When it has nothing, the\n * step is created unassigned on purpose: inventing an agent name that may not exist would produce a\n * graph that passes the canvas and fails at submission, whereas an unassigned step is reported\n * immediately by the same validator the engine runs.\n */\nexport function NewTaskFromNodeType(\n spec: TaskGraphSpec,\n type: TaskGraphNodeType,\n defaults: { agentName?: string; actionName?: string } = {},\n): TaskGraphSpecNode {\n const base: TaskNodeBase = {\n tempId: NextTempId(spec),\n name: NEW_TASK_NAMES[type],\n description: '',\n dependsOn: [],\n };\n switch (type) {\n case 'HumanTask': return TaskNode.Human(base);\n // A step created before the host has any names to offer is created with an empty one on\n // purpose: the validator reports it immediately, whereas inventing a name would produce a\n // graph that passes here and fails at submission.\n case 'ActionTask': return TaskNode.Action(base, { actionName: defaults.actionName ?? '' });\n default: return TaskNode.Agent(base, { agentName: defaults.agentName ?? '' });\n }\n}\n\n/** Default step names, so a new box says what it is before the author renames it. */\nconst NEW_TASK_NAMES: Record<TaskGraphNodeType, string> = {\n AgentTask: 'New agent step',\n ActionTask: 'New action step',\n HumanTask: 'New person step',\n};\n\n/** Entry points: nodes nothing else has to finish first. Same rule the traversal engine uses. */\nexport function GetEntryTempIds(spec: TaskGraphSpec): string[] {\n return (spec.tasks ?? []).filter((t) => (t.dependsOn ?? []).length === 0).map((t) => t.tempId);\n}\n\n/** Every dependency of a node, in normalized object form. */\nexport function GetDependencies(node: TaskGraphSpecNode): TaskGraphDependency[] {\n return (node.dependsOn ?? []).map(NormalizeDependency);\n}\n\n/** The `tempId`s that depend on `tempId` — i.e. what breaks if it is removed. */\nexport function GetDependents(spec: TaskGraphSpec, tempId: string): string[] {\n return (spec.tasks ?? [])\n .filter((t) => GetDependencies(t).some((d) => d.tempId === tempId))\n .map((t) => t.tempId);\n}\n\n/** Deterministic id for a canvas edge, so re-renders don't churn selection. */\nfunction edgeId(fromTempId: string, toTempId: string): string {\n return `${fromTempId}->${toTempId}`;\n}\n\n/**\n * Projects the spec onto canvas nodes.\n *\n * Positions are left at the origin: layout is the canvas's job (Dagre), and a spec carries no\n * geometry precisely because a task graph is a *logical* structure. An agent that emitted one never\n * had an opinion about where the boxes go.\n */\n/**\n * Projects the spec onto canvas nodes.\n *\n * `positions` carries geometry the spec cannot hold. `TaskGraphSpec` is an execution contract with\n * no layout field, so without a caller-held map every re-projection would return every node to the\n * origin — which is what previously forced a full re-arrange (and a viewport re-zoom) after every\n * single edit. Unknown ids fall back to the origin, which is also the correct starting state for a\n * graph that has never been laid out.\n */\n/**\n * Debug overlay the run view hands the adapter. Paint only — the widget never calls an operation.\n *\n * Breakpoints and the paused-at step become badges. Overrides restyle connections (dotted, never\n * dashed — dashed already means \"this edge is conditional\"). Held/forced edges stay visible even\n * when a skip cascade would otherwise drop them, so the run history cannot lie about why a branch\n * ran.\n */\nexport type TaskGraphDebugOverlay = {\n breakpoints?: readonly string[];\n pausedAtTaskID?: string | null;\n /** Graph is claim-gated. With no paused-at step, the entry node is what is waiting. */\n paused?: boolean;\n edgeOverrides?: Readonly<Record<string, 'true' | 'false'>>;\n /** Show the condition expression on the connection label, not just the word \"if\". */\n showConditions?: boolean;\n /** Edge IDs (or from→to) currently flowing — painted animated + brand. */\n activeEdgeIDs?: readonly string[];\n};\n\nexport function SpecToNodes(\n spec: TaskGraphSpec,\n runtime?: TaskGraphRuntimeStatus,\n positions?: ReadonlyMap<string, FlowPosition>,\n debug?: TaskGraphDebugOverlay,\n): FlowNode[] {\n const entryIds = new Set(GetEntryTempIds(spec));\n const breakpoints = new Set(debug?.breakpoints ?? []);\n\n return (spec.tasks ?? []).map((task) => {\n const type = GetTaskNodeType(task);\n const known = positions?.get(task.tempId);\n const awaiting = isAwaitingUser(task.tempId, entryIds, runtime, debug);\n const nextToRun = isNextToRun(task, runtime, debug, entryIds);\n const running = runtime?.[task.tempId] === 'In Progress';\n return {\n ID: task.tempId,\n Type: type,\n Label: task.name,\n Subtitle: TaskSubtitle(task, type),\n Icon: GetNodeTypeConfig(type)?.Icon ?? 'fa-circle-nodes',\n IconColor: awaiting || nextToRun || running ? 'var(--mj-brand-primary)' : undefined,\n // Keep the real runtime status. Mapping \"paused here\" to `running` drew a spinner\n // on a step that is waiting for the operator — it read as \"this is executing\".\n Status: RuntimeStateToNodeStatus(runtime?.[task.tempId]),\n StatusMessage: task.description,\n IsStartNode: entryIds.has(task.tempId),\n Badges: NodeDebugBadges(task.tempId, breakpoints, debug, runtime, entryIds),\n Position: known ? { ...known } : { X: 0, Y: 0 },\n Ports: [\n { ID: InputPortID(task.tempId), Direction: 'input', Side: 'top', Multiple: true },\n { ID: OutputPortID(task.tempId), Direction: 'output', Side: 'bottom', Multiple: true },\n ],\n Data: { TempId: task.tempId, AwaitingUser: awaiting, NextToRun: nextToRun },\n };\n });\n}\n\n/** Badge pills for an armed breakpoint and the step the graph actually stopped on. */\nexport function NodeDebugBadges(\n taskID: string,\n breakpoints: ReadonlySet<string>,\n debug?: TaskGraphDebugOverlay,\n runtime?: TaskGraphRuntimeStatus,\n entryIds?: ReadonlySet<string>,\n): FlowNode['Badges'] {\n const badges: NonNullable<FlowNode['Badges']> = [];\n if (isAwaitingUser(taskID, entryIds ?? new Set(), runtime, debug)) {\n badges.push({\n Label: 'Waiting on you — Continue or Step to run this step',\n Value: 'Waiting here',\n Icon: 'fa-pause',\n Color: 'var(--mj-brand-primary)',\n });\n }\n if (breakpoints.has(taskID)) {\n badges.push({\n Label: 'Breakpoint',\n Value: 'break',\n Icon: 'fa-circle',\n Color: 'var(--mj-status-error)',\n });\n }\n return badges.length > 0 ? badges : undefined;\n}\n\n/**\n * The one line under a node's name: who or what runs it.\n *\n * An unassigned step says so rather than showing nothing — a blank subtitle looks like a step that\n * is fine, and this one is the reason the validation banner is complaining.\n */\nexport function TaskSubtitle(task: TaskGraphSpecNode, type: TaskGraphRenderType = GetTaskNodeType(task)): string {\n switch (type) {\n case 'HumanTask': return 'Waiting on a person';\n case 'ActionTask': return ConfigOf(task, 'Action')?.actionName || 'No action chosen yet';\n case 'PromptTask': return ConfigOf(task, 'Prompt')?.promptName || 'No prompt chosen yet';\n // A loop's subtitle is what it REPEATS — the one fact that makes the node readable.\n case 'ForEachTask': return LoopBodyLabel(ConfigOf(task, 'ForEach')) ?? 'Repeats for each item';\n case 'WhileTask': return LoopBodyLabel(ConfigOf(task, 'While')) ?? 'Repeats until its condition is false';\n case 'ExternalTask': return ConfigOf(task, 'External')?.domain || 'Completed by an outside system';\n // Only a genuinely unassigned node reaches this now. It used to catch Prompt, ForEach,\n // While and External too — so a fully-configured loop displayed \"No agent chosen yet\",\n // which reads as a broken step rather than an unrecognised one.\n default: return ConfigOf(task, 'Agent')?.agentName || 'No agent chosen yet';\n }\n}\n\n/** What a loop repeats, when it says. */\nfunction LoopBodyLabel(\n op: { action?: { name: string }; subAgent?: { name: string }; prompt?: { name: string } } | null | undefined,\n): string | null {\n if (!op) return null;\n const body = op.action?.name ?? op.subAgent?.name ?? op.prompt?.name;\n return body ? `Repeats: ${body}` : null;\n}\n\n/**\n * Projects the spec's dependencies onto canvas connections, reversing their direction.\n *\n * A conditional edge is drawn dashed and labeled with its condition, because the difference between\n * \"always\" and \"only sometimes\" is the single most consequential thing about an edge and the one a\n * reader is most likely to miss when scanning a diagram.\n *\n * Edges naming a task that is not in the graph are skipped rather than drawn dangling — the\n * validator reports them as `UnknownDependency`, and rendering a connection to nowhere would be a\n * second, worse way of saying the same thing.\n */\nexport function SpecToConnections(\n spec: TaskGraphSpec,\n runtime?: TaskGraphRuntimeStatus,\n debug?: TaskGraphDebugOverlay,\n): FlowConnection[] {\n const known = new Set((spec.tasks ?? []).map((t) => t.tempId));\n const entryIds = new Set(GetEntryTempIds(spec));\n const connections: FlowConnection[] = [];\n\n for (const task of spec.tasks ?? []) {\n for (const dep of GetDependencies(task)) {\n if (!known.has(dep.tempId)) continue;\n\n const override = dep.id ? debug?.edgeOverrides?.[dep.id] : undefined;\n const eitherSkipped = runtime\n && (runtime[task.tempId] === 'Skipped' || runtime[dep.tempId] === 'Skipped');\n // RUN MODE DRAWS ONLY THE PATH TAKEN — except an operator-forced edge, which must stay\n // visible or the history lies about why a branch ran (or did not).\n if (eitherSkipped && !override) continue;\n\n const destQueued = isNextToRun(task, runtime, debug, entryIds);\n const flowing = destQueued || isFlowingEdge(dep.tempId, task.tempId, runtime, debug);\n connections.push(ProjectConnection(\n dep,\n task.tempId,\n override,\n debug?.showConditions === true,\n flowing,\n !flowing && isTraveledEdge(dep.tempId, task.tempId, runtime),\n ));\n }\n }\n return connections;\n}\n\n/** One canvas connection, including the override styling that must never look like a real verdict. */\nexport function ProjectConnection(\n dep: TaskGraphDependency,\n toTempId: string,\n override?: 'true' | 'false',\n showConditions: boolean = false,\n flowing: boolean = false,\n traveled: boolean = false,\n): FlowConnection {\n const conditional = !!dep.condition?.trim();\n const forced = override === 'true' || override === 'false';\n const conditionLabel = dep.condition?.trim()\n ? TruncateCondition(dep.condition.trim())\n : undefined;\n\n return {\n ID: edgeId(dep.tempId, toTempId),\n SourceNodeID: dep.tempId,\n SourcePortID: OutputPortID(dep.tempId),\n TargetNodeID: toTempId,\n TargetPortID: InputPortID(toTempId),\n Label: forced\n ? (override === 'true' ? 'forced yes' : 'forced no')\n : (conditional ? (showConditions && conditionLabel ? conditionLabel : 'if') : undefined),\n LabelDetail: forced\n ? `Operator set this path to ${override}${dep.condition ? ` — ${dep.condition}` : ''}`\n : (dep.condition ?? undefined),\n LabelIcon: forced ? 'fa-hand' : (conditional ? 'fa-code-branch' : undefined),\n LabelIconColor: forced ? 'var(--mj-status-warning)' : undefined,\n Condition: dep.condition ?? undefined,\n // Dotted is the override. Dashed means \"only sometimes\" until the path is taken —\n // after that the condition stays on the label, but the stroke is solid so a finished\n // branch does not still look tentative.\n Style: forced ? 'dotted' : (conditional && !traveled ? 'dashed' : 'solid'),\n Color: flowing\n ? 'var(--mj-brand-primary)'\n : (forced ? 'var(--mj-status-warning)' : (traveled ? 'var(--mj-status-success)' : undefined)),\n StrokeWidth: flowing ? 4.5 : (traveled || forced ? 3 : undefined),\n Animated: flowing,\n Data: { FromTempId: dep.tempId, ToTempId: toTempId, EdgeID: dep.id },\n };\n}\n\nconst TERMINAL_RUNTIME = new Set<TaskGraphRuntimeState>(['Complete', 'Failed', 'Cancelled', 'Skipped']);\n\nfunction isPausedHere(\n taskID: string,\n runtime?: TaskGraphRuntimeStatus,\n debug?: Pick<TaskGraphDebugOverlay, 'pausedAtTaskID'>,\n): boolean {\n if (debug?.pausedAtTaskID !== taskID) return false;\n const state = runtime?.[taskID];\n return !state || !TERMINAL_RUNTIME.has(state);\n}\n\n/**\n * The step the operator has to act on: the breakpoint we stopped at, or — at start-paused\n * before any claim — the entry node.\n */\nfunction isAwaitingUser(\n taskID: string,\n entryIds: ReadonlySet<string>,\n runtime?: TaskGraphRuntimeStatus,\n debug?: TaskGraphDebugOverlay,\n): boolean {\n if (isPausedHere(taskID, runtime, debug)) return true;\n if (!debug?.paused || debug.pausedAtTaskID) return false;\n if (!entryIds.has(taskID)) return false;\n const state = runtime?.[taskID];\n return !state || !TERMINAL_RUNTIME.has(state);\n}\n\n/**\n * The next claimable step: prerequisites are done (or it is an entry) and the engine has not\n * started it. Distinct from \"waiting on you\" — this one is waiting on the dispatcher.\n */\nfunction isNextToRun(\n task: TaskGraphSpecNode,\n runtime?: TaskGraphRuntimeStatus,\n debug?: TaskGraphDebugOverlay,\n entryIds?: ReadonlySet<string>,\n): boolean {\n if (isAwaitingUser(task.tempId, entryIds ?? new Set(), runtime, debug)) return false;\n const state = runtime?.[task.tempId];\n if (state === 'In Progress' || (state && TERMINAL_RUNTIME.has(state))) return false;\n const incoming = GetDependencies(task);\n if (incoming.length === 0) return true;\n const live = incoming.filter((d) => runtime?.[d.tempId] !== 'Skipped');\n if (live.length === 0) return false;\n return live.every((d) => runtime?.[d.tempId] === 'Complete');\n}\n\nfunction isFlowingEdge(\n fromTempId: string,\n toTempId: string,\n runtime?: TaskGraphRuntimeStatus,\n debug?: TaskGraphDebugOverlay,\n): boolean {\n if (isPausedHere(toTempId, runtime, debug)) return true;\n if (debug?.activeEdgeIDs?.includes(edgeId(fromTempId, toTempId))) return true;\n if (!runtime) return false;\n return runtime[fromTempId] === 'Complete' && runtime[toTempId] === 'In Progress';\n}\n\nconst TAKEN_ORIGIN = new Set<TaskGraphRuntimeState>(['Complete', 'Failed', 'Cancelled']);\nconst TAKEN_DEST = new Set<TaskGraphRuntimeState>(['In Progress', 'Complete', 'Failed', 'Cancelled']);\n\n/**\n * Path already taken — origin finished AND dest has actually started. Pending dests are still\n * candidates (a gate has not fired), so they stay dashed until one is claimed and the rest skip.\n */\nfunction isTraveledEdge(\n fromTempId: string,\n toTempId: string,\n runtime?: TaskGraphRuntimeStatus,\n): boolean {\n if (!runtime) return false;\n const fromState = runtime[fromTempId];\n const toState = runtime[toTempId];\n if (!fromState || !TAKEN_ORIGIN.has(fromState)) return false;\n if (!toState || !TAKEN_DEST.has(toState)) return false;\n return true;\n}\n\nfunction TruncateCondition(text: string, max: number = 28): string {\n return text.length <= max ? text : `${text.slice(0, max - 1)}…`;\n}\n\n/**\n * Adds a dependency to the spec, returning a NEW spec.\n *\n * Immutable because the component emits the result to a host that may keep it, diff it, or reject\n * it; mutating the input would let a canceled edit leak into the host's copy anyway. A duplicate\n * edge is a no-op rather than an error — dragging the same connection twice is a slip, not a\n * request to corrupt the graph.\n */\nexport function AddDependency(spec: TaskGraphSpec, fromTempId: string, toTempId: string, condition?: string): TaskGraphSpec {\n return {\n ...spec,\n tasks: (spec.tasks ?? []).map((task) => {\n if (task.tempId !== toTempId) return task;\n const existing = GetDependencies(task);\n if (existing.some((d) => d.tempId === fromTempId)) return task;\n const next: TaskGraphDependency | string = condition?.trim()\n ? { tempId: fromTempId, condition }\n : fromTempId;\n return { ...task, dependsOn: [...(task.dependsOn ?? []), next] };\n }),\n };\n}\n\n/** Removes a dependency, returning a NEW spec. */\nexport function RemoveDependency(spec: TaskGraphSpec, fromTempId: string, toTempId: string): TaskGraphSpec {\n return {\n ...spec,\n tasks: (spec.tasks ?? []).map((task) =>\n task.tempId !== toTempId\n ? task\n : { ...task, dependsOn: (task.dependsOn ?? []).filter((d) => NormalizeDependency(d).tempId !== fromTempId) },\n ),\n };\n}\n\n/**\n * Removes a task AND every edge into it, returning a NEW spec.\n *\n * Severing the inbound edges is not a convenience — leaving them would produce a graph whose\n * `dependsOn` names a task that no longer exists, which the validator rejects as\n * `UnknownDependency`. Deleting a box on a canvas should not make the graph invalid.\n */\nexport function RemoveTask(spec: TaskGraphSpec, tempId: string): TaskGraphSpec {\n return {\n ...spec,\n tasks: (spec.tasks ?? [])\n .filter((t) => t.tempId !== tempId)\n .map((t) => ({ ...t, dependsOn: (t.dependsOn ?? []).filter((d) => NormalizeDependency(d).tempId !== tempId) })),\n };\n}\n\n/** Adds a task, returning a NEW spec. */\nexport function AddTask(spec: TaskGraphSpec, task: TaskGraphSpecNode): TaskGraphSpec {\n return { ...spec, tasks: [...(spec.tasks ?? []), task] };\n}\n\n/** Replaces a task in place by `tempId`, returning a NEW spec. */\nexport function UpdateTask(spec: TaskGraphSpec, tempId: string, next: TaskGraphSpecNode): TaskGraphSpec {\n return { ...spec, tasks: (spec.tasks ?? []).map((t) => (t.tempId === tempId ? next : t)) };\n}\n\n/**\n * Would adding `from → to` create a cycle?\n *\n * Answered before the edge exists, so the canvas can refuse it rather than create an invalid graph\n * and report it afterwards. A self-edge is the degenerate case and is caught first.\n *\n * Iterative rather than recursive: the graph may come from an LLM, and a deeply-chained spec should\n * produce a refusal, not a stack overflow.\n */\nexport function WouldCreateCycle(spec: TaskGraphSpec, fromTempId: string, toTempId: string): boolean {\n if (fromTempId === toTempId) return true;\n\n // A cycle appears iff `from` is already reachable from `to` by following dependsOn edges —\n // i.e. `to` already (transitively) waits on `from`.\n const dependenciesOf = new Map<string, string[]>(\n (spec.tasks ?? []).map((t) => [t.tempId, GetDependencies(t).map((d) => d.tempId)]),\n );\n\n const stack = [...(dependenciesOf.get(fromTempId) ?? [])];\n const seen = new Set<string>();\n while (stack.length > 0) {\n const current = stack.pop()!;\n if (current === toTempId) return true;\n if (seen.has(current)) continue;\n seen.add(current);\n stack.push(...(dependenciesOf.get(current) ?? []));\n }\n return false;\n}\n\n/** A unique `tempId` for a newly added task, stable and readable. */\nexport function NextTempId(spec: TaskGraphSpec, prefix = 'task'): string {\n const taken = new Set((spec.tasks ?? []).map((t) => t.tempId));\n let n = (spec.tasks ?? []).length + 1;\n while (taken.has(`${prefix}${n}`)) n++;\n return `${prefix}${n}`;\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VS Code-style debug chrome: Continue / Pause / Step Over / Step Into / Stop.
|
|
3
|
+
*
|
|
4
|
+
* Intent only. The host owns Pause/Resume/Step Remote Operations. This widget never imports
|
|
5
|
+
* a transport, so the same bar can sit in the test harness and on the Explorer run console.
|
|
6
|
+
*/
|
|
7
|
+
import { EventEmitter } from '@angular/core';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class TaskGraphDebugToolbarComponent {
|
|
10
|
+
/** Graph is claim-gated. Continue / Step show; Pause hides. */
|
|
11
|
+
Paused: boolean;
|
|
12
|
+
/** A control is in flight — buttons disable, they do not vanish. */
|
|
13
|
+
Busy: boolean;
|
|
14
|
+
/** False when the graph has settled or there is nothing to drive. */
|
|
15
|
+
Enabled: boolean;
|
|
16
|
+
/** Every step is terminal — Play/Step hide; Finished is the state. */
|
|
17
|
+
Settled: boolean;
|
|
18
|
+
Pause: EventEmitter<void>;
|
|
19
|
+
Resume: EventEmitter<void>;
|
|
20
|
+
Step: EventEmitter<void>;
|
|
21
|
+
StepWave: EventEmitter<void>;
|
|
22
|
+
Cancel: EventEmitter<void>;
|
|
23
|
+
OnHotkey(event: KeyboardEvent): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TaskGraphDebugToolbarComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TaskGraphDebugToolbarComponent, "mj-task-graph-debug-toolbar", never, { "Paused": { "alias": "Paused"; "required": false; }; "Busy": { "alias": "Busy"; "required": false; }; "Enabled": { "alias": "Enabled"; "required": false; }; "Settled": { "alias": "Settled"; "required": false; }; }, { "Pause": "Pause"; "Resume": "Resume"; "Step": "Step"; "StepWave": "StepWave"; "Cancel": "Cancel"; }, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=task-graph-debug-toolbar.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-graph-debug-toolbar.component.d.ts","sourceRoot":"","sources":["../../src/lib/task-graph-debug-toolbar.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAsC,YAAY,EAA+B,MAAM,eAAe,CAAC;;AAE9G,qBAOa,8BAA8B;IACvC,+DAA+D;IAC/C,MAAM,UAAS;IAC/B,oEAAoE;IACpD,IAAI,UAAS;IAC7B,qEAAqE;IACrD,OAAO,UAAQ;IAC/B,sEAAsE;IACtD,OAAO,UAAS;IAEf,KAAK,qBAA4B;IACjC,MAAM,qBAA4B;IAClC,IAAI,qBAA4B;IAChC,QAAQ,qBAA4B;IACpC,MAAM,qBAA4B;IAG5C,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;yCAjBlC,8BAA8B;2CAA9B,8BAA8B;CAyC1C"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VS Code-style debug chrome: Continue / Pause / Step Over / Step Into / Stop.
|
|
3
|
+
*
|
|
4
|
+
* Intent only. The host owns Pause/Resume/Step Remote Operations. This widget never imports
|
|
5
|
+
* a transport, so the same bar can sit in the test harness and on the Explorer run console.
|
|
6
|
+
*/
|
|
7
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, HostListener, Input, Output } from '@angular/core';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
function TaskGraphDebugToolbarComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
i0.ɵɵdomElementStart(0, "span", 1);
|
|
11
|
+
i0.ɵɵdomElement(1, "i", 5);
|
|
12
|
+
i0.ɵɵtext(2, " Finished ");
|
|
13
|
+
i0.ɵɵdomElementEnd();
|
|
14
|
+
} }
|
|
15
|
+
function TaskGraphDebugToolbarComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
16
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
17
|
+
i0.ɵɵdomElementStart(0, "span", 6);
|
|
18
|
+
i0.ɵɵdomElement(1, "i", 7);
|
|
19
|
+
i0.ɵɵtext(2, " Paused ");
|
|
20
|
+
i0.ɵɵdomElementEnd();
|
|
21
|
+
i0.ɵɵdomElementStart(3, "button", 8);
|
|
22
|
+
i0.ɵɵdomListener("click", function TaskGraphDebugToolbarComponent_Conditional_2_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Resume.emit()); });
|
|
23
|
+
i0.ɵɵdomElement(4, "i", 9);
|
|
24
|
+
i0.ɵɵdomElementEnd();
|
|
25
|
+
i0.ɵɵdomElementStart(5, "button", 10);
|
|
26
|
+
i0.ɵɵdomListener("click", function TaskGraphDebugToolbarComponent_Conditional_2_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Step.emit()); });
|
|
27
|
+
i0.ɵɵdomElement(6, "i", 11);
|
|
28
|
+
i0.ɵɵdomElementStart(7, "span", 12);
|
|
29
|
+
i0.ɵɵtext(8, "Over");
|
|
30
|
+
i0.ɵɵdomElementEnd()();
|
|
31
|
+
i0.ɵɵdomElementStart(9, "button", 13);
|
|
32
|
+
i0.ɵɵdomListener("click", function TaskGraphDebugToolbarComponent_Conditional_2_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.StepWave.emit()); });
|
|
33
|
+
i0.ɵɵdomElement(10, "i", 14);
|
|
34
|
+
i0.ɵɵdomElementStart(11, "span", 12);
|
|
35
|
+
i0.ɵɵtext(12, "Into");
|
|
36
|
+
i0.ɵɵdomElementEnd()();
|
|
37
|
+
} if (rf & 2) {
|
|
38
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
39
|
+
i0.ɵɵadvance(3);
|
|
40
|
+
i0.ɵɵdomProperty("disabled", ctx_r1.Busy || !ctx_r1.Enabled);
|
|
41
|
+
i0.ɵɵadvance(2);
|
|
42
|
+
i0.ɵɵdomProperty("disabled", ctx_r1.Busy || !ctx_r1.Enabled);
|
|
43
|
+
i0.ɵɵadvance(4);
|
|
44
|
+
i0.ɵɵdomProperty("disabled", ctx_r1.Busy || !ctx_r1.Enabled);
|
|
45
|
+
} }
|
|
46
|
+
function TaskGraphDebugToolbarComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
48
|
+
i0.ɵɵdomElementStart(0, "span", 15);
|
|
49
|
+
i0.ɵɵdomElement(1, "i", 16);
|
|
50
|
+
i0.ɵɵtext(2, " Running ");
|
|
51
|
+
i0.ɵɵdomElementEnd();
|
|
52
|
+
i0.ɵɵdomElementStart(3, "button", 17);
|
|
53
|
+
i0.ɵɵdomListener("click", function TaskGraphDebugToolbarComponent_Conditional_3_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Pause.emit()); });
|
|
54
|
+
i0.ɵɵdomElement(4, "i", 7);
|
|
55
|
+
i0.ɵɵdomElementEnd();
|
|
56
|
+
} if (rf & 2) {
|
|
57
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
58
|
+
i0.ɵɵadvance(3);
|
|
59
|
+
i0.ɵɵdomProperty("disabled", ctx_r1.Busy || !ctx_r1.Enabled);
|
|
60
|
+
} }
|
|
61
|
+
export class TaskGraphDebugToolbarComponent {
|
|
62
|
+
/** Graph is claim-gated. Continue / Step show; Pause hides. */
|
|
63
|
+
Paused = false;
|
|
64
|
+
/** A control is in flight — buttons disable, they do not vanish. */
|
|
65
|
+
Busy = false;
|
|
66
|
+
/** False when the graph has settled or there is nothing to drive. */
|
|
67
|
+
Enabled = true;
|
|
68
|
+
/** Every step is terminal — Play/Step hide; Finished is the state. */
|
|
69
|
+
Settled = false;
|
|
70
|
+
Pause = new EventEmitter();
|
|
71
|
+
Resume = new EventEmitter();
|
|
72
|
+
Step = new EventEmitter();
|
|
73
|
+
StepWave = new EventEmitter();
|
|
74
|
+
Cancel = new EventEmitter();
|
|
75
|
+
OnHotkey(event) {
|
|
76
|
+
if (!this.Enabled || this.Busy || this.Settled)
|
|
77
|
+
return;
|
|
78
|
+
if (isToolbarTypingTarget(event.target))
|
|
79
|
+
return;
|
|
80
|
+
if (event.key === 'F5' && event.shiftKey) {
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
this.Cancel.emit();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (event.key === 'F5') {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
if (this.Paused)
|
|
88
|
+
this.Resume.emit();
|
|
89
|
+
else
|
|
90
|
+
this.Pause.emit();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (event.key === 'F10') {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
this.Step.emit();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (event.key === 'F11') {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
this.StepWave.emit();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
static ɵfac = function TaskGraphDebugToolbarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TaskGraphDebugToolbarComponent)(); };
|
|
104
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TaskGraphDebugToolbarComponent, selectors: [["mj-task-graph-debug-toolbar"]], hostBindings: function TaskGraphDebugToolbarComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
105
|
+
i0.ɵɵlistener("keydown", function TaskGraphDebugToolbarComponent_keydown_HostBindingHandler($event) { return ctx.OnHotkey($event); }, i0.ɵɵresolveDocument);
|
|
106
|
+
} }, inputs: { Paused: "Paused", Busy: "Busy", Enabled: "Enabled", Settled: "Settled" }, outputs: { Pause: "Pause", Resume: "Resume", Step: "Step", StepWave: "StepWave", Cancel: "Cancel" }, decls: 7, vars: 2, consts: [["role", "toolbar", "aria-label", "Workflow debugger", 1, "dbg-bar"], ["title", "Every step has finished", 1, "dbg-pill", "dbg-pill-done"], ["aria-hidden", "true", 1, "dbg-sep"], ["type", "button", "title", "Stop (Shift+F5) \u2014 cancel the remaining steps", "aria-label", "Stop", 1, "dbg-btn", "dbg-btn-stop", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-stop"], ["aria-hidden", "true", 1, "fa-solid", "fa-check"], ["title", "Nothing new starts until you continue or step", 1, "dbg-pill"], ["aria-hidden", "true", 1, "fa-solid", "fa-pause"], ["type", "button", "title", "Continue (F5) \u2014 run until the next breakpoint or the end", "aria-label", "Continue", 1, "dbg-btn", "dbg-btn-go", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-play"], ["type", "button", "title", "Step Over (F10) \u2014 run the next ready step, then pause again", "aria-label", "Step over", 1, "dbg-btn", "dbg-btn-labeled", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-share", "dbg-icon-over"], [1, "dbg-btn-text"], ["type", "button", "title", "Step Into (F11) \u2014 run every step that is ready right now, then pause. On a fork, all ready branches run.", "aria-label", "Step into", 1, "dbg-btn", "dbg-btn-labeled", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-turn-down"], ["title", "The dispatcher is claiming and running steps", 1, "dbg-pill", "dbg-pill-run"], ["aria-hidden", "true", 1, "fa-solid", "fa-spinner", "fa-spin"], ["type", "button", "title", "Pause (F5) \u2014 nothing new starts; steps already running will finish", "aria-label", "Pause", 1, "dbg-btn", 3, "click", "disabled"]], template: function TaskGraphDebugToolbarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
107
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
108
|
+
i0.ɵɵconditionalCreate(1, TaskGraphDebugToolbarComponent_Conditional_1_Template, 3, 0, "span", 1)(2, TaskGraphDebugToolbarComponent_Conditional_2_Template, 13, 3)(3, TaskGraphDebugToolbarComponent_Conditional_3_Template, 5, 1);
|
|
109
|
+
i0.ɵɵdomElement(4, "span", 2);
|
|
110
|
+
i0.ɵɵdomElementStart(5, "button", 3);
|
|
111
|
+
i0.ɵɵdomListener("click", function TaskGraphDebugToolbarComponent_Template_button_click_5_listener() { return ctx.Cancel.emit(); });
|
|
112
|
+
i0.ɵɵdomElement(6, "i", 4);
|
|
113
|
+
i0.ɵɵdomElementEnd()();
|
|
114
|
+
} if (rf & 2) {
|
|
115
|
+
i0.ɵɵadvance();
|
|
116
|
+
i0.ɵɵconditional(ctx.Settled ? 1 : ctx.Paused ? 2 : 3);
|
|
117
|
+
i0.ɵɵadvance(4);
|
|
118
|
+
i0.ɵɵdomProperty("disabled", ctx.Busy || ctx.Settled || !ctx.Enabled);
|
|
119
|
+
} }, styles: ["[_nghost-%COMP%] { display: inline-flex; }\n\n.dbg-bar[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n padding: 2px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-elevated);\n}\n\n.dbg-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin: 0 4px 0 6px;\n font-size: var(--mj-font-size-xs);\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-brand-primary);\n}\n.dbg-pill[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 10px; }\n.dbg-pill-run[_ngcontent-%COMP%] { color: var(--mj-status-warning); }\n.dbg-pill-done[_ngcontent-%COMP%] { color: var(--mj-status-success); }\n\n.dbg-btn[_ngcontent-%COMP%] {\n min-width: 28px;\n height: 28px;\n padding: 0 6px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n.dbg-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n.dbg-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.45;\n cursor: default;\n}\n.dbg-btn-go[_ngcontent-%COMP%] { color: var(--mj-status-success); }\n.dbg-btn-go[_ngcontent-%COMP%]:hover:not(:disabled) { color: var(--mj-status-success); }\n.dbg-btn-stop[_ngcontent-%COMP%] { color: var(--mj-status-error); }\n.dbg-btn-stop[_ngcontent-%COMP%]:hover:not(:disabled) { color: var(--mj-status-error); }\n\n.dbg-btn-labeled[_ngcontent-%COMP%] { gap: 4px; }\n.dbg-btn-text[_ngcontent-%COMP%] {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.02em;\n}\n\n\n.dbg-icon-over[_ngcontent-%COMP%] { transform: scaleY(-1); }\n\n.dbg-sep[_ngcontent-%COMP%] {\n width: 1px;\n height: 16px;\n margin: 0 2px;\n background: var(--mj-border-default);\n}"], changeDetection: 0 });
|
|
120
|
+
}
|
|
121
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskGraphDebugToolbarComponent, [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{ standalone: true, selector: 'mj-task-graph-debug-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dbg-bar\" role=\"toolbar\" aria-label=\"Workflow debugger\">\n @if (Settled) {\n <span class=\"dbg-pill dbg-pill-done\" title=\"Every step has finished\">\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n Finished\n </span>\n } @else if (Paused) {\n <span class=\"dbg-pill\" title=\"Nothing new starts until you continue or step\">\n <i class=\"fa-solid fa-pause\" aria-hidden=\"true\"></i>\n Paused\n </span>\n <button type=\"button\" class=\"dbg-btn dbg-btn-go\" [disabled]=\"Busy || !Enabled\"\n (click)=\"Resume.emit()\" title=\"Continue (F5) \u2014 run until the next breakpoint or the end\"\n aria-label=\"Continue\">\n <i class=\"fa-solid fa-play\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"dbg-btn dbg-btn-labeled\" [disabled]=\"Busy || !Enabled\"\n (click)=\"Step.emit()\"\n title=\"Step Over (F10) \u2014 run the next ready step, then pause again\"\n aria-label=\"Step over\">\n <i class=\"fa-solid fa-share dbg-icon-over\" aria-hidden=\"true\"></i>\n <span class=\"dbg-btn-text\">Over</span>\n </button>\n <button type=\"button\" class=\"dbg-btn dbg-btn-labeled\" [disabled]=\"Busy || !Enabled\"\n (click)=\"StepWave.emit()\"\n title=\"Step Into (F11) \u2014 run every step that is ready right now, then pause. On a fork, all ready branches run.\"\n aria-label=\"Step into\">\n <i class=\"fa-solid fa-turn-down\" aria-hidden=\"true\"></i>\n <span class=\"dbg-btn-text\">Into</span>\n </button>\n } @else {\n <span class=\"dbg-pill dbg-pill-run\" title=\"The dispatcher is claiming and running steps\">\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n Running\n </span>\n <button type=\"button\" class=\"dbg-btn\" [disabled]=\"Busy || !Enabled\"\n (click)=\"Pause.emit()\" title=\"Pause (F5) \u2014 nothing new starts; steps already running will finish\"\n aria-label=\"Pause\">\n <i class=\"fa-solid fa-pause\" aria-hidden=\"true\"></i>\n </button>\n }\n <span class=\"dbg-sep\" aria-hidden=\"true\"></span>\n <button type=\"button\" class=\"dbg-btn dbg-btn-stop\" [disabled]=\"Busy || Settled || !Enabled\"\n (click)=\"Cancel.emit()\" title=\"Stop (Shift+F5) \u2014 cancel the remaining steps\"\n aria-label=\"Stop\">\n <i class=\"fa-solid fa-stop\" aria-hidden=\"true\"></i>\n </button>\n</div>\n", styles: [":host { display: inline-flex; }\n\n.dbg-bar {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n padding: 2px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface-elevated);\n}\n\n.dbg-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin: 0 4px 0 6px;\n font-size: var(--mj-font-size-xs);\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-brand-primary);\n}\n.dbg-pill i { font-size: 10px; }\n.dbg-pill-run { color: var(--mj-status-warning); }\n.dbg-pill-done { color: var(--mj-status-success); }\n\n.dbg-btn {\n min-width: 28px;\n height: 28px;\n padding: 0 6px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: var(--mj-radius-sm);\n background: transparent;\n color: var(--mj-text-secondary);\n cursor: pointer;\n}\n.dbg-btn:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n.dbg-btn:disabled {\n opacity: 0.45;\n cursor: default;\n}\n.dbg-btn-go { color: var(--mj-status-success); }\n.dbg-btn-go:hover:not(:disabled) { color: var(--mj-status-success); }\n.dbg-btn-stop { color: var(--mj-status-error); }\n.dbg-btn-stop:hover:not(:disabled) { color: var(--mj-status-error); }\n\n.dbg-btn-labeled { gap: 4px; }\n.dbg-btn-text {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.02em;\n}\n/* `fa-share` curves up-right; rotate so it reads as \"step over this one\". */\n.dbg-icon-over { transform: scaleY(-1); }\n\n.dbg-sep {\n width: 1px;\n height: 16px;\n margin: 0 2px;\n background: var(--mj-border-default);\n}\n"] }]
|
|
124
|
+
}], null, { Paused: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], Busy: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], Enabled: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], Settled: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], Pause: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}], Resume: [{
|
|
135
|
+
type: Output
|
|
136
|
+
}], Step: [{
|
|
137
|
+
type: Output
|
|
138
|
+
}], StepWave: [{
|
|
139
|
+
type: Output
|
|
140
|
+
}], Cancel: [{
|
|
141
|
+
type: Output
|
|
142
|
+
}], OnHotkey: [{
|
|
143
|
+
type: HostListener,
|
|
144
|
+
args: ['document:keydown', ['$event']]
|
|
145
|
+
}] }); })();
|
|
146
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TaskGraphDebugToolbarComponent, { className: "TaskGraphDebugToolbarComponent", filePath: "src/lib/task-graph-debug-toolbar.component.ts", lineNumber: 16 }); })();
|
|
147
|
+
function isToolbarTypingTarget(target) {
|
|
148
|
+
if (!(target instanceof HTMLElement))
|
|
149
|
+
return false;
|
|
150
|
+
const tag = target.tagName;
|
|
151
|
+
return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || target.isContentEditable;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=task-graph-debug-toolbar.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-graph-debug-toolbar.component.js","sourceRoot":"","sources":["../../src/lib/task-graph-debug-toolbar.component.ts","../../src/lib/task-graph-debug-toolbar.component.html"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;;ICJ1G,kCAAqE;IACnE,0BAAoD;IACpD,0BACF;IAAA,oBAAO;;;;IAEP,kCAA6E;IAC3E,0BAAoD;IACpD,wBACF;IAAA,oBAAO;IACP,oCAE8B;IADtB,qMAAS,oBAAa,KAAC;IAE7B,0BAAmD;IACrD,oBAAS;IACT,qCAG+B;IAFvB,qMAAS,kBAAW,KAAC;IAG3B,2BAAkE;IAClE,mCAA2B;IAAA,oBAAI;IACjC,AADiC,oBAAO,EAC/B;IACT,qCAG+B;IAFvB,qMAAS,sBAAe,KAAC;IAG/B,4BAAwD;IACxD,oCAA2B;IAAA,qBAAI;IACjC,AADiC,oBAAO,EAC/B;;;IAlBwC,eAA6B;IAA7B,4DAA6B;IAKxB,eAA6B;IAA7B,4DAA6B;IAO7B,eAA6B;IAA7B,4DAA6B;;;;IAQnF,mCAAyF;IACvF,2BAA8D;IAC9D,yBACF;IAAA,oBAAO;IACP,qCAE2B;IADnB,qMAAS,mBAAY,KAAC;IAE5B,0BAAoD;IACtD,oBAAS;;;IAJ6B,eAA6B;IAA7B,4DAA6B;;ADpBvE,MAAM,OAAO,8BAA8B;IACvC,+DAA+D;IAC/C,MAAM,GAAG,KAAK,CAAC;IAC/B,oEAAoE;IACpD,IAAI,GAAG,KAAK,CAAC;IAC7B,qEAAqE;IACrD,OAAO,GAAG,IAAI,CAAC;IAC/B,sEAAsE;IACtD,OAAO,GAAG,KAAK,CAAC;IAEf,KAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;IACjC,MAAM,GAAG,IAAI,YAAY,EAAQ,CAAC;IAClC,IAAI,GAAG,IAAI,YAAY,EAAQ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EvD,AADE,oBAAS,EACL;;YA9CJ,cAuCC;YAvCD,sDAuCC;YAEkD,eAAwC;YAAxC,qEAAwC;;;iFD3BhF,8BAA8B;cAP1C,SAAS;6BACM,IAAI,YACN,6BAA6B,mBAGtB,uBAAuB,CAAC,MAAM;;kBAI9C,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAEN,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFAhBnC,8BAA8B;AA2C3C,SAAS,qBAAqB,CAAC,MAA0B;IACrD,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 * VS Code-style debug chrome: Continue / Pause / Step Over / Step Into / Stop.\n *\n * Intent only. The host owns Pause/Resume/Step Remote Operations. This widget never imports\n * a transport, so the same bar can sit in the test harness and on the Explorer run console.\n */\nimport { ChangeDetectionStrategy, Component, EventEmitter, HostListener, Input, Output } from '@angular/core';\n\n@Component({\n standalone: true,\n selector: 'mj-task-graph-debug-toolbar',\n templateUrl: './task-graph-debug-toolbar.component.html',\n styleUrls: ['./task-graph-debug-toolbar.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TaskGraphDebugToolbarComponent {\n /** Graph is claim-gated. Continue / Step show; Pause hides. */\n @Input() public Paused = false;\n /** A control is in flight — buttons disable, they do not vanish. */\n @Input() public Busy = false;\n /** False when the graph has settled or there is nothing to drive. */\n @Input() public Enabled = true;\n /** Every step is terminal — Play/Step hide; Finished is the state. */\n @Input() public Settled = false;\n\n @Output() public Pause = new EventEmitter<void>();\n @Output() public Resume = new EventEmitter<void>();\n @Output() public Step = new EventEmitter<void>();\n @Output() public StepWave = new EventEmitter<void>();\n @Output() public Cancel = new EventEmitter<void>();\n\n @HostListener('document:keydown', ['$event'])\n public OnHotkey(event: KeyboardEvent): void {\n if (!this.Enabled || this.Busy || this.Settled) return;\n if (isToolbarTypingTarget(event.target)) return;\n if (event.key === 'F5' && event.shiftKey) {\n event.preventDefault();\n this.Cancel.emit();\n return;\n }\n if (event.key === 'F5') {\n event.preventDefault();\n if (this.Paused) this.Resume.emit();\n else this.Pause.emit();\n return;\n }\n if (event.key === 'F10') {\n event.preventDefault();\n this.Step.emit();\n return;\n }\n if (event.key === 'F11') {\n event.preventDefault();\n this.StepWave.emit();\n }\n }\n}\n\nfunction isToolbarTypingTarget(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","<div class=\"dbg-bar\" role=\"toolbar\" aria-label=\"Workflow debugger\">\n @if (Settled) {\n <span class=\"dbg-pill dbg-pill-done\" title=\"Every step has finished\">\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n Finished\n </span>\n } @else if (Paused) {\n <span class=\"dbg-pill\" title=\"Nothing new starts until you continue or step\">\n <i class=\"fa-solid fa-pause\" aria-hidden=\"true\"></i>\n Paused\n </span>\n <button type=\"button\" class=\"dbg-btn dbg-btn-go\" [disabled]=\"Busy || !Enabled\"\n (click)=\"Resume.emit()\" title=\"Continue (F5) — run until the next breakpoint or the end\"\n aria-label=\"Continue\">\n <i class=\"fa-solid fa-play\" aria-hidden=\"true\"></i>\n </button>\n <button type=\"button\" class=\"dbg-btn dbg-btn-labeled\" [disabled]=\"Busy || !Enabled\"\n (click)=\"Step.emit()\"\n title=\"Step Over (F10) — run the next ready step, then pause again\"\n aria-label=\"Step over\">\n <i class=\"fa-solid fa-share dbg-icon-over\" aria-hidden=\"true\"></i>\n <span class=\"dbg-btn-text\">Over</span>\n </button>\n <button type=\"button\" class=\"dbg-btn dbg-btn-labeled\" [disabled]=\"Busy || !Enabled\"\n (click)=\"StepWave.emit()\"\n title=\"Step Into (F11) — run every step that is ready right now, then pause. On a fork, all ready branches run.\"\n aria-label=\"Step into\">\n <i class=\"fa-solid fa-turn-down\" aria-hidden=\"true\"></i>\n <span class=\"dbg-btn-text\">Into</span>\n </button>\n } @else {\n <span class=\"dbg-pill dbg-pill-run\" title=\"The dispatcher is claiming and running steps\">\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n Running\n </span>\n <button type=\"button\" class=\"dbg-btn\" [disabled]=\"Busy || !Enabled\"\n (click)=\"Pause.emit()\" title=\"Pause (F5) — nothing new starts; steps already running will finish\"\n aria-label=\"Pause\">\n <i class=\"fa-solid fa-pause\" aria-hidden=\"true\"></i>\n </button>\n }\n <span class=\"dbg-sep\" aria-hidden=\"true\"></span>\n <button type=\"button\" class=\"dbg-btn dbg-btn-stop\" [disabled]=\"Busy || Settled || !Enabled\"\n (click)=\"Cancel.emit()\" title=\"Stop (Shift+F5) — cancel the remaining steps\"\n aria-label=\"Stop\">\n <i class=\"fa-solid fa-stop\" aria-hidden=\"true\"></i>\n </button>\n</div>\n"]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drop-in debugger for a live task graph.
|
|
3
|
+
*
|
|
4
|
+
* This is a wrap of the existing run view + VCR toolbar + the session wiring the harness and
|
|
5
|
+
* Runs console already had (RouteOperation, frame subscribe, `$.debug` bag). The picture and
|
|
6
|
+
* the verbs are unchanged; a host now supplies a parent task id and nothing else.
|
|
7
|
+
*
|
|
8
|
+
* @module @memberjunction/ng-task-graph-editor
|
|
9
|
+
*/
|
|
10
|
+
import { ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
11
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
12
|
+
import type { FlowToolbarAlign, FlowToolbarVisibility } from '@memberjunction/ng-flow-editor';
|
|
13
|
+
import { type WorkflowInvocationRoots } from './workflow-debug-host';
|
|
14
|
+
import { TaskGraphRunViewComponent, type TaskGraphRunConnectionSelectedEvent, type TaskGraphRunFrame, type TaskGraphRunNodeSelectedEvent } from './task-graph-run-view.component';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
export declare class TaskGraphDebuggerComponent extends BaseAngularComponent implements OnDestroy {
|
|
17
|
+
private cdr;
|
|
18
|
+
/**
|
|
19
|
+
* The graph to debug — the parent `MJ: Tasks` row. Everything else is optional.
|
|
20
|
+
*/
|
|
21
|
+
set ParentTaskID(value: string | null);
|
|
22
|
+
get ParentTaskID(): string | null;
|
|
23
|
+
WorkflowName: string;
|
|
24
|
+
LiveUpdates: boolean;
|
|
25
|
+
PollIntervalSeconds: number;
|
|
26
|
+
Height: string;
|
|
27
|
+
ShowLegend: boolean;
|
|
28
|
+
ShowCanvasToolbar: boolean;
|
|
29
|
+
ToolbarVisibility: FlowToolbarVisibility;
|
|
30
|
+
ToolbarAlign: FlowToolbarAlign;
|
|
31
|
+
AllowBreakpointEditing: boolean;
|
|
32
|
+
ShowVariables: boolean;
|
|
33
|
+
/** VCR + error line above the canvas. Off if the host already has its own bar. */
|
|
34
|
+
ShowChrome: boolean;
|
|
35
|
+
Enabled: boolean;
|
|
36
|
+
ReplayAt: Date | null;
|
|
37
|
+
/** Claim-gated. Public so a host toolbar can bind the same flag. */
|
|
38
|
+
Paused: boolean;
|
|
39
|
+
IsSettled: boolean;
|
|
40
|
+
Busy: boolean;
|
|
41
|
+
ControlError: string | null;
|
|
42
|
+
Breakpoints: readonly string[];
|
|
43
|
+
PausedAtTaskID: string | null;
|
|
44
|
+
EdgeOverrides: Readonly<Record<string, 'true' | 'false'>>;
|
|
45
|
+
Invocation: WorkflowInvocationRoots | null;
|
|
46
|
+
LatestFrame: TaskGraphRunFrame | null;
|
|
47
|
+
NodeSelected: EventEmitter<TaskGraphRunNodeSelectedEvent>;
|
|
48
|
+
ConnectionSelected: EventEmitter<TaskGraphRunConnectionSelectedEvent>;
|
|
49
|
+
LegendToggled: EventEmitter<boolean>;
|
|
50
|
+
SettledChange: EventEmitter<boolean>;
|
|
51
|
+
PausedChange: EventEmitter<boolean>;
|
|
52
|
+
Frame: EventEmitter<TaskGraphRunFrame>;
|
|
53
|
+
ControlFailed: EventEmitter<string>;
|
|
54
|
+
Settled: EventEmitter<void>;
|
|
55
|
+
RunView: TaskGraphRunViewComponent | undefined;
|
|
56
|
+
private parentTaskID;
|
|
57
|
+
private frameSub;
|
|
58
|
+
constructor(cdr: ChangeDetectorRef);
|
|
59
|
+
ngOnDestroy(): void;
|
|
60
|
+
Pause(): Promise<boolean>;
|
|
61
|
+
Resume(): Promise<boolean>;
|
|
62
|
+
Step(target?: 'one' | 'wave'): Promise<boolean>;
|
|
63
|
+
Cancel(): Promise<boolean>;
|
|
64
|
+
ToggleBreakpoint(taskID: string, enabled: boolean): Promise<boolean>;
|
|
65
|
+
OverrideEdge(edgeID: string, verdict: 'true' | 'false' | null): Promise<boolean>;
|
|
66
|
+
SkipTask(taskID: string): Promise<boolean>;
|
|
67
|
+
RetryTask(taskID: string, inputPayload?: Record<string, unknown> | string): Promise<boolean>;
|
|
68
|
+
UpdateTaskInput(taskID: string, payload: unknown): Promise<boolean>;
|
|
69
|
+
ForceCompleteTask(taskID: string, payload?: unknown): Promise<boolean>;
|
|
70
|
+
HasBreakpoint(taskID: string): boolean;
|
|
71
|
+
GetEdgeOverride(edgeID: string | null): 'true' | 'false' | null;
|
|
72
|
+
/** Re-read `$.debug` from the parent row. Same query the hosts already used. */
|
|
73
|
+
Refresh(): Promise<void>;
|
|
74
|
+
OnRunNodeSelected(event: TaskGraphRunNodeSelectedEvent): void;
|
|
75
|
+
OnRunConnectionSelected(event: TaskGraphRunConnectionSelectedEvent): void;
|
|
76
|
+
OnRunSettled(): void;
|
|
77
|
+
OnRunBreakpointToggled(event: {
|
|
78
|
+
TaskID: string;
|
|
79
|
+
Enabled: boolean;
|
|
80
|
+
}): void;
|
|
81
|
+
OnRunEdgeOverride(event: {
|
|
82
|
+
EdgeID: string;
|
|
83
|
+
Verdict: 'true' | 'false' | null;
|
|
84
|
+
}): void;
|
|
85
|
+
private executeControl;
|
|
86
|
+
private attachFrames;
|
|
87
|
+
private onFrame;
|
|
88
|
+
private detachFrames;
|
|
89
|
+
private markSettled;
|
|
90
|
+
private setPaused;
|
|
91
|
+
private failControl;
|
|
92
|
+
private clearSession;
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TaskGraphDebuggerComponent, never>;
|
|
94
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TaskGraphDebuggerComponent, "mj-task-graph-debugger", never, { "ParentTaskID": { "alias": "ParentTaskID"; "required": false; }; "WorkflowName": { "alias": "WorkflowName"; "required": false; }; "LiveUpdates": { "alias": "LiveUpdates"; "required": false; }; "PollIntervalSeconds": { "alias": "PollIntervalSeconds"; "required": false; }; "Height": { "alias": "Height"; "required": false; }; "ShowLegend": { "alias": "ShowLegend"; "required": false; }; "ShowCanvasToolbar": { "alias": "ShowCanvasToolbar"; "required": false; }; "ToolbarVisibility": { "alias": "ToolbarVisibility"; "required": false; }; "ToolbarAlign": { "alias": "ToolbarAlign"; "required": false; }; "AllowBreakpointEditing": { "alias": "AllowBreakpointEditing"; "required": false; }; "ShowVariables": { "alias": "ShowVariables"; "required": false; }; "ShowChrome": { "alias": "ShowChrome"; "required": false; }; "Enabled": { "alias": "Enabled"; "required": false; }; "ReplayAt": { "alias": "ReplayAt"; "required": false; }; }, { "NodeSelected": "NodeSelected"; "ConnectionSelected": "ConnectionSelected"; "LegendToggled": "LegendToggled"; "SettledChange": "SettledChange"; "PausedChange": "PausedChange"; "Frame": "Frame"; "ControlFailed": "ControlFailed"; "Settled": "Settled"; }, never, never, false, never>;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=task-graph-debugger.component.d.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