@memberjunction/ng-core-entity-forms 6.1.0-edge.1 → 6.1.0-edge.2

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 (80) hide show
  1. package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.d.ts +19 -2
  2. package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.d.ts.map +1 -1
  3. package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js +50 -9
  4. package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js.map +1 -1
  5. package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts +59 -0
  6. package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts.map +1 -0
  7. package/dist/lib/custom/AIAgents/agent-form-tabs.js +53 -0
  8. package/dist/lib/custom/AIAgents/agent-form-tabs.js.map +1 -0
  9. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +54 -0
  10. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
  11. package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1300 -1143
  12. package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
  13. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +25 -1
  14. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -1
  15. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +228 -170
  16. package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
  17. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts +31 -1
  18. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts.map +1 -1
  19. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js +229 -157
  20. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js.map +1 -1
  21. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts +9 -0
  22. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts.map +1 -1
  23. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js +86 -51
  24. package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js.map +1 -1
  25. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +73 -4
  26. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
  27. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +133 -7
  28. package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
  29. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +49 -1
  30. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
  31. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +383 -264
  32. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  33. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts +10 -1
  34. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts.map +1 -1
  35. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js +25 -3
  36. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js.map +1 -1
  37. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts +21 -1
  38. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts.map +1 -1
  39. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js +11 -0
  40. package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js.map +1 -1
  41. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts +28 -0
  42. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts.map +1 -0
  43. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js +120 -0
  44. package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js.map +1 -0
  45. package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.d.ts +90 -0
  46. package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.d.ts.map +1 -0
  47. package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.js +326 -0
  48. package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.js.map +1 -0
  49. package/dist/lib/custom/custom-forms.module.d.ts +1 -1
  50. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  51. package/dist/lib/custom/custom-forms.module.js +4 -1
  52. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  53. package/dist/lib/generated/Entities/MJAIAgentRequest/mjaiagentrequest.form.component.js +8 -6
  54. package/dist/lib/generated/Entities/MJAIAgentRequest/mjaiagentrequest.form.component.js.map +1 -1
  55. package/dist/lib/generated/Entities/MJAIModel/mjaimodel.form.component.js +171 -169
  56. package/dist/lib/generated/Entities/MJAIModel/mjaimodel.form.component.js.map +1 -1
  57. package/dist/lib/generated/Entities/MJAIModelType/mjaimodeltype.form.component.js +25 -23
  58. package/dist/lib/generated/Entities/MJAIModelType/mjaimodeltype.form.component.js.map +1 -1
  59. package/dist/lib/generated/Entities/MJAIModelVendor/mjaimodelvendor.form.component.js +15 -13
  60. package/dist/lib/generated/Entities/MJAIModelVendor/mjaimodelvendor.form.component.js.map +1 -1
  61. package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.d.ts.map +1 -1
  62. package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.js +43 -25
  63. package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.js.map +1 -1
  64. package/dist/lib/generated/Entities/MJAction/mjaction.form.component.d.ts.map +1 -1
  65. package/dist/lib/generated/Entities/MJAction/mjaction.form.component.js +35 -17
  66. package/dist/lib/generated/Entities/MJAction/mjaction.form.component.js.map +1 -1
  67. package/dist/lib/generated/Entities/MJActionExecutionLog/mjactionexecutionlog.form.component.js +11 -11
  68. package/dist/lib/generated/Entities/MJActionExecutionLog/mjactionexecutionlog.form.component.js.map +1 -1
  69. package/dist/lib/generated/Entities/MJEntityAction/mjentityaction.form.component.js +38 -36
  70. package/dist/lib/generated/Entities/MJEntityAction/mjentityaction.form.component.js.map +1 -1
  71. package/dist/lib/generated/Entities/MJEntityActionParam/mjentityactionparam.form.component.d.ts.map +1 -1
  72. package/dist/lib/generated/Entities/MJEntityActionParam/mjentityactionparam.form.component.js +7 -13
  73. package/dist/lib/generated/Entities/MJEntityActionParam/mjentityactionparam.form.component.js.map +1 -1
  74. package/dist/lib/generated/Entities/MJTask/mjtask.form.component.d.ts.map +1 -1
  75. package/dist/lib/generated/Entities/MJTask/mjtask.form.component.js +52 -26
  76. package/dist/lib/generated/Entities/MJTask/mjtask.form.component.js.map +1 -1
  77. package/dist/lib/generated/Entities/MJTaskDependency/mjtaskdependency.form.component.d.ts.map +1 -1
  78. package/dist/lib/generated/Entities/MJTaskDependency/mjtaskdependency.form.component.js +16 -4
  79. package/dist/lib/generated/Entities/MJTaskDependency/mjtaskdependency.form.component.js.map +1 -1
  80. package/package.json +40 -40
