llmz 0.0.82 → 0.0.84
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-HP3T6PF4.js → chunk-2O3UTPVH.js} +4 -4
- package/dist/{chunk-BJMZIH3M.js → chunk-34GJUS6U.js} +1047 -1047
- package/dist/{chunk-EQ4JDBE5.js → chunk-3T5IU7OU.js} +1 -1
- package/dist/{chunk-OX3Y2Z5K.cjs → chunk-5ZF6NTYI.cjs} +3 -3
- package/dist/{chunk-BXPPMP5X.cjs → chunk-7LMIOS6H.cjs} +14 -14
- package/dist/{chunk-5X5TDCMX.cjs → chunk-BBX2LDZE.cjs} +51 -51
- package/dist/{chunk-VXQ2CZ7B.cjs → chunk-CQ3UJW76.cjs} +4 -4
- package/dist/{chunk-DLV5FJ42.cjs → chunk-D6PU5YAS.cjs} +9 -9
- package/dist/{chunk-22DGAZXC.js → chunk-EFEF2AL7.js} +2 -2
- package/dist/{chunk-FQ4QCUTI.cjs → chunk-FPLSJF4S.cjs} +9 -49
- package/dist/{chunk-7XVBJQ53.cjs → chunk-HC2QZTVT.cjs} +1047 -1047
- package/dist/{chunk-HBKQKO3R.js → chunk-IRCB4FRM.js} +66 -20
- package/dist/{chunk-GFZCNSYW.cjs → chunk-JXD2KJVB.cjs} +23 -23
- package/dist/{chunk-YFG53MRF.js → chunk-L74UZONX.js} +1 -1
- package/dist/{chunk-2UM7PFM3.js → chunk-NK2NCYSY.js} +6 -6
- package/dist/{chunk-X24YFCFY.cjs → chunk-PQGZQQA6.cjs} +28 -28
- package/dist/{chunk-DO7DN4FZ.js → chunk-TOGYDN6U.js} +1 -1
- package/dist/{chunk-H5LCBNN6.cjs → chunk-WODK7Y4J.cjs} +65 -19
- package/dist/{chunk-E6UFMAW7.js → chunk-XTEHT2TK.js} +1 -1
- package/dist/{chunk-E74GBCTT.js → chunk-XVVYNOTX.js} +2 -2
- package/dist/{chunk-3NVOHQVY.js → chunk-YX27XM67.js} +4 -44
- package/dist/{chunk-TB6TCWEB.cjs → chunk-ZPHRTTQX.cjs} +2 -2
- package/dist/{component-GVCCL5XU.js → component-2Z3KLWLX.js} +3 -3
- package/dist/component-NNHBHD72.cjs +18 -0
- package/dist/convert.d.ts +11 -0
- package/dist/dual-modes-HEXPFVUE.js +12 -0
- package/dist/dual-modes-LLIWZCHC.cjs +12 -0
- package/dist/{llmz-2HD6WKIP.cjs → execute-2BVFYTJT.cjs} +545 -429
- package/dist/{llmz-JTZUIYRP.js → execute-EZXXBWB6.js} +536 -420
- package/dist/exit-LUJY7JIG.cjs +8 -0
- package/dist/exit-VJATJTQI.js +8 -0
- package/dist/index.cjs +49 -49
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -22
- package/dist/{jsx-RIPUQSAU.js → jsx-DDZ63UUF.js} +2 -2
- package/dist/jsx-ULPWX5TW.cjs +13 -0
- package/dist/runtime/execute.d.ts +3 -0
- package/dist/runtime/generate.d.ts +10 -0
- package/dist/runtime/interpret-result.d.ts +12 -0
- package/dist/runtime/interpret-result.test.d.ts +1 -0
- package/dist/runtime/tool-wrapper.d.ts +17 -0
- package/dist/runtime/tool-wrapper.test.d.ts +1 -0
- package/dist/{llmz.d.ts → runtime/types.d.ts} +12 -13
- package/dist/runtime/utils.d.ts +10 -0
- package/dist/runtime/vm-context.d.ts +12 -0
- package/dist/tool-DNHVW3KC.js +11 -0
- package/dist/tool-GJ6ZXWS2.cjs +11 -0
- package/dist/{truncator-HCWH5MJ3.js → truncator-3U2QUUJJ.js} +3 -3
- package/dist/truncator-3ZN7W6NB.cjs +10 -0
- package/dist/{typings-FPFJ5D5R.js → typings-3YV3RDMP.js} +3 -3
- package/dist/typings-ZTFPPA5W.cjs +10 -0
- package/dist/utils-GLZVMRWO.cjs +39 -0
- package/dist/{utils-M5KFPSNZ.js → utils-ZEZ66X6Q.js} +4 -4
- package/dist/utils.d.ts +1 -4
- package/dist/{vm-KBBQ7U5L.js → vm-PYCKS77H.js} +3 -3
- package/dist/vm-VHB67FVH.cjs +10 -0
- package/package.json +1 -1
- package/dist/component-YMPMWSTU.cjs +0 -18
- package/dist/dual-modes-KOU5YJ3Q.cjs +0 -12
- package/dist/dual-modes-X7YHJBFJ.js +0 -12
- package/dist/exit-A34GODDB.cjs +0 -8
- package/dist/exit-J55SREDL.js +0 -8
- package/dist/jsx-XEUSAKAK.cjs +0 -13
- package/dist/tool-B3DJ3D2F.js +0 -11
- package/dist/tool-IWPZD5OY.cjs +0 -11
- package/dist/truncator-SOO6NHLD.cjs +0 -10
- package/dist/typings-O2FLZGQN.cjs +0 -10
- package/dist/utils-PWX3JPCF.cjs +0 -39
- package/dist/vm-R2XBIWE4.cjs +0 -10
|
@@ -1,19 +1,61 @@
|
|
|
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
|
|
3
|
+
var _chunk7LMIOS6Hcjs = require('./chunk-7LMIOS6H.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
var _chunkFPLSJF4Scjs = require('./chunk-FPLSJF4S.cjs');
|
|
8
9
|
|
|
9
|
-
var _chunkFQ4QCUTIcjs = require('./chunk-FQ4QCUTI.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
var _chunk7XVBJQ53cjs = require('./chunk-7XVBJQ53.cjs');
|
|
12
|
+
var _chunkHC2QZTVTcjs = require('./chunk-HC2QZTVT.cjs');
|
|
14
13
|
|
|
15
14
|
// src/tool.ts
|
|
16
15
|
var _zui = require('@bpinternal/zui');
|
|
16
|
+
|
|
17
|
+
// src/convert.ts
|
|
18
|
+
|
|
19
|
+
function convertObjectToZuiLiterals(obj, nested = false) {
|
|
20
|
+
if (typeof obj === "string") {
|
|
21
|
+
return _zui.z.literal(obj).catch(() => obj);
|
|
22
|
+
}
|
|
23
|
+
if (typeof obj === "number") {
|
|
24
|
+
return _zui.z.literal(obj).catch(() => obj);
|
|
25
|
+
}
|
|
26
|
+
if (typeof obj === "boolean") {
|
|
27
|
+
return _zui.z.literal(obj).catch(() => obj);
|
|
28
|
+
}
|
|
29
|
+
if (Array.isArray(obj)) {
|
|
30
|
+
if (obj.length === 0) {
|
|
31
|
+
return _zui.z.tuple([]).catch(() => obj);
|
|
32
|
+
}
|
|
33
|
+
const items = obj.map((child) => convertObjectToZuiLiterals(child, true));
|
|
34
|
+
return _zui.z.tuple(items).catch(() => obj);
|
|
35
|
+
}
|
|
36
|
+
if (obj !== null && typeof obj === "object") {
|
|
37
|
+
const shape = {};
|
|
38
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
39
|
+
shape[key] = convertObjectToZuiLiterals(value, true);
|
|
40
|
+
}
|
|
41
|
+
if (nested) {
|
|
42
|
+
return _zui.z.object(shape).catch(() => obj);
|
|
43
|
+
}
|
|
44
|
+
if (Object.keys(shape).length === 0) {
|
|
45
|
+
return _zui.z.object({}).catch(() => obj);
|
|
46
|
+
}
|
|
47
|
+
return shape;
|
|
48
|
+
}
|
|
49
|
+
if (obj === void 0) {
|
|
50
|
+
return _zui.z.undefined().catch(() => void 0);
|
|
51
|
+
}
|
|
52
|
+
if (obj === null) {
|
|
53
|
+
return _zui.z.null().catch(() => null);
|
|
54
|
+
}
|
|
55
|
+
throw new Error(`Unsupported object type ${typeof obj}, ${obj})`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// src/tool.ts
|
|
17
59
|
var Tool = (_class = class _Tool {
|
|
18
60
|
|
|
19
61
|
|
|
@@ -104,13 +146,17 @@ var Tool = (_class = class _Tool {
|
|
|
104
146
|
} else {
|
|
105
147
|
input = _zui.z.any();
|
|
106
148
|
}
|
|
107
|
-
if (!
|
|
108
|
-
const inputExtensions = _chunkFQ4QCUTIcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
|
|
149
|
+
if (!_chunkHC2QZTVTcjs.isEmpty_default.call(void 0, this._staticInputValues)) {
|
|
109
150
|
if (_zui.z.is.zuiObject(input)) {
|
|
151
|
+
const inputExtensions = convertObjectToZuiLiterals(this._staticInputValues);
|
|
110
152
|
input = input.extend(inputExtensions);
|
|
111
153
|
} else if (_zui.z.is.zuiArray(input)) {
|
|
154
|
+
const inputExtensions = convertObjectToZuiLiterals(this._staticInputValues);
|
|
112
155
|
input = _zui.z.array(input.element.extend(inputExtensions));
|
|
113
156
|
} else {
|
|
157
|
+
const inputExtensions = convertObjectToZuiLiterals(
|
|
158
|
+
this._staticInputValues
|
|
159
|
+
);
|
|
114
160
|
input = inputExtensions;
|
|
115
161
|
}
|
|
116
162
|
}
|
|
@@ -149,13 +195,13 @@ var Tool = (_class = class _Tool {
|
|
|
149
195
|
*/
|
|
150
196
|
rename(name) {
|
|
151
197
|
const before = this.name;
|
|
152
|
-
if (!
|
|
198
|
+
if (!_chunkFPLSJF4Scjs.isValidIdentifier.call(void 0, name)) {
|
|
153
199
|
throw new Error(
|
|
154
200
|
`Invalid name for tool ${name}. A tool name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
|
|
155
201
|
);
|
|
156
202
|
}
|
|
157
203
|
this.name = name;
|
|
158
|
-
this.aliases =
|
|
204
|
+
this.aliases = _chunkHC2QZTVTcjs.uniq_default.call(void 0, [name, ...this.aliases.map((alias) => alias === before ? name : alias)]);
|
|
159
205
|
return this;
|
|
160
206
|
}
|
|
161
207
|
/**
|
|
@@ -325,7 +371,7 @@ var Tool = (_class = class _Tool {
|
|
|
325
371
|
* ```
|
|
326
372
|
*/
|
|
327
373
|
constructor(props) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);
|
|
328
|
-
if (!
|
|
374
|
+
if (!_chunkFPLSJF4Scjs.isValidIdentifier.call(void 0, props.name)) {
|
|
329
375
|
throw new Error(
|
|
330
376
|
`Invalid name for tool ${props.name}. A tool name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
|
|
331
377
|
);
|
|
@@ -350,17 +396,17 @@ var Tool = (_class = class _Tool {
|
|
|
350
396
|
`Invalid aliases for tool ${props.name}. Expected an array, but got type "${typeof props.aliases}"`
|
|
351
397
|
);
|
|
352
398
|
}
|
|
353
|
-
if (props.aliases && props.aliases.some((alias) => !
|
|
399
|
+
if (props.aliases && props.aliases.some((alias) => !_chunkFPLSJF4Scjs.isValidIdentifier.call(void 0, alias))) {
|
|
354
400
|
throw new Error(`Invalid aliases for tool ${props.name}. Expected an array of valid identifiers.`);
|
|
355
401
|
}
|
|
356
402
|
if (typeof props.input !== "undefined") {
|
|
357
|
-
if (
|
|
403
|
+
if (_chunkFPLSJF4Scjs.isZuiSchema.call(void 0, props.input)) {
|
|
358
404
|
try {
|
|
359
405
|
this.input = _zui.transforms.toJSONSchema(props.input);
|
|
360
406
|
} catch (e6) {
|
|
361
407
|
this.input = _zui.transforms.toJSONSchemaLegacy(props.input);
|
|
362
408
|
}
|
|
363
|
-
} else if (
|
|
409
|
+
} else if (_chunkFPLSJF4Scjs.isJsonSchema.call(void 0, props.input)) {
|
|
364
410
|
this.input = props.input;
|
|
365
411
|
} else {
|
|
366
412
|
throw new Error(
|
|
@@ -369,13 +415,13 @@ var Tool = (_class = class _Tool {
|
|
|
369
415
|
}
|
|
370
416
|
}
|
|
371
417
|
if (typeof props.output !== "undefined") {
|
|
372
|
-
if (
|
|
418
|
+
if (_chunkFPLSJF4Scjs.isZuiSchema.call(void 0, props.output)) {
|
|
373
419
|
try {
|
|
374
420
|
this.output = _zui.transforms.toJSONSchema(props.output);
|
|
375
421
|
} catch (e7) {
|
|
376
422
|
this.output = _zui.transforms.toJSONSchemaLegacy(props.output);
|
|
377
423
|
}
|
|
378
|
-
} else if (
|
|
424
|
+
} else if (_chunkFPLSJF4Scjs.isJsonSchema.call(void 0, props.output)) {
|
|
379
425
|
this.output = props.output;
|
|
380
426
|
} else {
|
|
381
427
|
throw new Error(
|
|
@@ -384,7 +430,7 @@ var Tool = (_class = class _Tool {
|
|
|
384
430
|
}
|
|
385
431
|
}
|
|
386
432
|
this.name = props.name;
|
|
387
|
-
this.aliases =
|
|
433
|
+
this.aliases = _chunkHC2QZTVTcjs.uniq_default.call(void 0, [props.name, ..._nullishCoalesce(props.aliases, () => ( []))]);
|
|
388
434
|
this.description = props.description;
|
|
389
435
|
this.metadata = _nullishCoalesce(props.metadata, () => ( {}));
|
|
390
436
|
this._handler = props.handler;
|
|
@@ -495,14 +541,14 @@ var Tool = (_class = class _Tool {
|
|
|
495
541
|
output = _zui.transforms.fromJSONSchemaLegacy(this.output);
|
|
496
542
|
}
|
|
497
543
|
}
|
|
498
|
-
if (input && _zui.z.is.zuiObject(input.naked()) && typeof this._staticInputValues === "object" && !
|
|
499
|
-
const inputExtensions =
|
|
544
|
+
if (input && _zui.z.is.zuiObject(input.naked()) && typeof this._staticInputValues === "object" && !_chunkHC2QZTVTcjs.isEmpty_default.call(void 0, this._staticInputValues)) {
|
|
545
|
+
const inputExtensions = convertObjectToZuiLiterals(this._staticInputValues);
|
|
500
546
|
input = input.extend(inputExtensions);
|
|
501
547
|
} else if (this._staticInputValues !== void 0) {
|
|
502
|
-
input =
|
|
548
|
+
input = convertObjectToZuiLiterals(this._staticInputValues);
|
|
503
549
|
}
|
|
504
550
|
const fnType = _zui.z.function(input, _zui.z.promise(output)).title(this.name).describe(_nullishCoalesce(this.description, () => ( "")));
|
|
505
|
-
return
|
|
551
|
+
return _chunk7LMIOS6Hcjs.getTypings.call(void 0, fnType, {
|
|
506
552
|
declaration: true
|
|
507
553
|
});
|
|
508
554
|
}
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
isJsonSchema,
|
|
3
3
|
isValidIdentifier,
|
|
4
4
|
isZuiSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YX27XM67.js";
|
|
6
6
|
import {
|
|
7
7
|
uniq_default
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-34GJUS6U.js";
|
|
9
9
|
|
|
10
10
|
// src/exit.ts
|
|
11
11
|
import { transforms } from "@bpinternal/zui";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
isPlainObject_default,
|
|
5
5
|
pickBy_default,
|
|
6
6
|
startCase_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-34GJUS6U.js";
|
|
8
8
|
|
|
9
9
|
// src/utils.ts
|
|
10
10
|
import { getWasmTokenizer } from "@bpinternal/thicktoken";
|
|
@@ -138,47 +138,6 @@ var stripInvalidIdentifiers = (object) => {
|
|
|
138
138
|
}
|
|
139
139
|
return pickBy_default(object, (__, key) => Identifier.safeParse(key).success);
|
|
140
140
|
};
|
|
141
|
-
var convertObjectToZuiLiterals = (obj, nested = false) => {
|
|
142
|
-
if (typeof obj === "string") {
|
|
143
|
-
return z.literal(obj).catch(() => obj);
|
|
144
|
-
}
|
|
145
|
-
if (typeof obj === "number") {
|
|
146
|
-
return z.literal(obj).catch(() => obj);
|
|
147
|
-
}
|
|
148
|
-
if (typeof obj === "boolean") {
|
|
149
|
-
return z.literal(obj).catch(() => obj);
|
|
150
|
-
}
|
|
151
|
-
if (Array.isArray(obj)) {
|
|
152
|
-
if (obj.length === 0) {
|
|
153
|
-
return z.tuple([]).catch(() => obj);
|
|
154
|
-
}
|
|
155
|
-
return z.tuple([
|
|
156
|
-
// the tuple needs to have at least one element
|
|
157
|
-
convertObjectToZuiLiterals(obj[0]),
|
|
158
|
-
...obj.slice(1).map((child) => convertObjectToZuiLiterals(child))
|
|
159
|
-
]).catch(() => obj);
|
|
160
|
-
}
|
|
161
|
-
if (obj !== null && typeof obj === "object") {
|
|
162
|
-
const shape = {};
|
|
163
|
-
for (const key in obj) {
|
|
164
|
-
shape[key] = convertObjectToZuiLiterals(obj[key], true);
|
|
165
|
-
}
|
|
166
|
-
if (nested) {
|
|
167
|
-
return z.object(shape).catch(() => shape);
|
|
168
|
-
}
|
|
169
|
-
if (Object.keys(shape).length === 0) {
|
|
170
|
-
return z.object({}).catch(() => shape);
|
|
171
|
-
}
|
|
172
|
-
return shape;
|
|
173
|
-
}
|
|
174
|
-
if (obj === void 0) {
|
|
175
|
-
return z.undefined().catch(() => void 0);
|
|
176
|
-
}
|
|
177
|
-
if (obj === null) {
|
|
178
|
-
return z.null().catch(() => null);
|
|
179
|
-
}
|
|
180
|
-
throw new Error(`Unsupported object type ${typeof obj}, ${obj})`);
|
|
181
|
-
};
|
|
182
141
|
var isValidSchema = (schema) => {
|
|
183
142
|
try {
|
|
184
143
|
transforms.fromJSONSchemaLegacy(schema);
|
|
@@ -205,6 +164,7 @@ function isValidMessageName(name) {
|
|
|
205
164
|
}
|
|
206
165
|
return /^[A-Z]{1,50}$/i.test(name);
|
|
207
166
|
}
|
|
167
|
+
var getErrorMessage = (err) => err instanceof Error ? err.message : JSON.stringify(err);
|
|
208
168
|
|
|
209
169
|
export {
|
|
210
170
|
init,
|
|
@@ -218,10 +178,10 @@ export {
|
|
|
218
178
|
awaitObject,
|
|
219
179
|
toValidObjectName,
|
|
220
180
|
stripInvalidIdentifiers,
|
|
221
|
-
convertObjectToZuiLiterals,
|
|
222
181
|
isValidSchema,
|
|
223
182
|
isZuiSchema,
|
|
224
183
|
isJsonSchema,
|
|
225
184
|
isValidIdentifier,
|
|
226
|
-
isValidMessageName
|
|
185
|
+
isValidMessageName,
|
|
186
|
+
getErrorMessage
|
|
227
187
|
};
|
|
@@ -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
|
|
3
|
+
var _chunkFPLSJF4Scjs = require('./chunk-FPLSJF4S.cjs');
|
|
4
4
|
|
|
5
5
|
// src/truncator.ts
|
|
6
6
|
var DEFAULT_REMOVE_CHUNK = 250;
|
|
@@ -25,7 +25,7 @@ function truncateWrappedContent({
|
|
|
25
25
|
throwOnFailure = true
|
|
26
26
|
}) {
|
|
27
27
|
var _a, _b, _c;
|
|
28
|
-
const tokenizer =
|
|
28
|
+
const tokenizer = _chunkFPLSJF4Scjs.getTokenizer.call(void 0, );
|
|
29
29
|
const parts = [];
|
|
30
30
|
for (const msg of messages) {
|
|
31
31
|
const current = [];
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
isAnyComponent,
|
|
6
6
|
isComponent,
|
|
7
7
|
renderToTsx
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-3T5IU7OU.js";
|
|
9
|
+
import "./chunk-XTEHT2TK.js";
|
|
10
|
+
import "./chunk-34GJUS6U.js";
|
|
11
11
|
export {
|
|
12
12
|
Component,
|
|
13
13
|
assertValidComponent,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkCQ3UJW76cjs = require('./chunk-CQ3UJW76.cjs');
|
|
9
|
+
require('./chunk-5ZF6NTYI.cjs');
|
|
10
|
+
require('./chunk-HC2QZTVT.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.Component = _chunkCQ3UJW76cjs.Component; exports.assertValidComponent = _chunkCQ3UJW76cjs.assertValidComponent; exports.getComponentReference = _chunkCQ3UJW76cjs.getComponentReference; exports.isAnyComponent = _chunkCQ3UJW76cjs.isAnyComponent; exports.isComponent = _chunkCQ3UJW76cjs.isComponent; exports.renderToTsx = _chunkCQ3UJW76cjs.renderToTsx;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from '@bpinternal/zui';
|
|
2
|
+
export type StaticValue = string | number | boolean | null | undefined | readonly StaticValue[] | StaticObject;
|
|
3
|
+
export type StaticObject = {
|
|
4
|
+
readonly [key: string]: StaticValue;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Transforms static input values to Zui schemas that narrow manually provided values to literals.
|
|
8
|
+
*/
|
|
9
|
+
export declare function convertObjectToZuiLiterals<T extends StaticObject>(obj: T, nested?: false): keyof T extends never ? z.ZodTypeAny : z.ZodRawShape;
|
|
10
|
+
export declare function convertObjectToZuiLiterals<T extends StaticValue>(obj: T, nested: true): z.ZodTypeAny;
|
|
11
|
+
export declare function convertObjectToZuiLiterals<T extends Exclude<StaticValue, StaticObject>>(obj: T, nested?: false): z.ZodTypeAny;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DualModePrompt
|
|
3
|
+
} from "./chunk-2O3UTPVH.js";
|
|
4
|
+
import "./chunk-YEAWWJSJ.js";
|
|
5
|
+
import "./chunk-3T5IU7OU.js";
|
|
6
|
+
import "./chunk-XTEHT2TK.js";
|
|
7
|
+
import "./chunk-L74UZONX.js";
|
|
8
|
+
import "./chunk-YX27XM67.js";
|
|
9
|
+
import "./chunk-34GJUS6U.js";
|
|
10
|
+
export {
|
|
11
|
+
DualModePrompt
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkBBX2LDZEcjs = require('./chunk-BBX2LDZE.cjs');
|
|
4
|
+
require('./chunk-KIN7Y247.cjs');
|
|
5
|
+
require('./chunk-CQ3UJW76.cjs');
|
|
6
|
+
require('./chunk-5ZF6NTYI.cjs');
|
|
7
|
+
require('./chunk-ZPHRTTQX.cjs');
|
|
8
|
+
require('./chunk-FPLSJF4S.cjs');
|
|
9
|
+
require('./chunk-HC2QZTVT.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.DualModePrompt = _chunkBBX2LDZEcjs.DualModePrompt;
|