@xbbg/langgraph 1.4.1 → 1.4.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/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1176,10 +1176,19 @@ function columnsSchema(options) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
function calculateSchema(options) {
|
|
1178
1178
|
return z__namespace.object({
|
|
1179
|
-
levels: z__namespace.array(z__namespace.number().nullable()).min(1).max(options.maxFields).describe("
|
|
1179
|
+
levels: z__namespace.array(z__namespace.number().nullable()).min(1).max(options.maxFields).describe("Hierarchy level values; supported levels are 1, 2, or null."),
|
|
1180
1180
|
operation: z__namespace.literal("calculate_level_percentages").describe("Numeric helper operation to run."),
|
|
1181
1181
|
values: z__namespace.array(z__namespace.number().nullable()).min(1).max(options.maxFields).describe("Observed values.")
|
|
1182
1182
|
}).strict().superRefine((input, ctx) => {
|
|
1183
|
+
input.levels.forEach((level, index) => {
|
|
1184
|
+
if (level !== null && level !== 1 && level !== 2) {
|
|
1185
|
+
ctx.addIssue({
|
|
1186
|
+
code: z__namespace.ZodIssueCode.custom,
|
|
1187
|
+
message: "levels must contain only 1, 2, or null",
|
|
1188
|
+
path: ["levels", index]
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1183
1192
|
if (input.values.length !== input.levels.length) {
|
|
1184
1193
|
ctx.addIssue({
|
|
1185
1194
|
code: z__namespace.ZodIssueCode.custom,
|