llmz 0.0.35 → 0.0.37

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.
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkQRFGEFROcjs = require('./chunk-QRFGEFRO.cjs');
5
+ var _chunkZEGD4BQJcjs = require('./chunk-ZEGD4BQJ.cjs');
6
6
 
7
7
 
8
- var _chunkQR54TZ36cjs = require('./chunk-QR54TZ36.cjs');
8
+ var _chunkWP7SDPJ6cjs = require('./chunk-WP7SDPJ6.cjs');
9
9
 
10
10
 
11
11
  var _chunkPK72FAKDcjs = require('./chunk-PK72FAKD.cjs');
@@ -493,10 +493,10 @@ var Snapshot = class _Snapshot {
493
493
  };
494
494
  function parseVariables(variableMap) {
495
495
  return Object.entries(variableMap).map(([name, value]) => {
496
- const type = _chunkQRFGEFROcjs.extractType.call(void 0, value);
496
+ const type = _chunkZEGD4BQJcjs.extractType.call(void 0, value);
497
497
  const bytes = JSON.stringify(value || "").length;
498
498
  const truncated = bytes > MAX_SNAPSHOT_SIZE_BYTES;
499
- return truncated ? { name, type, bytes, truncated: true, preview: _nullishCoalesce(_chunkQRFGEFROcjs.inspect.call(void 0, value, name), () => ( "N/A")) } : { name, type, bytes, truncated: false, value };
499
+ return truncated ? { name, type, bytes, truncated: true, preview: _nullishCoalesce(_chunkZEGD4BQJcjs.inspect.call(void 0, value, name), () => ( "N/A")) } : { name, type, bytes, truncated: false, value };
500
500
  });
501
501
  }
502
502
 
@@ -507,9 +507,9 @@ function getMessagePreview(message) {
507
507
  return message.content;
508
508
  }
509
509
  if (message.role === "event") {
510
- return _chunkQRFGEFROcjs.inspect.call(void 0, message.payload, message.name, { tokens: 1e3 });
510
+ return _chunkZEGD4BQJcjs.inspect.call(void 0, message.payload, message.name, { tokens: 1e3 });
511
511
  }
512
- return _chunkQRFGEFROcjs.inspect.call(void 0, message, void 0, { tokens: 1e3 });
512
+ return _chunkZEGD4BQJcjs.inspect.call(void 0, message, void 0, { tokens: 1e3 });
513
513
  }
