@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/internal.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
|
|
|
@@ -36847,7 +36847,7 @@ var init_config = __esm({
|
|
|
36847
36847
|
|
|
36848
36848
|
// src/runtime/chat/components.ts
|
|
36849
36849
|
import { messages, z as z14 } from "@botpress/sdk";
|
|
36850
|
-
var DefaultMessageTypes, AudioComponent, ImageComponent, VideoComponent, LocationComponent, ChoiceComponent, DropdownComponent, CarouselComponent;
|
|
36850
|
+
var DefaultMessageTypes, TextComponent, AudioComponent, ImageComponent, VideoComponent, LocationComponent, ChoiceComponent, DropdownComponent, CarouselComponent;
|
|
36851
36851
|
var init_components = __esm({
|
|
36852
36852
|
"src/runtime/chat/components.ts"() {
|
|
36853
36853
|
"use strict";
|
|
@@ -36867,6 +36867,28 @@ var init_components = __esm({
|
|
|
36867
36867
|
video: messages.defaults["video"].schema,
|
|
36868
36868
|
bloc: messages.defaults["bloc"].schema
|
|
36869
36869
|
};
|
|
36870
|
+
TextComponent = new Autonomous.Component({
|
|
36871
|
+
type: "leaf",
|
|
36872
|
+
aliases: ["text", "message"],
|
|
36873
|
+
name: "Text",
|
|
36874
|
+
description: `Send a text message to the user, which can include plain text or markdown formatting.
|
|
36875
|
+
The text message can be used to convey information, ask questions, or provide instructions to the user within the chat interface.`,
|
|
36876
|
+
examples: [
|
|
36877
|
+
{
|
|
36878
|
+
name: " Basic Text Message",
|
|
36879
|
+
description: "Sends a simple text message to the user",
|
|
36880
|
+
code: `
|
|
36881
|
+
yield <Message>
|
|
36882
|
+
Hello! This is a **bold** statement and this is _italicized_.
|
|
36883
|
+
</Message>`
|
|
36884
|
+
}
|
|
36885
|
+
],
|
|
36886
|
+
leaf: {
|
|
36887
|
+
props: z14.object({
|
|
36888
|
+
text: z14.string().describe("The text content of the message to be sent.")
|
|
36889
|
+
})
|
|
36890
|
+
}
|
|
36891
|
+
});
|
|
36870
36892
|
AudioComponent = new Autonomous.Component({
|
|
36871
36893
|
type: "leaf",
|
|
36872
36894
|
aliases: [],
|
|
@@ -37187,7 +37209,7 @@ var init_conversation_instance = __esm({
|
|
|
37187
37209
|
init_define_BUILD();
|
|
37188
37210
|
init_define_PACKAGE_VERSIONS();
|
|
37189
37211
|
init_runtime2();
|
|
37190
|
-
BaseConversationInstance = class
|
|
37212
|
+
BaseConversationInstance = class {
|
|
37191
37213
|
id;
|
|
37192
37214
|
channel;
|
|
37193
37215
|
integration;
|
|
@@ -37195,6 +37217,7 @@ var init_conversation_instance = __esm({
|
|
|
37195
37217
|
* The integration alias (e.g., "telegram1", "telegram2").
|
|
37196
37218
|
* This is useful when you have multiple instances of the same integration
|
|
37197
37219
|
* with different configurations (multi-integration setup).
|
|
37220
|
+
* Note: conversation.integration from the API is already the alias.
|
|
37198
37221
|
*/
|
|
37199
37222
|
alias;
|
|
37200
37223
|
conversation;
|
|
@@ -37204,24 +37227,10 @@ var init_conversation_instance = __esm({
|
|
|
37204
37227
|
TrackedState;
|
|
37205
37228
|
// @internal
|
|
37206
37229
|
TrackedTags;
|
|
37207
|
-
/**
|
|
37208
|
-
* Extract integration alias from tags (e.g., "telegram3:id" -> "telegram3")
|
|
37209
|
-
* @internal
|
|
37210
|
-
*/
|
|
37211
|
-
static extractAliasFromTags(tags) {
|
|
37212
|
-
if (!tags) return void 0;
|
|
37213
|
-
for (const tagKey of Object.keys(tags)) {
|
|
37214
|
-
const colonIndex = tagKey.indexOf(":");
|
|
37215
|
-
if (colonIndex > 0) {
|
|
37216
|
-
return tagKey.substring(0, colonIndex);
|
|
37217
|
-
}
|
|
37218
|
-
}
|
|
37219
|
-
return void 0;
|
|
37220
|
-
}
|
|
37221
37230
|
constructor(conversation, client2, alias) {
|
|
37222
37231
|
this.id = conversation.id;
|
|
37223
37232
|
this.integration = conversation.integration;
|
|
37224
|
-
this.alias = alias ??
|
|
37233
|
+
this.alias = alias ?? conversation.integration;
|
|
37225
37234
|
this.channel = `${this.alias}.${conversation.channel}`;
|
|
37226
37235
|
this.conversation = conversation;
|
|
37227
37236
|
this.client = client2;
|