@lssm/example.agent-console 0.0.0-canary-20251223215909 → 0.0.0-canary-20251225044228
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/.turbo/turbo-build$colon$bundle.log +33 -33
- package/.turbo/turbo-build.log +33 -33
- package/CHANGELOG.md +6 -6
- package/dist/agent/agent.entity.d.ts +36 -36
- package/dist/agent/agent.entity.d.ts.map +1 -1
- package/dist/agent/agent.enum.d.ts +4 -4
- package/dist/agent/agent.event.d.ts +30 -30
- package/dist/agent/agent.event.d.ts.map +1 -1
- package/dist/agent/agent.event.js +41 -12
- package/dist/agent/agent.event.js.map +1 -1
- package/dist/agent/agent.operation.d.ts +120 -154
- package/dist/agent/agent.operation.d.ts.map +1 -1
- package/dist/agent/agent.operation.js +12 -9
- package/dist/agent/agent.operation.js.map +1 -1
- package/dist/agent/agent.presentation.d.ts.map +1 -1
- package/dist/agent/agent.presentation.js +19 -6
- package/dist/agent/agent.presentation.js.map +1 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/agent.feature.js +76 -69
- package/dist/agent.feature.js.map +1 -1
- package/dist/run/run.entity.d.ts +56 -56
- package/dist/run/run.enum.d.ts +5 -5
- package/dist/run/run.event.d.ts +70 -70
- package/dist/run/run.event.d.ts.map +1 -1
- package/dist/run/run.event.js +69 -21
- package/dist/run/run.event.js.map +1 -1
- package/dist/run/run.operation.d.ts +182 -176
- package/dist/run/run.operation.d.ts.map +1 -1
- package/dist/run/run.operation.js +16 -10
- package/dist/run/run.operation.js.map +1 -1
- package/dist/run/run.presentation.d.ts.map +1 -1
- package/dist/run/run.presentation.js +13 -4
- package/dist/run/run.presentation.js.map +1 -1
- package/dist/run/run.schema.d.ts +99 -99
- package/dist/tool/tool.entity.d.ts +24 -24
- package/dist/tool/tool.enum.d.ts +4 -4
- package/dist/tool/tool.event.d.ts +24 -24
- package/dist/tool/tool.event.d.ts.map +1 -1
- package/dist/tool/tool.event.js +25 -9
- package/dist/tool/tool.event.js.map +1 -1
- package/dist/tool/tool.handler.d.ts.map +1 -1
- package/dist/tool/tool.operation.d.ts +108 -102
- package/dist/tool/tool.operation.d.ts.map +1 -1
- package/dist/tool/tool.operation.js +14 -8
- package/dist/tool/tool.operation.js.map +1 -1
- package/dist/tool/tool.presentation.d.ts.map +1 -1
- package/dist/tool/tool.presentation.js +13 -4
- package/dist/tool/tool.presentation.js.map +1 -1
- package/dist/tool/tool.schema.d.ts +52 -52
- package/dist/tool/tool.schema.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/agent/agent.event.ts +34 -12
- package/src/agent/agent.operation.ts +12 -9
- package/src/agent/agent.presentation.ts +16 -3
- package/src/agent.feature.ts +58 -56
- package/src/run/run.event.ts +58 -21
- package/src/run/run.operation.ts +16 -10
- package/src/run/run.presentation.ts +11 -2
- package/src/tool/tool.event.ts +27 -10
- package/src/tool/tool.operation.ts +14 -8
- package/src/tool/tool.presentation.ts +11 -2
- package/tsconfig.tsbuildinfo +1 -1
package/dist/run/run.event.d.ts
CHANGED
|
@@ -1,287 +1,287 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema325 from "@lssm/lib.schema";
|
|
2
2
|
import * as _lssm_lib_contracts10 from "@lssm/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/run/run.event.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* RunStartedEvent - An agent run was started.
|
|
7
7
|
*/
|
|
8
|
-
declare const RunStartedEvent: _lssm_lib_contracts10.EventSpec<
|
|
8
|
+
declare const RunStartedEvent: _lssm_lib_contracts10.EventSpec<_lssm_lib_schema325.SchemaModel<{
|
|
9
9
|
runId: {
|
|
10
|
-
type:
|
|
10
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
organizationId: {
|
|
14
|
-
type:
|
|
14
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
agentId: {
|
|
18
|
-
type:
|
|
18
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
19
19
|
isOptional: false;
|
|
20
20
|
};
|
|
21
21
|
agentName: {
|
|
22
|
-
type:
|
|
22
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
23
23
|
isOptional: false;
|
|
24
24
|
};
|
|
25
25
|
userId: {
|
|
26
|
-
type:
|
|
26
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
27
27
|
isOptional: true;
|
|
28
28
|
};
|
|
29
29
|
sessionId: {
|
|
30
|
-
type:
|
|
30
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
31
31
|
isOptional: true;
|
|
32
32
|
};
|
|
33
33
|
input: {
|
|
34
|
-
type:
|
|
34
|
+
type: _lssm_lib_schema325.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
35
35
|
isOptional: false;
|
|
36
36
|
};
|
|
37
37
|
startedAt: {
|
|
38
|
-
type:
|
|
38
|
+
type: _lssm_lib_schema325.FieldType<Date, string>;
|
|
39
39
|
isOptional: false;
|
|
40
40
|
};
|
|
41
41
|
}>>;
|
|
42
42
|
/**
|
|
43
43
|
* RunCompletedEvent - An agent run completed successfully.
|
|
44
44
|
*/
|
|
45
|
-
declare const RunCompletedEvent: _lssm_lib_contracts10.EventSpec<
|
|
45
|
+
declare const RunCompletedEvent: _lssm_lib_contracts10.EventSpec<_lssm_lib_schema325.SchemaModel<{
|
|
46
46
|
runId: {
|
|
47
|
-
type:
|
|
47
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
48
48
|
isOptional: false;
|
|
49
49
|
};
|
|
50
50
|
organizationId: {
|
|
51
|
-
type:
|
|
51
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
52
52
|
isOptional: false;
|
|
53
53
|
};
|
|
54
54
|
agentId: {
|
|
55
|
-
type:
|
|
55
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
56
56
|
isOptional: false;
|
|
57
57
|
};
|
|
58
58
|
agentName: {
|
|
59
|
-
type:
|
|
59
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
60
60
|
isOptional: false;
|
|
61
61
|
};
|
|
62
62
|
userId: {
|
|
63
|
-
type:
|
|
63
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
64
64
|
isOptional: true;
|
|
65
65
|
};
|
|
66
66
|
output: {
|
|
67
|
-
type:
|
|
67
|
+
type: _lssm_lib_schema325.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
68
68
|
isOptional: false;
|
|
69
69
|
};
|
|
70
70
|
totalTokens: {
|
|
71
|
-
type:
|
|
71
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
72
72
|
isOptional: false;
|
|
73
73
|
};
|
|
74
74
|
promptTokens: {
|
|
75
|
-
type:
|
|
75
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
76
76
|
isOptional: false;
|
|
77
77
|
};
|
|
78
78
|
completionTokens: {
|
|
79
|
-
type:
|
|
79
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
80
80
|
isOptional: false;
|
|
81
81
|
};
|
|
82
82
|
totalIterations: {
|
|
83
|
-
type:
|
|
83
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
84
84
|
isOptional: false;
|
|
85
85
|
};
|
|
86
86
|
durationMs: {
|
|
87
|
-
type:
|
|
87
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
88
88
|
isOptional: false;
|
|
89
89
|
};
|
|
90
90
|
estimatedCostUsd: {
|
|
91
|
-
type:
|
|
91
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
92
92
|
isOptional: true;
|
|
93
93
|
};
|
|
94
94
|
completedAt: {
|
|
95
|
-
type:
|
|
95
|
+
type: _lssm_lib_schema325.FieldType<Date, string>;
|
|
96
96
|
isOptional: false;
|
|
97
97
|
};
|
|
98
98
|
}>>;
|
|
99
99
|
/**
|
|
100
100
|
* RunFailedEvent - An agent run failed.
|
|
101
101
|
*/
|
|
102
|
-
declare const RunFailedEvent: _lssm_lib_contracts10.EventSpec<
|
|
102
|
+
declare const RunFailedEvent: _lssm_lib_contracts10.EventSpec<_lssm_lib_schema325.SchemaModel<{
|
|
103
103
|
runId: {
|
|
104
|
-
type:
|
|
104
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
105
105
|
isOptional: false;
|
|
106
106
|
};
|
|
107
107
|
organizationId: {
|
|
108
|
-
type:
|
|
108
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
109
109
|
isOptional: false;
|
|
110
110
|
};
|
|
111
111
|
agentId: {
|
|
112
|
-
type:
|
|
112
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
113
113
|
isOptional: false;
|
|
114
114
|
};
|
|
115
115
|
agentName: {
|
|
116
|
-
type:
|
|
116
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
117
117
|
isOptional: false;
|
|
118
118
|
};
|
|
119
119
|
userId: {
|
|
120
|
-
type:
|
|
120
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
121
121
|
isOptional: true;
|
|
122
122
|
};
|
|
123
123
|
errorMessage: {
|
|
124
|
-
type:
|
|
124
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
125
125
|
isOptional: false;
|
|
126
126
|
};
|
|
127
127
|
errorCode: {
|
|
128
|
-
type:
|
|
128
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
129
129
|
isOptional: true;
|
|
130
130
|
};
|
|
131
131
|
totalTokens: {
|
|
132
|
-
type:
|
|
132
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
133
133
|
isOptional: false;
|
|
134
134
|
};
|
|
135
135
|
totalIterations: {
|
|
136
|
-
type:
|
|
136
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
137
137
|
isOptional: false;
|
|
138
138
|
};
|
|
139
139
|
durationMs: {
|
|
140
|
-
type:
|
|
140
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
141
141
|
isOptional: true;
|
|
142
142
|
};
|
|
143
143
|
failedAt: {
|
|
144
|
-
type:
|
|
144
|
+
type: _lssm_lib_schema325.FieldType<Date, string>;
|
|
145
145
|
isOptional: false;
|
|
146
146
|
};
|
|
147
147
|
}>>;
|
|
148
148
|
/**
|
|
149
149
|
* RunCancelledEvent - An agent run was cancelled.
|
|
150
150
|
*/
|
|
151
|
-
declare const RunCancelledEvent: _lssm_lib_contracts10.EventSpec<
|
|
151
|
+
declare const RunCancelledEvent: _lssm_lib_contracts10.EventSpec<_lssm_lib_schema325.SchemaModel<{
|
|
152
152
|
runId: {
|
|
153
|
-
type:
|
|
153
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
154
154
|
isOptional: false;
|
|
155
155
|
};
|
|
156
156
|
organizationId: {
|
|
157
|
-
type:
|
|
157
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
158
158
|
isOptional: false;
|
|
159
159
|
};
|
|
160
160
|
agentId: {
|
|
161
|
-
type:
|
|
161
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
162
162
|
isOptional: false;
|
|
163
163
|
};
|
|
164
164
|
userId: {
|
|
165
|
-
type:
|
|
165
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
166
166
|
isOptional: true;
|
|
167
167
|
};
|
|
168
168
|
cancelledBy: {
|
|
169
|
-
type:
|
|
169
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
170
170
|
isOptional: true;
|
|
171
171
|
};
|
|
172
172
|
reason: {
|
|
173
|
-
type:
|
|
173
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
174
174
|
isOptional: true;
|
|
175
175
|
};
|
|
176
176
|
totalTokens: {
|
|
177
|
-
type:
|
|
177
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
178
178
|
isOptional: false;
|
|
179
179
|
};
|
|
180
180
|
totalIterations: {
|
|
181
|
-
type:
|
|
181
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
182
182
|
isOptional: false;
|
|
183
183
|
};
|
|
184
184
|
cancelledAt: {
|
|
185
|
-
type:
|
|
185
|
+
type: _lssm_lib_schema325.FieldType<Date, string>;
|
|
186
186
|
isOptional: false;
|
|
187
187
|
};
|
|
188
188
|
}>>;
|
|
189
189
|
/**
|
|
190
190
|
* ToolInvokedEvent - A tool was invoked during a run.
|
|
191
191
|
*/
|
|
192
|
-
declare const ToolInvokedEvent: _lssm_lib_contracts10.EventSpec<
|
|
192
|
+
declare const ToolInvokedEvent: _lssm_lib_contracts10.EventSpec<_lssm_lib_schema325.SchemaModel<{
|
|
193
193
|
runId: {
|
|
194
|
-
type:
|
|
194
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
195
195
|
isOptional: false;
|
|
196
196
|
};
|
|
197
197
|
stepId: {
|
|
198
|
-
type:
|
|
198
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
199
199
|
isOptional: false;
|
|
200
200
|
};
|
|
201
201
|
toolId: {
|
|
202
|
-
type:
|
|
202
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
203
203
|
isOptional: false;
|
|
204
204
|
};
|
|
205
205
|
toolName: {
|
|
206
|
-
type:
|
|
206
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
207
207
|
isOptional: false;
|
|
208
208
|
};
|
|
209
209
|
input: {
|
|
210
|
-
type:
|
|
210
|
+
type: _lssm_lib_schema325.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
211
211
|
isOptional: false;
|
|
212
212
|
};
|
|
213
213
|
invokedAt: {
|
|
214
|
-
type:
|
|
214
|
+
type: _lssm_lib_schema325.FieldType<Date, string>;
|
|
215
215
|
isOptional: false;
|
|
216
216
|
};
|
|
217
217
|
}>>;
|
|
218
218
|
/**
|
|
219
219
|
* ToolCompletedEvent - A tool invocation completed.
|
|
220
220
|
*/
|
|
221
|
-
declare const ToolCompletedEvent: _lssm_lib_contracts10.EventSpec<
|
|
221
|
+
declare const ToolCompletedEvent: _lssm_lib_contracts10.EventSpec<_lssm_lib_schema325.SchemaModel<{
|
|
222
222
|
runId: {
|
|
223
|
-
type:
|
|
223
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
224
224
|
isOptional: false;
|
|
225
225
|
};
|
|
226
226
|
stepId: {
|
|
227
|
-
type:
|
|
227
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
228
228
|
isOptional: false;
|
|
229
229
|
};
|
|
230
230
|
toolId: {
|
|
231
|
-
type:
|
|
231
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
232
232
|
isOptional: false;
|
|
233
233
|
};
|
|
234
234
|
toolName: {
|
|
235
|
-
type:
|
|
235
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
236
236
|
isOptional: false;
|
|
237
237
|
};
|
|
238
238
|
success: {
|
|
239
|
-
type:
|
|
239
|
+
type: _lssm_lib_schema325.FieldType<boolean, boolean>;
|
|
240
240
|
isOptional: false;
|
|
241
241
|
};
|
|
242
242
|
output: {
|
|
243
|
-
type:
|
|
243
|
+
type: _lssm_lib_schema325.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
244
244
|
isOptional: true;
|
|
245
245
|
};
|
|
246
246
|
errorMessage: {
|
|
247
|
-
type:
|
|
247
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
248
248
|
isOptional: true;
|
|
249
249
|
};
|
|
250
250
|
durationMs: {
|
|
251
|
-
type:
|
|
251
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
252
252
|
isOptional: false;
|
|
253
253
|
};
|
|
254
254
|
completedAt: {
|
|
255
|
-
type:
|
|
255
|
+
type: _lssm_lib_schema325.FieldType<Date, string>;
|
|
256
256
|
isOptional: false;
|
|
257
257
|
};
|
|
258
258
|
}>>;
|
|
259
259
|
/**
|
|
260
260
|
* MessageGeneratedEvent - Agent generated a message.
|
|
261
261
|
*/
|
|
262
|
-
declare const MessageGeneratedEvent: _lssm_lib_contracts10.EventSpec<
|
|
262
|
+
declare const MessageGeneratedEvent: _lssm_lib_contracts10.EventSpec<_lssm_lib_schema325.SchemaModel<{
|
|
263
263
|
runId: {
|
|
264
|
-
type:
|
|
264
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
265
265
|
isOptional: false;
|
|
266
266
|
};
|
|
267
267
|
stepId: {
|
|
268
|
-
type:
|
|
268
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
269
269
|
isOptional: false;
|
|
270
270
|
};
|
|
271
271
|
messageType: {
|
|
272
|
-
type:
|
|
272
|
+
type: _lssm_lib_schema325.EnumType<[string, string]>;
|
|
273
273
|
isOptional: false;
|
|
274
274
|
};
|
|
275
275
|
content: {
|
|
276
|
-
type:
|
|
276
|
+
type: _lssm_lib_schema325.FieldType<string, string>;
|
|
277
277
|
isOptional: false;
|
|
278
278
|
};
|
|
279
279
|
tokensUsed: {
|
|
280
|
-
type:
|
|
280
|
+
type: _lssm_lib_schema325.FieldType<number, number>;
|
|
281
281
|
isOptional: false;
|
|
282
282
|
};
|
|
283
283
|
generatedAt: {
|
|
284
|
-
type:
|
|
284
|
+
type: _lssm_lib_schema325.FieldType<Date, string>;
|
|
285
285
|
isOptional: false;
|
|
286
286
|
};
|
|
287
287
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.event.d.ts","names":[],"sources":["../../src/run/run.event.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"run.event.d.ts","names":[],"sources":["../../src/run/run.event.ts"],"sourcesContent":[],"mappings":";;;;;;;cA6Ba,iBAAe,qBAAA,CAAA,8BAAA;EAAf,KAAA,EAAA;IAUX,IAAA,EAAA,mBAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;IAV0B,IAAA,+BAAA,CAAA,MAAA,EAAA,M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UAUhC,mBAAA,CAAA"}
|
package/dist/run/run.event.js
CHANGED
|
@@ -2,6 +2,7 @@ import { ScalarTypeEnum, defineEnum } from "@lssm/lib.schema";
|
|
|
2
2
|
import { defineEvent, defineSchemaModel as defineSchemaModel$1 } from "@lssm/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/run/run.event.ts
|
|
5
|
+
const OWNERS = ["@agent-console-team"];
|
|
5
6
|
/**
|
|
6
7
|
* Payload for run started event.
|
|
7
8
|
*/
|
|
@@ -47,9 +48,14 @@ const RunStartedPayload = defineSchemaModel$1({
|
|
|
47
48
|
* RunStartedEvent - An agent run was started.
|
|
48
49
|
*/
|
|
49
50
|
const RunStartedEvent = defineEvent({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
meta: {
|
|
52
|
+
key: "agent.run.started",
|
|
53
|
+
version: 1,
|
|
54
|
+
description: "An agent run was started.",
|
|
55
|
+
stability: "stable",
|
|
56
|
+
owners: [...OWNERS],
|
|
57
|
+
tags: ["run", "started"]
|
|
58
|
+
},
|
|
53
59
|
payload: RunStartedPayload
|
|
54
60
|
});
|
|
55
61
|
/**
|
|
@@ -117,9 +123,14 @@ const RunCompletedPayload = defineSchemaModel$1({
|
|
|
117
123
|
* RunCompletedEvent - An agent run completed successfully.
|
|
118
124
|
*/
|
|
119
125
|
const RunCompletedEvent = defineEvent({
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
meta: {
|
|
127
|
+
key: "agent.run.completed",
|
|
128
|
+
version: 1,
|
|
129
|
+
description: "An agent run completed successfully.",
|
|
130
|
+
stability: "stable",
|
|
131
|
+
owners: [...OWNERS],
|
|
132
|
+
tags: ["run", "completed"]
|
|
133
|
+
},
|
|
123
134
|
payload: RunCompletedPayload
|
|
124
135
|
});
|
|
125
136
|
/**
|
|
@@ -179,9 +190,14 @@ const RunFailedPayload = defineSchemaModel$1({
|
|
|
179
190
|
* RunFailedEvent - An agent run failed.
|
|
180
191
|
*/
|
|
181
192
|
const RunFailedEvent = defineEvent({
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
193
|
+
meta: {
|
|
194
|
+
key: "agent.run.failed",
|
|
195
|
+
version: 1,
|
|
196
|
+
description: "An agent run encountered an error.",
|
|
197
|
+
stability: "stable",
|
|
198
|
+
owners: [...OWNERS],
|
|
199
|
+
tags: ["run", "failed"]
|
|
200
|
+
},
|
|
185
201
|
payload: RunFailedPayload
|
|
186
202
|
});
|
|
187
203
|
/**
|
|
@@ -233,9 +249,14 @@ const RunCancelledPayload = defineSchemaModel$1({
|
|
|
233
249
|
* RunCancelledEvent - An agent run was cancelled.
|
|
234
250
|
*/
|
|
235
251
|
const RunCancelledEvent = defineEvent({
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
252
|
+
meta: {
|
|
253
|
+
key: "agent.run.cancelled",
|
|
254
|
+
version: 1,
|
|
255
|
+
description: "An agent run was cancelled by the user.",
|
|
256
|
+
stability: "stable",
|
|
257
|
+
owners: [...OWNERS],
|
|
258
|
+
tags: ["run", "cancelled"]
|
|
259
|
+
},
|
|
239
260
|
payload: RunCancelledPayload
|
|
240
261
|
});
|
|
241
262
|
/**
|
|
@@ -275,9 +296,18 @@ const ToolInvokedPayload = defineSchemaModel$1({
|
|
|
275
296
|
* ToolInvokedEvent - A tool was invoked during a run.
|
|
276
297
|
*/
|
|
277
298
|
const ToolInvokedEvent = defineEvent({
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
299
|
+
meta: {
|
|
300
|
+
key: "agent.run.toolInvoked",
|
|
301
|
+
version: 1,
|
|
302
|
+
description: "A tool was invoked during an agent run.",
|
|
303
|
+
stability: "stable",
|
|
304
|
+
owners: [...OWNERS],
|
|
305
|
+
tags: [
|
|
306
|
+
"run",
|
|
307
|
+
"tool",
|
|
308
|
+
"invoked"
|
|
309
|
+
]
|
|
310
|
+
},
|
|
281
311
|
payload: ToolInvokedPayload
|
|
282
312
|
});
|
|
283
313
|
/**
|
|
@@ -329,9 +359,18 @@ const ToolCompletedPayload = defineSchemaModel$1({
|
|
|
329
359
|
* ToolCompletedEvent - A tool invocation completed.
|
|
330
360
|
*/
|
|
331
361
|
const ToolCompletedEvent = defineEvent({
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
362
|
+
meta: {
|
|
363
|
+
key: "agent.run.toolCompleted",
|
|
364
|
+
version: 1,
|
|
365
|
+
description: "A tool invocation completed during an agent run.",
|
|
366
|
+
stability: "stable",
|
|
367
|
+
owners: [...OWNERS],
|
|
368
|
+
tags: [
|
|
369
|
+
"run",
|
|
370
|
+
"tool",
|
|
371
|
+
"completed"
|
|
372
|
+
]
|
|
373
|
+
},
|
|
335
374
|
payload: ToolCompletedPayload
|
|
336
375
|
});
|
|
337
376
|
/**
|
|
@@ -375,9 +414,18 @@ const MessageGeneratedPayload = defineSchemaModel$1({
|
|
|
375
414
|
* MessageGeneratedEvent - Agent generated a message.
|
|
376
415
|
*/
|
|
377
416
|
const MessageGeneratedEvent = defineEvent({
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
417
|
+
meta: {
|
|
418
|
+
key: "agent.run.messageGenerated",
|
|
419
|
+
version: 1,
|
|
420
|
+
description: "An agent generated a message during a run.",
|
|
421
|
+
stability: "stable",
|
|
422
|
+
owners: [...OWNERS],
|
|
423
|
+
tags: [
|
|
424
|
+
"run",
|
|
425
|
+
"message",
|
|
426
|
+
"generated"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
381
429
|
payload: MessageGeneratedPayload
|
|
382
430
|
});
|
|
383
431
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.event.js","names":["defineSchemaModel"],"sources":["../../src/run/run.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum, defineEnum } from '@lssm/lib.schema';\n\n/**\n * Payload for run started event.\n */\nconst RunStartedPayload = defineSchemaModel({\n name: 'RunStartedPayload',\n description: 'Payload for run started event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunStartedEvent - An agent run was started.\n */\nexport const RunStartedEvent = defineEvent({\n name: 'agent.run.started',\n version: 1,\n description: 'An agent run was started.',\n payload: RunStartedPayload,\n});\n\n/**\n * Payload for run completed event.\n */\nconst RunCompletedPayload = defineSchemaModel({\n name: 'RunCompletedPayload',\n description: 'Payload for run completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n promptTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completionTokens: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n estimatedCostUsd: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: true,\n },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCompletedEvent - An agent run completed successfully.\n */\nexport const RunCompletedEvent = defineEvent({\n name: 'agent.run.completed',\n version: 1,\n description: 'An agent run completed successfully.',\n payload: RunCompletedPayload,\n});\n\n/**\n * Payload for run failed event.\n */\nconst RunFailedPayload = defineSchemaModel({\n name: 'RunFailedPayload',\n description: 'Payload for run failed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n errorCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n failedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunFailedEvent - An agent run failed.\n */\nexport const RunFailedEvent = defineEvent({\n name: 'agent.run.failed',\n version: 1,\n description: 'An agent run encountered an error.',\n payload: RunFailedPayload,\n});\n\n/**\n * Payload for run cancelled event.\n */\nconst RunCancelledPayload = defineSchemaModel({\n name: 'RunCancelledPayload',\n description: 'Payload for run cancelled event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n cancelledBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n cancelledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCancelledEvent - An agent run was cancelled.\n */\nexport const RunCancelledEvent = defineEvent({\n name: 'agent.run.cancelled',\n version: 1,\n description: 'An agent run was cancelled by the user.',\n payload: RunCancelledPayload,\n});\n\n/**\n * Payload for tool invoked event.\n */\nconst ToolInvokedPayload = defineSchemaModel({\n name: 'ToolInvokedPayload',\n description: 'Payload for tool invoked event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n invokedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolInvokedEvent - A tool was invoked during a run.\n */\nexport const ToolInvokedEvent = defineEvent({\n name: 'agent.run.toolInvoked',\n version: 1,\n description: 'A tool was invoked during an agent run.',\n payload: ToolInvokedPayload,\n});\n\n/**\n * Payload for tool completed event.\n */\nconst ToolCompletedPayload = defineSchemaModel({\n name: 'ToolCompletedPayload',\n description: 'Payload for tool completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolCompletedEvent - A tool invocation completed.\n */\nexport const ToolCompletedEvent = defineEvent({\n name: 'agent.run.toolCompleted',\n version: 1,\n description: 'A tool invocation completed during an agent run.',\n payload: ToolCompletedPayload,\n});\n\n/**\n * Message type enum.\n */\nconst MessageTypeEnum = defineEnum('MessageType', ['assistant', 'system']);\n\n/**\n * Payload for message generated event.\n */\nconst MessageGeneratedPayload = defineSchemaModel({\n name: 'MessageGeneratedPayload',\n description: 'Payload for message generated event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n messageType: { type: MessageTypeEnum, isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n tokensUsed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n generatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * MessageGeneratedEvent - Agent generated a message.\n */\nexport const MessageGeneratedEvent = defineEvent({\n name: 'agent.run.messageGenerated',\n version: 1,\n description: 'An agent generated a message during a run.',\n payload: MessageGeneratedPayload,\n});\n"],"mappings":";;;;;;;AAMA,MAAM,oBAAoBA,oBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,OAAO;GAAE,MAAM,eAAe,YAAY;GAAE,YAAY;GAAO;EAC/D,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,kBAA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0BA,oBAAkB;CAChD,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,aAAa;GAAE,MAAM;GAAiB,YAAY;GAAO;EACzD,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,YAAY;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EACtE,aAAa;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EACpE;CACF,CAAC;;;;AAKF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS;CACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"run.event.js","names":["defineSchemaModel"],"sources":["../../src/run/run.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum, defineEnum } from '@lssm/lib.schema';\n\nconst OWNERS = ['@agent-console-team'] as const;\n\n/**\n * Payload for run started event.\n */\nconst RunStartedPayload = defineSchemaModel({\n name: 'RunStartedPayload',\n description: 'Payload for run started event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunStartedEvent - An agent run was started.\n */\nexport const RunStartedEvent = defineEvent({\n meta: {\n key: 'agent.run.started',\n version: 1,\n description: 'An agent run was started.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'started'],\n },\n payload: RunStartedPayload,\n});\n\n/**\n * Payload for run completed event.\n */\nconst RunCompletedPayload = defineSchemaModel({\n name: 'RunCompletedPayload',\n description: 'Payload for run completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n promptTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completionTokens: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: false,\n },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n estimatedCostUsd: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: true,\n },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCompletedEvent - An agent run completed successfully.\n */\nexport const RunCompletedEvent = defineEvent({\n meta: {\n key: 'agent.run.completed',\n version: 1,\n description: 'An agent run completed successfully.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'completed'],\n },\n payload: RunCompletedPayload,\n});\n\n/**\n * Payload for run failed event.\n */\nconst RunFailedPayload = defineSchemaModel({\n name: 'RunFailedPayload',\n description: 'Payload for run failed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n errorCode: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n failedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunFailedEvent - An agent run failed.\n */\nexport const RunFailedEvent = defineEvent({\n meta: {\n key: 'agent.run.failed',\n version: 1,\n description: 'An agent run encountered an error.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'failed'],\n },\n payload: RunFailedPayload,\n});\n\n/**\n * Payload for run cancelled event.\n */\nconst RunCancelledPayload = defineSchemaModel({\n name: 'RunCancelledPayload',\n description: 'Payload for run cancelled event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n userId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n cancelledBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n totalTokens: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n totalIterations: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n cancelledAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * RunCancelledEvent - An agent run was cancelled.\n */\nexport const RunCancelledEvent = defineEvent({\n meta: {\n key: 'agent.run.cancelled',\n version: 1,\n description: 'An agent run was cancelled by the user.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'cancelled'],\n },\n payload: RunCancelledPayload,\n});\n\n/**\n * Payload for tool invoked event.\n */\nconst ToolInvokedPayload = defineSchemaModel({\n name: 'ToolInvokedPayload',\n description: 'Payload for tool invoked event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n input: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n invokedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolInvokedEvent - A tool was invoked during a run.\n */\nexport const ToolInvokedEvent = defineEvent({\n meta: {\n key: 'agent.run.toolInvoked',\n version: 1,\n description: 'A tool was invoked during an agent run.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'tool', 'invoked'],\n },\n payload: ToolInvokedPayload,\n});\n\n/**\n * Payload for tool completed event.\n */\nconst ToolCompletedPayload = defineSchemaModel({\n name: 'ToolCompletedPayload',\n description: 'Payload for tool completed event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n errorMessage: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolCompletedEvent - A tool invocation completed.\n */\nexport const ToolCompletedEvent = defineEvent({\n meta: {\n key: 'agent.run.toolCompleted',\n version: 1,\n description: 'A tool invocation completed during an agent run.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'tool', 'completed'],\n },\n payload: ToolCompletedPayload,\n});\n\n/**\n * Message type enum.\n */\nconst MessageTypeEnum = defineEnum('MessageType', ['assistant', 'system']);\n\n/**\n * Payload for message generated event.\n */\nconst MessageGeneratedPayload = defineSchemaModel({\n name: 'MessageGeneratedPayload',\n description: 'Payload for message generated event',\n fields: {\n runId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n stepId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n messageType: { type: MessageTypeEnum, isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n tokensUsed: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n generatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * MessageGeneratedEvent - Agent generated a message.\n */\nexport const MessageGeneratedEvent = defineEvent({\n meta: {\n key: 'agent.run.messageGenerated',\n version: 1,\n description: 'An agent generated a message during a run.',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['run', 'message', 'generated'],\n },\n payload: MessageGeneratedPayload,\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,sBAAsB;;;;AAKtC,MAAM,oBAAoBA,oBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,OAAO;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,SAAS;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACtE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACvE,OAAO;GAAE,MAAM,eAAe,YAAY;GAAE,YAAY;GAAO;EAC/D,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,kBAAkB,YAAY;CACzC,MAAM;EACJ,KAAK;EACL,SAAS;E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