@botpress/adk-cli 1.8.1 → 1.8.2
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/cli.js +522 -18
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -349370,11 +349370,11 @@ function expand_(str, isTop) {
|
|
|
349370
349370
|
if (pad) {
|
|
349371
349371
|
const need = width - c5.length;
|
|
349372
349372
|
if (need > 0) {
|
|
349373
|
-
const
|
|
349373
|
+
const z27 = new Array(need + 1).join("0");
|
|
349374
349374
|
if (i2 < 0) {
|
|
349375
|
-
c5 = "-" +
|
|
349375
|
+
c5 = "-" + z27 + c5.slice(1);
|
|
349376
349376
|
} else {
|
|
349377
|
-
c5 =
|
|
349377
|
+
c5 = z27 + c5;
|
|
349378
349378
|
}
|
|
349379
349379
|
}
|
|
349380
349380
|
}
|
|
@@ -354101,7 +354101,7 @@ var import_const, import_const2, __create4, __defProp8, __getOwnPropDesc3, __get
|
|
|
354101
354101
|
} else {
|
|
354102
354102
|
return { ...EMPTY_STATE };
|
|
354103
354103
|
}
|
|
354104
|
-
}, WorkflowCallbackEvent, WorkflowScheduleEvent, WorkflowContinueEvent, SubworkflowFinished, WorkflowDataRequestEvent2, HTML_TAGS, Message, dedent, Transcript, AttachmentSchema, TranscriptItemSchema, TranscriptSchema, BaseConversationInstance = class {
|
|
354104
|
+
}, WorkflowCallbackEvent, WorkflowScheduleEvent, WorkflowContinueEvent, SubworkflowFinished, WorkflowDataRequestEvent2, HTML_TAGS, Message, dedent, Transcript, DefaultMessageTypes, AudioComponent, ImageComponent, VideoComponent, LocationComponent, ChoiceComponent, DropdownComponent, CarouselComponent, AttachmentSchema, TranscriptItemSchema, TranscriptSchema, BaseConversationInstance = class {
|
|
354105
354105
|
id;
|
|
354106
354106
|
channel;
|
|
354107
354107
|
integration;
|
|
@@ -355506,6 +355506,7 @@ var init_internal = __esm(() => {
|
|
|
355506
355506
|
init_dist16();
|
|
355507
355507
|
init_dist8();
|
|
355508
355508
|
init_dist8();
|
|
355509
|
+
init_dist8();
|
|
355509
355510
|
init_node5();
|
|
355510
355511
|
init_dist8();
|
|
355511
355512
|
init_dist8();
|
|
@@ -355532,7 +355533,7 @@ var init_internal = __esm(() => {
|
|
|
355532
355533
|
});
|
|
355533
355534
|
init_define_PACKAGE_VERSIONS = __esm2({
|
|
355534
355535
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
355535
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.8.
|
|
355536
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.8.2", adk: "1.8.2", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
|
|
355536
355537
|
}
|
|
355537
355538
|
});
|
|
355538
355539
|
init_globalThis = __esm2({
|
|
@@ -390873,6 +390874,257 @@ ${iteration.status.execution_error.stack}`;
|
|
|
390873
390874
|
};
|
|
390874
390875
|
init_define_BUILD();
|
|
390875
390876
|
init_define_PACKAGE_VERSIONS();
|
|
390877
|
+
DefaultMessageTypes = {
|
|
390878
|
+
text: Dy2.defaults["text"].schema,
|
|
390879
|
+
audio: Dy2.defaults["audio"].schema,
|
|
390880
|
+
card: Dy2.defaults["card"].schema,
|
|
390881
|
+
image: Dy2.defaults["image"].schema,
|
|
390882
|
+
carousel: Dy2.defaults["carousel"].schema,
|
|
390883
|
+
choice: Dy2.defaults["choice"].schema,
|
|
390884
|
+
dropdown: Dy2.defaults["dropdown"].schema,
|
|
390885
|
+
file: Dy2.defaults["file"].schema,
|
|
390886
|
+
location: Dy2.defaults["location"].schema,
|
|
390887
|
+
video: Dy2.defaults["video"].schema,
|
|
390888
|
+
bloc: Dy2.defaults["bloc"].schema
|
|
390889
|
+
};
|
|
390890
|
+
AudioComponent = new Autonomous.Component({
|
|
390891
|
+
type: "leaf",
|
|
390892
|
+
aliases: [],
|
|
390893
|
+
name: "Audio",
|
|
390894
|
+
description: `Send an audio file to the user, which will be playable by the user whithin the chat interface. The audio file should be in a supported format (e.g., MP3, WAV) and accessible via a public URL.`,
|
|
390895
|
+
examples: [
|
|
390896
|
+
{
|
|
390897
|
+
name: " Basic Audio Message",
|
|
390898
|
+
description: "Sends a simple audio message to the user",
|
|
390899
|
+
code: `
|
|
390900
|
+
yield <Message>
|
|
390901
|
+
Here's an **awesome** audio clip for you!
|
|
390902
|
+
<Audio audioUrl="https://example.com/path/to/audio.mp3" />
|
|
390903
|
+
</Message>`
|
|
390904
|
+
}
|
|
390905
|
+
],
|
|
390906
|
+
leaf: {
|
|
390907
|
+
props: X2.object({
|
|
390908
|
+
audioUrl: X2.string().url().describe("The URL of the audio file to be sent.")
|
|
390909
|
+
})
|
|
390910
|
+
}
|
|
390911
|
+
});
|
|
390912
|
+
ImageComponent = new Autonomous.Component({
|
|
390913
|
+
type: "leaf",
|
|
390914
|
+
aliases: ["img"],
|
|
390915
|
+
name: "Image",
|
|
390916
|
+
description: `Send an image to the user, which will be displayed within the chat interface. The image should be in a supported format (e.g., JPEG, PNG) and accessible via a public URL.`,
|
|
390917
|
+
examples: [
|
|
390918
|
+
{
|
|
390919
|
+
name: " Basic Image Message",
|
|
390920
|
+
description: "Sends a simple image message to the user",
|
|
390921
|
+
code: `
|
|
390922
|
+
yield <Message>
|
|
390923
|
+
Here's an **awesome** image for you!
|
|
390924
|
+
<Image imageUrl="https://example.com/path/to/image.jpg" />
|
|
390925
|
+
</Message>`
|
|
390926
|
+
}
|
|
390927
|
+
],
|
|
390928
|
+
leaf: {
|
|
390929
|
+
props: X2.object({
|
|
390930
|
+
imageUrl: X2.string().url().describe("The URL of the image to be sent.")
|
|
390931
|
+
})
|
|
390932
|
+
}
|
|
390933
|
+
});
|
|
390934
|
+
VideoComponent = new Autonomous.Component({
|
|
390935
|
+
type: "leaf",
|
|
390936
|
+
aliases: [],
|
|
390937
|
+
name: "Video",
|
|
390938
|
+
description: `Send a video to the user, which will be playable within the chat interface. The video should be in a supported format (e.g., MP4, WebM) and accessible via a public URL.`,
|
|
390939
|
+
examples: [
|
|
390940
|
+
{
|
|
390941
|
+
name: " Basic Video Message",
|
|
390942
|
+
description: "Sends a simple video message to the user",
|
|
390943
|
+
code: `
|
|
390944
|
+
yield <Message>
|
|
390945
|
+
Here's an **awesome** video for you!
|
|
390946
|
+
<Video videoUrl="https://example.com/path/to/video.mp4" />
|
|
390947
|
+
</Message>`
|
|
390948
|
+
}
|
|
390949
|
+
],
|
|
390950
|
+
leaf: {
|
|
390951
|
+
props: X2.object({
|
|
390952
|
+
videoUrl: X2.string().url().describe("The URL of the video to be sent.")
|
|
390953
|
+
})
|
|
390954
|
+
}
|
|
390955
|
+
});
|
|
390956
|
+
LocationComponent = new Autonomous.Component({
|
|
390957
|
+
type: "leaf",
|
|
390958
|
+
aliases: [],
|
|
390959
|
+
name: "Location",
|
|
390960
|
+
description: `Send a location to the user, which will be displayed as a map within the chat interface. The location should include latitude and longitude coordinates.
|
|
390961
|
+
The location can also optionally include an address and a title for better context.`,
|
|
390962
|
+
examples: [
|
|
390963
|
+
{
|
|
390964
|
+
name: " Basic Location Message",
|
|
390965
|
+
description: "Sends a simple location message to the user",
|
|
390966
|
+
code: `
|
|
390967
|
+
yield <Message>
|
|
390968
|
+
Here's the location you requested!
|
|
390969
|
+
<Location latitude={37.7749} longitude={-122.4194} />
|
|
390970
|
+
</Message>`
|
|
390971
|
+
},
|
|
390972
|
+
{
|
|
390973
|
+
name: " Location Message with Address and Title",
|
|
390974
|
+
description: "Sends a location message with additional address and title information",
|
|
390975
|
+
code: `
|
|
390976
|
+
yield <Message>
|
|
390977
|
+
Here's the location of our office!
|
|
390978
|
+
<Location
|
|
390979
|
+
latitude={45.506342}
|
|
390980
|
+
longitude={-73.572012}
|
|
390981
|
+
address="400 Blvd. De Maisonneuve Ouest #200, Montreal, Quebec H3A 1L4, Canada"
|
|
390982
|
+
title="Botpress HQ"
|
|
390983
|
+
/>
|
|
390984
|
+
</Message>`
|
|
390985
|
+
}
|
|
390986
|
+
],
|
|
390987
|
+
leaf: {
|
|
390988
|
+
props: X2.object({
|
|
390989
|
+
latitude: X2.number().describe("The latitude of the location to be sent."),
|
|
390990
|
+
longitude: X2.number().describe("The longitude of the location to be sent."),
|
|
390991
|
+
address: X2.string().optional().describe("The address of the location to be sent."),
|
|
390992
|
+
title: X2.string().optional().describe("The title of the location to be sent.")
|
|
390993
|
+
})
|
|
390994
|
+
}
|
|
390995
|
+
});
|
|
390996
|
+
ChoiceComponent = new Autonomous.Component({
|
|
390997
|
+
type: "leaf",
|
|
390998
|
+
aliases: ["choices", "option", "options", "buttons"],
|
|
390999
|
+
name: "Choice",
|
|
391000
|
+
description: `Present a choice to the user with multiple options.
|
|
391001
|
+
The user can select one of the provided options, and the selection will be sent back to the system for further processing.
|
|
391002
|
+
You can include up to 10 options for the user to choose from.
|
|
391003
|
+
Values for each option should be unique identifiers that can be used to identify the user's selection.`,
|
|
391004
|
+
examples: [
|
|
391005
|
+
{
|
|
391006
|
+
name: " Basic Choice Message",
|
|
391007
|
+
description: "Presents a simple choice message to the user",
|
|
391008
|
+
code: `
|
|
391009
|
+
yield <Message>
|
|
391010
|
+
Please choose one of the following options:
|
|
391011
|
+
<Choice
|
|
391012
|
+
text="Select an option:"
|
|
391013
|
+
options={[
|
|
391014
|
+
{ label: "Option 1", value: "option_1" },
|
|
391015
|
+
{ label: "Option 2", value: "option_2" },
|
|
391016
|
+
{ label: "Option 3", value: "option_3" }
|
|
391017
|
+
]}
|
|
391018
|
+
/>
|
|
391019
|
+
</Message>`
|
|
391020
|
+
}
|
|
391021
|
+
],
|
|
391022
|
+
leaf: {
|
|
391023
|
+
props: X2.object({
|
|
391024
|
+
text: X2.string().describe("The prompt text for the choice."),
|
|
391025
|
+
options: X2.array(X2.object({
|
|
391026
|
+
label: X2.string().describe("The label of the option to be displayed to the user."),
|
|
391027
|
+
value: X2.string().describe("The value of the option to be sent back when selected.")
|
|
391028
|
+
})).describe("The list of options to present to the user.")
|
|
391029
|
+
})
|
|
391030
|
+
}
|
|
391031
|
+
});
|
|
391032
|
+
DropdownComponent = new Autonomous.Component({
|
|
391033
|
+
type: "leaf",
|
|
391034
|
+
aliases: ["dropdown", "select", "combo"],
|
|
391035
|
+
name: "Dropdown",
|
|
391036
|
+
description: `Present a dropdown menu to the user with multiple options.
|
|
391037
|
+
The user can select one of the provided options from the dropdown, and the selection will be sent back to the system for further processing.
|
|
391038
|
+
Unlike the Choice component, the Dropdown component is typically used when there are more options to choose from, providing a more compact UI.
|
|
391039
|
+
The dropdown can include up to 100 options for the user to choose from.
|
|
391040
|
+
Values for each option should be unique identifiers that can be used to identify the user's selection.`,
|
|
391041
|
+
examples: [
|
|
391042
|
+
{
|
|
391043
|
+
name: " Basic Dropdown Message",
|
|
391044
|
+
description: "Presents a simple dropdown message to the user",
|
|
391045
|
+
code: `
|
|
391046
|
+
yield <Message>
|
|
391047
|
+
Please select a fruit from the dropdown:
|
|
391048
|
+
<Dropdown
|
|
391049
|
+
text="Choose an option:"
|
|
391050
|
+
options={[
|
|
391051
|
+
{ label: "\uD83C\uDF50 Pear", value: "pear" },
|
|
391052
|
+
{ label: "\uD83C\uDF4E Apple", value: "apple" },
|
|
391053
|
+
{ label: "\uD83C\uDF4C Banana", value: "banana" }
|
|
391054
|
+
]}
|
|
391055
|
+
/>
|
|
391056
|
+
</Message>`
|
|
391057
|
+
}
|
|
391058
|
+
],
|
|
391059
|
+
leaf: {
|
|
391060
|
+
props: X2.object({
|
|
391061
|
+
text: X2.string().describe("The prompt text for the dropdown."),
|
|
391062
|
+
options: X2.array(X2.object({
|
|
391063
|
+
label: X2.string().describe("The label of the option to be displayed to the user."),
|
|
391064
|
+
value: X2.string().describe("The value of the option to be sent back when selected.")
|
|
391065
|
+
})).describe("The list of options to present in the dropdown.")
|
|
391066
|
+
})
|
|
391067
|
+
}
|
|
391068
|
+
});
|
|
391069
|
+
CarouselComponent = new Autonomous.Component({
|
|
391070
|
+
type: "leaf",
|
|
391071
|
+
aliases: ["carousel", "cards", "card"],
|
|
391072
|
+
name: "Carousel",
|
|
391073
|
+
description: `Send a carousel of cards to the user, allowing them to browse through multiple items.
|
|
391074
|
+
Carousels are useful for displaying a collection of related items in a compact and interactive format.
|
|
391075
|
+
It is also possible to send a single card using the Carousel component, useful for sending a combination of image, text, and actions in one message such as a receipt or product detail.
|
|
391076
|
+
Each item in the carousel is represented as a card, which can include an image, title, subtitle, and actions.
|
|
391077
|
+
Users can navigate through the carousel by swiping or clicking on navigation controls.
|
|
391078
|
+
You can include multiple cards in the carousel, each with its own set of actions. A carousel can contain between 1 and 10 items (cards).`,
|
|
391079
|
+
examples: [
|
|
391080
|
+
{
|
|
391081
|
+
name: " Basic Carousel Message",
|
|
391082
|
+
description: "Sends a simple carousel message to the user",
|
|
391083
|
+
code: `
|
|
391084
|
+
yield <Message>
|
|
391085
|
+
Here is an **exciting** carousel for you!
|
|
391086
|
+
<Carousel
|
|
391087
|
+
items={[
|
|
391088
|
+
{
|
|
391089
|
+
title: "Product 1",
|
|
391090
|
+
subtitle: "Description of Product 1",
|
|
391091
|
+
imageUrl: "https://example.com/path/to/image1.jpg",
|
|
391092
|
+
actions: [
|
|
391093
|
+
{ action: "postback", label: "Buy Now", value: "buy_product_1" },
|
|
391094
|
+
{ action: "url", label: "View Details", value: "https://example.com/product_1" }
|
|
391095
|
+
]
|
|
391096
|
+
},
|
|
391097
|
+
{
|
|
391098
|
+
title: "Product 2",
|
|
391099
|
+
subtitle: "Description of Product 2",
|
|
391100
|
+
imageUrl: "https://example.com/path/to/image2.jpg",
|
|
391101
|
+
actions: [
|
|
391102
|
+
{ action: "postback", label: "Buy Now", value: "buy_product_2" },
|
|
391103
|
+
{ action: "url", label: "View Details", value: "https://example.com/product_2" }
|
|
391104
|
+
]
|
|
391105
|
+
}
|
|
391106
|
+
]}
|
|
391107
|
+
/>
|
|
391108
|
+
</Message>`
|
|
391109
|
+
}
|
|
391110
|
+
],
|
|
391111
|
+
leaf: {
|
|
391112
|
+
props: X2.object({
|
|
391113
|
+
items: X2.array(X2.object({
|
|
391114
|
+
title: X2.string().describe("The title of the carousel item."),
|
|
391115
|
+
subtitle: X2.string().optional().describe("The subtitle of the carousel item."),
|
|
391116
|
+
imageUrl: X2.string().url().optional().describe("The URL of the image to be displayed on the carousel item."),
|
|
391117
|
+
actions: X2.array(X2.object({
|
|
391118
|
+
action: X2.enum(["postback", "url", "say"]).describe("The type of action for the button."),
|
|
391119
|
+
label: X2.string().describe("The label of the button to be displayed to the user."),
|
|
391120
|
+
value: X2.string().describe("The value associated with the button action.")
|
|
391121
|
+
})).max(3).describe("The list of actions (buttons) to include on the carousel item.")
|
|
391122
|
+
})).describe("The list of items (cards) to include in the carousel.")
|
|
391123
|
+
})
|
|
391124
|
+
}
|
|
391125
|
+
});
|
|
391126
|
+
init_define_BUILD();
|
|
391127
|
+
init_define_PACKAGE_VERSIONS();
|
|
390876
391128
|
init_define_BUILD();
|
|
390877
391129
|
init_define_PACKAGE_VERSIONS();
|
|
390878
391130
|
AttachmentSchema = X2.object({
|
|
@@ -637238,11 +637490,11 @@ function expand_3(str, isTop) {
|
|
|
637238
637490
|
if (pad) {
|
|
637239
637491
|
const need = width - c5.length;
|
|
637240
637492
|
if (need > 0) {
|
|
637241
|
-
const
|
|
637493
|
+
const z27 = new Array(need + 1).join("0");
|
|
637242
637494
|
if (i2 < 0) {
|
|
637243
|
-
c5 = "-" +
|
|
637495
|
+
c5 = "-" + z27 + c5.slice(1);
|
|
637244
637496
|
} else {
|
|
637245
|
-
c5 =
|
|
637497
|
+
c5 = z27 + c5;
|
|
637246
637498
|
}
|
|
637247
637499
|
}
|
|
637248
637500
|
}
|
|
@@ -641875,7 +642127,7 @@ var import_const3, import_const4, __create5, __defProp9, __getOwnPropDesc4, __ge
|
|
|
641875
642127
|
} else {
|
|
641876
642128
|
return { ...EMPTY_STATE2 };
|
|
641877
642129
|
}
|
|
641878
|
-
}, WorkflowCallbackEvent2, WorkflowScheduleEvent2, WorkflowContinueEvent2, SubworkflowFinished2, WorkflowDataRequestEvent, HTML_TAGS2, Message2, dedent3, Transcript2, AttachmentSchema2, TranscriptItemSchema2, TranscriptSchema2, BaseConversationInstance2 = class {
|
|
642130
|
+
}, WorkflowCallbackEvent2, WorkflowScheduleEvent2, WorkflowContinueEvent2, SubworkflowFinished2, WorkflowDataRequestEvent, HTML_TAGS2, Message2, dedent3, Transcript2, DefaultMessageTypes2, AudioComponent2, ImageComponent2, VideoComponent2, LocationComponent2, ChoiceComponent2, DropdownComponent2, CarouselComponent2, AttachmentSchema2, TranscriptItemSchema2, TranscriptSchema2, BaseConversationInstance2 = class {
|
|
641879
642131
|
id;
|
|
641880
642132
|
channel;
|
|
641881
642133
|
integration;
|
|
@@ -642801,6 +643053,7 @@ var init_library = __esm(() => {
|
|
|
642801
643053
|
init_dist8();
|
|
642802
643054
|
init_dist8();
|
|
642803
643055
|
init_dist8();
|
|
643056
|
+
init_dist8();
|
|
642804
643057
|
init_dist10();
|
|
642805
643058
|
init_dist8();
|
|
642806
643059
|
import_const3 = __toESM(require_dist2(), 1);
|
|
@@ -642821,7 +643074,7 @@ var init_library = __esm(() => {
|
|
|
642821
643074
|
});
|
|
642822
643075
|
init_define_PACKAGE_VERSIONS2 = __esm3({
|
|
642823
643076
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
642824
|
-
define_PACKAGE_VERSIONS_default2 = { runtime: "1.8.
|
|
643077
|
+
define_PACKAGE_VERSIONS_default2 = { runtime: "1.8.2", adk: "1.8.2", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
|
|
642825
643078
|
}
|
|
642826
643079
|
});
|
|
642827
643080
|
init_globalThis2 = __esm3({
|
|
@@ -678524,6 +678777,257 @@ ${issues.join(`
|
|
|
678524
678777
|
};
|
|
678525
678778
|
init_define_BUILD2();
|
|
678526
678779
|
init_define_PACKAGE_VERSIONS2();
|
|
678780
|
+
DefaultMessageTypes2 = {
|
|
678781
|
+
text: Dy2.defaults["text"].schema,
|
|
678782
|
+
audio: Dy2.defaults["audio"].schema,
|
|
678783
|
+
card: Dy2.defaults["card"].schema,
|
|
678784
|
+
image: Dy2.defaults["image"].schema,
|
|
678785
|
+
carousel: Dy2.defaults["carousel"].schema,
|
|
678786
|
+
choice: Dy2.defaults["choice"].schema,
|
|
678787
|
+
dropdown: Dy2.defaults["dropdown"].schema,
|
|
678788
|
+
file: Dy2.defaults["file"].schema,
|
|
678789
|
+
location: Dy2.defaults["location"].schema,
|
|
678790
|
+
video: Dy2.defaults["video"].schema,
|
|
678791
|
+
bloc: Dy2.defaults["bloc"].schema
|
|
678792
|
+
};
|
|
678793
|
+
AudioComponent2 = new Autonomous2.Component({
|
|
678794
|
+
type: "leaf",
|
|
678795
|
+
aliases: [],
|
|
678796
|
+
name: "Audio",
|
|
678797
|
+
description: `Send an audio file to the user, which will be playable by the user whithin the chat interface. The audio file should be in a supported format (e.g., MP3, WAV) and accessible via a public URL.`,
|
|
678798
|
+
examples: [
|
|
678799
|
+
{
|
|
678800
|
+
name: " Basic Audio Message",
|
|
678801
|
+
description: "Sends a simple audio message to the user",
|
|
678802
|
+
code: `
|
|
678803
|
+
yield <Message>
|
|
678804
|
+
Here's an **awesome** audio clip for you!
|
|
678805
|
+
<Audio audioUrl="https://example.com/path/to/audio.mp3" />
|
|
678806
|
+
</Message>`
|
|
678807
|
+
}
|
|
678808
|
+
],
|
|
678809
|
+
leaf: {
|
|
678810
|
+
props: X2.object({
|
|
678811
|
+
audioUrl: X2.string().url().describe("The URL of the audio file to be sent.")
|
|
678812
|
+
})
|
|
678813
|
+
}
|
|
678814
|
+
});
|
|
678815
|
+
ImageComponent2 = new Autonomous2.Component({
|
|
678816
|
+
type: "leaf",
|
|
678817
|
+
aliases: ["img"],
|
|
678818
|
+
name: "Image",
|
|
678819
|
+
description: `Send an image to the user, which will be displayed within the chat interface. The image should be in a supported format (e.g., JPEG, PNG) and accessible via a public URL.`,
|
|
678820
|
+
examples: [
|
|
678821
|
+
{
|
|
678822
|
+
name: " Basic Image Message",
|
|
678823
|
+
description: "Sends a simple image message to the user",
|
|
678824
|
+
code: `
|
|
678825
|
+
yield <Message>
|
|
678826
|
+
Here's an **awesome** image for you!
|
|
678827
|
+
<Image imageUrl="https://example.com/path/to/image.jpg" />
|
|
678828
|
+
</Message>`
|
|
678829
|
+
}
|
|
678830
|
+
],
|
|
678831
|
+
leaf: {
|
|
678832
|
+
props: X2.object({
|
|
678833
|
+
imageUrl: X2.string().url().describe("The URL of the image to be sent.")
|
|
678834
|
+
})
|
|
678835
|
+
}
|
|
678836
|
+
});
|
|
678837
|
+
VideoComponent2 = new Autonomous2.Component({
|
|
678838
|
+
type: "leaf",
|
|
678839
|
+
aliases: [],
|
|
678840
|
+
name: "Video",
|
|
678841
|
+
description: `Send a video to the user, which will be playable within the chat interface. The video should be in a supported format (e.g., MP4, WebM) and accessible via a public URL.`,
|
|
678842
|
+
examples: [
|
|
678843
|
+
{
|
|
678844
|
+
name: " Basic Video Message",
|
|
678845
|
+
description: "Sends a simple video message to the user",
|
|
678846
|
+
code: `
|
|
678847
|
+
yield <Message>
|
|
678848
|
+
Here's an **awesome** video for you!
|
|
678849
|
+
<Video videoUrl="https://example.com/path/to/video.mp4" />
|
|
678850
|
+
</Message>`
|
|
678851
|
+
}
|
|
678852
|
+
],
|
|
678853
|
+
leaf: {
|
|
678854
|
+
props: X2.object({
|
|
678855
|
+
videoUrl: X2.string().url().describe("The URL of the video to be sent.")
|
|
678856
|
+
})
|
|
678857
|
+
}
|
|
678858
|
+
});
|
|
678859
|
+
LocationComponent2 = new Autonomous2.Component({
|
|
678860
|
+
type: "leaf",
|
|
678861
|
+
aliases: [],
|
|
678862
|
+
name: "Location",
|
|
678863
|
+
description: `Send a location to the user, which will be displayed as a map within the chat interface. The location should include latitude and longitude coordinates.
|
|
678864
|
+
The location can also optionally include an address and a title for better context.`,
|
|
678865
|
+
examples: [
|
|
678866
|
+
{
|
|
678867
|
+
name: " Basic Location Message",
|
|
678868
|
+
description: "Sends a simple location message to the user",
|
|
678869
|
+
code: `
|
|
678870
|
+
yield <Message>
|
|
678871
|
+
Here's the location you requested!
|
|
678872
|
+
<Location latitude={37.7749} longitude={-122.4194} />
|
|
678873
|
+
</Message>`
|
|
678874
|
+
},
|
|
678875
|
+
{
|
|
678876
|
+
name: " Location Message with Address and Title",
|
|
678877
|
+
description: "Sends a location message with additional address and title information",
|
|
678878
|
+
code: `
|
|
678879
|
+
yield <Message>
|
|
678880
|
+
Here's the location of our office!
|
|
678881
|
+
<Location
|
|
678882
|
+
latitude={45.506342}
|
|
678883
|
+
longitude={-73.572012}
|
|
678884
|
+
address="400 Blvd. De Maisonneuve Ouest #200, Montreal, Quebec H3A 1L4, Canada"
|
|
678885
|
+
title="Botpress HQ"
|
|
678886
|
+
/>
|
|
678887
|
+
</Message>`
|
|
678888
|
+
}
|
|
678889
|
+
],
|
|
678890
|
+
leaf: {
|
|
678891
|
+
props: X2.object({
|
|
678892
|
+
latitude: X2.number().describe("The latitude of the location to be sent."),
|
|
678893
|
+
longitude: X2.number().describe("The longitude of the location to be sent."),
|
|
678894
|
+
address: X2.string().optional().describe("The address of the location to be sent."),
|
|
678895
|
+
title: X2.string().optional().describe("The title of the location to be sent.")
|
|
678896
|
+
})
|
|
678897
|
+
}
|
|
678898
|
+
});
|
|
678899
|
+
ChoiceComponent2 = new Autonomous2.Component({
|
|
678900
|
+
type: "leaf",
|
|
678901
|
+
aliases: ["choices", "option", "options", "buttons"],
|
|
678902
|
+
name: "Choice",
|
|
678903
|
+
description: `Present a choice to the user with multiple options.
|
|
678904
|
+
The user can select one of the provided options, and the selection will be sent back to the system for further processing.
|
|
678905
|
+
You can include up to 10 options for the user to choose from.
|
|
678906
|
+
Values for each option should be unique identifiers that can be used to identify the user's selection.`,
|
|
678907
|
+
examples: [
|
|
678908
|
+
{
|
|
678909
|
+
name: " Basic Choice Message",
|
|
678910
|
+
description: "Presents a simple choice message to the user",
|
|
678911
|
+
code: `
|
|
678912
|
+
yield <Message>
|
|
678913
|
+
Please choose one of the following options:
|
|
678914
|
+
<Choice
|
|
678915
|
+
text="Select an option:"
|
|
678916
|
+
options={[
|
|
678917
|
+
{ label: "Option 1", value: "option_1" },
|
|
678918
|
+
{ label: "Option 2", value: "option_2" },
|
|
678919
|
+
{ label: "Option 3", value: "option_3" }
|
|
678920
|
+
]}
|
|
678921
|
+
/>
|
|
678922
|
+
</Message>`
|
|
678923
|
+
}
|
|
678924
|
+
],
|
|
678925
|
+
leaf: {
|
|
678926
|
+
props: X2.object({
|
|
678927
|
+
text: X2.string().describe("The prompt text for the choice."),
|
|
678928
|
+
options: X2.array(X2.object({
|
|
678929
|
+
label: X2.string().describe("The label of the option to be displayed to the user."),
|
|
678930
|
+
value: X2.string().describe("The value of the option to be sent back when selected.")
|
|
678931
|
+
})).describe("The list of options to present to the user.")
|
|
678932
|
+
})
|
|
678933
|
+
}
|
|
678934
|
+
});
|
|
678935
|
+
DropdownComponent2 = new Autonomous2.Component({
|
|
678936
|
+
type: "leaf",
|
|
678937
|
+
aliases: ["dropdown", "select", "combo"],
|
|
678938
|
+
name: "Dropdown",
|
|
678939
|
+
description: `Present a dropdown menu to the user with multiple options.
|
|
678940
|
+
The user can select one of the provided options from the dropdown, and the selection will be sent back to the system for further processing.
|
|
678941
|
+
Unlike the Choice component, the Dropdown component is typically used when there are more options to choose from, providing a more compact UI.
|
|
678942
|
+
The dropdown can include up to 100 options for the user to choose from.
|
|
678943
|
+
Values for each option should be unique identifiers that can be used to identify the user's selection.`,
|
|
678944
|
+
examples: [
|
|
678945
|
+
{
|
|
678946
|
+
name: " Basic Dropdown Message",
|
|
678947
|
+
description: "Presents a simple dropdown message to the user",
|
|
678948
|
+
code: `
|
|
678949
|
+
yield <Message>
|
|
678950
|
+
Please select a fruit from the dropdown:
|
|
678951
|
+
<Dropdown
|
|
678952
|
+
text="Choose an option:"
|
|
678953
|
+
options={[
|
|
678954
|
+
{ label: "\uD83C\uDF50 Pear", value: "pear" },
|
|
678955
|
+
{ label: "\uD83C\uDF4E Apple", value: "apple" },
|
|
678956
|
+
{ label: "\uD83C\uDF4C Banana", value: "banana" }
|
|
678957
|
+
]}
|
|
678958
|
+
/>
|
|
678959
|
+
</Message>`
|
|
678960
|
+
}
|
|
678961
|
+
],
|
|
678962
|
+
leaf: {
|
|
678963
|
+
props: X2.object({
|
|
678964
|
+
text: X2.string().describe("The prompt text for the dropdown."),
|
|
678965
|
+
options: X2.array(X2.object({
|
|
678966
|
+
label: X2.string().describe("The label of the option to be displayed to the user."),
|
|
678967
|
+
value: X2.string().describe("The value of the option to be sent back when selected.")
|
|
678968
|
+
})).describe("The list of options to present in the dropdown.")
|
|
678969
|
+
})
|
|
678970
|
+
}
|
|
678971
|
+
});
|
|
678972
|
+
CarouselComponent2 = new Autonomous2.Component({
|
|
678973
|
+
type: "leaf",
|
|
678974
|
+
aliases: ["carousel", "cards", "card"],
|
|
678975
|
+
name: "Carousel",
|
|
678976
|
+
description: `Send a carousel of cards to the user, allowing them to browse through multiple items.
|
|
678977
|
+
Carousels are useful for displaying a collection of related items in a compact and interactive format.
|
|
678978
|
+
It is also possible to send a single card using the Carousel component, useful for sending a combination of image, text, and actions in one message such as a receipt or product detail.
|
|
678979
|
+
Each item in the carousel is represented as a card, which can include an image, title, subtitle, and actions.
|
|
678980
|
+
Users can navigate through the carousel by swiping or clicking on navigation controls.
|
|
678981
|
+
You can include multiple cards in the carousel, each with its own set of actions. A carousel can contain between 1 and 10 items (cards).`,
|
|
678982
|
+
examples: [
|
|
678983
|
+
{
|
|
678984
|
+
name: " Basic Carousel Message",
|
|
678985
|
+
description: "Sends a simple carousel message to the user",
|
|
678986
|
+
code: `
|
|
678987
|
+
yield <Message>
|
|
678988
|
+
Here is an **exciting** carousel for you!
|
|
678989
|
+
<Carousel
|
|
678990
|
+
items={[
|
|
678991
|
+
{
|
|
678992
|
+
title: "Product 1",
|
|
678993
|
+
subtitle: "Description of Product 1",
|
|
678994
|
+
imageUrl: "https://example.com/path/to/image1.jpg",
|
|
678995
|
+
actions: [
|
|
678996
|
+
{ action: "postback", label: "Buy Now", value: "buy_product_1" },
|
|
678997
|
+
{ action: "url", label: "View Details", value: "https://example.com/product_1" }
|
|
678998
|
+
]
|
|
678999
|
+
},
|
|
679000
|
+
{
|
|
679001
|
+
title: "Product 2",
|
|
679002
|
+
subtitle: "Description of Product 2",
|
|
679003
|
+
imageUrl: "https://example.com/path/to/image2.jpg",
|
|
679004
|
+
actions: [
|
|
679005
|
+
{ action: "postback", label: "Buy Now", value: "buy_product_2" },
|
|
679006
|
+
{ action: "url", label: "View Details", value: "https://example.com/product_2" }
|
|
679007
|
+
]
|
|
679008
|
+
}
|
|
679009
|
+
]}
|
|
679010
|
+
/>
|
|
679011
|
+
</Message>`
|
|
679012
|
+
}
|
|
679013
|
+
],
|
|
679014
|
+
leaf: {
|
|
679015
|
+
props: X2.object({
|
|
679016
|
+
items: X2.array(X2.object({
|
|
679017
|
+
title: X2.string().describe("The title of the carousel item."),
|
|
679018
|
+
subtitle: X2.string().optional().describe("The subtitle of the carousel item."),
|
|
679019
|
+
imageUrl: X2.string().url().optional().describe("The URL of the image to be displayed on the carousel item."),
|
|
679020
|
+
actions: X2.array(X2.object({
|
|
679021
|
+
action: X2.enum(["postback", "url", "say"]).describe("The type of action for the button."),
|
|
679022
|
+
label: X2.string().describe("The label of the button to be displayed to the user."),
|
|
679023
|
+
value: X2.string().describe("The value associated with the button action.")
|
|
679024
|
+
})).max(3).describe("The list of actions (buttons) to include on the carousel item.")
|
|
679025
|
+
})).describe("The list of items (cards) to include in the carousel.")
|
|
679026
|
+
})
|
|
679027
|
+
}
|
|
679028
|
+
});
|
|
679029
|
+
init_define_BUILD2();
|
|
679030
|
+
init_define_PACKAGE_VERSIONS2();
|
|
678527
679031
|
init_define_BUILD2();
|
|
678528
679032
|
init_define_PACKAGE_VERSIONS2();
|
|
678529
679033
|
AttachmentSchema2 = X2.object({
|
|
@@ -682886,7 +683390,7 @@ class AgentProjectGenerator {
|
|
|
682886
683390
|
deploy: "adk deploy"
|
|
682887
683391
|
},
|
|
682888
683392
|
dependencies: {
|
|
682889
|
-
"@botpress/runtime": "^1.8.
|
|
683393
|
+
"@botpress/runtime": "^1.8.2"
|
|
682890
683394
|
},
|
|
682891
683395
|
devDependencies: {
|
|
682892
683396
|
typescript: "^5.9.3"
|
|
@@ -686794,7 +687298,7 @@ var import_ts_morph, __defProp10, __commonJS6 = (cb5, mod) => () => (mod || cb5(
|
|
|
686794
687298
|
`));
|
|
686795
687299
|
return code;
|
|
686796
687300
|
}
|
|
686797
|
-
}, ADK_VERSION = "1.8.
|
|
687301
|
+
}, ADK_VERSION = "1.8.2", relative2 = (from, to3) => {
|
|
686798
687302
|
const fromDir = path102.dirname(from);
|
|
686799
687303
|
const relative32 = path102.relative(fromDir, to3);
|
|
686800
687304
|
return relative32.startsWith(".") ? relative32 : `./${relative32}`;
|
|
@@ -687008,7 +687512,7 @@ var init_dist17 = __esm(() => {
|
|
|
687008
687512
|
require_package3 = __commonJS6((exports2, module) => {
|
|
687009
687513
|
module.exports = {
|
|
687010
687514
|
name: "@botpress/adk",
|
|
687011
|
-
version: "1.8.
|
|
687515
|
+
version: "1.8.2",
|
|
687012
687516
|
description: "Core ADK library for building AI agents on Botpress",
|
|
687013
687517
|
type: "module",
|
|
687014
687518
|
main: "dist/index.js",
|
|
@@ -687055,7 +687559,7 @@ var init_dist17 = __esm(() => {
|
|
|
687055
687559
|
"@botpress/cli": "^4.23",
|
|
687056
687560
|
"@botpress/client": "^1.27.2",
|
|
687057
687561
|
"@botpress/cognitive": "^0.2.0",
|
|
687058
|
-
"@botpress/runtime": "^1.8.
|
|
687562
|
+
"@botpress/runtime": "^1.8.2",
|
|
687059
687563
|
"@botpress/sdk": "^4.18.1",
|
|
687060
687564
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
687061
687565
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -693591,7 +694095,7 @@ var init_Separator = __esm(async () => {
|
|
|
693591
694095
|
var require_package4 = __commonJS((exports2, module) => {
|
|
693592
694096
|
module.exports = {
|
|
693593
694097
|
name: "@botpress/adk",
|
|
693594
|
-
version: "1.8.
|
|
694098
|
+
version: "1.8.2",
|
|
693595
694099
|
description: "Core ADK library for building AI agents on Botpress",
|
|
693596
694100
|
type: "module",
|
|
693597
694101
|
main: "dist/index.js",
|
|
@@ -693638,7 +694142,7 @@ var require_package4 = __commonJS((exports2, module) => {
|
|
|
693638
694142
|
"@botpress/cli": "^4.23",
|
|
693639
694143
|
"@botpress/client": "^1.27.2",
|
|
693640
694144
|
"@botpress/cognitive": "^0.2.0",
|
|
693641
|
-
"@botpress/runtime": "^1.8.
|
|
694145
|
+
"@botpress/runtime": "^1.8.2",
|
|
693642
694146
|
"@botpress/sdk": "^4.18.1",
|
|
693643
694147
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
693644
694148
|
"@parcel/watcher": "^2.5.1",
|
|
@@ -695159,7 +695663,7 @@ function checkRuntimeVersion(agentRoot) {
|
|
|
695159
695663
|
`));
|
|
695160
695664
|
}
|
|
695161
695665
|
}
|
|
695162
|
-
var semver2, EXPECTED_RUNTIME_VERSION = "1.8.
|
|
695666
|
+
var semver2, EXPECTED_RUNTIME_VERSION = "1.8.2";
|
|
695163
695667
|
var init_runtime_version_check = __esm(() => {
|
|
695164
695668
|
init_source();
|
|
695165
695669
|
semver2 = __toESM(require_semver2(), 1);
|
|
@@ -711252,7 +711756,7 @@ if (!checkNodeVersion(true)) {
|
|
|
711252
711756
|
checkNodeVersion(false);
|
|
711253
711757
|
process.exit(1);
|
|
711254
711758
|
}
|
|
711255
|
-
var CLI_VERSION = "1.8.
|
|
711759
|
+
var CLI_VERSION = "1.8.2";
|
|
711256
711760
|
if (CLI_VERSION.startsWith("<<") && CLI_VERSION.endsWith(">>")) {
|
|
711257
711761
|
try {
|
|
711258
711762
|
const __filename2 = fileURLToPath12(import.meta.url);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/adk-cli",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "Command-line interface for the Botpress Agent Development Kit (ADK)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"url": "https://github.com/botpress/adk"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@botpress/adk": "^1.8.
|
|
43
|
+
"@botpress/adk": "^1.8.2",
|
|
44
44
|
"@botpress/cli": "^4.23",
|
|
45
|
-
"@botpress/runtime": "^1.8.
|
|
45
|
+
"@botpress/runtime": "^1.8.2",
|
|
46
46
|
"adm-zip": "^0.5.16",
|
|
47
47
|
"chalk": "^5.4.1",
|
|
48
48
|
"clipboardy": "^4.0.0",
|