@botpress/runtime 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/dist/_types/actions.d.ts +3 -0
  2. package/dist/_types/actions.d.ts.map +1 -0
  3. package/dist/_types/events.d.ts +5 -0
  4. package/dist/_types/events.d.ts.map +1 -0
  5. package/dist/_types/integration-actions.d.ts +3 -0
  6. package/dist/_types/integration-actions.d.ts.map +1 -0
  7. package/dist/_types/state.d.ts +4 -0
  8. package/dist/_types/state.d.ts.map +1 -0
  9. package/dist/_types/tables.d.ts +3 -0
  10. package/dist/_types/tables.d.ts.map +1 -0
  11. package/dist/_types/triggers.d.ts +3 -0
  12. package/dist/_types/triggers.d.ts.map +1 -0
  13. package/dist/_types/workflows.d.ts +12 -0
  14. package/dist/_types/workflows.d.ts.map +1 -0
  15. package/dist/constants.d.ts +58 -0
  16. package/dist/constants.d.ts.map +1 -0
  17. package/dist/consts.d.ts +8 -0
  18. package/dist/consts.d.ts.map +1 -0
  19. package/dist/debugging/node-inspector.d.ts +5 -0
  20. package/dist/debugging/node-inspector.d.ts.map +1 -0
  21. package/dist/define-config.d.ts +70 -0
  22. package/dist/define-config.d.ts.map +1 -0
  23. package/dist/definition.d.ts +10 -0
  24. package/dist/definition.d.ts.map +1 -0
  25. package/dist/definition.js +88 -0
  26. package/dist/definition.js.map +7 -0
  27. package/dist/environment.d.ts +60 -0
  28. package/dist/environment.d.ts.map +1 -0
  29. package/dist/errors.d.ts +36 -0
  30. package/dist/errors.d.ts.map +1 -0
  31. package/dist/globals.d.ts +21 -0
  32. package/dist/globals.d.ts.map +1 -0
  33. package/dist/internal.d.ts +15 -0
  34. package/dist/internal.d.ts.map +1 -0
  35. package/dist/internal.js +46573 -0
  36. package/dist/internal.js.map +7 -0
  37. package/dist/library.d.ts +16 -0
  38. package/dist/library.d.ts.map +1 -0
  39. package/dist/library.js +45943 -0
  40. package/dist/library.js.map +7 -0
  41. package/dist/primitives/action.d.ts +37 -0
  42. package/dist/primitives/action.d.ts.map +1 -0
  43. package/dist/primitives/asset.d.ts +28 -0
  44. package/dist/primitives/asset.d.ts.map +1 -0
  45. package/dist/primitives/conversation.d.ts +104 -0
  46. package/dist/primitives/conversation.d.ts.map +1 -0
  47. package/dist/primitives/data-sources/index.d.ts +7 -0
  48. package/dist/primitives/data-sources/index.d.ts.map +1 -0
  49. package/dist/primitives/data-sources/source-base.d.ts +251 -0
  50. package/dist/primitives/data-sources/source-base.d.ts.map +1 -0
  51. package/dist/primitives/data-sources/source-directory.d.ts +119 -0
  52. package/dist/primitives/data-sources/source-directory.d.ts.map +1 -0
  53. package/dist/primitives/data-sources/source-table.d.ts +135 -0
  54. package/dist/primitives/data-sources/source-table.d.ts.map +1 -0
  55. package/dist/primitives/data-sources/source-website.d.ts +226 -0
  56. package/dist/primitives/data-sources/source-website.d.ts.map +1 -0
  57. package/dist/primitives/definition.d.ts +68 -0
  58. package/dist/primitives/definition.d.ts.map +1 -0
  59. package/dist/primitives/index.d.ts +149 -0
  60. package/dist/primitives/index.d.ts.map +1 -0
  61. package/dist/primitives/knowledge.d.ts +36 -0
  62. package/dist/primitives/knowledge.d.ts.map +1 -0
  63. package/dist/primitives/table.d.ts +153 -0
  64. package/dist/primitives/table.d.ts.map +1 -0
  65. package/dist/primitives/trigger.d.ts +26 -0
  66. package/dist/primitives/trigger.d.ts.map +1 -0
  67. package/dist/primitives/workflow-instance.d.ts +80 -0
  68. package/dist/primitives/workflow-instance.d.ts.map +1 -0
  69. package/dist/primitives/workflow-step.d.ts +184 -0
  70. package/dist/primitives/workflow-step.d.ts.map +1 -0
  71. package/dist/primitives/workflow-utils.d.ts +36 -0
  72. package/dist/primitives/workflow-utils.d.ts.map +1 -0
  73. package/dist/primitives/workflow.d.ts +86 -0
  74. package/dist/primitives/workflow.d.ts.map +1 -0
  75. package/dist/runtime/actions.d.ts +6 -0
  76. package/dist/runtime/actions.d.ts.map +1 -0
  77. package/dist/runtime/adk.d.ts +54 -0
  78. package/dist/runtime/adk.d.ts.map +1 -0
  79. package/dist/runtime/agent-registry.d.ts +33 -0
  80. package/dist/runtime/agent-registry.d.ts.map +1 -0
  81. package/dist/runtime/assets.d.ts +48 -0
  82. package/dist/runtime/assets.d.ts.map +1 -0
  83. package/dist/runtime/autonomous.d.ts +86 -0
  84. package/dist/runtime/autonomous.d.ts.map +1 -0
  85. package/dist/runtime/chat/chat.d.ts +42 -0
  86. package/dist/runtime/chat/chat.d.ts.map +1 -0
  87. package/dist/runtime/chat/citations.d.ts +9 -0
  88. package/dist/runtime/chat/citations.d.ts.map +1 -0
  89. package/dist/runtime/chat/html.d.ts +2 -0
  90. package/dist/runtime/chat/html.d.ts.map +1 -0
  91. package/dist/runtime/chat/index.d.ts +5 -0
  92. package/dist/runtime/chat/index.d.ts.map +1 -0
  93. package/dist/runtime/chat/messages.d.ts +35 -0
  94. package/dist/runtime/chat/messages.d.ts.map +1 -0
  95. package/dist/runtime/chat/transcript.d.ts +75 -0
  96. package/dist/runtime/chat/transcript.d.ts.map +1 -0
  97. package/dist/runtime/chat/truncate-object.d.ts +12 -0
  98. package/dist/runtime/chat/truncate-object.d.ts.map +1 -0
  99. package/dist/runtime/chat/truncate-transcript.d.ts +6 -0
  100. package/dist/runtime/chat/truncate-transcript.d.ts.map +1 -0
  101. package/dist/runtime/config.d.ts +19 -0
  102. package/dist/runtime/config.d.ts.map +1 -0
  103. package/dist/runtime/context/cognitive.d.ts +7 -0
  104. package/dist/runtime/context/cognitive.d.ts.map +1 -0
  105. package/dist/runtime/context/context.d.ts +59 -0
  106. package/dist/runtime/context/context.d.ts.map +1 -0
  107. package/dist/runtime/context/handlers.d.ts +14 -0
  108. package/dist/runtime/context/handlers.d.ts.map +1 -0
  109. package/dist/runtime/context/http.d.ts +38 -0
  110. package/dist/runtime/context/http.d.ts.map +1 -0
  111. package/dist/runtime/context/inspector-handler.d.ts +59 -0
  112. package/dist/runtime/context/inspector-handler.d.ts.map +1 -0
  113. package/dist/runtime/context/promises.d.ts +36 -0
  114. package/dist/runtime/context/promises.d.ts.map +1 -0
  115. package/dist/runtime/events.d.ts +89 -0
  116. package/dist/runtime/events.d.ts.map +1 -0
  117. package/dist/runtime/handlers/conversation.d.ts +3 -0
  118. package/dist/runtime/handlers/conversation.d.ts.map +1 -0
  119. package/dist/runtime/handlers/event.d.ts +3 -0
  120. package/dist/runtime/handlers/event.d.ts.map +1 -0
  121. package/dist/runtime/handlers/index.d.ts +11 -0
  122. package/dist/runtime/handlers/index.d.ts.map +1 -0
  123. package/dist/runtime/handlers/trigger.d.ts +3 -0
  124. package/dist/runtime/handlers/trigger.d.ts.map +1 -0
  125. package/dist/runtime/handlers/workflow.d.ts +3 -0
  126. package/dist/runtime/handlers/workflow.d.ts.map +1 -0
  127. package/dist/runtime/heavy-imports.d.ts +10 -0
  128. package/dist/runtime/heavy-imports.d.ts.map +1 -0
  129. package/dist/runtime/index.d.ts +13 -0
  130. package/dist/runtime/index.d.ts.map +1 -0
  131. package/dist/runtime/interfaces.d.ts +16 -0
  132. package/dist/runtime/interfaces.d.ts.map +1 -0
  133. package/dist/runtime/singletons.d.ts +21 -0
  134. package/dist/runtime/singletons.d.ts.map +1 -0
  135. package/dist/runtime/state.d.ts +8 -0
  136. package/dist/runtime/state.d.ts.map +1 -0
  137. package/dist/runtime/tracked-state-schema.d.ts +36 -0
  138. package/dist/runtime/tracked-state-schema.d.ts.map +1 -0
  139. package/dist/runtime/tracked-state.d.ts +57 -0
  140. package/dist/runtime/tracked-state.d.ts.map +1 -0
  141. package/dist/runtime/workflows/index.d.ts +7 -0
  142. package/dist/runtime/workflows/index.d.ts.map +1 -0
  143. package/dist/runtime/workflows/knowledge-indexing.d.ts +109 -0
  144. package/dist/runtime/workflows/knowledge-indexing.d.ts.map +1 -0
  145. package/dist/runtime.d.ts +22 -0
  146. package/dist/runtime.d.ts.map +1 -0
  147. package/dist/runtime.js +47545 -0
  148. package/dist/runtime.js.map +7 -0
  149. package/dist/telemetry/context-manager.d.ts +16 -0
  150. package/dist/telemetry/context-manager.d.ts.map +1 -0
  151. package/dist/telemetry/file-exporter.d.ts +11 -0
  152. package/dist/telemetry/file-exporter.d.ts.map +1 -0
  153. package/dist/telemetry/instrument-http.d.ts +4 -0
  154. package/dist/telemetry/instrument-http.d.ts.map +1 -0
  155. package/dist/telemetry/live-file-processor.d.ts +13 -0
  156. package/dist/telemetry/live-file-processor.d.ts.map +1 -0
  157. package/dist/telemetry/span-helpers.d.ts +30 -0
  158. package/dist/telemetry/span-helpers.d.ts.map +1 -0
  159. package/dist/telemetry/spans/factory.d.ts +44 -0
  160. package/dist/telemetry/spans/factory.d.ts.map +1 -0
  161. package/dist/telemetry/spans/index.d.ts +1009 -0
  162. package/dist/telemetry/spans/index.d.ts.map +1 -0
  163. package/dist/telemetry/spans/well-known-attributes.d.ts +78 -0
  164. package/dist/telemetry/spans/well-known-attributes.d.ts.map +1 -0
  165. package/dist/telemetry/structured-logging.d.ts +34 -0
  166. package/dist/telemetry/structured-logging.d.ts.map +1 -0
  167. package/dist/telemetry/tracing.d.ts +6 -0
  168. package/dist/telemetry/tracing.d.ts.map +1 -0
  169. package/dist/telemetry/utils.d.ts +3 -0
  170. package/dist/telemetry/utils.d.ts.map +1 -0
  171. package/dist/types.d.ts +17 -0
  172. package/dist/types.d.ts.map +1 -0
  173. package/dist/ui.d.ts +10 -0
  174. package/dist/ui.d.ts.map +1 -0
  175. package/dist/ui.js +749 -0
  176. package/dist/ui.js.map +7 -0
  177. package/dist/utilities/abort-signal.d.ts +41 -0
  178. package/dist/utilities/abort-signal.d.ts.map +1 -0
  179. package/dist/utilities/events.d.ts +10 -0
  180. package/dist/utilities/events.d.ts.map +1 -0
  181. package/dist/utilities/promises.d.ts +3 -0
  182. package/dist/utilities/promises.d.ts.map +1 -0
  183. package/dist/utilities/size.d.ts +12 -0
  184. package/dist/utilities/size.d.ts.map +1 -0
  185. package/dist/utilities/strings.d.ts +18 -0
  186. package/dist/utilities/strings.d.ts.map +1 -0
  187. package/dist/utilities/trigger-tags.d.ts +31 -0
  188. package/dist/utilities/trigger-tags.d.ts.map +1 -0
  189. package/dist/utilities/types.d.ts +2 -0
  190. package/dist/utilities/types.d.ts.map +1 -0
  191. package/dist/workers/dev_worker.d.ts +6 -0
  192. package/dist/workers/dev_worker.d.ts.map +1 -0
  193. package/dist/workers/index.d.ts +5 -0
  194. package/dist/workers/index.d.ts.map +1 -0
  195. package/dist/workers/parent_worker.d.ts +5 -0
  196. package/dist/workers/parent_worker.d.ts.map +1 -0
  197. package/dist/workers/worker_pool.d.ts +109 -0
  198. package/dist/workers/worker_pool.d.ts.map +1 -0
  199. package/package.json +109 -0
