@botpress/adk-cli 1.8.1 → 1.8.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +547 -64
  2. package/package.json +4 -4
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 z26 = new Array(need + 1).join("0");
349373
+ const z27 = new Array(need + 1).join("0");
349374
349374
  if (i2 < 0) {
349375
- c5 = "-" + z26 + c5.slice(1);
349375
+ c5 = "-" + z27 + c5.slice(1);
349376
349376
  } else {
349377
- c5 = z26 + 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.1", adk: "1.8.1", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
355536
+ define_PACKAGE_VERSIONS_default = { runtime: "1.8.3", adk: "1.8.3", 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 z26 = new Array(need + 1).join("0");
637493
+ const z27 = new Array(need + 1).join("0");
637242
637494
  if (i2 < 0) {
637243
- c5 = "-" + z26 + c5.slice(1);
637495
+ c5 = "-" + z27 + c5.slice(1);
637244
637496
  } else {
637245
- c5 = z26 + 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.1", adk: "1.8.1", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
643077
+ define_PACKAGE_VERSIONS_default2 = { runtime: "1.8.3", adk: "1.8.3", 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({
@@ -679766,7 +680270,6 @@ import { existsSync as existsSync32 } from "fs";
679766
680270
  import path27 from "path";
679767
680271
  import fs14 from "fs/promises";
679768
680272
  import { existsSync as existsSync42 } from "fs";
679769
- import { spawn as spawn2 } from "child_process";
679770
680273
  import crypto42 from "crypto";
679771
680274
  import path31 from "path";
679772
680275
  import fs16 from "fs/promises";
@@ -682886,7 +683389,7 @@ class AgentProjectGenerator {
682886
683389
  deploy: "adk deploy"
682887
683390
  },
682888
683391
  dependencies: {
682889
- "@botpress/runtime": "^1.8.1"
683392
+ "@botpress/runtime": "^1.8.3"
682890
683393
  },
682891
683394
  devDependencies: {
682892
683395
  typescript: "^5.9.3"
@@ -684013,7 +684516,7 @@ class IntegrationSync {
684013
684516
  throw new Error('No workspace ID found. Please login with "adk login"');
684014
684517
  }
684015
684518
  const command = new BpAddCommand({
684016
- integration: integration.fullVersion,
684519
+ resource: `integration:${integration.fullVersion}`,
684017
684520
  botPath: this.botProjectPath,
684018
684521
  workspaceId,
684019
684522
  credentials
@@ -684119,47 +684622,27 @@ class InterfaceSync {
684119
684622
  if (!workspaceId) {
684120
684623
  throw new Error('No workspace ID found. Please login with "adk login"');
684121
684624
  }
684122
- const bpCli = await getBpCli(this.projectPath);
684123
- const bpPath = bpCli.path;
684124
684625
  return new Promise((resolve3, reject) => {
684125
- const args = [
684126
- "add",
684127
- `interface:${interfaceInfo.fullVersion}`,
684128
- "-y",
684129
- "--installPath",
684130
- this.botProjectPath,
684131
- "--token",
684132
- credentials.token,
684133
- "--workspaceId",
684626
+ const command = new BpAddCommand({
684627
+ resource: `interface:${interfaceInfo.fullVersion}`,
684628
+ botPath: this.botProjectPath,
684134
684629
  workspaceId,
684135
- "--apiUrl",
684136
- credentials.apiUrl
684137
- ];
684138
- const isJsFile = bpPath.endsWith(".js");
684139
- const command = isJsFile ? "node" : bpPath;
684140
- const commandArgs = isJsFile ? [bpPath, ...args] : args;
684141
- const child = spawn2(command, commandArgs, {
684142
- cwd: this.projectPath,
684143
- stdio: "pipe"
684144
- });
684145
- let stdout = "";
684146
- let stderr = "";
684147
- child.stdout?.on("data", (data) => {
684148
- stdout += data.toString();
684630
+ credentials: {
684631
+ token: credentials.token,
684632
+ apiUrl: credentials.apiUrl
684633
+ }
684149
684634
  });
684150
- child.stderr?.on("data", (data) => {
684151
- stderr += data.toString();
684635
+ let stderr = "";
684636
+ command.on("stderr", (data) => {
684637
+ stderr += data;
684152
684638
  });
684153
- child.on("close", (code) => {
684154
- if (code === 0) {
684155
- resolve3();
684156
- } else {
684157
- reject(new Error(`Failed to install interface ${interfaceInfo.fullVersion}: ${stderr || stdout}`));
684158
- }
684639
+ command.on("error", (error) => {
684640
+ reject(new Error(`Failed to install interface ${interfaceInfo.fullVersion}: ${error.stderr || error.message}`));
684159
684641
  });
684160
- child.on("error", (error) => {
684161
- reject(new Error(`Failed to spawn bp command: ${error.message}`));
684642
+ command.on("done", () => {
684643
+ resolve3();
684162
684644
  });
684645
+ command.run().catch(reject);
684163
684646
  });
684164
684647
  }
684165
684648
  async renameInterfaceFolder(interfaceInfo) {
@@ -686794,7 +687277,7 @@ var import_ts_morph, __defProp10, __commonJS6 = (cb5, mod) => () => (mod || cb5(
686794
687277
  `));
686795
687278
  return code;
686796
687279
  }
686797
- }, ADK_VERSION = "1.8.1", relative2 = (from, to3) => {
687280
+ }, ADK_VERSION = "1.8.3", relative2 = (from, to3) => {
686798
687281
  const fromDir = path102.dirname(from);
686799
687282
  const relative32 = path102.relative(fromDir, to3);
686800
687283
  return relative32.startsWith(".") ? relative32 : `./${relative32}`;
@@ -687008,7 +687491,7 @@ var init_dist17 = __esm(() => {
687008
687491
  require_package3 = __commonJS6((exports2, module) => {
687009
687492
  module.exports = {
687010
687493
  name: "@botpress/adk",
687011
- version: "1.8.1",
687494
+ version: "1.8.3",
687012
687495
  description: "Core ADK library for building AI agents on Botpress",
687013
687496
  type: "module",
687014
687497
  main: "dist/index.js",
@@ -687052,10 +687535,10 @@ var init_dist17 = __esm(() => {
687052
687535
  url: "https://github.com/botpress/adk"
687053
687536
  },
687054
687537
  dependencies: {
687055
- "@botpress/cli": "^4.23",
687538
+ "@botpress/cli": "^4.27.3",
687056
687539
  "@botpress/client": "^1.27.2",
687057
687540
  "@botpress/cognitive": "^0.2.0",
687058
- "@botpress/runtime": "^1.8.1",
687541
+ "@botpress/runtime": "^1.8.3",
687059
687542
  "@botpress/sdk": "^4.18.1",
687060
687543
  "@bpinternal/yargs-extra": "^0.0.21",
687061
687544
  "@parcel/watcher": "^2.5.1",
@@ -687096,11 +687579,11 @@ var init_dist17 = __esm(() => {
687096
687579
  this.options = options;
687097
687580
  }
687098
687581
  async run() {
687099
- const { integration, botPath, workspaceId, credentials } = this.options;
687582
+ const { resource: resource3, botPath, workspaceId, credentials } = this.options;
687100
687583
  const { path: bpCommand } = await getBpCli(botPath);
687101
687584
  const args = [
687102
687585
  "add",
687103
- `integration:${integration}`,
687586
+ resource3,
687104
687587
  "-y",
687105
687588
  "--installPath",
687106
687589
  botPath,
@@ -693591,7 +694074,7 @@ var init_Separator = __esm(async () => {
693591
694074
  var require_package4 = __commonJS((exports2, module) => {
693592
694075
  module.exports = {
693593
694076
  name: "@botpress/adk",
693594
- version: "1.8.1",
694077
+ version: "1.8.3",
693595
694078
  description: "Core ADK library for building AI agents on Botpress",
693596
694079
  type: "module",
693597
694080
  main: "dist/index.js",
@@ -693635,10 +694118,10 @@ var require_package4 = __commonJS((exports2, module) => {
693635
694118
  url: "https://github.com/botpress/adk"
693636
694119
  },
693637
694120
  dependencies: {
693638
- "@botpress/cli": "^4.23",
694121
+ "@botpress/cli": "^4.27.3",
693639
694122
  "@botpress/client": "^1.27.2",
693640
694123
  "@botpress/cognitive": "^0.2.0",
693641
- "@botpress/runtime": "^1.8.1",
694124
+ "@botpress/runtime": "^1.8.3",
693642
694125
  "@botpress/sdk": "^4.18.1",
693643
694126
  "@bpinternal/yargs-extra": "^0.0.21",
693644
694127
  "@parcel/watcher": "^2.5.1",
@@ -695159,7 +695642,7 @@ function checkRuntimeVersion(agentRoot) {
695159
695642
  `));
695160
695643
  }
695161
695644
  }
695162
- var semver2, EXPECTED_RUNTIME_VERSION = "1.8.1";
695645
+ var semver2, EXPECTED_RUNTIME_VERSION = "1.8.3";
695163
695646
  var init_runtime_version_check = __esm(() => {
695164
695647
  init_source();
695165
695648
  semver2 = __toESM(require_semver2(), 1);
@@ -699081,13 +699564,13 @@ var init_server = __esm(() => {
699081
699564
  });
699082
699565
 
699083
699566
  // src/utils/node-inspector.ts
699084
- import { spawn as spawn3 } from "child_process";
699567
+ import { spawn as spawn2 } from "child_process";
699085
699568
  import os9 from "os";
699086
699569
  import path44 from "path";
699087
699570
  function openDevtools(url4) {
699088
699571
  const platform4 = os9.platform();
699089
699572
  if (platform4 === "darwin") {
699090
- return spawn3("open", ["-a", "Google Chrome", url4], {
699573
+ return spawn2("open", ["-a", "Google Chrome", url4], {
699091
699574
  detached: true,
699092
699575
  stdio: "ignore"
699093
699576
  }).unref();
@@ -699095,8 +699578,8 @@ function openDevtools(url4) {
699095
699578
  if (platform4 === "win32") {
699096
699579
  const tryStart = (exe) => {
699097
699580
  if (exe)
699098
- return spawn3(exe, [url4], { detached: true, stdio: "ignore" }).unref();
699099
- return spawn3("cmd", ["/c", 'start "" chrome', `"${url4}"`], {
699581
+ return spawn2(exe, [url4], { detached: true, stdio: "ignore" }).unref();
699582
+ return spawn2("cmd", ["/c", 'start "" chrome', `"${url4}"`], {
699100
699583
  detached: true,
699101
699584
  stdio: "ignore"
699102
699585
  }).unref();
@@ -699121,7 +699604,7 @@ function openDevtools(url4) {
699121
699604
  "_",
699122
699605
  url4
699123
699606
  ];
699124
- return spawn3(cmd, args, { detached: true, stdio: "ignore" }).unref();
699607
+ return spawn2(cmd, args, { detached: true, stdio: "ignore" }).unref();
699125
699608
  }
699126
699609
  var init_node_inspector = () => {};
699127
699610
 
@@ -711252,7 +711735,7 @@ if (!checkNodeVersion(true)) {
711252
711735
  checkNodeVersion(false);
711253
711736
  process.exit(1);
711254
711737
  }
711255
- var CLI_VERSION = "1.8.1";
711738
+ var CLI_VERSION = "1.8.3";
711256
711739
  if (CLI_VERSION.startsWith("<<") && CLI_VERSION.endsWith(">>")) {
711257
711740
  try {
711258
711741
  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.1",
3
+ "version": "1.8.3",
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.1",
44
- "@botpress/cli": "^4.23",
45
- "@botpress/runtime": "^1.8.1",
43
+ "@botpress/adk": "^1.8.3",
44
+ "@botpress/cli": "^4.27.3",
45
+ "@botpress/runtime": "^1.8.3",
46
46
  "adm-zip": "^0.5.16",
47
47
  "chalk": "^5.4.1",
48
48
  "clipboardy": "^4.0.0",