@memberjunction/ng-ai-test-harness 2.58.0 → 2.60.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 +49 -94
- package/dist/lib/agent-execution-monitor.component.d.ts.map +1 -1
- package/dist/lib/agent-execution-monitor.component.js +448 -772
- package/dist/lib/agent-execution-monitor.component.js.map +1 -1
- package/dist/lib/agent-execution-node.component.d.ts +28 -6
- package/dist/lib/agent-execution-node.component.d.ts.map +1 -1
- package/dist/lib/agent-execution-node.component.js +399 -199
- 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 +33 -17
- package/dist/lib/ai-test-harness.component.d.ts.map +1 -1
- package/dist/lib/ai-test-harness.component.js +294 -200
- 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,37 +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
|
|
117
88
|
*/
|
|
118
|
-
private
|
|
89
|
+
private processAgentRun;
|
|
119
90
|
/**
|
|
120
|
-
*
|
|
91
|
+
* Process live steps for live mode
|
|
121
92
|
*/
|
|
122
|
-
private
|
|
93
|
+
private processLiveSteps;
|
|
123
94
|
/**
|
|
124
|
-
* Render
|
|
95
|
+
* Render steps recursively with proper hierarchy
|
|
125
96
|
*/
|
|
126
|
-
private
|
|
97
|
+
private renderSteps;
|
|
127
98
|
/**
|
|
128
|
-
* Create a component for a
|
|
99
|
+
* Create a component for a step
|
|
129
100
|
*/
|
|
130
|
-
private
|
|
101
|
+
private createStepComponent;
|
|
131
102
|
/**
|
|
132
|
-
*
|
|
103
|
+
* Toggle step expansion
|
|
133
104
|
*/
|
|
134
|
-
private
|
|
105
|
+
private toggleStepExpansion;
|
|
135
106
|
/**
|
|
136
|
-
*
|
|
107
|
+
* Toggle step details expansion
|
|
137
108
|
*/
|
|
138
|
-
private
|
|
109
|
+
private toggleStepDetails;
|
|
139
110
|
/**
|
|
140
|
-
*
|
|
111
|
+
* Get step type CSS class for styling
|
|
141
112
|
*/
|
|
142
|
-
private
|
|
113
|
+
private getStepTypeClass;
|
|
143
114
|
/**
|
|
144
|
-
*
|
|
115
|
+
* Get status CSS class for styling
|
|
145
116
|
*/
|
|
146
|
-
private
|
|
117
|
+
private getStatusClass;
|
|
118
|
+
/**
|
|
119
|
+
* Helper function to safely convert a value to a preview string
|
|
120
|
+
*/
|
|
121
|
+
private valueToPreviewString;
|
|
147
122
|
/**
|
|
148
123
|
* Create a preview string from data
|
|
149
124
|
*/
|
|
@@ -164,10 +139,6 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
164
139
|
* Set up live updates for real-time execution
|
|
165
140
|
*/
|
|
166
141
|
private setupLiveUpdates;
|
|
167
|
-
/**
|
|
168
|
-
* Convert live steps format to execution tree format
|
|
169
|
-
*/
|
|
170
|
-
private convertLiveStepsToTree;
|
|
171
142
|
/**
|
|
172
143
|
* Update current step indicator
|
|
173
144
|
*/
|
|
@@ -177,21 +148,17 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
177
148
|
*/
|
|
178
149
|
private markPreviouslyNewNodesAsComplete;
|
|
179
150
|
/**
|
|
180
|
-
*
|
|
151
|
+
* Ensure only the last step in the execution order shows as running
|
|
181
152
|
*/
|
|
182
|
-
private
|
|
153
|
+
private ensureOnlyLastStepIsRunning;
|
|
183
154
|
/**
|
|
184
155
|
* Calculate execution statistics
|
|
185
156
|
*/
|
|
186
157
|
private calculateStats;
|
|
187
158
|
/**
|
|
188
|
-
*
|
|
189
|
-
*/
|
|
190
|
-
toggleNode(node: ExecutionTreeNode): void;
|
|
191
|
-
/**
|
|
192
|
-
* Check if node has expandable content
|
|
159
|
+
* Count steps recursively
|
|
193
160
|
*/
|
|
194
|
-
private
|
|
161
|
+
private countSteps;
|
|
195
162
|
/**
|
|
196
163
|
* Handle scroll events
|
|
197
164
|
*/
|
|
@@ -224,6 +191,10 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
224
191
|
* Get step types for display
|
|
225
192
|
*/
|
|
226
193
|
getStepTypes(): string[];
|
|
194
|
+
/**
|
|
195
|
+
* Pluralize step type based on count
|
|
196
|
+
*/
|
|
197
|
+
pluralizeStepType(type: string, count: number): string;
|
|
227
198
|
/**
|
|
228
199
|
* Format markdown content for display
|
|
229
200
|
*/
|
|
@@ -233,37 +204,13 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
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
|
-
*/
|
|
254
|
-
private createNodeFromLiveStep;
|
|
255
|
-
/**
|
|
256
|
-
* Collect all node IDs in the tree
|
|
257
|
-
*/
|
|
258
|
-
private collectNodeIds;
|
|
259
|
-
/**
|
|
260
|
-
* Preserve expanded state of all nodes
|
|
261
|
-
*/
|
|
262
|
-
private preserveExpandedState;
|
|
263
|
-
/**
|
|
264
|
-
* Restore expanded state of all nodes
|
|
265
|
-
*/
|
|
266
|
-
private restoreExpandedState;
|
|
213
|
+
private buildAgentPath;
|
|
267
214
|
/**
|
|
268
215
|
* Check if execution is complete
|
|
269
216
|
*/
|
|
@@ -273,10 +220,18 @@ export declare class AgentExecutionMonitorComponent implements OnChanges, OnDest
|
|
|
273
220
|
*/
|
|
274
221
|
onViewRunClick(): void;
|
|
275
222
|
/**
|
|
276
|
-
*
|
|
223
|
+
* Expands all nodes that have sub-agent children
|
|
224
|
+
*/
|
|
225
|
+
private expandAllNodes;
|
|
226
|
+
/**
|
|
227
|
+
* Scroll the execution tree to the top
|
|
228
|
+
*/
|
|
229
|
+
private scrollToTop;
|
|
230
|
+
/**
|
|
231
|
+
* Check if there is content to display
|
|
277
232
|
*/
|
|
278
|
-
|
|
233
|
+
hasContent(): boolean;
|
|
279
234
|
static ɵfac: i0.ɵɵFactoryDeclaration<AgentExecutionMonitorComponent, never>;
|
|
280
|
-
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>;
|
|
281
236
|
}
|
|
282
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"],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