@kirha/planner 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20866,13 +20866,13 @@ function getObjectChildSchema(schema, segment) {
20866
20866
  return direct;
20867
20867
  }
20868
20868
  const catchall = schema.def.catchall;
20869
- if (!isUsableCatchall(catchall)) {
20870
- return;
20869
+ if (catchall && !(catchall instanceof exports_external.ZodUnknown) && !(catchall instanceof exports_external.ZodAny) && !(catchall instanceof exports_external.ZodNever)) {
20870
+ return catchall;
20871
20871
  }
20872
- return catchall;
20873
- }
20874
- function isUsableCatchall(schema) {
20875
- return Boolean(schema && !(schema instanceof exports_external.ZodUnknown || schema instanceof exports_external.ZodAny || schema instanceof exports_external.ZodNever));
20872
+ if (Object.keys(shape).length === 0) {
20873
+ return exports_external.any();
20874
+ }
20875
+ return;
20876
20876
  }
20877
20877
  function unwrapSchema(schema) {
20878
20878
  if (schema instanceof exports_external.ZodOptional || schema instanceof exports_external.ZodDefault || schema instanceof exports_external.ZodNullable) {
@@ -20883,7 +20883,7 @@ function unwrapSchema(schema) {
20883
20883
  function isSchemaCompatible(expected, actual) {
20884
20884
  const expectedUnwrapped = unwrapSchema(expected);
20885
20885
  const actualUnwrapped = unwrapSchema(actual);
20886
- if (expectedUnwrapped instanceof exports_external.ZodAny) {
20886
+ if (expectedUnwrapped instanceof exports_external.ZodAny || actualUnwrapped instanceof exports_external.ZodAny) {
20887
20887
  return true;
20888
20888
  }
20889
20889
  if (expectedUnwrapped instanceof exports_external.ZodUnion || expectedUnwrapped instanceof exports_external.ZodXor) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirha/planner",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "SDK for tool-planning agents - generate and execute DAG execution plans from natural language",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",