@igniter-js/agents 0.1.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/AGENTS.md +2913 -0
- package/CHANGELOG.md +5 -0
- package/README.md +1585 -0
- package/dist/adapters/index.d.mts +2 -0
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.js +1024 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/index.mjs +1021 -0
- package/dist/adapters/index.mjs.map +1 -0
- package/dist/index-CX4IgrRt.d.mts +2181 -0
- package/dist/index-CX4IgrRt.d.ts +2181 -0
- package/dist/index.d.mts +3170 -0
- package/dist/index.d.ts +3170 -0
- package/dist/index.js +4045 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4011 -0
- package/dist/index.mjs.map +1 -0
- package/dist/shim.d.mts +72 -0
- package/dist/shim.d.ts +72 -0
- package/dist/shim.js +105 -0
- package/dist/shim.js.map +1 -0
- package/dist/shim.mjs +89 -0
- package/dist/shim.mjs.map +1 -0
- package/dist/telemetry/index.d.mts +340 -0
- package/dist/telemetry/index.d.ts +340 -0
- package/dist/telemetry/index.js +157 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/index.mjs +155 -0
- package/dist/telemetry/index.mjs.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as _igniter_js_telemetry from '@igniter-js/telemetry';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Telemetry events for @igniter-js/agents.
|
|
6
|
+
*
|
|
7
|
+
* ### Event Naming Convention
|
|
8
|
+
* All events are prefixed with 'igniter.agent' followed by:
|
|
9
|
+
* - `lifecycle.*` - Agent start/stop events
|
|
10
|
+
* - `generation.*` - Text generation events
|
|
11
|
+
* - `tool.*` - Tool execution events
|
|
12
|
+
* - `mcp.*` - MCP connection events
|
|
13
|
+
* - `memory.*` - Memory operation events
|
|
14
|
+
* - `error.*` - Error events
|
|
15
|
+
*
|
|
16
|
+
* ### Usage with IgniterAgent
|
|
17
|
+
*
|
|
18
|
+
* These events are automatically emitted when you use `withTelemetry()`:
|
|
19
|
+
*
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { IgniterAgent } from '@igniter-js/agents'
|
|
22
|
+
* import { IgniterTelemetry } from '@igniter-js/telemetry'
|
|
23
|
+
* import { IgniterAgentTelemetryEvents } from '@igniter-js/agents/telemetry'
|
|
24
|
+
*
|
|
25
|
+
* const telemetry = IgniterTelemetry.create()
|
|
26
|
+
* .withService('my-api')
|
|
27
|
+
* .addEvents(IgniterAgentTelemetryEvents)
|
|
28
|
+
* .build()
|
|
29
|
+
*
|
|
30
|
+
* const agent = IgniterAgent.create('assistant')
|
|
31
|
+
* .withModel(openai('gpt-4'))
|
|
32
|
+
* .withTelemetry(telemetry)
|
|
33
|
+
* .build()
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const IgniterAgentTelemetryEvents: _igniter_js_telemetry.IgniterTelemetryEventsDescriptor<"igniter.agent", {
|
|
37
|
+
"lifecycle.start.started": z.ZodObject<{
|
|
38
|
+
"ctx.agent.name": z.ZodString;
|
|
39
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
40
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
41
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
} & {
|
|
46
|
+
"lifecycle.start.success": z.ZodObject<{
|
|
47
|
+
"ctx.agent.name": z.ZodString;
|
|
48
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
49
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
50
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
} & {
|
|
55
|
+
"lifecycle.start.error": z.ZodObject<{
|
|
56
|
+
"ctx.agent.name": z.ZodString;
|
|
57
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
58
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
59
|
+
"ctx.error.code": z.ZodString;
|
|
60
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
61
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
62
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
} & {
|
|
65
|
+
"lifecycle.stop.started": z.ZodObject<{
|
|
66
|
+
"ctx.agent.name": z.ZodString;
|
|
67
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
68
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
69
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
} & {
|
|
74
|
+
"lifecycle.stop.success": z.ZodObject<{
|
|
75
|
+
"ctx.agent.name": z.ZodString;
|
|
76
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
77
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
78
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
} & {
|
|
83
|
+
"lifecycle.stop.error": z.ZodObject<{
|
|
84
|
+
"ctx.agent.name": z.ZodString;
|
|
85
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
86
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
87
|
+
"ctx.error.code": z.ZodString;
|
|
88
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
89
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
90
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
} & {
|
|
93
|
+
"generation.generate.started": z.ZodObject<{
|
|
94
|
+
"ctx.agent.name": z.ZodString;
|
|
95
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
96
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
97
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
98
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
} & {
|
|
107
|
+
"generation.generate.success": z.ZodObject<{
|
|
108
|
+
"ctx.agent.name": z.ZodString;
|
|
109
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
110
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
111
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
112
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
} & {
|
|
121
|
+
"generation.generate.error": z.ZodObject<{
|
|
122
|
+
"ctx.agent.name": z.ZodString;
|
|
123
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
124
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
125
|
+
"ctx.error.code": z.ZodString;
|
|
126
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
127
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
128
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
} & {
|
|
131
|
+
"generation.stream.started": z.ZodObject<{
|
|
132
|
+
"ctx.agent.name": z.ZodString;
|
|
133
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
134
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
135
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
136
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
} & {
|
|
145
|
+
"generation.stream.chunk": z.ZodObject<{
|
|
146
|
+
"ctx.agent.name": z.ZodString;
|
|
147
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
148
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
149
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
150
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
} & {
|
|
159
|
+
"generation.stream.success": z.ZodObject<{
|
|
160
|
+
"ctx.agent.name": z.ZodString;
|
|
161
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
162
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
163
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
164
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
} & {
|
|
173
|
+
"generation.stream.error": z.ZodObject<{
|
|
174
|
+
"ctx.agent.name": z.ZodString;
|
|
175
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
176
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
177
|
+
"ctx.error.code": z.ZodString;
|
|
178
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
179
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
180
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
} & {
|
|
183
|
+
"tool.execute.started": z.ZodObject<{
|
|
184
|
+
"ctx.agent.name": z.ZodString;
|
|
185
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
186
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
187
|
+
"ctx.tool.toolset": z.ZodString;
|
|
188
|
+
"ctx.tool.name": z.ZodString;
|
|
189
|
+
"ctx.tool.fullName": z.ZodString;
|
|
190
|
+
"ctx.tool.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
} & {
|
|
193
|
+
"tool.execute.success": z.ZodObject<{
|
|
194
|
+
"ctx.agent.name": z.ZodString;
|
|
195
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
196
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
197
|
+
"ctx.tool.toolset": z.ZodString;
|
|
198
|
+
"ctx.tool.name": z.ZodString;
|
|
199
|
+
"ctx.tool.fullName": z.ZodString;
|
|
200
|
+
"ctx.tool.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
} & {
|
|
203
|
+
"tool.execute.error": z.ZodObject<{
|
|
204
|
+
"ctx.agent.name": z.ZodString;
|
|
205
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
206
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
207
|
+
"ctx.error.code": z.ZodString;
|
|
208
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
209
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
210
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
} & {
|
|
213
|
+
"mcp.connect.started": z.ZodObject<{
|
|
214
|
+
"ctx.agent.name": z.ZodString;
|
|
215
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
216
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
217
|
+
"ctx.mcp.name": z.ZodString;
|
|
218
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
219
|
+
http: "http";
|
|
220
|
+
stdio: "stdio";
|
|
221
|
+
}>;
|
|
222
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
}, z.core.$strip>;
|
|
225
|
+
} & {
|
|
226
|
+
"mcp.connect.success": z.ZodObject<{
|
|
227
|
+
"ctx.agent.name": z.ZodString;
|
|
228
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
229
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
230
|
+
"ctx.mcp.name": z.ZodString;
|
|
231
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
232
|
+
http: "http";
|
|
233
|
+
stdio: "stdio";
|
|
234
|
+
}>;
|
|
235
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
} & {
|
|
239
|
+
"mcp.connect.error": z.ZodObject<{
|
|
240
|
+
"ctx.agent.name": z.ZodString;
|
|
241
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
242
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
243
|
+
"ctx.error.code": z.ZodString;
|
|
244
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
245
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
246
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
} & {
|
|
249
|
+
"mcp.disconnect.started": z.ZodObject<{
|
|
250
|
+
"ctx.agent.name": z.ZodString;
|
|
251
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
252
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
253
|
+
"ctx.mcp.name": z.ZodString;
|
|
254
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
255
|
+
http: "http";
|
|
256
|
+
stdio: "stdio";
|
|
257
|
+
}>;
|
|
258
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
} & {
|
|
262
|
+
"mcp.disconnect.success": z.ZodObject<{
|
|
263
|
+
"ctx.agent.name": z.ZodString;
|
|
264
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
265
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
266
|
+
"ctx.mcp.name": z.ZodString;
|
|
267
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
268
|
+
http: "http";
|
|
269
|
+
stdio: "stdio";
|
|
270
|
+
}>;
|
|
271
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
} & {
|
|
275
|
+
"mcp.disconnect.error": z.ZodObject<{
|
|
276
|
+
"ctx.agent.name": z.ZodString;
|
|
277
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
278
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
279
|
+
"ctx.error.code": z.ZodString;
|
|
280
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
281
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
282
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
} & {
|
|
285
|
+
"memory.operation.started": z.ZodObject<{
|
|
286
|
+
"ctx.agent.name": z.ZodString;
|
|
287
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
288
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
289
|
+
"ctx.memory.operation": z.ZodEnum<{
|
|
290
|
+
getWorkingMemory: "getWorkingMemory";
|
|
291
|
+
updateWorkingMemory: "updateWorkingMemory";
|
|
292
|
+
getMessages: "getMessages";
|
|
293
|
+
saveMessage: "saveMessage";
|
|
294
|
+
getChats: "getChats";
|
|
295
|
+
saveChat: "saveChat";
|
|
296
|
+
getChat: "getChat";
|
|
297
|
+
updateChatTitle: "updateChatTitle";
|
|
298
|
+
deleteChat: "deleteChat";
|
|
299
|
+
}>;
|
|
300
|
+
"ctx.memory.scope": z.ZodOptional<z.ZodString>;
|
|
301
|
+
"ctx.memory.count": z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
"ctx.memory.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
} & {
|
|
305
|
+
"memory.operation.success": z.ZodObject<{
|
|
306
|
+
"ctx.agent.name": z.ZodString;
|
|
307
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
308
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
309
|
+
"ctx.memory.operation": z.ZodEnum<{
|
|
310
|
+
getWorkingMemory: "getWorkingMemory";
|
|
311
|
+
updateWorkingMemory: "updateWorkingMemory";
|
|
312
|
+
getMessages: "getMessages";
|
|
313
|
+
saveMessage: "saveMessage";
|
|
314
|
+
getChats: "getChats";
|
|
315
|
+
saveChat: "saveChat";
|
|
316
|
+
getChat: "getChat";
|
|
317
|
+
updateChatTitle: "updateChatTitle";
|
|
318
|
+
deleteChat: "deleteChat";
|
|
319
|
+
}>;
|
|
320
|
+
"ctx.memory.scope": z.ZodOptional<z.ZodString>;
|
|
321
|
+
"ctx.memory.count": z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
"ctx.memory.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
} & {
|
|
325
|
+
"memory.operation.error": z.ZodObject<{
|
|
326
|
+
"ctx.agent.name": z.ZodString;
|
|
327
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
328
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
329
|
+
"ctx.error.code": z.ZodString;
|
|
330
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
331
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
332
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
}>;
|
|
335
|
+
/**
|
|
336
|
+
* Type for the telemetry events registry.
|
|
337
|
+
*/
|
|
338
|
+
type IgniterAgentTelemetryEventsType = typeof IgniterAgentTelemetryEvents;
|
|
339
|
+
|
|
340
|
+
export { IgniterAgentTelemetryEvents, type IgniterAgentTelemetryEventsType };
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import * as _igniter_js_telemetry from '@igniter-js/telemetry';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Telemetry events for @igniter-js/agents.
|
|
6
|
+
*
|
|
7
|
+
* ### Event Naming Convention
|
|
8
|
+
* All events are prefixed with 'igniter.agent' followed by:
|
|
9
|
+
* - `lifecycle.*` - Agent start/stop events
|
|
10
|
+
* - `generation.*` - Text generation events
|
|
11
|
+
* - `tool.*` - Tool execution events
|
|
12
|
+
* - `mcp.*` - MCP connection events
|
|
13
|
+
* - `memory.*` - Memory operation events
|
|
14
|
+
* - `error.*` - Error events
|
|
15
|
+
*
|
|
16
|
+
* ### Usage with IgniterAgent
|
|
17
|
+
*
|
|
18
|
+
* These events are automatically emitted when you use `withTelemetry()`:
|
|
19
|
+
*
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { IgniterAgent } from '@igniter-js/agents'
|
|
22
|
+
* import { IgniterTelemetry } from '@igniter-js/telemetry'
|
|
23
|
+
* import { IgniterAgentTelemetryEvents } from '@igniter-js/agents/telemetry'
|
|
24
|
+
*
|
|
25
|
+
* const telemetry = IgniterTelemetry.create()
|
|
26
|
+
* .withService('my-api')
|
|
27
|
+
* .addEvents(IgniterAgentTelemetryEvents)
|
|
28
|
+
* .build()
|
|
29
|
+
*
|
|
30
|
+
* const agent = IgniterAgent.create('assistant')
|
|
31
|
+
* .withModel(openai('gpt-4'))
|
|
32
|
+
* .withTelemetry(telemetry)
|
|
33
|
+
* .build()
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const IgniterAgentTelemetryEvents: _igniter_js_telemetry.IgniterTelemetryEventsDescriptor<"igniter.agent", {
|
|
37
|
+
"lifecycle.start.started": z.ZodObject<{
|
|
38
|
+
"ctx.agent.name": z.ZodString;
|
|
39
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
40
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
41
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
} & {
|
|
46
|
+
"lifecycle.start.success": z.ZodObject<{
|
|
47
|
+
"ctx.agent.name": z.ZodString;
|
|
48
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
49
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
50
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
} & {
|
|
55
|
+
"lifecycle.start.error": z.ZodObject<{
|
|
56
|
+
"ctx.agent.name": z.ZodString;
|
|
57
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
58
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
59
|
+
"ctx.error.code": z.ZodString;
|
|
60
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
61
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
62
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
} & {
|
|
65
|
+
"lifecycle.stop.started": z.ZodObject<{
|
|
66
|
+
"ctx.agent.name": z.ZodString;
|
|
67
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
68
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
69
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
} & {
|
|
74
|
+
"lifecycle.stop.success": z.ZodObject<{
|
|
75
|
+
"ctx.agent.name": z.ZodString;
|
|
76
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
77
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
78
|
+
"ctx.lifecycle.toolsetCount": z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
"ctx.lifecycle.mcpCount": z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
"ctx.lifecycle.hasMemory": z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
} & {
|
|
83
|
+
"lifecycle.stop.error": z.ZodObject<{
|
|
84
|
+
"ctx.agent.name": z.ZodString;
|
|
85
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
86
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
87
|
+
"ctx.error.code": z.ZodString;
|
|
88
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
89
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
90
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
} & {
|
|
93
|
+
"generation.generate.started": z.ZodObject<{
|
|
94
|
+
"ctx.agent.name": z.ZodString;
|
|
95
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
96
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
97
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
98
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
} & {
|
|
107
|
+
"generation.generate.success": z.ZodObject<{
|
|
108
|
+
"ctx.agent.name": z.ZodString;
|
|
109
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
110
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
111
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
112
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
} & {
|
|
121
|
+
"generation.generate.error": z.ZodObject<{
|
|
122
|
+
"ctx.agent.name": z.ZodString;
|
|
123
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
124
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
125
|
+
"ctx.error.code": z.ZodString;
|
|
126
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
127
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
128
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
} & {
|
|
131
|
+
"generation.stream.started": z.ZodObject<{
|
|
132
|
+
"ctx.agent.name": z.ZodString;
|
|
133
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
134
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
135
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
136
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
} & {
|
|
145
|
+
"generation.stream.chunk": z.ZodObject<{
|
|
146
|
+
"ctx.agent.name": z.ZodString;
|
|
147
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
148
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
149
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
150
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
} & {
|
|
159
|
+
"generation.stream.success": z.ZodObject<{
|
|
160
|
+
"ctx.agent.name": z.ZodString;
|
|
161
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
162
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
163
|
+
"ctx.generation.model": z.ZodOptional<z.ZodString>;
|
|
164
|
+
"ctx.generation.inputMessages": z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
"ctx.generation.inputTokens": z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
"ctx.generation.outputTokens": z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
"ctx.generation.totalTokens": z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
"ctx.generation.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
"ctx.generation.toolCalls": z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
"ctx.generation.streamed": z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
} & {
|
|
173
|
+
"generation.stream.error": z.ZodObject<{
|
|
174
|
+
"ctx.agent.name": z.ZodString;
|
|
175
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
176
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
177
|
+
"ctx.error.code": z.ZodString;
|
|
178
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
179
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
180
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
} & {
|
|
183
|
+
"tool.execute.started": z.ZodObject<{
|
|
184
|
+
"ctx.agent.name": z.ZodString;
|
|
185
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
186
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
187
|
+
"ctx.tool.toolset": z.ZodString;
|
|
188
|
+
"ctx.tool.name": z.ZodString;
|
|
189
|
+
"ctx.tool.fullName": z.ZodString;
|
|
190
|
+
"ctx.tool.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
} & {
|
|
193
|
+
"tool.execute.success": z.ZodObject<{
|
|
194
|
+
"ctx.agent.name": z.ZodString;
|
|
195
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
196
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
197
|
+
"ctx.tool.toolset": z.ZodString;
|
|
198
|
+
"ctx.tool.name": z.ZodString;
|
|
199
|
+
"ctx.tool.fullName": z.ZodString;
|
|
200
|
+
"ctx.tool.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
} & {
|
|
203
|
+
"tool.execute.error": z.ZodObject<{
|
|
204
|
+
"ctx.agent.name": z.ZodString;
|
|
205
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
206
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
207
|
+
"ctx.error.code": z.ZodString;
|
|
208
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
209
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
210
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
} & {
|
|
213
|
+
"mcp.connect.started": z.ZodObject<{
|
|
214
|
+
"ctx.agent.name": z.ZodString;
|
|
215
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
216
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
217
|
+
"ctx.mcp.name": z.ZodString;
|
|
218
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
219
|
+
http: "http";
|
|
220
|
+
stdio: "stdio";
|
|
221
|
+
}>;
|
|
222
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
}, z.core.$strip>;
|
|
225
|
+
} & {
|
|
226
|
+
"mcp.connect.success": z.ZodObject<{
|
|
227
|
+
"ctx.agent.name": z.ZodString;
|
|
228
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
229
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
230
|
+
"ctx.mcp.name": z.ZodString;
|
|
231
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
232
|
+
http: "http";
|
|
233
|
+
stdio: "stdio";
|
|
234
|
+
}>;
|
|
235
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
} & {
|
|
239
|
+
"mcp.connect.error": z.ZodObject<{
|
|
240
|
+
"ctx.agent.name": z.ZodString;
|
|
241
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
242
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
243
|
+
"ctx.error.code": z.ZodString;
|
|
244
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
245
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
246
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
} & {
|
|
249
|
+
"mcp.disconnect.started": z.ZodObject<{
|
|
250
|
+
"ctx.agent.name": z.ZodString;
|
|
251
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
252
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
253
|
+
"ctx.mcp.name": z.ZodString;
|
|
254
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
255
|
+
http: "http";
|
|
256
|
+
stdio: "stdio";
|
|
257
|
+
}>;
|
|
258
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
} & {
|
|
262
|
+
"mcp.disconnect.success": z.ZodObject<{
|
|
263
|
+
"ctx.agent.name": z.ZodString;
|
|
264
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
265
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
266
|
+
"ctx.mcp.name": z.ZodString;
|
|
267
|
+
"ctx.mcp.type": z.ZodEnum<{
|
|
268
|
+
http: "http";
|
|
269
|
+
stdio: "stdio";
|
|
270
|
+
}>;
|
|
271
|
+
"ctx.mcp.toolCount": z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
"ctx.mcp.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
} & {
|
|
275
|
+
"mcp.disconnect.error": z.ZodObject<{
|
|
276
|
+
"ctx.agent.name": z.ZodString;
|
|
277
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
278
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
279
|
+
"ctx.error.code": z.ZodString;
|
|
280
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
281
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
282
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
} & {
|
|
285
|
+
"memory.operation.started": z.ZodObject<{
|
|
286
|
+
"ctx.agent.name": z.ZodString;
|
|
287
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
288
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
289
|
+
"ctx.memory.operation": z.ZodEnum<{
|
|
290
|
+
getWorkingMemory: "getWorkingMemory";
|
|
291
|
+
updateWorkingMemory: "updateWorkingMemory";
|
|
292
|
+
getMessages: "getMessages";
|
|
293
|
+
saveMessage: "saveMessage";
|
|
294
|
+
getChats: "getChats";
|
|
295
|
+
saveChat: "saveChat";
|
|
296
|
+
getChat: "getChat";
|
|
297
|
+
updateChatTitle: "updateChatTitle";
|
|
298
|
+
deleteChat: "deleteChat";
|
|
299
|
+
}>;
|
|
300
|
+
"ctx.memory.scope": z.ZodOptional<z.ZodString>;
|
|
301
|
+
"ctx.memory.count": z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
"ctx.memory.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
} & {
|
|
305
|
+
"memory.operation.success": z.ZodObject<{
|
|
306
|
+
"ctx.agent.name": z.ZodString;
|
|
307
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
308
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
309
|
+
"ctx.memory.operation": z.ZodEnum<{
|
|
310
|
+
getWorkingMemory: "getWorkingMemory";
|
|
311
|
+
updateWorkingMemory: "updateWorkingMemory";
|
|
312
|
+
getMessages: "getMessages";
|
|
313
|
+
saveMessage: "saveMessage";
|
|
314
|
+
getChats: "getChats";
|
|
315
|
+
saveChat: "saveChat";
|
|
316
|
+
getChat: "getChat";
|
|
317
|
+
updateChatTitle: "updateChatTitle";
|
|
318
|
+
deleteChat: "deleteChat";
|
|
319
|
+
}>;
|
|
320
|
+
"ctx.memory.scope": z.ZodOptional<z.ZodString>;
|
|
321
|
+
"ctx.memory.count": z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
"ctx.memory.durationMs": z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
} & {
|
|
325
|
+
"memory.operation.error": z.ZodObject<{
|
|
326
|
+
"ctx.agent.name": z.ZodString;
|
|
327
|
+
"ctx.agent.scope": z.ZodOptional<z.ZodString>;
|
|
328
|
+
"ctx.agent.scopeId": z.ZodOptional<z.ZodString>;
|
|
329
|
+
"ctx.error.code": z.ZodString;
|
|
330
|
+
"ctx.error.message": z.ZodOptional<z.ZodString>;
|
|
331
|
+
"ctx.error.operation": z.ZodOptional<z.ZodString>;
|
|
332
|
+
"ctx.error.component": z.ZodOptional<z.ZodString>;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
}>;
|
|
335
|
+
/**
|
|
336
|
+
* Type for the telemetry events registry.
|
|
337
|
+
*/
|
|
338
|
+
type IgniterAgentTelemetryEventsType = typeof IgniterAgentTelemetryEvents;
|
|
339
|
+
|
|
340
|
+
export { IgniterAgentTelemetryEvents, type IgniterAgentTelemetryEventsType };
|