@@ -0,0 +1,1009 @@
1
+ import { GetSpanType } from "./factory";
2
+ type Name = Spans["name"];
3
+ export type SpanOf<T extends Name> = Extract<Spans, {
4
+ name: T;
5
+ }>;
6
+ export type Spans = {
7
+ [K in keyof typeof Spans]: GetSpanType<(typeof Spans)[K]>;
8
+ }[keyof typeof Spans];
9
+ export declare const Spans: {
10
+ readonly IncomingRequestSpan: {
11
+ readonly name: "request.incoming";
12
+ readonly importance: "high";
13
+ readonly attributes: {
14
+ readonly "request.operation": {
15
+ readonly type: "enum";
16
+ readonly enum: readonly ["register", "event_received", "ping", "action_triggered"];
17
+ readonly description: "The operation being performed";
18
+ readonly title: "Operation";
19
+ readonly required: true;
20
+ };
21
+ readonly "request.type": {
22
+ readonly type: "string";
23
+ readonly description: "The request type (e.g., message_created)";
24
+ readonly title: "Request Type";
25
+ };
26
+ readonly "request.method": {
27
+ readonly type: "enum";
28
+ readonly enum: readonly ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"];
29
+ readonly description: "The HTTP method";
30
+ readonly title: "HTTP Method";
31
+ readonly required: true;
32
+ };
33
+ readonly "request.path": {
34
+ readonly type: "string";
35
+ readonly description: "The request path";
36
+ readonly title: "Request Path";
37
+ readonly required: true;
38
+ };
39
+ readonly botId: {
40
+ readonly type: "string";
41
+ readonly description: "The bot ID";
42
+ readonly title: "Bot ID";
43
+ readonly required: true;
44
+ };
45
+ readonly webhookId: {
46
+ readonly type: "string";
47
+ readonly description: "The webhook ID if applicable";
48
+ readonly title: "Webhook ID";
49
+ };
50
+ readonly "memory.rss": {
51
+ readonly type: "number";
52
+ readonly description: "The resident set size memory usage in bytes";
53
+ readonly title: "Memory RSS (bytes)";
54
+ };
55
+ readonly "memory.heapTotal": {
56
+ readonly type: "number";
57
+ readonly description: "The total heap size memory usage in bytes";
58
+ readonly title: "Memory Heap Total (bytes)";
59
+ };
60
+ readonly "cpu.count": {
61
+ readonly type: "number";
62
+ readonly description: "The number of CPU cores";
63
+ readonly title: "CPU Count";
64
+ readonly required: true;
65
+ };
66
+ readonly "requests.total": {
67
+ readonly type: "number";
68
+ readonly description: "The total number of requests handled by the process";
69
+ readonly title: "Total Requests";
70
+ readonly required: true;
71
+ };
72
+ };
73
+ };
74
+ readonly CognitiveSpan: {
75
+ readonly name: "cognitive.request";
76
+ readonly importance: "high";
77
+ readonly attributes: {
78
+ readonly "ai.model": {
79
+ readonly type: "string";
80
+ readonly description: "The AI model used for the request";
81
+ readonly title: "AI Model";
82
+ };
83
+ readonly "ai.provider": {
84
+ readonly type: "string";
85
+ readonly description: "The AI provider used for the request";
86
+ readonly title: "AI Provider";
87
+ };
88
+ readonly "ai.temperature": {
89
+ readonly type: "number";
90
+ readonly description: "The temperature setting for the AI model";
91
+ readonly title: "AI Temperature";
92
+ };
93
+ readonly "ai.max_tokens": {
94
+ readonly type: "number";
95
+ readonly description: "The maximum number of tokens to generate";
96
+ readonly title: "AI Max Tokens";
97
+ };
98
+ readonly "ai.top_p": {
99
+ readonly type: "number";
100
+ readonly description: "The top_p (nucleus sampling) parameter";
101
+ readonly title: "AI Top P";
102
+ };
103
+ readonly "ai.system_length": {
104
+ readonly type: "number";
105
+ readonly description: "The length of the system prompt in characters";
106
+ readonly title: "AI System Prompt Length";
107
+ };
108
+ readonly "ai.messages_count": {
109
+ readonly type: "number";
110
+ readonly description: "The number of messages in the conversation";
111
+ readonly title: "AI Messages Count";
112
+ };
113
+ readonly "ai.input_length": {
114
+ readonly type: "number";
115
+ readonly description: "The total length of input messages in characters";
116
+ readonly title: "AI Input Length";
117
+ };
118
+ readonly "ai.input_tokens": {
119
+ readonly type: "number";
120
+ readonly description: "The number of input tokens used for the request";
121
+ readonly title: "AI Input Tokens";
122
+ };
123
+ readonly "ai.output_tokens": {
124
+ readonly type: "number";
125
+ readonly description: "The number of output tokens used for the request";
126
+ readonly title: "AI Output Tokens";
127
+ };
128
+ readonly "ai.cost_input": {
129
+ readonly type: "number";
130
+ readonly description: "The cost of input tokens in USD";
131
+ readonly title: "AI Input Cost (USD)";
132
+ };
133
+ readonly "ai.cost_output": {
134
+ readonly type: "number";
135
+ readonly description: "The cost of output tokens in USD";
136
+ readonly title: "AI Output Cost (USD)";
137
+ };
138
+ readonly "ai.cost": {
139
+ readonly type: "number";
140
+ readonly description: "The total cost of the request in USD";
141
+ readonly title: "AI Cost (USD)";
142
+ };
143
+ readonly "ai.cached": {
144
+ readonly type: "boolean";
145
+ readonly description: "Whether the response was served from cache";
146
+ readonly title: "AI Cached";
147
+ };
148
+ readonly "ai.prompt_category": {
149
+ readonly type: "string";
150
+ readonly description: "The category of the prompt";
151
+ readonly title: "AI Prompt Category";
152
+ };
153
+ readonly "ai.prompt_source": {
154
+ readonly type: "string";
155
+ readonly description: "The source of the prompt";
156
+ readonly title: "AI Prompt Source";
157
+ };
158
+ readonly "ai.instructions": {
159
+ readonly type: "string";
160
+ readonly description: "The system prompt/instructions for the AI model";
161
+ readonly title: "AI Instructions";
162
+ };
163
+ readonly "ai.tools": {
164
+ readonly type: "json";
165
+ readonly description: "The tools available to the AI model";
166
+ readonly title: "AI Tools";
167
+ };
168
+ };
169
+ };
170
+ readonly HttpSpan: {
171
+ readonly name: "http.client";
172
+ readonly importance: "medium";
173
+ readonly attributes: {
174
+ readonly "http.method": {
175
+ readonly type: "enum";
176
+ readonly enum: readonly ["GET", "POST", "PUT", "OPTIONS", "DELETE"];
177
+ readonly required: true;
178
+ };
179
+ readonly "http.url": {
180
+ readonly type: "string";
181
+ readonly required: true;
182
+ };
183
+ readonly "http.query": {
184
+ readonly type: "json";
185
+ };
186
+ readonly "http.request.headers": {
187
+ readonly type: "json";
188
+ };
189
+ readonly "http.response.headers": {
190
+ readonly type: "json";
191
+ };
192
+ readonly "http.request.body": {
193
+ readonly type: "string";
194
+ };
195
+ readonly "http.response.body": {
196
+ readonly type: "string";
197
+ };
198
+ readonly "http.status_code": {
199
+ readonly type: "number";
200
+ };
201
+ readonly "http.error": {
202
+ readonly type: "string";
203
+ };
204
+ readonly "http.via": {
205
+ readonly type: "enum";
206
+ readonly enum: readonly ["http", "undici"];
207
+ readonly required: true;
208
+ };
209
+ readonly "trace.traceparent": {
210
+ readonly type: "string";
211
+ };
212
+ };
213
+ };
214
+ readonly BotpressClientSpan: {
215
+ readonly name: "botpress.client";
216
+ readonly importance: "medium";
217
+ readonly attributes: {
218
+ readonly conversationId: {
219
+ readonly type: "string";
220
+ readonly description: "The current conversation the execution is part of";
221
+ readonly title: "Conversation ID";
222
+ readonly default: "";
223
+ };
224
+ readonly workflowId: {
225
+ readonly type: "string";
226
+ readonly description: "The current workflow the execution is part of";
227
+ readonly title: "Workflow ID";
228
+ };
229
+ readonly eventId: {
230
+ readonly type: "string";
231
+ readonly description: "The current incoming event the execution is part of";
232
+ readonly title: "Workflow ID";
233
+ };
234
+ readonly userId: {
235
+ readonly type: "string";
236
+ readonly description: "The user attached to the event/message of the execution";
237
+ readonly title: "User ID";
238
+ };
239
+ readonly messageId: {
240
+ readonly type: "string";
241
+ readonly description: "The message attached to the event/message of the execution";
242
+ readonly title: "Message ID";
243
+ };
244
+ readonly "action.name": {
245
+ readonly type: "string";
246
+ readonly description: "The name of the action being called";
247
+ readonly title: "Action Name";
248
+ };
249
+ readonly "botpress.method": {
250
+ readonly type: "enum";
251
+ readonly enum: readonly ["GET", "POST", "PUT", "OPTIONS", "DELETE"];
252
+ readonly required: true;
253
+ };
254
+ readonly "botpress.url": {
255
+ readonly type: "string";
256
+ };
257
+ readonly "botpress.status_code": {
258
+ readonly type: "number";
259
+ readonly default: "";
260
+ };
261
+ readonly "botpress.duration_ms": {
262
+ readonly type: "number";
263
+ };
264
+ readonly "botpress.error": {
265
+ readonly type: "string";
266
+ };
267
+ readonly "botpress.via": {
268
+ readonly type: "string";
269
+ };
270
+ readonly "botpress.request.body": {
271
+ readonly type: "string";
272
+ };
273
+ readonly "botpress.response.body": {
274
+ readonly type: "string";
275
+ };
276
+ readonly "trace.traceparent": {
277
+ readonly type: "string";
278
+ };
279
+ };
280
+ };
281
+ readonly ConversationHandlerSpan: {
282
+ readonly name: "handler.conversation";
283
+ readonly importance: "high";
284
+ readonly attributes: {
285
+ readonly userId: {
286
+ readonly type: "string";
287
+ readonly description: "The user attached to the event/message of the execution";
288
+ readonly title: "User ID";
289
+ };
290
+ readonly messageId: {
291
+ readonly type: "string";
292
+ readonly description: "The message attached to the event/message of the execution";
293
+ readonly title: "Message ID";
294
+ };
295
+ readonly "message.type": {
296
+ readonly type: "string";
297
+ readonly description: "The type of the message received";
298
+ readonly title: "Message Type";
299
+ };
300
+ readonly "event.payload": {
301
+ readonly type: "json";
302
+ readonly description: "The payload of the event received";
303
+ readonly title: "Event Payload";
304
+ };
305
+ readonly "message.payload": {
306
+ readonly type: "json";
307
+ readonly description: "The payload of the message received";
308
+ readonly title: "Message Payload";
309
+ };
310
+ readonly conversationId: Omit<{
311
+ readonly type: "string";
312
+ readonly description: "The current conversation the execution is part of";
313
+ readonly title: "Conversation ID";
314
+ readonly default: "";
315
+ }, "required"> & {
316
+ required: true;
317
+ };
318
+ readonly eventId: Omit<{
319
+ readonly type: "string";
320
+ readonly description: "The current incoming event the execution is part of";
321
+ readonly title: "Workflow ID";
322
+ }, "required"> & {
323
+ required: true;
324
+ };
325
+ readonly botId: Omit<{
326
+ readonly type: "string";
327
+ readonly description: "The bot running the execution";
328
+ readonly title: "Bot ID";
329
+ }, "required"> & {
330
+ required: true;
331
+ };
332
+ readonly "event.type": Omit<{
333
+ readonly type: "string";
334
+ readonly description: "The type of the event the execution is part of";
335
+ readonly title: "Event Type";
336
+ }, "required"> & {
337
+ required: true;
338
+ };
339
+ readonly integration: Omit<{
340
+ readonly type: "string";
341
+ readonly description: "The integration originating the event";
342
+ readonly title: "Integration";
343
+ }, "required"> & {
344
+ required: true;
345
+ };
346
+ readonly channel: Omit<{
347
+ readonly type: "string";
348
+ readonly description: "The integration channel originating the event";
349
+ readonly title: "Channel";
350
+ }, "required"> & {
351
+ required: true;
352
+ };
353
+ };
354
+ };
355
+ readonly TriggerHandlerSpan: {
356
+ readonly name: "handler.trigger";
357
+ readonly importance: "high";
358
+ readonly attributes: {
359
+ readonly conversationId: {
360
+ readonly type: "string";
361
+ readonly description: "The current conversation the execution is part of";
362
+ readonly title: "Conversation ID";
363
+ readonly default: "";
364
+ };
365
+ readonly workflowId: {
366
+ readonly type: "string";
367
+ readonly description: "The current workflow the execution is part of";
368
+ readonly title: "Workflow ID";
369
+ };
370
+ readonly userId: {
371
+ readonly type: "string";
372
+ readonly description: "The user attached to the event/message of the execution";
373
+ readonly title: "User ID";
374
+ };
375
+ readonly messageId: {
376
+ readonly type: "string";
377
+ readonly description: "The message attached to the event/message of the execution";
378
+ readonly title: "Message ID";
379
+ };
380
+ readonly parentWorkflowId: {
381
+ readonly type: "string";
382
+ readonly description: "The parent workflow the execution is part of";
383
+ readonly title: "Parent Workflow ID";
384
+ };
385
+ readonly integration: {
386
+ readonly type: "string";
387
+ readonly description: "The integration originating the event";
388
+ readonly title: "Integration";
389
+ };
390
+ readonly channel: {
391
+ readonly type: "string";
392
+ readonly description: "The integration channel originating the event";
393
+ readonly title: "Channel";
394
+ };
395
+ readonly eventId: Omit<{
396
+ readonly type: "string";
397
+ readonly description: "The current incoming event the execution is part of";
398
+ readonly title: "Workflow ID";
399
+ }, "required"> & {
400
+ required: true;
401
+ };
402
+ readonly botId: Omit<{
403
+ readonly type: "string";
404
+ readonly description: "The bot running the execution";
405
+ readonly title: "Bot ID";
406
+ }, "required"> & {
407
+ required: true;
408
+ };
409
+ readonly "event.type": Omit<{
410
+ readonly type: "string";
411
+ readonly description: "The type of the event the execution is part of";
412
+ readonly title: "Event Type";
413
+ }, "required"> & {
414
+ required: true;
415
+ };
416
+ };
417
+ };
418
+ readonly WorkflowHandlerSpan: {
419
+ readonly name: "handler.workflow";
420
+ readonly importance: "high";
421
+ readonly attributes: {
422
+ readonly "workflow.name": {
423
+ readonly type: "string";
424
+ };
425
+ readonly "workflow.status.initial": {
426
+ readonly type: "enum";
427
+ readonly enum: readonly ["pending", "in_progress", "listening", "paused", "completed", "failed", "timedout", "cancelled"];
428
+ };
429
+ readonly "workflow.status.final": {
430
+ readonly type: "enum";
431
+ readonly enum: readonly ["continue", "completed", "failed"];
432
+ };
433
+ readonly conversationId: {
434
+ readonly type: "string";
435
+ readonly description: "The current conversation the execution is part of";
436
+ readonly title: "Conversation ID";
437
+ readonly default: "";
438
+ };
439
+ readonly userId: {
440
+ readonly type: "string";
441
+ readonly description: "The user attached to the event/message of the execution";
442
+ readonly title: "User ID";
443
+ };
444
+ readonly messageId: {
445
+ readonly type: "string";
446
+ readonly description: "The message attached to the event/message of the execution";
447
+ readonly title: "Message ID";
448
+ };
449
+ readonly parentWorkflowId: {
450
+ readonly type: "string";
451
+ readonly description: "The parent workflow the execution is part of";
452
+ readonly title: "Parent Workflow ID";
453
+ };
454
+ readonly integration: {
455
+ readonly type: "string";
456
+ readonly description: "The integration originating the event";
457
+ readonly title: "Integration";
458
+ };
459
+ readonly channel: {
460
+ readonly type: "string";
461
+ readonly description: "The integration channel originating the event";
462
+ readonly title: "Channel";
463
+ };
464
+ readonly workflowId: Omit<{
465
+ readonly type: "string";
466
+ readonly description: "The current workflow the execution is part of";
467
+ readonly title: "Workflow ID";
468
+ }, "required"> & {
469
+ required: true;
470
+ };
471
+ readonly eventId: Omit<{
472
+ readonly type: "string";
473
+ readonly description: "The current incoming event the execution is part of";
474
+ readonly title: "Workflow ID";
475
+ }, "required"> & {
476
+ required: true;
477
+ };
478
+ readonly botId: Omit<{
479
+ readonly type: "string";
480
+ readonly description: "The bot running the execution";
481
+ readonly title: "Bot ID";
482
+ }, "required"> & {
483
+ required: true;
484
+ };
485
+ readonly "event.type": Omit<{
486
+ readonly type: "string";
487
+ readonly description: "The type of the event the execution is part of";
488
+ readonly title: "Event Type";
489
+ }, "required"> & {
490
+ required: true;
491
+ };
492
+ };
493
+ };
494
+ readonly WorkflowStepSpan: {
495
+ readonly name: "handler.workflow.step";
496
+ readonly importance: "high";
497
+ readonly attributes: {
498
+ readonly "workflow.step": {
499
+ readonly type: "string";
500
+ readonly required: true;
501
+ };
502
+ readonly "workflow.step.type": {
503
+ readonly type: "string";
504
+ readonly required: true;
505
+ };
506
+ readonly "workflow.step.attempt": {
507
+ readonly type: "number";
508
+ readonly required: true;
509
+ };
510
+ readonly "workflow.step.output": {
511
+ readonly type: "json";
512
+ };
513
+ readonly "workflow.step.max_attempts": {
514
+ readonly type: "number";
515
+ };
516
+ readonly "workflow.step.error": {
517
+ readonly type: "string";
518
+ };
519
+ readonly workflowId: Omit<{
520
+ readonly type: "string";
521
+ readonly description: "The current workflow the execution is part of";
522
+ readonly title: "Workflow ID";
523
+ }, "required"> & {
524
+ required: true;
525
+ };
526
+ };
527
+ };
528
+ readonly ActionHandlerSpan: {
529
+ readonly name: "handler.action";
530
+ readonly importance: "high";
531
+ readonly attributes: {
532
+ readonly "action.name": {
533
+ readonly type: "string";
534
+ readonly required: true;
535
+ };
536
+ readonly "action.input": {
537
+ readonly type: "json";
538
+ readonly required: true;
539
+ };
540
+ readonly conversationId: {
541
+ readonly type: "string";
542
+ readonly description: "The current conversation the execution is part of";
543
+ readonly title: "Conversation ID";
544
+ readonly default: "";
545
+ };
546
+ readonly userId: {
547
+ readonly type: "string";
548
+ readonly description: "The user attached to the event/message of the execution";
549
+ readonly title: "User ID";
550
+ };
551
+ readonly messageId: {
552
+ readonly type: "string";
553
+ readonly description: "The message attached to the event/message of the execution";
554
+ readonly title: "Message ID";
555
+ };
556
+ readonly parentWorkflowId: {
557
+ readonly type: "string";
558
+ readonly description: "The parent workflow the execution is part of";
559
+ readonly title: "Parent Workflow ID";
560
+ };
561
+ readonly integration: {
562
+ readonly type: "string";
563
+ readonly description: "The integration originating the event";
564
+ readonly title: "Integration";
565
+ };
566
+ readonly channel: {
567
+ readonly type: "string";
568
+ readonly description: "The integration channel originating the event";
569
+ readonly title: "Channel";
570
+ };
571
+ readonly workflowId: Omit<{
572
+ readonly type: "string";
573
+ readonly description: "The current workflow the execution is part of";
574
+ readonly title: "Workflow ID";
575
+ }, "required"> & {
576
+ required: true;
577
+ };
578
+ readonly eventId: Omit<{
579
+ readonly type: "string";
580
+ readonly description: "The current incoming event the execution is part of";
581
+ readonly title: "Workflow ID";
582
+ }, "required"> & {
583
+ required: true;
584
+ };
585
+ readonly botId: Omit<{
586
+ readonly type: "string";
587
+ readonly description: "The bot running the execution";
588
+ readonly title: "Bot ID";
589
+ }, "required"> & {
590
+ required: true;
591
+ };
592
+ readonly "event.type": Omit<{
593
+ readonly type: "string";
594
+ readonly description: "The type of the event the execution is part of";
595
+ readonly title: "Event Type";
596
+ }, "required"> & {
597
+ required: true;
598
+ };
599
+ };
600
+ };
601
+ readonly EventHandlerSpan: {
602
+ readonly name: "handler.event";
603
+ readonly importance: "high";
604
+ readonly attributes: {
605
+ readonly conversationId: {
606
+ readonly type: "string";
607
+ readonly description: "The current conversation the execution is part of";
608
+ readonly title: "Conversation ID";
609
+ readonly default: "";
610
+ };
611
+ readonly workflowId: {
612
+ readonly type: "string";
613
+ readonly description: "The current workflow the execution is part of";
614
+ readonly title: "Workflow ID";
615
+ };
616
+ readonly userId: {
617
+ readonly type: "string";
618
+ readonly description: "The user attached to the event/message of the execution";
619
+ readonly title: "User ID";
620
+ };
621
+ readonly messageId: {
622
+ readonly type: "string";
623
+ readonly description: "The message attached to the event/message of the execution";
624
+ readonly title: "Message ID";
625
+ };
626
+ readonly parentWorkflowId: {
627
+ readonly type: "string";
628
+ readonly description: "The parent workflow the execution is part of";
629
+ readonly title: "Parent Workflow ID";
630
+ };
631
+ readonly integration: {
632
+ readonly type: "string";
633
+ readonly description: "The integration originating the event";
634
+ readonly title: "Integration";
635
+ };
636
+ readonly channel: {
637
+ readonly type: "string";
638
+ readonly description: "The integration channel originating the event";
639
+ readonly title: "Channel";
640
+ };
641
+ readonly eventId: Omit<{
642
+ readonly type: "string";
643
+ readonly description: "The current incoming event the execution is part of";
644
+ readonly title: "Workflow ID";
645
+ }, "required"> & {
646
+ required: true;
647
+ };
648
+ readonly botId: Omit<{
649
+ readonly type: "string";
650
+ readonly description: "The bot running the execution";
651
+ readonly title: "Bot ID";
652
+ }, "required"> & {
653
+ required: true;
654
+ };
655
+ readonly "event.type": Omit<{
656
+ readonly type: "string";
657
+ readonly description: "The type of the event the execution is part of";
658
+ readonly title: "Event Type";
659
+ }, "required"> & {
660
+ required: true;
661
+ };
662
+ };
663
+ };
664
+ readonly AutonomousExecutionSpan: {
665
+ readonly name: "autonomous.execution";
666
+ readonly importance: "high";
667
+ readonly attributes: {
668
+ readonly "autonomous.max_loops": {
669
+ readonly type: "number";
670
+ readonly title: "Max Loops";
671
+ readonly description: "The maximum number of loops allowed";
672
+ readonly required: true;
673
+ };
674
+ readonly "autonomous.mode": {
675
+ readonly type: "enum";
676
+ readonly title: "Mode";
677
+ readonly description: "The mode LLMz is running in (chat or worker)";
678
+ readonly enum: readonly ["chat", "worker"];
679
+ readonly required: true;
680
+ };
681
+ readonly "autonomous.message_types": {
682
+ readonly type: "json";
683
+ readonly title: "Message Types";
684
+ readonly description: "The types of messages LLMz can send";
685
+ };
686
+ readonly "autonomous.iterations": {
687
+ readonly type: "number";
688
+ readonly title: "Iterations";
689
+ readonly description: "The number of iterations performed";
690
+ };
691
+ readonly "autonomous.execution_id": {
692
+ readonly type: "string";
693
+ readonly title: "Execution ID";
694
+ readonly description: "The unique ID for this execution";
695
+ };
696
+ };
697
+ };
698
+ readonly AutonomousIterationSpan: {
699
+ readonly name: "autonomous.iteration";
700
+ readonly importance: "high";
701
+ readonly attributes: {
702
+ readonly "autonomous.iteration": {
703
+ readonly type: "number";
704
+ readonly title: "Iteration";
705
+ readonly description: "The current iteration number";
706
+ readonly required: true;
707
+ };
708
+ readonly "autonomous.instructions": {
709
+ readonly type: "string";
710
+ readonly title: "Instructions";
711
+ readonly description: "The instructions provided to the agent";
712
+ };
713
+ readonly "autonomous.exits": {
714
+ readonly type: "json";
715
+ readonly title: "Exits";
716
+ readonly description: "The possible exit points for the agent";
717
+ };
718
+ readonly "autonomous.code": {
719
+ readonly type: "string";
720
+ readonly title: "Code";
721
+ readonly description: "The code generated in this iteration";
722
+ };
723
+ readonly "autonomous.tools": {
724
+ readonly type: "json";
725
+ readonly title: "Tools";
726
+ readonly description: "The tools available to the agent";
727
+ };
728
+ readonly "autonomous.thoughts": {
729
+ readonly type: "string";
730
+ readonly title: "Thoughts";
731
+ readonly description: "The thoughts generated in this iteration";
732
+ };
733
+ readonly "autonomous.status": {
734
+ readonly type: "enum";
735
+ readonly enum: ["pending", "generation_error", "execution_error", "invalid_code_error", "thinking_requested", "callback_requested", "exit_success", "exit_error", "aborted"];
736
+ readonly title: "Error Type";
737
+ readonly description: "The type of error encountered, if any";
738
+ };
739
+ readonly "autonomous.error": {
740
+ readonly type: "string";
741
+ readonly title: "Error Message";
742
+ readonly description: "The error message, if any";
743
+ };
744
+ readonly "autonomous.exit.name": {
745
+ readonly type: "string";
746
+ readonly title: "Exit Name";
747
+ readonly description: "The name of the exit point if exiting";
748
+ };
749
+ readonly "autonomous.exit.value": {
750
+ readonly type: "json";
751
+ readonly title: "Exit Value";
752
+ readonly description: "The value returned upon exit";
753
+ };
754
+ readonly "ai.model": {
755
+ readonly type: "string";
756
+ readonly title: "AI Model";
757
+ readonly description: "The AI model used for this iteration";
758
+ };
759
+ readonly "ai.tokens": {
760
+ readonly type: "number";
761
+ readonly title: "Input Tokens";
762
+ readonly description: "Number of input tokens used";
763
+ };
764
+ readonly "ai.cost": {
765
+ readonly type: "number";
766
+ readonly title: "Cost";
767
+ readonly description: "Total cost of this iteration in USD";
768
+ };
769
+ };
770
+ };
771
+ readonly AutonomousToolSpan: {
772
+ readonly name: "autonomous.tool";
773
+ readonly importance: "high";
774
+ readonly attributes: {
775
+ readonly "autonomous.tool.name": {
776
+ readonly type: "string";
777
+ readonly title: "Tool Name";
778
+ readonly description: "The name of the tool being used";
779
+ readonly required: true;
780
+ };
781
+ readonly "autonomous.tool.input": {
782
+ readonly type: "json";
783
+ readonly title: "Tool Input";
784
+ readonly description: "The input provided to the tool";
785
+ };
786
+ readonly "autonomous.tool.output": {
787
+ readonly type: "json";
788
+ readonly title: "Tool Output";
789
+ readonly description: "The output returned by the tool";
790
+ };
791
+ readonly "autonomous.tool.status": {
792
+ readonly type: "enum";
793
+ readonly enum: readonly ["think", "success", "error"];
794
+ readonly title: "Tool Status";
795
+ readonly description: "The status of the tool execution";
796
+ };
797
+ readonly "autonomous.tool.error": {
798
+ readonly type: "string";
799
+ readonly title: "Tool Error";
800
+ readonly description: "The error message if the tool failed";
801
+ };
802
+ };
803
+ };
804
+ readonly InterruptionCheckSpan: {
805
+ readonly name: "interruption.check";
806
+ readonly importance: "medium";
807
+ readonly attributes: {
808
+ readonly "interruption.detected": {
809
+ readonly type: "boolean";
810
+ readonly title: "Interruption Detected";
811
+ readonly description: "Whether an interruption was detected";
812
+ };
813
+ readonly "interruption.events_count": {
814
+ readonly type: "number";
815
+ readonly title: "New Events Count";
816
+ readonly description: "The number of new events detected";
817
+ };
818
+ readonly "interruption.event_ids": {
819
+ readonly type: "json";
820
+ readonly title: "New Event IDs";
821
+ readonly description: "The IDs of the new events that caused the interruption";
822
+ };
823
+ readonly conversationId: Omit<{
824
+ readonly type: "string";
825
+ readonly description: "The current conversation the execution is part of";
826
+ readonly title: "Conversation ID";
827
+ readonly default: "";
828
+ }, "required"> & {
829
+ required: true;
830
+ };
831
+ };
832
+ };
833
+ readonly ChatFetchTranscriptSpan: {
834
+ readonly name: "chat.fetchTranscript";
835
+ readonly importance: "medium";
836
+ readonly attributes: {
837
+ readonly conversationId: Omit<{
838
+ readonly type: "string";
839
+ readonly description: "The current conversation the execution is part of";
840
+ readonly title: "Conversation ID";
841
+ readonly default: "";
842
+ }, "required"> & {
843
+ required: true;
844
+ };
845
+ };
846
+ };
847
+ readonly ChatCompactTranscriptSpan: {
848
+ readonly name: "chat.compactTranscript";
849
+ readonly importance: "medium";
850
+ readonly attributes: {
851
+ readonly conversationId: Omit<{
852
+ readonly type: "string";
853
+ readonly description: "The current conversation the execution is part of";
854
+ readonly title: "Conversation ID";
855
+ readonly default: "";
856
+ }, "required"> & {
857
+ required: true;
858
+ };
859
+ };
860
+ };
861
+ readonly ChatSaveTranscriptSpan: {
862
+ readonly name: "chat.saveTranscript";
863
+ readonly importance: "medium";
864
+ readonly attributes: {
865
+ readonly conversationId: Omit<{
866
+ readonly type: "string";
867
+ readonly description: "The current conversation the execution is part of";
868
+ readonly title: "Conversation ID";
869
+ readonly default: "";
870
+ }, "required"> & {
871
+ required: true;
872
+ };
873
+ };
874
+ };
875
+ readonly ChatSendMessageSpan: {
876
+ readonly name: "chat.sendMessage";
877
+ readonly importance: "high";
878
+ readonly attributes: {
879
+ readonly "message.type": {
880
+ readonly type: "string";
881
+ readonly description: "The type of message being sent";
882
+ readonly title: "Message Type";
883
+ };
884
+ readonly direction: {
885
+ readonly type: "enum";
886
+ readonly enum: readonly ["incoming", "outgoing"];
887
+ readonly description: "The direction of the message";
888
+ readonly title: "Direction";
889
+ };
890
+ readonly userId: {
891
+ readonly type: "string";
892
+ readonly description: "The user attached to the event/message of the execution";
893
+ readonly title: "User ID";
894
+ };
895
+ readonly messageId: {
896
+ readonly type: "string";
897
+ readonly description: "The message attached to the event/message of the execution";
898
+ readonly title: "Message ID";
899
+ };
900
+ readonly botId: {
901
+ readonly type: "string";
902
+ readonly description: "The bot running the execution";
903
+ readonly title: "Bot ID";
904
+ };
905
+ readonly integration: {
906
+ readonly type: "string";
907
+ readonly description: "The integration originating the event";
908
+ readonly title: "Integration";
909
+ };
910
+ readonly channel: {
911
+ readonly type: "string";
912
+ readonly description: "The integration channel originating the event";
913
+ readonly title: "Channel";
914
+ };
915
+ readonly conversationId: Omit<{
916
+ readonly type: "string";
917
+ readonly description: "The current conversation the execution is part of";
918
+ readonly title: "Conversation ID";
919
+ readonly default: "";
920
+ }, "required"> & {
921
+ required: true;
922
+ };
923
+ };
924
+ };
925
+ readonly TrackedStateLoadSpan: {
926
+ readonly name: "state.load";
927
+ readonly importance: "medium";
928
+ readonly attributes: {
929
+ readonly type: {
930
+ readonly type: "enum";
931
+ readonly enum: readonly ["bot", "user", "conversation", "workflow"];
932
+ readonly description: "The type of state being loaded";
933
+ readonly title: "State Type";
934
+ readonly required: true;
935
+ };
936
+ readonly name: {
937
+ readonly type: "string";
938
+ readonly description: "The name of the state";
939
+ readonly title: "State Name";
940
+ readonly required: true;
941
+ };
942
+ readonly location: {
943
+ readonly type: "enum";
944
+ readonly enum: readonly ["state", "file"];
945
+ readonly description: "Where the state is stored";
946
+ readonly title: "Storage Location";
947
+ };
948
+ readonly has_value: {
949
+ readonly type: "boolean";
950
+ readonly description: "Whether the state has a value";
951
+ readonly title: "Has Value";
952
+ };
953
+ };
954
+ };
955
+ readonly TrackedStateSaveSpan: {
956
+ readonly name: "state.save";
957
+ readonly importance: "medium";
958
+ readonly attributes: {
959
+ readonly type: {
960
+ readonly type: "enum";
961
+ readonly enum: readonly ["bot", "user", "conversation", "workflow"];
962
+ readonly description: "The type of state being saved";
963
+ readonly title: "State Type";
964
+ readonly required: true;
965
+ };
966
+ readonly name: {
967
+ readonly type: "string";
968
+ readonly description: "The name of the state";
969
+ readonly title: "State Name";
970
+ readonly required: true;
971
+ };
972
+ readonly state_size_bytes: {
973
+ readonly type: "number";
974
+ readonly description: "The size of the state in bytes";
975
+ readonly title: "State Size (bytes)";
976
+ };
977
+ readonly swapped_to_file: {
978
+ readonly type: "boolean";
979
+ readonly description: "Whether the state was swapped to a file";
980
+ readonly title: "Swapped to File";
981
+ };
982
+ };
983
+ };
984
+ readonly TrackedStateSaveAllDirtySpan: {
985
+ readonly name: "state.saveAllDirty";
986
+ readonly importance: "medium";
987
+ readonly attributes: {
988
+ readonly states_count: {
989
+ readonly type: "number";
990
+ readonly description: "The number of dirty states being saved";
991
+ readonly title: "States Count";
992
+ readonly required: true;
993
+ };
994
+ readonly states: {
995
+ readonly type: "json";
996
+ readonly description: "The list of states being saved (type/id/name)";
997
+ readonly title: "States";
998
+ };
999
+ };
1000
+ };
1001
+ readonly TrackedStateLoadAllSpan: {
1002
+ readonly name: "state.loadAll";
1003
+ readonly importance: "medium";
1004
+ readonly attributes: {};
1005
+ };
1006
+ };
1007
+ export type { WellKnownAttributeName } from "./well-known-attributes";
1008
+ export type { SpanImportanceLevel } from "./factory";
1009
+ //# sourceMappingURL=index.d.ts.map