llmz 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CLAUDE.md +0 -1
  2. package/dist/{chunk-WWZ2W4WR.cjs → chunk-3UZKLXAD.cjs} +410 -514
  3. package/dist/{chunk-HM5H556L.js → chunk-72ZWBNZV.js} +1 -1
  4. package/dist/{chunk-D6PU5YAS.cjs → chunk-DDSJTR6Q.cjs} +8 -7
  5. package/dist/{chunk-665O7CAN.js → chunk-GDJTKI7J.js} +5 -1
  6. package/dist/{chunk-YX27XM67.js → chunk-GLXADNTR.js} +13 -1
  7. package/dist/{chunk-FPLSJF4S.cjs → chunk-GOWPACSK.cjs} +15 -3
  8. package/dist/{chunk-XVVYNOTX.js → chunk-HB2G32AK.js} +3 -2
  9. package/dist/{chunk-YQT5G77W.cjs → chunk-HEAQAEFZ.cjs} +2 -2
  10. package/dist/{chunk-DD4AZSP5.cjs → chunk-HMMM32RG.cjs} +19 -15
  11. package/dist/{chunk-MY26EAOP.cjs → chunk-KG5E3UZZ.cjs} +20 -20
  12. package/dist/{chunk-YGKQEVQQ.cjs → chunk-OVRDJMZJ.cjs} +29 -37
  13. package/dist/{chunk-E5NHK3FS.js → chunk-OXEKAOVI.js} +6 -14
  14. package/dist/{chunk-ETYFOCWC.cjs → chunk-PZE6PIPG.cjs} +12 -11
  15. package/dist/chunk-RGUG3UMF.cjs +26 -0
  16. package/dist/{chunk-GC5IQDGV.js → chunk-TDALRNGL.js} +4 -3
  17. package/dist/chunk-UGHFNCPD.js +26 -0
  18. package/dist/{chunk-ZWUWCRHG.js → chunk-XMFQVARN.js} +5 -5
  19. package/dist/{chunk-DH35WO5G.js → chunk-YRS7KRKP.js} +401 -505
  20. package/dist/compiler/ast.d.ts +26 -0
  21. package/dist/compiler/compiler.d.ts +13 -11
  22. package/dist/compiler/plugins/line-tracking.d.ts +6 -4
  23. package/dist/compiler/plugins/replace-comment.d.ts +8 -4
  24. package/dist/compiler/plugins/return-async.d.ts +18 -4
  25. package/dist/compiler/plugins/track-tool-calls.d.ts +21 -4
  26. package/dist/compiler/plugins/variable-extraction.d.ts +9 -4
  27. package/dist/component.default.d.ts +13 -91
  28. package/dist/{dual-modes-RMF7V7ZQ.js → dual-modes-BYABHBDI.js} +3 -3
  29. package/dist/dual-modes-HO6RRIZ5.cjs +10 -0
  30. package/dist/emscripten-module.wasm +0 -0
  31. package/dist/{execute-LNUBLVMZ.js → execute-DSGJ2UNL.js} +9 -8
  32. package/dist/{execute-2AGZ5QUN.cjs → execute-MRZZ4AYY.cjs} +41 -40
  33. package/dist/exit-MX56VN2C.cjs +8 -0
  34. package/dist/{exit-VJATJTQI.js → exit-UQ3EUX5D.js} +2 -2
  35. package/dist/exit.d.ts +1 -1
  36. package/dist/index.cjs +210 -253
  37. package/dist/index.d.ts +2 -0
  38. package/dist/index.js +184 -227
  39. package/dist/index.workerd.js +17328 -0
  40. package/dist/prompts/chat-mode/system.md.d.ts +1 -1
  41. package/dist/prompts/worker-mode/system.md.d.ts +1 -1
  42. package/dist/prompts/worker-mode/user.md.d.ts +1 -1
  43. package/dist/quickjs-variant.d.ts +22 -0
  44. package/dist/quickjs-variant.workerd.d.ts +22 -0
  45. package/dist/{tool-HTAYKIA2.js → tool-KD7FL45V.js} +3 -3
  46. package/dist/{tool-V55GD2FS.cjs → tool-VE2YHIY2.cjs} +4 -4
  47. package/dist/{truncator-OZOBNYON.js → truncator-73RCL52Y.js} +2 -2
  48. package/dist/truncator-FZNLYSDL.cjs +12 -0
  49. package/dist/{typings-SCKZCAPN.js → typings-E2RROCLT.js} +2 -2
  50. package/dist/{typings-S6I6IPTG.cjs → typings-LQOBZXSO.cjs} +3 -3
  51. package/dist/typings-formatter.d.ts +19 -0
  52. package/dist/{utils-ZEZ66X6Q.js → utils-IATCUNKF.js} +5 -1
  53. package/dist/utils-ITB4NEL7.cjs +43 -0
  54. package/dist/utils.d.ts +18 -0
  55. package/dist/vm-6D3IIIU7.cjs +12 -0
  56. package/dist/{vm-44H4UKI2.js → vm-QO5FSGPN.js} +2 -1
  57. package/package.json +8 -14
  58. package/dist/dual-modes-ZZY6QPYT.cjs +0 -10
  59. package/dist/exit-LUJY7JIG.cjs +0 -8
  60. package/dist/truncator-7PGEGCHV.cjs +0 -12
  61. package/dist/utils-GLZVMRWO.cjs +0 -39
  62. package/dist/vm-A3OTQVIR.cjs +0 -11
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWWZ2W4WRcjs = require('./chunk-WWZ2W4WR.cjs');
5
+ var _chunk3UZKLXADcjs = require('./chunk-3UZKLXAD.cjs');
6
6
 
