@botpress/runtime 1.13.5 → 1.13.7
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/definition.js +27 -18
- package/dist/definition.js.map +2 -2
- package/dist/internal.js +27 -18
- package/dist/internal.js.map +2 -2
- package/dist/library.js +27 -18
- package/dist/library.js.map +2 -2
- package/dist/primitives/conversation-instance.d.ts +1 -0
- package/dist/primitives/conversation-instance.d.ts.map +1 -1
- package/dist/runtime/chat/chat.d.ts.map +1 -1
- package/dist/runtime/chat/components.d.ts +14 -0
- package/dist/runtime/chat/components.d.ts.map +1 -1
- package/dist/runtime/handlers/conversation.d.ts.map +1 -1
- package/dist/runtime.js +32 -33
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -48,7 +48,7 @@ var init_define_BUILD = __esm({
|
|
|
48
48
|
var define_PACKAGE_VERSIONS_default;
|
|
49
49
|
var init_define_PACKAGE_VERSIONS = __esm({
|
|
50
50
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
51
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.13.
|
|
51
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.13.7", adk: "1.13.7", sdk: "5.0.2", llmz: "0.0.35", zai: "2.5.6", cognitive: "0.3.3" };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -34367,7 +34367,7 @@ var init_conversation_instance = __esm({
|
|
|
34367
34367
|
init_define_BUILD();
|
|
34368
34368
|
init_define_PACKAGE_VERSIONS();
|
|
34369
34369
|
init_runtime2();
|
|
34370
|
-
BaseConversationInstance = class
|
|
34370
|
+
BaseConversationInstance = class {
|
|
34371
34371
|
id;
|
|
34372
34372
|
channel;
|
|
34373
34373
|
integration;
|
|
@@ -34375,6 +34375,7 @@ var init_conversation_instance = __esm({
|
|
|
34375
34375
|
* The integration alias (e.g., "telegram1", "telegram2").
|
|
34376
34376
|
* This is useful when you have multiple instances of the same integration
|
|
34377
34377
|
* with different configurations (multi-integration setup).
|
|
34378
|
+
* Note: conversation.integration from the API is already the alias.
|
|
34378
34379
|
*/
|
|
34379
34380
|
alias;
|
|
34380
34381
|
conversation;
|
|
@@ -34384,24 +34385,10 @@ var init_conversation_instance = __esm({
|
|
|
34384
34385
|
TrackedState;
|
|
34385
34386
|
// @internal
|
|
34386
34387
|
TrackedTags;
|
|
34387
|
-
/**
|
|
34388
|
-
* Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
|
|
34389
|
-
* @internal
|
|
34390
|
-
*/
|
|
34391
|
-
static extractAliasFromTags(tags) {
|
|
34392
|
-
if (!tags) return void 0;
|
|
34393
|
-
for (const tagKey of Object.keys(tags)) {
|
|
34394
|
-
const colonIndex = tagKey.indexOf(":");
|
|
34395
|
-
if (colonIndex > 0) {
|
|
34396
|
-
return tagKey.substring(0, colonIndex);
|
|
34397
|
-
}
|
|
34398
|
-
}
|
|
34399
|
-
return void 0;
|
|
34400
|
-
}
|
|
34401
34388
|
constructor(conversation, client2, alias) {
|
|
34402
34389
|
this.id = conversation.id;
|
|
34403
34390
|
this.integration = conversation.integration;
|
|
34404
|
-
this.alias = alias ??
|
|
34391
|
+
this.alias = alias ?? conversation.integration;
|
|
34405
34392
|
this.channel = `${this.alias}.${conversation.channel}`;
|
|
34406
34393
|
this.conversation = conversation;
|
|
34407
34394
|
this.client = client2;
|
|
@@ -46190,7 +46177,7 @@ var init_config = __esm({
|
|
|
46190
46177
|
|
|
46191
46178
|
// src/runtime/chat/components.ts
|
|
46192
46179
|
import { messages, z as z26 } from "@botpress/sdk";
|
|
46193
|
-
var DefaultMessageTypes, AudioComponent, ImageComponent, VideoComponent, LocationComponent, ChoiceComponent, DropdownComponent, CarouselComponent;
|
|
46180
|
+
var DefaultMessageTypes, TextComponent, AudioComponent, ImageComponent, VideoComponent, LocationComponent, ChoiceComponent, DropdownComponent, CarouselComponent;
|
|
46194
46181
|
var init_components = __esm({
|
|
46195
46182
|
"src/runtime/chat/components.ts"() {
|
|
46196
46183
|
"use strict";
|
|
@@ -46210,6 +46197,28 @@ var init_components = __esm({
|
|
|
46210
46197
|
video: messages.defaults["video"].schema,
|
|
46211
46198
|
bloc: messages.defaults["bloc"].schema
|
|
46212
46199
|
};
|
|
46200
|
+
TextComponent = new Autonomous.Component({
|
|
46201
|
+
type: "leaf",
|
|
46202
|
+
aliases: ["text", "message"],
|
|
46203
|
+
name: "Text",
|
|
46204
|
+
description: `Send a text message to the user, which can include plain text or markdown formatting.
|
|
46205
|
+
The text message can be used to convey information, ask questions, or provide instructions to the user within the chat interface.`,
|
|
46206
|
+
examples: [
|
|
46207
|
+
{
|
|
46208
|
+
name: " Basic Text Message",
|
|
46209
|
+
description: "Sends a simple text message to the user",
|
|
46210
|
+
code: `
|
|
46211
|
+
yield <Message>
|
|
46212
|
+
Hello! This is a **bold** statement and this is _italicized_.
|
|
46213
|
+
</Message>`
|
|
46214
|
+
}
|
|
46215
|
+
],
|
|
46216
|
+
leaf: {
|
|
46217
|
+
props: z26.object({
|
|
46218
|
+
text: z26.string().describe("The text content of the message to be sent.")
|
|
46219
|
+
})
|
|
46220
|
+
}
|
|
46221
|
+
});
|
|
46213
46222
|
AudioComponent = new Autonomous.Component({
|
|
46214
46223
|
type: "leaf",
|
|
46215
46224
|
aliases: [],
|