llmz 0.0.43 → 0.0.45

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 (57) hide show
  1. package/dist/{chunk-KED57HR5.cjs → chunk-2NEOPXCS.cjs} +14 -14
  2. package/dist/{chunk-WHNOR4ZU.cjs → chunk-4VYDQ3VF.cjs} +7 -7
  3. package/dist/{chunk-KMZDFWYZ.cjs → chunk-54G63644.cjs} +3 -3
  4. package/dist/{chunk-7WRN4E42.js → chunk-5XC6ZMS5.js} +197 -18
  5. package/dist/{chunk-G3LSBWJT.js → chunk-5YXGNMER.js} +2 -2
  6. package/dist/{chunk-TOLKC56V.js → chunk-7HBJXJ6W.js} +6 -6
  7. package/dist/{chunk-VPTFUOIK.js → chunk-E5YW5YQN.js} +2 -2
  8. package/dist/{chunk-ZORRILUV.js → chunk-EKXZXQJB.js} +1 -1
  9. package/dist/{chunk-3G3BS5IA.cjs → chunk-F4OZHUMS.cjs} +9 -9
  10. package/dist/{chunk-GZPN7RGH.cjs → chunk-I3WYQ7CA.cjs} +2 -2
  11. package/dist/{chunk-4NQXHRJ2.cjs → chunk-K4IVNLQG.cjs} +28 -28
  12. package/dist/{chunk-6PIIXJNI.js → chunk-L2ZDZKCB.js} +3 -3
  13. package/dist/{chunk-UQOBUJIQ.cjs → chunk-RKKRSBX3.cjs} +197 -18
  14. package/dist/{chunk-5FWOHMO4.cjs → chunk-RMIS25AA.cjs} +25 -25
  15. package/dist/{chunk-ZEGD4BQJ.cjs → chunk-SJWWH25O.cjs} +59 -42
  16. package/dist/{chunk-RUOMTFUI.cjs → chunk-SZLX27VX.cjs} +18 -18
  17. package/dist/{chunk-QY2TRWGK.cjs → chunk-TLOQBZKW.cjs} +3 -3
  18. package/dist/{chunk-HA52ORZL.js → chunk-UOENUUUV.js} +1 -1
  19. package/dist/{chunk-ORQP26SZ.js → chunk-UOPTKXLE.js} +1 -1
  20. package/dist/{chunk-3JYCCI4S.js → chunk-VWQUGDHE.js} +1 -1
  21. package/dist/{chunk-B42FGPCX.js → chunk-YV5N57D3.js} +1 -1
  22. package/dist/{chunk-V6VEBUMU.js → chunk-ZSZTPETU.js} +24 -7
  23. package/dist/{component-EOMTLA64.js → component-GNYIA77X.js} +3 -3
  24. package/dist/component-J72CVOKY.cjs +18 -0
  25. package/dist/dual-modes-5CQEVSIG.js +12 -0
  26. package/dist/dual-modes-A2JSHXJU.cjs +12 -0
  27. package/dist/exit-56DISPLS.js +8 -0
  28. package/dist/exit-OOGJ3TAS.cjs +8 -0
  29. package/dist/index.cjs +48 -48
  30. package/dist/index.js +21 -21
  31. package/dist/jsx-ENFGHP6S.cjs +13 -0
  32. package/dist/{jsx-AEHVFB3L.js → jsx-PCXQVMLU.js} +2 -2
  33. package/dist/{llmz-O536FBHV.js → llmz-MIV5CZU5.js} +11 -11
  34. package/dist/{llmz-ACSZOYZP.cjs → llmz-TR7SDCOC.cjs} +29 -29
  35. package/dist/tool-5JXTEQNW.js +11 -0
  36. package/dist/tool-NAGC3ZMN.cjs +11 -0
  37. package/dist/truncator-KI6BAAIH.cjs +10 -0
  38. package/dist/{truncator-BSP6PQPC.js → truncator-WDLDMAE7.js} +3 -3
  39. package/dist/typings-SNGR4WYT.cjs +10 -0
  40. package/dist/{typings-AQGJAMVH.js → typings-ZO63Z4TF.js} +3 -3
  41. package/dist/utils-BZUEJT4W.cjs +39 -0
  42. package/dist/{utils-RQHQ2KOG.js → utils-D3J443FA.js} +2 -2
  43. package/dist/{vm-Y3WY2627.js → vm-5IM44JHK.js} +3 -3
  44. package/dist/vm-VYYSPUQ5.cjs +10 -0
  45. package/package.json +3 -3
  46. package/dist/component-AAEMNCHB.cjs +0 -18
  47. package/dist/dual-modes-KBMP2AAH.js +0 -12
  48. package/dist/dual-modes-WCJ3HAB3.cjs +0 -12
  49. package/dist/exit-XAYKJ6TR.cjs +0 -8
  50. package/dist/exit-YLO7BY7Z.js +0 -8
  51. package/dist/jsx-AJAXBWFE.cjs +0 -13
  52. package/dist/tool-M2N7SKNZ.js +0 -11
  53. package/dist/tool-MRVFOE5N.cjs +0 -11
  54. package/dist/truncator-W3NXBLYJ.cjs +0 -10
  55. package/dist/typings-7C2RXO75.cjs +0 -10
  56. package/dist/utils-L5QAQXV2.cjs +0 -39
  57. package/dist/vm-VFORKC54.cjs +0 -10
@@ -10,17 +10,17 @@ var _chunkPK72FAKDcjs = require('./chunk-PK72FAKD.cjs');
10
10
  var _chunkKIN7Y247cjs = require('./chunk-KIN7Y247.cjs');
11
11
 
12
12
 
13
- var _chunkKMZDFWYZcjs = require('./chunk-KMZDFWYZ.cjs');
13
+ var _chunk54G63644cjs = require('./chunk-54G63644.cjs');
14
14
 
15
15
 
16
16
 
17
17
 
18
18
 
19
19
 
