llmz 0.2.2 → 0.3.0
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/CLAUDE.md +0 -1
- package/dist/{chunk-2EZSVF5X.cjs → chunk-3UZKLXAD.cjs} +29 -23
- package/dist/{chunk-HM5H556L.js → chunk-72ZWBNZV.js} +1 -1
- package/dist/{chunk-D6PU5YAS.cjs → chunk-DDSJTR6Q.cjs} +8 -7
- package/dist/{chunk-GDWRFHM5.js → chunk-GDJTKI7J.js} +1 -1
- package/dist/{chunk-YX27XM67.js → chunk-GLXADNTR.js} +13 -1
- package/dist/{chunk-FPLSJF4S.cjs → chunk-GOWPACSK.cjs} +15 -3
- package/dist/{chunk-XVVYNOTX.js → chunk-HB2G32AK.js} +3 -2
- package/dist/{chunk-YQT5G77W.cjs → chunk-HEAQAEFZ.cjs} +2 -2
- package/dist/{chunk-MHVORH33.cjs → chunk-HMMM32RG.cjs} +14 -14
- package/dist/{chunk-5XPEVOOW.cjs → chunk-KG5E3UZZ.cjs} +20 -20
- package/dist/{chunk-C2KND2PS.cjs → chunk-OVRDJMZJ.cjs} +26 -34
- package/dist/{chunk-5ISVDYBA.js → chunk-OXEKAOVI.js} +3 -11
- package/dist/{chunk-S46T73HR.cjs → chunk-PZE6PIPG.cjs} +12 -11
- package/dist/chunk-RGUG3UMF.cjs +26 -0
- package/dist/{chunk-3OSQ4XL4.js → chunk-TDALRNGL.js} +4 -3
- package/dist/chunk-UGHFNCPD.js +26 -0
- package/dist/{chunk-2MSLOTFO.js → chunk-XMFQVARN.js} +5 -5
- package/dist/{chunk-EJIDFDQP.js → chunk-YRS7KRKP.js} +28 -22
- package/dist/context.d.ts +2 -2
- package/dist/custom-client.d.ts +4 -3
- package/dist/{dual-modes-J4RWHJ2O.js → dual-modes-BYABHBDI.js} +3 -3
- package/dist/dual-modes-HO6RRIZ5.cjs +10 -0
- package/dist/emscripten-module.wasm +0 -0
- package/dist/{execute-4IL4QPAR.cjs → execute-2H4F7GFE.cjs} +81 -69
- package/dist/{execute-6AYBMTRM.js → execute-DPCZ6PKH.js} +51 -39
- package/dist/exit-MX56VN2C.cjs +8 -0
- package/dist/{exit-VJATJTQI.js → exit-UQ3EUX5D.js} +2 -2
- package/dist/exit.d.ts +1 -1
- package/dist/index.cjs +67 -61
- package/dist/index.d.ts +2 -0
- package/dist/index.js +23 -17
- package/dist/index.workerd.js +17339 -0
- package/dist/prompts/prompt.d.ts +3 -6
- package/dist/quickjs-variant.d.ts +22 -0
- package/dist/quickjs-variant.workerd.d.ts +22 -0
- package/dist/result.d.ts +3 -3
- package/dist/runtime/types.d.ts +7 -9
- package/dist/{tool-I3MAWDN2.js → tool-KD7FL45V.js} +3 -3
- package/dist/{tool-56I7OSKU.cjs → tool-VE2YHIY2.cjs} +4 -4
- package/dist/{truncator-OZOBNYON.js → truncator-73RCL52Y.js} +2 -2
- package/dist/truncator-FZNLYSDL.cjs +12 -0
- package/dist/{typings-SR3EE6LR.js → typings-E2RROCLT.js} +2 -2
- package/dist/{typings-LVI4VGE2.cjs → typings-LQOBZXSO.cjs} +3 -3
- package/dist/{utils-ZEZ66X6Q.js → utils-IATCUNKF.js} +5 -1
- package/dist/utils-ITB4NEL7.cjs +43 -0
- package/dist/utils.d.ts +18 -0
- package/dist/vm-6D3IIIU7.cjs +12 -0
- package/dist/{vm-ZLWGAYYJ.js → vm-QO5FSGPN.js} +2 -1
- package/package.json +6 -4
- package/dist/dual-modes-IZQJTXR7.cjs +0 -10
- package/dist/exit-LUJY7JIG.cjs +0 -8
- package/dist/truncator-7PGEGCHV.cjs +0 -12
- package/dist/utils-GLZVMRWO.cjs +0 -39
- package/dist/vm-ZVONLAZV.cjs +0 -11
package/dist/prompts/prompt.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type CognitiveMessage } from '@botpress/cognitive';
|
|
2
2
|
import { Component } from '../component.js';
|
|
3
3
|
import { Exit } from '../exit.js';
|
|
4
4
|
import type { ParsedItem } from '../message-stream/types.js';
|
|
@@ -29,10 +29,7 @@ export type ParsedAssistantResponse = {
|
|
|
29
29
|
next?: ParsedNext;
|
|
30
30
|
};
|
|
31
31
|
export declare namespace LLMzPrompts {
|
|
32
|
-
type Message =
|
|
33
|
-
role: 'system';
|
|
34
|
-
content: string;
|
|
35
|
-
};
|
|
32
|
+
type Message = CognitiveMessage;
|
|
36
33
|
/**
|
|
37
34
|
* The raw (pre-truncation, unwrapped) content of each named section of the
|
|
38
35
|
* system prompt. Used to measure the context size of each part of the prompt.
|
|
@@ -51,7 +48,7 @@ export declare namespace LLMzPrompts {
|
|
|
51
48
|
message: Message;
|
|
52
49
|
parts: SystemPromptParts;
|
|
53
50
|
};
|
|
54
|
-
type MessageContent = Extract<
|
|
51
|
+
type MessageContent = Extract<CognitiveMessage['content'], any[]>[number];
|
|
55
52
|
type InitialStateProps = {
|
|
56
53
|
instructions?: string;
|
|
57
54
|
transcript: TranscriptArray;
|
|
@@ -6,3 +6,25 @@ export type QuickJSSyncVariantEx = QuickJSSyncVariant & {
|
|
|
6
6
|
_wasmLoadError?: any;
|
|
7
7
|
};
|
|
8
8
|
export declare const BundledReleaseSyncVariant: QuickJSSyncVariantEx;
|
|
9
|
+
/**
|
|
10
|
+
* Overrides the QuickJS variant used by the sandbox.
|
|
11
|
+
*
|
|
12
|
+
* The default variant inlines the WASM as base64 and compiles it at runtime
|
|
13
|
+
* (`new WebAssembly.Module(bytes)`), which is disallowed on some platforms
|
|
14
|
+
* (e.g. Cloudflare Workers / workerd). On those platforms, inject a variant
|
|
15
|
+
* built from a statically imported precompiled `WebAssembly.Module` — e.g.
|
|
16
|
+
* quickjs-emscripten's documented Cloudflare recipe:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { newVariant } from 'quickjs-emscripten-core'
|
|
20
|
+
* import wasmfileVariant from '@jitl/quickjs-wasmfile-release-sync'
|
|
21
|
+
* import wasmModule from '@jitl/quickjs-wasmfile-release-sync/wasm'
|
|
22
|
+
*
|
|
23
|
+
* configureQuickJS(newVariant(wasmfileVariant, { wasmModule }))
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* Call this before the first `execute()` (or `warmupVM()`); the WASM module is
|
|
27
|
+
* loaded once per variant and cached.
|
|
28
|
+
*/
|
|
29
|
+
export declare const configureQuickJS: (variant: QuickJSSyncVariant) => void;
|
|
30
|
+
export declare const getQuickJSVariant: () => QuickJSSyncVariant;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type QuickJSSyncVariant } from 'quickjs-emscripten-core';
|
|
2
|
+
/**
|
|
3
|
+
* Workerd (Cloudflare Workers) drop-in replacement for `./quickjs-variant.ts` —
|
|
4
|
+
* the workerd tsup build aliases that module to this one. Same export surface,
|
|
5
|
+
* but the default variant follows quickjs-emscripten's documented Cloudflare
|
|
6
|
+
* recipe (wasmfile variant + statically imported precompiled module) instead of
|
|
7
|
+
* the singlefile variant that compiles inlined base64 WASM at runtime.
|
|
8
|
+
*/
|
|
9
|
+
export type QuickJSSyncVariantEx = QuickJSSyncVariant & {
|
|
10
|
+
_wasmSource?: any;
|
|
11
|
+
_wasmLoadedSuccessfully?: any;
|
|
12
|
+
_wasmSize?: any;
|
|
13
|
+
_wasmLoadError?: any;
|
|
14
|
+
};
|
|
15
|
+
export declare const BundledReleaseSyncVariant: QuickJSSyncVariantEx;
|
|
16
|
+
/**
|
|
17
|
+
* Overrides the QuickJS variant used by the sandbox. On workerd the default
|
|
18
|
+
* variant is already Workers-compatible; this stays available for consumers
|
|
19
|
+
* who want a different QuickJS build (e.g. debug, asyncify).
|
|
20
|
+
*/
|
|
21
|
+
export declare const configureQuickJS: (variant: QuickJSSyncVariant) => void;
|
|
22
|
+
export declare const getQuickJSVariant: () => QuickJSSyncVariant;
|
package/dist/result.d.ts
CHANGED
|
@@ -408,7 +408,7 @@ export declare class SuccessExecutionResult<TOutput = unknown> extends Execution
|
|
|
408
408
|
id: string;
|
|
409
409
|
iterations: {
|
|
410
410
|
id: string;
|
|
411
|
-
messages: import("
|
|
411
|
+
messages: import("@botpress/cognitive").CognitiveMessage[];
|
|
412
412
|
code: string | undefined;
|
|
413
413
|
model: import("@botpress/cognitive").Models | import("@botpress/cognitive").Models[];
|
|
414
414
|
temperature: number;
|
|
@@ -573,7 +573,7 @@ export declare class ErrorExecutionResult extends ExecutionResult implements Ser
|
|
|
573
573
|
id: string;
|
|
574
574
|
iterations: {
|
|
575
575
|
id: string;
|
|
576
|
-
messages: import("
|
|
576
|
+
messages: import("@botpress/cognitive").CognitiveMessage[];
|
|
577
577
|
code: string | undefined;
|
|
578
578
|
model: import("@botpress/cognitive").Models | import("@botpress/cognitive").Models[];
|
|
579
579
|
temperature: number;
|
|
@@ -758,7 +758,7 @@ export declare class PartialExecutionResult extends ExecutionResult implements S
|
|
|
758
758
|
id: string;
|
|
759
759
|
iterations: {
|
|
760
760
|
id: string;
|
|
761
|
-
messages: import("
|
|
761
|
+
messages: import("@botpress/cognitive").CognitiveMessage[];
|
|
762
762
|
code: string | undefined;
|
|
763
763
|
model: import("@botpress/cognitive").Models | import("@botpress/cognitive").Models[];
|
|
764
764
|
temperature: number;
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cognitive,
|
|
1
|
+
import { Cognitive, type BotpressClientLike, Models } from '@botpress/cognitive';
|
|
2
2
|
import { Chat } from '../chat.js';
|
|
3
3
|
import { Context, Iteration } from '../context.js';
|
|
4
4
|
import { _CustomModelClient } from '../custom-client.js';
|
|
@@ -183,12 +183,11 @@ export type ExecutionProps = {
|
|
|
183
183
|
exits?: ValueOrGetter<Exit[], Context>;
|
|
184
184
|
options?: Options;
|
|
185
185
|
/**
|
|
186
|
-
* An instance of a Botpress Client
|
|
187
|
-
* or a standalone CognitiveBeta client.
|
|
186
|
+
* An instance of a Botpress Client or an instance of a Cognitive client (@botpress/cognitive).
|
|
188
187
|
* This is used to generate content using the LLM and to access the Botpress API.
|
|
189
188
|
* If not provided, a default client will be created using environment variables.
|
|
190
189
|
*/
|
|
191
|
-
client?: Cognitive |
|
|
190
|
+
client?: Cognitive | BotpressClientLike | _CustomModelClient;
|
|
192
191
|
/**
|
|
193
192
|
* When provided, the execution will immediately stop when the signal is aborted.
|
|
194
193
|
* This will stop the LLM generation, as well as kill the VM sandbox execution.
|
|
@@ -229,12 +228,11 @@ export type ExecutionProps = {
|
|
|
229
228
|
*/
|
|
230
229
|
metadata?: Record<string, string>;
|
|
231
230
|
} & ExecutionHooks;
|
|
232
|
-
export type RuntimeCognitive = Pick<Cognitive, 'getModelDetails' | '
|
|
231
|
+
export type RuntimeCognitive = Pick<Cognitive, 'getModelDetails' | 'generateText'> & {
|
|
233
232
|
/**
|
|
234
|
-
* Streaming generation.
|
|
235
|
-
*
|
|
236
|
-
* ■ blocks incrementally.
|
|
233
|
+
* Streaming generation. When present, the runtime streams the response and
|
|
234
|
+
* parses ■ blocks incrementally.
|
|
237
235
|
*/
|
|
238
|
-
|
|
236
|
+
generateTextStream?: Cognitive['generateTextStream'];
|
|
239
237
|
};
|
|
240
238
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tool
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-TDALRNGL.js";
|
|
4
|
+
import "./chunk-GDJTKI7J.js";
|
|
5
5
|
import "./chunk-WSVDMGMR.js";
|
|
6
6
|
import "./chunk-YEAWWJSJ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-GLXADNTR.js";
|
|
8
8
|
import "./chunk-34GJUS6U.js";
|
|
9
9
|
export {
|
|
10
10
|
Tool
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkPZE6PIPGcjs = require('./chunk-PZE6PIPG.cjs');
|
|
4
|
+
require('./chunk-HMMM32RG.cjs');
|
|
5
5
|
require('./chunk-PK72FAKD.cjs');
|
|
6
6
|
require('./chunk-KIN7Y247.cjs');
|
|
7
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-GOWPACSK.cjs');
|
|
8
8
|
require('./chunk-HC2QZTVT.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.Tool =
|
|
11
|
+
exports.Tool = _chunkPZE6PIPGcjs.Tool;
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
stripTruncationTags,
|
|
3
3
|
truncateWrappedContent,
|
|
4
4
|
wrapContent
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-72ZWBNZV.js";
|
|
6
|
+
import "./chunk-GLXADNTR.js";
|
|
7
7
|
import "./chunk-34GJUS6U.js";
|
|
8
8
|
export {
|
|
9
9
|
stripTruncationTags,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkHEAQAEFZcjs = require('./chunk-HEAQAEFZ.cjs');
|
|
6
|
+
require('./chunk-GOWPACSK.cjs');
|
|
7
|
+
require('./chunk-HC2QZTVT.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.stripTruncationTags = _chunkHEAQAEFZcjs.stripTruncationTags; exports.truncateWrappedContent = _chunkHEAQAEFZcjs.truncateWrappedContent; exports.wrapContent = _chunkHEAQAEFZcjs.wrapContent;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTypings
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GDJTKI7J.js";
|
|
4
4
|
import "./chunk-WSVDMGMR.js";
|
|
5
5
|
import "./chunk-YEAWWJSJ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-GLXADNTR.js";
|
|
7
7
|
import "./chunk-34GJUS6U.js";
|
|
8
8
|
export {
|
|
9
9
|
getTypings
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHMMM32RGcjs = require('./chunk-HMMM32RG.cjs');
|
|
4
4
|
require('./chunk-PK72FAKD.cjs');
|
|
5
5
|
require('./chunk-KIN7Y247.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-GOWPACSK.cjs');
|
|
7
7
|
require('./chunk-HC2QZTVT.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.getTypings =
|
|
10
|
+
exports.getTypings = _chunkHMMM32RGcjs.getTypings;
|
|
@@ -2,7 +2,9 @@ import {
|
|
|
2
2
|
Identifier,
|
|
3
3
|
Tokens,
|
|
4
4
|
awaitObject,
|
|
5
|
+
configureTokenizer,
|
|
5
6
|
escapeString,
|
|
7
|
+
fromJSONSchemaCompat,
|
|
6
8
|
getErrorMessage,
|
|
7
9
|
getMultilineComment,
|
|
8
10
|
getTokenizer,
|
|
@@ -16,13 +18,15 @@ import {
|
|
|
16
18
|
toPropertyKey,
|
|
17
19
|
toValidFunctionName,
|
|
18
20
|
toValidObjectName
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GLXADNTR.js";
|
|
20
22
|
import "./chunk-34GJUS6U.js";
|
|
21
23
|
export {
|
|
22
24
|
Identifier,
|
|
23
25
|
Tokens,
|
|
24
26
|
awaitObject,
|
|
27
|
+
configureTokenizer,
|
|
25
28
|
escapeString,
|
|
29
|
+
fromJSONSchemaCompat,
|
|
26
30
|
getErrorMessage,
|
|
27
31
|
getMultilineComment,
|
|
28
32
|
getTokenizer,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunkGOWPACSKcjs = require('./chunk-GOWPACSK.cjs');
|
|
22
|
+
require('./chunk-HC2QZTVT.cjs');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
exports.Identifier = _chunkGOWPACSKcjs.Identifier; exports.Tokens = _chunkGOWPACSKcjs.Tokens; exports.awaitObject = _chunkGOWPACSKcjs.awaitObject; exports.configureTokenizer = _chunkGOWPACSKcjs.configureTokenizer; exports.escapeString = _chunkGOWPACSKcjs.escapeString; exports.fromJSONSchemaCompat = _chunkGOWPACSKcjs.fromJSONSchemaCompat; exports.getErrorMessage = _chunkGOWPACSKcjs.getErrorMessage; exports.getMultilineComment = _chunkGOWPACSKcjs.getMultilineComment; exports.getTokenizer = _chunkGOWPACSKcjs.getTokenizer; exports.init = _chunkGOWPACSKcjs.init; exports.isJsonSchema = _chunkGOWPACSKcjs.isJsonSchema; exports.isValidIdentifier = _chunkGOWPACSKcjs.isValidIdentifier; exports.isValidMessageName = _chunkGOWPACSKcjs.isValidMessageName; exports.isValidSchema = _chunkGOWPACSKcjs.isValidSchema; exports.isZuiSchema = _chunkGOWPACSKcjs.isZuiSchema; exports.stripInvalidIdentifiers = _chunkGOWPACSKcjs.stripInvalidIdentifiers; exports.toPropertyKey = _chunkGOWPACSKcjs.toPropertyKey; exports.toValidFunctionName = _chunkGOWPACSKcjs.toValidFunctionName; exports.toValidObjectName = _chunkGOWPACSKcjs.toValidObjectName;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { TextTokenizer } from '@bpinternal/thicktoken';
|
|
2
2
|
import { z } from '@bpinternal/zui';
|
|
3
3
|
import { JSONSchema7 } from 'json-schema';
|
|
4
|
+
/**
|
|
5
|
+
* Injects the tokenizer used for prompt budgeting instead of the default
|
|
6
|
+
* `@bpinternal/thicktoken` WASM tokenizer.
|
|
7
|
+
*
|
|
8
|
+
* The default tokenizer compiles its WASM at runtime (`new WebAssembly.Module(bytes)`),
|
|
9
|
+
* which is disallowed on some platforms (e.g. Cloudflare Workers / workerd). On those
|
|
10
|
+
* platforms, build a tokenizer from a statically imported precompiled `WebAssembly.Module`
|
|
11
|
+
* and inject it here before calling `execute()`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const configureTokenizer: (customTokenizer: TextTokenizer) => void;
|
|
4
14
|
export declare const init: () => Promise<void>;
|
|
5
15
|
export declare const getTokenizer: () => TextTokenizer;
|
|
6
16
|
export declare const Tokens: (min: number, max: number) => z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -12,6 +22,14 @@ export declare const toValidFunctionName: (str: string) => string;
|
|
|
12
22
|
export declare const awaitObject: <T extends {}>(obj: T) => Promise<T>;
|
|
13
23
|
export declare const toValidObjectName: (str: string) => string;
|
|
14
24
|
export declare const stripInvalidIdentifiers: (object: unknown) => any;
|
|
25
|
+
/**
|
|
26
|
+
* JSON Schema → Zui via the legacy transform, falling back to the eval-free one.
|
|
27
|
+
* The legacy transform builds the schema by evaluating generated code, which is
|
|
28
|
+
* banned on some platforms (e.g. Cloudflare Workers / workerd) — there it throws
|
|
29
|
+
* and the eval-free transform takes over. Kept legacy-first because the two
|
|
30
|
+
* transforms differ on some shapes (e.g. discriminated unions).
|
|
31
|
+
*/
|
|
32
|
+
export declare const fromJSONSchemaCompat: (schema: JSONSchema7) => z.ZodType;
|
|
15
33
|
export declare const isValidSchema: (schema: JSONSchema7) => boolean;
|
|
16
34
|
export declare function isZuiSchema(schema: unknown): schema is z.ZodSchema;
|
|
17
35
|
export declare function isJsonSchema(schema: unknown): schema is JSONSchema7;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk3UZKLXADcjs = require('./chunk-3UZKLXAD.cjs');
|
|
5
|
+
require('./chunk-RGUG3UMF.cjs');
|
|
6
|
+
require('./chunk-PK72FAKD.cjs');
|
|
7
|
+
require('./chunk-KIN7Y247.cjs');
|
|
8
|
+
require('./chunk-HC2QZTVT.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.runAsyncFunction = _chunk3UZKLXADcjs.runAsyncFunction; exports.warmupVM = _chunk3UZKLXADcjs.warmupVM;
|
package/package.json
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
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.
|
|
5
|
+
"version": "0.3.0",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"workerd": "./dist/index.workerd.js",
|
|
11
13
|
"import": "./dist/index.js",
|
|
12
14
|
"require": "./dist/index.cjs"
|
|
13
15
|
}
|
|
@@ -34,7 +36,6 @@
|
|
|
34
36
|
"acorn": "^8.17.0",
|
|
35
37
|
"bytes": "^3.1.2",
|
|
36
38
|
"exponential-backoff": "^3.1.1",
|
|
37
|
-
"handlebars": "^4.7.8",
|
|
38
39
|
"json5": "^2.2.3",
|
|
39
40
|
"jsonrepair": "^3.10.0",
|
|
40
41
|
"lodash-es": "^4.17.21",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@botpress/cli": "workspace:*",
|
|
49
|
+
"@jitl/quickjs-wasmfile-release-sync": "^0.31.0",
|
|
48
50
|
"@microsoft/api-extractor": "^7.49.0",
|
|
49
51
|
"@types/bytes": "^3.1.5",
|
|
50
52
|
"@types/json-schema": "^7.0.12",
|
|
@@ -63,8 +65,8 @@
|
|
|
63
65
|
},
|
|
64
66
|
"peerDependencies": {
|
|
65
67
|
"@botpress/client": "1.49.0",
|
|
66
|
-
"@botpress/cognitive": "0.
|
|
67
|
-
"@bpinternal/thicktoken": "^3.
|
|
68
|
+
"@botpress/cognitive": "1.0.0",
|
|
69
|
+
"@bpinternal/thicktoken": "^3.1.0",
|
|
68
70
|
"@bpinternal/zui": "^2.4.0"
|
|
69
71
|
},
|
|
70
72
|
"dependenciesMeta": {
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkC2KND2PScjs = require('./chunk-C2KND2PS.cjs');
|
|
4
|
-
require('./chunk-KIN7Y247.cjs');
|
|
5
|
-
require('./chunk-YQT5G77W.cjs');
|
|
6
|
-
require('./chunk-FPLSJF4S.cjs');
|
|
7
|
-
require('./chunk-HC2QZTVT.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.DualModePrompt = _chunkC2KND2PScjs.DualModePrompt;
|
package/dist/exit-LUJY7JIG.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunkYQT5G77Wcjs = require('./chunk-YQT5G77W.cjs');
|
|
6
|
-
require('./chunk-FPLSJF4S.cjs');
|
|
7
|
-
require('./chunk-HC2QZTVT.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.stripTruncationTags = _chunkYQT5G77Wcjs.stripTruncationTags; exports.truncateWrappedContent = _chunkYQT5G77Wcjs.truncateWrappedContent; exports.wrapContent = _chunkYQT5G77Wcjs.wrapContent;
|
package/dist/utils-GLZVMRWO.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var _chunkFPLSJF4Scjs = require('./chunk-FPLSJF4S.cjs');
|
|
20
|
-
require('./chunk-HC2QZTVT.cjs');
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
exports.Identifier = _chunkFPLSJF4Scjs.Identifier; exports.Tokens = _chunkFPLSJF4Scjs.Tokens; exports.awaitObject = _chunkFPLSJF4Scjs.awaitObject; exports.escapeString = _chunkFPLSJF4Scjs.escapeString; exports.getErrorMessage = _chunkFPLSJF4Scjs.getErrorMessage; exports.getMultilineComment = _chunkFPLSJF4Scjs.getMultilineComment; exports.getTokenizer = _chunkFPLSJF4Scjs.getTokenizer; exports.init = _chunkFPLSJF4Scjs.init; exports.isJsonSchema = _chunkFPLSJF4Scjs.isJsonSchema; exports.isValidIdentifier = _chunkFPLSJF4Scjs.isValidIdentifier; exports.isValidMessageName = _chunkFPLSJF4Scjs.isValidMessageName; exports.isValidSchema = _chunkFPLSJF4Scjs.isValidSchema; exports.isZuiSchema = _chunkFPLSJF4Scjs.isZuiSchema; exports.stripInvalidIdentifiers = _chunkFPLSJF4Scjs.stripInvalidIdentifiers; exports.toPropertyKey = _chunkFPLSJF4Scjs.toPropertyKey; exports.toValidFunctionName = _chunkFPLSJF4Scjs.toValidFunctionName; exports.toValidObjectName = _chunkFPLSJF4Scjs.toValidObjectName;
|
package/dist/vm-ZVONLAZV.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunk2EZSVF5Xcjs = require('./chunk-2EZSVF5X.cjs');
|
|
5
|
-
require('./chunk-PK72FAKD.cjs');
|
|
6
|
-
require('./chunk-KIN7Y247.cjs');
|
|
7
|
-
require('./chunk-HC2QZTVT.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.runAsyncFunction = _chunk2EZSVF5Xcjs.runAsyncFunction; exports.warmupVM = _chunk2EZSVF5Xcjs.warmupVM;
|