514
514
  function getMessageType(message) {
515
515
  if (message.role === "assistant" || message.role === "user" || message.role === "summary") {
@@ -1098,7 +1098,7 @@ var Context = (_class2 = class {
1098
1098
 
1099
1099
 
1100
1100
 
1101
- __init3() {this.version = _chunkQRFGEFROcjs.DualModePrompt}
1101
+ __init3() {this.version = _chunkZEGD4BQJcjs.DualModePrompt}
1102
1102
  __init4() {this.timeout = 6e4}
1103
1103
  // Default timeout of 60 seconds
1104
1104
 
@@ -1274,7 +1274,7 @@ var Context = (_class2 = class {
1274
1274
  var _a, _b;
1275
1275
  const instructions = await getValue(this.instructions, this);
1276
1276
  const transcript = new TranscriptArray(await getValue(_nullishCoalesce(((_a = this.chat) == null ? void 0 : _a.transcript), () => ( [])), this));
1277
- const tools = _chunkQR54TZ36cjs.Tool.withUniqueNames(await _asyncNullishCoalesce(await getValue(this.tools, this), async () => ( [])));
1277
+ const tools = _chunkWP7SDPJ6cjs.Tool.withUniqueNames(await _asyncNullishCoalesce(await getValue(this.tools, this), async () => ( [])));
1278
1278
  const objects = await _asyncNullishCoalesce(await getValue(this.objects, this), async () => ( []));
1279
1279
  const exits = await _asyncNullishCoalesce(await getValue(this.exits, this), async () => ( []));
1280
1280
  const components = await getValue(_nullishCoalesce(((_b = this.chat) == null ? void 0 : _b.components), () => ( [])), this);
@@ -1306,7 +1306,7 @@ var Context = (_class2 = class {
1306
1306
  "boolean",
1307
1307
  "array"
1308
1308
  ];
1309
- const MessageTool = this.chat && components.length ? new (0, _chunkQR54TZ36cjs.Tool)({
1309
+ const MessageTool = this.chat && components.length ? new (0, _chunkWP7SDPJ6cjs.Tool)({
1310
1310
  name: "Message",
1311
1311
  description: "Send a message to the user",
1312
1312
  aliases: Array.from(
@@ -2,10 +2,10 @@ import {
2
2
  DualModePrompt,
3
3
  extractType,
4
4
  inspect
5
- } from "./chunk-DOIKBDLR.js";
5
+ } from "./chunk-V6VEBUMU.js";
6
6
  import {
7
7
  Tool
8
- } from "./chunk-GXLMCQYF.js";
8
+ } from "./chunk-PUFOVD74.js";
9
9
  import {
10
10
  LoopExceededError
11
11
  } from "./chunk-WSVDMGMR.js";
@@ -415,8 +415,10 @@ var Tool = class _Tool {
415
415
  *
416
416
  * @internal This method is primarily used internally by the LLMz execution engine
417
417
  */
418
- async execute(input, ctx) {
418
+ async execute(rawInput, ctx) {
419
419
  var _a;
420
+ const isZodObject = this.zInput._def.typeName === "ZodObject";
421
+ const input = isZodObject ? rawInput ?? {} : rawInput;
420
422
  const pInput = this.zInput.safeParse(input);
421
423
  if (!pInput.success) {
422
424
  throw new Error(`Tool "${this.name}" received invalid input: ${pInput.error.message}`);
@@ -387,7 +387,12 @@ ${END_TOKEN}`;
387
387
  var replacePlaceholders = (prompt, values) => {
388
388
  const regex = new RegExp("\u25A0\u25A0\u25A0([A-Z0-9_\\.-]+)\u25A0\u25A0\u25A0", "gi");
389
389
  const obj = Object.assign({}, values);
390
- const replaced = prompt.replace(regex, (_match, name) => {
390
+ const compile = Handlebars.compile(prompt);
391
+ const compiled = compile({
392
+ is_message_enabled: false,
393
+ ...values
394
+ });
395
+ const replaced = compiled.replace(regex, (_match, name) => {
391
396
  if (name in values) {
392
397
  delete obj[name];
393
398
  return typeof values[name] === "string" ? values[name] : JSON.stringify(values[name]);
@@ -401,12 +406,7 @@ var replacePlaceholders = (prompt, values) => {
401
406
  if (remaining.length) {
402
407
  throw new Error(`Missing placeholders: ${remaining.join(", ")}`);
403
408
  }
404
- const compile = Handlebars.compile(replaced);
405
- const compiled = compile({
406
- is_message_enabled: false,
407
- ...values
408
- });
409
- return compiled.replace(/\n{3,}/g, "\n\n").trim();
409
+ return replaced.replace(/\n{3,}/g, "\n\n").trim();
410
410
  };
411
411
 
412
412
  // src/prompts/worker-mode/system.md.ts
@@ -415,8 +415,10 @@ var Tool = (_class = class _Tool {
415
415
  *
416
416
  * @internal This method is primarily used internally by the LLMz execution engine
417
417
  */
418
- async execute(input, ctx) {
418
+ async execute(rawInput, ctx) {
419
419
  var _a;
420
+ const isZodObject = this.zInput._def.typeName === "ZodObject";
421
+ const input = isZodObject ? _nullishCoalesce(rawInput, () => ( {})) : rawInput;
420
422
  const pInput = this.zInput.safeParse(input);
421
423
  if (!pInput.success) {
422
424
  throw new Error(`Tool "${this.name}" received invalid input: ${pInput.error.message}`);
@@ -387,7 +387,12 @@ ${END_TOKEN}`;
387
387
  var replacePlaceholders = (prompt, values) => {
388
388
  const regex = new RegExp("\u25A0\u25A0\u25A0([A-Z0-9_\\.-]+)\u25A0\u25A0\u25A0", "gi");
389
389
  const obj = Object.assign({}, values);
390
- const replaced = prompt.replace(regex, (_match, name) => {
390
+ const compile = _handlebars2.default.compile(prompt);
391
+ const compiled = compile({
392
+ is_message_enabled: false,
393
+ ...values
394
+ });
395
+ const replaced = compiled.replace(regex, (_match, name) => {
391
396
  if (name in values) {
392
397
  delete obj[name];
393
398
  return typeof values[name] === "string" ? values[name] : JSON.stringify(values[name]);
@@ -401,12 +406,7 @@ var replacePlaceholders = (prompt, values) => {
401
406
  if (remaining.length) {
402
407
  throw new Error(`Missing placeholders: ${remaining.join(", ")}`);
403
408
  }
404
- const compile = _handlebars2.default.compile(replaced);
405
- const compiled = compile({
406
- is_message_enabled: false,
407
- ...values
408
- });
409
- return compiled.replace(/\n{3,}/g, "\n\n").trim();
409
+ return replaced.replace(/\n{3,}/g, "\n\n").trim();
410
410
  };
411
411
 
412
412
  // src/prompts/worker-mode/system.md.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DualModePrompt
3
- } from "./chunk-DOIKBDLR.js";
3
+ } from "./chunk-V6VEBUMU.js";
4
4
  import "./chunk-YEAWWJSJ.js";
5
5
  import "./chunk-HA52ORZL.js";
6
6
  import "./chunk-ORQP26SZ.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQRFGEFROcjs = require('./chunk-QRFGEFRO.cjs');
3
+ var _chunkZEGD4BQJcjs = require('./chunk-ZEGD4BQJ.cjs');
4
4
  require('./chunk-KIN7Y247.cjs');
5
5
  require('./chunk-QY2TRWGK.cjs');
6
6
  require('./chunk-KMZDFWYZ.cjs');
@@ -9,4 +9,4 @@ require('./chunk-WHNOR4ZU.cjs');
9
9
  require('./chunk-UQOBUJIQ.cjs');
10
10
 
11
11
 
12
- exports.DualModePrompt = _chunkQRFGEFROcjs.DualModePrompt;
12
+ exports.DualModePrompt = _chunkZEGD4BQJcjs.DualModePrompt;
package/dist/index.cjs CHANGED
@@ -9,11 +9,11 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkB742DUFYcjs = require('./chunk-B742DUFY.cjs');
13
- require('./chunk-QRFGEFRO.cjs');
12
+ var _chunk6RFV7TZ5cjs = require('./chunk-6RFV7TZ5.cjs');
13
+ require('./chunk-ZEGD4BQJ.cjs');
14
14
 
15
15
 
16
- var _chunkQR54TZ36cjs = require('./chunk-QR54TZ36.cjs');
16
+ var _chunkWP7SDPJ6cjs = require('./chunk-WP7SDPJ6.cjs');
17
17
 
18
18
 
19
19
 
@@ -428,7 +428,7 @@ var ObjectInstance = class {
428
428
  this.description = props.description;
429
429
  this.metadata = _nullishCoalesce(props.metadata, () => ( {}));
430
430
  this.properties = props.properties;
431
- this.tools = _chunkQR54TZ36cjs.Tool.withUniqueNames(_nullishCoalesce(props.tools, () => ( [])));
431
+ this.tools = _chunkWP7SDPJ6cjs.Tool.withUniqueNames(_nullishCoalesce(props.tools, () => ( [])));
432
432
  }
433
433
  /**
434
434
  * Generates TypeScript namespace declarations for this object.
@@ -1112,20 +1112,20 @@ var utils = {
1112
1112
  truncateWrappedContent: _chunkGZPN7RGHcjs.truncateWrappedContent
1113
1113
  };
1114
1114
  var execute = async (props) => {
1115
- const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-XRJIDXIZ.cjs")));
1115
+ const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-CR72C5Z5.cjs")));
1116
1116
  return executeContext(props);
1117
1117
  };
1118
1118
  var init = async () => {
1119
- await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-XRJIDXIZ.cjs")));
1119
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-CR72C5Z5.cjs")));
1120
1120
  await Promise.resolve().then(() => _interopRequireWildcard(require("./component-AAEMNCHB.cjs")));
1121
- await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-JYXLFJGQ.cjs")));
1121
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-OC3QHJWX.cjs")));
1122
1122
  await Promise.resolve().then(() => _interopRequireWildcard(require("./exit-XAYKJ6TR.cjs")));
1123
1123
  await Promise.resolve().then(() => _interopRequireWildcard(require("./jsx-AJAXBWFE.cjs")));
1124
1124
  await Promise.resolve().then(() => _interopRequireWildcard(require("./vm-VFORKC54.cjs")));
1125
1125
  await Promise.resolve().then(() => _interopRequireWildcard(require("./utils-L5QAQXV2.cjs")));
1126
1126
  await Promise.resolve().then(() => _interopRequireWildcard(require("./truncator-W3NXBLYJ.cjs")));
1127
1127
  await Promise.resolve().then(() => _interopRequireWildcard(require("./typings-7C2RXO75.cjs")));
1128
- await Promise.resolve().then(() => _interopRequireWildcard(require("./dual-modes-MHUM2LEI.cjs")));
1128
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./dual-modes-WCJ3HAB3.cjs")));
1129
1129
  };
1130
1130
 
1131
1131
 
@@ -1155,4 +1155,4 @@ var init = async () => {
1155
1155
 
1156
1156
 
1157
1157
 
1158
- exports.Chat = Chat; exports.CitationsManager = CitationsManager; exports.Component = _chunkQY2TRWGKcjs.Component; exports.DefaultComponents = DefaultComponents; exports.DefaultExit = _chunkB742DUFYcjs.DefaultExit; exports.ErrorExecutionResult = _chunkB742DUFYcjs.ErrorExecutionResult; exports.ExecutionResult = _chunkB742DUFYcjs.ExecutionResult; exports.Exit = _chunk3G3BS5IAcjs.Exit; exports.ListenExit = _chunkB742DUFYcjs.ListenExit; exports.LoopExceededError = _chunkPK72FAKDcjs.LoopExceededError; exports.ObjectInstance = ObjectInstance; exports.PartialExecutionResult = _chunkB742DUFYcjs.PartialExecutionResult; exports.Snapshot = _chunkB742DUFYcjs.Snapshot; exports.SnapshotSignal = _chunkPK72FAKDcjs.SnapshotSignal; exports.SuccessExecutionResult = _chunkB742DUFYcjs.SuccessExecutionResult; exports.ThinkExit = _chunkB742DUFYcjs.ThinkExit; exports.ThinkSignal = _chunkPK72FAKDcjs.ThinkSignal; exports.Tool = _chunkQR54TZ36cjs.Tool; exports.assertValidComponent = _chunkQY2TRWGKcjs.assertValidComponent; exports.execute = execute; exports.getValue = _chunkB742DUFYcjs.getValue; exports.init = init; exports.isAnyComponent = _chunkQY2TRWGKcjs.isAnyComponent; exports.isComponent = _chunkQY2TRWGKcjs.isComponent; exports.parseExit = _chunkB742DUFYcjs.parseExit; exports.renderToTsx = _chunkQY2TRWGKcjs.renderToTsx; exports.utils = utils;
1158
+ exports.Chat = Chat; exports.CitationsManager = CitationsManager; exports.Component = _chunkQY2TRWGKcjs.Component; exports.DefaultComponents = DefaultComponents; exports.DefaultExit = _chunk6RFV7TZ5cjs.DefaultExit; exports.ErrorExecutionResult = _chunk6RFV7TZ5cjs.ErrorExecutionResult; exports.ExecutionResult = _chunk6RFV7TZ5cjs.ExecutionResult; exports.Exit = _chunk3G3BS5IAcjs.Exit; exports.ListenExit = _chunk6RFV7TZ5cjs.ListenExit; exports.LoopExceededError = _chunkPK72FAKDcjs.LoopExceededError; exports.ObjectInstance = ObjectInstance; exports.PartialExecutionResult = _chunk6RFV7TZ5cjs.PartialExecutionResult; exports.Snapshot = _chunk6RFV7TZ5cjs.Snapshot; exports.SnapshotSignal = _chunkPK72FAKDcjs.SnapshotSignal; exports.SuccessExecutionResult = _chunk6RFV7TZ5cjs.SuccessExecutionResult; exports.ThinkExit = _chunk6RFV7TZ5cjs.ThinkExit; exports.ThinkSignal = _chunkPK72FAKDcjs.ThinkSignal; exports.Tool = _chunkWP7SDPJ6cjs.Tool; exports.assertValidComponent = _chunkQY2TRWGKcjs.assertValidComponent; exports.execute = execute; exports.getValue = _chunk6RFV7TZ5cjs.getValue; exports.init = init; exports.isAnyComponent = _chunkQY2TRWGKcjs.isAnyComponent; exports.isComponent = _chunkQY2TRWGKcjs.isComponent; exports.parseExit = _chunk6RFV7TZ5cjs.parseExit; exports.renderToTsx = _chunkQY2TRWGKcjs.renderToTsx; exports.utils = utils;
package/dist/index.js CHANGED
@@ -9,11 +9,11 @@ import {
9
9
  ThinkExit,
10
10
  getValue,
11
11
  parseExit
12
- } from "./chunk-RANA7NBF.js";
13
- import "./chunk-DOIKBDLR.js";
12
+ } from "./chunk-NOIIPCLR.js";
13
+ import "./chunk-V6VEBUMU.js";
14
14
  import {
15
15
  Tool
16
- } from "./chunk-GXLMCQYF.js";
16
+ } from "./chunk-PUFOVD74.js";
17
17
  import {
18
18
  formatTypings,
19
19
  getTypings
@@ -1112,20 +1112,20 @@ var utils = {
1112
1112
  truncateWrappedContent
1113
1113
  };
1114
1114
  var execute = async (props) => {
1115
- const { executeContext } = await import("./llmz-NX2764TL.js");
1115
+ const { executeContext } = await import("./llmz-CFQOE4UB.js");
1116
1116
  return executeContext(props);
1117
1117
  };
1118
1118
  var init = async () => {
1119
- await import("./llmz-NX2764TL.js");
1119
+ await import("./llmz-CFQOE4UB.js");
1120
1120
  await import("./component-EOMTLA64.js");
1121
- await import("./tool-ADXBCB4R.js");
1121
+ await import("./tool-3YL3EY2R.js");
1122
1122
  await import("./exit-YLO7BY7Z.js");
1123
1123
  await import("./jsx-AEHVFB3L.js");
1124
1124
  await import("./vm-Y3WY2627.js");
1125
1125
  await import("./utils-RQHQ2KOG.js");
1126
1126
  await import("./truncator-BSP6PQPC.js");
1127
1127
  await import("./typings-AQGJAMVH.js");
1128
- await import("./dual-modes-NJGSJEE4.js");
1128
+ await import("./dual-modes-KBMP2AAH.js");
1129
1129
  };
1130
1130
  export {
1131
1131
  Chat,
@@ -8,9 +8,9 @@ import {
8
8
  Snapshot,
9
9
  SuccessExecutionResult,
10
10
  parseExit
11
- } from "./chunk-RANA7NBF.js";
12
- import "./chunk-DOIKBDLR.js";
13
- import "./chunk-GXLMCQYF.js";
11
+ } from "./chunk-NOIIPCLR.js";
12
+ import "./chunk-V6VEBUMU.js";
13
+ import "./chunk-PUFOVD74.js";
14
14
  import "./chunk-B42FGPCX.js";
15
15
  import {
16
16
  AssignmentError,
@@ -8,9 +8,9 @@ var _chunk5FWOHMO4cjs = require('./chunk-5FWOHMO4.cjs');
8
8
 
9
9
 
10
10
 
11
- var _chunkB742DUFYcjs = require('./chunk-B742DUFY.cjs');
12
- require('./chunk-QRFGEFRO.cjs');
13
- require('./chunk-QR54TZ36.cjs');
11
+ var _chunk6RFV7TZ5cjs = require('./chunk-6RFV7TZ5.cjs');
12
+ require('./chunk-ZEGD4BQJ.cjs');
13
+ require('./chunk-WP7SDPJ6.cjs');
14
14
  require('./chunk-KED57HR5.cjs');
15
15
 
16
16
 
@@ -109,7 +109,7 @@ var _executeContext = async (props) => {
109
109
  const client = _nullishCoalesce(props.client, () => ( new (0, _client.Client)()));
110
110
  const cognitive = _cognitive.Cognitive.isCognitiveClient(client) ? client : new (0, _cognitive.Cognitive)({ client });
111
111
  const cleanups = [];
112
- const ctx = new (0, _chunkB742DUFYcjs.Context)({
112
+ const ctx = new (0, _chunk6RFV7TZ5cjs.Context)({
113
113
  chat: props.chat,
114
114
  instructions: props.instructions,
115
115
  objects: props.objects,
@@ -124,7 +124,7 @@ var _executeContext = async (props) => {
124
124
  try {
125
125
  while (true) {
126
126
  if (ctx.iterations.length >= ctx.loop) {
127
- return new (0, _chunkB742DUFYcjs.ErrorExecutionResult)(ctx, new (0, _chunkPK72FAKDcjs.LoopExceededError)());
127
+ return new (0, _chunk6RFV7TZ5cjs.ErrorExecutionResult)(ctx, new (0, _chunkPK72FAKDcjs.LoopExceededError)());
128
128
  }
129
129
  const iteration = await ctx.nextIteration();
130
130
  try {
@@ -147,7 +147,7 @@ var _executeContext = async (props) => {
147
147
  reason: _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted"))
148
148
  }
149
149
  });
150
- return new (0, _chunkB742DUFYcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")));
150
+ return new (0, _chunk6RFV7TZ5cjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")));
151
151
  }
152
152
  cleanups.push(
153
153
  iteration.traces.onPush((traces) => {
@@ -183,25 +183,25 @@ var _executeContext = async (props) => {
183
183
  }
184
184
  if (iteration.status.type === "exit_success") {
185
185
  const exitName = iteration.status.exit_success.exit_name;
186
- return new (0, _chunkB742DUFYcjs.SuccessExecutionResult)(ctx, {
186
+ return new (0, _chunk6RFV7TZ5cjs.SuccessExecutionResult)(ctx, {
187
187
  exit: iteration.exits.find((x) => x.name === exitName),
188
188
  result: iteration.status.exit_success.return_value
189
189
  });
190
190
  }
191
191
  if (iteration.status.type === "callback_requested") {
192
- return new (0, _chunkB742DUFYcjs.PartialExecutionResult)(
192
+ return new (0, _chunk6RFV7TZ5cjs.PartialExecutionResult)(
193
193
  ctx,
194
194
  iteration.status.callback_requested.signal,
195
- _chunkB742DUFYcjs.Snapshot.fromSignal(iteration.status.callback_requested.signal)
195
+ _chunk6RFV7TZ5cjs.Snapshot.fromSignal(iteration.status.callback_requested.signal)
196
196
  );
197
197
  }
198
198
  if (iteration.status.type === "thinking_requested" || iteration.status.type === "exit_error" || iteration.status.type === "execution_error" || iteration.status.type === "invalid_code_error") {
199
199
  continue;
200
200
  }
201
- return new (0, _chunkB742DUFYcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( `Unknown error. Status: ${iteration.status.type}`)));
201
+ return new (0, _chunk6RFV7TZ5cjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( `Unknown error. Status: ${iteration.status.type}`)));
202
202
  }
203
203
  } catch (error) {
204
- return new (0, _chunkB742DUFYcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(error, () => ( "Unknown error")));
204
+ return new (0, _chunk6RFV7TZ5cjs.ErrorExecutionResult)(ctx, _nullishCoalesce(error, () => ( "Unknown error")));
205
205
  } finally {
206
206
  for (const cleanup of cleanups) {
207
207
  try {
@@ -474,7 +474,7 @@ var executeIteration = async ({
474
474
  }
475
475
  });
476
476
  }
477
- const parsedExit = _chunkB742DUFYcjs.parseExit.call(void 0, returnValue, iteration.exits);
477
+ const parsedExit = _chunk6RFV7TZ5cjs.parseExit.call(void 0, returnValue, iteration.exits);
478
478
  if (!parsedExit.success) {
479
479
  return iteration.end({
480
480
  type: "exit_error",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Tool
3
- } from "./chunk-GXLMCQYF.js";
3
+ } from "./chunk-PUFOVD74.js";
4
4
  import "./chunk-B42FGPCX.js";
5
5
  import "./chunk-WSVDMGMR.js";
6
6
  import "./chunk-YEAWWJSJ.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQR54TZ36cjs = require('./chunk-QR54TZ36.cjs');
3
+ var _chunkWP7SDPJ6cjs = require('./chunk-WP7SDPJ6.cjs');
4
4
  require('./chunk-KED57HR5.cjs');
5
5
  require('./chunk-PK72FAKD.cjs');
6
6
  require('./chunk-KIN7Y247.cjs');
@@ -8,4 +8,4 @@ require('./chunk-WHNOR4ZU.cjs');
8
8
  require('./chunk-UQOBUJIQ.cjs');
9
9
 
10
10
 
11
- exports.Tool = _chunkQR54TZ36cjs.Tool;
11
+ exports.Tool = _chunkWP7SDPJ6cjs.Tool;
package/dist/tool.d.ts CHANGED
@@ -464,7 +464,7 @@ export declare class Tool<I extends ZuiType = ZuiType, O extends ZuiType = ZuiTy
464
464
  *
465
465
  * @internal This method is primarily used internally by the LLMz execution engine
466
466
  */
467
- execute(input: TypeOf<I>, ctx: ToolCallContext): Promise<TypeOf<O>>;
467
+ execute(rawInput: TypeOf<I>, ctx: ToolCallContext): Promise<TypeOf<O>>;
468
468
  /**
469
469
  * Generates TypeScript type definitions for this tool.
470
470
  *
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "llmz",
3
3
  "type": "module",
4
4
  "description": "LLMz – An LLM-native Typescript VM built on top of Zui",
5
- "version": "0.0.35",
5
+ "version": "0.0.37",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.js",