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
package/dist/chunk-I56MPOVG.cjs
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunk5ZF6NTYIcjs = require('./chunk-5ZF6NTYI.cjs');
|
|
6
|
-
|
|
7
|
-
// src/component.ts
|
|
8
|
-
function assertValidComponent(component) {
|
|
9
|
-
if (!component.name) {
|
|
10
|
-
throw new Error("Component must have a name");
|
|
11
|
-
}
|
|
12
|
-
const nameRegex = /^[A-Z]{3,50}$/i;
|
|
13
|
-
if (!nameRegex.test(component.name)) {
|
|
14
|
-
throw new Error(
|
|
15
|
-
`Component name "${component.name}" must be 3-50 characters long and start with an uppercase letter`
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
if (component.aliases) {
|
|
19
|
-
for (const alias of component.aliases) {
|
|
20
|
-
if (!nameRegex.test(alias)) {
|
|
21
|
-
throw new Error(`Alias "${alias}" must be 3-50 characters long and start with an uppercase letter`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (!component.description) {
|
|
26
|
-
throw new Error("Component must have a description");
|
|
27
|
-
}
|
|
28
|
-
if (component.type === "default" && !component.default) {
|
|
29
|
-
throw new Error("Default component must have default props and children");
|
|
30
|
-
}
|
|
31
|
-
if (component.type === "leaf" && !component.leaf) {
|
|
32
|
-
throw new Error("Leaf component must have leaf props");
|
|
33
|
-
}
|
|
34
|
-
if (component.type === "container" && !component.container) {
|
|
35
|
-
throw new Error("Container component must have container props and children");
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
var Component = class {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// phantom type for inference
|
|
42
|
-
constructor(definition) {
|
|
43
|
-
assertValidComponent(definition);
|
|
44
|
-
this.definition = definition;
|
|
45
|
-
}
|
|
46
|
-
render(props, children = []) {
|
|
47
|
-
return _chunk5ZF6NTYIcjs.createJsxComponent.call(void 0, { type: this.definition.name, props, children });
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
function isComponent(rendered, component) {
|
|
51
|
-
return _chunk5ZF6NTYIcjs.isJsxComponent.call(void 0, component.definition.name, rendered);
|
|
52
|
-
}
|
|
53
|
-
function isAnyComponent(message) {
|
|
54
|
-
return _chunk5ZF6NTYIcjs.isAnyJsxComponent.call(void 0, message);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
exports.assertValidComponent = assertValidComponent; exports.Component = Component; exports.isComponent = isComponent; exports.isAnyComponent = isAnyComponent;
|
package/dist/chunk-KIN7Y247.cjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/stack-traces.ts
|
|
2
|
-
var isInternalLine = (line) => {
|
|
3
|
-
return line.includes("/llmz/") || line.includes("\\llmz\\src\\") || line.includes("node_modules");
|
|
4
|
-
};
|
|
5
|
-
function cleanStackTrace(stack, cleanInternal = true) {
|
|
6
|
-
let lines = stack.split("\n");
|
|
7
|
-
const until = lines.findIndex((line) => isInternalLine(line));
|
|
8
|
-
if (cleanInternal && until >= 0) {
|
|
9
|
-
lines = lines.slice(0, until);
|
|
10
|
-
} else {
|
|
11
|
-
lines = lines.map((line) => {
|
|
12
|
-
let llmzIndex = line.indexOf("/llmz/");
|
|
13
|
-
if (llmzIndex === -1) {
|
|
14
|
-
llmzIndex = line.indexOf("\\llmz\\");
|
|
15
|
-
}
|
|
16
|
-
if (llmzIndex === -1) {
|
|
17
|
-
return line;
|
|
18
|
-
}
|
|
19
|
-
let lastSpaceIndex = line.lastIndexOf(" ", llmzIndex);
|
|
20
|
-
if (lastSpaceIndex === -1) {
|
|
21
|
-
lastSpaceIndex = 0;
|
|
22
|
-
}
|
|
23
|
-
const maybeParen = line[lastSpaceIndex + 1] === "(" ? "(" : "";
|
|
24
|
-
return line.slice(0, lastSpaceIndex + 1) + maybeParen + line.slice(llmzIndex);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return lines.join("\n");
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
exports.cleanStackTrace = cleanStackTrace;
|