@@ -0,0 +1,90 @@
1
+ /**
2
+ * @fileoverview Projects a run tree into timeline rows.
3
+ *
4
+ * **Why this exists.** A task-graph step used to expand into an embedded canvas — a diagram nested
5
+ * inside a vertical list. That put two different visual languages in one column and made the graph's
6
+ * steps the only work in a run you could not read the same way as everything else. The graph's tasks
7
+ * are steps; they should look like steps, sit at their real depth, and be selectable like any other
8
+ * row. The canvas is still the right way to see *edges*, so it moves to the detail panel where it
9
+ * has room, rather than being squeezed into a 300px strip inside the list.
10
+ *
11
+ * **Why a pure function.** The bug this replaces was an ordering bug — a child's indent was computed
12
+ * from its parent's indent *at the moment the child was visited*, so a row that arrived before its
13
+ * parent got the wrong level and every descendant inherited the error. It only reproduced when the
14
+ * database returned rows in a particular order, which is exactly the kind of defect that is
15
+ * impossible to catch by looking at a screen and trivial to catch in a test. Depth here comes from
16
+ * the tree's own structure and cannot depend on visit order.
17
+ */
18
+ import type { AgentRunTreeNode } from '@memberjunction/ai-core-plus';
19
+ import type { TimelineItem } from './ai-agent-run-timeline.component';
20
+ /** True when this node is a loop whose iterations ran concurrently. */
21
+ export declare function IsParallelLoop(node: AgentRunTreeNode): boolean;
22
+ /**
23
+ * One status vocabulary for the timeline, out of the two the tree returns.
24
+ *
25
+ * A `Task` says `Complete` / `In Progress`; an `AIAgentRunStep` says `Completed` / `Running`. The
26
+ * timeline branches on the step vocabulary throughout — icons, colours, the status pill — so every
27
+ * workflow row missed EVERY branch and fell through to the unknown-status glyph. `Complete` and
28
+ * `Completed` differing by two letters is not a distinction anyone should have to know about.
29
+ *
30
+ * Normalized for DISPLAY only. `WorkflowStepView.Status` keeps the row's own word, so the JSON tab
31
+ * still shows what the database actually holds.
32
+ */
33
+ export declare function NormalizeStatus(status: string): string;
34
+ /**
35
+ * A graph task, described the way an agent run step is described.
36
+ *
37
+ * **Why translate rather than teach the UI a second language.** Everything in the run timeline
38
+ * routes on a step's shape — `StepType` picks the icon and every detail tab, `TargetLogID` is what
39
+ * a row opens (a prompt run, an action log, or a sub-agent run, by type), and `ParentID` is what
40
+ * makes a loop's iterations render as its children. A task node carried none of it, so a workflow's
41
+ * steps fell through every branch: the detail panel dumped raw JSON instead of the prompt run, an
42
+ * action offered no link to its log, and a ForEach showed nothing to expand even though its passes
43
+ * were loaded and sitting right there.
44
+ *
45
+ * Mapping the node into this shape lights all of that up at once, with no changes to the panel.
46
+ *
47
+ * **This is a view-model, NOT an entity.** It is deliberately not typed as `MJAIAgentRunStepEntity`
48
+ * and must never be passed anywhere that would try to `.Save()` it — it is a projection of a Task
49
+ * row, and the Task row remains the record of truth.
50
+ */
51
+ export type WorkflowStepView = {
52
+ ID: string;
53
+ StepType: string;
54
+ StepName: string;
55
+ StepNumber: number;
56
+ Status: string;
57
+ /** What this row opens: a prompt run, an action execution log, or a sub-agent run — by type. */
58
+ TargetLogID: string | null;
59
+ /** The entity `TargetLogID` lives in, so a resolver does not have to re-derive it from StepType. */
60
+ TargetEntity: string;
61
+ ParentID: string | null;
62
+ StartedAt: Date | null;
63
+ CompletedAt: Date | null;
64
+ /**
65
+ * The step's payload before and after, under the names the run timeline reads.
66
+ *
67
+ * A task calls them Input/OutputPayload; a run step calls them PayloadAtStart/PayloadAtEnd. The
68
+ * rename IS the translation — it is what makes the shared detail panel show a workflow step the
69
+ * same before/after diff it shows for an agent step, instead of falling through to a raw dump.
70
+ */
71
+ PayloadAtStart: string | null;
72
+ PayloadAtEnd: string | null;
73
+ /** Marks this as dispatcher work for anything that wants to say so. */
74
+ IsWorkflowStep: true;
75
+ };
76
+ /** Translates a graph task — or a synthesized pass — into the step shape the timeline understands. */
77
+ export declare function ProjectTaskToStepView(node: AgentRunTreeNode, stepNumber: number): WorkflowStepView;
78
+ /**
79
+ * Flattens a run tree into timeline rows, in display order.
80
+ *
81
+ * Depth-first, because that is reading order: a node's children belong directly beneath it, and
82
+ * breadth-first would interleave the steps of unrelated branches.
83
+ *
84
+ * @param root the tree to project
85
+ * @param baseLevel indent to start at, so a subtree can be spliced under an existing row
86
+ * @param skipRoot omit the root itself — used when the row that owns this subtree is already on
87
+ * screen and the tree is being expanded underneath it
88
+ */
89
+ export declare function ProjectRunTreeToTimeline(root: AgentRunTreeNode | null, baseLevel?: number, skipRoot?: boolean): TimelineItem[];
90
+ //# sourceMappingURL=run-tree-timeline-projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-tree-timeline-projection.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/run-tree-timeline-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAwB,MAAM,8BAA8B,CAAC;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AA2FtE,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAE9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAOtD;AAqCD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,gGAAgG;IAChG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,oGAAoG;IACpG,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,uEAAuE;IACvE,cAAc,EAAE,IAAI,CAAC;CACxB,CAAC;AAmBF,sGAAsG;AACtG,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAuBlG;AAeD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACpC,IAAI,EAAE,gBAAgB,GAAG,IAAI,EAC7B,SAAS,SAAI,EACb,QAAQ,UAAQ,GACjB,YAAY,EAAE,CAsBhB"}
@@ -0,0 +1,326 @@
1
+ /**
2
+ * How each kind of node presents itself.
3
+ *
4
+ * Task-graph work is **colour-coded** so its provenance is visible at a glance: a row that ran on
5
+ * the dispatcher, outliving the agent run that submitted it, is a genuinely different thing from a
6
+ * step the run executed itself, and someone reading a failure needs to know which they are looking
7
+ * at before they know where to go next.
8
+ */
9
+ const NODE_PRESENTATION = {
10
+ Run: { icon: 'fa-solid fa-robot' },
11
+ Step: { icon: 'fa-solid fa-circle-nodes' },
12
+ TaskGraph: { icon: 'fa-solid fa-diagram-project' },
13
+ Task: { icon: 'fa-solid fa-diagram-next' },
14
+ };
15
+ /** Status → marker colour, matching what an agent run's own steps have always used. */
16
+ const STATUS_COLOR = {
17
+ Running: 'info',
18
+ Completed: 'success',
19
+ Failed: 'error',
20
+ Cancelled: 'warning',
21
+ Blocked: 'error',
22
+ Skipped: 'secondary',
23
+ Pending: 'secondary',
24
+ Waiting: 'warning',
25
+ };
26
+ /**
27
+ * How a task presents itself, by what it actually DOES.
28
+ *
29
+ * `NODE_PRESENTATION` is keyed by node TYPE, so every task in a workflow resolved to the same
30
+ * generic diagram glyph — a prompt step, a loop and an approval were visually identical, and the row
31
+ * `type` that says otherwise was painted over by the explicit icon. Mapping the row type onto the
32
+ * timeline's vocabulary is only half the job; a reader distinguishes rows by their icon long before
33
+ * reading the subtitle.
34
+ *
35
+ * Colour still says "workflow" via `provenance`, so these icons differentiate KIND without costing
36
+ * the visual grouping that tells you this work ran on the dispatcher.
37
+ */
38
+ const TASK_KIND_PRESENTATION = {
39
+ Action: { icon: 'fa-solid fa-bolt' },
40
+ Prompt: { icon: 'fa-solid fa-comment-dots' },
41
+ Agent: { icon: 'fa-solid fa-robot' },
42
+ ForEach: { icon: 'fa-solid fa-repeat' },
43
+ While: { icon: 'fa-solid fa-rotate' },
44
+ Human: { icon: 'fa-solid fa-user-check' },
45
+ External: { icon: 'fa-solid fa-arrow-up-right-from-square' },
46
+ };
47
+ /**
48
+ * A node's icon and marker colour.
49
+ *
50
+ * **Workflow work is always `info`** — the blue filled circle — because provenance is the thing a
51
+ * reader needs first: work that ran on the dispatcher, outliving the run that submitted it, is a
52
+ * different kind of thing from a step the run executed itself. Status is still legible on the row
53
+ * (its own coloured line, its icon), so the marker is free to carry provenance instead.
54
+ *
55
+ * **Everything else is coloured by status**, exactly as an agent run's own steps always have been.
56
+ * That is what makes a sub-agent run nested inside a graph revert to ordinary agent styling at the
57
+ * run boundary: below it, the work is ordinary agent work again.
58
+ */
59
+ function presentationOf(node) {
60
+ const workflow = node.NodeType === 'Task' || node.NodeType === 'TaskGraph';
61
+ let icon = node.NodeType === 'Task' && node.SourceKind
62
+ ? (TASK_KIND_PRESENTATION[node.SourceKind] ?? NODE_PRESENTATION.Task).icon
63
+ : (NODE_PRESENTATION[node.NodeType] ?? NODE_PRESENTATION.Step).icon;
64
+ // A loop that ran its iterations at once is a different shape of work from one that ran them in
65
+ // turn, and the passes underneath look identical either way — same rows, same durations. The
66
+ // icon carries the distinction, because it is visible without opening anything.
67
+ if (IsParallelLoop(node))
68
+ icon = 'fa-solid fa-arrows-split-up-and-left';
69
+ return { icon, color: workflow ? 'info' : (STATUS_COLOR[NormalizeStatus(node.Status)] ?? 'secondary') };
70
+ }
71
+ /** True when this node is a loop whose iterations ran concurrently. */
72
+ export function IsParallelLoop(node) {
73
+ return node.LoopMode?.toLowerCase() === 'parallel';
74
+ }
75
+ /**
76
+ * One status vocabulary for the timeline, out of the two the tree returns.
77
+ *
78
+ * A `Task` says `Complete` / `In Progress`; an `AIAgentRunStep` says `Completed` / `Running`. The
79
+ * timeline branches on the step vocabulary throughout — icons, colours, the status pill — so every
80
+ * workflow row missed EVERY branch and fell through to the unknown-status glyph. `Complete` and
81
+ * `Completed` differing by two letters is not a distinction anyone should have to know about.
82
+ *
83
+ * Normalized for DISPLAY only. `WorkflowStepView.Status` keeps the row's own word, so the JSON tab
84
+ * still shows what the database actually holds.
85
+ */
86
+ export function NormalizeStatus(status) {
87
+ switch (status) {
88
+ case 'Complete': return 'Completed';
89
+ case 'In Progress': return 'Running';
90
+ case 'Deferred': return 'Pending';
91
+ default: return status;
92
+ }
93
+ }
94
+ /**
95
+ * The timeline's item type for each tree node kind.
96
+ *
97
+ * A `Task` deliberately does NOT get its own row type. A workflow step that runs an action IS an
98
+ * action, and rendering it as a generic "workflow step" threw away the action displayer — icon,
99
+ * status treatment, navigation — that every other action row in the timeline already gets. Tasks map
100
+ * onto the SAME vocabulary as run steps and pick up the same presentation; what marks them as
101
+ * dispatcher work is `provenance`, which styles them without changing what they are.
102
+ */
103
+ const NODE_ITEM_TYPE = {
104
+ Run: 'subrun',
105
+ Step: 'step',
106
+ // The graph itself keeps a distinct type — it is a container, not a step, and the visual break
107
+ // between "the run" and "the workflow it submitted" is worth preserving.
108
+ TaskGraph: 'taskgraph',
109
+ Task: 'task',
110
+ };
111
+ /**
112
+ * A workflow step's kind, in the vocabulary an agent run STEP uses.
113
+ *
114
+ * The two vocabularies exist because the same work is described twice: a task graph calls it
115
+ * `Action`, a run step calls it `Actions`. Translating one into the other is what lets a graph's
116
+ * steps reuse the run timeline wholesale instead of needing a parallel set of branches.
117
+ */
118
+ const TASK_KIND_TO_STEP_TYPE = {
119
+ Action: 'Actions',
120
+ Prompt: 'Prompt',
121
+ Agent: 'Sub-Agent',
122
+ ForEach: 'ForEach',
123
+ While: 'While',
124
+ Human: 'Human',
125
+ External: 'External',
126
+ };
127
+ /**
128
+ * A node the tree SYNTHESIZED rather than read from `AIAgentRunStep` — today, a loop pass.
129
+ *
130
+ * A pass has no row of its own; the tree builds it from the loop's iteration trace and gives it
131
+ * `NodeType: 'Step'`, so it is indistinguishable from a real run step by type alone. What separates
132
+ * them is where they point: a real step's record IS an `AIAgentRunStep`, while a pass points at the
133
+ * prompt run, agent run or action log it produced.
134
+ *
135
+ * This mattered because only `Task` nodes were being translated into the step shape, so a pass kept
136
+ * a raw tree node as its `data` — which carries `SourceID`/`SourceEntity` and no `TargetLogID`. The
137
+ * timeline's navigation gate reads `TargetLogID`, so five passes that each ran a real action offered
138
+ * no way to open any of them, while the action step two rows above did.
139
+ */
140
+ function isSynthesizedStep(node) {
141
+ return node.NodeType === 'Step' && node.SourceEntity !== 'MJ: AI Agent Run Steps';
142
+ }
143
+ /** Translates a graph task — or a synthesized pass — into the step shape the timeline understands. */
144
+ export function ProjectTaskToStepView(node, stepNumber) {
145
+ return {
146
+ ID: node.NodeID,
147
+ // Translate a TASK's vocabulary; pass a step vocabulary through unchanged. A loop pass
148
+ // already reports `Actions` / `Prompt` / `Sub-Agent`, and running those through the task map
149
+ // dropped `Sub-Agent` (absent from it) to the `Actions` default — mislabelling every
150
+ // sub-agent pass as an action, and pointing its link at the wrong entity.
151
+ StepType: (node.SourceKind && (TASK_KIND_TO_STEP_TYPE[node.SourceKind] ?? node.SourceKind)) || 'Actions',
152
+ StepName: node.Name,
153
+ StepNumber: stepNumber,
154
+ Status: node.Status,
155
+ // The tree already resolves this per kind: a Prompt task's SourceID is its prompt run, an
156
+ // Agent task descends to its run, an Action task its execution log. Null when the node IS
157
+ // its own record (the Task row), which is what a Human or External step is.
158
+ TargetLogID: node.SourceEntity === 'MJ: Tasks' ? null : node.SourceID,
159
+ TargetEntity: node.SourceEntity,
160
+ ParentID: node.ParentNodeID,
161
+ StartedAt: node.StartedAt,
162
+ CompletedAt: node.CompletedAt,
163
+ PayloadAtStart: node.InputPayload,
164
+ PayloadAtEnd: node.OutputPayload,
165
+ IsWorkflowStep: true,
166
+ };
167
+ }
168
+ /**
169
+ * The row type for a node.
170
+ *
171
+ * A task is a **`step`** — the same row type an agent run's own steps use — because that is what
172
+ * makes every existing branch apply to it. What marks it as workflow work is `provenance`, not a
173
+ * different type. Mapping tasks to distinct types (`prompt`, `action`) is what previously made them
174
+ * render with the right icon and then miss every behaviour keyed on `type === 'step'`.
175
+ */
176
+ function itemTypeOf(node) {
177
+ if (node.NodeType === 'Task')
178
+ return 'step';
179
+ return NODE_ITEM_TYPE[node.NodeType] ?? 'step';
180
+ }
181
+ /**
182
+ * Flattens a run tree into timeline rows, in display order.
183
+ *
184
+ * Depth-first, because that is reading order: a node's children belong directly beneath it, and
185
+ * breadth-first would interleave the steps of unrelated branches.
186
+ *
187
+ * @param root the tree to project
188
+ * @param baseLevel indent to start at, so a subtree can be spliced under an existing row
189
+ * @param skipRoot omit the root itself — used when the row that owns this subtree is already on
190
+ * screen and the tree is being expanded underneath it
191
+ */
192
+ export function ProjectRunTreeToTimeline(root, baseLevel = 0, skipRoot = false) {
193
+ if (!root)
194
+ return [];
195
+ /**
196
+ * Builds one row and its subtree.
197
+ *
198
+ * **Nested, not flattened.** The projection used to return one flat array with `level` for
199
+ * indentation, and set `children: []` on every row. The timeline's expand affordance is gated on
200
+ * `children.length`, so nothing a workflow produced could ever be collapsed: the task graph, its
201
+ * loops and their passes all rendered permanently open, indented but unmanageable, while an
202
+ * agent's own sub-agent steps a few rows above collapsed normally. Handing back the real shape
203
+ * lights up the recursive template and the expand machinery that were already there.
204
+ */
205
+ const build = (node, level, parentID, position) => {
206
+ const item = toTimelineItem(node, level, parentID, position);
207
+ item.children = node.Children.map((child, index) => build(child, level + 1, node.NodeID, index + 1));
208
+ return item;
209
+ };
210
+ return skipRoot
211
+ ? root.Children.map((child, index) => build(child, baseLevel, root.NodeID, index + 1))
212
+ : [build(root, baseLevel, undefined, 1)];
213
+ }
214
+ /** One node as a timeline row. */
215
+ function toTimelineItem(node, level, parentID, position) {
216
+ const presentation = presentationOf(node);
217
+ return {
218
+ id: node.NodeID,
219
+ type: itemTypeOf(node),
220
+ // Marks the row as dispatcher work WITHOUT changing what it is. Styling keys off this, so a
221
+ // workflow's action still renders as an action and still reads as part of the workflow.
222
+ //
223
+ // Set only for Task and TaskGraph — deliberately NOT for a Run nested under a task. Once the
224
+ // tree descends into an agent run, that run and everything under it is ordinary agent work
225
+ // again and reverts to the normal styling, which is what a reader needs to know about where
226
+ // to look when it fails.
227
+ provenance: node.NodeType === 'Task' || node.NodeType === 'TaskGraph' ? 'workflow' : undefined,
228
+ title: node.Name,
229
+ subtitle: describeNode(node),
230
+ status: NormalizeStatus(node.Status),
231
+ // NULL when a node has not started — never a fabricated instant.
232
+ //
233
+ // This used to be `StartedAt ?? CompletedAt ?? new Date(8_640_000_000_000_000)`, chosen so
234
+ // unstarted rows sorted last. The sentinel RENDERED: every Pending task in a workflow showed
235
+ // the same invented clock time, identical on every row, looking exactly like data. Ordering
236
+ // is the query's job (see the ORDER BY in get-agent-run-tree.sql); a row that has not run
237
+ // shows no time at all, because it has none.
238
+ startTime: node.StartedAt,
239
+ endTime: node.CompletedAt ?? undefined,
240
+ duration: formatDuration(node.DurationMs),
241
+ icon: presentation.icon,
242
+ color: presentation.color,
243
+ // A task — and a synthesized loop pass — is handed to the UI as a STEP. Everything
244
+ // downstream routes on this shape, so translating here is what makes workflow work reuse the
245
+ // run timeline instead of falling through every branch to a raw JSON dump. A REAL agent run
246
+ // step keeps the tree node: its own rendering already reads that.
247
+ data: node.NodeType === 'Task' || isSynthesizedStep(node)
248
+ ? ProjectTaskToStepView(node, position)
249
+ : node,
250
+ level,
251
+ parentId: parentID,
252
+ // Everything is already loaded — the whole tree arrived in one query — so nothing here is
253
+ // ever in the "expanded but still fetching" state the lazy loader had to represent.
254
+ isExpanded: true,
255
+ childrenLoaded: true,
256
+ hasNoChildren: node.Children.length === 0,
257
+ children: [],
258
+ };
259
+ }
260
+ /** The one-line description under a row's title. */
261
+ function describeNode(node) {
262
+ const parts = [];
263
+ switch (node.NodeType) {
264
+ case 'TaskGraph':
265
+ parts.push('Workflow — runs on the dispatcher');
266
+ break;
267
+ case 'Task':
268
+ // A prompt-backed step subtitles itself EXACTLY as an agent run's prompt step does.
269
+ // The same work should not describe itself two different ways depending on which
270
+ // timeline it was opened from — that reads as two features rather than one.
271
+ if (node.Model) {
272
+ parts.push(`Model: ${node.Model} | Vendor: ${node.Vendor || 'Unknown'}`);
273
+ break;
274
+ }
275
+ // Otherwise name the kind. "Action" or "Prompt" is what a reader needs; the provenance
276
+ // styling already says it is workflow.
277
+ //
278
+ // A loop also says HOW it ran. Spelled out rather than left to the icon alone: "ForEach
279
+ // step · 5 passes in parallel" answers, without opening anything, why five 300ms passes
280
+ // took 300ms rather than a second and a half.
281
+ if (node.SourceKind === 'ForEach' || node.SourceKind === 'While') {
282
+ const passes = node.Children.length;
283
+ const count = passes > 0 ? `${passes} ${passes === 1 ? 'pass' : 'passes'}` : 'no passes';
284
+ parts.push(`${node.SourceKind} step · ${count}${IsParallelLoop(node) ? ' in parallel' : ''}`);
285
+ break;
286
+ }
287
+ parts.push(node.SourceKind ? `${node.SourceKind} step` : 'Workflow step');
288
+ break;
289
+ case 'Run':
290
+ parts.push('Agent run');
291
+ break;
292
+ default:
293
+ break;
294
+ }
295
+ if (node.Cost != null)
296
+ parts.push(formatCost(node.Cost));
297
+ if (node.Tokens != null)
298
+ parts.push(`${node.Tokens.toLocaleString()} tokens`);
299
+ return parts.join(' · ');
300
+ }
301
+ /**
302
+ * A duration, or undefined while a node is still running.
303
+ *
304
+ * Deliberately not "0ms" for an unfinished node: a step that has not stopped has no duration, and
305
+ * showing zero reads as one that finished instantly.
306
+ */
307
+ function formatDuration(durationMs) {
308
+ if (durationMs == null)
309
+ return undefined;
310
+ if (durationMs < 1000)
311
+ return `${durationMs}ms`;
312
+ const seconds = durationMs / 1000;
313
+ if (seconds < 60)
314
+ return `${seconds.toFixed(1)}s`;
315
+ const minutes = Math.floor(seconds / 60);
316
+ return `${minutes}m ${Math.round(seconds % 60)}s`;
317
+ }
318
+ /** Costs are small; two decimals would render most real steps as "$0.00". */
319
+ function formatCost(cost) {
320
+ if (cost === 0)
321
+ return '$0';
322
+ if (cost < 0.01)
323
+ return `$${cost.toFixed(4)}`;
324
+ return `$${cost.toFixed(2)}`;
325
+ }
326
+ //# sourceMappingURL=run-tree-timeline-projection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-tree-timeline-projection.js","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/run-tree-timeline-projection.ts"],"names":[],"mappings":"AAoBA;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAmD;IACtE,GAAG,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;IAClC,IAAI,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE;IAC1C,SAAS,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE;IAClD,IAAI,EAAE,EAAE,IAAI,E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;AAC7B,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,UAAyB;IAC7C,IAAI,UAAU,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IACzC,IAAI,UAAU,GAAG,IAAI;QAAE,OAAO,GAAG,UAAU,IAAI,CAAC;IAChD,MAAM,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;IAClC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IAClD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC;AACtD,CAAC;AAED,6EAA6E;AAC7E,SAAS,UAAU,CAAC,IAAY;IAC5B,IAAI,IAAI,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5B,IAAI,IAAI,GAAG,IAAI;QAAE,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;AACjC,CAAC","sourcesContent":["/**\n * @fileoverview Projects a run tree into timeline rows.\n *\n * **Why this exists.** A task-graph step used to expand into an embedded canvas — a diagram nested\n * inside a vertical list. That put two different visual languages in one column and made the graph's\n * steps the only work in a run you could not read the same way as everything else. The graph's tasks\n * are steps; they should look like steps, sit at their real depth, and be selectable like any other\n * row. The canvas is still the right way to see *edges*, so it moves to the detail panel where it\n * has room, rather than being squeezed into a 300px strip inside the list.\n *\n * **Why a pure function.** The bug this replaces was an ordering bug — a child's indent was computed\n * from its parent's indent *at the moment the child was visited*, so a row that arrived before its\n * parent got the wrong level and every descendant inherited the error. It only reproduced when the\n * database returned rows in a particular order, which is exactly the kind of defect that is\n * impossible to catch by looking at a screen and trivial to catch in a test. Depth here comes from\n * the tree's own structure and cannot depend on visit order.\n */\nimport type { AgentRunTreeNode, AgentRunTreeNodeType } from '@memberjunction/ai-core-plus';\nimport type { TimelineItem } from './ai-agent-run-timeline.component';\n\n/**\n * How each kind of node presents itself.\n *\n * Task-graph work is **colour-coded** so its provenance is visible at a glance: a row that ran on\n * the dispatcher, outliving the agent run that submitted it, is a genuinely different thing from a\n * step the run executed itself, and someone reading a failure needs to know which they are looking\n * at before they know where to go next.\n */\nconst NODE_PRESENTATION: Record<AgentRunTreeNodeType, { icon: string }> = {\n Run: { icon: 'fa-solid fa-robot' },\n Step: { icon: 'fa-solid fa-circle-nodes' },\n TaskGraph: { icon: 'fa-solid fa-diagram-project' },\n Task: { icon: 'fa-solid fa-diagram-next' },\n};\n\n/**\n * The marker colour vocabulary — a NAME, never a CSS value.\n *\n * `TimelineItem.color` is written to `data-color` and matched by\n * `.timeline-marker[data-color=\"info\"]`, which sets the filled circle's background. Emitting\n * `var(--mj-status-info)` here — a perfectly valid CSS value — matched no selector at all, so\n * workflow rows got no filled circle and rendered a bare glyph inheriting `--mj-text-inverse`:\n * near-invisible in dark mode, and visibly second-class beside the agent's own steps.\n *\n * That failure is silent twice over. An unmatched attribute selector is not an error, and neither is\n * a CSS variable that resolves to nothing — so the only symptom was an icon that looked dim.\n */\ntype MarkerColor = 'info' | 'success' | 'error' | 'warning' | 'secondary';\n\n/** Status → marker colour, matching what an agent run's own steps have always used. */\nconst STATUS_COLOR: Record<string, MarkerColor> = {\n Running: 'info',\n Completed: 'success',\n Failed: 'error',\n Cancelled: 'warning',\n Blocked: 'error',\n Skipped: 'secondary',\n Pending: 'secondary',\n Waiting: 'warning',\n};\n\n/**\n * How a task presents itself, by what it actually DOES.\n *\n * `NODE_PRESENTATION` is keyed by node TYPE, so every task in a workflow resolved to the same\n * generic diagram glyph — a prompt step, a loop and an approval were visually identical, and the row\n * `type` that says otherwise was painted over by the explicit icon. Mapping the row type onto the\n * timeline's vocabulary is only half the job; a reader distinguishes rows by their icon long before\n * reading the subtitle.\n *\n * Colour still says \"workflow\" via `provenance`, so these icons differentiate KIND without costing\n * the visual grouping that tells you this work ran on the dispatcher.\n */\nconst TASK_KIND_PRESENTATION: Record<string, { icon: string }> = {\n Action: { icon: 'fa-solid fa-bolt' },\n Prompt: { icon: 'fa-solid fa-comment-dots' },\n Agent: { icon: 'fa-solid fa-robot' },\n ForEach: { icon: 'fa-solid fa-repeat' },\n While: { icon: 'fa-solid fa-rotate' },\n Human: { icon: 'fa-solid fa-user-check' },\n External: { icon: 'fa-solid fa-arrow-up-right-from-square' },\n};\n\n/**\n * A node's icon and marker colour.\n *\n * **Workflow work is always `info`** — the blue filled circle — because provenance is the thing a\n * reader needs first: work that ran on the dispatcher, outliving the run that submitted it, is a\n * different kind of thing from a step the run executed itself. Status is still legible on the row\n * (its own coloured line, its icon), so the marker is free to carry provenance instead.\n *\n * **Everything else is coloured by status**, exactly as an agent run's own steps always have been.\n * That is what makes a sub-agent run nested inside a graph revert to ordinary agent styling at the\n * run boundary: below it, the work is ordinary agent work again.\n */\nfunction presentationOf(node: AgentRunTreeNode): { icon: string; color: MarkerColor } {\n const workflow = node.NodeType === 'Task' || node.NodeType === 'TaskGraph';\n let icon = node.NodeType === 'Task' && node.SourceKind\n ? (TASK_KIND_PRESENTATION[node.SourceKind] ?? NODE_PRESENTATION.Task).icon\n : (NODE_PRESENTATION[node.NodeType] ?? NODE_PRESENTATION.Step).icon;\n\n // A loop that ran its iterations at once is a different shape of work from one that ran them in\n // turn, and the passes underneath look identical either way — same rows, same durations. The\n // icon carries the distinction, because it is visible without opening anything.\n if (IsParallelLoop(node)) icon = 'fa-solid fa-arrows-split-up-and-left';\n\n return { icon, color: workflow ? 'info' : (STATUS_COLOR[NormalizeStatus(node.Status)] ?? 'secondary') };\n}\n\n/** True when this node is a loop whose iterations ran concurrently. */\nexport function IsParallelLoop(node: AgentRunTreeNode): boolean {\n return node.LoopMode?.toLowerCase() === 'parallel';\n}\n\n/**\n * One status vocabulary for the timeline, out of the two the tree returns.\n *\n * A `Task` says `Complete` / `In Progress`; an `AIAgentRunStep` says `Completed` / `Running`. The\n * timeline branches on the step vocabulary throughout — icons, colours, the status pill — so every\n * workflow row missed EVERY branch and fell through to the unknown-status glyph. `Complete` and\n * `Completed` differing by two letters is not a distinction anyone should have to know about.\n *\n * Normalized for DISPLAY only. `WorkflowStepView.Status` keeps the row's own word, so the JSON tab\n * still shows what the database actually holds.\n */\nexport function NormalizeStatus(status: string): string {\n switch (status) {\n case 'Complete': return 'Completed';\n case 'In Progress': return 'Running';\n case 'Deferred': return 'Pending';\n default: return status;\n }\n}\n\n/**\n * The timeline's item type for each tree node kind.\n *\n * A `Task` deliberately does NOT get its own row type. A workflow step that runs an action IS an\n * action, and rendering it as a generic \"workflow step\" threw away the action displayer — icon,\n * status treatment, navigation — that every other action row in the timeline already gets. Tasks map\n * onto the SAME vocabulary as run steps and pick up the same presentation; what marks them as\n * dispatcher work is `provenance`, which styles them without changing what they are.\n */\nconst NODE_ITEM_TYPE: Record<AgentRunTreeNodeType, TimelineItem['type']> = {\n Run: 'subrun',\n Step: 'step',\n // The graph itself keeps a distinct type — it is a container, not a step, and the visual break\n // between \"the run\" and \"the workflow it submitted\" is worth preserving.\n TaskGraph: 'taskgraph',\n Task: 'task',\n};\n\n/**\n * A workflow step's kind, in the vocabulary an agent run STEP uses.\n *\n * The two vocabularies exist because the same work is described twice: a task graph calls it\n * `Action`, a run step calls it `Actions`. Translating one into the other is what lets a graph's\n * steps reuse the run timeline wholesale instead of needing a parallel set of branches.\n */\nconst TASK_KIND_TO_STEP_TYPE: Record<string, string> = {\n Action: 'Actions',\n Prompt: 'Prompt',\n Agent: 'Sub-Agent',\n ForEach: 'ForEach',\n While: 'While',\n Human: 'Human',\n External: 'External',\n};\n\n/**\n * A graph task, described the way an agent run step is described.\n *\n * **Why translate rather than teach the UI a second language.** Everything in the run timeline\n * routes on a step's shape — `StepType` picks the icon and every detail tab, `TargetLogID` is what\n * a row opens (a prompt run, an action log, or a sub-agent run, by type), and `ParentID` is what\n * makes a loop's iterations render as its children. A task node carried none of it, so a workflow's\n * steps fell through every branch: the detail panel dumped raw JSON instead of the prompt run, an\n * action offered no link to its log, and a ForEach showed nothing to expand even though its passes\n * were loaded and sitting right there.\n *\n * Mapping the node into this shape lights all of that up at once, with no changes to the panel.\n *\n * **This is a view-model, NOT an entity.** It is deliberately not typed as `MJAIAgentRunStepEntity`\n * and must never be passed anywhere that would try to `.Save()` it — it is a projection of a Task\n * row, and the Task row remains the record of truth.\n */\nexport type WorkflowStepView = {\n ID: string;\n StepType: string;\n StepName: string;\n StepNumber: number;\n Status: string;\n /** What this row opens: a prompt run, an action execution log, or a sub-agent run — by type. */\n TargetLogID: string | null;\n /** The entity `TargetLogID` lives in, so a resolver does not have to re-derive it from StepType. */\n TargetEntity: string;\n ParentID: string | null;\n StartedAt: Date | null;\n CompletedAt: Date | null;\n /**\n * The step's payload before and after, under the names the run timeline reads.\n *\n * A task calls them Input/OutputPayload; a run step calls them PayloadAtStart/PayloadAtEnd. The\n * rename IS the translation — it is what makes the shared detail panel show a workflow step the\n * same before/after diff it shows for an agent step, instead of falling through to a raw dump.\n */\n PayloadAtStart: string | null;\n PayloadAtEnd: string | null;\n /** Marks this as dispatcher work for anything that wants to say so. */\n IsWorkflowStep: true;\n};\n\n/**\n * A node the tree SYNTHESIZED rather than read from `AIAgentRunStep` — today, a loop pass.\n *\n * A pass has no row of its own; the tree builds it from the loop's iteration trace and gives it\n * `NodeType: 'Step'`, so it is indistinguishable from a real run step by type alone. What separates\n * them is where they point: a real step's record IS an `AIAgentRunStep`, while a pass points at the\n * prompt run, agent run or action log it produced.\n *\n * This mattered because only `Task` nodes were being translated into the step shape, so a pass kept\n * a raw tree node as its `data` — which carries `SourceID`/`SourceEntity` and no `TargetLogID`. The\n * timeline's navigation gate reads `TargetLogID`, so five passes that each ran a real action offered\n * no way to open any of them, while the action step two rows above did.\n */\nfunction isSynthesizedStep(node: AgentRunTreeNode): boolean {\n return node.NodeType === 'Step' && node.SourceEntity !== 'MJ: AI Agent Run Steps';\n}\n\n/** Translates a graph task — or a synthesized pass — into the step shape the timeline understands. */\nexport function ProjectTaskToStepView(node: AgentRunTreeNode, stepNumber: number): WorkflowStepView {\n return {\n ID: node.NodeID,\n // Translate a TASK's vocabulary; pass a step vocabulary through unchanged. A loop pass\n // already reports `Actions` / `Prompt` / `Sub-Agent`, and running those through the task map\n // dropped `Sub-Agent` (absent from it) to the `Actions` default — mislabelling every\n // sub-agent pass as an action, and pointing its link at the wrong entity.\n StepType: (node.SourceKind && (TASK_KIND_TO_STEP_TYPE[node.SourceKind] ?? node.SourceKind)) || 'Actions',\n StepName: node.Name,\n StepNumber: stepNumber,\n Status: node.Status,\n // The tree already resolves this per kind: a Prompt task's SourceID is its prompt run, an\n // Agent task descends to its run, an Action task its execution log. Null when the node IS\n // its own record (the Task row), which is what a Human or External step is.\n TargetLogID: node.SourceEntity === 'MJ: Tasks' ? null : node.SourceID,\n TargetEntity: node.SourceEntity,\n ParentID: node.ParentNodeID,\n StartedAt: node.StartedAt,\n CompletedAt: node.CompletedAt,\n PayloadAtStart: node.InputPayload,\n PayloadAtEnd: node.OutputPayload,\n IsWorkflowStep: true,\n };\n}\n\n/**\n * The row type for a node.\n *\n * A task is a **`step`** — the same row type an agent run's own steps use — because that is what\n * makes every existing branch apply to it. What marks it as workflow work is `provenance`, not a\n * different type. Mapping tasks to distinct types (`prompt`, `action`) is what previously made them\n * render with the right icon and then miss every behaviour keyed on `type === 'step'`.\n */\nfunction itemTypeOf(node: AgentRunTreeNode): TimelineItem['type'] {\n if (node.NodeType === 'Task') return 'step';\n return NODE_ITEM_TYPE[node.NodeType] ?? 'step';\n}\n\n/**\n * Flattens a run tree into timeline rows, in display order.\n *\n * Depth-first, because that is reading order: a node's children belong directly beneath it, and\n * breadth-first would interleave the steps of unrelated branches.\n *\n * @param root the tree to project\n * @param baseLevel indent to start at, so a subtree can be spliced under an existing row\n * @param skipRoot omit the root itself — used when the row that owns this subtree is already on\n * screen and the tree is being expanded underneath it\n */\nexport function ProjectRunTreeToTimeline(\n root: AgentRunTreeNode | null,\n baseLevel = 0,\n skipRoot = false,\n): TimelineItem[] {\n if (!root) return [];\n\n /**\n * Builds one row and its subtree.\n *\n * **Nested, not flattened.** The projection used to return one flat array with `level` for\n * indentation, and set `children: []` on every row. The timeline's expand affordance is gated on\n * `children.length`, so nothing a workflow produced could ever be collapsed: the task graph, its\n * loops and their passes all rendered permanently open, indented but unmanageable, while an\n * agent's own sub-agent steps a few rows above collapsed normally. Handing back the real shape\n * lights up the recursive template and the expand machinery that were already there.\n */\n const build = (node: AgentRunTreeNode, level: number, parentID: string | undefined, position: number): TimelineItem => {\n const item = toTimelineItem(node, level, parentID, position);\n item.children = node.Children.map((child, index) => build(child, level + 1, node.NodeID, index + 1));\n return item;\n };\n\n return skipRoot\n ? root.Children.map((child, index) => build(child, baseLevel, root.NodeID, index + 1))\n : [build(root, baseLevel, undefined, 1)];\n}\n\n/** One node as a timeline row. */\nfunction toTimelineItem(\n node: AgentRunTreeNode,\n level: number,\n parentID: string | undefined,\n position: number,\n): TimelineItem {\n const presentation = presentationOf(node);\n\n return {\n id: node.NodeID,\n type: itemTypeOf(node),\n // Marks the row as dispatcher work WITHOUT changing what it is. Styling keys off this, so a\n // workflow's action still renders as an action and still reads as part of the workflow.\n //\n // Set only for Task and TaskGraph — deliberately NOT for a Run nested under a task. Once the\n // tree descends into an agent run, that run and everything under it is ordinary agent work\n // again and reverts to the normal styling, which is what a reader needs to know about where\n // to look when it fails.\n provenance: node.NodeType === 'Task' || node.NodeType === 'TaskGraph' ? 'workflow' : undefined,\n title: node.Name,\n subtitle: describeNode(node),\n status: NormalizeStatus(node.Status),\n // NULL when a node has not started — never a fabricated instant.\n //\n // This used to be `StartedAt ?? CompletedAt ?? new Date(8_640_000_000_000_000)`, chosen so\n // unstarted rows sorted last. The sentinel RENDERED: every Pending task in a workflow showed\n // the same invented clock time, identical on every row, looking exactly like data. Ordering\n // is the query's job (see the ORDER BY in get-agent-run-tree.sql); a row that has not run\n // shows no time at all, because it has none.\n startTime: node.StartedAt,\n endTime: node.CompletedAt ?? undefined,\n duration: formatDuration(node.DurationMs),\n icon: presentation.icon,\n color: presentation.color,\n // A task — and a synthesized loop pass — is handed to the UI as a STEP. Everything\n // downstream routes on this shape, so translating here is what makes workflow work reuse the\n // run timeline instead of falling through every branch to a raw JSON dump. A REAL agent run\n // step keeps the tree node: its own rendering already reads that.\n data: node.NodeType === 'Task' || isSynthesizedStep(node)\n ? ProjectTaskToStepView(node, position)\n : node,\n level,\n parentId: parentID,\n // Everything is already loaded — the whole tree arrived in one query — so nothing here is\n // ever in the \"expanded but still fetching\" state the lazy loader had to represent.\n isExpanded: true,\n childrenLoaded: true,\n hasNoChildren: node.Children.length === 0,\n children: [],\n };\n}\n\n/** The one-line description under a row's title. */\nfunction describeNode(node: AgentRunTreeNode): string {\n const parts: string[] = [];\n\n switch (node.NodeType) {\n case 'TaskGraph':\n parts.push('Workflow — runs on the dispatcher');\n break;\n case 'Task':\n // A prompt-backed step subtitles itself EXACTLY as an agent run's prompt step does.\n // The same work should not describe itself two different ways depending on which\n // timeline it was opened from — that reads as two features rather than one.\n if (node.Model) {\n parts.push(`Model: ${node.Model} | Vendor: ${node.Vendor || 'Unknown'}`);\n break;\n }\n // Otherwise name the kind. \"Action\" or \"Prompt\" is what a reader needs; the provenance\n // styling already says it is workflow.\n //\n // A loop also says HOW it ran. Spelled out rather than left to the icon alone: \"ForEach\n // step · 5 passes in parallel\" answers, without opening anything, why five 300ms passes\n // took 300ms rather than a second and a half.\n if (node.SourceKind === 'ForEach' || node.SourceKind === 'While') {\n const passes = node.Children.length;\n const count = passes > 0 ? `${passes} ${passes === 1 ? 'pass' : 'passes'}` : 'no passes';\n parts.push(`${node.SourceKind} step · ${count}${IsParallelLoop(node) ? ' in parallel' : ''}`);\n break;\n }\n parts.push(node.SourceKind ? `${node.SourceKind} step` : 'Workflow step');\n break;\n case 'Run':\n parts.push('Agent run');\n break;\n default:\n break;\n }\n\n if (node.Cost != null) parts.push(formatCost(node.Cost));\n if (node.Tokens != null) parts.push(`${node.Tokens.toLocaleString()} tokens`);\n\n return parts.join(' · ');\n}\n\n/**\n * A duration, or undefined while a node is still running.\n *\n * Deliberately not \"0ms\" for an unfinished node: a step that has not stopped has no duration, and\n * showing zero reads as one that finished instantly.\n */\nfunction formatDuration(durationMs: number | null): string | undefined {\n if (durationMs == null) return undefined;\n if (durationMs < 1000) return `${durationMs}ms`;\n const seconds = durationMs / 1000;\n if (seconds < 60) return `${seconds.toFixed(1)}s`;\n const minutes = Math.floor(seconds / 60);\n return `${minutes}m ${Math.round(seconds % 60)}s`;\n}\n\n/** Costs are small; two decimals would render most real steps as \"$0.00\". */\nfunction formatCost(cost: number): string {\n if (cost === 0) return '$0';\n if (cost < 0.01) return `$${cost.toFixed(4)}`;\n return `$${cost.toFixed(2)}`;\n}\n"]}
@@ -84,7 +84,7 @@ import * as i82 from "@memberjunction/ng-record-process-studio";
84
84
  import * as i83 from "@memberjunction/ng-resource-permissions";
