llmz 0.0.4 → 0.0.5

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 (35) hide show
  1. package/dist/chat.d.ts +17 -0
  2. package/dist/chunk-3U57H7GT.js +608 -0
  3. package/dist/{chunk-LVKZYKTP.cjs → chunk-4I7UPBLN.cjs} +2 -2
  4. package/dist/{chunk-W6U2VXSF.cjs → chunk-6WT5VZBG.cjs} +348 -12
  5. package/dist/{chunk-JK2LZW2G.cjs → chunk-EJRCDWBA.cjs} +45 -6
  6. package/dist/{chunk-ZCPQ3QOW.js → chunk-HP7RKM25.js} +45 -6
  7. package/dist/chunk-MU4LFVY7.cjs +608 -0
  8. package/dist/{chunk-S6WICIDW.js → chunk-S6FOL2HY.js} +2 -2
  9. package/dist/{chunk-TJQVC4CE.js → chunk-WLUVY5QU.js} +341 -5
  10. package/dist/{component-LQDU72LX.js → component-R2Y74VUI.js} +3 -1
  11. package/dist/component-TSNW3SC7.cjs +16 -0
  12. package/dist/component.d.ts +6 -19
  13. package/dist/component.default.d.ts +131 -151
  14. package/dist/context.d.ts +6 -5
  15. package/dist/{dual-modes-YE4S2AIL.cjs → dual-modes-UHNDHNIF.cjs} +3 -4
  16. package/dist/{dual-modes-QHBOFWHM.js → dual-modes-ZUQKPJFH.js} +2 -3
  17. package/dist/{exit-IDKGZD7M.cjs → exit-KJ4COC5N.cjs} +2 -2
  18. package/dist/{exit-F6ZUL2NV.js → exit-OIYZLBVJ.js} +1 -1
  19. package/dist/exit.d.ts +5 -1
  20. package/dist/getter.d.ts +1 -1
  21. package/dist/index.cjs +72 -127
  22. package/dist/index.d.ts +7 -5
  23. package/dist/index.js +67 -122
  24. package/dist/llmz-VDA4M42R.cjs +604 -0
  25. package/dist/llmz-YE5N54IU.js +604 -0
  26. package/dist/llmz.d.ts +6 -9
  27. package/dist/types.d.ts +2 -0
  28. package/package.json +1 -1
  29. package/dist/chunk-4KB5WXHR.js +0 -92
  30. package/dist/chunk-6YWYCVAB.cjs +0 -92
  31. package/dist/chunk-EFGXTO64.js +0 -344
  32. package/dist/chunk-VAF2H6UD.cjs +0 -344
  33. package/dist/component-HQ5YQNRX.cjs +0 -14
  34. package/dist/llmz-AS5TGCQS.js +0 -1108
  35. package/dist/llmz-R6XZG3JQ.cjs +0 -1108
package/dist/index.cjs CHANGED
@@ -1,7 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
2
2
 
3
- var _chunk6YWYCVABcjs = require('./chunk-6YWYCVAB.cjs');
4
- require('./chunk-VAF2H6UD.cjs');
3
+
4
+
5
+
6
+ var _chunkMU4LFVY7cjs = require('./chunk-MU4LFVY7.cjs');
7
+ require('./chunk-6WT5VZBG.cjs');
5
8
 
6
9
 
7
10
  var _chunk4QTK5ALHcjs = require('./chunk-4QTK5ALH.cjs');
@@ -17,13 +20,15 @@ var _chunkJDABP4SDcjs = require('./chunk-JDABP4SD.cjs');
17
20
  require('./chunk-IKSIOIIP.cjs');
18
21
 
19
22
 
20
- var _chunkLVKZYKTPcjs = require('./chunk-LVKZYKTP.cjs');
23
+ var _chunk4I7UPBLNcjs = require('./chunk-4I7UPBLN.cjs');
24
+
21
25
 
22
26
 
23
27
 
24
28
 
25
- var _chunkJK2LZW2Gcjs = require('./chunk-JK2LZW2G.cjs');
29
+ var _chunkEJRCDWBAcjs = require('./chunk-EJRCDWBA.cjs');
26
30
  require('./chunk-KMZDFWYZ.cjs');
