@botpress/runtime 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.
@@ -1,7 +1,8 @@
1
- import { Chat, DefaultComponents, RenderedComponent } from 'llmz';
1
+ import { Chat, RenderedComponent } from 'llmz';
2
2
  import { TranscriptItem } from './transcript';
3
3
  import { AnyIncomingEvent, AnyIncomingMessage } from '@botpress/sdk/dist/bot';
4
4
  import { BotContext } from '../context/context';
5
+ import { DefaultComponents } from './components';
5
6
  export type Msg = {
6
7
  type: string;
7
8
  payload: Record<string, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/runtime/chat/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAkB,iBAAiB,EAAc,MAAM,MAAM,CAAA;AAE7F,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAG7C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAS7E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/C,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAA;AAElF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAEnF,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAC3B,C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}
486
+ export declare const BUILT_IN_INTEGRATIONS: readonly ["webchat", "slack", "teams", "telegram", "whatsapp"];
487
+ export declare const DefaultComponents: {
488
+ Audio: import("llmz").Component<{
489
+ type: "leaf";
490
+ aliases: never[];
491
+ name: string;
492
+ description: string;
493
+ examples: {
494
+ name: string;
495
+ description: string;
496
+ code: string;
497
+ }[];
498
+ leaf: {
499
+ props: any;
500
+ };
501
+ }>;
502
+ Image: import("llmz").Component<{
503
+ type: "leaf";
504
+ aliases: string[];
505
+ name: string;
506
+ description: string;
507
+ examples: {
508
+ name: string;
509
+ description: string;
510
+ code: string;
511
+ }[];
512
+ leaf: {
513
+ props: any;
514
+ };
515
+ }>;
516
+ Video: import("llmz").Component<{
517
+ type: "leaf";
518
+ aliases: never[];
519
+ name: string;
520
+ description: string;
521
+ examples: {
522
+ name: string;
523
+ description: string;
524
+ code: string;
525
+ }[];
526
+ leaf: {
527
+ props: any;
528
+ };
529
+ }>;
530
+ Location: import("llmz").Component<{
531
+ type: "leaf";
532
+ aliases: never[];
533
+ name: string;
534
+ description: string;
535
+ examples: {
536
+ name: string;
537
+ description: string;
538
+ code: string;
539
+ }[];
540
+ leaf: {
541
+ props: any;
542
+ };
543
+ }>;
544
+ Choice: import("llmz").Component<{
545
+ type: "leaf";
546
+ aliases: string[];
547
+ name: string;
548
+ description: string;
549
+ examples: {
550
+ name: string;
551
+ description: string;
552
+ code: string;
553
+ }[];
554
+ leaf: {
555
+ props: any;
556
+ };
557
+ }>;
558
+ Dropdown: import("llmz").Component<{
559
+ type: "leaf";
560
+ aliases: string[];
561
+ name: string;
562
+ description: string;
563
+ examples: {
564
+ name: string;
565
+ description: string;
566
+ code: string;
567
+ }[];
568
+ leaf: {
569
+ props: any;
570
+ };
571
+ }>;
572
+ Carousel: import("llmz").Component<{
573
+ type: "leaf";
574
+ aliases: string[];
575
+ name: string;
576
+ description: string;
577
+ examples: {
578
+ name: string;
579
+ description: string;
580
+ code: string;
581
+ }[];
582
+ leaf: {
583
+ props: any;
584
+ };
585
+ }>;
586
+ };
486
587
  export {};
487
588
  //# sourceMappingURL=components.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/runtime/chat/components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAY,CAAC,EAAE,MAAM,eAAe,CAAA;AAG3C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA6Di6C,CAAC;oBAA8C,CAAC;;;;;;;;oBAA4Q,CAAC;oBAA8C,CAAC;;;;;;;;;;oBAA+T,CAAC;oBAA8C,CAAC;;;;;;;;;;oBAA8S,CAAC;oBAA8C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAklO,CAAC;;;qBAAyG,CAAC;;;;;;qBAA2L,CAAC;;;;;;qBAAiL,CAAC;;;;;;;;;;;;qBAAisB,CAAC;uBAAiD,CAAC;;;;qBAAiJ,CAAC;uBAAiD,CAAC;;;;;;;qBAAuO,CAAC;uBAAiD,CAAC;;;;;;;qBAA6N,CAAC;uBAAiD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA83B,CAAC;;;;;;;qBAA8N,CAAC;uBAAiD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAA42B,CAAC;;;;;;;qBAA8N,CAAC;uBAAiD,CAAC;;;;CAjDjub,CAAA;AAEpD,KAAK,eAAe,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO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CAAC,CAAA;QAClD,KAAY,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAA;QAC9C,KAAY,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,CAAA;KACnD;CACF;AA0QD,eAAO,MAAM,qBAAqB,gEAAiE,CAAA;AACnG,eAAO,MAAM,iBAAiB;;;;;;;;;;;;mBAtPpB,GAAG;;;;;;;;;;;;;;mBAuBH,GAAG;;;;;;;;;;;;;;mBAuBH,GAAG;;;;;;;;;;;;;;mBAyCH,GAAG;;;;;;;;;;;;;;mBAyCH,GAAG;;;;;;;;;;;;;;mBA0CH,GAAG;;;;;;;;;;;;;;mBAuEH,GAAG;;;CAaZ,CAAA"}