85
85
  export declare class MemberJunctionCoreEntityFormsModule {
86
86
  static ɵfac: i0.ɵɵFactoryDeclaration<MemberJunctionCoreEntityFormsModule, never>;
87
- static ɵmod: i0.ɵɵNgModuleDeclaration<MemberJunctionCoreEntityFormsModule, [typeof i1.MJEntityFormComponentExtended, typeof i2.MJEntityActionFormComponentExtended, typeof i3.MJTemplateFormComponentExtended, typeof i4.TemplateParamDialogComponent, typeof i5.TemplateParamsGridComponent, typeof i6.TemplateEditorComponent, typeof i7.MJAIPromptFormComponentExtended, typeof i8.MJAIAgentFormComponentExtended, typeof i9.NewAgentDialogComponent, typeof i10.AddActionDialogComponent, typeof i11.PromptSelectorDialogComponent, typeof i12.AgentPromptAdvancedSettingsDialogComponent, typeof i13.SubAgentAdvancedSettingsDialogComponent, typeof i14.SubAgentSelectorDialogComponent, typeof i15.CreatePromptDialogComponent, typeof i16.CreateSubAgentDialogComponent, typeof i17.EntitySelectorDialogComponent, typeof i18.MJAIPromptRunFormComponentExtended, typeof i19.ChatMessageViewerComponent, typeof i20.MJActionFormComponentExtended, typeof i21.MJActionExecutionLogFormComponentExtended, typeof i22.MJAIAgentRunFormComponentExtended, typeof i23.AIAgentRunTimelineComponent, typeof i24.AIAgentRunStepNodeComponent, typeof i25.AIAgentRunAnalyticsComponent, typeof i26.AIAgentRunStepDetailComponent, typeof i27.AIAgentRunFlowComponent, typeof i28.FlameCascadeComponent, typeof i29.SubwayLinesComponent, typeof i30.ConstellationComponent, typeof i31.FlowchartComponent, typeof i32.MJQueryFormComponentExtended, typeof i33.QueryRunDialogComponent, typeof i34.FlowAgentFormSectionComponent, typeof i35.MJTestRunFormComponentExtended, typeof i36.MJTestFormComponentExtended, typeof i37.MJTestSuiteRunFormComponentExtended, typeof i38.MJTestSuiteFormComponentExtended, typeof i39.MJTestRunFeedbackFormComponentExtended, typeof i40.MJTestRubricFormComponentExtended, typeof i41.EntityLinkPillComponent, typeof i42.MJListFormComponentExtended, typeof i43.TagPipelineConfigurationPanel, typeof i44.WebsiteCrawlerSettingsPanel, typeof i45.ModelPredictionPanel, typeof i46.AISkillSharingPanel, typeof i47.MJSearchScopeFormComponentExtended, typeof i48.MJSearchScopeProviderFormComponentExtended, typeof i49.MJAIAgentSessionFormComponentExtended, typeof i50.MJAIAgentChannelFormComponentExtended, typeof i51.MJAIBridgeProviderFormComponentExtended, typeof i52.MJAIAgentSessionBridgeFormComponentExtended, typeof i53.MJAIBridgeAgentIdentityFormComponentExtended, typeof i54.AgentRealtimePanel, typeof i55.RecordProcessFormComponentExtended], [typeof i56.CommonModule, typeof i57.FormsModule, typeof i57.ReactiveFormsModule, typeof i58.DragDropModule, typeof i59.AgGridModule, typeof i60.MJEmptyStateComponent, typeof i60.MJAlertComponent, typeof i60.MJButtonDirective, typeof i60.MJAccordionModule, typeof i60.MJDropdownComponent, typeof i60.MJComboboxComponent, typeof i60.MJSwitchComponent, typeof i60.MJDialogComponent, typeof i60.MJDialogTitlebarComponent, typeof i60.MJDialogActionsComponent, typeof i60.MJNumericInputComponent, typeof i60.MJWindowComponent, typeof i60.MJWindowTitlebarComponent, typeof i60.MJProgressBarComponent, typeof i61.LinkDirectivesModule, typeof i62.JoinGridModule, typeof i63.BaseFormsModule, typeof i64.MJTabStripModule, typeof i65.CodeEditorModule, typeof i66.DeepDiffModule, typeof i67.AITestHarnessModule, typeof i68.ActionGalleryModule, typeof i69.TestingModule, typeof i70.FlowEditorModule, typeof i71.TaskGraphEditorModule, typeof i72.SharedGenericModule, typeof i73.EntityRelationshipDiagramModule, typeof i74.ListManagementModule, typeof i75.ActionsModule, typeof i76.AgentsModule, typeof i77.EntityViewerModule, typeof i78.MarkdownModule, typeof i79.NgTreesModule, typeof i80.AngularSplitModule, typeof i60.MjSlidePanelComponent, typeof i63.MjFormDialogComponent, typeof i81.SearchModule, typeof i82.RecordProcessEditorComponent, typeof i83.ResourcePermissionsModule], [typeof i1.MJEntityFormComponentExtended, typeof i2.MJEntityActionFormComponentExtended, typeof i3.MJTemplateFormComponentExtended, typeof i6.TemplateEditorComponent, typeof i7.MJAIPromptFormComponentExtended, typeof i8.MJAIAgentFormComponentExtended, typeof i18.MJAIPromptRunFormComponentExtended, typeof i19.ChatMessageViewerComponent, typeof i20.MJActionFormComponentExtended, typeof i21.MJActionExecutionLogFormComponentExtended, typeof i22.MJAIAgentRunFormComponentExtended, typeof i23.AIAgentRunTimelineComponent, typeof i24.AIAgentRunStepNodeComponent, typeof i25.AIAgentRunAnalyticsComponent, typeof i32.MJQueryFormComponentExtended, typeof i34.FlowAgentFormSectionComponent, typeof i35.MJTestRunFormComponentExtended, typeof i36.MJTestFormComponentExtended, typeof i37.MJTestSuiteRunFormComponentExtended, typeof i38.MJTestSuiteFormComponentExtended, typeof i39.MJTestRunFeedbackFormComponentExtended, typeof i40.MJTestRubricFormComponentExtended, typeof i41.EntityLinkPillComponent, typeof i42.MJListFormComponentExtended, typeof i43.TagPipelineConfigurationPanel, typeof i44.WebsiteCrawlerSettingsPanel, typeof i45.ModelPredictionPanel, typeof i46.AISkillSharingPanel, typeof i47.MJSearchScopeFormComponentExtended, typeof i48.MJSearchScopeProviderFormComponentExtended, typeof i49.MJAIAgentSessionFormComponentExtended, typeof i50.MJAIAgentChannelFormComponentExtended, typeof i51.MJAIBridgeProviderFormComponentExtended, typeof i52.MJAIAgentSessionBridgeFormComponentExtended, typeof i53.MJAIBridgeAgentIdentityFormComponentExtended, typeof i54.AgentRealtimePanel, typeof i75.ActionsModule, typeof i55.RecordProcessFormComponentExtended]>;
87
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MemberJunctionCoreEntityFormsModule, [typeof i1.MJEntityFormComponentExtended, typeof i2.MJEntityActionFormComponentExtended, typeof i3.MJTemplateFormComponentExtended, typeof i4.TemplateParamDialogComponent, typeof i5.TemplateParamsGridComponent, typeof i6.TemplateEditorComponent, typeof i7.MJAIPromptFormComponentExtended, typeof i8.MJAIAgentFormComponentExtended, typeof i9.NewAgentDialogComponent, typeof i10.AddActionDialogComponent, typeof i11.PromptSelectorDialogComponent, typeof i12.AgentPromptAdvancedSettingsDialogComponent, typeof i13.SubAgentAdvancedSettingsDialogComponent, typeof i14.SubAgentSelectorDialogComponent, typeof i15.CreatePromptDialogComponent, typeof i16.CreateSubAgentDialogComponent, typeof i17.EntitySelectorDialogComponent, typeof i18.MJAIPromptRunFormComponentExtended, typeof i19.ChatMessageViewerComponent, typeof i20.MJActionFormComponentExtended, typeof i21.MJActionExecutionLogFormComponentExtended, typeof i22.MJAIAgentRunFormComponentExtended, typeof i23.AIAgentRunTimelineComponent, typeof i24.AIAgentRunStepNodeComponent, typeof i25.AIAgentRunAnalyticsComponent, typeof i26.AIAgentRunStepDetailComponent, typeof i27.AIAgentRunFlowComponent, typeof i28.FlameCascadeComponent, typeof i29.SubwayLinesComponent, typeof i30.ConstellationComponent, typeof i31.FlowchartComponent, typeof i32.MJQueryFormComponentExtended, typeof i33.QueryRunDialogComponent, typeof i34.FlowAgentFormSectionComponent, typeof i35.MJTestRunFormComponentExtended, typeof i36.MJTestFormComponentExtended, typeof i37.MJTestSuiteRunFormComponentExtended, typeof i38.MJTestSuiteFormComponentExtended, typeof i39.MJTestRunFeedbackFormComponentExtended, typeof i40.MJTestRubricFormComponentExtended, typeof i41.EntityLinkPillComponent, typeof i42.MJListFormComponentExtended, typeof i43.TagPipelineConfigurationPanel, typeof i44.WebsiteCrawlerSettingsPanel, typeof i45.ModelPredictionPanel, typeof i46.AISkillSharingPanel, typeof i47.MJSearchScopeFormComponentExtended, typeof i48.MJSearchScopeProviderFormComponentExtended, typeof i49.MJAIAgentSessionFormComponentExtended, typeof i50.MJAIAgentChannelFormComponentExtended, typeof i51.MJAIBridgeProviderFormComponentExtended, typeof i52.MJAIAgentSessionBridgeFormComponentExtended, typeof i53.MJAIBridgeAgentIdentityFormComponentExtended, typeof i54.AgentRealtimePanel, typeof i55.RecordProcessFormComponentExtended], [typeof i56.CommonModule, typeof i57.FormsModule, typeof i57.ReactiveFormsModule, typeof i58.DragDropModule, typeof i59.AgGridModule, typeof i60.MJEmptyStateComponent, typeof i60.MJAlertComponent, typeof i60.MJTabNavComponent, typeof i60.MJButtonDirective, typeof i60.MJAccordionModule, typeof i60.MJDropdownComponent, typeof i60.MJComboboxComponent, typeof i60.MJSwitchComponent, typeof i60.MJDialogComponent, typeof i60.MJDialogTitlebarComponent, typeof i60.MJDialogActionsComponent, typeof i60.MJNumericInputComponent, typeof i60.MJWindowComponent, typeof i60.MJWindowTitlebarComponent, typeof i60.MJProgressBarComponent, typeof i61.LinkDirectivesModule, typeof i62.JoinGridModule, typeof i63.BaseFormsModule, typeof i64.MJTabStripModule, typeof i65.CodeEditorModule, typeof i66.DeepDiffModule, typeof i67.AITestHarnessModule, typeof i68.ActionGalleryModule, typeof i69.TestingModule, typeof i70.FlowEditorModule, typeof i71.TaskGraphEditorModule, typeof i72.SharedGenericModule, typeof i73.EntityRelationshipDiagramModule, typeof i74.ListManagementModule, typeof i75.ActionsModule, typeof i76.AgentsModule, typeof i77.EntityViewerModule, typeof i78.MarkdownModule, typeof i79.NgTreesModule, typeof i80.AngularSplitModule, typeof i60.MjSlidePanelComponent, typeof i63.MjFormDialogComponent, typeof i81.SearchModule, typeof i82.RecordProcessEditorComponent, typeof i83.ResourcePermissionsModule], [typeof i1.MJEntityFormComponentExtended, typeof i2.MJEntityActionFormComponentExtended, typeof i3.MJTemplateFormComponentExtended, typeof i6.TemplateEditorComponent, typeof i7.MJAIPromptFormComponentExtended, typeof i8.MJAIAgentFormComponentExtended, typeof i18.MJAIPromptRunFormComponentExtended, typeof i19.ChatMessageViewerComponent, typeof i20.MJActionFormComponentExtended, typeof i21.MJActionExecutionLogFormComponentExtended, typeof i22.MJAIAgentRunFormComponentExtended, typeof i23.AIAgentRunTimelineComponent, typeof i24.AIAgentRunStepNodeComponent, typeof i25.AIAgentRunAnalyticsComponent, typeof i32.MJQueryFormComponentExtended, typeof i34.FlowAgentFormSectionComponent, typeof i35.MJTestRunFormComponentExtended, typeof i36.MJTestFormComponentExtended, typeof i37.MJTestSuiteRunFormComponentExtended, typeof i38.MJTestSuiteFormComponentExtended, typeof i39.MJTestRunFeedbackFormComponentExtended, typeof i40.MJTestRubricFormComponentExtended, typeof i41.EntityLinkPillComponent, typeof i42.MJListFormComponentExtended, typeof i43.TagPipelineConfigurationPanel, typeof i44.WebsiteCrawlerSettingsPanel, typeof i45.ModelPredictionPanel, typeof i46.AISkillSharingPanel, typeof i47.MJSearchScopeFormComponentExtended, typeof i48.MJSearchScopeProviderFormComponentExtended, typeof i49.MJAIAgentSessionFormComponentExtended, typeof i50.MJAIAgentChannelFormComponentExtended, typeof i51.MJAIBridgeProviderFormComponentExtended, typeof i52.MJAIAgentSessionBridgeFormComponentExtended, typeof i53.MJAIBridgeAgentIdentityFormComponentExtended, typeof i54.AgentRealtimePanel, typeof i75.ActionsModule, typeof i55.RecordProcessFormComponentExtended]>;
88
88
  static ɵinj: i0.ɵɵInjectorDeclaration<MemberJunctionCoreEntityFormsModule>;
89
89
  }