20
- var _chunkUQOBUJIQcjs = require('./chunk-UQOBUJIQ.cjs');
20
+ var _chunkRKKRSBX3cjs = require('./chunk-RKKRSBX3.cjs');
21
21
 
22
22
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/base64.js
23
- var require_base64 = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
23
+ var require_base64 = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
24
24
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/base64.js"(exports) {
25
25
  "use strict";
26
26
  var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
@@ -62,7 +62,7 @@ var require_base64 = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
62
62
  });
63
63
 
64
64
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/base64-vlq.js
65
- var require_base64_vlq = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
65
+ var require_base64_vlq = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
66
66
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/base64-vlq.js"(exports) {
67
67
  "use strict";
68
68
  var base64 = require_base64();
@@ -117,7 +117,7 @@ var require_base64_vlq = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
117
117
  });
118
118
 
119
119
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/util.js
120
- var require_util = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
120
+ var require_util = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
121
121
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/util.js"(exports) {
122
122
  "use strict";
123
123
  function getArg(aArgs, aName, aDefaultValue) {
@@ -498,7 +498,7 @@ var require_util = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
498
498
  });
499
499
 
500
500
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/array-set.js
501
- var require_array_set = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
501
+ var require_array_set = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
502
502
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/array-set.js"(exports) {
503
503
  "use strict";
504
504
  var util = require_util();
@@ -569,7 +569,7 @@ var require_array_set = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
569
569
  });
570
570
 
571
571
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/mapping-list.js
572
- var require_mapping_list = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
572
+ var require_mapping_list = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
573
573
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/mapping-list.js"(exports) {
574
574
  "use strict";
575
575
  var util = require_util();
@@ -609,7 +609,7 @@ var require_mapping_list = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
609
609
  });
610
610
 
611
611
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/source-map-generator.js
612
- var require_source_map_generator = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
612
+ var require_source_map_generator = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
613
613
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/source-map-generator.js"(exports) {
614
614
  "use strict";
615
615
  var base64VLQ = require_base64_vlq();
@@ -903,7 +903,7 @@ var require_source_map_generator = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
903
903
  });
904
904
 
905
905
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/binary-search.js
906
- var require_binary_search = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
906
+ var require_binary_search = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
907
907
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/binary-search.js"(exports) {
908
908
  "use strict";
909
909
  exports.GREATEST_LOWER_BOUND = 1;
@@ -960,7 +960,7 @@ var require_binary_search = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
960
960
  });
961
961
 
962
962
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/quick-sort.js
963
- var require_quick_sort = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
963
+ var require_quick_sort = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
964
964
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/quick-sort.js"(exports) {
965
965
  "use strict";
966
966
  function SortTemplate(comparator) {
@@ -1009,7 +1009,7 @@ var require_quick_sort = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
1009
1009
  });
1010
1010
 
1011
1011
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/source-map-consumer.js
1012
- var require_source_map_consumer = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
1012
+ var require_source_map_consumer = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
1013
1013
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/source-map-consumer.js"(exports) {
1014
1014
  "use strict";
1015
1015
  var util = require_util();
@@ -1657,7 +1657,7 @@ var require_source_map_consumer = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
1657
1657
  });
1658
1658
 
1659
1659
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/source-node.js
1660
- var require_source_node = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
1660
+ var require_source_node = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
1661
1661
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/source-node.js"(exports) {
1662
1662
  "use strict";
1663
1663
  var SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
@@ -1924,7 +1924,7 @@ var require_source_node = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
1924
1924
  });
1925
1925
 
1926
1926
  // ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/source-map.js
