@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/library.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
|
|
|
@@ -37806,7 +37806,7 @@ var init_config = __esm({
|
|
|
37806
37806
|
|
|
37807
37807
|
// src/runtime/chat/components.ts
|
|
37808
37808
|
import { messages, z as z17 } from "@botpress/sdk";
|
|
37809
|
-
var DefaultMessageTypes, AudioComponent, ImageComponent, VideoComponent, LocationComponent, ChoiceComponent, DropdownComponent, CarouselComponent;
|
|
37809
|
+
var DefaultMessageTypes, TextComponent, AudioComponent, ImageComponent, VideoComponent, LocationComponent, ChoiceComponent, DropdownComponent, CarouselComponent;
|
|
37810
37810
|
var init_components = __esm({
|
|
37811
37811
|
"src/runtime/chat/components.ts"() {
|
|
37812
37812
|
"use strict";
|
|
@@ -37826,6 +37826,28 @@ var init_components = __esm({
|
|
|
37826
37826
|
video: messages.defaults["video"].schema,
|
|
37827
37827
|
bloc: messages.defaults["bloc"].schema
|
|
37828
37828
|
};
|
|
37829
|
+
TextComponent = new Autonomous.Component({
|
|
37830
|
+
type: "leaf",
|
|
37831
|
+
aliases: ["text", "message"],
|
|
37832
|
+
name: "Text",
|
|
37833
|
+
description: `Send a text message to the user, which can include plain text or markdown formatting.
|
|
37834
|
+
The text message can be used to convey information, ask questions, or provide instructions to the user within the chat interface.`,
|
|
37835
|
+
examples: [
|
|
37836
|
+
{
|
|
37837
|
+
name: " Basic Text Message",
|
|
37838
|
+
description: "Sends a simple text message to the user",
|
|
37839
|
+
code: `
|
|
37840
|
+
yield <Message>
|
|
37841
|
+
Hello! This is a **bold** statement and this is _italicized_.
|
|
37842
|
+
</Message>`
|
|
37843
|
+
}
|
|
37844
|
+
],
|
|
37845
|
+
leaf: {
|
|
37846
|
+
props: z17.object({
|
|
37847
|
+
text: z17.string().describe("The text content of the message to be sent.")
|
|
37848
|
+
})
|
|
37849
|
+
}
|
|
37850
|
+
});
|
|
37829
37851
|
AudioComponent = new Autonomous.Component({
|
|
37830
37852
|
type: "leaf",
|
|
37831
37853
|
aliases: [],
|
|
@@ -38146,7 +38168,7 @@ var init_conversation_instance = __esm({
|
|
|
38146
38168
|
init_define_BUILD();
|
|
38147
38169
|
init_define_PACKAGE_VERSIONS();
|
|
38148
38170
|
init_runtime2();
|
|
38149
|
-
BaseConversationInstance = class
|
|
38171
|
+
BaseConversationInstance = class {
|
|
38150
38172
|
id;
|
|
38151
38173
|
channel;
|
|
38152
38174
|
integration;
|
|
@@ -38154,6 +38176,7 @@ var init_conversation_instance = __esm({
|
|
|
38154
38176
|
* The integration alias (e.g., "telegram1", "telegram2").
|
|
38155
38177
|
* This is useful when you have multiple instances of the same integration
|
|
38156
38178
|
* with different configurations (multi-integration setup).
|
|
38179
|
+
* Note: conversation.integration from the API is already the alias.
|
|
38157
38180
|
*/
|
|
38158
38181
|
alias;
|
|
38159
38182
|
conversation;
|
|
@@ -38163,24 +38186,10 @@ var init_conversation_instance = __esm({
|
|
|
38163
38186
|
TrackedState;
|
|
38164
38187
|
// @internal
|
|
38165
38188
|
TrackedTags;
|
|
38166
|
-
/**
|
|
38167
|
-
* Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
|
|
38168
|
-
* @internal
|
|
38169
|
-
*/
|
|
38170
|
-
static extractAliasFromTags(tags) {
|
|
38171
|
-
if (!tags) return void 0;
|
|
38172
|
-
for (const tagKey of Object.keys(tags)) {
|
|
38173
|
-
const colonIndex = tagKey.indexOf(":");
|
|
38174
|
-
if (colonIndex > 0) {
|
|
38175
|
-
return tagKey.substring(0, colonIndex);
|
|
38176
|
-
}
|
|
38177
|
-
}
|
|
38178
|
-
return void 0;
|
|
38179
|
-
}
|
|
38180
38189
|
constructor(conversation, client2, alias) {
|
|
38181
38190
|
this.id = conversation.id;
|
|
38182
38191
|
this.integration = conversation.integration;
|
|
38183
|
-
this.alias = alias ??
|
|
38192
|
+
this.alias = alias ?? conversation.integration;
|
|
38184
38193
|
this.channel = `${this.alias}.${conversation.channel}`;
|
|
38185
38194
|
this.conversation = conversation;
|
|
38186
38195
|
this.client = client2;
|