@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.
- package/dist/_types/actions.d.ts +3 -0
- package/dist/_types/actions.d.ts.map +1 -0
- package/dist/_types/events.d.ts +5 -0
- package/dist/_types/events.d.ts.map +1 -0
- package/dist/_types/integration-actions.d.ts +3 -0
- package/dist/_types/integration-actions.d.ts.map +1 -0
- package/dist/_types/state.d.ts +4 -0
- package/dist/_types/state.d.ts.map +1 -0
- package/dist/_types/tables.d.ts +3 -0
- package/dist/_types/tables.d.ts.map +1 -0
- package/dist/_types/triggers.d.ts +3 -0
- package/dist/_types/triggers.d.ts.map +1 -0
- package/dist/_types/workflows.d.ts +12 -0
- package/dist/_types/workflows.d.ts.map +1 -0
- package/dist/constants.d.ts +58 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/consts.d.ts +8 -0
- package/dist/consts.d.ts.map +1 -0
- package/dist/debugging/node-inspector.d.ts +5 -0
- package/dist/debugging/node-inspector.d.ts.map +1 -0
- package/dist/define-config.d.ts +70 -0
- package/dist/define-config.d.ts.map +1 -0
- package/dist/definition.d.ts +10 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +88 -0
- package/dist/definition.js.map +7 -0
- package/dist/environment.d.ts +60 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/errors.d.ts +36 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/globals.d.ts +21 -0
- package/dist/globals.d.ts.map +1 -0
- package/dist/internal.d.ts +15 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +46573 -0
- package/dist/internal.js.map +7 -0
- package/dist/library.d.ts +16 -0
- package/dist/library.d.ts.map +1 -0
- package/dist/library.js +45943 -0
- package/dist/library.js.map +7 -0
- package/dist/primitives/action.d.ts +37 -0
- package/dist/primitives/action.d.ts.map +1 -0
- package/dist/primitives/asset.d.ts +28 -0
- package/dist/primitives/asset.d.ts.map +1 -0
- package/dist/primitives/conversation.d.ts +104 -0
- package/dist/primitives/conversation.d.ts.map +1 -0
- package/dist/primitives/data-sources/index.d.ts +7 -0
- package/dist/primitives/data-sources/index.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-base.d.ts +251 -0
- package/dist/primitives/data-sources/source-base.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-directory.d.ts +119 -0
- package/dist/primitives/data-sources/source-directory.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-table.d.ts +135 -0
- package/dist/primitives/data-sources/source-table.d.ts.map +1 -0
- package/dist/primitives/data-sources/source-website.d.ts +226 -0
- package/dist/primitives/data-sources/source-website.d.ts.map +1 -0
- package/dist/primitives/definition.d.ts +68 -0
- package/dist/primitives/definition.d.ts.map +1 -0
- package/dist/primitives/index.d.ts +149 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/knowledge.d.ts +36 -0
- package/dist/primitives/knowledge.d.ts.map +1 -0
- package/dist/primitives/table.d.ts +153 -0
- package/dist/primitives/table.d.ts.map +1 -0
- package/dist/primitives/trigger.d.ts +26 -0
- package/dist/primitives/trigger.d.ts.map +1 -0
- package/dist/primitives/workflow-instance.d.ts +80 -0
- package/dist/primitives/workflow-instance.d.ts.map +1 -0
- package/dist/primitives/workflow-step.d.ts +184 -0
- package/dist/primitives/workflow-step.d.ts.map +1 -0
- package/dist/primitives/workflow-utils.d.ts +36 -0
- package/dist/primitives/workflow-utils.d.ts.map +1 -0
- package/dist/primitives/workflow.d.ts +86 -0
- package/dist/primitives/workflow.d.ts.map +1 -0
- package/dist/runtime/actions.d.ts +6 -0
- package/dist/runtime/actions.d.ts.map +1 -0
- package/dist/runtime/adk.d.ts +54 -0
- package/dist/runtime/adk.d.ts.map +1 -0
- package/dist/runtime/agent-registry.d.ts +33 -0
- package/dist/runtime/agent-registry.d.ts.map +1 -0
- package/dist/runtime/assets.d.ts +48 -0
- package/dist/runtime/assets.d.ts.map +1 -0
- package/dist/runtime/autonomous.d.ts +86 -0
- package/dist/runtime/autonomous.d.ts.map +1 -0
- package/dist/runtime/chat/chat.d.ts +42 -0
- package/dist/runtime/chat/chat.d.ts.map +1 -0
- package/dist/runtime/chat/citations.d.ts +9 -0
- package/dist/runtime/chat/citations.d.ts.map +1 -0
- package/dist/runtime/chat/html.d.ts +2 -0
- package/dist/runtime/chat/html.d.ts.map +1 -0
- package/dist/runtime/chat/index.d.ts +5 -0
- package/dist/runtime/chat/index.d.ts.map +1 -0
- package/dist/runtime/chat/messages.d.ts +35 -0
- package/dist/runtime/chat/messages.d.ts.map +1 -0
- package/dist/runtime/chat/transcript.d.ts +75 -0
- package/dist/runtime/chat/transcript.d.ts.map +1 -0
- package/dist/runtime/chat/truncate-object.d.ts +12 -0
- package/dist/runtime/chat/truncate-object.d.ts.map +1 -0
- package/dist/runtime/chat/truncate-transcript.d.ts +6 -0
- package/dist/runtime/chat/truncate-transcript.d.ts.map +1 -0
- package/dist/runtime/config.d.ts +19 -0
- package/dist/runtime/config.d.ts.map +1 -0
- package/dist/runtime/context/cognitive.d.ts +7 -0
- package/dist/runtime/context/cognitive.d.ts.map +1 -0
- package/dist/runtime/context/context.d.ts +59 -0
- package/dist/runtime/context/context.d.ts.map +1 -0
- package/dist/runtime/context/handlers.d.ts +14 -0
- package/dist/runtime/context/handlers.d.ts.map +1 -0
- package/dist/runtime/context/http.d.ts +38 -0
- package/dist/runtime/context/http.d.ts.map +1 -0
- package/dist/runtime/context/inspector-handler.d.ts +59 -0
- package/dist/runtime/context/inspector-handler.d.ts.map +1 -0
- package/dist/runtime/context/promises.d.ts +36 -0
- package/dist/runtime/context/promises.d.ts.map +1 -0
- package/dist/runtime/events.d.ts +89 -0
- package/dist/runtime/events.d.ts.map +1 -0
- package/dist/runtime/handlers/conversation.d.ts +3 -0
- package/dist/runtime/handlers/conversation.d.ts.map +1 -0
- package/dist/runtime/handlers/event.d.ts +3 -0
- package/dist/runtime/handlers/event.d.ts.map +1 -0
- package/dist/runtime/handlers/index.d.ts +11 -0
- package/dist/runtime/handlers/index.d.ts.map +1 -0
- package/dist/runtime/handlers/trigger.d.ts +3 -0
- package/dist/runtime/handlers/trigger.d.ts.map +1 -0
- package/dist/runtime/handlers/workflow.d.ts +3 -0
- package/dist/runtime/handlers/workflow.d.ts.map +1 -0
- package/dist/runtime/heavy-imports.d.ts +10 -0
- package/dist/runtime/heavy-imports.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +13 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/interfaces.d.ts +16 -0
- package/dist/runtime/interfaces.d.ts.map +1 -0
- package/dist/runtime/singletons.d.ts +21 -0
- package/dist/runtime/singletons.d.ts.map +1 -0
- package/dist/runtime/state.d.ts +8 -0
- package/dist/runtime/state.d.ts.map +1 -0
- package/dist/runtime/tracked-state-schema.d.ts +36 -0
- package/dist/runtime/tracked-state-schema.d.ts.map +1 -0
- package/dist/runtime/tracked-state.d.ts +57 -0
- package/dist/runtime/tracked-state.d.ts.map +1 -0
- package/dist/runtime/workflows/index.d.ts +7 -0
- package/dist/runtime/workflows/index.d.ts.map +1 -0
- package/dist/runtime/workflows/knowledge-indexing.d.ts +109 -0
- package/dist/runtime/workflows/knowledge-indexing.d.ts.map +1 -0
- package/dist/runtime.d.ts +22 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +47545 -0
- package/dist/runtime.js.map +7 -0
- package/dist/telemetry/context-manager.d.ts +16 -0
- package/dist/telemetry/context-manager.d.ts.map +1 -0
- package/dist/telemetry/file-exporter.d.ts +11 -0
- package/dist/telemetry/file-exporter.d.ts.map +1 -0
- package/dist/telemetry/instrument-http.d.ts +4 -0
- package/dist/telemetry/instrument-http.d.ts.map +1 -0
- package/dist/telemetry/live-file-processor.d.ts +13 -0
- package/dist/telemetry/live-file-processor.d.ts.map +1 -0
- package/dist/telemetry/span-helpers.d.ts +30 -0
- package/dist/telemetry/span-helpers.d.ts.map +1 -0
- package/dist/telemetry/spans/factory.d.ts +44 -0
- package/dist/telemetry/spans/factory.d.ts.map +1 -0
- package/dist/telemetry/spans/index.d.ts +1009 -0
- package/dist/telemetry/spans/index.d.ts.map +1 -0
- package/dist/telemetry/spans/well-known-attributes.d.ts +78 -0
- package/dist/telemetry/spans/well-known-attributes.d.ts.map +1 -0
- package/dist/telemetry/structured-logging.d.ts +34 -0
- package/dist/telemetry/structured-logging.d.ts.map +1 -0
- package/dist/telemetry/tracing.d.ts +6 -0
- package/dist/telemetry/tracing.d.ts.map +1 -0
- package/dist/telemetry/utils.d.ts +3 -0
- package/dist/telemetry/utils.d.ts.map +1 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/ui.d.ts +10 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +749 -0
- package/dist/ui.js.map +7 -0
- package/dist/utilities/abort-signal.d.ts +41 -0
- package/dist/utilities/abort-signal.d.ts.map +1 -0
- package/dist/utilities/events.d.ts +10 -0
- package/dist/utilities/events.d.ts.map +1 -0
- package/dist/utilities/promises.d.ts +3 -0
- package/dist/utilities/promises.d.ts.map +1 -0
- package/dist/utilities/size.d.ts +12 -0
- package/dist/utilities/size.d.ts.map +1 -0
- package/dist/utilities/strings.d.ts +18 -0
- package/dist/utilities/strings.d.ts.map +1 -0
- package/dist/utilities/trigger-tags.d.ts +31 -0
- package/dist/utilities/trigger-tags.d.ts.map +1 -0
- package/dist/utilities/types.d.ts +2 -0
- package/dist/utilities/types.d.ts.map +1 -0
- package/dist/workers/dev_worker.d.ts +6 -0
- package/dist/workers/dev_worker.d.ts.map +1 -0
- package/dist/workers/index.d.ts +5 -0
- package/dist/workers/index.d.ts.map +1 -0
- package/dist/workers/parent_worker.d.ts +5 -0
- package/dist/workers/parent_worker.d.ts.map +1 -0
- package/dist/workers/worker_pool.d.ts +109 -0
- package/dist/workers/worker_pool.d.ts.map +1 -0
- package/package.json +109 -0
package/dist/ui.js
ADDED
|
@@ -0,0 +1,749 @@
|
|
|
1
|
+
// src/telemetry/spans/well-known-attributes.ts
|
|
2
|
+
var WellKnownAttributes = {
|
|
3
|
+
conversationId: {
|
|
4
|
+
type: "string",
|
|
5
|
+
description: "The current conversation the execution is part of",
|
|
6
|
+
title: "Conversation ID",
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
workflowId: {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "The current workflow the execution is part of",
|
|
12
|
+
title: "Workflow ID"
|
|
13
|
+
},
|
|
14
|
+
eventId: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "The current incoming event the execution is part of",
|
|
17
|
+
title: "Workflow ID"
|
|
18
|
+
},
|
|
19
|
+
userId: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "The user attached to the event/message of the execution",
|
|
22
|
+
title: "User ID"
|
|
23
|
+
},
|
|
24
|
+
messageId: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "The message attached to the event/message of the execution",
|
|
27
|
+
title: "Message ID"
|
|
28
|
+
},
|
|
29
|
+
botId: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "The bot running the execution",
|
|
32
|
+
title: "Bot ID"
|
|
33
|
+
},
|
|
34
|
+
parentWorkflowId: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "The parent workflow the execution is part of",
|
|
37
|
+
title: "Parent Workflow ID"
|
|
38
|
+
},
|
|
39
|
+
"event.type": {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "The type of the event the execution is part of",
|
|
42
|
+
title: "Event Type"
|
|
43
|
+
},
|
|
44
|
+
"message.type": {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "The type of the message received",
|
|
47
|
+
title: "Message Type"
|
|
48
|
+
},
|
|
49
|
+
integration: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "The integration originating the event",
|
|
52
|
+
title: "Integration"
|
|
53
|
+
},
|
|
54
|
+
channel: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "The integration channel originating the event",
|
|
57
|
+
title: "Channel"
|
|
58
|
+
},
|
|
59
|
+
"action.name": {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "The name of the action being called",
|
|
62
|
+
title: "Action Name"
|
|
63
|
+
},
|
|
64
|
+
"event.payload": {
|
|
65
|
+
type: "json",
|
|
66
|
+
description: "The payload of the event received",
|
|
67
|
+
title: "Event Payload"
|
|
68
|
+
},
|
|
69
|
+
"message.payload": {
|
|
70
|
+
type: "json",
|
|
71
|
+
description: "The payload of the message received",
|
|
72
|
+
title: "Message Payload"
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// src/telemetry/spans/factory.ts
|
|
77
|
+
var required = (...keys) => {
|
|
78
|
+
const result = {};
|
|
79
|
+
for (const key of keys) {
|
|
80
|
+
result[key] = { ...WellKnownAttributes[key], required: true };
|
|
81
|
+
}
|
|
82
|
+
return result;
|
|
83
|
+
};
|
|
84
|
+
var optional = (...keys) => {
|
|
85
|
+
const result = {};
|
|
86
|
+
for (const key of keys) {
|
|
87
|
+
result[key] = { ...WellKnownAttributes[key], required: true };
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// src/telemetry/spans/index.ts
|
|
93
|
+
var IncomingRequestSpan = {
|
|
94
|
+
name: "request.incoming",
|
|
95
|
+
importance: "high",
|
|
96
|
+
attributes: {
|
|
97
|
+
"request.operation": {
|
|
98
|
+
type: "enum",
|
|
99
|
+
enum: ["register", "event_received", "ping", "action_triggered"],
|
|
100
|
+
description: "The operation being performed",
|
|
101
|
+
title: "Operation",
|
|
102
|
+
required: true
|
|
103
|
+
},
|
|
104
|
+
"request.type": {
|
|
105
|
+
type: "string",
|
|
106
|
+
description: "The request type (e.g., message_created)",
|
|
107
|
+
title: "Request Type"
|
|
108
|
+
},
|
|
109
|
+
"request.method": {
|
|
110
|
+
type: "enum",
|
|
111
|
+
enum: [
|
|
112
|
+
"GET",
|
|
113
|
+
"POST",
|
|
114
|
+
"PUT",
|
|
115
|
+
"DELETE",
|
|
116
|
+
"PATCH",
|
|
117
|
+
"HEAD",
|
|
118
|
+
"OPTIONS"
|
|
119
|
+
],
|
|
120
|
+
description: "The HTTP method",
|
|
121
|
+
title: "HTTP Method",
|
|
122
|
+
required: true
|
|
123
|
+
},
|
|
124
|
+
"request.path": {
|
|
125
|
+
type: "string",
|
|
126
|
+
description: "The request path",
|
|
127
|
+
title: "Request Path",
|
|
128
|
+
required: true
|
|
129
|
+
},
|
|
130
|
+
botId: {
|
|
131
|
+
type: "string",
|
|
132
|
+
description: "The bot ID",
|
|
133
|
+
title: "Bot ID",
|
|
134
|
+
required: true
|
|
135
|
+
},
|
|
136
|
+
webhookId: {
|
|
137
|
+
type: "string",
|
|
138
|
+
description: "The webhook ID if applicable",
|
|
139
|
+
title: "Webhook ID"
|
|
140
|
+
},
|
|
141
|
+
"memory.rss": {
|
|
142
|
+
type: "number",
|
|
143
|
+
description: "The resident set size memory usage in bytes",
|
|
144
|
+
title: "Memory RSS (bytes)"
|
|
145
|
+
},
|
|
146
|
+
"memory.heapTotal": {
|
|
147
|
+
type: "number",
|
|
148
|
+
description: "The total heap size memory usage in bytes",
|
|
149
|
+
title: "Memory Heap Total (bytes)"
|
|
150
|
+
},
|
|
151
|
+
"cpu.count": {
|
|
152
|
+
type: "number",
|
|
153
|
+
description: "The number of CPU cores",
|
|
154
|
+
title: "CPU Count",
|
|
155
|
+
required: true
|
|
156
|
+
},
|
|
157
|
+
"requests.total": {
|
|
158
|
+
type: "number",
|
|
159
|
+
description: "The total number of requests handled by the process",
|
|
160
|
+
title: "Total Requests",
|
|
161
|
+
required: true
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var CognitiveSpan = {
|
|
166
|
+
name: "cognitive.request",
|
|
167
|
+
importance: "high",
|
|
168
|
+
attributes: {
|
|
169
|
+
"ai.model": {
|
|
170
|
+
type: "string",
|
|
171
|
+
description: "The AI model used for the request",
|
|
172
|
+
title: "AI Model"
|
|
173
|
+
},
|
|
174
|
+
"ai.provider": {
|
|
175
|
+
type: "string",
|
|
176
|
+
description: "The AI provider used for the request",
|
|
177
|
+
title: "AI Provider"
|
|
178
|
+
},
|
|
179
|
+
"ai.temperature": {
|
|
180
|
+
type: "number",
|
|
181
|
+
description: "The temperature setting for the AI model",
|
|
182
|
+
title: "AI Temperature"
|
|
183
|
+
},
|
|
184
|
+
"ai.max_tokens": {
|
|
185
|
+
type: "number",
|
|
186
|
+
description: "The maximum number of tokens to generate",
|
|
187
|
+
title: "AI Max Tokens"
|
|
188
|
+
},
|
|
189
|
+
"ai.top_p": {
|
|
190
|
+
type: "number",
|
|
191
|
+
description: "The top_p (nucleus sampling) parameter",
|
|
192
|
+
title: "AI Top P"
|
|
193
|
+
},
|
|
194
|
+
"ai.system_length": {
|
|
195
|
+
type: "number",
|
|
196
|
+
description: "The length of the system prompt in characters",
|
|
197
|
+
title: "AI System Prompt Length"
|
|
198
|
+
},
|
|
199
|
+
"ai.messages_count": {
|
|
200
|
+
type: "number",
|
|
201
|
+
description: "The number of messages in the conversation",
|
|
202
|
+
title: "AI Messages Count"
|
|
203
|
+
},
|
|
204
|
+
"ai.input_length": {
|
|
205
|
+
type: "number",
|
|
206
|
+
description: "The total length of input messages in characters",
|
|
207
|
+
title: "AI Input Length"
|
|
208
|
+
},
|
|
209
|
+
"ai.input_tokens": {
|
|
210
|
+
type: "number",
|
|
211
|
+
description: "The number of input tokens used for the request",
|
|
212
|
+
title: "AI Input Tokens"
|
|
213
|
+
},
|
|
214
|
+
"ai.output_tokens": {
|
|
215
|
+
type: "number",
|
|
216
|
+
description: "The number of output tokens used for the request",
|
|
217
|
+
title: "AI Output Tokens"
|
|
218
|
+
},
|
|
219
|
+
"ai.cost_input": {
|
|
220
|
+
type: "number",
|
|
221
|
+
description: "The cost of input tokens in USD",
|
|
222
|
+
title: "AI Input Cost (USD)"
|
|
223
|
+
},
|
|
224
|
+
"ai.cost_output": {
|
|
225
|
+
type: "number",
|
|
226
|
+
description: "The cost of output tokens in USD",
|
|
227
|
+
title: "AI Output Cost (USD)"
|
|
228
|
+
},
|
|
229
|
+
"ai.cost": {
|
|
230
|
+
type: "number",
|
|
231
|
+
description: "The total cost of the request in USD",
|
|
232
|
+
title: "AI Cost (USD)"
|
|
233
|
+
},
|
|
234
|
+
"ai.cached": {
|
|
235
|
+
type: "boolean",
|
|
236
|
+
description: "Whether the response was served from cache",
|
|
237
|
+
title: "AI Cached"
|
|
238
|
+
},
|
|
239
|
+
"ai.prompt_category": {
|
|
240
|
+
type: "string",
|
|
241
|
+
description: "The category of the prompt",
|
|
242
|
+
title: "AI Prompt Category"
|
|
243
|
+
},
|
|
244
|
+
"ai.prompt_source": {
|
|
245
|
+
type: "string",
|
|
246
|
+
description: "The source of the prompt",
|
|
247
|
+
title: "AI Prompt Source"
|
|
248
|
+
},
|
|
249
|
+
"ai.instructions": {
|
|
250
|
+
type: "string",
|
|
251
|
+
description: "The system prompt/instructions for the AI model",
|
|
252
|
+
title: "AI Instructions"
|
|
253
|
+
},
|
|
254
|
+
"ai.tools": {
|
|
255
|
+
type: "json",
|
|
256
|
+
description: "The tools available to the AI model",
|
|
257
|
+
title: "AI Tools"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
var BotpressClientSpan = {
|
|
262
|
+
name: "botpress.client",
|
|
263
|
+
importance: "medium",
|
|
264
|
+
attributes: {
|
|
265
|
+
"botpress.method": {
|
|
266
|
+
type: "enum",
|
|
267
|
+
enum: ["GET", "POST", "PUT", "OPTIONS", "DELETE"],
|
|
268
|
+
required: true
|
|
269
|
+
},
|
|
270
|
+
"botpress.url": { type: "string" },
|
|
271
|
+
"botpress.status_code": { type: "number", default: "" },
|
|
272
|
+
"botpress.duration_ms": { type: "number" },
|
|
273
|
+
"botpress.error": { type: "string" },
|
|
274
|
+
"botpress.via": { type: "string" },
|
|
275
|
+
"botpress.request.body": { type: "string" },
|
|
276
|
+
"botpress.response.body": { type: "string" },
|
|
277
|
+
"trace.traceparent": { type: "string" },
|
|
278
|
+
...optional(
|
|
279
|
+
"conversationId",
|
|
280
|
+
"messageId",
|
|
281
|
+
"workflowId",
|
|
282
|
+
"userId",
|
|
283
|
+
"eventId",
|
|
284
|
+
"action.name"
|
|
285
|
+
)
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
var HttpSpan = {
|
|
289
|
+
name: "http.client",
|
|
290
|
+
importance: "medium",
|
|
291
|
+
attributes: {
|
|
292
|
+
"http.method": {
|
|
293
|
+
type: "enum",
|
|
294
|
+
enum: ["GET", "POST", "PUT", "OPTIONS", "DELETE"],
|
|
295
|
+
required: true
|
|
296
|
+
},
|
|
297
|
+
"http.url": { type: "string", required: true },
|
|
298
|
+
"http.query": { type: "json" },
|
|
299
|
+
"http.request.headers": { type: "json" },
|
|
300
|
+
"http.response.headers": { type: "json" },
|
|
301
|
+
"http.request.body": { type: "string" },
|
|
302
|
+
"http.response.body": { type: "string" },
|
|
303
|
+
"http.status_code": { type: "number" },
|
|
304
|
+
"http.error": { type: "string" },
|
|
305
|
+
"http.via": {
|
|
306
|
+
type: "enum",
|
|
307
|
+
enum: ["http", "undici"],
|
|
308
|
+
required: true
|
|
309
|
+
},
|
|
310
|
+
"trace.traceparent": { type: "string" }
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
var ConversationHandlerSpan = {
|
|
314
|
+
name: "handler.conversation",
|
|
315
|
+
importance: "high",
|
|
316
|
+
attributes: {
|
|
317
|
+
...required(
|
|
318
|
+
"botId",
|
|
319
|
+
"conversationId",
|
|
320
|
+
"eventId",
|
|
321
|
+
"integration",
|
|
322
|
+
"channel",
|
|
323
|
+
"event.type"
|
|
324
|
+
),
|
|
325
|
+
...optional(
|
|
326
|
+
"messageId",
|
|
327
|
+
"userId",
|
|
328
|
+
"event.payload",
|
|
329
|
+
"message.payload",
|
|
330
|
+
"message.type"
|
|
331
|
+
)
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
var TriggerHandlerSpan = {
|
|
335
|
+
name: "handler.trigger",
|
|
336
|
+
importance: "high",
|
|
337
|
+
attributes: {
|
|
338
|
+
...required("botId", "eventId", "event.type"),
|
|
339
|
+
...optional(
|
|
340
|
+
"conversationId",
|
|
341
|
+
"messageId",
|
|
342
|
+
"userId",
|
|
343
|
+
"integration",
|
|
344
|
+
"channel",
|
|
345
|
+
"workflowId",
|
|
346
|
+
"parentWorkflowId"
|
|
347
|
+
)
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
var EventHandlerSpan = {
|
|
351
|
+
name: "handler.event",
|
|
352
|
+
importance: "high",
|
|
353
|
+
attributes: {
|
|
354
|
+
...required("botId", "eventId", "event.type"),
|
|
355
|
+
...optional(
|
|
356
|
+
"conversationId",
|
|
357
|
+
"messageId",
|
|
358
|
+
"userId",
|
|
359
|
+
"integration",
|
|
360
|
+
"channel",
|
|
361
|
+
"workflowId",
|
|
362
|
+
"parentWorkflowId"
|
|
363
|
+
)
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
var WorkflowHandlerSpan = {
|
|
367
|
+
name: "handler.workflow",
|
|
368
|
+
importance: "high",
|
|
369
|
+
attributes: {
|
|
370
|
+
...required("botId", "workflowId", "eventId", "event.type"),
|
|
371
|
+
...optional(
|
|
372
|
+
"messageId",
|
|
373
|
+
"userId",
|
|
374
|
+
"integration",
|
|
375
|
+
"channel",
|
|
376
|
+
"conversationId",
|
|
377
|
+
"parentWorkflowId"
|
|
378
|
+
),
|
|
379
|
+
"workflow.name": { type: "string" },
|
|
380
|
+
"workflow.status.initial": {
|
|
381
|
+
type: "enum",
|
|
382
|
+
enum: [
|
|
383
|
+
"pending",
|
|
384
|
+
"in_progress",
|
|
385
|
+
"listening",
|
|
386
|
+
"paused",
|
|
387
|
+
"completed",
|
|
388
|
+
"failed",
|
|
389
|
+
"timedout",
|
|
390
|
+
"cancelled"
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
"workflow.status.final": {
|
|
394
|
+
type: "enum",
|
|
395
|
+
enum: ["continue", "completed", "failed"]
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
var WorkflowStepSpan = {
|
|
400
|
+
name: "handler.workflow.step",
|
|
401
|
+
importance: "high",
|
|
402
|
+
attributes: {
|
|
403
|
+
...required("workflowId"),
|
|
404
|
+
"workflow.step": { type: "string", required: true },
|
|
405
|
+
"workflow.step.type": { type: "string", required: true },
|
|
406
|
+
"workflow.step.attempt": { type: "number", required: true },
|
|
407
|
+
"workflow.step.output": { type: "json" },
|
|
408
|
+
"workflow.step.max_attempts": { type: "number" },
|
|
409
|
+
"workflow.step.error": { type: "string" }
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
var ActionHandlerSpan = {
|
|
413
|
+
name: "handler.action",
|
|
414
|
+
importance: "high",
|
|
415
|
+
attributes: {
|
|
416
|
+
...required("botId", "workflowId", "eventId", "event.type"),
|
|
417
|
+
...optional(
|
|
418
|
+
"messageId",
|
|
419
|
+
"userId",
|
|
420
|
+
"integration",
|
|
421
|
+
"channel",
|
|
422
|
+
"conversationId",
|
|
423
|
+
"parentWorkflowId"
|
|
424
|
+
),
|
|
425
|
+
"action.name": { type: "string", required: true },
|
|
426
|
+
"action.input": { type: "json", required: true }
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
var AutonomousExecutionSpan = {
|
|
430
|
+
name: "autonomous.execution",
|
|
431
|
+
importance: "high",
|
|
432
|
+
attributes: {
|
|
433
|
+
"autonomous.max_loops": {
|
|
434
|
+
type: "number",
|
|
435
|
+
title: "Max Loops",
|
|
436
|
+
description: "The maximum number of loops allowed",
|
|
437
|
+
required: true
|
|
438
|
+
},
|
|
439
|
+
"autonomous.mode": {
|
|
440
|
+
type: "enum",
|
|
441
|
+
title: "Mode",
|
|
442
|
+
description: "The mode LLMz is running in (chat or worker)",
|
|
443
|
+
enum: ["chat", "worker"],
|
|
444
|
+
required: true
|
|
445
|
+
},
|
|
446
|
+
"autonomous.message_types": {
|
|
447
|
+
type: "json",
|
|
448
|
+
title: "Message Types",
|
|
449
|
+
description: "The types of messages LLMz can send"
|
|
450
|
+
},
|
|
451
|
+
"autonomous.iterations": {
|
|
452
|
+
type: "number",
|
|
453
|
+
title: "Iterations",
|
|
454
|
+
description: "The number of iterations performed"
|
|
455
|
+
},
|
|
456
|
+
"autonomous.execution_id": {
|
|
457
|
+
type: "string",
|
|
458
|
+
title: "Execution ID",
|
|
459
|
+
description: "The unique ID for this execution"
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
var AutonomousIterationSpan = {
|
|
464
|
+
name: "autonomous.iteration",
|
|
465
|
+
importance: "high",
|
|
466
|
+
attributes: {
|
|
467
|
+
"autonomous.iteration": {
|
|
468
|
+
type: "number",
|
|
469
|
+
title: "Iteration",
|
|
470
|
+
description: "The current iteration number",
|
|
471
|
+
required: true
|
|
472
|
+
},
|
|
473
|
+
"autonomous.instructions": {
|
|
474
|
+
type: "string",
|
|
475
|
+
title: "Instructions",
|
|
476
|
+
description: "The instructions provided to the agent"
|
|
477
|
+
},
|
|
478
|
+
"autonomous.exits": {
|
|
479
|
+
type: "json",
|
|
480
|
+
title: "Exits",
|
|
481
|
+
description: "The possible exit points for the agent"
|
|
482
|
+
},
|
|
483
|
+
"autonomous.code": {
|
|
484
|
+
type: "string",
|
|
485
|
+
title: "Code",
|
|
486
|
+
description: "The code generated in this iteration"
|
|
487
|
+
},
|
|
488
|
+
"autonomous.tools": {
|
|
489
|
+
type: "json",
|
|
490
|
+
title: "Tools",
|
|
491
|
+
description: "The tools available to the agent"
|
|
492
|
+
},
|
|
493
|
+
"autonomous.thoughts": {
|
|
494
|
+
type: "string",
|
|
495
|
+
title: "Thoughts",
|
|
496
|
+
description: "The thoughts generated in this iteration"
|
|
497
|
+
},
|
|
498
|
+
"autonomous.status": {
|
|
499
|
+
type: "enum",
|
|
500
|
+
enum: [
|
|
501
|
+
"pending",
|
|
502
|
+
"generation_error",
|
|
503
|
+
"execution_error",
|
|
504
|
+
"invalid_code_error",
|
|
505
|
+
"thinking_requested",
|
|
506
|
+
"callback_requested",
|
|
507
|
+
"exit_success",
|
|
508
|
+
"exit_error",
|
|
509
|
+
"aborted"
|
|
510
|
+
],
|
|
511
|
+
title: "Error Type",
|
|
512
|
+
description: "The type of error encountered, if any"
|
|
513
|
+
},
|
|
514
|
+
"autonomous.error": {
|
|
515
|
+
type: "string",
|
|
516
|
+
title: "Error Message",
|
|
517
|
+
description: "The error message, if any"
|
|
518
|
+
},
|
|
519
|
+
"autonomous.exit.name": {
|
|
520
|
+
type: "string",
|
|
521
|
+
title: "Exit Name",
|
|
522
|
+
description: "The name of the exit point if exiting"
|
|
523
|
+
},
|
|
524
|
+
"autonomous.exit.value": {
|
|
525
|
+
type: "json",
|
|
526
|
+
title: "Exit Value",
|
|
527
|
+
description: "The value returned upon exit"
|
|
528
|
+
},
|
|
529
|
+
"ai.model": {
|
|
530
|
+
type: "string",
|
|
531
|
+
title: "AI Model",
|
|
532
|
+
description: "The AI model used for this iteration"
|
|
533
|
+
},
|
|
534
|
+
"ai.tokens": {
|
|
535
|
+
type: "number",
|
|
536
|
+
title: "Input Tokens",
|
|
537
|
+
description: "Number of input tokens used"
|
|
538
|
+
},
|
|
539
|
+
"ai.cost": {
|
|
540
|
+
type: "number",
|
|
541
|
+
title: "Cost",
|
|
542
|
+
description: "Total cost of this iteration in USD"
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
var AutonomousToolSpan = {
|
|
547
|
+
name: "autonomous.tool",
|
|
548
|
+
importance: "high",
|
|
549
|
+
attributes: {
|
|
550
|
+
"autonomous.tool.name": {
|
|
551
|
+
type: "string",
|
|
552
|
+
title: "Tool Name",
|
|
553
|
+
description: "The name of the tool being used",
|
|
554
|
+
required: true
|
|
555
|
+
},
|
|
556
|
+
"autonomous.tool.input": {
|
|
557
|
+
type: "json",
|
|
558
|
+
title: "Tool Input",
|
|
559
|
+
description: "The input provided to the tool"
|
|
560
|
+
},
|
|
561
|
+
"autonomous.tool.output": {
|
|
562
|
+
type: "json",
|
|
563
|
+
title: "Tool Output",
|
|
564
|
+
description: "The output returned by the tool"
|
|
565
|
+
},
|
|
566
|
+
"autonomous.tool.status": {
|
|
567
|
+
type: "enum",
|
|
568
|
+
enum: ["think", "success", "error"],
|
|
569
|
+
title: "Tool Status",
|
|
570
|
+
description: "The status of the tool execution"
|
|
571
|
+
},
|
|
572
|
+
"autonomous.tool.error": {
|
|
573
|
+
type: "string",
|
|
574
|
+
title: "Tool Error",
|
|
575
|
+
description: "The error message if the tool failed"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
var InterruptionCheckSpan = {
|
|
580
|
+
name: "interruption.check",
|
|
581
|
+
importance: "medium",
|
|
582
|
+
attributes: {
|
|
583
|
+
...required("conversationId"),
|
|
584
|
+
"interruption.detected": {
|
|
585
|
+
type: "boolean",
|
|
586
|
+
title: "Interruption Detected",
|
|
587
|
+
description: "Whether an interruption was detected"
|
|
588
|
+
},
|
|
589
|
+
"interruption.events_count": {
|
|
590
|
+
type: "number",
|
|
591
|
+
title: "New Events Count",
|
|
592
|
+
description: "The number of new events detected"
|
|
593
|
+
},
|
|
594
|
+
"interruption.event_ids": {
|
|
595
|
+
type: "json",
|
|
596
|
+
title: "New Event IDs",
|
|
597
|
+
description: "The IDs of the new events that caused the interruption"
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
var ChatFetchTranscriptSpan = {
|
|
602
|
+
name: "chat.fetchTranscript",
|
|
603
|
+
importance: "medium",
|
|
604
|
+
attributes: {
|
|
605
|
+
...required("conversationId")
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
var ChatCompactTranscriptSpan = {
|
|
609
|
+
name: "chat.compactTranscript",
|
|
610
|
+
importance: "medium",
|
|
611
|
+
attributes: {
|
|
612
|
+
...required("conversationId")
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
var ChatSaveTranscriptSpan = {
|
|
616
|
+
name: "chat.saveTranscript",
|
|
617
|
+
importance: "medium",
|
|
618
|
+
attributes: {
|
|
619
|
+
...required("conversationId")
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
var ChatSendMessageSpan = {
|
|
623
|
+
name: "chat.sendMessage",
|
|
624
|
+
importance: "high",
|
|
625
|
+
attributes: {
|
|
626
|
+
...required("conversationId"),
|
|
627
|
+
...optional("messageId", "integration", "channel", "userId", "botId"),
|
|
628
|
+
"message.type": {
|
|
629
|
+
type: "string",
|
|
630
|
+
description: "The type of message being sent",
|
|
631
|
+
title: "Message Type"
|
|
632
|
+
},
|
|
633
|
+
direction: {
|
|
634
|
+
type: "enum",
|
|
635
|
+
enum: ["incoming", "outgoing"],
|
|
636
|
+
description: "The direction of the message",
|
|
637
|
+
title: "Direction"
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
var TrackedStateLoadSpan = {
|
|
642
|
+
name: "state.load",
|
|
643
|
+
importance: "medium",
|
|
644
|
+
attributes: {
|
|
645
|
+
type: {
|
|
646
|
+
type: "enum",
|
|
647
|
+
enum: ["bot", "user", "conversation", "workflow"],
|
|
648
|
+
description: "The type of state being loaded",
|
|
649
|
+
title: "State Type",
|
|
650
|
+
required: true
|
|
651
|
+
},
|
|
652
|
+
name: {
|
|
653
|
+
type: "string",
|
|
654
|
+
description: "The name of the state",
|
|
655
|
+
title: "State Name",
|
|
656
|
+
required: true
|
|
657
|
+
},
|
|
658
|
+
location: {
|
|
659
|
+
type: "enum",
|
|
660
|
+
enum: ["state", "file"],
|
|
661
|
+
description: "Where the state is stored",
|
|
662
|
+
title: "Storage Location"
|
|
663
|
+
},
|
|
664
|
+
has_value: {
|
|
665
|
+
type: "boolean",
|
|
666
|
+
description: "Whether the state has a value",
|
|
667
|
+
title: "Has Value"
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
var TrackedStateSaveSpan = {
|
|
672
|
+
name: "state.save",
|
|
673
|
+
importance: "medium",
|
|
674
|
+
attributes: {
|
|
675
|
+
type: {
|
|
676
|
+
type: "enum",
|
|
677
|
+
enum: ["bot", "user", "conversation", "workflow"],
|
|
678
|
+
description: "The type of state being saved",
|
|
679
|
+
title: "State Type",
|
|
680
|
+
required: true
|
|
681
|
+
},
|
|
682
|
+
name: {
|
|
683
|
+
type: "string",
|
|
684
|
+
description: "The name of the state",
|
|
685
|
+
title: "State Name",
|
|
686
|
+
required: true
|
|
687
|
+
},
|
|
688
|
+
state_size_bytes: {
|
|
689
|
+
type: "number",
|
|
690
|
+
description: "The size of the state in bytes",
|
|
691
|
+
title: "State Size (bytes)"
|
|
692
|
+
},
|
|
693
|
+
swapped_to_file: {
|
|
694
|
+
type: "boolean",
|
|
695
|
+
description: "Whether the state was swapped to a file",
|
|
696
|
+
title: "Swapped to File"
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
};
|
|
700
|
+
var TrackedStateSaveAllDirtySpan = {
|
|
701
|
+
name: "state.saveAllDirty",
|
|
702
|
+
importance: "medium",
|
|
703
|
+
attributes: {
|
|
704
|
+
states_count: {
|
|
705
|
+
type: "number",
|
|
706
|
+
description: "The number of dirty states being saved",
|
|
707
|
+
title: "States Count",
|
|
708
|
+
required: true
|
|
709
|
+
},
|
|
710
|
+
states: {
|
|
711
|
+
type: "json",
|
|
712
|
+
description: "The list of states being saved (type/id/name)",
|
|
713
|
+
title: "States"
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
var TrackedStateLoadAllSpan = {
|
|
718
|
+
name: "state.loadAll",
|
|
719
|
+
importance: "medium",
|
|
720
|
+
attributes: {}
|
|
721
|
+
};
|
|
722
|
+
var Spans = {
|
|
723
|
+
IncomingRequestSpan,
|
|
724
|
+
CognitiveSpan,
|
|
725
|
+
HttpSpan,
|
|
726
|
+
BotpressClientSpan,
|
|
727
|
+
ConversationHandlerSpan,
|
|
728
|
+
TriggerHandlerSpan,
|
|
729
|
+
WorkflowHandlerSpan,
|
|
730
|
+
WorkflowStepSpan,
|
|
731
|
+
ActionHandlerSpan,
|
|
732
|
+
EventHandlerSpan,
|
|
733
|
+
AutonomousExecutionSpan,
|
|
734
|
+
AutonomousIterationSpan,
|
|
735
|
+
AutonomousToolSpan,
|
|
736
|
+
InterruptionCheckSpan,
|
|
737
|
+
ChatFetchTranscriptSpan,
|
|
738
|
+
ChatCompactTranscriptSpan,
|
|
739
|
+
ChatSaveTranscriptSpan,
|
|
740
|
+
ChatSendMessageSpan,
|
|
741
|
+
TrackedStateLoadSpan,
|
|
742
|
+
TrackedStateSaveSpan,
|
|
743
|
+
TrackedStateSaveAllDirtySpan,
|
|
744
|
+
TrackedStateLoadAllSpan
|
|
745
|
+
};
|
|
746
|
+
export {
|
|
747
|
+
Spans as SpanDefinitions
|
|
748
|
+
};
|
|
749
|
+
//# sourceMappingURL=ui.js.map
|