@memberjunction/ng-ai-test-harness 2.59.0 → 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/agent-execution-monitor.component.d.ts +42 -101
- package/dist/lib/agent-execution-monitor.component.d.ts.map +1 -1
- package/dist/lib/agent-execution-monitor.component.js +409 -943
- package/dist/lib/agent-execution-monitor.component.js.map +1 -1
- package/dist/lib/agent-execution-node.component.d.ts +24 -5
- package/dist/lib/agent-execution-node.component.d.ts.map +1 -1
- package/dist/lib/agent-execution-node.component.js +275 -140
- package/dist/lib/agent-execution-node.component.js.map +1 -1
- package/dist/lib/ai-test-harness-window.component.d.ts +1 -0
- package/dist/lib/ai-test-harness-window.component.d.ts.map +1 -1
- package/dist/lib/ai-test-harness-window.component.js +13 -4
- package/dist/lib/ai-test-harness-window.component.js.map +1 -1
- package/dist/lib/ai-test-harness.component.d.ts +25 -17
- package/dist/lib/ai-test-harness.component.d.ts.map +1 -1
- package/dist/lib/ai-test-harness.component.js +194 -216
- package/dist/lib/ai-test-harness.component.js.map +1 -1
- package/dist/lib/test-harness-window.service.d.ts.map +1 -1
- package/dist/lib/test-harness-window.service.js +10 -6
- package/dist/lib/test-harness-window.service.js.map +1 -1
- package/dist/module.d.ts +16 -16
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +9 -16
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +1 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges, OnDestroy, ElementRef, AfterViewInit, ChangeDetectorRef, ViewContainerRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { AIAgentRunEntityExtended, AIAgentRunStepEntityExtended } from '@memberjunction/core-entities';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* Progress message with display mode
|
|
@@ -10,38 +11,6 @@ export interface ProgressMessage {
|
|
|
10
11
|
displayMode: 'live' | 'historical' | 'both';
|
|
11
12
|
metadata?: Record<string, unknown>;
|
|
12
13
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Represents a node in the execution tree with all necessary display information
|
|
15
|
-
*/
|
|
16
|
-
export interface ExecutionTreeNode {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
type: 'validation' | 'prompt' | 'action' | 'sub-agent' | 'decision' | 'chat';
|
|
20
|
-
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
21
|
-
startTime?: Date;
|
|
22
|
-
endTime?: Date;
|
|
23
|
-
duration?: number;
|
|
24
|
-
agentPath: string[];
|
|
25
|
-
inputPreview?: string;
|
|
26
|
-
outputPreview?: string;
|
|
27
|
-
error?: string;
|
|
28
|
-
children?: ExecutionTreeNode[];
|
|
29
|
-
expanded?: boolean;
|
|
30
|
-
depth: number;
|
|
31
|
-
tokensUsed?: number;
|
|
32
|
-
cost?: number;
|
|
33
|
-
detailsMarkdown?: string;
|
|
34
|
-
detailsExpanded?: boolean;
|
|
35
|
-
promptCount?: number;
|
|
36
|
-
displayMode?: 'live' | 'historical' | 'both';
|
|
37
|
-
agentName?: string;
|
|
38
|
-
agentId?: string;
|
|
39
|
-
agentIconClass?: string;
|
|
40
|
-
agentLogoURL?: string;
|
|
41
|
-
actionName?: string;
|
|
42
|
-
actionId?: string;
|
|
43
|
-
actionIconClass?: string;
|
|
44
|
-
}
|
|
45
14
|
/**
|
|
46
15
|
* Mode for the execution monitor component
|
|
47
16
|
*/
|
|
@@ -78,7 +47,8 @@ export interface ExecutionStats {
|
|
|
78
47
|
export declare class AgentExecutionMonitorComponent implements OnChanges, OnDestroy, AfterViewInit {
|
|
79
48
|
private cdr;
|
|
80
49
|
mode: ExecutionMonitorMode;
|
|
81
|
-
|
|
50
|
+
agentRun: AIAgentRunEntityExtended | null;
|
|
51
|
+
liveSteps: AIAgentRunStepEntityExtended[];
|
|
82
52
|
autoExpand: boolean;
|
|
83
53
|
runId: string | null;
|
|
84
54
|
runType: 'agent' | 'prompt';
|
|
@@ -88,9 +58,10 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
88
58
|
}>;
|
|
89
59
|
executionTreeContainer: ElementRef<HTMLDivElement>;
|
|
90
60
|
executionNodesContainer: ViewContainerRef;
|
|
91
|
-
|
|
92
|
-
currentStep: ExecutionTreeNode | null;
|
|
61
|
+
currentStep: AIAgentRunStepEntityExtended | null;
|
|
93
62
|
private nodeComponentMap;
|
|
63
|
+
private expandedStates;
|
|
64
|
+
private detailsExpandedStates;
|
|
94
65
|
stats: ExecutionStats;
|
|
95
66
|
private userHasInteracted;
|
|
96
67
|
private userHasScrolled;
|
|
@@ -113,39 +84,41 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
113
84
|
*/
|
|
114
85
|
private clearNodeComponents;
|
|
115
86
|
/**
|
|
116
|
-
* Process
|
|
87
|
+
* Process agent run for historical mode
|
|
88
|
+
*/
|
|
89
|
+
private processAgentRun;
|
|
90
|
+
/**
|
|
91
|
+
* Process live steps for live mode
|
|
117
92
|
*/
|
|
118
|
-
private
|
|
93
|
+
private processLiveSteps;
|
|
119
94
|
/**
|
|
120
|
-
*
|
|
95
|
+
* Render steps recursively with proper hierarchy
|
|
121
96
|
*/
|
|
122
|
-
private
|
|
97
|
+
private renderSteps;
|
|
123
98
|
/**
|
|
124
|
-
*
|
|
99
|
+
* Create a component for a step
|
|
125
100
|
*/
|
|
126
|
-
private
|
|
101
|
+
private createStepComponent;
|
|
127
102
|
/**
|
|
128
|
-
*
|
|
129
|
-
* This now ensures proper depth is passed and used for indentation
|
|
103
|
+
* Toggle step expansion
|
|
130
104
|
*/
|
|
131
|
-
private
|
|
105
|
+
private toggleStepExpansion;
|
|
132
106
|
/**
|
|
133
|
-
*
|
|
134
|
-
* FIXED: Maintain proper hierarchy for sub-agents instead of flattening
|
|
107
|
+
* Toggle step details expansion
|
|
135
108
|
*/
|
|
136
|
-
private
|
|
109
|
+
private toggleStepDetails;
|
|
137
110
|
/**
|
|
138
|
-
*
|
|
111
|
+
* Get step type CSS class for styling
|
|
139
112
|
*/
|
|
140
|
-
private
|
|
113
|
+
private getStepTypeClass;
|
|
141
114
|
/**
|
|
142
|
-
*
|
|
115
|
+
* Get status CSS class for styling
|
|
143
116
|
*/
|
|
144
|
-
private
|
|
117
|
+
private getStatusClass;
|
|
145
118
|
/**
|
|
146
|
-
*
|
|
119
|
+
* Helper function to safely convert a value to a preview string
|
|
147
120
|
*/
|
|
148
|
-
private
|
|
121
|
+
private valueToPreviewString;
|
|
149
122
|
/**
|
|
150
123
|
* Create a preview string from data
|
|
151
124
|
*/
|
|
@@ -166,11 +139,6 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
166
139
|
* Set up live updates for real-time execution
|
|
167
140
|
*/
|
|
168
141
|
private setupLiveUpdates;
|
|
169
|
-
/**
|
|
170
|
-
* Convert live steps format to execution tree format
|
|
171
|
-
* FIXED: Ensure depth is properly preserved
|
|
172
|
-
*/
|
|
173
|
-
private convertLiveStepsToTree;
|
|
174
142
|
/**
|
|
175
143
|
* Update current step indicator
|
|
176
144
|
*/
|
|
@@ -180,17 +148,17 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
180
148
|
*/
|
|
181
149
|
private markPreviouslyNewNodesAsComplete;
|
|
182
150
|
/**
|
|
183
|
-
*
|
|
151
|
+
* Ensure only the last step in the execution order shows as running
|
|
184
152
|
*/
|
|
185
|
-
private
|
|
153
|
+
private ensureOnlyLastStepIsRunning;
|
|
186
154
|
/**
|
|
187
155
|
* Calculate execution statistics
|
|
188
156
|
*/
|
|
189
157
|
private calculateStats;
|
|
190
158
|
/**
|
|
191
|
-
*
|
|
159
|
+
* Count steps recursively
|
|
192
160
|
*/
|
|
193
|
-
|
|
161
|
+
private countSteps;
|
|
194
162
|
/**
|
|
195
163
|
* Handle scroll events
|
|
196
164
|
*/
|
|
@@ -223,48 +191,26 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
223
191
|
* Get step types for display
|
|
224
192
|
*/
|
|
225
193
|
getStepTypes(): string[];
|
|
194
|
+
/**
|
|
195
|
+
* Pluralize step type based on count
|
|
196
|
+
*/
|
|
197
|
+
pluralizeStepType(type: string, count: number): string;
|
|
226
198
|
/**
|
|
227
199
|
* Format markdown content for display
|
|
228
200
|
*/
|
|
229
201
|
formatMarkdown(markdown: string): string;
|
|
230
202
|
/**
|
|
231
203
|
* Append new live steps without re-rendering entire tree
|
|
232
|
-
* FIXED: Ensure depth is properly preserved when creating nodes
|
|
233
204
|
*/
|
|
234
205
|
private appendNewLiveSteps;
|
|
235
206
|
/**
|
|
236
|
-
*
|
|
237
|
-
*/
|
|
238
|
-
private generateStepId;
|
|
239
|
-
/**
|
|
240
|
-
* Find parent node based on depth
|
|
207
|
+
* Calculate step depth based on parent hierarchy
|
|
241
208
|
*/
|
|
242
|
-
private
|
|
209
|
+
private calculateStepDepth;
|
|
243
210
|
/**
|
|
244
|
-
*
|
|
211
|
+
* Build agent path for a step
|
|
245
212
|
*/
|
|
246
|
-
private
|
|
247
|
-
/**
|
|
248
|
-
* Build a map of nodes by ID for quick lookup
|
|
249
|
-
*/
|
|
250
|
-
private buildNodeMap;
|
|
251
|
-
/**
|
|
252
|
-
* Create a single node from a live step
|
|
253
|
-
* FIXED: Ensure depth is properly set from step data
|
|
254
|
-
*/
|
|
255
|
-
private createNodeFromLiveStep;
|
|
256
|
-
/**
|
|
257
|
-
* Collect all node IDs in the tree
|
|
258
|
-
*/
|
|
259
|
-
private collectNodeIds;
|
|
260
|
-
/**
|
|
261
|
-
* Preserve expanded state of all nodes
|
|
262
|
-
*/
|
|
263
|
-
private preserveExpandedState;
|
|
264
|
-
/**
|
|
265
|
-
* Restore expanded state of all nodes
|
|
266
|
-
*/
|
|
267
|
-
private restoreExpandedState;
|
|
213
|
+
private buildAgentPath;
|
|
268
214
|
/**
|
|
269
215
|
* Check if execution is complete
|
|
270
216
|
*/
|
|
@@ -274,12 +220,7 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
274
220
|
*/
|
|
275
221
|
onViewRunClick(): void;
|
|
276
222
|
/**
|
|
277
|
-
*
|
|
278
|
-
*/
|
|
279
|
-
private appendToParent;
|
|
280
|
-
/**
|
|
281
|
-
* Expands nodes in the execution tree that have children
|
|
282
|
-
* Called when auto-expand flag is detected or execution completes
|
|
223
|
+
* Expands all nodes that have sub-agent children
|
|
283
224
|
*/
|
|
284
225
|
private expandAllNodes;
|
|
285
226
|
/**
|
|
@@ -287,10 +228,10 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
287
228
|
*/
|
|
288
229
|
private scrollToTop;
|
|
289
230
|
/**
|
|
290
|
-
* Check if
|
|
231
|
+
* Check if there is content to display
|
|
291
232
|
*/
|
|
292
|
-
|
|
233
|
+
hasContent(): boolean;
|
|
293
234
|
static ɵfac: i0.ɵɵFactoryDeclaration<AgentExecutionMonitorComponent, never>;
|
|
294
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AgentExecutionMonitorComponent, "mj-agent-execution-monitor", never, { "mode": { "alias": "mode"; "required": false; }; "
|
|
235
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AgentExecutionMonitorComponent, "mj-agent-execution-monitor", never, { "mode": { "alias": "mode"; "required": false; }; "agentRun": { "alias": "agentRun"; "required": false; }; "liveSteps": { "alias": "liveSteps"; "required": false; }; "autoExpand": { "alias": "autoExpand"; "required": false; }; "runId": { "alias": "runId"; "required": false; }; "runType": { "alias": "runType"; "required": false; }; }, { "viewRunClick": "viewRunClick"; }, never, never, false, never>;
|
|
295
236
|
}
|
|
296
237
|
//# sourceMappingURL=agent-execution-monitor.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-execution-monitor.component.d.ts","sourceRoot":"","sources":["../../src/lib/agent-execution-monitor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,aAAa,EAAE,SAAS,EAAa,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAA2B,gBAAgB,EAAwB,YAAY,EAAE,MAAM,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"agent-execution-monitor.component.d.ts","sourceRoot":"","sources":["../../src/lib/agent-execution-monitor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,SAAS,EAAE,aAAa,EAAE,SAAS,EAAa,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAA2B,gBAAgB,EAAwB,YAAY,EAAE,MAAM,eAAe,CAAC;AAI9N,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;;AAEvG;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,YAAY,GAAG,MAAM,CAAC;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,YAAY,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBA0Ta,8BAA+B,YAAW,SAAS,EAAE,SAAS,EAAE,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