llmz 0.6.0 → 0.6.2
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/DOCS.md +1 -3
- package/dist/_baseForOwn-CFhWe_W6.js +48 -0
- package/dist/_baseForOwn-buOZDFbK.cjs +103 -0
- package/dist/_baseIteratee-CF4qP2a8.cjs +2377 -0
- package/dist/_baseIteratee-P_firB7b.js +2138 -0
- package/dist/_getPrototype-CG7Dxrrz.js +6 -0
- package/dist/_getPrototype-DQDlNVVM.cjs +10 -0
- package/dist/_overArg-C5Hy7oCi.cjs +196 -0
- package/dist/_overArg-CRYbj1NH.js +155 -0
- package/dist/citations.d.ts +11 -11
- package/dist/component-BwixNVH8.cjs +73 -0
- package/dist/component-DGG7d_Mz.js +44 -0
- package/dist/context.d.ts +8 -8
- package/dist/custom-client-BPmEoWKu.cjs +2618 -0
- package/dist/custom-client-NUoxrFQh.js +2547 -0
- package/dist/dual-modes-D_p-jedw.js +2750 -0
- package/dist/dual-modes-wAOAlaBS.cjs +2840 -0
- package/dist/errors-C962uJdS.cjs +220 -0
- package/dist/errors-Cg1G0Awu.js +161 -0
- package/dist/execute-BEaq3jkV.cjs +1003 -0
- package/dist/execute-DYvFRs54.js +1001 -0
- package/dist/exit-BGi0Kk0y.cjs +428 -0
- package/dist/exit-CDdxDBRT.js +417 -0
- package/dist/index.cjs +1786 -1489
- package/dist/index.d.ts +10 -9
- package/dist/index.js +1721 -1479
- package/dist/index.workerd.js +17534 -16875
- package/dist/isEmpty-BhJRCqIF.js +52 -0
- package/dist/isEmpty-LY533Wmh.cjs +57 -0
- package/dist/isPlainObject-CSxXVKCk.cjs +56 -0
- package/dist/isPlainObject-D39AzPO2.js +51 -0
- package/dist/jsx-BWvT6ukg.cjs +75 -0
- package/dist/jsx-CIgdGGVs.js +52 -0
- package/dist/jsx.d.ts +2 -2
- package/dist/prompts/chat-mode/system.md.d.ts +1 -1
- package/dist/prompts/chat-mode/user.md.d.ts +1 -1
- package/dist/prompts/worker-mode/system.md.d.ts +1 -1
- package/dist/prompts/worker-mode/user.md.d.ts +1 -1
- package/dist/quickjs-variant-BYhMBpwU.js +45 -0
- package/dist/quickjs-variant-CsIwTVFC.cjs +56 -0
- package/dist/quickjs-variant.workerd.d.ts +1 -1
- package/dist/result.d.ts +12 -12
- package/dist/rolldown-runtime-EAsCxrDo.js +14 -0
- package/dist/runtime/interpret-result.d.ts +1 -1
- package/dist/snapshots.d.ts +5 -5
- package/dist/stack-traces-BIE_5Xwf.js +21 -0
- package/dist/stack-traces-ntw_qhoy.cjs +26 -0
- package/dist/tool-CAo-BQHs.js +643 -0
- package/dist/tool-DdPZb0JW.cjs +654 -0
- package/dist/tool.d.ts +3 -3
- package/dist/truncator-B6aaJaN1.cjs +276 -0
- package/dist/truncator-DZqEqnpD.js +253 -0
- package/dist/typings-BwAz_TM9.cjs +784 -0
- package/dist/typings-CrBa7Tyy.js +743 -0
- package/dist/uniq-BYQ7GWwb.js +183 -0
- package/dist/uniq-G872RWmE.cjs +200 -0
- package/dist/utils-UBeAFeEI.js +950 -0
- package/dist/utils-ZpJm00ed.cjs +1075 -0
- package/dist/vm/errors.d.ts +2 -2
- package/dist/vm-BjkJqSQH.cjs +3438 -0
- package/dist/vm-C5vf1LH3.js +3436 -0
- package/package.json +7 -7
- package/dist/chunk-34GJUS6U.js +0 -3266
- package/dist/chunk-3UZKLXAD.cjs +0 -3249
- package/dist/chunk-4POZJQXN.js +0 -1530
- package/dist/chunk-5WBNTV42.cjs +0 -1530
- package/dist/chunk-5ZF6NTYI.cjs +0 -33
- package/dist/chunk-72ZWBNZV.js +0 -173
- package/dist/chunk-DDSJTR6Q.cjs +0 -257
- package/dist/chunk-GDJTKI7J.js +0 -792
- package/dist/chunk-GLXADNTR.js +0 -199
- package/dist/chunk-GOWPACSK.cjs +0 -199
- package/dist/chunk-HB2G32AK.js +0 -257
- package/dist/chunk-HC2QZTVT.cjs +0 -3266
- package/dist/chunk-HEAQAEFZ.cjs +0 -173
- package/dist/chunk-HMMM32RG.cjs +0 -792
- package/dist/chunk-I56MPOVG.cjs +0 -62
- package/dist/chunk-KIN7Y247.cjs +0 -32
- package/dist/chunk-KTDBAJBB.cjs +0 -1685
- package/dist/chunk-KWQTYXAT.js +0 -62
- package/dist/chunk-LOX7GOR6.js +0 -1685
- package/dist/chunk-PK72FAKD.cjs +0 -175
- package/dist/chunk-PZE6PIPG.cjs +0 -621
- package/dist/chunk-RGUG3UMF.cjs +0 -26
- package/dist/chunk-TDALRNGL.js +0 -621
- package/dist/chunk-UGHFNCPD.js +0 -26
- package/dist/chunk-WSVDMGMR.js +0 -175
- package/dist/chunk-XTEHT2TK.js +0 -33
- package/dist/chunk-YEAWWJSJ.js +0 -32
- package/dist/chunk-YRS7KRKP.js +0 -3249
- package/dist/component-2NYFY6CW.cjs +0 -14
- package/dist/component-ASNZHQUR.js +0 -14
- package/dist/dual-modes-S5TJ5JVJ.js +0 -10
- package/dist/dual-modes-TCMWBZIH.cjs +0 -10
- package/dist/execute-FF7D46TY.js +0 -1109
- package/dist/execute-IK6O4SU2.cjs +0 -1109
- package/dist/exit-MX56VN2C.cjs +0 -8
- package/dist/exit-UQ3EUX5D.js +0 -8
- package/dist/jsx-DDZ63UUF.js +0 -13
- package/dist/jsx-ULPWX5TW.cjs +0 -13
- package/dist/tool-KD7FL45V.js +0 -11
- package/dist/tool-VE2YHIY2.cjs +0 -11
- package/dist/truncator-73RCL52Y.js +0 -12
- package/dist/truncator-FZNLYSDL.cjs +0 -12
- package/dist/typings-E2RROCLT.js +0 -10
- package/dist/typings-LQOBZXSO.cjs +0 -10
- package/dist/utils-IATCUNKF.js +0 -43
- package/dist/utils-ITB4NEL7.cjs +0 -43
- package/dist/vm-6D3IIIU7.cjs +0 -12
- package/dist/vm-QO5FSGPN.js +0 -12
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { t as overArg } from "./_overArg-CRYbj1NH.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js
|
|
3
|
+
/** Built-in value references. */
|
|
4
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { getPrototype as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js
|
|
2
|
+
/** Built-in value references. */
|
|
3
|
+
var getPrototype = require("./_overArg-C5Hy7oCi.cjs").overArg(Object.getPrototypeOf, Object);
|
|
4
|
+
//#endregion
|
|
5
|
+
Object.defineProperty(exports, "getPrototype", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return getPrototype;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js
|
|
2
|
+
/** Detect free variable `global` from Node.js. */
|
|
3
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js
|
|
6
|
+
/** Detect free variable `self`. */
|
|
7
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
8
|
+
/** Used as a reference to the global object. */
|
|
9
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js
|
|
12
|
+
/** Built-in value references. */
|
|
13
|
+
var Symbol = root.Symbol;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js
|
|
16
|
+
/** Used for built-in method references. */
|
|
17
|
+
var objectProto = Object.prototype;
|
|
18
|
+
/** Used to check objects for own properties. */
|
|
19
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
20
|
+
/**
|
|
21
|
+
* Used to resolve the
|
|
22
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
23
|
+
* of values.
|
|
24
|
+
*/
|
|
25
|
+
var nativeObjectToString$1 = objectProto.toString;
|
|
26
|
+
/** Built-in value references. */
|
|
27
|
+
var symToStringTag$1 = Symbol ? Symbol.toStringTag : void 0;
|
|
28
|
+
/**
|
|
29
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
30
|
+
*
|
|
31
|
+
* @private
|
|
32
|
+
* @param {*} value The value to query.
|
|
33
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
34
|
+
*/
|
|
35
|
+
function getRawTag(value) {
|
|
36
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
37
|
+
try {
|
|
38
|
+
value[symToStringTag$1] = void 0;
|
|
39
|
+
var unmasked = true;
|
|
40
|
+
} catch (e) {}
|
|
41
|
+
var result = nativeObjectToString$1.call(value);
|
|
42
|
+
if (unmasked) {
|
|
43
|
+
if (isOwn) value[symToStringTag$1] = tag;
|
|
44
|
+
else delete value[symToStringTag$1];
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js
|
|
50
|
+
/**
|
|
51
|
+
* Used to resolve the
|
|
52
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
53
|
+
* of values.
|
|
54
|
+
*/
|
|
55
|
+
var nativeObjectToString = Object.prototype.toString;
|
|
56
|
+
/**
|
|
57
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
58
|
+
*
|
|
59
|
+
* @private
|
|
60
|
+
* @param {*} value The value to convert.
|
|
61
|
+
* @returns {string} Returns the converted string.
|
|
62
|
+
*/
|
|
63
|
+
function objectToString(value) {
|
|
64
|
+
return nativeObjectToString.call(value);
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js
|
|
68
|
+
/** `Object#toString` result references. */
|
|
69
|
+
var nullTag = "[object Null]";
|
|
70
|
+
var undefinedTag = "[object Undefined]";
|
|
71
|
+
/** Built-in value references. */
|
|
72
|
+
var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
|
|
73
|
+
/**
|
|
74
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
75
|
+
*
|
|
76
|
+
* @private
|
|
77
|
+
* @param {*} value The value to query.
|
|
78
|
+
* @returns {string} Returns the `toStringTag`.
|
|
79
|
+
*/
|
|
80
|
+
function baseGetTag(value) {
|
|
81
|
+
if (value == null) return value === void 0 ? undefinedTag : nullTag;
|
|
82
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js
|
|
86
|
+
/**
|
|
87
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
88
|
+
* and has a `typeof` result of "object".
|
|
89
|
+
*
|
|
90
|
+
* @static
|
|
91
|
+
* @memberOf _
|
|
92
|
+
* @since 4.0.0
|
|
93
|
+
* @category Lang
|
|
94
|
+
* @param {*} value The value to check.
|
|
95
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
96
|
+
* @example
|
|
97
|
+
*
|
|
98
|
+
* _.isObjectLike({});
|
|
99
|
+
* // => true
|
|
100
|
+
*
|
|
101
|
+
* _.isObjectLike([1, 2, 3]);
|
|
102
|
+
* // => true
|
|
103
|
+
*
|
|
104
|
+
* _.isObjectLike(_.noop);
|
|
105
|
+
* // => false
|
|
106
|
+
*
|
|
107
|
+
* _.isObjectLike(null);
|
|
108
|
+
* // => false
|
|
109
|
+
*/
|
|
110
|
+
function isObjectLike(value) {
|
|
111
|
+
return value != null && typeof value == "object";
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js
|
|
115
|
+
/**
|
|
116
|
+
* Checks if `value` is classified as an `Array` object.
|
|
117
|
+
*
|
|
118
|
+
* @static
|
|
119
|
+
* @memberOf _
|
|
120
|
+
* @since 0.1.0
|
|
121
|
+
* @category Lang
|
|
122
|
+
* @param {*} value The value to check.
|
|
123
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
124
|
+
* @example
|
|
125
|
+
*
|
|
126
|
+
* _.isArray([1, 2, 3]);
|
|
127
|
+
* // => true
|
|
128
|
+
*
|
|
129
|
+
* _.isArray(document.body.children);
|
|
130
|
+
* // => false
|
|
131
|
+
*
|
|
132
|
+
* _.isArray('abc');
|
|
133
|
+
* // => false
|
|
134
|
+
*
|
|
135
|
+
* _.isArray(_.noop);
|
|
136
|
+
* // => false
|
|
137
|
+
*/
|
|
138
|
+
var isArray = Array.isArray;
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js
|
|
141
|
+
/**
|
|
142
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
143
|
+
*
|
|
144
|
+
* @private
|
|
145
|
+
* @param {Function} func The function to wrap.
|
|
146
|
+
* @param {Function} transform The argument transform.
|
|
147
|
+
* @returns {Function} Returns the new function.
|
|
148
|
+
*/
|
|
149
|
+
function overArg(func, transform) {
|
|
150
|
+
return function(arg) {
|
|
151
|
+
return func(transform(arg));
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
Object.defineProperty(exports, "Symbol", {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: function() {
|
|
158
|
+
return Symbol;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(exports, "baseGetTag", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function() {
|
|
164
|
+
return baseGetTag;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, "freeGlobal", {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function() {
|
|
170
|
+
return freeGlobal;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
Object.defineProperty(exports, "isArray", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function() {
|
|
176
|
+
return isArray;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
Object.defineProperty(exports, "isObjectLike", {
|
|
180
|
+
enumerable: true,
|
|
181
|
+
get: function() {
|
|
182
|
+
return isObjectLike;
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
Object.defineProperty(exports, "overArg", {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function() {
|
|
188
|
+
return overArg;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
Object.defineProperty(exports, "root", {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
get: function() {
|
|
194
|
+
return root;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js
|
|
2
|
+
/** Detect free variable `global` from Node.js. */
|
|
3
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js
|
|
6
|
+
/** Detect free variable `self`. */
|
|
7
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
8
|
+
/** Used as a reference to the global object. */
|
|
9
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js
|
|
12
|
+
/** Built-in value references. */
|
|
13
|
+
var Symbol = root.Symbol;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js
|
|
16
|
+
/** Used for built-in method references. */
|
|
17
|
+
var objectProto = Object.prototype;
|
|
18
|
+
/** Used to check objects for own properties. */
|
|
19
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
20
|
+
/**
|
|
21
|
+
* Used to resolve the
|
|
22
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
23
|
+
* of values.
|
|
24
|
+
*/
|
|
25
|
+
var nativeObjectToString$1 = objectProto.toString;
|
|
26
|
+
/** Built-in value references. */
|
|
27
|
+
var symToStringTag$1 = Symbol ? Symbol.toStringTag : void 0;
|
|
28
|
+
/**
|
|
29
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
30
|
+
*
|
|
31
|
+
* @private
|
|
32
|
+
* @param {*} value The value to query.
|
|
33
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
34
|
+
*/
|
|
35
|
+
function getRawTag(value) {
|
|
36
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
37
|
+
try {
|
|
38
|
+
value[symToStringTag$1] = void 0;
|
|
39
|
+
var unmasked = true;
|
|
40
|
+
} catch (e) {}
|
|
41
|
+
var result = nativeObjectToString$1.call(value);
|
|
42
|
+
if (unmasked) {
|
|
43
|
+
if (isOwn) value[symToStringTag$1] = tag;
|
|
44
|
+
else delete value[symToStringTag$1];
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js
|
|
50
|
+
/**
|
|
51
|
+
* Used to resolve the
|
|
52
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
53
|
+
* of values.
|
|
54
|
+
*/
|
|
55
|
+
var nativeObjectToString = Object.prototype.toString;
|
|
56
|
+
/**
|
|
57
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
58
|
+
*
|
|
59
|
+
* @private
|
|
60
|
+
* @param {*} value The value to convert.
|
|
61
|
+
* @returns {string} Returns the converted string.
|
|
62
|
+
*/
|
|
63
|
+
function objectToString(value) {
|
|
64
|
+
return nativeObjectToString.call(value);
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js
|
|
68
|
+
/** `Object#toString` result references. */
|
|
69
|
+
var nullTag = "[object Null]";
|
|
70
|
+
var undefinedTag = "[object Undefined]";
|
|
71
|
+
/** Built-in value references. */
|
|
72
|
+
var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
|
|
73
|
+
/**
|
|
74
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
75
|
+
*
|
|
76
|
+
* @private
|
|
77
|
+
* @param {*} value The value to query.
|
|
78
|
+
* @returns {string} Returns the `toStringTag`.
|
|
79
|
+
*/
|
|
80
|
+
function baseGetTag(value) {
|
|
81
|
+
if (value == null) return value === void 0 ? undefinedTag : nullTag;
|
|
82
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js
|
|
86
|
+
/**
|
|
87
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
88
|
+
* and has a `typeof` result of "object".
|
|
89
|
+
*
|
|
90
|
+
* @static
|
|
91
|
+
* @memberOf _
|
|
92
|
+
* @since 4.0.0
|
|
93
|
+
* @category Lang
|
|
94
|
+
* @param {*} value The value to check.
|
|
95
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
96
|
+
* @example
|
|
97
|
+
*
|
|
98
|
+
* _.isObjectLike({});
|
|
99
|
+
* // => true
|
|
100
|
+
*
|
|
101
|
+
* _.isObjectLike([1, 2, 3]);
|
|
102
|
+
* // => true
|
|
103
|
+
*
|
|
104
|
+
* _.isObjectLike(_.noop);
|
|
105
|
+
* // => false
|
|
106
|
+
*
|
|
107
|
+
* _.isObjectLike(null);
|
|
108
|
+
* // => false
|
|
109
|
+
*/
|
|
110
|
+
function isObjectLike(value) {
|
|
111
|
+
return value != null && typeof value == "object";
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js
|
|
115
|
+
/**
|
|
116
|
+
* Checks if `value` is classified as an `Array` object.
|
|
117
|
+
*
|
|
118
|
+
* @static
|
|
119
|
+
* @memberOf _
|
|
120
|
+
* @since 0.1.0
|
|
121
|
+
* @category Lang
|
|
122
|
+
* @param {*} value The value to check.
|
|
123
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
124
|
+
* @example
|
|
125
|
+
*
|
|
126
|
+
* _.isArray([1, 2, 3]);
|
|
127
|
+
* // => true
|
|
128
|
+
*
|
|
129
|
+
* _.isArray(document.body.children);
|
|
130
|
+
* // => false
|
|
131
|
+
*
|
|
132
|
+
* _.isArray('abc');
|
|
133
|
+
* // => false
|
|
134
|
+
*
|
|
135
|
+
* _.isArray(_.noop);
|
|
136
|
+
* // => false
|
|
137
|
+
*/
|
|
138
|
+
var isArray = Array.isArray;
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js
|
|
141
|
+
/**
|
|
142
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
143
|
+
*
|
|
144
|
+
* @private
|
|
145
|
+
* @param {Function} func The function to wrap.
|
|
146
|
+
* @param {Function} transform The argument transform.
|
|
147
|
+
* @returns {Function} Returns the new function.
|
|
148
|
+
*/
|
|
149
|
+
function overArg(func, transform) {
|
|
150
|
+
return function(arg) {
|
|
151
|
+
return func(transform(arg));
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
export { Symbol as a, baseGetTag as i, isArray as n, root as o, isObjectLike as r, freeGlobal as s, overArg as t };
|
package/dist/citations.d.ts
CHANGED
|
@@ -7,17 +7,17 @@ export type Citation = {
|
|
|
7
7
|
export type CitationReplaceFn = (citation: Citation) => string;
|
|
8
8
|
/** These are all single-token symbols that are very rare in natural texts, making them suitable for usage within GPT Prompts. */
|
|
9
9
|
export declare const RARE_SYMBOLS: {
|
|
10
|
-
readonly ARROW_UP:
|
|
11
|
-
readonly CIRCLE_BULLET:
|
|
12
|
-
readonly STAR_BULLET_FULL:
|
|
13
|
-
readonly STAR_BULLET_EMPTY:
|
|
14
|
-
readonly ARROW_BULLET:
|
|
15
|
-
readonly SQUARE_BULLET:
|
|
16
|
-
readonly TRIANGLE_BULLET:
|
|
17
|
-
readonly OPENING_TAG:
|
|
18
|
-
readonly CLOSING_TAG:
|
|
19
|
-
readonly SS:
|
|
20
|
-
readonly CROSS:
|
|
10
|
+
readonly ARROW_UP: '↑';
|
|
11
|
+
readonly CIRCLE_BULLET: '・';
|
|
12
|
+
readonly STAR_BULLET_FULL: '★';
|
|
13
|
+
readonly STAR_BULLET_EMPTY: '☆';
|
|
14
|
+
readonly ARROW_BULLET: '→';
|
|
15
|
+
readonly SQUARE_BULLET: '■';
|
|
16
|
+
readonly TRIANGLE_BULLET: '►';
|
|
17
|
+
readonly OPENING_TAG: '【';
|
|
18
|
+
readonly CLOSING_TAG: '】';
|
|
19
|
+
readonly SS: '§';
|
|
20
|
+
readonly CROSS: '†';
|
|
21
21
|
};
|
|
22
22
|
export declare class CitationsManager {
|
|
23
23
|
private _citations;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const require__baseForOwn = require("./_baseForOwn-buOZDFbK.cjs");
|
|
2
|
+
const require_jsx = require("./jsx-BWvT6ukg.cjs");
|
|
3
|
+
//#region src/component.ts
|
|
4
|
+
var component_exports = /* @__PURE__ */ require__baseForOwn.__exportAll({
|
|
5
|
+
Component: () => Component,
|
|
6
|
+
assertValidComponent: () => assertValidComponent,
|
|
7
|
+
isAnyComponent: () => isAnyComponent,
|
|
8
|
+
isComponent: () => isComponent
|
|
9
|
+
});
|
|
10
|
+
function assertValidComponent(component) {
|
|
11
|
+
if (!component.name) throw new Error("Component must have a name");
|
|
12
|
+
const nameRegex = /^[A-Z]{3,50}$/i;
|
|
13
|
+
if (!nameRegex.test(component.name)) throw new Error(`Component name "${component.name}" must be 3-50 characters long and start with an uppercase letter`);
|
|
14
|
+
if (component.aliases) {
|
|
15
|
+
for (const alias of component.aliases) if (!nameRegex.test(alias)) throw new Error(`Alias "${alias}" must be 3-50 characters long and start with an uppercase letter`);
|
|
16
|
+
}
|
|
17
|
+
if (!component.description) throw new Error("Component must have a description");
|
|
18
|
+
if (component.type === "default" && !component.default) throw new Error("Default component must have default props and children");
|
|
19
|
+
if (component.type === "leaf" && !component.leaf) throw new Error("Leaf component must have leaf props");
|
|
20
|
+
if (component.type === "container" && !component.container) throw new Error("Container component must have container props and children");
|
|
21
|
+
}
|
|
22
|
+
var Component = class {
|
|
23
|
+
definition;
|
|
24
|
+
propsType;
|
|
25
|
+
constructor(definition) {
|
|
26
|
+
assertValidComponent(definition);
|
|
27
|
+
this.definition = definition;
|
|
28
|
+
}
|
|
29
|
+
render(props, children = []) {
|
|
30
|
+
return require_jsx.createJsxComponent({
|
|
31
|
+
type: this.definition.name,
|
|
32
|
+
props,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
function isComponent(rendered, component) {
|
|
38
|
+
return require_jsx.isJsxComponent(component.definition.name, rendered);
|
|
39
|
+
}
|
|
40
|
+
function isAnyComponent(message) {
|
|
41
|
+
return require_jsx.isAnyJsxComponent(message);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
Object.defineProperty(exports, "Component", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function() {
|
|
47
|
+
return Component;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "assertValidComponent", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function() {
|
|
53
|
+
return assertValidComponent;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "component_exports", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function() {
|
|
59
|
+
return component_exports;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "isAnyComponent", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function() {
|
|
65
|
+
return isAnyComponent;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "isComponent", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function() {
|
|
71
|
+
return isComponent;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { n as __exportAll } from "./rolldown-runtime-EAsCxrDo.js";
|
|
2
|
+
import { n as isAnyJsxComponent, r as isJsxComponent, t as createJsxComponent } from "./jsx-CIgdGGVs.js";
|
|
3
|
+
//#region src/component.ts
|
|
4
|
+
var component_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Component: () => Component,
|
|
6
|
+
assertValidComponent: () => assertValidComponent,
|
|
7
|
+
isAnyComponent: () => isAnyComponent,
|
|
8
|
+
isComponent: () => isComponent
|
|
9
|
+
});
|
|
10
|
+
function assertValidComponent(component) {
|
|
11
|
+
if (!component.name) throw new Error("Component must have a name");
|
|
12
|
+
const nameRegex = /^[A-Z]{3,50}$/i;
|
|
13
|
+
if (!nameRegex.test(component.name)) throw new Error(`Component name "${component.name}" must be 3-50 characters long and start with an uppercase letter`);
|
|
14
|
+
if (component.aliases) {
|
|
15
|
+
for (const alias of component.aliases) if (!nameRegex.test(alias)) throw new Error(`Alias "${alias}" must be 3-50 characters long and start with an uppercase letter`);
|
|
16
|
+
}
|
|
17
|
+
if (!component.description) throw new Error("Component must have a description");
|
|
18
|
+
if (component.type === "default" && !component.default) throw new Error("Default component must have default props and children");
|
|
19
|
+
if (component.type === "leaf" && !component.leaf) throw new Error("Leaf component must have leaf props");
|
|
20
|
+
if (component.type === "container" && !component.container) throw new Error("Container component must have container props and children");
|
|
21
|
+
}
|
|
22
|
+
var Component = class {
|
|
23
|
+
definition;
|
|
24
|
+
propsType;
|
|
25
|
+
constructor(definition) {
|
|
26
|
+
assertValidComponent(definition);
|
|
27
|
+
this.definition = definition;
|
|
28
|
+
}
|
|
29
|
+
render(props, children = []) {
|
|
30
|
+
return createJsxComponent({
|
|
31
|
+
type: this.definition.name,
|
|
32
|
+
props,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
function isComponent(rendered, component) {
|
|
38
|
+
return isJsxComponent(component.definition.name, rendered);
|
|
39
|
+
}
|
|
40
|
+
function isAnyComponent(message) {
|
|
41
|
+
return isAnyJsxComponent(message);
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { isComponent as a, isAnyComponent as i, assertValidComponent as n, component_exports as r, Component as t };
|
package/dist/context.d.ts
CHANGED
|
@@ -404,12 +404,12 @@ export declare class Iteration implements Serializable<Iteration.JSON> {
|
|
|
404
404
|
trackMutation(mutation: ObjectMutation): void;
|
|
405
405
|
private _parameters;
|
|
406
406
|
get transcript(): TranscriptArray;
|
|
407
|
-
get tools(): Tool<z.ZodType<any,
|
|
407
|
+
get tools(): Tool<z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>>[];
|
|
408
408
|
get objects(): ObjectInstance[];
|
|
409
409
|
get model(): Models | Models[];
|
|
410
410
|
set model(value: Models | Models[]);
|
|
411
411
|
get temperature(): number;
|
|
412
|
-
get reasoningEffort(): "
|
|
412
|
+
get reasoningEffort(): "dynamic" | "high" | "low" | "medium" | "none" | undefined;
|
|
413
413
|
get exits(): Exit<unknown>[];
|
|
414
414
|
get instructions(): string | undefined;
|
|
415
415
|
llm?: {
|
|
@@ -458,9 +458,9 @@ export declare class Iteration implements Serializable<Iteration.JSON> {
|
|
|
458
458
|
id: string;
|
|
459
459
|
messages: import("@botpress/cognitive").CognitiveMessage[];
|
|
460
460
|
code: string | undefined;
|
|
461
|
-
model: Models | Models
|
|
461
|
+
model: Models[] | Models;
|
|
462
462
|
temperature: number;
|
|
463
|
-
reasoningEffort: "
|
|
463
|
+
reasoningEffort: "dynamic" | "high" | "low" | "medium" | "none" | undefined;
|
|
464
464
|
traces: import("./types.js").Traces.Trace[];
|
|
465
465
|
variables: Record<string, any>;
|
|
466
466
|
started_ts: number;
|
|
@@ -470,7 +470,7 @@ export declare class Iteration implements Serializable<Iteration.JSON> {
|
|
|
470
470
|
llm: {
|
|
471
471
|
started_at: number;
|
|
472
472
|
ended_at: number;
|
|
473
|
-
status:
|
|
473
|
+
status: 'success' | 'error';
|
|
474
474
|
cached: boolean;
|
|
475
475
|
tokens: number;
|
|
476
476
|
spend: number;
|
|
@@ -608,9 +608,9 @@ export declare class Context implements Serializable<Context.JSON> {
|
|
|
608
608
|
id: string;
|
|
609
609
|
messages: import("@botpress/cognitive").CognitiveMessage[];
|
|
610
610
|
code: string | undefined;
|
|
611
|
-
model: Models | Models
|
|
611
|
+
model: Models[] | Models;
|
|
612
612
|
temperature: number;
|
|
613
|
-
reasoningEffort: "
|
|
613
|
+
reasoningEffort: "dynamic" | "high" | "low" | "medium" | "none" | undefined;
|
|
614
614
|
traces: import("./types.js").Traces.Trace[];
|
|
615
615
|
variables: Record<string, any>;
|
|
616
616
|
started_ts: number;
|
|
@@ -620,7 +620,7 @@ export declare class Context implements Serializable<Context.JSON> {
|
|
|
620
620
|
llm: {
|
|
621
621
|
started_at: number;
|
|
622
622
|
ended_at: number;
|
|
623
|
-
status:
|
|
623
|
+
status: 'success' | 'error';
|
|
624
624
|
cached: boolean;
|
|
625
625
|
tokens: number;
|
|
626
626
|
spend: number;
|