1927
- var require_source_map = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
1927
+ var require_source_map = _chunkRKKRSBX3cjs.__commonJS.call(void 0, {
1928
1928
  "../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/source-map.js"(exports) {
1929
1929
  "use strict";
1930
1930
  exports.SourceMapGenerator = require_source_map_generator().SourceMapGenerator;
@@ -1934,7 +1934,7 @@ var require_source_map = _chunkUQOBUJIQcjs.__commonJS.call(void 0, {
1934
1934
  });
1935
1935
 
1936
1936
  // src/vm.ts
1937
- var import_source_map_js = _chunkUQOBUJIQcjs.__toESM.call(void 0, require_source_map(), 1);
1937
+ var import_source_map_js = _chunkRKKRSBX3cjs.__toESM.call(void 0, require_source_map(), 1);
1938
1938
  var _quickjsemscriptencore = require('quickjs-emscripten-core');
1939
1939
 
1940
1940
  // src/compiler/compiler.ts
@@ -3012,7 +3012,7 @@ async function runAsyncFunction(context, code, traces = [], signal = null, timeo
3012
3012
  const userCodeLine = Math.max(1, mappedLine - userCodeStartLine);
3013
3013
  lines_executed.set(userCodeLine, (_nullishCoalesce(lines_executed.get(userCodeLine), () => ( 0))) + 1);
3014
3014
  };
3015
- context[Identifiers.JSXFnIdentifier] = (tool, props, ...children) => _chunkKMZDFWYZcjs.createJsxComponent.call(void 0, {
3015
+ context[Identifiers.JSXFnIdentifier] = (tool, props, ...children) => _chunk54G63644cjs.createJsxComponent.call(void 0, {
3016
3016
  type: tool,
3017
3017
  props,
3018
3018
  children
@@ -3557,7 +3557,7 @@ ${transformed.code}
3557
3557
  returnValue = _chunkPK72FAKDcjs.Signals.maybeDeserializeError(returnValue);
3558
3558
  return {
3559
3559
  success: true,
3560
- variables: _chunkUQOBUJIQcjs.mapValues_default.call(void 0, variables, (getter) => _chunkUQOBUJIQcjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3560
+ variables: _chunkRKKRSBX3cjs.mapValues_default.call(void 0, variables, (getter) => _chunkRKKRSBX3cjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3561
3561
  signal: returnValue instanceof _chunkPK72FAKDcjs.VMSignal ? returnValue : void 0,
3562
3562
  lines_executed: Array.from(lines_executed),
3563
3563
  return_value: returnValue
@@ -3633,7 +3633,7 @@ ${transformed.code}
3633
3633
  context[Identifiers.LineTrackingFnIdentifier] = (line) => {
3634
3634
  lines_executed.set(line, (_nullishCoalesce(lines_executed.get(line), () => ( 0))) + 1);
3635
3635
  };
3636
- context[Identifiers.JSXFnIdentifier] = (tool, props, ...children) => _chunkKMZDFWYZcjs.createJsxComponent.call(void 0, {
3636
+ context[Identifiers.JSXFnIdentifier] = (tool, props, ...children) => _chunk54G63644cjs.createJsxComponent.call(void 0, {
3637
3637
  type: tool,
3638
3638
  props,
3639
3639
  children
@@ -3715,7 +3715,7 @@ ${transformed.code}
3715
3715
  res = _chunkPK72FAKDcjs.Signals.maybeDeserializeError(res);
3716
3716
  return {
3717
3717
  success: true,
3718
- variables: _chunkUQOBUJIQcjs.mapValues_default.call(void 0, variables, (getter) => _chunkUQOBUJIQcjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3718
+ variables: _chunkRKKRSBX3cjs.mapValues_default.call(void 0, variables, (getter) => _chunkRKKRSBX3cjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3719
3719
  signal: res instanceof _chunkPK72FAKDcjs.VMSignal ? res : void 0,
3720
3720
  lines_executed: Array.from(lines_executed),
3721
3721
  return_value: res
@@ -3753,7 +3753,7 @@ var handleErrorQuickJS = (err, code, _consumer, traces, variables, lines_execute
3753
3753
  column: whiteSpacesCount
3754
3754
  });
3755
3755
  }
3756
- const lastLine = _nullishCoalesce(((_a = _chunkUQOBUJIQcjs.maxBy_default.call(void 0, matches, (x) => _nullishCoalesce(x.line, () => ( 0)))) == null ? void 0 : _a.line), () => ( 0));
3756
+ const lastLine = _nullishCoalesce(((_a = _chunkRKKRSBX3cjs.maxBy_default.call(void 0, matches, (x) => _nullishCoalesce(x.line, () => ( 0)))) == null ? void 0 : _a.line), () => ( 0));
3757
3757
  let debugUserCode = "";
3758
3758
  let truncatedCode = "";
3759
3759
  let truncated = false;
@@ -3789,11 +3789,11 @@ var handleErrorQuickJS = (err, code, _consumer, traces, variables, lines_execute
3789
3789
  const signalError = err;
3790
3790
  signalError.stack = debugUserCode;
3791
3791
  signalError.truncatedCode = truncatedCode;
3792
- signalError.variables = _chunkUQOBUJIQcjs.mapValues_default.call(void 0, variables, (getter) => _chunkUQOBUJIQcjs.isFunction_default.call(void 0, getter) ? getter() : getter);
3792
+ signalError.variables = _chunkRKKRSBX3cjs.mapValues_default.call(void 0, variables, (getter) => _chunkRKKRSBX3cjs.isFunction_default.call(void 0, getter) ? getter() : getter);
3793
3793
  signalError.toolCall = currentToolCall;
3794
3794
  return {
3795
3795
  success: true,
3796
- variables: _chunkUQOBUJIQcjs.mapValues_default.call(void 0, variables, (getter) => _chunkUQOBUJIQcjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3796
+ variables: _chunkRKKRSBX3cjs.mapValues_default.call(void 0, variables, (getter) => _chunkRKKRSBX3cjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3797
3797
  signal: err,
3798
3798
  lines_executed: Array.from(lines_executed)
3799
3799
  };
@@ -3809,7 +3809,7 @@ var handleErrorQuickJS = (err, code, _consumer, traces, variables, lines_execute
3809
3809
  const deserializedError = _chunkPK72FAKDcjs.Signals.maybeDeserializeError(codeError);
3810
3810
  return {
3811
3811
  success: false,
3812
- variables: _chunkUQOBUJIQcjs.mapValues_default.call(void 0, variables, (getter) => _chunkUQOBUJIQcjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3812
+ variables: _chunkRKKRSBX3cjs.mapValues_default.call(void 0, variables, (getter) => _chunkRKKRSBX3cjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3813
3813
  error: deserializedError,
3814
3814
  traces,
3815
3815
  lines_executed: Array.from(lines_executed)
@@ -3837,7 +3837,7 @@ var handleErrorNode = (err, code, consumer, traces, variables, _lines_executed,
3837
3837
  column: Math.min(minColumn, Number(x[2]))
3838
3838
  };
3839
3839
  });
3840
- const lastLine = _nullishCoalesce(((_a = _chunkUQOBUJIQcjs.maxBy_default.call(void 0, matches, (x) => _nullishCoalesce(x.line, () => ( 0)))) == null ? void 0 : _a.line), () => ( 0));
3840
+ const lastLine = _nullishCoalesce(((_a = _chunkRKKRSBX3cjs.maxBy_default.call(void 0, matches, (x) => _nullishCoalesce(x.line, () => ( 0)))) == null ? void 0 : _a.line), () => ( 0));
3841
3841
  let debugUserCode = "";
3842
3842
  let truncatedCode = "";
3843
3843
  let truncated = false;
@@ -3872,7 +3872,7 @@ var handleErrorNode = (err, code, consumer, traces, variables, _lines_executed,
3872
3872
  if (err instanceof _chunkPK72FAKDcjs.VMSignal) {
3873
3873
  err.stack = debugUserCode;
3874
3874
  err.truncatedCode = truncatedCode;
3875
- err.variables = _chunkUQOBUJIQcjs.mapValues_default.call(void 0, variables, (getter) => _chunkUQOBUJIQcjs.isFunction_default.call(void 0, getter) ? getter() : getter);
3875
+ err.variables = _chunkRKKRSBX3cjs.mapValues_default.call(void 0, variables, (getter) => _chunkRKKRSBX3cjs.isFunction_default.call(void 0, getter) ? getter() : getter);
3876
3876
  err.toolCall = currentToolCall;
3877
3877
  throw err;
3878
3878
  } else {
@@ -3890,7 +3890,7 @@ var handleCatch = (err, traces, variables, lines_executed) => {
3890
3890
  err = _chunkPK72FAKDcjs.Signals.maybeDeserializeError(err);
3891
3891
  return {
3892
3892
  success: err instanceof _chunkPK72FAKDcjs.VMSignal ? true : false,
3893
- variables: _chunkUQOBUJIQcjs.mapValues_default.call(void 0, variables, (getter) => _chunkUQOBUJIQcjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3893
+ variables: _chunkRKKRSBX3cjs.mapValues_default.call(void 0, variables, (getter) => _chunkRKKRSBX3cjs.isFunction_default.call(void 0, getter) ? getter() : getter),
3894
3894
  error: err,
3895
3895
  signal: err instanceof _chunkPK72FAKDcjs.VMSignal ? err : void 0,
3896
3896
  traces,
@@ -3,14 +3,14 @@
3
3
  var _chunkKIN7Y247cjs = require('./chunk-KIN7Y247.cjs');
4
4
 
5
5
 
6
- var _chunkQY2TRWGKcjs = require('./chunk-QY2TRWGK.cjs');
6
+ var _chunkTLOQBZKWcjs = require('./chunk-TLOQBZKW.cjs');
7
7
 
8
8
 
9
- var _chunkGZPN7RGHcjs = require('./chunk-GZPN7RGH.cjs');
9
+ var _chunkI3WYQ7CAcjs = require('./chunk-I3WYQ7CA.cjs');
10
10
 
11
11
 
12
12
 
13
- var _chunkWHNOR4ZUcjs = require('./chunk-WHNOR4ZU.cjs');
13
+ var _chunk4VYDQ3VFcjs = require('./chunk-4VYDQ3VF.cjs');
14
14
 
15
15
 
16
16
 
@@ -23,7 +23,11 @@ var _chunkWHNOR4ZUcjs = require('./chunk-WHNOR4ZU.cjs');
23
23
 
24
24
 
25
25
 
26
- var _chunkUQOBUJIQcjs = require('./chunk-UQOBUJIQ.cjs');
26
+
27
+
28
+
29
+
30
+ var _chunkRKKRSBX3cjs = require('./chunk-RKKRSBX3.cjs');
27
31
 
28
32
  // src/inspect.ts
29
33
  var _bytes = require('bytes'); var _bytes2 = _interopRequireDefault(_bytes);
@@ -53,7 +57,7 @@ function printLimitedJson(obj, maxDepth, maxLength, maxKeys) {
53
57
  }
54
58
  if (typeof currentObj !== "object" || currentObj === null) {
55
59
  const value = JSON.stringify(currentObj);
56
- currentLength += _chunkWHNOR4ZUcjs.getTokenizer.call(void 0, ).count(value);
60
+ currentLength += _chunk4VYDQ3VFcjs.getTokenizer.call(void 0, ).count(value);
57
61
  return value;
58
62
  }
59
63
  const indentation = " ".repeat(currentIndent);
@@ -66,7 +70,7 @@ function printLimitedJson(obj, maxDepth, maxLength, maxKeys) {
66
70
  result += indentation + " ".repeat(indent) + recurse(currentObj[i], depth + 1, currentIndent + indent);
67
71
  }
68
72
  result += "\n" + indentation + "]";
69
- currentLength += _chunkWHNOR4ZUcjs.getTokenizer.call(void 0, ).count(result);
73
+ currentLength += _chunk4VYDQ3VFcjs.getTokenizer.call(void 0, ).count(result);
70
74
  return result;
71
75
  } else {
72
76
  let result = "{\n";
@@ -85,11 +89,11 @@ function printLimitedJson(obj, maxDepth, maxLength, maxKeys) {
85
89
  result += ",\n" + indentation + `... (${numKeys - maxKeys} more keys)`;
86
90
  }
87
91
  result += "\n" + indentation + "}";
88
- currentLength += _chunkWHNOR4ZUcjs.getTokenizer.call(void 0, ).count(result);
92
+ currentLength += _chunk4VYDQ3VFcjs.getTokenizer.call(void 0, ).count(result);
89
93
  return result;
90
94
  }
91
95
  }
92
- const output = _chunkWHNOR4ZUcjs.getTokenizer.call(void 0, ).truncate(recurse(obj, 0, 0), maxLength);
96
+ const output = _chunk4VYDQ3VFcjs.getTokenizer.call(void 0, ).truncate(recurse(obj, 0, 0), maxLength);
93
97
  return { output, truncated: wasTruncated };
94
98
  }
95
99
  function extractType(value, generic = true) {
@@ -154,12 +158,12 @@ function previewValue(value, length = LONG_TEXT_LENGTH) {
154
158
  }
155
159
  const previewStr = (str) => {
156
160
  if (str.length > length) {
157
- return _chunkWHNOR4ZUcjs.escapeString.call(void 0, str.slice(0, length)) + " ... <truncated>";
161
+ return _chunk4VYDQ3VFcjs.escapeString.call(void 0, str.slice(0, length)) + " ... <truncated>";
158
162
  }
159
- return _chunkWHNOR4ZUcjs.escapeString.call(void 0, str);
163
+ return _chunk4VYDQ3VFcjs.escapeString.call(void 0, str);
160
164
  };
161
165
  const previewObj = (obj) => {
162
- const mapped = _chunkUQOBUJIQcjs.mapKeys_default.call(void 0, obj, (_value, key) => previewStr(key));
166
+ const mapped = _chunkRKKRSBX3cjs.mapKeys_default.call(void 0, obj, (_value, key) => previewStr(key));
163
167
  return JSON.stringify(mapped);
164
168
  };
165
169
  if (typeof value === "string") {
@@ -226,16 +230,16 @@ function previewArray(arr) {
226
230
  }
227
231
  lines.push("// Analysis Summary");
228
232
  lines.push(SUBTITLE_LN);
229
- const typesCount = _chunkUQOBUJIQcjs.countBy_default.call(void 0, arr, (item) => extractType(item, false));
230
- const ordered = _chunkUQOBUJIQcjs.orderBy_default.call(void 0,
231
- arr.filter((item) => !_chunkUQOBUJIQcjs.isNil_default.call(void 0, item) && JSON.stringify(item).length < 100),
233
+ const typesCount = _chunkRKKRSBX3cjs.countBy_default.call(void 0, arr, (item) => extractType(item, false));
234
+ const ordered = _chunkRKKRSBX3cjs.orderBy_default.call(void 0,
235
+ arr.filter((item) => !_chunkRKKRSBX3cjs.isNil_default.call(void 0, item) && JSON.stringify(item).length < 100),
232
236
  (item) => JSON.stringify(item),
233
237
  "asc"
234
238
  );
235
239
  const minValues = ordered.slice(0, 3).map((item) => previewValue(item, 10));
236
240
  const maxValues = ordered.slice(-3).map((item) => previewValue(item, 10));
237
- const uniqueItems = _chunkUQOBUJIQcjs.uniqWith_default.call(void 0, arr, _chunkUQOBUJIQcjs.isEqual_default);
238
- const nullValues = _chunkUQOBUJIQcjs.filter_default.call(void 0, arr, _chunkUQOBUJIQcjs.isNil_default).length;
241
+ const uniqueItems = _chunkRKKRSBX3cjs.uniqWith_default.call(void 0, arr, _chunkRKKRSBX3cjs.isEqual_default);
242
+ const nullValues = _chunkRKKRSBX3cjs.filter_default.call(void 0, arr, _chunkRKKRSBX3cjs.isNil_default).length;
239
243
  const memoryUsage = _bytes2.default.call(void 0, JSON.stringify(arr).length);
240
244
  lines.push(`Total Items: ${arr.length}`);
241
245
  lines.push(`Unique Items: ${uniqueItems.length}`);
@@ -260,10 +264,17 @@ function previewObject(obj, options) {
260
264
  lines.push("// Analysis Summary");
261
265
  lines.push(SUBTITLE_LN);
262
266
  const entries = Object.entries(obj);
263
- const typesCount = _chunkUQOBUJIQcjs.chain_default.call(void 0, entries).countBy(([, value]) => extractType(value, false)).entries().orderBy(1, "desc").filter(([, count]) => count > 1).slice(0, 3).fromPairs().value();
267
+ const typesCount = _chunkRKKRSBX3cjs.flow_default.call(void 0,
268
+ (e) => _chunkRKKRSBX3cjs.countBy_default.call(void 0, e, ([, value]) => extractType(value, false)),
269
+ _chunkRKKRSBX3cjs.toPairs_default,
270
+ (p) => _chunkRKKRSBX3cjs.orderBy_default.call(void 0, p, ([, count]) => count, "desc"),
271
+ (p) => p.filter(([, count]) => count > 1),
272
+ (p) => p.slice(0, 3),
273
+ (0, _chunkRKKRSBX3cjs.fromPairs_default)
274
+ )(entries);
264
275
  const keys = Object.keys(obj);
265
- const uniqueEntries = _chunkUQOBUJIQcjs.uniq_default.call(void 0, Object.values(obj));
266
- const nilValues = _chunkUQOBUJIQcjs.filter_default.call(void 0, entries, ([, value]) => _chunkUQOBUJIQcjs.isNil_default.call(void 0, value)).length;
276
+ const uniqueEntries = _chunkRKKRSBX3cjs.uniq_default.call(void 0, Object.values(obj));
277
+ const nilValues = _chunkRKKRSBX3cjs.filter_default.call(void 0, entries, ([, value]) => _chunkRKKRSBX3cjs.isNil_default.call(void 0, value)).length;
267
278
  const memoryUsage = _bytes2.default.call(void 0, JSON.stringify(obj).length);
268
279
  lines.push(`Total Entries: ${NUMBER_LOCALE.format(entries.length)}`);
269
280
  lines.push(`Keys: ${previewValue(keys)}`);
@@ -272,7 +283,7 @@ function previewObject(obj, options) {
272
283
  lines.push(`Nil Values: ${NUMBER_LOCALE.format(nilValues)}`);
273
284
  lines.push(`Memory Usage: ${memoryUsage}`);
274
285
  }
275
- if (_chunkUQOBUJIQcjs.isEmpty_default.call(void 0, obj)) {
286
+ if (_chunkRKKRSBX3cjs.isEmpty_default.call(void 0, obj)) {
276
287
  lines.push("// Empty Object {}");
277
288
  } else {
278
289
  lines.push(truncated ? "// Object Preview (truncated)" : "// Full Object Preview");
@@ -298,9 +309,15 @@ function previewLongText(text, length = LONG_TEXT_LENGTH) {
298
309
  lines.push(SUBTITLE_LN);
299
310
  const words = text.split(/\s+/);
300
311
  const wordCount = words.length;
301
- const uniqueWords = _chunkUQOBUJIQcjs.uniq_default.call(void 0, words).length;
302
- const wordFrequency = _chunkUQOBUJIQcjs.countBy_default.call(void 0, words);
303
- const mostCommonWords = _chunkUQOBUJIQcjs.chain_default.call(void 0, wordFrequency).toPairs().orderBy(1, "desc").filter(([, count]) => count > 1).take(20).map(([word, count]) => `"${word}" ${count} times`).value().join("\n" + " ".repeat(22));
312
+ const uniqueWords = _chunkRKKRSBX3cjs.uniq_default.call(void 0, words).length;
313
+ const wordFrequency = _chunkRKKRSBX3cjs.countBy_default.call(void 0, words);
314
+ const mostCommonWords = _chunkRKKRSBX3cjs.flow_default.call(void 0,
315
+ _chunkRKKRSBX3cjs.toPairs_default,
316
+ (p) => _chunkRKKRSBX3cjs.orderBy_default.call(void 0, p, ([, count]) => count, "desc"),
317
+ (p) => _chunkRKKRSBX3cjs.filter_default.call(void 0, p, ([, count]) => count > 1),
318
+ (p) => _chunkRKKRSBX3cjs.take_default.call(void 0, p, 20),
319
+ (p) => _chunkRKKRSBX3cjs.map_default.call(void 0, p, ([word, count]) => `"${word}" ${count} times`)
320
+ )(wordFrequency).join("\n" + " ".repeat(22));
304
321
  const urls = text.match(urlPattern) || [];
305
322
  const emails = text.match(emailPattern) || [];
306
323
  if (urls.length > 0) {
@@ -336,7 +353,7 @@ var inspect = (value, name, options = DEFAULT_OPTIONS) => {
336
353
  } else if (genericType === "boolean") {
337
354
  return header + previewValue(value);
338
355
  } else if (typeof value === "string") {
339
- if (_chunkWHNOR4ZUcjs.getTokenizer.call(void 0, ).count(value) < options.tokens) {
356
+ if (_chunk4VYDQ3VFcjs.getTokenizer.call(void 0, ).count(value) < options.tokens) {
340
357
  return header + previewValue(value);
341
358
  } else {
342
359
  return header + previewLongText(value);
@@ -491,15 +508,15 @@ ${variables_example}
491
508
  role: "system",
492
509
  content: replacePlaceholders(canTalk ? system_md_default : system_md_default2, {
493
510
  is_message_enabled: canTalk,
494
- "tools.d.ts": _chunkGZPN7RGHcjs.wrapContent.call(void 0, dts, {
511
+ "tools.d.ts": _chunkI3WYQ7CAcjs.wrapContent.call(void 0, dts, {
495
512
  preserve: "both",
496
513
  minTokens: 500
497
514
  }),
498
- identity: _chunkGZPN7RGHcjs.wrapContent.call(void 0, ((_a = props.instructions) == null ? void 0 : _a.length) ? props.instructions : "No specific instructions provided", {
515
+ identity: _chunkI3WYQ7CAcjs.wrapContent.call(void 0, ((_a = props.instructions) == null ? void 0 : _a.length) ? props.instructions : "No specific instructions provided", {
499
516
  preserve: "both",
500
517
  minTokens: 1e3
501
518
  }),
502
- transcript: _chunkGZPN7RGHcjs.wrapContent.call(void 0, props.transcript.toString(), {
519
+ transcript: _chunkI3WYQ7CAcjs.wrapContent.call(void 0, props.transcript.toString(), {
503
520
  preserve: "bottom",
504
521
  minTokens: 500
505
522
  }),
@@ -508,8 +525,8 @@ ${variables_example}
508
525
  writeable_vars: writeable_vars.join(", "),
509
526
  variables_example,
510
527
  exits,
511
- components: _chunkGZPN7RGHcjs.wrapContent.call(void 0,
512
- props.components.map((component) => _chunkQY2TRWGKcjs.getComponentReference.call(void 0, component.definition)).join("\n\n"),
528
+ components: _chunkI3WYQ7CAcjs.wrapContent.call(void 0,
529
+ props.components.map((component) => _chunkTLOQBZKWcjs.getComponentReference.call(void 0, component.definition)).join("\n\n"),
513
530
  {
514
531
  preserve: "top",
515
532
  minTokens: 500
@@ -586,13 +603,13 @@ Code:
586
603
 
587
604
  \`\`\`tsx
588
605
  \u25A0fn_start
589
- ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, props.code)}
606
+ ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, props.code)}
590
607
  \u25A0fn_end
591
608
  \`\`\`
592
609
 
593
610
  Error:
594
611
  \`\`\`
595
- ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, props.message, { flex: 4 })}
612
+ ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, props.message, { flex: 4 })}
596
613
  \`\`\`
597
614
 
598
615
  Please fix the error and try again.
@@ -615,11 +632,11 @@ var getCodeExecutionErrorMessage = async (props) => {
615
632
 
616
633
  An error occurred while executing the code.
617
634
 
618
- ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, props.message, { preserve: "top", flex: 4 })}
635
+ ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, props.message, { preserve: "top", flex: 4 })}
619
636
 
620
637
  Stack Trace:
621
638
  \`\`\`
622
- ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, _chunkKIN7Y247cjs.cleanStackTrace.call(void 0, props.stacktrace), { flex: 6, preserve: "top" })}
639
+ ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, _chunkKIN7Y247cjs.cleanStackTrace.call(void 0, props.stacktrace), { flex: 6, preserve: "top" })}
623
640
  \`\`\`
624
641
 
625
642
  Let the user know that an error occurred, and if possible, try something else. Do not repeat yourself in the message.
@@ -636,13 +653,13 @@ Expected output:
636
653
  };
637
654
  var getThinkingMessage = async (props) => {
638
655
  let context = "";
639
- if (_chunkUQOBUJIQcjs.isPlainObject_default.call(void 0, props.variables)) {
656
+ if (_chunkRKKRSBX3cjs.isPlainObject_default.call(void 0, props.variables)) {
640
657
  const mapped = Object.entries(_nullishCoalesce(props.variables, () => ( {}))).reduce((acc, [key, value]) => {
641
658
  const inspected = inspect(value, key);
642
659
  if (inspected) {
643
660
  acc.push(inspected);
644
661
  } else {
645
- acc.push(`Value of ${key} is ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, JSON.stringify(value, null, 2))}`);
662
+ acc.push(`Value of ${key} is ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, JSON.stringify(value, null, 2))}`);
646
663
  }
647
664
  return acc;
648
665
  }, []);
@@ -653,7 +670,7 @@ var getThinkingMessage = async (props) => {
653
670
  if (inspected) {
654
671
  return inspected;
655
672
  } else {
656
- return `Value at index ${index} is ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, JSON.stringify(value, null, 2))}`;
673
+ return `Value at index ${index} is ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, JSON.stringify(value, null, 2))}`;
657
674
  }
658
675
  });
659
676
  context = mapped.join("\n\n");
@@ -671,7 +688,7 @@ The assistant requested to think. Here's the context:
671
688
  -------------------
672
689
  Reason: ${props.reason || "Thinking requested"}
673
690
  Context:
674
- ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, context, { preserve: "top" })}
691
+ ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, context, { preserve: "top" })}
675
692
  -------------------
676
693
 
677
694
  Please continue with the conversation (\u25A0fn_start).
@@ -690,19 +707,19 @@ var getSnapshotResolvedMessage = (props) => {
690
707
  injectedVariables[variable.name] = variable.value;
691
708
  variablesMessage += `
692
709
  // Variable "${variable.name}" restored with its full value:
693
- // ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, _nullishCoalesce(((_a = inspect(variable.value)) == null ? void 0 : _a.split("\n").join("\n// ")), () => ( "")))}
710
+ // ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, _nullishCoalesce(((_a = inspect(variable.value)) == null ? void 0 : _a.split("\n").join("\n// ")), () => ( "")))}
694
711
  declare const ${variable.name}: ${variable.type}
695
712
  `;
696
713
  } else {
697
714
  variablesMessage += `
698
715
  // The variable "${variable.name}" was too large to be restored with its full value, here's a preview of its last known value:
699
- // ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, variable.preview.split("\n").join("\n// "))}
716
+ // ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, variable.preview.split("\n").join("\n// "))}
700
717
  // Important: To restore the full value, please re-run the code that generated this variable in the first place.
701
718
  let ${variable.name}: undefined | ${variable.type} = undefined;
702
719
  `;
703
720
  }
704
721
  }
705
- const output = _chunkGZPN7RGHcjs.wrapContent.call(void 0, _nullishCoalesce(((_b = inspect(props.snapshot.status.value)) == null ? void 0 : _b.split("\n").join("\n * ")), () => ( "")), {
722
+ const output = _chunkI3WYQ7CAcjs.wrapContent.call(void 0, _nullishCoalesce(((_b = inspect(props.snapshot.status.value)) == null ? void 0 : _b.split("\n").join("\n * ")), () => ( "")), {
706
723
  preserve: "top",
707
724
  flex: 4
708
725
  });
@@ -724,7 +741,7 @@ ${_chunkKIN7Y247cjs.cleanStackTrace.call(void 0, props.snapshot.stack).split("\n
724
741
  Continue the conversation from here, without repeating the above code, as it has already been executed. Here's the variables you can rely on:
725
742
 
726
743
  \`\`\`tsx
727
- ${_chunkGZPN7RGHcjs.wrapContent.call(void 0, variablesMessage)}
744
+ ${_chunkI3WYQ7CAcjs.wrapContent.call(void 0, variablesMessage)}
728
745
  \`\`\`
729
746
 
730
747
  You can now assume that the code you about to generate can rely on the variables "${Object.keys(injectedVariables).join('", "')}" being available.
@@ -747,7 +764,7 @@ var getSnapshotRejectedMessage = (props) => {
747
764
  throw new Error("Snapshot is not resolved");
748
765
  }
749
766
  const errorMessage = _nullishCoalesce(inspect(props.snapshot.status.error), () => ( "Unknown Error"));
750
- const output = _chunkGZPN7RGHcjs.wrapContent.call(void 0, _nullishCoalesce(errorMessage.split("\n").join("\n * "), () => ( "Unknown Error")), {
767
+ const output = _chunkI3WYQ7CAcjs.wrapContent.call(void 0, _nullishCoalesce(errorMessage.split("\n").join("\n * "), () => ( "Unknown Error")), {
751
768
  preserve: "both",
752
769
  minTokens: 100
753
770
  });
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
2
2
 
3
- var _chunkKED57HR5cjs = require('./chunk-KED57HR5.cjs');
3
+ var _chunk2NEOPXCScjs = require('./chunk-2NEOPXCS.cjs');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
- var _chunkWHNOR4ZUcjs = require('./chunk-WHNOR4ZU.cjs');
9
+ var _chunk4VYDQ3VFcjs = require('./chunk-4VYDQ3VF.cjs');
10
10
 
11
11
 
12
12
 
13
- var _chunkUQOBUJIQcjs = require('./chunk-UQOBUJIQ.cjs');
13
+ var _chunkRKKRSBX3cjs = require('./chunk-RKKRSBX3.cjs');
14
14
 
15
15
  // src/tool.ts
16
16
  var _zui = require('@bpinternal/zui');
@@ -104,8 +104,8 @@ var Tool = (_class = class _Tool {
104
104
  } else {
105
105
  input = _zui.z.any();
106
106
  }
107
- if (!_chunkUQOBUJIQcjs.isEmpty_default.call(void 0, this._staticInputValues)) {
108
- const inputExtensions = _chunkWHNOR4ZUcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
107
+ if (!_chunkRKKRSBX3cjs.isEmpty_default.call(void 0, this._staticInputValues)) {
108
+ const inputExtensions = _chunk4VYDQ3VFcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
109
109
  if (input instanceof _zui.z.ZodObject) {
110
110
  input = input.extend(inputExtensions);
111
111
  } else if (input instanceof _zui.z.ZodArray) {
@@ -149,13 +149,13 @@ var Tool = (_class = class _Tool {
149
149
  */
150
150
  rename(name) {
151
151
  const before = this.name;
152
- if (!_chunkWHNOR4ZUcjs.isValidIdentifier.call(void 0, name)) {
152
+ if (!_chunk4VYDQ3VFcjs.isValidIdentifier.call(void 0, name)) {
153
153
  throw new Error(
154
154
  `Invalid name for tool ${name}. A tool name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
155
155
  );
156
156
  }
157
157
  this.name = name;
158
- this.aliases = _chunkUQOBUJIQcjs.uniq_default.call(void 0, [name, ...this.aliases.map((alias) => alias === before ? name : alias)]);
158
+ this.aliases = _chunkRKKRSBX3cjs.uniq_default.call(void 0, [name, ...this.aliases.map((alias) => alias === before ? name : alias)]);
159
159
  return this;
160
160
  }
161
161
  /**
@@ -325,7 +325,7 @@ var Tool = (_class = class _Tool {
325
325
  * ```
326
326
  */
327
327
  constructor(props) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);
328
- if (!_chunkWHNOR4ZUcjs.isValidIdentifier.call(void 0, props.name)) {
328
+ if (!_chunk4VYDQ3VFcjs.isValidIdentifier.call(void 0, props.name)) {
329
329
  throw new Error(
330
330
  `Invalid name for tool ${props.name}. A tool name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
331
331
  );
@@ -350,17 +350,17 @@ var Tool = (_class = class _Tool {
350
350
  `Invalid aliases for tool ${props.name}. Expected an array, but got type "${typeof props.aliases}"`
351
351
  );
352
352
  }
353
- if (props.aliases && props.aliases.some((alias) => !_chunkWHNOR4ZUcjs.isValidIdentifier.call(void 0, alias))) {
353
+ if (props.aliases && props.aliases.some((alias) => !_chunk4VYDQ3VFcjs.isValidIdentifier.call(void 0, alias))) {
354
354
  throw new Error(`Invalid aliases for tool ${props.name}. Expected an array of valid identifiers.`);
355
355
  }
356
356
  if (typeof props.input !== "undefined") {
357
- if (_chunkWHNOR4ZUcjs.isZuiSchema.call(void 0, props.input)) {
357
+ if (_chunk4VYDQ3VFcjs.isZuiSchema.call(void 0, props.input)) {
358
358
  try {
359
359
  this.input = _zui.transforms.toJSONSchema(props.input);
360
360
  } catch (e6) {
361
361
  this.input = _zui.transforms.toJSONSchemaLegacy(props.input);
362
362
  }
363
- } else if (_chunkWHNOR4ZUcjs.isJsonSchema.call(void 0, props.input)) {
363
+ } else if (_chunk4VYDQ3VFcjs.isJsonSchema.call(void 0, props.input)) {
364
364
  this.input = props.input;
365
365
  } else {
366
366
  throw new Error(
@@ -369,13 +369,13 @@ var Tool = (_class = class _Tool {
369
369
  }
370
370
  }
371
371
  if (typeof props.output !== "undefined") {
372
- if (_chunkWHNOR4ZUcjs.isZuiSchema.call(void 0, props.output)) {
372
+ if (_chunk4VYDQ3VFcjs.isZuiSchema.call(void 0, props.output)) {
373
373
  try {
374
374
  this.output = _zui.transforms.toJSONSchema(props.output);
375
375
  } catch (e7) {
376
376
  this.output = _zui.transforms.toJSONSchemaLegacy(props.output);
377
377
  }
378
- } else if (_chunkWHNOR4ZUcjs.isJsonSchema.call(void 0, props.output)) {
378
+ } else if (_chunk4VYDQ3VFcjs.isJsonSchema.call(void 0, props.output)) {
379
379
  this.output = props.output;
380
380
  } else {
381
381
  throw new Error(
@@ -384,7 +384,7 @@ var Tool = (_class = class _Tool {
384
384
  }
385
385
  }
386
386
  this.name = props.name;
387
- this.aliases = _chunkUQOBUJIQcjs.uniq_default.call(void 0, [props.name, ..._nullishCoalesce(props.aliases, () => ( []))]);
387
+ this.aliases = _chunkRKKRSBX3cjs.uniq_default.call(void 0, [props.name, ..._nullishCoalesce(props.aliases, () => ( []))]);
388
388
  this.description = props.description;
389
389
  this.metadata = _nullishCoalesce(props.metadata, () => ( {}));
390
390
  this._handler = props.handler;
@@ -472,14 +472,14 @@ var Tool = (_class = class _Tool {
472
472
  output = _zui.transforms.fromJSONSchemaLegacy(this.output);
473
473
  }
474
474
  }
475
- if ((input == null ? void 0 : input.naked()) instanceof _zui.ZodObject && typeof this._staticInputValues === "object" && !_chunkUQOBUJIQcjs.isEmpty_default.call(void 0, this._staticInputValues)) {
476
- const inputExtensions = _chunkWHNOR4ZUcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
475
+ if ((input == null ? void 0 : input.naked()) instanceof _zui.ZodObject && typeof this._staticInputValues === "object" && !_chunkRKKRSBX3cjs.isEmpty_default.call(void 0, this._staticInputValues)) {
476
+ const inputExtensions = _chunk4VYDQ3VFcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
477
477
  input = input.extend(inputExtensions);
478
478
  } else if (this._staticInputValues !== void 0) {
479
- input = _chunkWHNOR4ZUcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
479
+ input = _chunk4VYDQ3VFcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
480
480
  }
481
481
  const fnType = _zui.z.function(input, _zui.z.promise(output)).title(this.name).describe(_nullishCoalesce(this.description, () => ( "")));
482
- return _chunkKED57HR5cjs.getTypings.call(void 0, fnType, {
482
+ return _chunk2NEOPXCScjs.getTypings.call(void 0, fnType, {
483
483
  declaration: true
484
484
  });
485
485
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkKMZDFWYZcjs = require('./chunk-KMZDFWYZ.cjs');
4
+ var _chunk54G63644cjs = require('./chunk-54G63644.cjs');
5
5
 
6
6
  // src/component.ts
7
7
  var _zui = require('@bpinternal/zui');
@@ -136,10 +136,10 @@ var Component = class {
136
136
  }
137
137
  };
138
138
  function isComponent(rendered, component) {
139
- return _chunkKMZDFWYZcjs.isJsxComponent.call(void 0, component.definition.name, rendered);
139
+ return _chunk54G63644cjs.isJsxComponent.call(void 0, component.definition.name, rendered);
140
140
  }
141
141
  function isAnyComponent(message) {
142
- return _chunkKMZDFWYZcjs.isAnyJsxComponent.call(void 0, message);
142
+ return _chunk54G63644cjs.isAnyJsxComponent.call(void 0, message);
143
143
  }
144
144
  function renderToTsx(component) {
145
145
  const props = Object.entries(component.props).map(([key, value]) => {