mrvn-cli 0.2.8 → 0.2.9

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/marvin.js CHANGED
@@ -852,8 +852,8 @@ function cached(getter) {
852
852
  }
853
853
  };
854
854
  }
855
- function nullish(input3) {
856
- return input3 === null || input3 === void 0;
855
+ function nullish(input4) {
856
+ return input4 === null || input4 === void 0;
857
857
  }
858
858
  function cleanRegex(source) {
859
859
  const start = source.startsWith("^") ? 1 : 0;
@@ -947,8 +947,8 @@ function randomString(length = 10) {
947
947
  function esc(str) {
948
948
  return JSON.stringify(str);
949
949
  }
950
- function slugify(input3) {
951
- return input3.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
950
+ function slugify(input4) {
951
+ return input4.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
952
952
  }
953
953
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
954
954
  };
@@ -1330,19 +1330,19 @@ function finalizeIssue(iss, ctx, config2) {
1330
1330
  }
1331
1331
  return full;
1332
1332
  }
1333
- function getSizableOrigin(input3) {
1334
- if (input3 instanceof Set)
1333
+ function getSizableOrigin(input4) {
1334
+ if (input4 instanceof Set)
1335
1335
  return "set";
1336
- if (input3 instanceof Map)
1336
+ if (input4 instanceof Map)
1337
1337
  return "map";
1338
- if (input3 instanceof File)
1338
+ if (input4 instanceof File)
1339
1339
  return "file";
1340
1340
  return "unknown";
1341
1341
  }
1342
- function getLengthableOrigin(input3) {
1343
- if (Array.isArray(input3))
1342
+ function getLengthableOrigin(input4) {
1343
+ if (Array.isArray(input4))
1344
1344
  return "array";
1345
- if (typeof input3 === "string")
1345
+ if (typeof input4 === "string")
1346
1346
  return "string";
1347
1347
  return "unknown";
1348
1348
  }
@@ -1368,12 +1368,12 @@ function parsedType(data) {
1368
1368
  return t;
1369
1369
  }
1370
1370
  function issue(...args) {
1371
- const [iss, input3, inst] = args;
1371
+ const [iss, input4, inst] = args;
1372
1372
  if (typeof iss === "string") {
1373
1373
  return {
1374
1374
  message: iss,
1375
1375
  code: "custom",
1376
- input: input3,
1376
+ input: input4,
1377
1377
  inst
1378
1378
  };
1379
1379
  }
@@ -1912,23 +1912,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1912
1912
  bag.pattern = integer;
1913
1913
  });
1914
1914
  inst._zod.check = (payload) => {
1915
- const input3 = payload.value;
1915
+ const input4 = payload.value;
1916
1916
  if (isInt) {
1917
- if (!Number.isInteger(input3)) {
1917
+ if (!Number.isInteger(input4)) {
1918
1918
  payload.issues.push({
1919
1919
  expected: origin,
1920
1920
  format: def.format,
1921
1921
  code: "invalid_type",
1922
1922
  continue: false,
1923
- input: input3,
1923
+ input: input4,
1924
1924
  inst
1925
1925
  });
1926
1926
  return;
1927
1927
  }
1928
- if (!Number.isSafeInteger(input3)) {
1929
- if (input3 > 0) {
1928
+ if (!Number.isSafeInteger(input4)) {
1929
+ if (input4 > 0) {
1930
1930
  payload.issues.push({
1931
- input: input3,
1931
+ input: input4,
1932
1932
  code: "too_big",
1933
1933
  maximum: Number.MAX_SAFE_INTEGER,
1934
1934
  note: "Integers must be within the safe integer range.",
@@ -1939,7 +1939,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1939
1939
  });
1940
1940
  } else {
1941
1941
  payload.issues.push({
1942
- input: input3,
1942
+ input: input4,
1943
1943
  code: "too_small",
1944
1944
  minimum: Number.MIN_SAFE_INTEGER,
1945
1945
  note: "Integers must be within the safe integer range.",
@@ -1952,10 +1952,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1952
1952
  return;
1953
1953
  }
1954
1954
  }
1955
- if (input3 < minimum) {
1955
+ if (input4 < minimum) {
1956
1956
  payload.issues.push({
1957
1957
  origin: "number",
1958
- input: input3,
1958
+ input: input4,
1959
1959
  code: "too_small",
1960
1960
  minimum,
1961
1961
  inclusive: true,
@@ -1963,10 +1963,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1963
1963
  continue: !def.abort
1964
1964
  });
1965
1965
  }
1966
- if (input3 > maximum) {
1966
+ if (input4 > maximum) {
1967
1967
  payload.issues.push({
1968
1968
  origin: "number",
1969
- input: input3,
1969
+ input: input4,
1970
1970
  code: "too_big",
1971
1971
  maximum,
1972
1972
  inclusive: true,
@@ -1986,11 +1986,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
1986
1986
  bag.maximum = maximum;
1987
1987
  });
1988
1988
  inst._zod.check = (payload) => {
1989
- const input3 = payload.value;
1990
- if (input3 < minimum) {
1989
+ const input4 = payload.value;
1990
+ if (input4 < minimum) {
1991
1991
  payload.issues.push({
1992
1992
  origin: "bigint",
1993
- input: input3,
1993
+ input: input4,
1994
1994
  code: "too_small",
1995
1995
  minimum,
1996
1996
  inclusive: true,
@@ -1998,10 +1998,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
1998
1998
  continue: !def.abort
1999
1999
  });
2000
2000
  }
2001
- if (input3 > maximum) {
2001
+ if (input4 > maximum) {
2002
2002
  payload.issues.push({
2003
2003
  origin: "bigint",
2004
- input: input3,
2004
+ input: input4,
2005
2005
  code: "too_big",
2006
2006
  maximum,
2007
2007
  inclusive: true,
@@ -2024,16 +2024,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
2024
2024
  inst2._zod.bag.maximum = def.maximum;
2025
2025
  });
2026
2026
  inst._zod.check = (payload) => {
2027
- const input3 = payload.value;
2028
- const size = input3.size;
2027
+ const input4 = payload.value;
2028
+ const size = input4.size;
2029
2029
  if (size <= def.maximum)
2030
2030
  return;
2031
2031
  payload.issues.push({
2032
- origin: getSizableOrigin(input3),
2032
+ origin: getSizableOrigin(input4),
2033
2033
  code: "too_big",
2034
2034
  maximum: def.maximum,
2035
2035
  inclusive: true,
2036
- input: input3,
2036
+ input: input4,
2037
2037
  inst,
2038
2038
  continue: !def.abort
2039
2039
  });
@@ -2052,16 +2052,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
2052
2052
  inst2._zod.bag.minimum = def.minimum;
2053
2053
  });
2054
2054
  inst._zod.check = (payload) => {
2055
- const input3 = payload.value;
2056
- const size = input3.size;
2055
+ const input4 = payload.value;
2056
+ const size = input4.size;
2057
2057
  if (size >= def.minimum)
2058
2058
  return;
2059
2059
  payload.issues.push({
2060
- origin: getSizableOrigin(input3),
2060
+ origin: getSizableOrigin(input4),
2061
2061
  code: "too_small",
2062
2062
  minimum: def.minimum,
2063
2063
  inclusive: true,
2064
- input: input3,
2064
+ input: input4,
2065
2065
  inst,
2066
2066
  continue: !def.abort
2067
2067
  });
@@ -2081,13 +2081,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
2081
2081
  bag.size = def.size;
2082
2082
  });
2083
2083
  inst._zod.check = (payload) => {
2084
- const input3 = payload.value;
2085
- const size = input3.size;
2084
+ const input4 = payload.value;
2085
+ const size = input4.size;
2086
2086
  if (size === def.size)
2087
2087
  return;
2088
2088
  const tooBig = size > def.size;
2089
2089
  payload.issues.push({
2090
- origin: getSizableOrigin(input3),
2090
+ origin: getSizableOrigin(input4),
2091
2091
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
2092
2092
  inclusive: true,
2093
2093
  exact: true,
@@ -2110,17 +2110,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
2110
2110
  inst2._zod.bag.maximum = def.maximum;
2111
2111
  });
2112
2112
  inst._zod.check = (payload) => {
2113
- const input3 = payload.value;
2114
- const length = input3.length;
2113
+ const input4 = payload.value;
2114
+ const length = input4.length;
2115
2115
  if (length <= def.maximum)
2116
2116
  return;
2117
- const origin = getLengthableOrigin(input3);
2117
+ const origin = getLengthableOrigin(input4);
2118
2118
  payload.issues.push({
2119
2119
  origin,
2120
2120
  code: "too_big",
2121
2121
  maximum: def.maximum,
2122
2122
  inclusive: true,
2123
- input: input3,
2123
+ input: input4,
2124
2124
  inst,
2125
2125
  continue: !def.abort
2126
2126
  });
@@ -2139,17 +2139,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
2139
2139
  inst2._zod.bag.minimum = def.minimum;
2140
2140
  });
2141
2141
  inst._zod.check = (payload) => {
2142
- const input3 = payload.value;
2143
- const length = input3.length;
2142
+ const input4 = payload.value;
2143
+ const length = input4.length;
2144
2144
  if (length >= def.minimum)
2145
2145
  return;
2146
- const origin = getLengthableOrigin(input3);
2146
+ const origin = getLengthableOrigin(input4);
2147
2147
  payload.issues.push({
2148
2148
  origin,
2149
2149
  code: "too_small",
2150
2150
  minimum: def.minimum,
2151
2151
  inclusive: true,
2152
- input: input3,
2152
+ input: input4,
2153
2153
  inst,
2154
2154
  continue: !def.abort
2155
2155
  });
@@ -2169,11 +2169,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
2169
2169
  bag.length = def.length;
2170
2170
  });
2171
2171
  inst._zod.check = (payload) => {
2172
- const input3 = payload.value;
2173
- const length = input3.length;
2172
+ const input4 = payload.value;
2173
+ const length = input4.length;
2174
2174
  if (length === def.length)
2175
2175
  return;
2176
- const origin = getLengthableOrigin(input3);
2176
+ const origin = getLengthableOrigin(input4);
2177
2177
  const tooBig = length > def.length;
2178
2178
  payload.issues.push({
2179
2179
  origin,
@@ -2827,15 +2827,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
2827
2827
  payload.value = Number(payload.value);
2828
2828
  } catch (_) {
2829
2829
  }
2830
- const input3 = payload.value;
2831
- if (typeof input3 === "number" && !Number.isNaN(input3) && Number.isFinite(input3)) {
2830
+ const input4 = payload.value;
2831
+ if (typeof input4 === "number" && !Number.isNaN(input4) && Number.isFinite(input4)) {
2832
2832
  return payload;
2833
2833
  }
2834
- const received = typeof input3 === "number" ? Number.isNaN(input3) ? "NaN" : !Number.isFinite(input3) ? "Infinity" : void 0 : void 0;
2834
+ const received = typeof input4 === "number" ? Number.isNaN(input4) ? "NaN" : !Number.isFinite(input4) ? "Infinity" : void 0 : void 0;
2835
2835
  payload.issues.push({
2836
2836
  expected: "number",
2837
2837
  code: "invalid_type",
2838
- input: input3,
2838
+ input: input4,
2839
2839
  inst,
2840
2840
  ...received ? { received } : {}
2841
2841
  });
@@ -2855,13 +2855,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
2855
2855
  payload.value = Boolean(payload.value);
2856
2856
  } catch (_) {
2857
2857
  }
2858
- const input3 = payload.value;
2859
- if (typeof input3 === "boolean")
2858
+ const input4 = payload.value;
2859
+ if (typeof input4 === "boolean")
2860
2860
  return payload;
2861
2861
  payload.issues.push({
2862
2862
  expected: "boolean",
2863
2863
  code: "invalid_type",
2864
- input: input3,
2864
+ input: input4,
2865
2865
  inst
2866
2866
  });
2867
2867
  return payload;
@@ -2894,13 +2894,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
2894
2894
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
2895
2895
  $ZodType.init(inst, def);
2896
2896
  inst._zod.parse = (payload, _ctx) => {
2897
- const input3 = payload.value;
2898
- if (typeof input3 === "symbol")
2897
+ const input4 = payload.value;
2898
+ if (typeof input4 === "symbol")
2899
2899
  return payload;
2900
2900
  payload.issues.push({
2901
2901
  expected: "symbol",
2902
2902
  code: "invalid_type",
2903
- input: input3,
2903
+ input: input4,
2904
2904
  inst
2905
2905
  });
2906
2906
  return payload;
@@ -2913,13 +2913,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
2913
2913
  inst._zod.optin = "optional";
2914
2914
  inst._zod.optout = "optional";
2915
2915
  inst._zod.parse = (payload, _ctx) => {
2916
- const input3 = payload.value;
2917
- if (typeof input3 === "undefined")
2916
+ const input4 = payload.value;
2917
+ if (typeof input4 === "undefined")
2918
2918
  return payload;
2919
2919
  payload.issues.push({
2920
2920
  expected: "undefined",
2921
2921
  code: "invalid_type",
2922
- input: input3,
2922
+ input: input4,
2923
2923
  inst
2924
2924
  });
2925
2925
  return payload;
@@ -2930,13 +2930,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2930
2930
  inst._zod.pattern = _null;
2931
2931
  inst._zod.values = /* @__PURE__ */ new Set([null]);
2932
2932
  inst._zod.parse = (payload, _ctx) => {
2933
- const input3 = payload.value;
2934
- if (input3 === null)
2933
+ const input4 = payload.value;
2934
+ if (input4 === null)
2935
2935
  return payload;
2936
2936
  payload.issues.push({
2937
2937
  expected: "null",
2938
2938
  code: "invalid_type",
2939
- input: input3,
2939
+ input: input4,
2940
2940
  inst
2941
2941
  });
2942
2942
  return payload;
@@ -2965,13 +2965,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2965
2965
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2966
2966
  $ZodType.init(inst, def);
2967
2967
  inst._zod.parse = (payload, _ctx) => {
2968
- const input3 = payload.value;
2969
- if (typeof input3 === "undefined")
2968
+ const input4 = payload.value;
2969
+ if (typeof input4 === "undefined")
2970
2970
  return payload;
2971
2971
  payload.issues.push({
2972
2972
  expected: "void",
2973
2973
  code: "invalid_type",
2974
- input: input3,
2974
+ input: input4,
2975
2975
  inst
2976
2976
  });
2977
2977
  return payload;
@@ -2986,15 +2986,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
2986
2986
  } catch (_err) {
2987
2987
  }
2988
2988
  }
2989
- const input3 = payload.value;
2990
- const isDate = input3 instanceof Date;
2991
- const isValidDate = isDate && !Number.isNaN(input3.getTime());
2989
+ const input4 = payload.value;
2990
+ const isDate = input4 instanceof Date;
2991
+ const isValidDate = isDate && !Number.isNaN(input4.getTime());
2992
2992
  if (isValidDate)
2993
2993
  return payload;
2994
2994
  payload.issues.push({
2995
2995
  expected: "date",
2996
2996
  code: "invalid_type",
2997
- input: input3,
2997
+ input: input4,
2998
2998
  ...isDate ? { received: "Invalid Date" } : {},
2999
2999
  inst
3000
3000
  });
@@ -3010,20 +3010,20 @@ function handleArrayResult(result, final, index) {
3010
3010
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
3011
3011
  $ZodType.init(inst, def);
3012
3012
  inst._zod.parse = (payload, ctx) => {
3013
- const input3 = payload.value;
3014
- if (!Array.isArray(input3)) {
3013
+ const input4 = payload.value;
3014
+ if (!Array.isArray(input4)) {
3015
3015
  payload.issues.push({
3016
3016
  expected: "array",
3017
3017
  code: "invalid_type",
3018
- input: input3,
3018
+ input: input4,
3019
3019
  inst
3020
3020
  });
3021
3021
  return payload;
3022
3022
  }
3023
- payload.value = Array(input3.length);
3023
+ payload.value = Array(input4.length);
3024
3024
  const proms = [];
3025
- for (let i = 0; i < input3.length; i++) {
3026
- const item = input3[i];
3025
+ for (let i = 0; i < input4.length; i++) {
3026
+ const item = input4[i];
3027
3027
  const result = def.element._zod.run({
3028
3028
  value: item,
3029
3029
  issues: []
@@ -3040,15 +3040,15 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
3040
3040
  return payload;
3041
3041
  };
3042
3042
  });
3043
- function handlePropertyResult(result, final, key, input3, isOptionalOut) {
3043
+ function handlePropertyResult(result, final, key, input4, isOptionalOut) {
3044
3044
  if (result.issues.length) {
3045
- if (isOptionalOut && !(key in input3)) {
3045
+ if (isOptionalOut && !(key in input4)) {
3046
3046
  return;
3047
3047
  }
3048
3048
  final.issues.push(...prefixIssues(key, result.issues));
3049
3049
  }
3050
3050
  if (result.value === void 0) {
3051
- if (key in input3) {
3051
+ if (key in input4) {
3052
3052
  final.value[key] = void 0;
3053
3053
  }
3054
3054
  } else {
@@ -3071,31 +3071,31 @@ function normalizeDef(def) {
3071
3071
  optionalKeys: new Set(okeys)
3072
3072
  };
3073
3073
  }
3074
- function handleCatchall(proms, input3, payload, ctx, def, inst) {
3074
+ function handleCatchall(proms, input4, payload, ctx, def, inst) {
3075
3075
  const unrecognized = [];
3076
3076
  const keySet = def.keySet;
3077
3077
  const _catchall = def.catchall._zod;
3078
3078
  const t = _catchall.def.type;
3079
3079
  const isOptionalOut = _catchall.optout === "optional";
3080
- for (const key in input3) {
3080
+ for (const key in input4) {
3081
3081
  if (keySet.has(key))
3082
3082
  continue;
3083
3083
  if (t === "never") {
3084
3084
  unrecognized.push(key);
3085
3085
  continue;
3086
3086
  }
3087
- const r = _catchall.run({ value: input3[key], issues: [] }, ctx);
3087
+ const r = _catchall.run({ value: input4[key], issues: [] }, ctx);
3088
3088
  if (r instanceof Promise) {
3089
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input3, isOptionalOut)));
3089
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input4, isOptionalOut)));
3090
3090
  } else {
3091
- handlePropertyResult(r, payload, key, input3, isOptionalOut);
3091
+ handlePropertyResult(r, payload, key, input4, isOptionalOut);
3092
3092
  }
3093
3093
  }
3094
3094
  if (unrecognized.length) {
3095
3095
  payload.issues.push({
3096
3096
  code: "unrecognized_keys",
3097
3097
  keys: unrecognized,
3098
- input: input3,
3098
+ input: input4,
3099
3099
  inst
3100
3100
  });
3101
3101
  }
@@ -3139,12 +3139,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3139
3139
  let value;
3140
3140
  inst._zod.parse = (payload, ctx) => {
3141
3141
  value ?? (value = _normalized.value);
3142
- const input3 = payload.value;
3143
- if (!isObject2(input3)) {
3142
+ const input4 = payload.value;
3143
+ if (!isObject2(input4)) {
3144
3144
  payload.issues.push({
3145
3145
  expected: "object",
3146
3146
  code: "invalid_type",
3147
- input: input3,
3147
+ input: input4,
3148
3148
  inst
3149
3149
  });
3150
3150
  return payload;
@@ -3155,17 +3155,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3155
3155
  for (const key of value.keys) {
3156
3156
  const el = shape[key];
3157
3157
  const isOptionalOut = el._zod.optout === "optional";
3158
- const r = el._zod.run({ value: input3[key], issues: [] }, ctx);
3158
+ const r = el._zod.run({ value: input4[key], issues: [] }, ctx);
3159
3159
  if (r instanceof Promise) {
3160
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input3, isOptionalOut)));
3160
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input4, isOptionalOut)));
3161
3161
  } else {
3162
- handlePropertyResult(r, payload, key, input3, isOptionalOut);
3162
+ handlePropertyResult(r, payload, key, input4, isOptionalOut);
3163
3163
  }
3164
3164
  }
3165
3165
  if (!catchall) {
3166
3166
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
3167
3167
  }
3168
- return handleCatchall(proms, input3, payload, ctx, _normalized.value, inst);
3168
+ return handleCatchall(proms, input4, payload, ctx, _normalized.value, inst);
3169
3169
  };
3170
3170
  });
3171
3171
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -3246,12 +3246,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3246
3246
  let value;
3247
3247
  inst._zod.parse = (payload, ctx) => {
3248
3248
  value ?? (value = _normalized.value);
3249
- const input3 = payload.value;
3250
- if (!isObject2(input3)) {
3249
+ const input4 = payload.value;
3250
+ if (!isObject2(input4)) {
3251
3251
  payload.issues.push({
3252
3252
  expected: "object",
3253
3253
  code: "invalid_type",
3254
- input: input3,
3254
+ input: input4,
3255
3255
  inst
3256
3256
  });
3257
3257
  return payload;
@@ -3262,7 +3262,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3262
3262
  payload = fastpass(payload, ctx);
3263
3263
  if (!catchall)
3264
3264
  return payload;
3265
- return handleCatchall([], input3, payload, ctx, value, inst);
3265
+ return handleCatchall([], input4, payload, ctx, value, inst);
3266
3266
  }
3267
3267
  return superParse(payload, ctx);
3268
3268
  };
@@ -3424,17 +3424,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3424
3424
  return map2;
3425
3425
  });
3426
3426
  inst._zod.parse = (payload, ctx) => {
3427
- const input3 = payload.value;
3428
- if (!isObject(input3)) {
3427
+ const input4 = payload.value;
3428
+ if (!isObject(input4)) {
3429
3429
  payload.issues.push({
3430
3430
  code: "invalid_type",
3431
3431
  expected: "object",
3432
- input: input3,
3432
+ input: input4,
3433
3433
  inst
3434
3434
  });
3435
3435
  return payload;
3436
3436
  }
3437
- const opt = disc.value.get(input3?.[def.discriminator]);
3437
+ const opt = disc.value.get(input4?.[def.discriminator]);
3438
3438
  if (opt) {
3439
3439
  return opt._zod.run(payload, ctx);
3440
3440
  }
@@ -3446,7 +3446,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3446
3446
  errors: [],
3447
3447
  note: "No matching discriminator",
3448
3448
  discriminator: def.discriminator,
3449
- input: input3,
3449
+ input: input4,
3450
3450
  path: [def.discriminator],
3451
3451
  inst
3452
3452
  });
@@ -3456,9 +3456,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3456
3456
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
3457
3457
  $ZodType.init(inst, def);
3458
3458
  inst._zod.parse = (payload, ctx) => {
3459
- const input3 = payload.value;
3460
- const left = def.left._zod.run({ value: input3, issues: [] }, ctx);
3461
- const right = def.right._zod.run({ value: input3, issues: [] }, ctx);
3459
+ const input4 = payload.value;
3460
+ const left = def.left._zod.run({ value: input4, issues: [] }, ctx);
3461
+ const right = def.right._zod.run({ value: input4, issues: [] }, ctx);
3462
3462
  const async = left instanceof Promise || right instanceof Promise;
3463
3463
  if (async) {
3464
3464
  return Promise.all([left, right]).then(([left2, right2]) => {
@@ -3555,10 +3555,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3555
3555
  $ZodType.init(inst, def);
3556
3556
  const items = def.items;
3557
3557
  inst._zod.parse = (payload, ctx) => {
3558
- const input3 = payload.value;
3559
- if (!Array.isArray(input3)) {
3558
+ const input4 = payload.value;
3559
+ if (!Array.isArray(input4)) {
3560
3560
  payload.issues.push({
3561
- input: input3,
3561
+ input: input4,
3562
3562
  inst,
3563
3563
  expected: "tuple",
3564
3564
  code: "invalid_type"
@@ -3570,12 +3570,12 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3570
3570
  const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
3571
3571
  const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
3572
3572
  if (!def.rest) {
3573
- const tooBig = input3.length > items.length;
3574
- const tooSmall = input3.length < optStart - 1;
3573
+ const tooBig = input4.length > items.length;
3574
+ const tooSmall = input4.length < optStart - 1;
3575
3575
  if (tooBig || tooSmall) {
3576
3576
  payload.issues.push({
3577
3577
  ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
3578
- input: input3,
3578
+ input: input4,
3579
3579
  inst,
3580
3580
  origin: "array"
3581
3581
  });
@@ -3585,12 +3585,12 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3585
3585
  let i = -1;
3586
3586
  for (const item of items) {
3587
3587
  i++;
3588
- if (i >= input3.length) {
3588
+ if (i >= input4.length) {
3589
3589
  if (i >= optStart)
3590
3590
  continue;
3591
3591
  }
3592
3592
  const result = item._zod.run({
3593
- value: input3[i],
3593
+ value: input4[i],
3594
3594
  issues: []
3595
3595
  }, ctx);
3596
3596
  if (result instanceof Promise) {
@@ -3600,7 +3600,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3600
3600
  }
3601
3601
  }
3602
3602
  if (def.rest) {
3603
- const rest = input3.slice(items.length);
3603
+ const rest = input4.slice(items.length);
3604
3604
  for (const el of rest) {
3605
3605
  i++;
3606
3606
  const result = def.rest._zod.run({
@@ -3628,12 +3628,12 @@ function handleTupleResult(result, final, index) {
3628
3628
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3629
3629
  $ZodType.init(inst, def);
3630
3630
  inst._zod.parse = (payload, ctx) => {
3631
- const input3 = payload.value;
3632
- if (!isPlainObject(input3)) {
3631
+ const input4 = payload.value;
3632
+ if (!isPlainObject(input4)) {
3633
3633
  payload.issues.push({
3634
3634
  expected: "record",
3635
3635
  code: "invalid_type",
3636
- input: input3,
3636
+ input: input4,
3637
3637
  inst
3638
3638
  });
3639
3639
  return payload;
@@ -3646,7 +3646,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3646
3646
  for (const key of values) {
3647
3647
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3648
3648
  recordKeys.add(typeof key === "number" ? key.toString() : key);
3649
- const result = def.valueType._zod.run({ value: input3[key], issues: [] }, ctx);
3649
+ const result = def.valueType._zod.run({ value: input4[key], issues: [] }, ctx);
3650
3650
  if (result instanceof Promise) {
3651
3651
  proms.push(result.then((result2) => {
3652
3652
  if (result2.issues.length) {
@@ -3663,7 +3663,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3663
3663
  }
3664
3664
  }
3665
3665
  let unrecognized;
3666
- for (const key in input3) {
3666
+ for (const key in input4) {
3667
3667
  if (!recordKeys.has(key)) {
3668
3668
  unrecognized = unrecognized ?? [];
3669
3669
  unrecognized.push(key);
@@ -3672,14 +3672,14 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3672
3672
  if (unrecognized && unrecognized.length > 0) {
3673
3673
  payload.issues.push({
3674
3674
  code: "unrecognized_keys",
3675
- input: input3,
3675
+ input: input4,
3676
3676
  inst,
3677
3677
  keys: unrecognized
3678
3678
  });
3679
3679
  }
3680
3680
  } else {
3681
3681
  payload.value = {};
3682
- for (const key of Reflect.ownKeys(input3)) {
3682
+ for (const key of Reflect.ownKeys(input4)) {
3683
3683
  if (key === "__proto__")
3684
3684
  continue;
3685
3685
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
@@ -3698,7 +3698,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3698
3698
  }
3699
3699
  if (keyResult.issues.length) {
3700
3700
  if (def.mode === "loose") {
3701
- payload.value[key] = input3[key];
3701
+ payload.value[key] = input4[key];
3702
3702
  } else {
3703
3703
  payload.issues.push({
3704
3704
  code: "invalid_key",
@@ -3711,7 +3711,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3711
3711
  }
3712
3712
  continue;
3713
3713
  }
3714
- const result = def.valueType._zod.run({ value: input3[key], issues: [] }, ctx);
3714
+ const result = def.valueType._zod.run({ value: input4[key], issues: [] }, ctx);
3715
3715
  if (result instanceof Promise) {
3716
3716
  proms.push(result.then((result2) => {
3717
3717
  if (result2.issues.length) {
@@ -3736,27 +3736,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3736
3736
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
3737
3737
  $ZodType.init(inst, def);
3738
3738
  inst._zod.parse = (payload, ctx) => {
3739
- const input3 = payload.value;
3740
- if (!(input3 instanceof Map)) {
3739
+ const input4 = payload.value;
3740
+ if (!(input4 instanceof Map)) {
3741
3741
  payload.issues.push({
3742
3742
  expected: "map",
3743
3743
  code: "invalid_type",
3744
- input: input3,
3744
+ input: input4,
3745
3745
  inst
3746
3746
  });
3747
3747
  return payload;
3748
3748
  }
3749
3749
  const proms = [];
3750
3750
  payload.value = /* @__PURE__ */ new Map();
3751
- for (const [key, value] of input3) {
3751
+ for (const [key, value] of input4) {
3752
3752
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3753
3753
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
3754
3754
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
3755
3755
  proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
3756
- handleMapResult(keyResult2, valueResult2, payload, key, input3, inst, ctx);
3756
+ handleMapResult(keyResult2, valueResult2, payload, key, input4, inst, ctx);
3757
3757
  }));
3758
3758
  } else {
3759
- handleMapResult(keyResult, valueResult, payload, key, input3, inst, ctx);
3759
+ handleMapResult(keyResult, valueResult, payload, key, input4, inst, ctx);
3760
3760
  }
3761
3761
  }
3762
3762
  if (proms.length)
@@ -3764,7 +3764,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
3764
3764
  return payload;
3765
3765
  };
3766
3766
  });
3767
- function handleMapResult(keyResult, valueResult, final, key, input3, inst, ctx) {
3767
+ function handleMapResult(keyResult, valueResult, final, key, input4, inst, ctx) {
3768
3768
  if (keyResult.issues.length) {
3769
3769
  if (propertyKeyTypes.has(typeof key)) {
3770
3770
  final.issues.push(...prefixIssues(key, keyResult.issues));
@@ -3772,7 +3772,7 @@ function handleMapResult(keyResult, valueResult, final, key, input3, inst, ctx)
3772
3772
  final.issues.push({
3773
3773
  code: "invalid_key",
3774
3774
  origin: "map",
3775
- input: input3,
3775
+ input: input4,
3776
3776
  inst,
3777
3777
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
3778
3778
  });
@@ -3785,7 +3785,7 @@ function handleMapResult(keyResult, valueResult, final, key, input3, inst, ctx)
3785
3785
  final.issues.push({
3786
3786
  origin: "map",
3787
3787
  code: "invalid_element",
3788
- input: input3,
3788
+ input: input4,
3789
3789
  inst,
3790
3790
  key,
3791
3791
  issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
@@ -3797,10 +3797,10 @@ function handleMapResult(keyResult, valueResult, final, key, input3, inst, ctx)
3797
3797
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
3798
3798
  $ZodType.init(inst, def);
3799
3799
  inst._zod.parse = (payload, ctx) => {
3800
- const input3 = payload.value;
3801
- if (!(input3 instanceof Set)) {
3800
+ const input4 = payload.value;
3801
+ if (!(input4 instanceof Set)) {
3802
3802
  payload.issues.push({
3803
- input: input3,
3803
+ input: input4,
3804
3804
  inst,
3805
3805
  expected: "set",
3806
3806
  code: "invalid_type"
@@ -3809,7 +3809,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
3809
3809
  }
3810
3810
  const proms = [];
3811
3811
  payload.value = /* @__PURE__ */ new Set();
3812
- for (const item of input3) {
3812
+ for (const item of input4) {
3813
3813
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
3814
3814
  if (result instanceof Promise) {
3815
3815
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -3834,14 +3834,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
3834
3834
  inst._zod.values = valuesSet;
3835
3835
  inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
3836
3836
  inst._zod.parse = (payload, _ctx) => {
3837
- const input3 = payload.value;
3838
- if (valuesSet.has(input3)) {
3837
+ const input4 = payload.value;
3838
+ if (valuesSet.has(input4)) {
3839
3839
  return payload;
3840
3840
  }
3841
3841
  payload.issues.push({
3842
3842
  code: "invalid_value",
3843
3843
  values,
3844
- input: input3,
3844
+ input: input4,
3845
3845
  inst
3846
3846
  });
3847
3847
  return payload;
@@ -3856,14 +3856,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
3856
3856
  inst._zod.values = values;
3857
3857
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
3858
3858
  inst._zod.parse = (payload, _ctx) => {
3859
- const input3 = payload.value;
3860
- if (values.has(input3)) {
3859
+ const input4 = payload.value;
3860
+ if (values.has(input4)) {
3861
3861
  return payload;
3862
3862
  }
3863
3863
  payload.issues.push({
3864
3864
  code: "invalid_value",
3865
3865
  values: def.values,
3866
- input: input3,
3866
+ input: input4,
3867
3867
  inst
3868
3868
  });
3869
3869
  return payload;
@@ -3872,13 +3872,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
3872
3872
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
3873
3873
  $ZodType.init(inst, def);
3874
3874
  inst._zod.parse = (payload, _ctx) => {
3875
- const input3 = payload.value;
3876
- if (input3 instanceof File)
3875
+ const input4 = payload.value;
3876
+ if (input4 instanceof File)
3877
3877
  return payload;
3878
3878
  payload.issues.push({
3879
3879
  expected: "file",
3880
3880
  code: "invalid_type",
3881
- input: input3,
3881
+ input: input4,
3882
3882
  inst
3883
3883
  });
3884
3884
  return payload;
@@ -3905,8 +3905,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3905
3905
  return payload;
3906
3906
  };
3907
3907
  });
3908
- function handleOptionalResult(result, input3) {
3909
- if (result.issues.length && input3 === void 0) {
3908
+ function handleOptionalResult(result, input4) {
3909
+ if (result.issues.length && input4 === void 0) {
3910
3910
  return { issues: [], value: void 0 };
3911
3911
  }
3912
3912
  return result;
@@ -4342,20 +4342,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
4342
4342
  return payload;
4343
4343
  };
4344
4344
  inst._zod.check = (payload) => {
4345
- const input3 = payload.value;
4346
- const r = def.fn(input3);
4345
+ const input4 = payload.value;
4346
+ const r = def.fn(input4);
4347
4347
  if (r instanceof Promise) {
4348
- return r.then((r2) => handleRefineResult(r2, payload, input3, inst));
4348
+ return r.then((r2) => handleRefineResult(r2, payload, input4, inst));
4349
4349
  }
4350
- handleRefineResult(r, payload, input3, inst);
4350
+ handleRefineResult(r, payload, input4, inst);
4351
4351
  return;
4352
4352
  };
4353
4353
  });
4354
- function handleRefineResult(result, payload, input3, inst) {
4354
+ function handleRefineResult(result, payload, input4, inst) {
4355
4355
  if (!result) {
4356
4356
  const _iss = {
4357
4357
  code: "custom",
4358
- input: input3,
4358
+ input: input4,
4359
4359
  inst,
4360
4360
  // incorporates params.error into issue reporting
4361
4361
  path: [...inst._zod.def.path ?? []],
@@ -10665,23 +10665,23 @@ function _overwrite(tx) {
10665
10665
  }
10666
10666
  // @__NO_SIDE_EFFECTS__
10667
10667
  function _normalize(form) {
10668
- return /* @__PURE__ */ _overwrite((input3) => input3.normalize(form));
10668
+ return /* @__PURE__ */ _overwrite((input4) => input4.normalize(form));
10669
10669
  }
10670
10670
  // @__NO_SIDE_EFFECTS__
10671
10671
  function _trim() {
10672
- return /* @__PURE__ */ _overwrite((input3) => input3.trim());
10672
+ return /* @__PURE__ */ _overwrite((input4) => input4.trim());
10673
10673
  }
10674
10674
  // @__NO_SIDE_EFFECTS__
10675
10675
  function _toLowerCase() {
10676
- return /* @__PURE__ */ _overwrite((input3) => input3.toLowerCase());
10676
+ return /* @__PURE__ */ _overwrite((input4) => input4.toLowerCase());
10677
10677
  }
10678
10678
  // @__NO_SIDE_EFFECTS__
10679
10679
  function _toUpperCase() {
10680
- return /* @__PURE__ */ _overwrite((input3) => input3.toUpperCase());
10680
+ return /* @__PURE__ */ _overwrite((input4) => input4.toUpperCase());
10681
10681
  }
10682
10682
  // @__NO_SIDE_EFFECTS__
10683
10683
  function _slugify() {
10684
- return /* @__PURE__ */ _overwrite((input3) => slugify(input3));
10684
+ return /* @__PURE__ */ _overwrite((input4) => slugify(input4));
10685
10685
  }
10686
10686
  // @__NO_SIDE_EFFECTS__
10687
10687
  function _array(Class2, element, params) {
@@ -10986,8 +10986,8 @@ function _stringbool(Classes, _params) {
10986
10986
  type: "pipe",
10987
10987
  in: stringSchema,
10988
10988
  out: booleanSchema,
10989
- transform: ((input3, payload) => {
10990
- let data = input3;
10989
+ transform: ((input4, payload) => {
10990
+ let data = input4;
10991
10991
  if (params.case !== "sensitive")
10992
10992
  data = data.toLowerCase();
10993
10993
  if (truthySet.has(data)) {
@@ -11006,8 +11006,8 @@ function _stringbool(Classes, _params) {
11006
11006
  return {};
11007
11007
  }
11008
11008
  }),
11009
- reverseTransform: ((input3, _payload) => {
11010
- if (input3 === true) {
11009
+ reverseTransform: ((input4, _payload) => {
11010
+ if (input4 === true) {
11011
11011
  return truthyArray[0] || "true";
11012
11012
  } else {
11013
11013
  return falsyArray[0] || "false";
@@ -11903,9 +11903,9 @@ var allProcessors = {
11903
11903
  optional: optionalProcessor,
11904
11904
  lazy: lazyProcessor
11905
11905
  };
11906
- function toJSONSchema(input3, params) {
11907
- if ("_idmap" in input3) {
11908
- const registry2 = input3;
11906
+ function toJSONSchema(input4, params) {
11907
+ if ("_idmap" in input4) {
11908
+ const registry2 = input4;
11909
11909
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
11910
11910
  const defs = {};
11911
11911
  for (const entry of registry2._idmap.entries()) {
@@ -11933,9 +11933,9 @@ function toJSONSchema(input3, params) {
11933
11933
  return { schemas };
11934
11934
  }
11935
11935
  const ctx = initializeContext({ ...params, processors: allProcessors });
11936
- process2(input3, ctx);
11937
- extractDefs(ctx, input3);
11938
- return finalize(ctx, input3);
11936
+ process2(input4, ctx);
11937
+ extractDefs(ctx, input4);
11938
+ return finalize(ctx, input4);
11939
11939
  }
11940
11940
 
11941
11941
  // node_modules/zod/v4/core/json-schema-generator.js
@@ -16595,14 +16595,14 @@ function getPersona(idOrShortName) {
16595
16595
  function listPersonas() {
16596
16596
  return [...BUILTIN_PERSONAS];
16597
16597
  }
16598
- function resolvePersonaId(input3) {
16599
- const persona = getPersona(input3);
16598
+ function resolvePersonaId(input4) {
16599
+ const persona = getPersona(input4);
16600
16600
  if (!persona) {
16601
16601
  const available = BUILTIN_PERSONAS.map(
16602
16602
  (p) => `${p.shortName} (${p.name})`
16603
16603
  ).join(", ");
16604
16604
  throw new Error(
16605
- `Unknown persona "${input3}". Available: ${available}`
16605
+ `Unknown persona "${input4}". Available: ${available}`
16606
16606
  );
16607
16607
  }
16608
16608
  return persona.id;
@@ -16850,13 +16850,10 @@ var DocumentStore = class {
16850
16850
  if (!prefix) {
16851
16851
  throw new Error(`Unknown document type: ${type}`);
16852
16852
  }
16853
- const dirName = this.typeDirs[type];
16854
- const dir = path5.join(this.docsDir, dirName);
16855
- if (!fs5.existsSync(dir)) return `${prefix}-001`;
16856
- const files = fs5.readdirSync(dir).filter((f) => f.endsWith(".md"));
16853
+ const pattern = new RegExp(`^${prefix}-(\\d+)$`);
16857
16854
  let maxNum = 0;
16858
- for (const file2 of files) {
16859
- const match = file2.match(new RegExp(`^${prefix}-(\\d+)\\.md$`));
16855
+ for (const id of this.index.keys()) {
16856
+ const match = id.match(pattern);
16860
16857
  if (match) {
16861
16858
  maxNum = Math.max(maxNum, parseInt(match[1], 10));
16862
16859
  }
@@ -17766,12 +17763,12 @@ var JiraClient = class {
17766
17763
  );
17767
17764
  }
17768
17765
  };
17769
- function createJiraClient() {
17770
- const host = process.env.JIRA_HOST;
17771
- const email3 = process.env.JIRA_EMAIL;
17772
- const apiToken = process.env.JIRA_API_TOKEN;
17766
+ function createJiraClient(jiraUserConfig) {
17767
+ const host = jiraUserConfig?.host ?? process.env.JIRA_HOST;
17768
+ const email3 = jiraUserConfig?.email ?? process.env.JIRA_EMAIL;
17769
+ const apiToken = jiraUserConfig?.apiToken ?? process.env.JIRA_API_TOKEN;
17773
17770
  if (!host || !email3 || !apiToken) return null;
17774
- return new JiraClient({ host, email: email3, apiToken });
17771
+ return { client: new JiraClient({ host, email: email3, apiToken }), host };
17775
17772
  }
17776
17773
 
17777
17774
  // src/skills/builtin/jira/tools.ts
@@ -17781,7 +17778,7 @@ function jiraNotConfiguredError() {
17781
17778
  content: [
17782
17779
  {
17783
17780
  type: "text",
17784
- text: "Jira is not configured. Set JIRA_HOST, JIRA_EMAIL, and JIRA_API_TOKEN environment variables."
17781
+ text: 'Jira is not configured. Run "marvin config jira" or set JIRA_HOST, JIRA_EMAIL, and JIRA_API_TOKEN environment variables.'
17785
17782
  }
17786
17783
  ],
17787
17784
  isError: true
@@ -17813,6 +17810,7 @@ function findByJiraKey(store, jiraKey) {
17813
17810
  return docs.find((d) => d.frontmatter.jiraKey === jiraKey);
17814
17811
  }
17815
17812
  function createJiraTools(store) {
17813
+ const jiraUserConfig = loadUserConfig().jira;
17816
17814
  return [
17817
17815
  // --- Local read tools ---
17818
17816
  tool19(
@@ -17883,15 +17881,14 @@ function createJiraTools(store) {
17883
17881
  key: external_exports.string().describe("Jira issue key (e.g. 'PROJ-123')")
17884
17882
  },
17885
17883
  async (args) => {
17886
- const client = createJiraClient();
17887
- if (!client) return jiraNotConfiguredError();
17888
- const issue2 = await client.getIssue(args.key);
17889
- const host = process.env.JIRA_HOST;
17884
+ const jira = createJiraClient(jiraUserConfig);
17885
+ if (!jira) return jiraNotConfiguredError();
17886
+ const issue2 = await jira.client.getIssue(args.key);
17890
17887
  const existing = findByJiraKey(store, args.key);
17891
17888
  if (existing) {
17892
17889
  const fm2 = jiraIssueToFrontmatter(
17893
17890
  issue2,
17894
- host,
17891
+ jira.host,
17895
17892
  existing.frontmatter.linkedArtifacts
17896
17893
  );
17897
17894
  const doc2 = store.update(
@@ -17908,7 +17905,7 @@ function createJiraTools(store) {
17908
17905
  ]
17909
17906
  };
17910
17907
  }
17911
- const fm = jiraIssueToFrontmatter(issue2, host);
17908
+ const fm = jiraIssueToFrontmatter(issue2, jira.host);
17912
17909
  const doc = store.create(
17913
17910
  JIRA_TYPE,
17914
17911
  fm,
@@ -17932,10 +17929,9 @@ function createJiraTools(store) {
17932
17929
  maxResults: external_exports.number().optional().describe("Max issues to fetch (default 50)")
17933
17930
  },
17934
17931
  async (args) => {
17935
- const client = createJiraClient();
17936
- if (!client) return jiraNotConfiguredError();
17937
- const result = await client.searchIssues(args.jql, args.maxResults);
17938
- const host = process.env.JIRA_HOST;
17932
+ const jira = createJiraClient(jiraUserConfig);
17933
+ if (!jira) return jiraNotConfiguredError();
17934
+ const result = await jira.client.searchIssues(args.jql, args.maxResults);
17939
17935
  const created = [];
17940
17936
  const updated = [];
17941
17937
  for (const issue2 of result.issues) {
@@ -17943,7 +17939,7 @@ function createJiraTools(store) {
17943
17939
  if (existing) {
17944
17940
  const fm = jiraIssueToFrontmatter(
17945
17941
  issue2,
17946
- host,
17942
+ jira.host,
17947
17943
  existing.frontmatter.linkedArtifacts
17948
17944
  );
17949
17945
  store.update(
@@ -17953,7 +17949,7 @@ function createJiraTools(store) {
17953
17949
  );
17954
17950
  updated.push(`${existing.frontmatter.id} (${issue2.key})`);
17955
17951
  } else {
17956
- const fm = jiraIssueToFrontmatter(issue2, host);
17952
+ const fm = jiraIssueToFrontmatter(issue2, jira.host);
17957
17953
  const doc = store.create(
17958
17954
  JIRA_TYPE,
17959
17955
  fm,
@@ -17982,8 +17978,8 @@ function createJiraTools(store) {
17982
17978
  issueType: external_exports.enum(["Story", "Task", "Bug", "Epic"]).optional().describe("Jira issue type (default: 'Task')")
17983
17979
  },
17984
17980
  async (args) => {
17985
- const client = createJiraClient();
17986
- if (!client) return jiraNotConfiguredError();
17981
+ const jira = createJiraClient(jiraUserConfig);
17982
+ if (!jira) return jiraNotConfiguredError();
17987
17983
  const artifact = store.get(args.artifactId);
17988
17984
  if (!artifact) {
17989
17985
  return {
@@ -18000,20 +17996,19 @@ function createJiraTools(store) {
18000
17996
  `Marvin artifact: ${artifact.frontmatter.id} (${artifact.frontmatter.type})`,
18001
17997
  `Status: ${artifact.frontmatter.status}`
18002
17998
  ].join("\n");
18003
- const jiraResult = await client.createIssue({
17999
+ const jiraResult = await jira.client.createIssue({
18004
18000
  project: { key: args.projectKey },
18005
18001
  summary: artifact.frontmatter.title,
18006
18002
  description,
18007
18003
  issuetype: { name: args.issueType ?? "Task" }
18008
18004
  });
18009
- const host = process.env.JIRA_HOST;
18010
18005
  const jiDoc = store.create(
18011
18006
  JIRA_TYPE,
18012
18007
  {
18013
18008
  title: artifact.frontmatter.title,
18014
18009
  status: "open",
18015
18010
  jiraKey: jiraResult.key,
18016
- jiraUrl: `https://${host}/browse/${jiraResult.key}`,
18011
+ jiraUrl: `https://${jira.host}/browse/${jiraResult.key}`,
18017
18012
  issueType: args.issueType ?? "Task",
18018
18013
  priority: "Medium",
18019
18014
  assignee: "",
@@ -18042,8 +18037,8 @@ function createJiraTools(store) {
18042
18037
  id: external_exports.string().describe("Local JI-xxx ID")
18043
18038
  },
18044
18039
  async (args) => {
18045
- const client = createJiraClient();
18046
- if (!client) return jiraNotConfiguredError();
18040
+ const jira = createJiraClient(jiraUserConfig);
18041
+ if (!jira) return jiraNotConfiguredError();
18047
18042
  const doc = store.get(args.id);
18048
18043
  if (!doc || doc.frontmatter.type !== JIRA_TYPE) {
18049
18044
  return {
@@ -18054,15 +18049,14 @@ function createJiraTools(store) {
18054
18049
  };
18055
18050
  }
18056
18051
  const jiraKey = doc.frontmatter.jiraKey;
18057
- await client.updateIssue(jiraKey, {
18052
+ await jira.client.updateIssue(jiraKey, {
18058
18053
  summary: doc.frontmatter.title,
18059
18054
  description: doc.content || void 0
18060
18055
  });
18061
- const issue2 = await client.getIssue(jiraKey);
18062
- const host = process.env.JIRA_HOST;
18056
+ const issue2 = await jira.client.getIssue(jiraKey);
18063
18057
  const fm = jiraIssueToFrontmatter(
18064
18058
  issue2,
18065
- host,
18059
+ jira.host,
18066
18060
  doc.frontmatter.linkedArtifacts
18067
18061
  );
18068
18062
  store.update(args.id, fm, issue2.fields.description ?? "");
@@ -18521,10 +18515,10 @@ Marvin \u2014 ${persona.name}
18521
18515
  });
18522
18516
  try {
18523
18517
  while (true) {
18524
- const input3 = await new Promise((resolve5) => {
18518
+ const input4 = await new Promise((resolve5) => {
18525
18519
  rl.question(chalk2.green("\nYou: "), resolve5);
18526
18520
  });
18527
- const trimmed = input3.trim();
18521
+ const trimmed = input4.trim();
18528
18522
  if (trimmed === "exit" || trimmed === "quit") {
18529
18523
  break;
18530
18524
  }
@@ -18831,23 +18825,29 @@ Project: ${project.config.name}
18831
18825
 
18832
18826
  // src/cli/commands/config.ts
18833
18827
  import chalk6 from "chalk";
18834
- import { password } from "@inquirer/prompts";
18828
+ import { input as input2, password } from "@inquirer/prompts";
18835
18829
  async function configCommand(key, value) {
18836
18830
  if (key === "api-key") {
18837
18831
  return setApiKey();
18838
18832
  }
18833
+ if (key === "jira") {
18834
+ return setJira();
18835
+ }
18839
18836
  if (!key) {
18840
18837
  const config2 = loadUserConfig();
18841
18838
  console.log(chalk6.bold("\nUser Configuration:\n"));
18842
18839
  console.log(
18843
- ` API Key: ${config2.apiKey ? chalk6.green("configured") : chalk6.red("not set")}`
18840
+ ` API Key: ${config2.apiKey ? chalk6.green("configured") : chalk6.red("not set")}`
18844
18841
  );
18845
18842
  console.log(
18846
- ` Default Model: ${config2.defaultModel ?? chalk6.dim("(default: claude-sonnet-4-5-20250929)")}`
18843
+ ` Default Model: ${config2.defaultModel ?? chalk6.dim("(default: claude-sonnet-4-5-20250929)")}`
18847
18844
  );
18848
18845
  console.log(
18849
18846
  ` Default Persona: ${config2.defaultPersona ?? chalk6.dim("(default: product-owner)")}`
18850
18847
  );
18848
+ console.log(
18849
+ ` Jira: ${config2.jira?.host ? chalk6.green(`configured (${config2.jira.host})`) : chalk6.red("not set")}`
18850
+ );
18851
18851
  console.log();
18852
18852
  return;
18853
18853
  }
@@ -18880,6 +18880,37 @@ async function configCommand(key, value) {
18880
18880
  }
18881
18881
  }
18882
18882
  }
18883
+ async function setJira() {
18884
+ const host = await input2({
18885
+ message: "Jira host (e.g. mycompany.atlassian.net):"
18886
+ });
18887
+ if (!host.trim()) {
18888
+ console.log(chalk6.red("No host provided."));
18889
+ return;
18890
+ }
18891
+ const email3 = await input2({
18892
+ message: "Jira email:"
18893
+ });
18894
+ if (!email3.trim()) {
18895
+ console.log(chalk6.red("No email provided."));
18896
+ return;
18897
+ }
18898
+ const apiToken = await password({
18899
+ message: "Jira API token:"
18900
+ });
18901
+ if (!apiToken.trim()) {
18902
+ console.log(chalk6.red("No API token provided."));
18903
+ return;
18904
+ }
18905
+ const config2 = loadUserConfig();
18906
+ config2.jira = {
18907
+ host: host.trim(),
18908
+ email: email3.trim(),
18909
+ apiToken: apiToken.trim()
18910
+ };
18911
+ saveUserConfig(config2);
18912
+ console.log(chalk6.green("Jira credentials saved."));
18913
+ }
18883
18914
  async function setApiKey() {
18884
18915
  const apiKey = await password({
18885
18916
  message: "Enter your Anthropic API key:"
@@ -19193,7 +19224,7 @@ ${pending} file${pending === 1 ? "" : "s"} ready to process. Run "marvin ingest
19193
19224
  // src/cli/commands/sync.ts
19194
19225
  import chalk9 from "chalk";
19195
19226
  import ora3 from "ora";
19196
- import { input as input2 } from "@inquirer/prompts";
19227
+ import { input as input3 } from "@inquirer/prompts";
19197
19228
 
19198
19229
  // src/git/repository.ts
19199
19230
  import * as path12 from "path";
@@ -19400,7 +19431,7 @@ async function syncInitCommand(opts) {
19400
19431
  const git = new MarvinGit(project.marvinDir);
19401
19432
  let remote = opts.remote;
19402
19433
  if (!remote) {
19403
- remote = await input2({
19434
+ remote = await input3({
19404
19435
  message: "Remote repository URL (leave blank to skip):"
19405
19436
  }) || void 0;
19406
19437
  }
@@ -21366,7 +21397,7 @@ function createProgram() {
21366
21397
  const program2 = new Command();
21367
21398
  program2.name("marvin").description(
21368
21399
  "AI-powered product development assistant with Product Owner, Delivery Manager, and Technical Lead personas"
21369
- ).version("0.2.8");
21400
+ ).version("0.2.9");
21370
21401
  program2.command("init").description("Initialize a new Marvin project in the current directory").action(async () => {
21371
21402
  await initCommand();
21372
21403
  });