llmz 0.0.37 → 0.0.40
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.
- package/dist/{chunk-6RFV7TZ5.cjs → chunk-4NQXHRJ2.cjs} +3 -3
- package/dist/{chunk-PUFOVD74.js → chunk-6PIIXJNI.js} +1 -0
- package/dist/{chunk-WP7SDPJ6.cjs → chunk-RUOMTFUI.cjs} +1 -0
- package/dist/{chunk-NOIIPCLR.js → chunk-TOLKC56V.js} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +5 -5
- package/dist/{llmz-CFQOE4UB.js → llmz-LCFWXQDP.js} +3 -3
- package/dist/{llmz-CR72C5Z5.cjs → llmz-VNYSCUF6.cjs} +12 -12
- package/dist/{tool-3YL3EY2R.js → tool-M2N7SKNZ.js} +1 -1
- package/dist/{tool-OC3QHJWX.cjs → tool-MRVFOE5N.cjs} +2 -2
- package/package.json +4 -5
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
var _chunkZEGD4BQJcjs = require('./chunk-ZEGD4BQJ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkRUOMTFUIcjs = require('./chunk-RUOMTFUI.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkPK72FAKDcjs = require('./chunk-PK72FAKD.cjs');
|
|
@@ -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 =
|
|
1277
|
+
const tools = _chunkRUOMTFUIcjs.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,
|
|
1309
|
+
const MessageTool = this.chat && components.length ? new (0, _chunkRUOMTFUIcjs.Tool)({
|
|
1310
1310
|
name: "Message",
|
|
1311
1311
|
description: "Send a message to the user",
|
|
1312
1312
|
aliases: Array.from(
|
package/dist/index.cjs
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk4NQXHRJ2cjs = require('./chunk-4NQXHRJ2.cjs');
|
|
13
13
|
require('./chunk-ZEGD4BQJ.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkRUOMTFUIcjs = require('./chunk-RUOMTFUI.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 =
|
|
431
|
+
this.tools = _chunkRUOMTFUIcjs.Tool.withUniqueNames(_nullishCoalesce(props.tools, () => ( [])));
|
|
432
432
|
}
|
|
433
433
|
/**
|
|
434
434
|
* Generates TypeScript namespace declarations for this object.
|
|
@@ -1112,13 +1112,13 @@ 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-
|
|
1115
|
+
const { executeContext } = await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-VNYSCUF6.cjs")));
|
|
1116
1116
|
return executeContext(props);
|
|
1117
1117
|
};
|
|
1118
1118
|
var init = async () => {
|
|
1119
|
-
await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-
|
|
1119
|
+
await Promise.resolve().then(() => _interopRequireWildcard(require("./llmz-VNYSCUF6.cjs")));
|
|
1120
1120
|
await Promise.resolve().then(() => _interopRequireWildcard(require("./component-AAEMNCHB.cjs")));
|
|
1121
|
-
await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-
|
|
1121
|
+
await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-MRVFOE5N.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")));
|
|
@@ -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 =
|
|
1158
|
+
exports.Chat = Chat; exports.CitationsManager = CitationsManager; exports.Component = _chunkQY2TRWGKcjs.Component; exports.DefaultComponents = DefaultComponents; exports.DefaultExit = _chunk4NQXHRJ2cjs.DefaultExit; exports.ErrorExecutionResult = _chunk4NQXHRJ2cjs.ErrorExecutionResult; exports.ExecutionResult = _chunk4NQXHRJ2cjs.ExecutionResult; exports.Exit = _chunk3G3BS5IAcjs.Exit; exports.ListenExit = _chunk4NQXHRJ2cjs.ListenExit; exports.LoopExceededError = _chunkPK72FAKDcjs.LoopExceededError; exports.ObjectInstance = ObjectInstance; exports.PartialExecutionResult = _chunk4NQXHRJ2cjs.PartialExecutionResult; exports.Snapshot = _chunk4NQXHRJ2cjs.Snapshot; exports.SnapshotSignal = _chunkPK72FAKDcjs.SnapshotSignal; exports.SuccessExecutionResult = _chunk4NQXHRJ2cjs.SuccessExecutionResult; exports.ThinkExit = _chunk4NQXHRJ2cjs.ThinkExit; exports.ThinkSignal = _chunkPK72FAKDcjs.ThinkSignal; exports.Tool = _chunkRUOMTFUIcjs.Tool; exports.assertValidComponent = _chunkQY2TRWGKcjs.assertValidComponent; exports.execute = execute; exports.getValue = _chunk4NQXHRJ2cjs.getValue; exports.init = init; exports.isAnyComponent = _chunkQY2TRWGKcjs.isAnyComponent; exports.isComponent = _chunkQY2TRWGKcjs.isComponent; exports.parseExit = _chunk4NQXHRJ2cjs.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-
|
|
12
|
+
} from "./chunk-TOLKC56V.js";
|
|
13
13
|
import "./chunk-V6VEBUMU.js";
|
|
14
14
|
import {
|
|
15
15
|
Tool
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6PIIXJNI.js";
|
|
17
17
|
import {
|
|
18
18
|
formatTypings,
|
|
19
19
|
getTypings
|
|
@@ -1112,13 +1112,13 @@ var utils = {
|
|
|
1112
1112
|
truncateWrappedContent
|
|
1113
1113
|
};
|
|
1114
1114
|
var execute = async (props) => {
|
|
1115
|
-
const { executeContext } = await import("./llmz-
|
|
1115
|
+
const { executeContext } = await import("./llmz-LCFWXQDP.js");
|
|
1116
1116
|
return executeContext(props);
|
|
1117
1117
|
};
|
|
1118
1118
|
var init = async () => {
|
|
1119
|
-
await import("./llmz-
|
|
1119
|
+
await import("./llmz-LCFWXQDP.js");
|
|
1120
1120
|
await import("./component-EOMTLA64.js");
|
|
1121
|
-
await import("./tool-
|
|
1121
|
+
await import("./tool-M2N7SKNZ.js");
|
|
1122
1122
|
await import("./exit-YLO7BY7Z.js");
|
|
1123
1123
|
await import("./jsx-AEHVFB3L.js");
|
|
1124
1124
|
await import("./vm-Y3WY2627.js");
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
Snapshot,
|
|
9
9
|
SuccessExecutionResult,
|
|
10
10
|
parseExit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TOLKC56V.js";
|
|
12
12
|
import "./chunk-V6VEBUMU.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-6PIIXJNI.js";
|
|
14
14
|
import "./chunk-B42FGPCX.js";
|
|
15
15
|
import {
|
|
16
16
|
AssignmentError,
|
|
@@ -107,7 +107,7 @@ var _executeContext = async (props) => {
|
|
|
107
107
|
const controller = createJoinedAbortController([props.signal]);
|
|
108
108
|
const { onIterationStart, onIterationEnd, onTrace, onExit, onBeforeExecution, onAfterTool, onBeforeTool } = props;
|
|
109
109
|
const client = props.client ?? new Client();
|
|
110
|
-
const cognitive = Cognitive.isCognitiveClient(client) ? client : new Cognitive({ client });
|
|
110
|
+
const cognitive = Cognitive.isCognitiveClient(client) ? client : new Cognitive({ client, __experimental_beta: true });
|
|
111
111
|
const cleanups = [];
|
|
112
112
|
const ctx = new Context({
|
|
113
113
|
chat: props.chat,
|
|
@@ -8,9 +8,9 @@ var _chunk5FWOHMO4cjs = require('./chunk-5FWOHMO4.cjs');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk4NQXHRJ2cjs = require('./chunk-4NQXHRJ2.cjs');
|
|
12
12
|
require('./chunk-ZEGD4BQJ.cjs');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-RUOMTFUI.cjs');
|
|
14
14
|
require('./chunk-KED57HR5.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -107,9 +107,9 @@ var _executeContext = async (props) => {
|
|
|
107
107
|
const controller = createJoinedAbortController([props.signal]);
|
|
108
108
|
const { onIterationStart, onIterationEnd, onTrace, onExit, onBeforeExecution, onAfterTool, onBeforeTool } = props;
|
|
109
109
|
const client = _nullishCoalesce(props.client, () => ( new (0, _client.Client)()));
|
|
110
|
-
const cognitive = _cognitive.Cognitive.isCognitiveClient(client) ? client : new (0, _cognitive.Cognitive)({ client });
|
|
110
|
+
const cognitive = _cognitive.Cognitive.isCognitiveClient(client) ? client : new (0, _cognitive.Cognitive)({ client, __experimental_beta: true });
|
|
111
111
|
const cleanups = [];
|
|
112
|
-
const ctx = new (0,
|
|
112
|
+
const ctx = new (0, _chunk4NQXHRJ2cjs.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,
|
|
127
|
+
return new (0, _chunk4NQXHRJ2cjs.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,
|
|
150
|
+
return new (0, _chunk4NQXHRJ2cjs.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,
|
|
186
|
+
return new (0, _chunk4NQXHRJ2cjs.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,
|
|
192
|
+
return new (0, _chunk4NQXHRJ2cjs.PartialExecutionResult)(
|
|
193
193
|
ctx,
|
|
194
194
|
iteration.status.callback_requested.signal,
|
|
195
|
-
|
|
195
|
+
_chunk4NQXHRJ2cjs.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,
|
|
201
|
+
return new (0, _chunk4NQXHRJ2cjs.ErrorExecutionResult)(ctx, _nullishCoalesce(iteration.error, () => ( `Unknown error. Status: ${iteration.status.type}`)));
|
|
202
202
|
}
|
|
203
203
|
} catch (error) {
|
|
204
|
-
return new (0,
|
|
204
|
+
return new (0, _chunk4NQXHRJ2cjs.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 =
|
|
477
|
+
const parsedExit = _chunk4NQXHRJ2cjs.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
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRUOMTFUIcjs = require('./chunk-RUOMTFUI.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 =
|
|
11
|
+
exports.Tool = _chunkRUOMTFUIcjs.Tool;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llmz",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"description": "LLMz
|
|
5
|
-
"version": "0.0.
|
|
4
|
+
"description": "LLMz - An LLM-native Typescript VM built on top of Zui",
|
|
5
|
+
"version": "0.0.40",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -66,15 +66,14 @@
|
|
|
66
66
|
"esbuild": "^0.25.10",
|
|
67
67
|
"glob": "^9.3.4",
|
|
68
68
|
"source-map-js": "1.2.1",
|
|
69
|
-
"ts-node": "^10.9.2",
|
|
70
69
|
"tsup": "^8.0.2",
|
|
71
70
|
"tsx": "^4.19.2"
|
|
72
71
|
},
|
|
73
72
|
"peerDependencies": {
|
|
74
73
|
"@botpress/client": "1.28.0",
|
|
75
|
-
"@botpress/cognitive": "0.3.
|
|
74
|
+
"@botpress/cognitive": "0.3.4",
|
|
76
75
|
"@bpinternal/thicktoken": "^1.0.5",
|
|
77
|
-
"@bpinternal/zui": "1.3.
|
|
76
|
+
"@bpinternal/zui": "^1.3.2"
|
|
78
77
|
},
|
|
79
78
|
"dependenciesMeta": {
|
|
80
79
|
"@bpinternal/zui": {
|