7
7
 
8
8
 
@@ -11,13 +11,14 @@ var _chunkWWZ2W4WRcjs = require('./chunk-WWZ2W4WR.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunkMY26EAOPcjs = require('./chunk-MY26EAOP.cjs');
14
+ var _chunkKG5E3UZZcjs = require('./chunk-KG5E3UZZ.cjs');
15
15
 
16
16
 
17
17
 
18
- var _chunkYGKQEVQQcjs = require('./chunk-YGKQEVQQ.cjs');
19
- require('./chunk-ETYFOCWC.cjs');
20
- require('./chunk-DD4AZSP5.cjs');
18
+ var _chunkOVRDJMZJcjs = require('./chunk-OVRDJMZJ.cjs');
19
+ require('./chunk-RGUG3UMF.cjs');
20
+ require('./chunk-PZE6PIPG.cjs');
21
+ require('./chunk-HMMM32RG.cjs');
21
22
 
22
23
 
23
24
 
@@ -31,19 +32,19 @@ var _chunkPK72FAKDcjs = require('./chunk-PK72FAKD.cjs');
31
32
 
32
33
 
33
34
  var _chunkKIN7Y247cjs = require('./chunk-KIN7Y247.cjs');
34
- require('./chunk-D6PU5YAS.cjs');
35
+ require('./chunk-DDSJTR6Q.cjs');
35
36
  require('./chunk-I56MPOVG.cjs');
36
37
 
37
38
 
38
39
  var _chunk5ZF6NTYIcjs = require('./chunk-5ZF6NTYI.cjs');
39
40
 
40
41
 
41
- var _chunkYQT5G77Wcjs = require('./chunk-YQT5G77W.cjs');
42
+ var _chunkHEAQAEFZcjs = require('./chunk-HEAQAEFZ.cjs');
42
43
 
43
44
 
44
45
 
45
46
 
46
- var _chunkFPLSJF4Scjs = require('./chunk-FPLSJF4S.cjs');
47
+ var _chunkGOWPACSKcjs = require('./chunk-GOWPACSK.cjs');
47
48
 
48
49
 
49
50
 
@@ -139,7 +140,7 @@ var generateCode = async ({
139
140
  const traces = iteration.traces;
140
141
  const modelRef = Array.isArray(iteration.model) ? iteration.model[0] : iteration.model;
141
142
  const model = await cognitive.getModelDetails(modelRef).catch((thrown) => {
142
- throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`Failed to fetch model details for model "${modelRef}": ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, thrown)}`);
143
+ throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`Failed to fetch model details for model "${modelRef}": ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, thrown)}`);
143
144
  });
144
145
  let modelLimit = Math.max(model.input.maxTokens, 8e3);
145
146
  if (ctx.maxTokens) {
@@ -151,14 +152,14 @@ var generateCode = async ({
151
152
  }
152
153
  let messages;
153
154
  try {
154
- messages = _chunkYQT5G77Wcjs.truncateWrappedContent.call(void 0, {
155
+ messages = _chunkHEAQAEFZcjs.truncateWrappedContent.call(void 0, {
155
156
  messages: iteration.messages,
156
157
  tokenLimit: modelLimit - responseLengthBuffer,
157
158
  throwOnFailure: true
158
159
  }).filter((x) => typeof x.content !== "string" || x.content.trim().length > 0);
159
160
  } catch (thrown) {
160
161
  const cap = ctx.maxTokens ? ` (context window capped at ${modelLimit} tokens by options.maxTokens \u2014 consider raising or removing it)` : ` (model context window: ${modelLimit} tokens)`;
161
- throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`The prompt does not fit in the context window${cap}: ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, thrown)}`);
162
+ throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`The prompt does not fit in the context window${cap}: ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, thrown)}`);
162
163
  }
163
164
  iteration.messages = messages;
164
165
  traces.push({
@@ -224,7 +225,7 @@ var generateCode = async ({
224
225
  }
225
226
  };
226
227
  if (typeof cognitive.generateContentStream === "function") {
227
- const parser = new (0, _chunkYGKQEVQQcjs.StreamingMessageParser)();
228
+ const parser = new (0, _chunkOVRDJMZJcjs.StreamingMessageParser)();
228
229
  const fence = new LeadingFenceFilter();
229
230
  const streamController = createJoinedAbortController([controller.signal]);
230
231
  const requestedAt = Date.now();
@@ -256,7 +257,7 @@ var generateCode = async ({
256
257
  try {
257
258
  chunk = await nextChunk();
258
259
  } catch (thrown) {
259
- throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`LLM generation failed: ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, thrown)}`);
260
+ throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`LLM generation failed: ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, thrown)}`);
260
261
  }
261
262
  if (chunk.done) {
262
263
  output = chunk.value;
@@ -276,10 +277,10 @@ var generateCode = async ({
276
277
  await dispatchSends(parser.push(remaining));
277
278
  }
278
279
  await dispatchSends(parser.finish());
279
- assistantResponse = _chunkYGKQEVQQcjs.toParsedAssistantResponse.call(void 0, parser.items, raw);
280
+ assistantResponse = _chunkOVRDJMZJcjs.toParsedAssistantResponse.call(void 0, parser.items, raw);
280
281
  } else {
281
282
  output = await cognitive.generateContent(input).catch((thrown) => {
282
- throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`LLM generation failed: ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, thrown)}`);
283
+ throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`LLM generation failed: ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, thrown)}`);
283
284
  });
284
285
  const out = typeof ((_d = (_c = output.output.choices) == null ? void 0 : _c[0]) == null ? void 0 : _d.content) === "string" ? output.output.choices[0].content : null;
285
286
  if (!out) {
@@ -395,7 +396,7 @@ var interpretVMResult = async ({
395
396
  return;
396
397
  }
397
398
  const returnValue = result.return_value;
398
- const codeRequestsInspection = _chunkWWZ2W4WRcjs.hasTopLevelReturn.call(void 0, _nullishCoalesce(iteration.code, () => ( "")));
399
+ const codeRequestsInspection = _chunk3UZKLXADcjs.hasTopLevelReturn.call(void 0, _nullishCoalesce(iteration.code, () => ( "")));
399
400
  if (iteration.next && !codeRequestsInspection) {
400
401
  await applyNextExit({ iteration, controller, onExit });
401
402
  return;
@@ -420,7 +421,7 @@ var applyNextExit = async ({
420
421
  if (!next) {
421
422
  throw new Error("applyNextExit called without a \u25A0next block on the iteration");
422
423
  }
423
- const attempt = (props) => _chunkMY26EAOPcjs.parseExit.call(void 0, Object.keys(props).length ? { action: next.name, value: props } : { action: next.name }, iteration.exits);
424
+ const attempt = (props) => _chunkKG5E3UZZcjs.parseExit.call(void 0, Object.keys(props).length ? { action: next.name, value: props } : { action: next.name }, iteration.exits);
424
425
  let parsedExit = attempt(next.props);
425
426
  const keys = Object.keys(next.props);
426
427
  if (!parsedExit.success && keys.length === 1 && ["props", "value", "data"].includes(keys[0])) {
@@ -458,7 +459,7 @@ var applyNextExit = async ({
458
459
  type: "exit_error",
459
460
  exit_error: {
460
461
  exit: returnExit.name,
461
- message: `Error executing exit ${returnExit.name}: ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, err)}`,
462
+ message: `Error executing exit ${returnExit.name}: ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, err)}`,
462
463
  return_value: returnValue
463
464
  }
464
465
  });
@@ -639,7 +640,7 @@ var buildVMContext = ({
639
640
  onAfterTool
640
641
  }) => {
641
642
  const traces = iteration.traces;
642
- const vmContext = { ..._chunkFPLSJF4Scjs.stripInvalidIdentifiers.call(void 0, iteration.variables) };
643
+ const vmContext = { ..._chunkGOWPACSKcjs.stripInvalidIdentifiers.call(void 0, iteration.variables) };
643
644
  for (const obj of iteration.objects) {
644
645
  const internalValues = {};
645
646
  const instance = {};
@@ -663,7 +664,7 @@ var buildVMContext = ({
663
664
  const parsed = schema.safeParse(value2);
664
665
  if (!parsed.success) {
665
666
  throw new (0, _chunkPK72FAKDcjs.AssignmentError)(
666
- `Invalid value for Object property ${obj.name}.${name}: ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, parsed.error)}`
667
+ `Invalid value for Object property ${obj.name}.${name}: ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, parsed.error)}`
667
668
  );
668
669
  }
669
670
  internalValues[name] = parsed.data;
@@ -714,7 +715,7 @@ var buildVMContext = ({
714
715
  // src/runtime/execute.ts
715
716
  var executeContext = async (props) => {
716
717
  var _a, _b;
717
- await _chunkFPLSJF4Scjs.init.call(void 0, );
718
+ await _chunkGOWPACSKcjs.init.call(void 0, );
718
719
  const result = await executeContextInternal(props);
719
720
  try {
720
721
  (_b = (_a = result.context.chat) == null ? void 0 : _a.onExecutionDone) == null ? void 0 : _b.call(_a, result);
@@ -727,8 +728,8 @@ var executeContextInternal = async (props) => {
727
728
  const controller = createJoinedAbortController([props.signal]);
728
729
  const { onIterationStart, onIterationEnd, onTrace, onExit, onBeforeExecution, onAfterTool, onBeforeTool } = props;
729
730
  const client = _nullishCoalesce(props.client, () => ( new (0, _client.Client)()));
730
- const cognitive = _cognitive.Cognitive.isCognitiveClient(client) || _chunkMY26EAOPcjs._CustomModelClient.isCustomClient(client) ? client : _cognitive.CognitiveBeta.isBetaClient(client) ? _cognitive.cognitiveFromBeta.call(void 0, client) : new (0, _cognitive.Cognitive)({ client, __experimental_beta: true });
731
- const ctx = new (0, _chunkMY26EAOPcjs.Context)({
731
+ const cognitive = _cognitive.Cognitive.isCognitiveClient(client) || _chunkKG5E3UZZcjs._CustomModelClient.isCustomClient(client) ? client : _cognitive.CognitiveBeta.isBetaClient(client) ? _cognitive.cognitiveFromBeta.call(void 0, client) : new (0, _cognitive.Cognitive)({ client, __experimental_beta: true });
732
+ const ctx = new (0, _chunkKG5E3UZZcjs.Context)({
732
733
  chat: props.chat,
733
734
  instructions: props.instructions,
734
735
  objects: props.objects,
@@ -746,7 +747,7 @@ var executeContextInternal = async (props) => {
746
747
  try {
747
748
  while (true) {
748
749
  if (ctx.iterations.length >= ctx.loop) {
749
- return new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, new (0, _chunkPK72FAKDcjs.LoopExceededError)());
750
+ return new (0, _chunkKG5E3UZZcjs.ErrorExecutionResult)(ctx, new (0, _chunkPK72FAKDcjs.LoopExceededError)());
750
751
  }
751
752
  const iteration = await ctx.nextIteration();
752
753
  const unsubscribeTrace = iteration.traces.onPush((traces) => {
@@ -777,7 +778,7 @@ var executeContextInternal = async (props) => {
777
778
  }
778
779
  }
779
780
  });
780
- return new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")));
781
+ return new (0, _chunkKG5E3UZZcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")));
781
782
  }
782
783
  const iterationResult = await executeIterationWithErrorHandling({
783
784
  iteration,
@@ -807,7 +808,7 @@ var executeContextInternal = async (props) => {
807
808
  }
808
809
  }
809
810
  } catch (error) {
810
- return new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(error, () => ( "Unknown error")));
811
+ return new (0, _chunkKG5E3UZZcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(error, () => ( "Unknown error")));
811
812
  }
812
813
  };
813
814
  var executeIterationStartHook = async ({
@@ -837,7 +838,7 @@ var executeIterationStartHook = async ({
837
838
  } : {
838
839
  type: "execution_error",
839
840
  execution_error: {
840
- message: `Error in onIterationStart hook: ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, err)}`,
841
+ message: `Error in onIterationStart hook: ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, err)}`,
841
842
  stack: _chunkKIN7Y247cjs.cleanStackTrace.call(void 0,
842
843
  err instanceof Error ? _nullishCoalesce(err.stack, () => ( "No stack trace available")) : "No stack trace available"
843
844
  )
@@ -882,7 +883,7 @@ var executeIterationWithErrorHandling = async ({
882
883
  status: iteration.status.type === "pending" ? {
883
884
  type: "execution_error",
884
885
  execution_error: {
885
- message: "An unexpected error occurred: " + _chunkFPLSJF4Scjs.getErrorMessage.call(void 0, err),
886
+ message: "An unexpected error occurred: " + _chunkGOWPACSKcjs.getErrorMessage.call(void 0, err),
886
887
  stack: _chunkKIN7Y247cjs.cleanStackTrace.call(void 0,
887
888
  err instanceof Error ? _nullishCoalesce(err.stack, () => ( "No stack trace available")) : "No stack trace available"
888
889
  )
@@ -894,7 +895,7 @@ var executeIterationWithErrorHandling = async ({
894
895
  if (!controller.signal.aborted) {
895
896
  return {
896
897
  type: "return",
897
- result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, err)
898
+ result: new (0, _chunkKG5E3UZZcjs.ErrorExecutionResult)(ctx, err)
898
899
  };
899
900
  }
900
901
  await finalizeIteration({
@@ -910,7 +911,7 @@ var executeIterationWithErrorHandling = async ({
910
911
  });
911
912
  return {
912
913
  type: "return",
913
- result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")))
914
+ result: new (0, _chunkKG5E3UZZcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")))
914
915
  };
915
916
  }
916
917
  };
@@ -922,7 +923,7 @@ var transformIterationResult = ({
922
923
  const exitName = iteration.status.exit_success.exit_name;
923
924
  return {
924
925
  type: "return",
925
- result: new (0, _chunkMY26EAOPcjs.SuccessExecutionResult)(ctx, {
926
+ result: new (0, _chunkKG5E3UZZcjs.SuccessExecutionResult)(ctx, {
926
927
  exit: iteration.exits.find((x) => x.name === exitName),
927
928
  result: iteration.status.exit_success.return_value
928
929
  })
@@ -931,17 +932,17 @@ var transformIterationResult = ({
931
932
  if (iteration.status.type === "callback_requested") {
932
933
  return {
933
934
  type: "return",
934
- result: new (0, _chunkMY26EAOPcjs.PartialExecutionResult)(
935
+ result: new (0, _chunkKG5E3UZZcjs.PartialExecutionResult)(
935
936
  ctx,
936
937
  iteration.status.callback_requested.signal,
937
- _chunkMY26EAOPcjs.Snapshot.fromSignal(iteration.status.callback_requested.signal)
938
+ _chunkKG5E3UZZcjs.Snapshot.fromSignal(iteration.status.callback_requested.signal)
938
939
  )
939
940
  };
940
941
  }
941
942
  if (iteration.status.type === "aborted") {
942
943
  return {
943
944
  type: "return",
944
- result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( "The operation was aborted")))
945
+ result: new (0, _chunkKG5E3UZZcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( "The operation was aborted")))
945
946
  };
946
947
  }
947
948
  if (iteration.status.type === "thinking_requested" || iteration.status.type === "exit_error" || iteration.status.type === "execution_error" || iteration.status.type === "invalid_code_error") {
@@ -949,7 +950,7 @@ var transformIterationResult = ({
949
950
  }
950
951
  return {
951
952
  type: "return",
952
- result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( `Unknown error. Status: ${iteration.status.type}`)))
953
+ result: new (0, _chunkKG5E3UZZcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( `Unknown error. Status: ${iteration.status.type}`)))
953
954
  };
954
955
  };
955
956
  var executeIteration = async ({
@@ -966,10 +967,10 @@ var executeIteration = async ({
966
967
  var _a, _b;
967
968
  const runCode = (code) => {
968
969
  const vmContext = buildVMContext({ ctx, iteration, controller, onBeforeTool, onAfterTool });
969
- return _chunkWWZ2W4WRcjs.runAsyncFunction.call(void 0, vmContext, code, iteration.traces, controller.signal, ctx.timeout).catch((err) => {
970
+ return _chunk3UZKLXADcjs.runAsyncFunction.call(void 0, vmContext, code, iteration.traces, controller.signal, ctx.timeout).catch((err) => {
970
971
  return {
971
972
  success: false,
972
- error: err instanceof Error ? err : new Error(_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, err)),
973
+ error: err instanceof Error ? err : new Error(_chunkGOWPACSKcjs.getErrorMessage.call(void 0, err)),
973
974
  lines_executed: [],
974
975
  traces: [],
975
976
  variables: {}
@@ -985,7 +986,7 @@ var executeIteration = async ({
985
986
  controller,
986
987
  metadata,
987
988
  // Pre-warm the VM while the model is still writing the ■run block
988
- onRunStart: () => _chunkWWZ2W4WRcjs.warmupVM.call(void 0, ),
989
+ onRunStart: () => _chunk3UZKLXADcjs.warmupVM.call(void 0, ),
989
990
  onRunComplete: canExecuteEarly ? (code) => {
990
991
  if (!code.length || controller.signal.aborted || earlyExecution) {
991
992
  return;
@@ -1006,7 +1007,7 @@ var executeIteration = async ({
1006
1007
  try {
1007
1008
  await ctx.chat.handler(component);
1008
1009
  } catch (err) {
1009
- throw new Error(`Error while sending message (\u25A0send=${send.name}): ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, err)}`);
1010
+ throw new Error(`Error while sending message (\u25A0send=${send.name}): ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, err)}`);
1010
1011
  }
1011
1012
  iteration.traces.push({ type: "yield", value: component, started_at: sendStartedAt, ended_at: Date.now() });
1012
1013
  },
@@ -1035,7 +1036,7 @@ var executeIteration = async ({
1035
1036
  iteration.end({
1036
1037
  type: "execution_error",
1037
1038
  execution_error: {
1038
- message: `Error in onBeforeExecution hook: ${_chunkFPLSJF4Scjs.getErrorMessage.call(void 0, err)}`,
1039
+ message: `Error in onBeforeExecution hook: ${_chunkGOWPACSKcjs.getErrorMessage.call(void 0, err)}`,
1039
1040
  stack: _chunkKIN7Y247cjs.cleanStackTrace.call(void 0,
1040
1041
  err instanceof Error ? _nullishCoalesce(err.stack, () => ( "No stack trace available")) : "No stack trace available"
1041
1042
  )
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkDDSJTR6Qcjs = require('./chunk-DDSJTR6Q.cjs');
4
+ require('./chunk-GOWPACSK.cjs');
5
+ require('./chunk-HC2QZTVT.cjs');
6
+
7
+
8
+ exports.Exit = _chunkDDSJTR6Qcjs.Exit;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Exit
3
- } from "./chunk-XVVYNOTX.js";
4
- import "./chunk-YX27XM67.js";
3
+ } from "./chunk-HB2G32AK.js";
4
+ import "./chunk-GLXADNTR.js";
5
5
  import "./chunk-34GJUS6U.js";
6
6
  export {
7
7
  Exit
package/dist/exit.d.ts CHANGED
@@ -235,7 +235,7 @@ export declare class Exit<T = unknown> implements Serializable<Exit.JSON> {
235
235
  * Returns the Zod schema equivalent of the JSON schema (if available).
236
236
  * Used internally for validation and type inference.
237
237
  */
238
- get zSchema(): import("@bpinternal/zui").ZodTypeAny | undefined;
238
+ get zSchema(): import("@bpinternal/zui").ZodType<any, import("@bpinternal/zui").ZodTypeDef, any> | undefined;
239
239
  /**
240
240
  * Renames the exit and updates aliases accordingly.
241
241
  *