llmz 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
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 _chunk7LMIOS6Hcjs = require('./chunk-7LMIOS6H.cjs');
3
+ var _chunkDD4AZSP5cjs = require('./chunk-DD4AZSP5.cjs');
4
4
 
5
5
 
6
6
 
@@ -548,7 +548,7 @@ var Tool = (_class = class _Tool {
548
548
  input = convertObjectToZuiLiterals(this._staticInputValues);
549
549
  }
550
550
  const fnType = _zui.z.function(input, _zui.z.promise(output)).title(this.name).describe(_nullishCoalesce(this.description, () => ( "")));
551
- return _chunk7LMIOS6Hcjs.getTypings.call(void 0, fnType, {
551
+ return _chunkDD4AZSP5cjs.getTypings.call(void 0, fnType, {
552
552
  declaration: true
553
553
  });
554
554
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTypings
3
- } from "./chunk-TOGYDN6U.js";
3
+ } from "./chunk-665O7CAN.js";
4
4
  import {
5
5
  isJsonSchema,
6
6
  isValidIdentifier,
@@ -5,7 +5,7 @@
5
5
  var _chunkYGKQEVQQcjs = require('./chunk-YGKQEVQQ.cjs');
6
6
 
7
7
 
8
- var _chunkWODK7Y4Jcjs = require('./chunk-WODK7Y4J.cjs');
8
+ var _chunkETYFOCWCcjs = require('./chunk-ETYFOCWC.cjs');
9
9
 
10
10
 
11
11
  var _chunkPK72FAKDcjs = require('./chunk-PK72FAKD.cjs');
@@ -1341,7 +1341,7 @@ var Context = (_class2 = class {
1341
1341
  var _a, _b;
1342
1342
  const instructions = await getValue(this.instructions, this);
1343
1343
  const transcript = new TranscriptArray(await getValue(_nullishCoalesce(((_a = this.chat) == null ? void 0 : _a.transcript), () => ( [])), this));
1344
- const tools = _chunkWODK7Y4Jcjs.Tool.withUniqueNames(await _asyncNullishCoalesce(await getValue(this.tools, this), async () => ( [])));
1344
+ const tools = _chunkETYFOCWCcjs.Tool.withUniqueNames(await _asyncNullishCoalesce(await getValue(this.tools, this), async () => ( [])));
1345
1345
  const objects = await _asyncNullishCoalesce(await getValue(this.objects, this), async () => ( []));
1346
1346
  const exits = await _asyncNullishCoalesce(await getValue(this.exits, this), async () => ( []));
1347
1347
  const components = await getValue(_nullishCoalesce(((_b = this.chat) == null ? void 0 : _b.components), () => ( [])), this);
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-E5NHK3FS.js";
6
6
  import {
7
7
  Tool
8
- } from "./chunk-IRCB4FRM.js";
8
+ } from "./chunk-GC5IQDGV.js";
9
9
  import {
10
10
  LoopExceededError
11
11
  } from "./chunk-WSVDMGMR.js";
@@ -11,13 +11,13 @@ var _chunkWWZ2W4WRcjs = require('./chunk-WWZ2W4WR.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunkIKLFMVSWcjs = require('./chunk-IKLFMVSW.cjs');
14
+ var _chunkMY26EAOPcjs = require('./chunk-MY26EAOP.cjs');
15
15
 
16
16
 
17
17
 
18
18
  var _chunkYGKQEVQQcjs = require('./chunk-YGKQEVQQ.cjs');
19
- require('./chunk-WODK7Y4J.cjs');
20
- require('./chunk-7LMIOS6H.cjs');
19
+ require('./chunk-ETYFOCWC.cjs');
20
+ require('./chunk-DD4AZSP5.cjs');
21
21
 
22
22
 
23
23
 
@@ -420,7 +420,7 @@ var applyNextExit = async ({
420
420
  if (!next) {
421
421
  throw new Error("applyNextExit called without a \u25A0next block on the iteration");
422
422
  }
423
- const attempt = (props) => _chunkIKLFMVSWcjs.parseExit.call(void 0, Object.keys(props).length ? { action: next.name, value: props } : { action: next.name }, iteration.exits);
423
+ const attempt = (props) => _chunkMY26EAOPcjs.parseExit.call(void 0, Object.keys(props).length ? { action: next.name, value: props } : { action: next.name }, iteration.exits);
424
424
  let parsedExit = attempt(next.props);
425
425
  const keys = Object.keys(next.props);
426
426
  if (!parsedExit.success && keys.length === 1 && ["props", "value", "data"].includes(keys[0])) {
@@ -727,8 +727,8 @@ var executeContextInternal = async (props) => {
727
727
  const controller = createJoinedAbortController([props.signal]);
728
728
  const { onIterationStart, onIterationEnd, onTrace, onExit, onBeforeExecution, onAfterTool, onBeforeTool } = props;
729
729
  const client = _nullishCoalesce(props.client, () => ( new (0, _client.Client)()));
730
- const cognitive = _cognitive.Cognitive.isCognitiveClient(client) || _chunkIKLFMVSWcjs._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, _chunkIKLFMVSWcjs.Context)({
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)({
732
732
  chat: props.chat,
733
733
  instructions: props.instructions,
734
734
  objects: props.objects,
@@ -746,7 +746,7 @@ var executeContextInternal = async (props) => {
746
746
  try {
747
747
  while (true) {
748
748
  if (ctx.iterations.length >= ctx.loop) {
749
- return new (0, _chunkIKLFMVSWcjs.ErrorExecutionResult)(ctx, new (0, _chunkPK72FAKDcjs.LoopExceededError)());
749
+ return new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, new (0, _chunkPK72FAKDcjs.LoopExceededError)());
750
750
  }
751
751
  const iteration = await ctx.nextIteration();
752
752
  const unsubscribeTrace = iteration.traces.onPush((traces) => {
@@ -777,7 +777,7 @@ var executeContextInternal = async (props) => {
777
777
  }
778
778
  }
779
779
  });
780
- return new (0, _chunkIKLFMVSWcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")));
780
+ return new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")));
781
781
  }
782
782
  const iterationResult = await executeIterationWithErrorHandling({
783
783
  iteration,
@@ -807,7 +807,7 @@ var executeContextInternal = async (props) => {
807
807
  }
808
808
  }
809
809
  } catch (error) {
810
- return new (0, _chunkIKLFMVSWcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(error, () => ( "Unknown error")));
810
+ return new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(error, () => ( "Unknown error")));
811
811
  }
812
812
  };
813
813
  var executeIterationStartHook = async ({
@@ -894,7 +894,7 @@ var executeIterationWithErrorHandling = async ({
894
894
  if (!controller.signal.aborted) {
895
895
  return {
896
896
  type: "return",
897
- result: new (0, _chunkIKLFMVSWcjs.ErrorExecutionResult)(ctx, err)
897
+ result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, err)
898
898
  };
899
899
  }
900
900
  await finalizeIteration({
@@ -910,7 +910,7 @@ var executeIterationWithErrorHandling = async ({
910
910
  });
911
911
  return {
912
912
  type: "return",
913
- result: new (0, _chunkIKLFMVSWcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")))
913
+ result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(controller.signal.reason, () => ( "The operation was aborted")))
914
914
  };
915
915
  }
916
916
  };
@@ -922,7 +922,7 @@ var transformIterationResult = ({
922
922
  const exitName = iteration.status.exit_success.exit_name;
923
923
  return {
924
924
  type: "return",
925
- result: new (0, _chunkIKLFMVSWcjs.SuccessExecutionResult)(ctx, {
925
+ result: new (0, _chunkMY26EAOPcjs.SuccessExecutionResult)(ctx, {
926
926
  exit: iteration.exits.find((x) => x.name === exitName),
927
927
  result: iteration.status.exit_success.return_value
928
928
  })
@@ -931,17 +931,17 @@ var transformIterationResult = ({
931
931
  if (iteration.status.type === "callback_requested") {
932
932
  return {
933
933
  type: "return",
934
- result: new (0, _chunkIKLFMVSWcjs.PartialExecutionResult)(
934
+ result: new (0, _chunkMY26EAOPcjs.PartialExecutionResult)(
935
935
  ctx,
936
936
  iteration.status.callback_requested.signal,
937
- _chunkIKLFMVSWcjs.Snapshot.fromSignal(iteration.status.callback_requested.signal)
937
+ _chunkMY26EAOPcjs.Snapshot.fromSignal(iteration.status.callback_requested.signal)
938
938
  )
939
939
  };
940
940
  }
941
941
  if (iteration.status.type === "aborted") {
942
942
  return {
943
943
  type: "return",
944
- result: new (0, _chunkIKLFMVSWcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( "The operation was aborted")))
944
+ result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( "The operation was aborted")))
945
945
  };
946
946
  }
947
947
  if (iteration.status.type === "thinking_requested" || iteration.status.type === "exit_error" || iteration.status.type === "execution_error" || iteration.status.type === "invalid_code_error") {
@@ -949,7 +949,7 @@ var transformIterationResult = ({
949
949
  }
950
950
  return {
951
951
  type: "return",
952
- result: new (0, _chunkIKLFMVSWcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( `Unknown error. Status: ${iteration.status.type}`)))
952
+ result: new (0, _chunkMY26EAOPcjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( `Unknown error. Status: ${iteration.status.type}`)))
953
953
  };
954
954
  };
955
955
  var executeIteration = async ({
@@ -11,13 +11,13 @@ import {
11
11
  SuccessExecutionResult,
12
12
  _CustomModelClient,
13
13
  parseExit
14
- } from "./chunk-33AB6SVX.js";
14
+ } from "./chunk-ZWUWCRHG.js";
15
15
  import {
16
16
  StreamingMessageParser,
17
17
  toParsedAssistantResponse
18
18
  } from "./chunk-E5NHK3FS.js";
19
- import "./chunk-IRCB4FRM.js";
20
- import "./chunk-TOGYDN6U.js";
19
+ import "./chunk-GC5IQDGV.js";
20
+ import "./chunk-665O7CAN.js";
21
21
  import {
22
22
  AssignmentError,
23
23
  CodeExecutionError,
@@ -1,5 +1,4 @@
1
- import { format } from 'prettier/standalone';
2
- export type CodeFormatOptions = Parameters<typeof format>[1] & {
1
+ export type CodeFormatOptions = {
3
2
  throwOnError?: boolean;
4
3
  };
5
4
  export declare function formatTypings(typings: string, options?: CodeFormatOptions): Promise<string>;
package/dist/index.cjs CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
 
12
12
 
13
- var _chunkIKLFMVSWcjs = require('./chunk-IKLFMVSW.cjs');
13
+ var _chunkMY26EAOPcjs = require('./chunk-MY26EAOP.cjs');
14
14
 
15
15
 
16
16
 
@@ -20,11 +20,11 @@ var _chunkIKLFMVSWcjs = require('./chunk-IKLFMVSW.cjs');
20
20
  var _chunkYGKQEVQQcjs = require('./chunk-YGKQEVQQ.cjs');
21
21
 
22
22
 
23
- var _chunkWODK7Y4Jcjs = require('./chunk-WODK7Y4J.cjs');
23
+ var _chunkETYFOCWCcjs = require('./chunk-ETYFOCWC.cjs');
24
24
 
25
25
 
26
26
 
27
- var _chunk7LMIOS6Hcjs = require('./chunk-7LMIOS6H.cjs');
27
+ var _chunkDD4AZSP5cjs = require('./chunk-DD4AZSP5.cjs');
28
28
 
29
29
 
30
30
 
@@ -62,7 +62,7 @@ var _chunkFPLSJF4Scjs = require('./chunk-FPLSJF4S.cjs');
62
62
  var _chunkHC2QZTVTcjs = require('./chunk-HC2QZTVT.cjs');
63
63
 
64
64
  // package.json
65
- var version = "0.2.0";
65
+ var version = "0.2.1";
66
66
 
67
67
  // src/objects.ts
68
68
  var _zui = require('@bpinternal/zui');
@@ -314,7 +314,7 @@ async function hoistTypings(code, formatOptions) {
314
314
  break;
315
315
  }
316
316
  }
317
- return _chunk7LMIOS6Hcjs.formatTypings.call(void 0, code, formatOptions);
317
+ return _chunkDD4AZSP5cjs.formatTypings.call(void 0, code, formatOptions);
318
318
  }
319
319
 
320
320
  // src/objects.ts
@@ -440,7 +440,7 @@ var ObjectInstance = class {
440
440
  this.description = props.description;
441
441
  this.metadata = _nullishCoalesce(props.metadata, () => ( {}));
442
442
  this.properties = props.properties;
443
- this.tools = _chunkWODK7Y4Jcjs.Tool.withUniqueNames(_nullishCoalesce(props.tools, () => ( [])));
443
+ this.tools = _chunkETYFOCWCcjs.Tool.withUniqueNames(_nullishCoalesce(props.tools, () => ( [])));
444
444
  }
445
445
  /**
446
446
  * Generates TypeScript namespace declarations for this object.
@@ -521,7 +521,7 @@ function getObjectTypings(obj) {
521
521
  }
522
522
  let type = "unknown";
523
523
  if (prop.type) {
524
- type = await _chunk7LMIOS6Hcjs.getTypings.call(void 0, prop.type, {});
524
+ type = await _chunkDD4AZSP5cjs.getTypings.call(void 0, prop.type, {});
525
525
  } else if (prop.value !== void 0) {
526
526
  type = typeof prop.value;
527
527
  }
@@ -541,7 +541,7 @@ function getObjectTypings(obj) {
541
541
  typings.push("");
542
542
  for (const tool of obj.tools) {
543
543
  const fnType = _zui.z.function(tool.zInput, tool.zOutput).title(tool.name).describe(_nullishCoalesce(tool.description, () => ( "")));
544
- let temp = await _chunk7LMIOS6Hcjs.getTypings.call(void 0, fnType, {
544
+ let temp = await _chunkDD4AZSP5cjs.getTypings.call(void 0, fnType, {
545
545
  declaration: true
546
546
  });
547
547
  temp = temp.replace("declare function ", "function ");
@@ -564,7 +564,7 @@ function getObjectTypings(obj) {
564
564
  if ((_a = obj.description) == null ? void 0 : _a.trim().length) {
565
565
  header = _chunkFPLSJF4Scjs.getMultilineComment.call(void 0, obj.description);
566
566
  }
567
- return _chunk7LMIOS6Hcjs.formatTypings.call(void 0,
567
+ return _chunkDD4AZSP5cjs.formatTypings.call(void 0,
568
568
  `${header}
569
569
  export namespace ${obj.name} {
570
570
  ${body}
@@ -1572,19 +1572,19 @@ var utils = {
1572
1572
  stripTruncationTags: _chunkYQT5G77Wcjs.stripTruncationTags
1573
1573
  };
1574
1574
  var execute = async (props) => {
1575
- const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./execute-BXPFSEVX.cjs")));
1575
+ const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./execute-2AGZ5QUN.cjs")));
1576
1576
  return executeContext(props);
1577
1577
  };
1578
1578
  var init = async () => {
1579
- await Promise.resolve().then(() => _interopRequireWildcard(require("./execute-BXPFSEVX.cjs")));
1579
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./execute-2AGZ5QUN.cjs")));
1580
1580
  await Promise.resolve().then(() => _interopRequireWildcard(require("./component-2NYFY6CW.cjs")));
1581
- await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-GJ6ZXWS2.cjs")));
1581
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-V55GD2FS.cjs")));
1582
1582
  await Promise.resolve().then(() => _interopRequireWildcard(require("./exit-LUJY7JIG.cjs")));
1583
1583
  await Promise.resolve().then(() => _interopRequireWildcard(require("./jsx-ULPWX5TW.cjs")));
1584
1584
  await Promise.resolve().then(() => _interopRequireWildcard(require("./vm-A3OTQVIR.cjs")));
1585
1585
  await Promise.resolve().then(() => _interopRequireWildcard(require("./utils-GLZVMRWO.cjs")));
1586
1586
  await Promise.resolve().then(() => _interopRequireWildcard(require("./truncator-7PGEGCHV.cjs")));
1587
- await Promise.resolve().then(() => _interopRequireWildcard(require("./typings-ZTFPPA5W.cjs")));
1587
+ await Promise.resolve().then(() => _interopRequireWildcard(require("./typings-S6I6IPTG.cjs")));
1588
1588
  await Promise.resolve().then(() => _interopRequireWildcard(require("./dual-modes-ZZY6QPYT.cjs")));
1589
1589
  };
1590
1590
 
@@ -1636,4 +1636,4 @@ var init = async () => {
1636
1636
 
1637
1637
 
1638
1638
 
1639
- exports.BaseResponse = BaseResponse; exports.Chat = Chat; exports.CitationsManager = CitationsManager; exports.Component = _chunkI56MPOVGcjs.Component; exports.ComponentRegistry = ComponentRegistry; exports.DefaultComponents = DefaultComponents; exports.DefaultExit = _chunkIKLFMVSWcjs.DefaultExit; exports.ErrorExecutionResult = _chunkIKLFMVSWcjs.ErrorExecutionResult; exports.ExecutionResult = _chunkIKLFMVSWcjs.ExecutionResult; exports.Exit = _chunkD6PU5YAScjs.Exit; exports.ListenExit = _chunkIKLFMVSWcjs.ListenExit; exports.LoopExceededError = _chunkPK72FAKDcjs.LoopExceededError; exports.MARKER = _chunkYGKQEVQQcjs.MARKER; exports.NAME_REGEX = _chunkYGKQEVQQcjs.NAME_REGEX; exports.NextResponse = NextResponse; exports.ObjectInstance = ObjectInstance; exports.PartialExecutionResult = _chunkIKLFMVSWcjs.PartialExecutionResult; exports.ReplayableAsyncIterable = ReplayableAsyncIterable; exports.RunResponse = RunResponse; exports.SendResponse = SendResponse; exports.Snapshot = _chunkIKLFMVSWcjs.Snapshot; exports.SnapshotSignal = _chunkPK72FAKDcjs.SnapshotSignal; exports.StreamingMessageParser = _chunkYGKQEVQQcjs.StreamingMessageParser; exports.SuccessExecutionResult = _chunkIKLFMVSWcjs.SuccessExecutionResult; exports.ThinkExit = _chunkIKLFMVSWcjs.ThinkExit; exports.ThinkSignal = _chunkPK72FAKDcjs.ThinkSignal; exports.Tool = _chunkWODK7Y4Jcjs.Tool; exports._CustomModelClient = _chunkIKLFMVSWcjs._CustomModelClient; exports.assertValidComponent = _chunkI56MPOVGcjs.assertValidComponent; exports.collectText = collectText; exports.execute = execute; exports.generateInstructions = _chunkYGKQEVQQcjs.generateInstructions; exports.getValue = _chunkIKLFMVSWcjs.getValue; exports.init = init; exports.isAnyComponent = _chunkI56MPOVGcjs.isAnyComponent; exports.isComponent = _chunkI56MPOVGcjs.isComponent; exports.normalizeComponentDefinition = normalizeComponentDefinition; exports.normalizeComponentName = normalizeComponentName; exports.normalizePropsSchema = normalizePropsSchema; exports.parseExit = _chunkIKLFMVSWcjs.parseExit; exports.parseStream = parseStream; exports.parseText = parseText; exports.sanitizeMessageText = sanitizeMessageText; exports.tryParseJson = _chunkYGKQEVQQcjs.tryParseJson; exports.utils = utils; exports.validateComponent = validateComponent; exports.validateProps = validateProps; exports.version = version;
1639
+ exports.BaseResponse = BaseResponse; exports.Chat = Chat; exports.CitationsManager = CitationsManager; exports.Component = _chunkI56MPOVGcjs.Component; exports.ComponentRegistry = ComponentRegistry; exports.DefaultComponents = DefaultComponents; exports.DefaultExit = _chunkMY26EAOPcjs.DefaultExit; exports.ErrorExecutionResult = _chunkMY26EAOPcjs.ErrorExecutionResult; exports.ExecutionResult = _chunkMY26EAOPcjs.ExecutionResult; exports.Exit = _chunkD6PU5YAScjs.Exit; exports.ListenExit = _chunkMY26EAOPcjs.ListenExit; exports.LoopExceededError = _chunkPK72FAKDcjs.LoopExceededError; exports.MARKER = _chunkYGKQEVQQcjs.MARKER; exports.NAME_REGEX = _chunkYGKQEVQQcjs.NAME_REGEX; exports.NextResponse = NextResponse; exports.ObjectInstance = ObjectInstance; exports.PartialExecutionResult = _chunkMY26EAOPcjs.PartialExecutionResult; exports.ReplayableAsyncIterable = ReplayableAsyncIterable; exports.RunResponse = RunResponse; exports.SendResponse = SendResponse; exports.Snapshot = _chunkMY26EAOPcjs.Snapshot; exports.SnapshotSignal = _chunkPK72FAKDcjs.SnapshotSignal; exports.StreamingMessageParser = _chunkYGKQEVQQcjs.StreamingMessageParser; exports.SuccessExecutionResult = _chunkMY26EAOPcjs.SuccessExecutionResult; exports.ThinkExit = _chunkMY26EAOPcjs.ThinkExit; exports.ThinkSignal = _chunkPK72FAKDcjs.ThinkSignal; exports.Tool = _chunkETYFOCWCcjs.Tool; exports._CustomModelClient = _chunkMY26EAOPcjs._CustomModelClient; exports.assertValidComponent = _chunkI56MPOVGcjs.assertValidComponent; exports.collectText = collectText; exports.execute = execute; exports.generateInstructions = _chunkYGKQEVQQcjs.generateInstructions; exports.getValue = _chunkMY26EAOPcjs.getValue; exports.init = init; exports.isAnyComponent = _chunkI56MPOVGcjs.isAnyComponent; exports.isComponent = _chunkI56MPOVGcjs.isComponent; exports.normalizeComponentDefinition = normalizeComponentDefinition; exports.normalizeComponentName = normalizeComponentName; exports.normalizePropsSchema = normalizePropsSchema; exports.parseExit = _chunkMY26EAOPcjs.parseExit; exports.parseStream = parseStream; exports.parseText = parseText; exports.sanitizeMessageText = sanitizeMessageText; exports.tryParseJson = _chunkYGKQEVQQcjs.tryParseJson; exports.utils = utils; exports.validateComponent = validateComponent; exports.validateProps = validateProps; exports.version = version;
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  _CustomModelClient,
11
11
  getValue,
12
12
  parseExit
13
- } from "./chunk-33AB6SVX.js";
13
+ } from "./chunk-ZWUWCRHG.js";
14
14
  import {
15
15
  MARKER,
16
16
  NAME_REGEX,
@@ -20,11 +20,11 @@ import {
20
20
  } from "./chunk-E5NHK3FS.js";
21
21
  import {
22
22
  Tool
23
- } from "./chunk-IRCB4FRM.js";
23
+ } from "./chunk-GC5IQDGV.js";
24
24
  import {
25
25
  formatTypings,
26
26
  getTypings
27
- } from "./chunk-TOGYDN6U.js";
27
+ } from "./chunk-665O7CAN.js";
28
28
  import {
29
29
  CodeFormattingError,
30
30
  LoopExceededError,
@@ -62,7 +62,7 @@ import {
62
62
  } from "./chunk-34GJUS6U.js";
63
63
 
64
64
  // package.json
65
- var version = "0.2.0";
65
+ var version = "0.2.1";
66
66
 
67
67
  // src/objects.ts
68
68
  import { z } from "@bpinternal/zui";
@@ -1572,19 +1572,19 @@ var utils = {
1572
1572
  stripTruncationTags
1573
1573
  };
1574
1574
  var execute = async (props) => {
1575
- const { executeContext } = await import("./execute-HIRXXR6X.js");
1575
+ const { executeContext } = await import("./execute-LNUBLVMZ.js");
1576
1576
  return executeContext(props);
1577
1577
  };
1578
1578
  var init = async () => {
1579
- await import("./execute-HIRXXR6X.js");
1579
+ await import("./execute-LNUBLVMZ.js");
1580
1580
  await import("./component-ASNZHQUR.js");
1581
- await import("./tool-DNHVW3KC.js");
1581
+ await import("./tool-HTAYKIA2.js");
1582
1582
  await import("./exit-VJATJTQI.js");
1583
1583
  await import("./jsx-DDZ63UUF.js");
1584
1584
  await import("./vm-44H4UKI2.js");
1585
1585
  await import("./utils-ZEZ66X6Q.js");
1586
1586
  await import("./truncator-OZOBNYON.js");
1587
- await import("./typings-3YV3RDMP.js");
1587
+ await import("./typings-SCKZCAPN.js");
1588
1588
  await import("./dual-modes-RMF7V7ZQ.js");
1589
1589
  };
1590
1590
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Tool
3
- } from "./chunk-IRCB4FRM.js";
4
- import "./chunk-TOGYDN6U.js";
3
+ } from "./chunk-GC5IQDGV.js";
4
+ import "./chunk-665O7CAN.js";
5
5
  import "./chunk-WSVDMGMR.js";
6
6
  import "./chunk-YEAWWJSJ.js";
7
7
  import "./chunk-YX27XM67.js";
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWODK7Y4Jcjs = require('./chunk-WODK7Y4J.cjs');
4
- require('./chunk-7LMIOS6H.cjs');
3
+ var _chunkETYFOCWCcjs = require('./chunk-ETYFOCWC.cjs');
4
+ require('./chunk-DD4AZSP5.cjs');
5
5
  require('./chunk-PK72FAKD.cjs');
6
6
  require('./chunk-KIN7Y247.cjs');
7
7
  require('./chunk-FPLSJF4S.cjs');
8
8
  require('./chunk-HC2QZTVT.cjs');
9
9
 
10
10
 
11
- exports.Tool = _chunkWODK7Y4Jcjs.Tool;
11
+ exports.Tool = _chunkETYFOCWCcjs.Tool;
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk7LMIOS6Hcjs = require('./chunk-7LMIOS6H.cjs');
3
+ var _chunkDD4AZSP5cjs = require('./chunk-DD4AZSP5.cjs');
4
4
  require('./chunk-PK72FAKD.cjs');
5
5
  require('./chunk-KIN7Y247.cjs');
6
6
  require('./chunk-FPLSJF4S.cjs');
7
7
  require('./chunk-HC2QZTVT.cjs');
8
8
 
9
9
 
10
- exports.getTypings = _chunk7LMIOS6Hcjs.getTypings;
10
+ exports.getTypings = _chunkDD4AZSP5cjs.getTypings;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTypings
3
- } from "./chunk-TOGYDN6U.js";
3
+ } from "./chunk-665O7CAN.js";
4
4
  import "./chunk-WSVDMGMR.js";
5
5
  import "./chunk-YEAWWJSJ.js";
6
6
  import "./chunk-YX27XM67.js";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A minimal, dependency-free formatter for the TypeScript typings generated by
3
+ * llmz (typings.ts, objects.ts, hoist.ts). It supports only the small grammar
4
+ * those generators emit — type expressions, `declare const` / `declare function`
5
+ * declarations, `type` aliases and `export namespace` blocks — and produces
6
+ * prettier-like output: 80 columns, 2-space indent, no semicolons in broken
7
+ * objects, hugged single-object function params, unions wrapped with leading `|`.
8
+ *
9
+ * If the input cannot be tokenized or has unbalanced brackets, it is returned
10
+ * unchanged.
11
+ */
12
+ /** Formats typings, throwing on input it cannot parse (unbalanced brackets, etc.) */
13
+ export declare function formatTypingsUnsafe(typings: string): string;
14
+ /** Formats typings, returning the input unchanged when it cannot be parsed */
15
+ export declare function formatTypings(typings: string): string;
@@ -0,0 +1 @@
1
+ export {};
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.2.0",
5
+ "version": "0.2.1",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.js",
@@ -42,9 +42,7 @@
42
42
  "json5": "^2.2.3",
43
43
  "jsonrepair": "^3.10.0",
44
44
  "lodash-es": "^4.17.21",
45
- "lru-cache": "~11.0.2",
46
45
  "ms": "^2.1.3",
47
- "prettier": "^3.4.2",
48
46
  "quickjs-emscripten-core": "^0.31.0",
49
47
  "ulid": "^2.3.0"
50
48
  },
@@ -66,6 +64,7 @@
66
64
  "dotenv": "^16.4.4",
67
65
  "esbuild": "^0.25.10",
68
66
  "glob": "^9.3.4",
67
+ "prettier": "^3.4.2",
69
68
  "source-map-js": "1.2.1",
70
69
  "tsup": "^8.0.2",
71
70
  "tsx": "^4.19.2"