package/dist/runtime.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.8.1", adk: "1.8.1", sdk: "4.19.0", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
51
+ 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" };
52
52
  }
53
53
  });
54
54
 
@@ -27678,11 +27678,11 @@ function expand_(str, isTop) {
27678
27678
  if (pad) {
27679
27679
  const need = width - c.length;
27680
27680
  if (need > 0) {
27681
- const z26 = new Array(need + 1).join("0");
27681
+ const z27 = new Array(need + 1).join("0");
27682
27682
  if (i < 0) {
27683
- c = "-" + z26 + c.slice(1);
27683
+ c = "-" + z27 + c.slice(1);
27684
27684
  } else {
27685
- c = z26 + c;
27685
+ c = z27 + c;
27686
27686
  }
27687
27687
  }
27688
27688
  }
@@ -45514,7 +45514,7 @@ init_define_PACKAGE_VERSIONS();
45514
45514
  // src/runtime/chat/chat.ts
45515
45515
  init_define_BUILD();
45516
45516
  init_define_PACKAGE_VERSIONS();
45517
- import { Chat, DefaultComponents, isAnyComponent as isAnyComponent2 } from "llmz";
45517
+ import { Chat, isAnyComponent as isAnyComponent2 } from "llmz";
45518
45518
 
45519
45519
  // src/runtime/chat/truncate-transcript.ts
45520
45520
  init_define_BUILD();
@@ -45979,6 +45979,278 @@ var Config = {
45979
45979
  Analysis
45980
45980
  };
45981
45981
 
45982
+ // src/runtime/chat/components.ts
45983
+ init_define_BUILD();
45984
+ init_define_PACKAGE_VERSIONS();
45985
+ import { messages, z as z24 } from "@botpress/sdk";
45986
+ var DefaultMessageTypes = {
45987
+ text: messages.defaults["text"].schema,
45988
+ audio: messages.defaults["audio"].schema,
45989
+ card: messages.defaults["card"].schema,
45990
+ image: messages.defaults["image"].schema,
45991
+ carousel: messages.defaults["carousel"].schema,
45992
+ choice: messages.defaults["choice"].schema,
45993
+ dropdown: messages.defaults["dropdown"].schema,
45994
+ file: messages.defaults["file"].schema,
45995
+ location: messages.defaults["location"].schema,
45996
+ video: messages.defaults["video"].schema,
45997
+ bloc: messages.defaults["bloc"].schema
45998
+ };
45999
+ var AudioComponent = new Autonomous.Component({
46000
+ type: "leaf",
46001
+ aliases: [],
46002
+ name: "Audio",
46003
+ 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.`,
46004
+ examples: [
46005
+ {
46006
+ name: " Basic Audio Message",
46007
+ description: "Sends a simple audio message to the user",
46008
+ code: `
46009
+ yield <Message>
46010
+ Here's an **awesome** audio clip for you!
46011
+ <Audio audioUrl="https://example.com/path/to/audio.mp3" />
46012
+ </Message>`
46013
+ }
46014
+ ],
46015
+ leaf: {
46016
+ props: z24.object({
46017
+ audioUrl: z24.string().url().describe("The URL of the audio file to be sent.")
46018
+ })
46019
+ }
46020
+ });
46021
+ var ImageComponent = new Autonomous.Component({
46022
+ type: "leaf",
46023
+ aliases: ["img"],
46024
+ name: "Image",
46025
+ 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.`,
46026
+ examples: [
46027
+ {
46028
+ name: " Basic Image Message",
46029
+ description: "Sends a simple image message to the user",
46030
+ code: `
46031
+ yield <Message>
46032
+ Here's an **awesome** image for you!
46033
+ <Image imageUrl="https://example.com/path/to/image.jpg" />
46034
+ </Message>`
46035
+ }
46036
+ ],
46037
+ leaf: {
46038
+ props: z24.object({
46039
+ imageUrl: z24.string().url().describe("The URL of the image to be sent.")
46040
+ })
46041
+ }
46042
+ });
46043
+ var VideoComponent = new Autonomous.Component({
46044
+ type: "leaf",
46045
+ aliases: [],
46046
+ name: "Video",
46047
+ 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.`,
46048
+ examples: [
46049
+ {
46050
+ name: " Basic Video Message",
46051
+ description: "Sends a simple video message to the user",
46052
+ code: `
46053
+ yield <Message>
46054
+ Here's an **awesome** video for you!
46055
+ <Video videoUrl="https://example.com/path/to/video.mp4" />
46056
+ </Message>`
46057
+ }
46058
+ ],
46059
+ leaf: {
46060
+ props: z24.object({
46061
+ videoUrl: z24.string().url().describe("The URL of the video to be sent.")
46062
+ })
46063
+ }
46064
+ });
46065
+ var LocationComponent = new Autonomous.Component({
46066
+ type: "leaf",
46067
+ aliases: [],
46068
+ name: "Location",
46069
+ 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.
46070
+ The location can also optionally include an address and a title for better context.`,
46071
+ examples: [
46072
+ {
46073
+ name: " Basic Location Message",
46074
+ description: "Sends a simple location message to the user",
46075
+ code: `
46076
+ yield <Message>
46077
+ Here's the location you requested!
46078
+ <Location latitude={37.7749} longitude={-122.4194} />
46079
+ </Message>`
46080
+ },
46081
+ {
46082
+ name: " Location Message with Address and Title",
46083
+ description: "Sends a location message with additional address and title information",
46084
+ code: `
46085
+ yield <Message>
46086
+ Here's the location of our office!
46087
+ <Location
46088
+ latitude={45.506342}
46089
+ longitude={-73.572012}
46090
+ address="400 Blvd. De Maisonneuve Ouest #200, Montreal, Quebec H3A 1L4, Canada"
46091
+ title="Botpress HQ"
46092
+ />
46093
+ </Message>`
46094
+ }
46095
+ ],
46096
+ leaf: {
46097
+ props: z24.object({
46098
+ latitude: z24.number().describe("The latitude of the location to be sent."),
46099
+ longitude: z24.number().describe("The longitude of the location to be sent."),
46100
+ address: z24.string().optional().describe("The address of the location to be sent."),
46101
+ title: z24.string().optional().describe("The title of the location to be sent.")
46102
+ })
46103
+ }
46104
+ });
46105
+ var ChoiceComponent = new Autonomous.Component({
46106
+ type: "leaf",
46107
+ aliases: ["choices", "option", "options", "buttons"],
46108
+ name: "Choice",
46109
+ description: `Present a choice to the user with multiple options.
46110
+ The user can select one of the provided options, and the selection will be sent back to the system for further processing.
46111
+ You can include up to 10 options for the user to choose from.
46112
+ Values for each option should be unique identifiers that can be used to identify the user's selection.`,
46113
+ examples: [
46114
+ {
46115
+ name: " Basic Choice Message",
46116
+ description: "Presents a simple choice message to the user",
46117
+ code: `
46118
+ yield <Message>
46119
+ Please choose one of the following options:
46120
+ <Choice
46121
+ text="Select an option:"
46122
+ options={[
46123
+ { label: "Option 1", value: "option_1" },
46124
+ { label: "Option 2", value: "option_2" },
46125
+ { label: "Option 3", value: "option_3" }
46126
+ ]}
46127
+ />
46128
+ </Message>`
46129
+ }
46130
+ ],
46131
+ leaf: {
46132
+ props: z24.object({
46133
+ text: z24.string().describe("The prompt text for the choice."),
46134
+ options: z24.array(
46135
+ z24.object({
46136
+ label: z24.string().describe("The label of the option to be displayed to the user."),
46137
+ value: z24.string().describe("The value of the option to be sent back when selected.")
46138
+ })
46139
+ ).describe("The list of options to present to the user.")
46140
+ })
46141
+ }
46142
+ });
46143
+ var DropdownComponent = new Autonomous.Component({
46144
+ type: "leaf",
46145
+ aliases: ["dropdown", "select", "combo"],
46146
+ name: "Dropdown",
46147
+ description: `Present a dropdown menu to the user with multiple options.
46148
+ 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.
46149
+ Unlike the Choice component, the Dropdown component is typically used when there are more options to choose from, providing a more compact UI.
46150
+ The dropdown can include up to 100 options for the user to choose from.
46151
+ Values for each option should be unique identifiers that can be used to identify the user's selection.`,
46152
+ examples: [
46153
+ {
46154
+ name: " Basic Dropdown Message",
46155
+ description: "Presents a simple dropdown message to the user",
46156
+ code: `
46157
+ yield <Message>
46158
+ Please select a fruit from the dropdown:
46159
+ <Dropdown
46160
+ text="Choose an option:"
46161
+ options={[
46162
+ { label: "\u{1F350} Pear", value: "pear" },
46163
+ { label: "\u{1F34E} Apple", value: "apple" },
46164
+ { label: "\u{1F34C} Banana", value: "banana" }
46165
+ ]}
46166
+ />
46167
+ </Message>`
46168
+ }
46169
+ ],
46170
+ leaf: {
46171
+ props: z24.object({
46172
+ text: z24.string().describe("The prompt text for the dropdown."),
46173
+ options: z24.array(
46174
+ z24.object({
46175
+ label: z24.string().describe("The label of the option to be displayed to the user."),
46176
+ value: z24.string().describe("The value of the option to be sent back when selected.")
46177
+ })
46178
+ ).describe("The list of options to present in the dropdown.")
46179
+ })
46180
+ }
46181
+ });
46182
+ var CarouselComponent = new Autonomous.Component({
46183
+ type: "leaf",
46184
+ aliases: ["carousel", "cards", "card"],
46185
+ name: "Carousel",
46186
+ description: `Send a carousel of cards to the user, allowing them to browse through multiple items.
46187
+ Carousels are useful for displaying a collection of related items in a compact and interactive format.
46188
+ 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.
46189
+ Each item in the carousel is represented as a card, which can include an image, title, subtitle, and actions.
46190
+ Users can navigate through the carousel by swiping or clicking on navigation controls.
46191
+ 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).`,
46192
+ examples: [
46193
+ {
46194
+ name: " Basic Carousel Message",
46195
+ description: "Sends a simple carousel message to the user",
46196
+ code: `
46197
+ yield <Message>
46198
+ Here is an **exciting** carousel for you!
46199
+ <Carousel
46200
+ items={[
46201
+ {
46202
+ title: "Product 1",
46203
+ subtitle: "Description of Product 1",
46204
+ imageUrl: "https://example.com/path/to/image1.jpg",
46205
+ actions: [
46206
+ { action: "postback", label: "Buy Now", value: "buy_product_1" },
46207
+ { action: "url", label: "View Details", value: "https://example.com/product_1" }
46208
+ ]
46209
+ },
46210
+ {
46211
+ title: "Product 2",
46212
+ subtitle: "Description of Product 2",
46213
+ imageUrl: "https://example.com/path/to/image2.jpg",
46214
+ actions: [
46215
+ { action: "postback", label: "Buy Now", value: "buy_product_2" },
46216
+ { action: "url", label: "View Details", value: "https://example.com/product_2" }
46217
+ ]
46218
+ }
46219
+ ]}
46220
+ />
46221
+ </Message>`
46222
+ }
46223
+ ],
46224
+ leaf: {
46225
+ props: z24.object({
46226
+ items: z24.array(
46227
+ z24.object({
46228
+ title: z24.string().describe("The title of the carousel item."),
46229
+ subtitle: z24.string().optional().describe("The subtitle of the carousel item."),
46230
+ imageUrl: z24.string().url().optional().describe("The URL of the image to be displayed on the carousel item."),
46231
+ actions: z24.array(
46232
+ z24.object({
46233
+ action: z24.enum(["postback", "url", "say"]).describe("The type of action for the button."),
46234
+ label: z24.string().describe("The label of the button to be displayed to the user."),
46235
+ value: z24.string().describe("The value associated with the button action.")
46236
+ })
46237
+ ).max(3).describe("The list of actions (buttons) to include on the carousel item.")
46238
+ })
46239
+ ).describe("The list of items (cards) to include in the carousel.")
46240
+ })
46241
+ }
46242
+ });
46243
+ var BUILT_IN_INTEGRATIONS = ["webchat", "slack", "teams", "telegram", "whatsapp"];
46244
+ var DefaultComponents = {
46245
+ Audio: AudioComponent,
46246
+ Image: ImageComponent,
46247
+ Video: VideoComponent,
46248
+ Location: LocationComponent,
46249
+ Choice: ChoiceComponent,
46250
+ Dropdown: DropdownComponent,
46251
+ Carousel: CarouselComponent
46252
+ };
46253
+
45982
46254
  // src/runtime/chat/chat.ts
45983
46255
  var BotpressChat = class extends Chat {
45984
46256
  _transcript;
@@ -45999,12 +46271,15 @@ var BotpressChat = class extends Chat {
45999
46271
  this.botId = context3.botId;
46000
46272
  this.logger = context3.logger;
46001
46273
  this.citations = context3.citations;
46002
- this.registerComponent({ component: DefaultComponents.Text });
46003
- this.registerComponent({ component: DefaultComponents.Image });
46004
- this.registerComponent({ component: DefaultComponents.File });
46005
- this.registerComponent({ component: DefaultComponents.Audio });
46006
- this.registerComponent({ component: DefaultComponents.Video });
46007
- this.registerComponent({ component: DefaultComponents.Card });
46274
+ if (BUILT_IN_INTEGRATIONS.includes(this.conversation.integration)) {
46275
+ this.registerComponent({ component: DefaultComponents.Audio });
46276
+ this.registerComponent({ component: DefaultComponents.Image });
46277
+ this.registerComponent({ component: DefaultComponents.Video });
46278
+ this.registerComponent({ component: DefaultComponents.Carousel });
46279
+ this.registerComponent({ component: DefaultComponents.Choice });
46280
+ this.registerComponent({ component: DefaultComponents.Dropdown });
46281
+ this.registerComponent({ component: DefaultComponents.Location });
46282
+ }
46008
46283
  }
46009
46284
  /**
46010
46285
  * Register a component with an optional handler
@@ -46364,21 +46639,21 @@ ${footer}`.trim();
46364
46639
  // src/runtime/chat/transcript.ts
46365
46640
  init_define_BUILD();
46366
46641
  init_define_PACKAGE_VERSIONS();
46367
- import { z as z24 } from "@botpress/sdk";
46368
- var AttachmentSchema = z24.object({
46369
- type: z24.literal("image"),
46370
- url: z24.string()
46371
- });
46372
- var TranscriptItemSchema = z24.object({
46373
- id: z24.string(),
46374
- role: z24.union([z24.literal("assistant"), z24.literal("user"), z24.literal("event"), z24.literal("summary")]),
46375
- name: z24.string().optional(),
46376
- createdAt: z24.string().optional(),
46377
- content: z24.string().optional(),
46378
- attachments: z24.array(AttachmentSchema).optional(),
46379
- payload: z24.unknown().optional()
46380
- });
46381
- var TranscriptSchema = z24.array(TranscriptItemSchema);
46642
+ import { z as z25 } from "@botpress/sdk";
46643
+ var AttachmentSchema = z25.object({
46644
+ type: z25.literal("image"),
46645
+ url: z25.string()
46646
+ });
46647
+ var TranscriptItemSchema = z25.object({
46648
+ id: z25.string(),
46649
+ role: z25.union([z25.literal("assistant"), z25.literal("user"), z25.literal("event"), z25.literal("summary")]),
46650
+ name: z25.string().optional(),
46651
+ createdAt: z25.string().optional(),
46652
+ content: z25.string().optional(),
46653
+ attachments: z25.array(AttachmentSchema).optional(),
46654
+ payload: z25.unknown().optional()
46655
+ });
46656
+ var TranscriptSchema = z25.array(TranscriptItemSchema);
46382
46657
 
46383
46658
  // src/runtime/handlers/index.ts
46384
46659
  init_define_BUILD();
@@ -47725,7 +48000,7 @@ function installStructuredLogging() {
47725
48000
 
47726
48001
  // src/runtime.ts
47727
48002
  init_trigger_tags();
47728
- import { z as z25 } from "@botpress/sdk";
48003
+ import { z as z26 } from "@botpress/sdk";
47729
48004
  if (Environment.isDevelopment()) {
47730
48005
  installStructuredLogging();
47731
48006
  }
@@ -47767,7 +48042,7 @@ export {
47767
48042
  shutdownPromiseTracker,
47768
48043
  trackPromise,
47769
48044
  user,
47770
- z25 as z
48045
+ z26 as z
47771
48046
  };
47772
48047
  /*! Bundled license information:
47773
48048