31
+ require('./chunk-FIVFS4HG.cjs');
27
32
 
28
33
 
29
34
 
@@ -636,7 +641,8 @@ var CitationsManager = (_class = class {constructor() { _class.prototype.__init.
636
641
  }, _class);
637
642
 
638
643
  // src/component.default.ts
639
- var Button = new (0, _chunkJK2LZW2Gcjs.Component)({
644
+
645
+ var Button = new (0, _chunkEJRCDWBAcjs.Component)({
640
646
  type: "leaf",
641
647
  description: "A button component that can perform actions when clicked",
642
648
  name: "Button",
@@ -658,36 +664,15 @@ var Button = new (0, _chunkJK2LZW2Gcjs.Component)({
658
664
  }
659
665
  ],
660
666
  leaf: {
661
- props: [
662
- {
663
- name: "action",
664
- type: "string",
665
- default: "say",
666
- description: 'The action to perform when the button is clicked. Can be "say", "url", or "postback"',
667
- required: true
668
- },
669
- {
670
- name: "label",
671
- type: "string",
672
- description: "The text displayed on the button",
673
- required: true
674
- },
675
- {
676
- name: "value",
677
- type: "string",
678
- description: 'The postback value to send when the button is clicked. Required if action is "postback"',
679
- required: false
680
- },
681
- {
682
- name: "url",
683
- type: "string",
684
- description: 'The URL to open when the button is clicked. Required if action is "url"',
685
- required: false
686
- }
687
- ]
667
+ props: _zui.z.object({
668
+ action: _zui.z.enum(["say", "url", "postback"]).default("say").describe('The action to perform when the button is clicked. Can be "say", "url", or "postback"'),
669
+ label: _zui.z.string().describe("The text displayed on the button"),
670
+ value: _zui.z.string().optional().describe('The postback value to send when the button is clicked. Required if action is "postback"'),
671
+ url: _zui.z.string().optional().describe('The URL to open when the button is clicked. Required if action is "url"')
672
+ })
688
673
  }
689
674
  });
690
- var Image = new (0, _chunkJK2LZW2Gcjs.Component)({
675
+ var Image = new (0, _chunkEJRCDWBAcjs.Component)({
691
676
  type: "leaf",
692
677
  name: "Image",
693
678
  description: "Displays an image from a URL.",
@@ -702,23 +687,13 @@ var Image = new (0, _chunkJK2LZW2Gcjs.Component)({
702
687
  }
703
688
  ],
704
689
  leaf: {
705
- props: [
706
- {
707
- name: "url",
708
- type: "string",
709
- description: "The URL of the image (must be valid)",
710
- required: true
711
- },
712
- {
713
- name: "alt",
714
- type: "string",
715
- description: "Alternative text describing the image",
716
- required: false
717
- }
718
- ]
690
+ props: _zui.z.object({
691
+ url: _zui.z.string().describe("The URL of the image (must be valid)"),
692
+ alt: _zui.z.string().optional().describe("Alternative text describing the image")
693
+ })
719
694
  }
720
695
  });
721
- var File = new (0, _chunkJK2LZW2Gcjs.Component)({
696
+ var File = new (0, _chunkEJRCDWBAcjs.Component)({
722
697
  type: "leaf",
723
698
  name: "File",
724
699
  description: "Sends a downloadable file to the user.",
@@ -733,23 +708,13 @@ var File = new (0, _chunkJK2LZW2Gcjs.Component)({
733
708
  }
734
709
  ],
735
710
  leaf: {
736
- props: [
737
- {
738
- name: "url",
739
- type: "string",
740
- description: "The URL of the file (must be valid)",
741
- required: true
742
- },
743
- {
744
- name: "name",
745
- type: "string",
746
- description: "The display name of the file",
747
- required: false
748
- }
749
- ]
711
+ props: _zui.z.object({
712
+ url: _zui.z.string().describe("The URL of the file (must be valid)"),
713
+ name: _zui.z.string().optional().describe("The display name of the file")
714
+ })
750
715
  }
751
716
  });
752
- var Video = new (0, _chunkJK2LZW2Gcjs.Component)({
717
+ var Video = new (0, _chunkEJRCDWBAcjs.Component)({
753
718
  type: "leaf",
754
719
  name: "Video",
755
720
  description: "Embeds a video from a URL.",
@@ -764,23 +729,13 @@ var Video = new (0, _chunkJK2LZW2Gcjs.Component)({
764
729
  }
765
730
  ],
766
731
  leaf: {
767
- props: [
768
- {
769
- name: "url",
770
- type: "string",
771
- description: "The URL of the video (must be valid)",
772
- required: true
773
- },
774
- {
775
- name: "title",
776
- type: "string",
777
- description: "Title for the video",
778
- required: false
779
- }
780
- ]
732
+ props: _zui.z.object({
733
+ url: _zui.z.string().describe("The URL of the video (must be valid)"),
734
+ title: _zui.z.string().optional().describe("Title for the video")
735
+ })
781
736
  }
782
737
  });
783
- var Audio = new (0, _chunkJK2LZW2Gcjs.Component)({
738
+ var Audio = new (0, _chunkEJRCDWBAcjs.Component)({
784
739
  type: "leaf",
785
740
  name: "Audio",
786
741
  description: "Plays an audio clip from a URL.",
@@ -795,23 +750,13 @@ var Audio = new (0, _chunkJK2LZW2Gcjs.Component)({
795
750
  }
796
751
  ],
797
752
  leaf: {
798
- props: [
799
- {
800
- name: "url",
801
- type: "string",
802
- description: "The URL of the audio clip (must be valid)",
803
- required: true
804
- },
805
- {
806
- name: "title",
807
- type: "string",
808
- description: "Title for the audio clip",
809
- required: false
810
- }
811
- ]
753
+ props: _zui.z.object({
754
+ url: _zui.z.string().describe("The URL of the audio clip (must be valid)"),
755
+ title: _zui.z.string().optional().describe("Title for the audio clip")
756
+ })
812
757
  }
813
758
  });
814
- var Card = new (0, _chunkJK2LZW2Gcjs.Component)({
759
+ var Card = new (0, _chunkEJRCDWBAcjs.Component)({
815
760
  type: "container",
816
761
  name: "Card",
817
762
  description: "A visual card component that can include an image and buttons.",
@@ -830,20 +775,10 @@ var Card = new (0, _chunkJK2LZW2Gcjs.Component)({
830
775
  }
831
776
  ],
832
777
  container: {
833
- props: [
834
- {
835
- name: "title",
836
- type: "string",
837
- description: "Title text (1\u2013250 characters)",
838
- required: true
839
- },
840
- {
841
- name: "subtitle",
842
- type: "string",
843
- description: "Optional subtitle for the card",
844
- required: false
845
- }
846
- ],
778
+ props: _zui.z.object({
779
+ title: _zui.z.string().min(1).max(250).describe("Title text (1\u2013250 characters)"),
780
+ subtitle: _zui.z.string().optional().describe("Optional subtitle for the card")
781
+ }),
847
782
  children: [
848
783
  {
849
784
  description: "Image (optional, max 1)",
@@ -856,7 +791,7 @@ var Card = new (0, _chunkJK2LZW2Gcjs.Component)({
856
791
  ]
857
792
  }
858
793
  });
859
- var Carousel = new (0, _chunkJK2LZW2Gcjs.Component)({
794
+ var Carousel = new (0, _chunkEJRCDWBAcjs.Component)({
860
795
  type: "container",
861
796
  name: "Carousel",
862
797
  description: "A virtual container for displaying 1 to 10 Card components as a carousel.",
@@ -880,7 +815,7 @@ var Carousel = new (0, _chunkJK2LZW2Gcjs.Component)({
880
815
  }
881
816
  ],
882
817
  container: {
883
- props: [],
818
+ props: _zui.z.object({}),
884
819
  children: [
885
820
  {
886
821
  description: "Card component (required, 1\u201310 allowed)",
@@ -889,7 +824,7 @@ var Carousel = new (0, _chunkJK2LZW2Gcjs.Component)({
889
824
  ]
890
825
  }
891
826
  });
892
- var Text = new (0, _chunkJK2LZW2Gcjs.Component)({
827
+ var Text = new (0, _chunkEJRCDWBAcjs.Component)({
893
828
  type: "default",
894
829
  name: "Message",
895
830
  aliases: ["Text", "Markdown"],
@@ -904,18 +839,10 @@ var Text = new (0, _chunkJK2LZW2Gcjs.Component)({
904
839
  }
905
840
  ],
906
841
  default: {
907
- props: [],
842
+ props: _zui.z.object({}),
908
843
  children: []
909
844
  }
910
845
  });
911
- var messageTool = (handler) => new (0, _chunk4QTK5ALHcjs.Tool)({
912
- name: "Message",
913
- metadata: {
914
- system: true,
915
- description: "Sends a message with components like Button, Image, File, Video, Audio, Card, Carousel, and Text."
916
- },
917
- handler: async (args) => await handler(args)
918
- });
919
846
  var DefaultComponents = {
920
847
  Button,
921
848
  Image,
@@ -927,22 +854,36 @@ var DefaultComponents = {
927
854
  Text
928
855
  };
929
856
 
857
+ // src/chat.ts
858
+ var Chat = class {
859
+
860
+
861
+
862
+ constructor(props) {
863
+ this.handler = props.handler;
864
+ this.components = props.components;
865
+ this.transcript = props.transcript || [];
866
+ }
867
+ onExecutionDone(_result) {
868
+ }
869
+ };
870
+
930
871
  // src/index.ts
931
- var executeContext = async (props) => {
932
- const { executeContext: executeContext2 } = (await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-R6XZG3JQ.cjs")))).llmz;
933
- return executeContext2(props);
872
+ var execute = async (props) => {
873
+ const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-VDA4M42R.cjs")));
874
+ return executeContext(props);
934
875
  };
935
876
  var init = async () => {
936
- await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-R6XZG3JQ.cjs")));
937
- await Promise.resolve().then(() => _interopRequireWildcard(require("./component-HQ5YQNRX.cjs")));
877
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-VDA4M42R.cjs")));
878
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./component-TSNW3SC7.cjs")));
938
879
  await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-SWJYOR2Z.cjs")));
939
- await Promise.resolve().then(() => _interopRequireWildcard(require("./exit-IDKGZD7M.cjs")));
880
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./exit-KJ4COC5N.cjs")));
940
881
  await Promise.resolve().then(() => _interopRequireWildcard(require("./jsx-AJAXBWFE.cjs")));
941
882
  await Promise.resolve().then(() => _interopRequireWildcard(require("./vm-GJ5R72AP.cjs")));
942
883
  await Promise.resolve().then(() => _interopRequireWildcard(require("./utils-QC4I2L6R.cjs")));
943
884
  await Promise.resolve().then(() => _interopRequireWildcard(require("./truncator-NYN7BGKJ.cjs")));
944
885
  await Promise.resolve().then(() => _interopRequireWildcard(require("./typings-XR6CYHW4.cjs")));
945
- await Promise.resolve().then(() => _interopRequireWildcard(require("./dual-modes-YE4S2AIL.cjs")));
886
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./dual-modes-UHNDHNIF.cjs")));
946
887
  };
947
888
 
948
889
 
@@ -959,4 +900,8 @@ var init = async () => {
959
900
 
960
901
 
961
902
 
962
- exports.CitationsManager = CitationsManager; exports.Component = _chunkJK2LZW2Gcjs.Component; exports.DefaultComponents = DefaultComponents; exports.Exit = _chunkLVKZYKTPcjs.Exit; exports.ObjectInstance = ObjectInstance; exports.Snapshot = _chunk6YWYCVABcjs.Snapshot; exports.SnapshotSignal = _chunkJDABP4SDcjs.SnapshotSignal; exports.ThinkSignal = _chunkJDABP4SDcjs.ThinkSignal; exports.Tool = _chunk4QTK5ALHcjs.Tool; exports.assertValidComponent = _chunkJK2LZW2Gcjs.assertValidComponent; exports.executeContext = executeContext; exports.init = init; exports.isComponent = _chunkJK2LZW2Gcjs.isComponent; exports.messageTool = messageTool;
903
+
904
+
905
+
906
+
907
+ exports.Chat = Chat; exports.CitationsManager = CitationsManager; exports.Component = _chunkEJRCDWBAcjs.Component; exports.DefaultComponents = DefaultComponents; exports.Exit = _chunk4I7UPBLNcjs.Exit; exports.ListenExit = _chunkMU4LFVY7cjs.ListenExit; exports.ObjectInstance = ObjectInstance; exports.Snapshot = _chunkMU4LFVY7cjs.Snapshot; exports.SnapshotSignal = _chunkJDABP4SDcjs.SnapshotSignal; exports.ThinkExit = _chunkMU4LFVY7cjs.ThinkExit; exports.ThinkSignal = _chunkJDABP4SDcjs.ThinkSignal; exports.Tool = _chunk4QTK5ALHcjs.Tool; exports.assertValidComponent = _chunkEJRCDWBAcjs.assertValidComponent; exports.execute = execute; exports.getValue = _chunkMU4LFVY7cjs.getValue; exports.init = init; exports.isAnyComponent = _chunkEJRCDWBAcjs.isAnyComponent; exports.isComponent = _chunkEJRCDWBAcjs.isComponent;
package/dist/index.d.ts CHANGED
@@ -1,16 +1,18 @@
1
1
  export { Tool } from './tool.js';
2
- export { Exit } from './exit.js';
2
+ export { Exit, ExitResult } from './exit.js';
3
3
  export { ObjectInstance } from './objects.js';
4
4
  export { SnapshotSignal, ThinkSignal } from './errors.js';
5
- export { Component, RenderedComponent, LeafComponentDefinition, ContainerComponentDefinition, DefaultComponentDefinition, ComponentDefinition, assertValidComponent, isComponent, } from './component.js';
5
+ export { Component, RenderedComponent, LeafComponentDefinition, ContainerComponentDefinition, DefaultComponentDefinition, ComponentDefinition, assertValidComponent, isComponent, isAnyComponent, } from './component.js';
6
6
  export { Citation, CitationsManager } from './citations.js';
7
- export { DefaultComponents, messageTool } from './component.default.js';
7
+ export { DefaultComponents } from './component.default.js';
8
8
  export { Snapshot } from './snapshots.js';
9
+ export { Chat, type MessageHandler } from './chat.js';
9
10
  import { type ExecutionProps } from './llmz.js';
10
11
  import { type ExecutionResult } from './types.js';
11
12
  export { type ExecutionResult, Trace } from './types.js';
12
- export type { Iteration } from './context.js';
13
- export declare const executeContext: (props: ExecutionProps) => Promise<ExecutionResult>;
13
+ export { type Iteration, ListenExit, ThinkExit, IterationStatuses, IterationStatus } from './context.js';
14
+ export { type ValueOrGetter, getValue } from './getter.js';
15
+ export declare const execute: (props: ExecutionProps) => Promise<ExecutionResult>;
14
16
  /**
15
17
  * Loads the necessary dependencies for the library to work
16
18
  * Calling this function is optional, but it will improve the performance of the first call to `executeContext`
package/dist/index.js CHANGED
@@ -1,7 +1,10 @@
1
1
  import {
2
- Snapshot
3
- } from "./chunk-4KB5WXHR.js";
4
- import "./chunk-EFGXTO64.js";
2
+ ListenExit,
3
+ Snapshot,
4
+ ThinkExit,
5
+ getValue
6
+ } from "./chunk-3U57H7GT.js";
7
+ import "./chunk-WLUVY5QU.js";
5
8
  import {
6
9
  Tool
7
10
  } from "./chunk-QBXIE6EY.js";
@@ -17,13 +20,15 @@ import {
17
20
  import "./chunk-JQBT7UWN.js";
18
21
  import {
19
22
  Exit
20
- } from "./chunk-S6WICIDW.js";
23
+ } from "./chunk-S6FOL2HY.js";
21
24
  import {
22
25
  Component,
23
26
  assertValidComponent,
27
+ isAnyComponent,
24
28
  isComponent
25
- } from "./chunk-ZCPQ3QOW.js";
29
+ } from "./chunk-HP7RKM25.js";
26
30
  import "./chunk-ORQP26SZ.js";
31
+ import "./chunk-QT4QF3YA.js";
27
32
  import {
28
33
  escapeString,
29
34
  getMultilineComment,
@@ -636,6 +641,7 @@ var CitationsManager = class {
636
641
  };
637
642
 
638
643
  // src/component.default.ts
644
+ import { z as z2 } from "@bpinternal/zui";
639
645
  var Button = new Component({
640
646
  type: "leaf",
641
647
  description: "A button component that can perform actions when clicked",
@@ -658,33 +664,12 @@ var Button = new Component({
658
664
  }
659
665
  ],
660
666
  leaf: {
661
- props: [
662
- {
663
- name: "action",
664
- type: "string",
665
- default: "say",
666
- description: 'The action to perform when the button is clicked. Can be "say", "url", or "postback"',
667
- required: true
668
- },
669
- {
670
- name: "label",
671
- type: "string",
672
- description: "The text displayed on the button",
673
- required: true
674
- },
675
- {
676
- name: "value",
677
- type: "string",
678
- description: 'The postback value to send when the button is clicked. Required if action is "postback"',
679
- required: false
680
- },
681
- {
682
- name: "url",
683
- type: "string",
684
- description: 'The URL to open when the button is clicked. Required if action is "url"',
685
- required: false
686
- }
687
- ]
667
+ props: z2.object({
668
+ action: z2.enum(["say", "url", "postback"]).default("say").describe('The action to perform when the button is clicked. Can be "say", "url", or "postback"'),
669
+ label: z2.string().describe("The text displayed on the button"),
670
+ value: z2.string().optional().describe('The postback value to send when the button is clicked. Required if action is "postback"'),
671
+ url: z2.string().optional().describe('The URL to open when the button is clicked. Required if action is "url"')
672
+ })
688
673
  }
689
674
  });
690
675
  var Image = new Component({
@@ -702,20 +687,10 @@ var Image = new Component({
702
687
  }
703
688
  ],
704
689
  leaf: {
705
- props: [
706
- {
707
- name: "url",
708
- type: "string",
709
- description: "The URL of the image (must be valid)",
710
- required: true
711
- },
712
- {
713
- name: "alt",
714
- type: "string",
715
- description: "Alternative text describing the image",
716
- required: false
717
- }
718
- ]
690
+ props: z2.object({
691
+ url: z2.string().describe("The URL of the image (must be valid)"),
692
+ alt: z2.string().optional().describe("Alternative text describing the image")
693
+ })
719
694
  }
720
695
  });
721
696
  var File = new Component({
@@ -733,20 +708,10 @@ var File = new Component({
733
708
  }
734
709
  ],
735
710
  leaf: {
736
- props: [
737
- {
738
- name: "url",
739
- type: "string",
740
- description: "The URL of the file (must be valid)",
741
- required: true
742
- },
743
- {
744
- name: "name",
745
- type: "string",
746
- description: "The display name of the file",
747
- required: false
748
- }
749
- ]
711
+ props: z2.object({
712
+ url: z2.string().describe("The URL of the file (must be valid)"),
713
+ name: z2.string().optional().describe("The display name of the file")
714
+ })
750
715
  }
751
716
  });
752
717
  var Video = new Component({
@@ -764,20 +729,10 @@ var Video = new Component({
764
729
  }
765
730
  ],
766
731
  leaf: {
767
- props: [
768
- {
769
- name: "url",
770
- type: "string",
771
- description: "The URL of the video (must be valid)",
772
- required: true
773
- },
774
- {
775
- name: "title",
776
- type: "string",
777
- description: "Title for the video",
778
- required: false
779
- }
780
- ]
732
+ props: z2.object({
733
+ url: z2.string().describe("The URL of the video (must be valid)"),
734
+ title: z2.string().optional().describe("Title for the video")
735
+ })
781
736
  }
782
737
  });
783
738
  var Audio = new Component({
@@ -795,20 +750,10 @@ var Audio = new Component({
795
750
  }
796
751
  ],
797
752
  leaf: {
798
- props: [
799
- {
800
- name: "url",
801
- type: "string",
802
- description: "The URL of the audio clip (must be valid)",
803
- required: true
804
- },
805
- {
806
- name: "title",
807
- type: "string",
808
- description: "Title for the audio clip",
809
- required: false
810
- }
811
- ]
753
+ props: z2.object({
754
+ url: z2.string().describe("The URL of the audio clip (must be valid)"),
755
+ title: z2.string().optional().describe("Title for the audio clip")
756
+ })
812
757
  }
813
758
  });
814
759
  var Card = new Component({
@@ -830,20 +775,10 @@ var Card = new Component({
830
775
  }
831
776
  ],
832
777
  container: {
833
- props: [
834
- {
835
- name: "title",
836
- type: "string",
837
- description: "Title text (1\u2013250 characters)",
838
- required: true
839
- },
840
- {
841
- name: "subtitle",
842
- type: "string",
843
- description: "Optional subtitle for the card",
844
- required: false
845
- }
846
- ],
778
+ props: z2.object({
779
+ title: z2.string().min(1).max(250).describe("Title text (1\u2013250 characters)"),
780
+ subtitle: z2.string().optional().describe("Optional subtitle for the card")
781
+ }),
847
782
  children: [
848
783
  {
849
784
  description: "Image (optional, max 1)",
@@ -880,7 +815,7 @@ var Carousel = new Component({
880
815
  }
881
816
  ],
882
817
  container: {
883
- props: [],
818
+ props: z2.object({}),
884
819
  children: [
885
820
  {
886
821
  description: "Card component (required, 1\u201310 allowed)",
@@ -904,18 +839,10 @@ var Text = new Component({
904
839
  }
905
840
  ],
906
841
  default: {
907
- props: [],
842
+ props: z2.object({}),
908
843
  children: []
909
844
  }
910
845
  });
911
- var messageTool = (handler) => new Tool({
912
- name: "Message",
913
- metadata: {
914
- system: true,
915
- description: "Sends a message with components like Button, Image, File, Video, Audio, Card, Carousel, and Text."
916
- },
917
- handler: async (args) => await handler(args)
918
- });
919
846
  var DefaultComponents = {
920
847
  Button,
921
848
  Image,
@@ -927,36 +854,54 @@ var DefaultComponents = {
927
854
  Text
928
855
  };
929
856
 
857
+ // src/chat.ts
858
+ var Chat = class {
859
+ handler;
860
+ transcript;
861
+ components;
862
+ constructor(props) {
863
+ this.handler = props.handler;
864
+ this.components = props.components;
865
+ this.transcript = props.transcript || [];
866
+ }
867
+ onExecutionDone(_result) {
868
+ }
869
+ };
870
+
930
871
  // src/index.ts
931
- var executeContext = async (props) => {
932
- const { executeContext: executeContext2 } = (await import("./llmz-AS5TGCQS.js")).llmz;
933
- return executeContext2(props);
872
+ var execute = async (props) => {
873
+ const { executeContext } = await import("./llmz-YE5N54IU.js");
874
+ return executeContext(props);
934
875
  };
935
876
  var init = async () => {
936
- await import("./llmz-AS5TGCQS.js");
937
- await import("./component-LQDU72LX.js");
877
+ await import("./llmz-YE5N54IU.js");
878
+ await import("./component-R2Y74VUI.js");
938
879
  await import("./tool-LY77IWV2.js");
939
- await import("./exit-F6ZUL2NV.js");
880
+ await import("./exit-OIYZLBVJ.js");
940
881
  await import("./jsx-AEHVFB3L.js");
941
882
  await import("./vm-ZUQOSRRM.js");
942
883
  await import("./utils-L5GLCS3C.js");
943
884
  await import("./truncator-WAL2GCUY.js");
944
885
  await import("./typings-AIV2OASX.js");
945
- await import("./dual-modes-QHBOFWHM.js");
886
+ await import("./dual-modes-ZUQKPJFH.js");
946
887
  };
947
888
  export {
889
+ Chat,
948
890
  CitationsManager,
949
891
  Component,
950
892
  DefaultComponents,
951
893
  Exit,
894
+ ListenExit,
952
895
  ObjectInstance,
953
896
  Snapshot,
954
897
  SnapshotSignal,
898
+ ThinkExit,
955
899
  ThinkSignal,
956
900
  Tool,
957
901
  assertValidComponent,
958
- executeContext,
902
+ execute,
903
+ getValue,
959
904
  init,
960
- isComponent,
961
- messageTool
905
+ isAnyComponent,
906
+ isComponent
962
907
  };