90
90
  //# sourceMappingURL=custom-forms.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-forms.module.d.ts","sourceRoot":"","sources":["../../../src/lib/custom/custom-forms.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,qBAuJa,mCAAmC;yCAAnC,mCAAmC;0CAAnC,mCAAmC;0CAAnC,mCAAmC;CAAI"}
1
+ {"version":3,"file":"custom-forms.module.d.ts","sourceRoot":"","sources":["../../../src/lib/custom/custom-forms.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,qBAwJa,mCAAmC;yCAAnC,mCAAmC;0CAAnC,mCAAmC;0CAAnC,mCAAmC;CAAI"}
@@ -2,7 +2,7 @@ import { NgModule } from "@angular/core";
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4
4
  import { DragDropModule } from '@angular/cdk/drag-drop';
5
- import { MJButtonDirective, MJAccordionModule, MJDropdownComponent, MJComboboxComponent, MJSwitchComponent, MJDialogComponent, MJDialogTitlebarComponent, MJDialogActionsComponent, MJNumericInputComponent, MJWindowComponent, MJWindowTitlebarComponent, MJProgressBarComponent, MjSlidePanelComponent, MJEmptyStateComponent, MJAlertComponent } from '@memberjunction/ng-ui-components';
5
+ import { MJButtonDirective, MJAccordionModule, MJDropdownComponent, MJComboboxComponent, MJSwitchComponent, MJDialogComponent, MJDialogTitlebarComponent, MJDialogActionsComponent, MJNumericInputComponent, MJWindowComponent, MJWindowTitlebarComponent, MJProgressBarComponent, MjSlidePanelComponent, MJEmptyStateComponent, MJAlertComponent, MJTabNavComponent } from '@memberjunction/ng-ui-components';
6
6
  import { AngularSplitModule } from 'angular-split';
7
7
  import { AgGridModule } from 'ag-grid-angular';
8
8
  import { BaseFormsModule, MjFormDialogComponent } from '@memberjunction/ng-base-forms';
@@ -115,6 +115,7 @@ export class MemberJunctionCoreEntityFormsModule {
115
115
  AgGridModule,
116
116
  MJEmptyStateComponent,
117
117
  MJAlertComponent,
118
+ MJTabNavComponent,
118
119
  MJAccordionModule,
119
120
  MJDropdownComponent,
120
121
  MJComboboxComponent,
@@ -222,6 +223,7 @@ export class MemberJunctionCoreEntityFormsModule {
222
223
  AgGridModule,
223
224
  MJEmptyStateComponent,
224
225
  MJAlertComponent,
226
+ MJTabNavComponent,
225
227
  MJButtonDirective,
226
228
  MJAccordionModule,
227
229
  MJDropdownComponent,
@@ -369,6 +371,7 @@ export class MemberJunctionCoreEntityFormsModule {
369
371
  AgGridModule,
370
372
  MJEmptyStateComponent,
371
373
  MJAlertComponent,
374
+ MJTabNavComponent,
372
375
  MJButtonDirective,
373
376
  MJAccordionModule,
374
377
  MJDropdownComponent,