kantban-cli 0.1.46 → 0.1.49

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.
@@ -2828,17 +2828,17 @@ import { z as z50 } from "zod";
2828
2828
  var AdvisorConfigSchema = z50.object({
2829
2829
  enabled: z50.boolean(),
2830
2830
  max_invocations: z50.number().int().positive().optional(),
2831
- model: z50.string().optional()
2831
+ model: z50.string().min(1).optional()
2832
2832
  });
2833
2833
  var ModelRoutingSchema = z50.object({
2834
- initial: z50.string(),
2835
- escalation: z50.array(z50.string()).min(1),
2836
- escalate_after: z50.number().int().positive().optional()
2834
+ initial: z50.string().min(1),
2835
+ escalation: z50.array(z50.string().min(1)).min(1),
2836
+ escalate_after: z50.number().int().positive().default(2)
2837
2837
  });
2838
2838
  var StuckDetectionConfigSchema = z50.object({
2839
2839
  enabled: z50.boolean(),
2840
2840
  first_check: z50.number().int().positive().optional(),
2841
- interval: z50.number().int().positive().optional()
2841
+ interval: z50.number().int().min(2).optional()
2842
2842
  });
2843
2843
  var AgentConfigSchema = z50.object({
2844
2844
  execution_mode: z50.enum(["kant_loop", "cron_poll", "manual"]).optional(),
@@ -2869,14 +2869,17 @@ var AgentConfigSchema = z50.object({
2869
2869
  allowed_tools: z50.array(z50.string()).optional(),
2870
2870
  disallowed_tools: z50.array(z50.string()).optional(),
2871
2871
  stuck_detection: StuckDetectionConfigSchema.optional(),
2872
+ max_gutter_resets_per_transit: z50.number().int().nonnegative().optional(),
2873
+ reprompt_on_branch_merged: z50.boolean().optional(),
2874
+ max_reprompt_attempts: z50.number().int().nonnegative().optional(),
2872
2875
  extensions: z50.record(z50.string(), z50.unknown()).optional()
2873
- }).strict();
2876
+ }).strict().refine((v) => !(v.model_preference && v.model_routing), { message: "model_preference and model_routing are mutually exclusive" });
2874
2877
  var TicketFingerprintSchema = z50.object({
2875
2878
  column_id: z50.string().uuid().nullable(),
2876
2879
  updated_at: z50.string().datetime({ offset: true }),
2877
- comment_count: z50.number(),
2878
- signal_count: z50.number(),
2879
- field_value_count: z50.number()
2880
+ comment_count: z50.number().int().nonnegative(),
2881
+ signal_count: z50.number().int().nonnegative(),
2882
+ field_value_count: z50.number().int().nonnegative()
2880
2883
  });
2881
2884
  var DebtItemSchema = z50.object({
2882
2885
  type: z50.enum(["dropped_criterion", "missing_test", "missing_functionality", "unmet_requirement", "waived_gate"]),
@@ -2890,7 +2893,7 @@ var LoopCheckpointSchema = z50.object({
2890
2893
  iteration: z50.number().int().nonnegative(),
2891
2894
  gutter_count: z50.number().int().nonnegative(),
2892
2895
  advisor_invocations: z50.number().int().nonnegative(),
2893
- model_tier: z50.string(),
2896
+ model_tier: z50.string().min(1),
2894
2897
  last_fingerprint: TicketFingerprintSchema.optional(),
2895
2898
  worktree_name: z50.string().optional(),
2896
2899
  updated_at: z50.string().datetime({ offset: true })
@@ -3041,7 +3044,11 @@ var GateResultSchema = z51.object({
3041
3044
  output: z51.string().max(1048576),
3042
3045
  stderr: z51.string(),
3043
3046
  exit_code: z51.number().int().min(0).max(255),
3044
- timed_out: z51.boolean()
3047
+ timed_out: z51.boolean(),
3048
+ // Optional diagnostics surfaced from Node execFile error on spawn failure
3049
+ errno: z51.union([z51.string(), z51.number()]).optional(),
3050
+ syscall: z51.string().optional(),
3051
+ stderrTail: z51.string().optional()
3045
3052
  });
3046
3053
  var GateDeltaSchema = z51.enum(["improved", "same", "regressed", "first_check"]);
3047
3054
  var GateSnapshotSchema = z51.object({
@@ -3097,6 +3104,7 @@ var VerdictSchema = z51.object({
3097
3104
  // src/lib/gate-config.ts
3098
3105
  var DANGEROUS_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
3099
3106
  var VALID_BRANCH_RE = /^[a-zA-Z0-9][a-zA-Z0-9._\-/]*$/;
3107
+ var canonicalize = (s) => s.toLowerCase().replace(/[\s_-]+/g, "-");
3100
3108
  function assertNoPrototypePollutionKeys(value, depth = 0) {
3101
3109
  if (depth > 20 || value === null || typeof value !== "object") return;
3102
3110
  for (const key of Object.keys(value)) {
@@ -3112,21 +3120,26 @@ function parseGateConfig(yamlContent) {
3112
3120
  return GateConfigSchema.parse(raw);
3113
3121
  }
3114
3122
  function resolveGatesForColumn(config, columnName) {
3115
- const lowerName = columnName.toLowerCase();
3116
- const overrideKey = config.columns ? Object.keys(config.columns).find((k) => k.toLowerCase() === lowerName) : void 0;
3123
+ const lookupKey = canonicalize(columnName);
3124
+ const overrideKey = config.columns ? Object.keys(config.columns).find((k) => canonicalize(k) === lookupKey) : void 0;
3117
3125
  const override = overrideKey ? config.columns[overrideKey] : void 0;
3118
3126
  if (!override) {
3119
- return [...config.default];
3127
+ return { gates: [...config.default], source: "default" };
3120
3128
  }
3121
3129
  if (!override.extend) {
3122
3130
  if (override.gates.length === 0) {
3123
3131
  console.error(` [warn] Column "${columnName}" has extend:false with no gates \u2014 all gate enforcement disabled for this column`);
3124
3132
  }
3125
- return [...override.gates];
3133
+ return { gates: [...override.gates], source: "override" };
3126
3134
  }
3127
3135
  const overrideNames = new Set(override.gates.map((g) => g.name));
3128
3136
  const merged = config.default.filter((g) => !overrideNames.has(g.name));
3129
- return [...merged, ...override.gates];
3137
+ return { gates: [...merged, ...override.gates], source: "override" };
3138
+ }
3139
+ function findUnmatchedColumnKeys(config, boardColumnNames) {
3140
+ if (!config.columns) return [];
3141
+ const canonicalBoard = new Set(boardColumnNames.map(canonicalize));
3142
+ return Object.keys(config.columns).filter((k) => !canonicalBoard.has(canonicalize(k)));
3130
3143
  }
3131
3144
  var DEFAULT_TIMEOUT_MS = 6e4;
3132
3145
  function parseTimeout(timeout) {
@@ -3144,6 +3157,7 @@ export {
3144
3157
  VALID_BRANCH_RE,
3145
3158
  parseGateConfig,
3146
3159
  resolveGatesForColumn,
3160
+ findUnmatchedColumnKeys,
3147
3161
  parseTimeout
3148
3162
  };
3149
- //# sourceMappingURL=chunk-DAFLEMLK.js.map
3163
+ //# sourceMappingURL=chunk-4R27WTCJ.js.map