llmz 0.0.42 → 0.0.43
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/abort-signal.test.d.ts +1 -0
- package/dist/citations.test.d.ts +1 -0
- package/dist/compiler/compiler.test.d.ts +1 -0
- package/dist/compiler/plugins/html-to-markdown.test.d.ts +1 -0
- package/dist/compiler/plugins/jsx-undefined-vars.test.d.ts +1 -0
- package/dist/compiler/plugins/line-tracking.test.d.ts +1 -0
- package/dist/compiler/plugins/track-tool-calls.test.d.ts +1 -0
- package/dist/compiler/plugins/variable-extraction.test.d.ts +1 -0
- package/dist/component.test.d.ts +1 -0
- package/dist/exit-parser.test.d.ts +1 -0
- package/dist/handlers.test.d.ts +1 -0
- package/dist/hoist.test.d.ts +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/inspect.test.d.ts +1 -0
- package/dist/{llmz-VNYSCUF6.cjs → llmz-ACSZOYZP.cjs} +9 -1
- package/dist/{llmz-LCFWXQDP.js → llmz-O536FBHV.js} +9 -1
- package/dist/llmz.test.d.ts +1 -0
- package/dist/objects.test.d.ts +1 -0
- package/dist/prompts/common.test.d.ts +1 -0
- package/dist/stack-traces.test.d.ts +1 -0
- package/dist/tool.test.d.ts +1 -0
- package/dist/transcript.test.d.ts +1 -0
- package/dist/truncator.test.d.ts +1 -0
- package/dist/typings.test.d.ts +1 -0
- package/dist/utils.test.d.ts +1 -0
- package/dist/vm-jsx.test.d.ts +1 -0
- package/dist/vm.test.d.ts +1 -0
- package/eslint.config.mjs +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -1112,11 +1112,11 @@ 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-ACSZOYZP.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-ACSZOYZP.cjs")));
|
|
1120
1120
|
await Promise.resolve().then(() => _interopRequireWildcard(require("./component-AAEMNCHB.cjs")));
|
|
1121
1121
|
await Promise.resolve().then(() => _interopRequireWildcard(require("./tool-MRVFOE5N.cjs")));
|
|
1122
1122
|
await Promise.resolve().then(() => _interopRequireWildcard(require("./exit-XAYKJ6TR.cjs")));
|
package/dist/index.js
CHANGED
|
@@ -1112,11 +1112,11 @@ 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-O536FBHV.js");
|
|
1116
1116
|
return executeContext(props);
|
|
1117
1117
|
};
|
|
1118
1118
|
var init = async () => {
|
|
1119
|
-
await import("./llmz-
|
|
1119
|
+
await import("./llmz-O536FBHV.js");
|
|
1120
1120
|
await import("./component-EOMTLA64.js");
|
|
1121
1121
|
await import("./tool-M2N7SKNZ.js");
|
|
1122
1122
|
await import("./exit-YLO7BY7Z.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -168,6 +168,9 @@ var _executeContext = async (props) => {
|
|
|
168
168
|
onBeforeTool
|
|
169
169
|
});
|
|
170
170
|
} catch (err) {
|
|
171
|
+
if (err instanceof _chunkPK72FAKDcjs.CognitiveError) {
|
|
172
|
+
return new (0, _chunk4NQXHRJ2cjs.ErrorExecutionResult)(ctx, err);
|
|
173
|
+
}
|
|
171
174
|
iteration.end({
|
|
172
175
|
type: "execution_error",
|
|
173
176
|
execution_error: {
|
|
@@ -224,7 +227,10 @@ var executeIteration = async ({
|
|
|
224
227
|
var _a, _b, _c, _d;
|
|
225
228
|
let startedAt = Date.now();
|
|
226
229
|
const traces = iteration.traces;
|
|
227
|
-
const
|
|
230
|
+
const modelRef = Array.isArray(iteration.model) ? iteration.model[0] : iteration.model;
|
|
231
|
+
const model = await cognitive.getModelDetails(modelRef).catch((thrown) => {
|
|
232
|
+
throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`Failed to fetch model details for model "${modelRef}": ${getErrorMessage(thrown)}`);
|
|
233
|
+
});
|
|
228
234
|
const modelLimit = Math.max(model.input.maxTokens, 8e3);
|
|
229
235
|
const responseLengthBuffer = getModelOutputLimit(modelLimit);
|
|
230
236
|
const messages = _chunkGZPN7RGHcjs.truncateWrappedContent.call(void 0, {
|
|
@@ -253,6 +259,8 @@ var executeIteration = async ({
|
|
|
253
259
|
responseFormat: "text",
|
|
254
260
|
messages: messages.filter((x) => x.role !== "system"),
|
|
255
261
|
stopSequences: ctx.version.getStopTokens()
|
|
262
|
+
}).catch((thrown) => {
|
|
263
|
+
throw new (0, _chunkPK72FAKDcjs.CognitiveError)(`LLM generation failed: ${getErrorMessage(thrown)}`);
|
|
256
264
|
});
|
|
257
265
|
const out = typeof ((_c = (_b = output.output.choices) == null ? void 0 : _b[0]) == null ? void 0 : _c.content) === "string" ? output.output.choices[0].content : null;
|
|
258
266
|
if (!out) {
|
|
@@ -168,6 +168,9 @@ var _executeContext = async (props) => {
|
|
|
168
168
|
onBeforeTool
|
|
169
169
|
});
|
|
170
170
|
} catch (err) {
|
|
171
|
+
if (err instanceof CognitiveError) {
|
|
172
|
+
return new ErrorExecutionResult(ctx, err);
|
|
173
|
+
}
|
|
171
174
|
iteration.end({
|
|
172
175
|
type: "execution_error",
|
|
173
176
|
execution_error: {
|
|
@@ -224,7 +227,10 @@ var executeIteration = async ({
|
|
|
224
227
|
var _a, _b, _c, _d;
|
|
225
228
|
let startedAt = Date.now();
|
|
226
229
|
const traces = iteration.traces;
|
|
227
|
-
const
|
|
230
|
+
const modelRef = Array.isArray(iteration.model) ? iteration.model[0] : iteration.model;
|
|
231
|
+
const model = await cognitive.getModelDetails(modelRef).catch((thrown) => {
|
|
232
|
+
throw new CognitiveError(`Failed to fetch model details for model "${modelRef}": ${getErrorMessage(thrown)}`);
|
|
233
|
+
});
|
|
228
234
|
const modelLimit = Math.max(model.input.maxTokens, 8e3);
|
|
229
235
|
const responseLengthBuffer = getModelOutputLimit(modelLimit);
|
|
230
236
|
const messages = truncateWrappedContent({
|
|
@@ -253,6 +259,8 @@ var executeIteration = async ({
|
|
|
253
259
|
responseFormat: "text",
|
|
254
260
|
messages: messages.filter((x) => x.role !== "system"),
|
|
255
261
|
stopSequences: ctx.version.getStopTokens()
|
|
262
|
+
}).catch((thrown) => {
|
|
263
|
+
throw new CognitiveError(`LLM generation failed: ${getErrorMessage(thrown)}`);
|
|
256
264
|
});
|
|
257
265
|
const out = typeof ((_c = (_b = output.output.choices) == null ? void 0 : _b[0]) == null ? void 0 : _c.content) === "string" ? output.output.choices[0].content : null;
|
|
258
266
|
if (!out) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/eslint.config.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import rootConfig from '../../eslint.config.mjs'
|
|
|
3
3
|
export default [
|
|
4
4
|
...rootConfig,
|
|
5
5
|
{
|
|
6
|
-
ignores: ['
|
|
6
|
+
ignores: ['e2e/__tests__/**/*', 'tsup.config.ts', 'vitest.*.ts'],
|
|
7
7
|
languageOptions: {
|
|
8
8
|
parserOptions: {
|
|
9
9
|
project: ['./tsconfig.json'],
|
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.
|
|
5
|
+
"version": "0.0.43",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
"build": "tsup && pnpm tsc --emitDeclarationOnly",
|
|
21
21
|
"check:type": "tsc --noEmit",
|
|
22
22
|
"watch": "tsup --watch",
|
|
23
|
-
"test": "vitest run
|
|
24
|
-
"test:
|
|
25
|
-
"test:
|
|
23
|
+
"test": "vitest --run",
|
|
24
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
25
|
+
"test:e2e:update": "vitest -u run --config vitest.e2e.config.ts",
|
|
26
|
+
"test:e2e:watch": "vitest --config vitest.e2e.config.ts",
|
|
26
27
|
"build:markdown": "node --loader ts-node/esm ./scripts/compile-markdown.mts"
|
|
27
28
|
},
|
|
28
29
|
"keywords": [],
|