@lambdacurry/arbor 0.12.5 → 0.12.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/arbor.js +15 -7
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -17926,13 +17926,21 @@ function zodType(node) {
17926
17926
  const ctor = node.constructor?.name ?? "";
17927
17927
  return ctor.replace(/^Zod/, "").toLowerCase();
17928
17928
  }
17929
- function unwrapOptional(node) {
17930
- if (zodType(node) === "optional") {
17931
- const inner = node.unwrap?.();
17932
- if (inner)
17933
- return { inner, optional: true };
17929
+ function unwrapForCli(node) {
17930
+ let inner = node;
17931
+ let optional2 = false;
17932
+ for (;; ) {
17933
+ const type = zodType(inner);
17934
+ if (type !== "optional" && type !== "nullable")
17935
+ break;
17936
+ if (type === "optional")
17937
+ optional2 = true;
17938
+ const unwrapped = inner.unwrap?.();
17939
+ if (!unwrapped)
17940
+ break;
17941
+ inner = unwrapped;
17934
17942
  }
17935
- return { inner: node, optional: false };
17943
+ return { inner, optional: optional2 };
17936
17944
  }
17937
17945
  function description(node) {
17938
17946
  return node.description;
@@ -17973,7 +17981,7 @@ function primaryPositionalField(inputSchema) {
17973
17981
  }
17974
17982
  function flagsForSchema(inputSchema) {
17975
17983
  return Object.entries(inputSchema).map(([field, raw]) => {
17976
- const { inner, optional: optional2 } = unwrapOptional(raw);
17984
+ const { inner, optional: optional2 } = unwrapForCli(raw);
17977
17985
  return {
17978
17986
  field,
17979
17987
  flag: kebab(field),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.12.5",
3
+ "version": "0.12.6",
4
4
  "description": "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
5
5
  "keywords": [
6
6
  "agents",