@bendyline/gezel 1.0.0 → 1.0.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.
@@ -283,6 +283,33 @@ var InvokePageToolResponseSchema = RunScriptResponseSchema.extend({
283
283
  reason: z2.string().optional()
284
284
  }).optional()
285
285
  });
286
+ var PageReadRequestSchema = z2.object({
287
+ op: z2.enum(["read", "list", "stat"]),
288
+ source: z2.enum(["workspace", "artifacts"]),
289
+ path: z2.string().min(1),
290
+ /** read op only; default derived from extension ('json' for .json else 'text'). */
291
+ as: z2.enum(["text", "json", "bytes"]).optional(),
292
+ /** read op only; capped server-side at PAGE_READ_MAX_BYTES regardless. */
293
+ maxBytes: z2.number().int().positive().optional()
294
+ });
295
+ var PageReadEntrySchema = z2.object({
296
+ name: z2.string(),
297
+ kind: z2.enum(["file", "dir"]),
298
+ size: z2.number().nonnegative(),
299
+ mtime: z2.number().nonnegative()
300
+ });
301
+ var PageReadResponseSchema = z2.object({
302
+ op: z2.enum(["read", "list", "stat"]),
303
+ /** read: file body (utf8 text or base64 when `encoding: 'base64'`). */
304
+ content: z2.string().optional(),
305
+ encoding: z2.enum(["utf8", "base64"]).optional(),
306
+ /** list: directory entries (files and dirs, one level). */
307
+ entries: z2.array(PageReadEntrySchema).optional(),
308
+ /** read/stat: change token — size:mtime hash; directories hash their listing. */
309
+ etag: z2.string(),
310
+ size: z2.number().nonnegative().optional(),
311
+ mtime: z2.number().nonnegative().optional()
312
+ });
286
313
  var ListScriptsResponseSchema = z2.object({
287
314
  scripts: z2.array(
288
315
  z2.object({
@@ -1723,7 +1750,7 @@ function defaultStepIdForName(name) {
1723
1750
  }
1724
1751
 
1725
1752
  // src/schemas/gezel.ts
1726
- import { z as z16 } from "zod";
1753
+ import { z as z17 } from "zod";
1727
1754
 
1728
1755
  // src/poppetje/schema.ts
1729
1756
  import { z as z6 } from "zod";
@@ -1908,21 +1935,30 @@ var PoppetjeSchema = z6.preprocess(
1908
1935
  })
1909
1936
  );
1910
1937
 
1911
- // src/schemas/codex.ts
1938
+ // src/schemas/claude.ts
1912
1939
  import { z as z7 } from "zod";
1913
- var CodexPermissionModeSchema = z7.enum(["plan", "edit", "reviewed", "full"]);
1914
- var LegacyCodexPermissionModeSchema = z7.enum([
1940
+ var ClaudePermissionModeSchema = z7.enum([
1941
+ "default",
1942
+ "acceptEdits",
1943
+ "plan",
1944
+ "bypassPermissions"
1945
+ ]);
1946
+
1947
+ // src/schemas/codex.ts
1948
+ import { z as z8 } from "zod";
1949
+ var CodexPermissionModeSchema = z8.enum(["plan", "edit", "reviewed", "full"]);
1950
+ var LegacyCodexPermissionModeSchema = z8.enum([
1915
1951
  "default",
1916
1952
  "acceptEdits",
1917
1953
  "bypassPermissions"
1918
1954
  ]);
1919
- var CodexPermissionModeCompatSchema = z7.union([
1955
+ var CodexPermissionModeCompatSchema = z8.union([
1920
1956
  CodexPermissionModeSchema,
1921
1957
  LegacyCodexPermissionModeSchema
1922
1958
  ]);
1923
1959
 
1924
1960
  // src/schemas/entity-id.ts
1925
- import { z as z8 } from "zod";
1961
+ import { z as z9 } from "zod";
1926
1962
 
1927
1963
  // src/entity-id.ts
1928
1964
  var SAFE_ENTITY_ID = /^[A-Za-z0-9@][A-Za-z0-9@._-]{0,199}$/;
@@ -1957,169 +1993,169 @@ function isSafeEntityId(value) {
1957
1993
  }
1958
1994
 
1959
1995
  // src/schemas/entity-id.ts
1960
- var EntityIdSchema = z8.string().refine(isSafeEntityId, {
1996
+ var EntityIdSchema = z9.string().refine(isSafeEntityId, {
1961
1997
  message: "must be a portable single-segment entity id"
1962
1998
  });
1963
1999
 
1964
2000
  // src/schemas/growth.ts
1965
- import { z as z10 } from "zod";
2001
+ import { z as z11 } from "zod";
1966
2002
 
1967
2003
  // src/schemas/tuning-profile-registry.ts
1968
- import { z as z9 } from "zod";
1969
- var TuningProfileIdSchema = z9.string().min(1).describe("Canonical tuning profile id.");
2004
+ import { z as z10 } from "zod";
2005
+ var TuningProfileIdSchema = z10.string().min(1).describe("Canonical tuning profile id.");
1970
2006
 
1971
2007
  // src/schemas/growth.ts
1972
- var GrowthEvidenceSchema = z10.object({
2008
+ var GrowthEvidenceSchema = z11.object({
1973
2009
  /** Memory-file day (YYYY-MM-DD) — rewritten server-side from the matched entry. */
1974
- day: z10.string().regex(/^\d{4}-\d{2}-\d{2}$/),
1975
- kind: z10.enum(["fact", "decision", "pref", "status"]),
1976
- excerpt: z10.string().min(1).max(400)
2010
+ day: z11.string().regex(/^\d{4}-\d{2}-\d{2}$/),
2011
+ kind: z11.enum(["fact", "decision", "pref", "status"]),
2012
+ excerpt: z11.string().min(1).max(400)
1977
2013
  });
1978
- var TraitProposalSchema = z10.object({
1979
- id: z10.string(),
1980
- kind: z10.literal("trait"),
1981
- title: z10.string().min(1).max(80),
2014
+ var TraitProposalSchema = z11.object({
2015
+ id: z11.string(),
2016
+ kind: z11.literal("trait"),
2017
+ title: z11.string().min(1).max(80),
1982
2018
  /** One imperative second-person sentence destined for the prompt. */
1983
- traitText: z10.string().min(1).max(200),
1984
- evidence: z10.array(GrowthEvidenceSchema).min(1).max(3)
2019
+ traitText: z11.string().min(1).max(200),
2020
+ evidence: z11.array(GrowthEvidenceSchema).min(1).max(3)
1985
2021
  });
1986
- var TuningActionSchema = z10.discriminatedUnion("type", [
1987
- z10.object({ type: z10.literal("profile"), profile: TuningProfileIdSchema }),
2022
+ var TuningActionSchema = z11.discriminatedUnion("type", [
2023
+ z11.object({ type: z11.literal("profile"), profile: TuningProfileIdSchema }),
1988
2024
  /** Resolved + clamped at accept time against the then-current frontmatter. */
1989
- z10.object({ type: z10.literal("temperature"), delta: z10.union([z10.literal(0.1), z10.literal(-0.1)]) })
2025
+ z11.object({ type: z11.literal("temperature"), delta: z11.union([z11.literal(0.1), z11.literal(-0.1)]) })
1990
2026
  ]);
1991
- var TuningProposalSchema = z10.object({
1992
- id: z10.string(),
1993
- kind: z10.literal("tuning"),
1994
- title: z10.string().max(80),
1995
- description: z10.string().max(300),
2027
+ var TuningProposalSchema = z11.object({
2028
+ id: z11.string(),
2029
+ kind: z11.literal("tuning"),
2030
+ title: z11.string().max(80),
2031
+ description: z11.string().max(300),
1996
2032
  action: TuningActionSchema
1997
2033
  });
1998
- var CosmeticProposalSchema = z10.object({
1999
- id: z10.string(),
2000
- kind: z10.literal("cosmetic"),
2001
- title: z10.string().max(80),
2034
+ var CosmeticProposalSchema = z11.object({
2035
+ id: z11.string(),
2036
+ kind: z11.literal("cosmetic"),
2037
+ title: z11.string().max(80),
2002
2038
  /** Key into GROWTH_COSMETICS, or a generic `level-N` milestone marker. */
2003
- cosmeticId: z10.string()
2039
+ cosmeticId: z11.string()
2004
2040
  });
2005
- var GrowthProposalSchema = z10.discriminatedUnion("kind", [
2041
+ var GrowthProposalSchema = z11.discriminatedUnion("kind", [
2006
2042
  TraitProposalSchema,
2007
2043
  TuningProposalSchema,
2008
2044
  CosmeticProposalSchema
2009
2045
  ]);
2010
- var PendingLevelUpSchema = z10.object({
2011
- toLevel: z10.number().int().min(2),
2012
- proposals: z10.array(GrowthProposalSchema).min(1).max(5),
2013
- createdAt: z10.string()
2046
+ var PendingLevelUpSchema = z11.object({
2047
+ toLevel: z11.number().int().min(2),
2048
+ proposals: z11.array(GrowthProposalSchema).min(1).max(5),
2049
+ createdAt: z11.string()
2014
2050
  });
2015
- var GrowthSignalsSchema = z10.object({
2016
- memoryXp: z10.number().int().nonnegative().default(0),
2017
- lessonsXp: z10.number().int().nonnegative().default(0),
2018
- taskXp: z10.number().int().nonnegative().default(0),
2019
- consultXp: z10.number().int().nonnegative().default(0)
2051
+ var GrowthSignalsSchema = z11.object({
2052
+ memoryXp: z11.number().int().nonnegative().default(0),
2053
+ lessonsXp: z11.number().int().nonnegative().default(0),
2054
+ taskXp: z11.number().int().nonnegative().default(0),
2055
+ consultXp: z11.number().int().nonnegative().default(0)
2020
2056
  });
2021
- var AdoptedTraitRecordSchema = z10.object({
2022
- traitId: z10.string(),
2023
- text: z10.string(),
2024
- level: z10.number().int(),
2025
- adoptedAt: z10.string(),
2026
- evidence: z10.array(GrowthEvidenceSchema),
2057
+ var AdoptedTraitRecordSchema = z11.object({
2058
+ traitId: z11.string(),
2059
+ text: z11.string(),
2060
+ level: z11.number().int(),
2061
+ adoptedAt: z11.string(),
2062
+ evidence: z11.array(GrowthEvidenceSchema),
2027
2063
  /** Set when the user later retires the trait — kept for the character sheet. */
2028
- removedAt: z10.string().optional()
2064
+ removedAt: z11.string().optional()
2029
2065
  });
2030
- var DeclinedProposalRecordSchema = z10.object({
2031
- kind: z10.enum(["trait", "tuning", "cosmetic"]),
2032
- title: z10.string(),
2066
+ var DeclinedProposalRecordSchema = z11.object({
2067
+ kind: z11.enum(["trait", "tuning", "cosmetic"]),
2068
+ title: z11.string(),
2033
2069
  /** Used for never-re-offer matching on trait proposals. */
2034
- traitText: z10.string().optional(),
2035
- level: z10.number().int(),
2036
- declinedAt: z10.string()
2070
+ traitText: z11.string().optional(),
2071
+ level: z11.number().int(),
2072
+ declinedAt: z11.string()
2037
2073
  });
2038
- var GezelGrowthStateSchema = z10.object({
2039
- version: z10.literal(1).default(1),
2040
- level: z10.number().int().min(1).default(1),
2041
- xp: z10.number().int().nonnegative().default(0),
2074
+ var GezelGrowthStateSchema = z11.object({
2075
+ version: z11.literal(1).default(1),
2076
+ level: z11.number().int().min(1).default(1),
2077
+ xp: z11.number().int().nonnegative().default(0),
2042
2078
  signals: GrowthSignalsSchema.prefault({}),
2043
- lastComputedAt: z10.string().optional(),
2079
+ lastComputedAt: z11.string().optional(),
2044
2080
  pendingLevelUp: PendingLevelUpSchema.optional(),
2045
- adoptedTraits: z10.array(AdoptedTraitRecordSchema).default([]),
2046
- declinedProposals: z10.array(DeclinedProposalRecordSchema).default([]),
2047
- unlockedCosmetics: z10.array(z10.object({ id: z10.string(), at: z10.string() })).default([])
2081
+ adoptedTraits: z11.array(AdoptedTraitRecordSchema).default([]),
2082
+ declinedProposals: z11.array(DeclinedProposalRecordSchema).default([]),
2083
+ unlockedCosmetics: z11.array(z11.object({ id: z11.string(), at: z11.string() })).default([])
2048
2084
  });
2049
- var GezelGrowthSummarySchema = z10.object({
2050
- level: z10.number().int().min(1),
2085
+ var GezelGrowthSummarySchema = z11.object({
2086
+ level: z11.number().int().min(1),
2051
2087
  /** True when a level-up is waiting for the user's choice. */
2052
- pending: z10.boolean().optional()
2088
+ pending: z11.boolean().optional()
2053
2089
  });
2054
2090
 
2055
2091
  // src/schemas/model-tuning.ts
2056
- import { z as z11 } from "zod";
2057
- var DrySamplerSchema = z11.object({
2058
- multiplier: z11.number().min(0).max(5).describe("DRY penalty strength. 0 disables. 0.8 is a reasonable default."),
2059
- base: z11.number().min(0).max(5).optional().describe("Base of the exponential penalty for repeated tokens. Default 1.75."),
2060
- allowedLength: z11.number().int().min(0).max(64).optional().describe("Minimum n-gram length before DRY kicks in. Default 2.")
2092
+ import { z as z12 } from "zod";
2093
+ var DrySamplerSchema = z12.object({
2094
+ multiplier: z12.number().min(0).max(5).describe("DRY penalty strength. 0 disables. 0.8 is a reasonable default."),
2095
+ base: z12.number().min(0).max(5).optional().describe("Base of the exponential penalty for repeated tokens. Default 1.75."),
2096
+ allowedLength: z12.number().int().min(0).max(64).optional().describe("Minimum n-gram length before DRY kicks in. Default 2.")
2061
2097
  }).describe("DRY anti-repetition sampler (llama.cpp only).");
2062
- var XtcSamplerSchema = z11.object({
2063
- probability: z11.number().min(0).max(1).describe("Probability of triggering XTC on any given step."),
2064
- threshold: z11.number().min(0).max(1).describe("Minimum top-token probability for XTC to fire.")
2098
+ var XtcSamplerSchema = z12.object({
2099
+ probability: z12.number().min(0).max(1).describe("Probability of triggering XTC on any given step."),
2100
+ threshold: z12.number().min(0).max(1).describe("Minimum top-token probability for XTC to fire.")
2065
2101
  }).describe("XTC sampler (llama.cpp only).");
2066
- var SamplingBlockSchema = z11.object({
2067
- temperature: z11.number().min(0).max(2).optional().describe("Sampling temperature. 0 = greedy. Most reasoning models want 0.6\u20131.0."),
2068
- topP: z11.number().min(0).max(1).optional().describe("Nucleus sampling. 0.95 is the common default for Qwen, Gemma, Nemotron."),
2069
- topK: z11.number().int().min(0).max(1e3).optional().describe("Top-k cutoff. 20 for Qwen think, 64 for Gemma, 1 for greedy-on-instruct."),
2070
- minP: z11.number().min(0).max(1).optional().describe("Min-p cutoff (llama.cpp / MLX / Ollama). Qwen recommends 0."),
2071
- maxTokens: z11.number().int().positive().optional().describe("Per-turn output token cap. Maps to num_predict / max_tokens / n_predict."),
2072
- seed: z11.number().int().optional().describe("RNG seed. Unset / negative = random. Best-effort determinism on cloud."),
2073
- repetitionPenalty: z11.number().min(0).max(3).optional().describe("Local engines (Ollama / llama.cpp / MLX): repeat_penalty. 1.0 = off, 1.1 = mild."),
2074
- repetitionContext: z11.number().int().positive().optional().describe("Local engines: window size for repetition penalty (`repeat_last_n`)."),
2075
- frequencyPenalty: z11.number().min(-2).max(2).optional().describe("Cloud (OpenAI) and Ollama / llama.cpp: penalize repeated tokens by frequency."),
2076
- presencePenalty: z11.number().min(-2).max(2).optional().describe("Cloud (OpenAI) and Ollama / llama.cpp: penalize any reused token."),
2102
+ var SamplingBlockSchema = z12.object({
2103
+ temperature: z12.number().min(0).max(2).optional().describe("Sampling temperature. 0 = greedy. Most reasoning models want 0.6\u20131.0."),
2104
+ topP: z12.number().min(0).max(1).optional().describe("Nucleus sampling. 0.95 is the common default for Qwen, Gemma, Nemotron."),
2105
+ topK: z12.number().int().min(0).max(1e3).optional().describe("Top-k cutoff. 20 for Qwen think, 64 for Gemma, 1 for greedy-on-instruct."),
2106
+ minP: z12.number().min(0).max(1).optional().describe("Min-p cutoff (llama.cpp / MLX / Ollama). Qwen recommends 0."),
2107
+ maxTokens: z12.number().int().positive().optional().describe("Per-turn output token cap. Maps to num_predict / max_tokens / n_predict."),
2108
+ seed: z12.number().int().optional().describe("RNG seed. Unset / negative = random. Best-effort determinism on cloud."),
2109
+ repetitionPenalty: z12.number().min(0).max(3).optional().describe("Local engines (Ollama / llama.cpp / MLX): repeat_penalty. 1.0 = off, 1.1 = mild."),
2110
+ repetitionContext: z12.number().int().positive().optional().describe("Local engines: window size for repetition penalty (`repeat_last_n`)."),
2111
+ frequencyPenalty: z12.number().min(-2).max(2).optional().describe("Cloud (OpenAI) and Ollama / llama.cpp: penalize repeated tokens by frequency."),
2112
+ presencePenalty: z12.number().min(-2).max(2).optional().describe("Cloud (OpenAI) and Ollama / llama.cpp: penalize any reused token."),
2077
2113
  dry: DrySamplerSchema.optional(),
2078
2114
  xtc: XtcSamplerSchema.optional()
2079
2115
  }).describe("Sampling parameters applied per-request.");
2080
- var ReasoningBlockSchema = z11.object({
2081
- effort: z11.enum(["low", "medium", "high"]).optional().describe(
2116
+ var ReasoningBlockSchema = z12.object({
2117
+ effort: z12.enum(["low", "medium", "high"]).optional().describe(
2082
2118
  "Cloud reasoning effort. Maps to OpenAI `reasoning.effort` and Anthropic `thinking.budget_tokens` tiers."
2083
2119
  ),
2084
- thinkingBudget: z11.number().int().positive().optional().describe(
2120
+ thinkingBudget: z12.number().int().positive().optional().describe(
2085
2121
  "Explicit thinking-token budget (Anthropic `thinking.budget_tokens`, Nemotron `reasoning_budget`). Wins over `effort` when both set."
2086
2122
  ),
2087
- enableThinking: z11.boolean().optional().describe(
2123
+ enableThinking: z12.boolean().optional().describe(
2088
2124
  "Chat-template toggle for dual-mode models (Qwen3+, Nemotron Nano/Super). Implicit on cloud thinking models."
2089
2125
  ),
2090
- templateKwargs: z11.record(z11.string(), z11.union([z11.string(), z11.number(), z11.boolean()])).optional().describe(
2126
+ templateKwargs: z12.record(z12.string(), z12.union([z12.string(), z12.number(), z12.boolean()])).optional().describe(
2091
2127
  "Chat-template variables that drive this model's reasoning depth, forwarded verbatim as `chat_template_kwargs` on local engines. The names are the model's own \u2014 GPT-OSS reads `reasoning_effort`, Muse Glimmer reads `reasoning_strength` (low|medium|high|xhigh) \u2014 so the manifest declares them rather than the runtime guessing. Lives under `reasoning` (not `engine`) because depth is a per-request choice a tuning profile overrides: `thinking-coding` can ask for xhigh while `instruct` asks for low. Cloud providers ignore it; use `reasoning.effort` there."
2092
2128
  )
2093
2129
  }).describe("Reasoning controls.");
2094
- var StructuredOutputSchema = z11.object({
2095
- responseFormat: z11.enum(["text", "json_object"]).optional().describe("Output mode. `text` = freeform (default). `json_object` = enforce JSON."),
2096
- jsonSchema: z11.unknown().optional().describe("Pin output to a JSON Schema (OpenAI strict mode, llama.cpp --json-schema)."),
2097
- grammar: z11.string().optional().describe("llama.cpp GBNF grammar. Last-resort structured-output knob.")
2130
+ var StructuredOutputSchema = z12.object({
2131
+ responseFormat: z12.enum(["text", "json_object"]).optional().describe("Output mode. `text` = freeform (default). `json_object` = enforce JSON."),
2132
+ jsonSchema: z12.unknown().optional().describe("Pin output to a JSON Schema (OpenAI strict mode, llama.cpp --json-schema)."),
2133
+ grammar: z12.string().optional().describe("llama.cpp GBNF grammar. Last-resort structured-output knob.")
2098
2134
  }).describe("Structured-output controls.");
2099
- var PromptTagsSchema = z11.object({
2100
- enableThinkingTag: z11.string().optional().describe("User-prompt tag that enables thinking for this turn (e.g. `/think`)."),
2101
- disableThinkingTag: z11.string().optional().describe("User-prompt tag that disables thinking for this turn (e.g. `/no_think`).")
2135
+ var PromptTagsSchema = z12.object({
2136
+ enableThinkingTag: z12.string().optional().describe("User-prompt tag that enables thinking for this turn (e.g. `/think`)."),
2137
+ disableThinkingTag: z12.string().optional().describe("User-prompt tag that disables thinking for this turn (e.g. `/no_think`).")
2102
2138
  }).describe("Per-turn reasoning toggle tags.");
2103
- var LlamaCppEngineConfigSchema = z11.object({
2104
- nGpuLayers: z11.number().int().min(-1).optional().describe("`--n-gpu-layers` override. -1 = all. Unset = b9843 `auto`/`--fit`."),
2105
- cpuMoe: z11.boolean().optional().describe("`--cpu-moe`: keep ALL MoE experts in system RAM (attention/dense on GPU)."),
2106
- nCpuMoe: z11.number().int().min(0).optional().describe("`--n-cpu-moe N`: keep the first N layers\u2019 MoE experts in RAM. Partial split."),
2107
- cacheReuse: z11.number().int().min(0).optional().describe(
2139
+ var LlamaCppEngineConfigSchema = z12.object({
2140
+ nGpuLayers: z12.number().int().min(-1).optional().describe("`--n-gpu-layers` override. -1 = all. Unset = b9843 `auto`/`--fit`."),
2141
+ cpuMoe: z12.boolean().optional().describe("`--cpu-moe`: keep ALL MoE experts in system RAM (attention/dense on GPU)."),
2142
+ nCpuMoe: z12.number().int().min(0).optional().describe("`--n-cpu-moe N`: keep the first N layers\u2019 MoE experts in RAM. Partial split."),
2143
+ cacheReuse: z12.number().int().min(0).optional().describe(
2108
2144
  "`--cache-reuse N` prefix-KV reuse chunk. 0 = disable. Unset inherits the global default."
2109
2145
  ),
2110
- swaFull: z11.boolean().optional().describe("`--swa-full`: full-size SWA cache (Gemma family)."),
2111
- flashAttn: z11.enum(["on", "off", "auto"]).optional().describe("`--flash-attn` mode override for this model."),
2112
- ubatchSize: z11.number().int().positive().optional().describe("`--ubatch-size` (inner microbatch) override for this model."),
2113
- contextSize: z11.number().int().positive().optional().describe(
2146
+ swaFull: z12.boolean().optional().describe("`--swa-full`: full-size SWA cache (Gemma family)."),
2147
+ flashAttn: z12.enum(["on", "off", "auto"]).optional().describe("`--flash-attn` mode override for this model."),
2148
+ ubatchSize: z12.number().int().positive().optional().describe("`--ubatch-size` (inner microbatch) override for this model."),
2149
+ contextSize: z12.number().int().positive().optional().describe(
2114
2150
  "Per-turn context ceiling (tokens) this model launches with. Capped by GGUF train ctx."
2115
2151
  ),
2116
- chatTemplate: z11.string().min(1).optional().describe(
2152
+ chatTemplate: z12.string().min(1).optional().describe(
2117
2153
  "`--chat-template` override for GGUFs whose embedded Jinja template is incompatible with llama.cpp tool parsing."
2118
2154
  ),
2119
- threads: z11.number().int().positive().optional().describe("`--threads` override."),
2120
- batchSize: z11.number().int().positive().optional().describe("`--batch-size` override."),
2121
- spec: z11.object({
2122
- type: z11.enum([
2155
+ threads: z12.number().int().positive().optional().describe("`--threads` override."),
2156
+ batchSize: z12.number().int().positive().optional().describe("`--batch-size` override."),
2157
+ spec: z12.object({
2158
+ type: z12.enum([
2123
2159
  "none",
2124
2160
  "draft-mtp",
2125
2161
  "draft-eagle3",
@@ -2131,24 +2167,24 @@ var LlamaCppEngineConfigSchema = z11.object({
2131
2167
  "ngram-map-k4v",
2132
2168
  "ngram-cache"
2133
2169
  ]).optional().describe("`--spec-type` speculative-decoding mode for this model."),
2134
- mtp: z11.boolean().optional().describe(
2170
+ mtp: z12.boolean().optional().describe(
2135
2171
  "VERIFIED capability metadata: this model\u2019s target or companion GGUF carries MTP tensors. Does not enable `draft-mtp` by itself."
2136
2172
  ),
2137
- draftModelId: z11.string().optional().describe("Catalog id / path of the draft model for `draft-simple`."),
2138
- nMax: z11.number().int().positive().optional().describe("`--spec-draft-n-max`: tokens drafted per step.")
2173
+ draftModelId: z12.string().optional().describe("Catalog id / path of the draft model for `draft-simple`."),
2174
+ nMax: z12.number().int().positive().optional().describe("`--spec-draft-n-max`: tokens drafted per step.")
2139
2175
  }).optional().describe("Speculative-decoding config for this model.")
2140
2176
  }).describe("Per-model llama.cpp launch-flag defaults (engine-level, applied at model load).");
2141
- var EngineConfigSchema = z11.object({
2177
+ var EngineConfigSchema = z12.object({
2142
2178
  llamaCpp: LlamaCppEngineConfigSchema.optional()
2143
2179
  }).describe("Per-model engine launch-flag defaults, keyed by engine.");
2144
- var ChatModelTuningBaseSchema = z11.object({
2180
+ var ChatModelTuningBaseSchema = z12.object({
2145
2181
  sampling: SamplingBlockSchema.optional(),
2146
2182
  samplingWhenThinking: SamplingBlockSchema.optional().describe(
2147
2183
  "Sparse override of `sampling` applied when the runtime determines reasoning is engaged. Used by Qwen3+ (different sampling for /think mode) and Nemotron Nano (different sampling for thinking vs instruct)."
2148
2184
  ),
2149
2185
  reasoning: ReasoningBlockSchema.optional(),
2150
2186
  output: StructuredOutputSchema.optional(),
2151
- toolChoice: z11.enum(["auto", "required", "none"]).optional().describe(
2187
+ toolChoice: z12.enum(["auto", "required", "none"]).optional().describe(
2152
2188
  "Tool selection mode (cloud + llama.cpp + MLX). `auto` lets the model decide; `required` forces a tool call this turn; `none` disables tools."
2153
2189
  ),
2154
2190
  promptTags: PromptTagsSchema.optional()
@@ -2157,16 +2193,16 @@ var ChatModelTuningSchema = ChatModelTuningBaseSchema.extend({
2157
2193
  engine: EngineConfigSchema.optional().describe(
2158
2194
  "Per-model ENGINE launch-flag defaults (llama.cpp `--n-gpu-layers`, `--cpu-moe`, `--spec-type`, \u2026). Applied once at model load, not per request \u2014 so it lives on the top-level tuning object, not inside per-request `profiles`."
2159
2195
  ),
2160
- profiles: z11.record(TuningProfileIdSchema, ChatModelTuningBaseSchema.partial()).optional().describe(
2196
+ profiles: z12.record(TuningProfileIdSchema, ChatModelTuningBaseSchema.partial()).optional().describe(
2161
2197
  "Named tuning presets this model implements. Gezel frontmatter `tuningProfile` selects one; the resolver applies the profile as a layer between installDefault and catalog base. Missing requested profiles walk the canonical fallback chain."
2162
2198
  )
2163
2199
  }).describe("Per-model sampling, reasoning, and output defaults.");
2164
2200
 
2165
2201
  // src/schemas/question.ts
2166
- import { z as z13 } from "zod";
2202
+ import { z as z14 } from "zod";
2167
2203
 
2168
2204
  // src/schemas/npm-package.ts
2169
- import { z as z12 } from "zod";
2205
+ import { z as z13 } from "zod";
2170
2206
  var NPM_NAME_SEGMENT = /^[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?$/;
2171
2207
  var SEMVER_NUMBER = String.raw`(?:0|[1-9]\d*)`;
2172
2208
  var SEMVER_PART = String.raw`(?:${SEMVER_NUMBER}|[xX*])`;
@@ -2198,28 +2234,28 @@ function isValidNpmRegistryVersion(value) {
2198
2234
  return atoms.length > 0 && atoms.every((atom) => SEMVER_ATOM.test(atom));
2199
2235
  });
2200
2236
  }
2201
- var NpmPackageNameSchema = z12.string().refine(isValidNpmPackageName, {
2237
+ var NpmPackageNameSchema = z13.string().refine(isValidNpmPackageName, {
2202
2238
  message: "must be a lowercase npm registry package name (for example zod or @types/node)"
2203
2239
  });
2204
- var NpmRegistryVersionSchema = z12.string().refine(isValidNpmRegistryVersion, {
2240
+ var NpmRegistryVersionSchema = z13.string().refine(isValidNpmRegistryVersion, {
2205
2241
  message: "must be a registry dist-tag or semver range"
2206
2242
  });
2207
- var NpmRegistryPackageRequestSchema = z12.object({
2243
+ var NpmRegistryPackageRequestSchema = z13.object({
2208
2244
  package: NpmPackageNameSchema,
2209
2245
  version: NpmRegistryVersionSchema.optional()
2210
2246
  }).strict();
2211
2247
 
2212
2248
  // src/schemas/question.ts
2213
- var NpmInstallApprovalDecisionSchema = z13.object({
2249
+ var NpmInstallApprovalDecisionSchema = z14.object({
2214
2250
  package: NpmPackageNameSchema,
2215
2251
  version: NpmRegistryVersionSchema,
2216
- decision: z13.enum(["install", "always", "decline"])
2252
+ decision: z14.enum(["install", "always", "decline"])
2217
2253
  });
2218
- var QuestionAnswerSchema = z13.object({
2254
+ var QuestionAnswerSchema = z14.object({
2219
2255
  /** Indices into `choices` the user picked. Empty when only write-in. */
2220
- selectedChoices: z13.array(z13.number().int().min(0)).optional(),
2256
+ selectedChoices: z14.array(z14.number().int().min(0)).optional(),
2221
2257
  /** Free-text the user typed. Empty when they only clicked choices. */
2222
- writeIn: z13.string().optional(),
2258
+ writeIn: z14.string().optional(),
2223
2259
  /**
2224
2260
  * Set when the user explicitly dismissed BUT wants the gezel to
2225
2261
  * proceed anyway with sensible defaults. Triggers a synthetic
@@ -2227,7 +2263,7 @@ var QuestionAnswerSchema = z13.object({
2227
2263
  * so the gezel knows to make decisions on the user's behalf.
2228
2264
  * UI label: "Just do whatever".
2229
2265
  */
2230
- declined: z13.boolean().optional(),
2266
+ declined: z14.boolean().optional(),
2231
2267
  /**
2232
2268
  * Set when the user just wants the question to go away — no
2233
2269
  * follow-up turn, no work done, nothing for the gezel to act on.
@@ -2236,97 +2272,97 @@ var QuestionAnswerSchema = z13.object({
2236
2272
  * from `declined` so the model never sees a "user wants defaults"
2237
2273
  * signal that the user didn't intend. UI label: "Skip".
2238
2274
  */
2239
- silentSkip: z13.boolean().optional(),
2275
+ silentSkip: z14.boolean().optional(),
2240
2276
  /**
2241
2277
  * Per-package decisions for `npm-install-approval` questions. When
2242
2278
  * set, the answer handler installs / always-allows / declines each
2243
2279
  * package and emits a single follow-up summary into the session.
2244
2280
  */
2245
- npmInstallDecisions: z13.array(NpmInstallApprovalDecisionSchema).optional(),
2246
- at: z13.string()
2281
+ npmInstallDecisions: z14.array(NpmInstallApprovalDecisionSchema).optional(),
2282
+ at: z14.string()
2247
2283
  });
2248
- var NpmInstallApprovalPackageSchema = z13.object({
2284
+ var NpmInstallApprovalPackageSchema = z14.object({
2249
2285
  package: NpmPackageNameSchema,
2250
2286
  version: NpmRegistryVersionSchema
2251
2287
  });
2252
- var CommandApprovalScopeSchema = z13.enum(["script", "npx"]);
2253
- var CommandApprovalInputFileSchema = z13.object({
2288
+ var CommandApprovalScopeSchema = z14.enum(["script", "npx"]);
2289
+ var CommandApprovalInputFileSchema = z14.object({
2254
2290
  /** Workspace-relative, slash-normalized path shown in the approval prompt. */
2255
- path: z13.string().min(1),
2256
- sha256: z13.string().regex(/^[a-f0-9]{64}$/)
2291
+ path: z14.string().min(1),
2292
+ sha256: z14.string().regex(/^[a-f0-9]{64}$/)
2257
2293
  });
2258
- var CommandApprovalIntentSchema = z13.object({
2259
- kind: z13.literal("command-approval"),
2294
+ var CommandApprovalIntentSchema = z14.object({
2295
+ kind: z14.literal("command-approval"),
2260
2296
  scope: CommandApprovalScopeSchema,
2261
- name: z13.string().min(1),
2262
- body: z13.string().optional(),
2263
- args: z13.array(z13.string()).optional(),
2264
- inputFiles: z13.array(CommandApprovalInputFileSchema).max(128).optional()
2297
+ name: z14.string().min(1),
2298
+ body: z14.string().optional(),
2299
+ args: z14.array(z14.string()).optional(),
2300
+ inputFiles: z14.array(CommandApprovalInputFileSchema).max(128).optional()
2265
2301
  });
2266
- var ToolPermissionIntentSchema = z13.object({
2267
- kind: z13.literal("tool-permission"),
2268
- toolName: z13.string(),
2269
- toolInput: z13.record(z13.string(), z13.unknown())
2302
+ var ToolPermissionIntentSchema = z14.object({
2303
+ kind: z14.literal("tool-permission"),
2304
+ toolName: z14.string(),
2305
+ toolInput: z14.record(z14.string(), z14.unknown())
2270
2306
  });
2271
- var ToolsetInstallApprovalIntentSchema = z13.object({
2272
- kind: z13.literal("toolset-install-approval"),
2273
- toolsetId: z13.string(),
2274
- sourceId: z13.string(),
2275
- version: z13.string(),
2276
- targetProjectId: z13.string(),
2277
- craftbookId: z13.string()
2307
+ var ToolsetInstallApprovalIntentSchema = z14.object({
2308
+ kind: z14.literal("toolset-install-approval"),
2309
+ toolsetId: z14.string(),
2310
+ sourceId: z14.string(),
2311
+ version: z14.string(),
2312
+ targetProjectId: z14.string(),
2313
+ craftbookId: z14.string()
2278
2314
  });
2279
- var ImageGenerationApprovalIntentSchema = z13.object({
2280
- kind: z13.literal("image-generation-approval"),
2281
- provider: z13.string(),
2282
- model: z13.string(),
2315
+ var ImageGenerationApprovalIntentSchema = z14.object({
2316
+ kind: z14.literal("image-generation-approval"),
2317
+ provider: z14.string(),
2318
+ model: z14.string(),
2283
2319
  /** Truncated prompt the model is about to send. Surfaced verbatim. */
2284
- promptPreview: z13.string(),
2320
+ promptPreview: z14.string(),
2285
2321
  /** Resolved generation size, e.g. '2K 16:9' or '1024x1024'. Optional. */
2286
- estimatedSize: z13.string().optional()
2322
+ estimatedSize: z14.string().optional()
2287
2323
  });
2288
- var VideoGenerationApprovalIntentSchema = z13.object({
2289
- kind: z13.literal("video-generation-approval"),
2290
- provider: z13.string(),
2291
- model: z13.string(),
2292
- promptPreview: z13.string(),
2324
+ var VideoGenerationApprovalIntentSchema = z14.object({
2325
+ kind: z14.literal("video-generation-approval"),
2326
+ provider: z14.string(),
2327
+ model: z14.string(),
2328
+ promptPreview: z14.string(),
2293
2329
  /** Resolved clip shape, e.g. '704×480 · 97f · 24fps'. Optional. */
2294
- estimatedSize: z13.string().optional()
2330
+ estimatedSize: z14.string().optional()
2295
2331
  });
2296
- var ScheduleApprovalIntentSchema = z13.object({
2297
- kind: z13.literal("schedule-approval"),
2298
- typeId: z13.string(),
2299
- craftbookId: z13.string(),
2332
+ var ScheduleApprovalIntentSchema = z14.object({
2333
+ kind: z14.literal("schedule-approval"),
2334
+ typeId: z14.string(),
2335
+ craftbookId: z14.string(),
2300
2336
  /**
2301
2337
  * Recurrence flavor. Absent → 'scheduled' (every question written
2302
2338
  * before this field existed is a cron schedule). 'night-shift' hosts
2303
2339
  * run inside the Night Shift window instead of on a user-visible cron;
2304
2340
  * the card copy switches accordingly.
2305
2341
  */
2306
- runMode: z13.enum(["scheduled", "night-shift"]).optional(),
2342
+ runMode: z14.enum(["scheduled", "night-shift"]).optional(),
2307
2343
  /**
2308
2344
  * 5-field cron expression (UTC). Surfaced verbatim on the card for
2309
2345
  * 'scheduled' hosts; for 'night-shift' hosts it is the internal
2310
2346
  * heartbeat and the card shows the window instead.
2311
2347
  */
2312
- cron: z13.string(),
2313
- overlap: z13.enum(["skip", "queue", "concurrent"]).optional()
2348
+ cron: z14.string(),
2349
+ overlap: z14.enum(["skip", "queue", "concurrent"]).optional()
2314
2350
  });
2315
- var NightShiftReviewIntentSchema = z13.object({
2316
- kind: z13.literal("night-shift-review"),
2351
+ var NightShiftReviewIntentSchema = z14.object({
2352
+ kind: z14.literal("night-shift-review"),
2317
2353
  /** The window's day key (see `nightShiftWindowKey`). */
2318
- windowKey: z13.string(),
2319
- tasksCompleted: z13.number(),
2320
- reports: z13.array(
2321
- z13.object({
2322
- projectId: z13.string(),
2323
- path: z13.string(),
2324
- title: z13.string().optional(),
2325
- actionCount: z13.number()
2354
+ windowKey: z14.string(),
2355
+ tasksCompleted: z14.number(),
2356
+ reports: z14.array(
2357
+ z14.object({
2358
+ projectId: z14.string(),
2359
+ path: z14.string(),
2360
+ title: z14.string().optional(),
2361
+ actionCount: z14.number()
2326
2362
  })
2327
2363
  )
2328
2364
  });
2329
- var TaskPausedReasonSchema = z13.enum([
2365
+ var TaskPausedReasonSchema = z14.enum([
2330
2366
  "gate_exhausted",
2331
2367
  "gate_plateau",
2332
2368
  "gate_unsatisfiable",
@@ -2334,22 +2370,22 @@ var TaskPausedReasonSchema = z13.enum([
2334
2370
  "step_stalled",
2335
2371
  "budget_exhausted"
2336
2372
  ]);
2337
- var TaskPausedIntentSchema = z13.object({
2338
- kind: z13.literal("task-paused"),
2373
+ var TaskPausedIntentSchema = z14.object({
2374
+ kind: z14.literal("task-paused"),
2339
2375
  /** `projectId/num` of the paused task — the dedup key. */
2340
- taskRef: z13.string(),
2341
- stepId: z13.string().optional(),
2376
+ taskRef: z14.string(),
2377
+ stepId: z14.string().optional(),
2342
2378
  reason: TaskPausedReasonSchema
2343
2379
  });
2344
- var QuestionIntentSchema = z13.discriminatedUnion("kind", [
2345
- z13.object({
2346
- kind: z13.literal("npm-install-approval"),
2380
+ var QuestionIntentSchema = z14.discriminatedUnion("kind", [
2381
+ z14.object({
2382
+ kind: z14.literal("npm-install-approval"),
2347
2383
  /**
2348
2384
  * Packages that need approval. Always at least one; multiple when
2349
2385
  * the gezel batched an install call (encouraged) or when we merged
2350
2386
  * a later request into the same pending question for dedup.
2351
2387
  */
2352
- packages: z13.array(NpmInstallApprovalPackageSchema).min(1)
2388
+ packages: z14.array(NpmInstallApprovalPackageSchema).min(1)
2353
2389
  }),
2354
2390
  CommandApprovalIntentSchema,
2355
2391
  ToolPermissionIntentSchema,
@@ -2360,61 +2396,61 @@ var QuestionIntentSchema = z13.discriminatedUnion("kind", [
2360
2396
  NightShiftReviewIntentSchema,
2361
2397
  TaskPausedIntentSchema
2362
2398
  ]);
2363
- var QuestionSchema = z13.object({
2364
- id: z13.string(),
2365
- projectId: z13.string(),
2366
- gezelId: z13.string(),
2367
- sessionId: z13.string(),
2399
+ var QuestionSchema = z14.object({
2400
+ id: z14.string(),
2401
+ projectId: z14.string(),
2402
+ gezelId: z14.string(),
2403
+ sessionId: z14.string(),
2368
2404
  /** Body of the question — supports markdown. */
2369
- prompt: z13.string().min(1),
2405
+ prompt: z14.string().min(1),
2370
2406
  /** Optional preset choices. Empty / omitted => write-in only. */
2371
- choices: z13.array(z13.string()).max(20).optional(),
2407
+ choices: z14.array(z14.string()).max(20).optional(),
2372
2408
  /** Whether the user can also type a write-in alongside choices. Default true. */
2373
- allowWriteIn: z13.boolean().optional(),
2409
+ allowWriteIn: z14.boolean().optional(),
2374
2410
  /** Whether multiple choices may be selected. Default false. */
2375
- multiSelect: z13.boolean().optional(),
2411
+ multiSelect: z14.boolean().optional(),
2376
2412
  /**
2377
2413
  * Approval-flow attachment: a task this question is *about*. Stored in
2378
2414
  * `projectId/num` form so existing parsing helpers work. The UI shows
2379
2415
  * the task title + status above the prompt and offers an "Open task"
2380
2416
  * link.
2381
2417
  */
2382
- taskRef: z13.string().optional(),
2418
+ taskRef: z14.string().optional(),
2383
2419
  /**
2384
2420
  * Approval-flow attachment: a document this question is *about*.
2385
2421
  * Project-relative path when `projectId` is set, otherwise into the
2386
2422
  * global `~/.gezel/documents/` library. The UI renders a collapsed
2387
2423
  * preview + "Open document" link.
2388
2424
  */
2389
- documentPath: z13.string().optional(),
2425
+ documentPath: z14.string().optional(),
2390
2426
  /**
2391
2427
  * Service-created specialized-question marker (see `QuestionIntent`
2392
2428
  * for context). Absent for plain user-facing questions asked via
2393
2429
  * the `ask_user_question` MCP tool.
2394
2430
  */
2395
2431
  intent: QuestionIntentSchema.optional(),
2396
- createdAt: z13.string(),
2432
+ createdAt: z14.string(),
2397
2433
  /** Set once the user has answered (or declined). */
2398
2434
  answer: QuestionAnswerSchema.optional()
2399
2435
  });
2400
2436
 
2401
2437
  // src/schemas/recognition.ts
2402
- import { z as z14 } from "zod";
2403
- var ImageExifSchema = z14.object({
2404
- make: z14.string().optional(),
2405
- model: z14.string().optional(),
2406
- lensModel: z14.string().optional(),
2407
- dateTimeOriginal: z14.string().optional(),
2408
- orientation: z14.number().int().min(1).max(8).optional(),
2409
- software: z14.string().optional(),
2410
- imageDescription: z14.string().optional()
2438
+ import { z as z15 } from "zod";
2439
+ var ImageExifSchema = z15.object({
2440
+ make: z15.string().optional(),
2441
+ model: z15.string().optional(),
2442
+ lensModel: z15.string().optional(),
2443
+ dateTimeOriginal: z15.string().optional(),
2444
+ orientation: z15.number().int().min(1).max(8).optional(),
2445
+ software: z15.string().optional(),
2446
+ imageDescription: z15.string().optional()
2411
2447
  });
2412
- var ImageStaticMetaSchema = z14.object({
2413
- format: z14.enum(["png", "jpeg", "gif", "webp", "svg", "unknown"]),
2414
- width: z14.number().int().positive().optional(),
2415
- height: z14.number().int().positive().optional(),
2416
- byteLength: z14.number().int().nonnegative(),
2417
- sha256: z14.string().regex(/^[a-f0-9]{64}$/),
2448
+ var ImageStaticMetaSchema = z15.object({
2449
+ format: z15.enum(["png", "jpeg", "gif", "webp", "svg", "unknown"]),
2450
+ width: z15.number().int().positive().optional(),
2451
+ height: z15.number().int().positive().optional(),
2452
+ byteLength: z15.number().int().nonnegative(),
2453
+ sha256: z15.string().regex(/^[a-f0-9]{64}$/),
2418
2454
  /**
2419
2455
  * PNG `tEXt`/`iTXt`/`zTXt` keyword→value pairs. Generation provenance lives
2420
2456
  * here (A1111 writes `parameters`, ComfyUI writes `prompt`/`workflow`) and
@@ -2423,153 +2459,153 @@ var ImageStaticMetaSchema = z14.object({
2423
2459
  * Attacker-controlled: anyone can author a PNG whose `Description` chunk
2424
2460
  * reads "Ignore previous instructions". Renderers MUST fence and cap this.
2425
2461
  */
2426
- pngText: z14.record(z14.string(), z14.string()).optional(),
2462
+ pngText: z15.record(z15.string(), z15.string()).optional(),
2427
2463
  exif: ImageExifSchema.optional(),
2428
2464
  /** Withheld from every prompt. See the schema doc above. */
2429
- gps: z14.object({ lat: z14.number(), lon: z14.number() }).optional(),
2465
+ gps: z15.object({ lat: z15.number(), lon: z15.number() }).optional(),
2430
2466
  /** True when the file carried location data we deliberately dropped. */
2431
- gpsRedacted: z14.boolean().optional(),
2467
+ gpsRedacted: z15.boolean().optional(),
2432
2468
  /**
2433
2469
  * Heuristic from dimensions, format, and metadata — drives `auto` mode
2434
2470
  * selection without paying a classifier call.
2435
2471
  */
2436
- likelyScreenshot: z14.boolean().optional()
2472
+ likelyScreenshot: z15.boolean().optional()
2437
2473
  });
2438
- var RecognitionModeSchema = z14.enum(["describe", "ocr", "ui", "extract"]);
2439
- var RecognitionModeRequestSchema = z14.enum(["auto", "describe", "ocr", "ui", "extract"]);
2440
- var ImageRecognitionSchema = z14.object({
2441
- schemaVersion: z14.literal(1),
2442
- sha256: z14.string().regex(/^[a-f0-9]{64}$/),
2474
+ var RecognitionModeSchema = z15.enum(["describe", "ocr", "ui", "extract"]);
2475
+ var RecognitionModeRequestSchema = z15.enum(["auto", "describe", "ocr", "ui", "extract"]);
2476
+ var ImageRecognitionSchema = z15.object({
2477
+ schemaVersion: z15.literal(1),
2478
+ sha256: z15.string().regex(/^[a-f0-9]{64}$/),
2443
2479
  meta: ImageStaticMetaSchema,
2444
- modes: z14.array(RecognitionModeSchema).min(1),
2445
- description: z14.string().optional(),
2446
- ocrText: z14.string().optional(),
2447
- structured: z14.object({
2448
- templateId: z14.string().optional(),
2449
- data: z14.unknown()
2480
+ modes: z15.array(RecognitionModeSchema).min(1),
2481
+ description: z15.string().optional(),
2482
+ ocrText: z15.string().optional(),
2483
+ structured: z15.object({
2484
+ templateId: z15.string().optional(),
2485
+ data: z15.unknown()
2450
2486
  }).optional(),
2451
- engine: z14.enum(["llama-cpp", "mlx", "mock", "none"]),
2452
- modelId: z14.string(),
2453
- status: z14.enum(["ok", "partial", "failed", "static-only"]),
2454
- failureReason: z14.string().optional(),
2455
- durationMs: z14.number().int().nonnegative(),
2456
- at: z14.string()
2487
+ engine: z15.enum(["llama-cpp", "mlx", "mock", "none"]),
2488
+ modelId: z15.string(),
2489
+ status: z15.enum(["ok", "partial", "failed", "static-only"]),
2490
+ failureReason: z15.string().optional(),
2491
+ durationMs: z15.number().int().nonnegative(),
2492
+ at: z15.string()
2457
2493
  });
2458
- var MessageImageDigestSchema = z14.object({
2494
+ var MessageImageDigestSchema = z15.object({
2459
2495
  /** The markdown ref exactly as it appears in the message body. */
2460
- ref: z14.string(),
2461
- sha256: z14.string().regex(/^[a-f0-9]{64}$/),
2496
+ ref: z15.string(),
2497
+ sha256: z15.string().regex(/^[a-f0-9]{64}$/),
2462
2498
  /** Pre-rendered, already capped and fenced-safe. */
2463
- digest: z14.string(),
2464
- modelId: z14.string(),
2465
- modes: z14.array(RecognitionModeSchema),
2466
- status: z14.enum(["ok", "partial", "failed", "static-only"]),
2467
- at: z14.string()
2499
+ digest: z15.string(),
2500
+ modelId: z15.string(),
2501
+ modes: z15.array(RecognitionModeSchema),
2502
+ status: z15.enum(["ok", "partial", "failed", "static-only"]),
2503
+ at: z15.string()
2468
2504
  });
2469
- var RecognitionRequestSchema = z14.object({
2505
+ var RecognitionRequestSchema = z15.object({
2470
2506
  /** Project-relative artifact path, e.g. `attachments/<uuid>.png`. */
2471
- artifactPath: z14.string().min(1).optional(),
2472
- data: z14.string().min(1).optional(),
2473
- mimeType: z14.string().optional(),
2507
+ artifactPath: z15.string().min(1).optional(),
2508
+ data: z15.string().min(1).optional(),
2509
+ mimeType: z15.string().optional(),
2474
2510
  mode: RecognitionModeRequestSchema.default("auto"),
2475
2511
  /** JSON Schema for `extract` mode — fed to llama-server `response_format`. */
2476
- schema: z14.unknown().optional(),
2512
+ schema: z15.unknown().optional(),
2477
2513
  /** Overrides the configured recognition model for this call. */
2478
- model: z14.string().optional()
2514
+ model: z15.string().optional()
2479
2515
  });
2480
- var RecognitionHealthSchema = z14.object({
2481
- state: z14.enum(["ok", "no-model", "not-configured", "error"]),
2482
- modelId: z14.string().optional(),
2483
- detail: z14.string().optional()
2516
+ var RecognitionHealthSchema = z15.object({
2517
+ state: z15.enum(["ok", "no-model", "not-configured", "error"]),
2518
+ modelId: z15.string().optional(),
2519
+ detail: z15.string().optional()
2484
2520
  });
2485
- var RecognitionPullEventSchema = z14.union([
2486
- z14.object({
2487
- type: z14.literal("progress"),
2488
- bytesWritten: z14.number().int().nonnegative(),
2489
- totalBytes: z14.number().int().nonnegative().optional()
2521
+ var RecognitionPullEventSchema = z15.union([
2522
+ z15.object({
2523
+ type: z15.literal("progress"),
2524
+ bytesWritten: z15.number().int().nonnegative(),
2525
+ totalBytes: z15.number().int().nonnegative().optional()
2490
2526
  }),
2491
- z14.object({ type: z14.literal("error"), error: z14.string() }),
2492
- z14.object({ type: z14.literal("done"), id: z14.string() })
2527
+ z15.object({ type: z15.literal("error"), error: z15.string() }),
2528
+ z15.object({ type: z15.literal("done"), id: z15.string() })
2493
2529
  ]);
2494
- var RecognitionCatalogEntrySchema = z14.object({
2495
- id: z14.string(),
2496
- name: z14.string(),
2497
- description: z14.string(),
2498
- license: z14.string(),
2499
- approxSizeBytes: z14.number().int().nonnegative(),
2500
- recoScore: z14.number()
2530
+ var RecognitionCatalogEntrySchema = z15.object({
2531
+ id: z15.string(),
2532
+ name: z15.string(),
2533
+ description: z15.string(),
2534
+ license: z15.string(),
2535
+ approxSizeBytes: z15.number().int().nonnegative(),
2536
+ recoScore: z15.number()
2501
2537
  });
2502
- var ListRecognitionCatalogResponseSchema = z14.object({
2503
- models: z14.array(RecognitionCatalogEntrySchema)
2538
+ var ListRecognitionCatalogResponseSchema = z15.object({
2539
+ models: z15.array(RecognitionCatalogEntrySchema)
2504
2540
  });
2505
- var InstalledRecognitionModelSchema = z14.object({
2506
- id: z14.string(),
2507
- name: z14.string(),
2508
- approxSizeBytes: z14.number().int().nonnegative(),
2509
- installedAt: z14.string(),
2510
- weightsPath: z14.string().optional(),
2511
- mmprojPath: z14.string().optional()
2541
+ var InstalledRecognitionModelSchema = z15.object({
2542
+ id: z15.string(),
2543
+ name: z15.string(),
2544
+ approxSizeBytes: z15.number().int().nonnegative(),
2545
+ installedAt: z15.string(),
2546
+ weightsPath: z15.string().optional(),
2547
+ mmprojPath: z15.string().optional()
2512
2548
  });
2513
- var ListInstalledRecognitionModelsResponseSchema = z14.object({
2514
- models: z14.array(InstalledRecognitionModelSchema)
2549
+ var ListInstalledRecognitionModelsResponseSchema = z15.object({
2550
+ models: z15.array(InstalledRecognitionModelSchema)
2515
2551
  });
2516
2552
 
2517
2553
  // src/schemas/session-telemetry.ts
2518
- import { z as z15 } from "zod";
2519
- var SessionGpuTaskSchema = z15.enum([
2554
+ import { z as z16 } from "zod";
2555
+ var SessionGpuTaskSchema = z16.enum([
2520
2556
  "image_generation",
2521
2557
  "video_generation",
2522
2558
  "image_recognition"
2523
2559
  ]);
2524
- var SessionTurnTelemetrySchema = z15.object({
2560
+ var SessionTurnTelemetrySchema = z16.object({
2525
2561
  /** Epoch ms when the in-flight turn started. */
2526
- startedAt: z15.number(),
2527
- streamedContentChars: z15.number().int().nonnegative(),
2528
- toolCalls: z15.number().int().nonnegative(),
2529
- fileMutations: z15.number().int().nonnegative()
2562
+ startedAt: z16.number(),
2563
+ streamedContentChars: z16.number().int().nonnegative(),
2564
+ toolCalls: z16.number().int().nonnegative(),
2565
+ fileMutations: z16.number().int().nonnegative()
2530
2566
  });
2531
- var SessionTelemetrySchema = z15.object({
2532
- sessionId: z15.string(),
2533
- gezelId: z15.string(),
2534
- projectId: z15.string(),
2567
+ var SessionTelemetrySchema = z16.object({
2568
+ sessionId: z16.string(),
2569
+ gezelId: z16.string(),
2570
+ projectId: z16.string(),
2535
2571
  /** True while a send is currently running for this session. */
2536
- inflight: z15.boolean(),
2537
- turnsStarted: z15.number().int().nonnegative(),
2538
- deltaChunks: z15.number().int().nonnegative(),
2539
- streamedContentChars: z15.number().int().nonnegative(),
2540
- wirePulses: z15.number().int().nonnegative(),
2541
- heartbeats: z15.number().int().nonnegative(),
2542
- enginePhaseEvents: z15.number().int().nonnegative(),
2572
+ inflight: z16.boolean(),
2573
+ turnsStarted: z16.number().int().nonnegative(),
2574
+ deltaChunks: z16.number().int().nonnegative(),
2575
+ streamedContentChars: z16.number().int().nonnegative(),
2576
+ wirePulses: z16.number().int().nonnegative(),
2577
+ heartbeats: z16.number().int().nonnegative(),
2578
+ enginePhaseEvents: z16.number().int().nonnegative(),
2543
2579
  /**
2544
2580
  * `engine_phase === 'generating'` transitions — roughly one per completion
2545
2581
  * request the engine served (the slot-launch granularity stall logic and
2546
2582
  * the eval chatter threshold were calibrated against).
2547
2583
  */
2548
- generationSpurts: z15.number().int().nonnegative(),
2549
- toolCalls: z15.number().int().nonnegative(),
2550
- toolArgChars: z15.number().int().nonnegative(),
2551
- fileMutations: z15.number().int().nonnegative(),
2552
- gpuEvents: z15.number().int().nonnegative(),
2584
+ generationSpurts: z16.number().int().nonnegative(),
2585
+ toolCalls: z16.number().int().nonnegative(),
2586
+ toolArgChars: z16.number().int().nonnegative(),
2587
+ fileMutations: z16.number().int().nonnegative(),
2588
+ gpuEvents: z16.number().int().nonnegative(),
2553
2589
  gpuTaskActive: SessionGpuTaskSchema.nullable(),
2554
2590
  /** Epoch ms of the last streamed signal (delta / pulse / heartbeat / phase). */
2555
- lastStreamActivityAt: z15.number().nullable(),
2556
- lastToolActivityAt: z15.number().nullable(),
2557
- lastMutationAt: z15.number().nullable(),
2558
- lastGpuActivityAt: z15.number().nullable(),
2591
+ lastStreamActivityAt: z16.number().nullable(),
2592
+ lastToolActivityAt: z16.number().nullable(),
2593
+ lastMutationAt: z16.number().nullable(),
2594
+ lastGpuActivityAt: z16.number().nullable(),
2559
2595
  /** Max of all activity timestamps — "when did ANY progress signal last fire". */
2560
- lastProgressAt: z15.number().nullable(),
2596
+ lastProgressAt: z16.number().nullable(),
2561
2597
  /** Counters scoped to the currently-running turn; null between turns. */
2562
2598
  currentTurn: SessionTurnTelemetrySchema.nullable()
2563
2599
  });
2564
- var SessionTelemetryListResponseSchema = z15.object({
2600
+ var SessionTelemetryListResponseSchema = z16.object({
2565
2601
  /** Bumped when counter semantics change; consumers gate on it. */
2566
- version: z15.literal(1),
2567
- capturedAt: z15.number(),
2568
- sessions: z15.array(SessionTelemetrySchema)
2602
+ version: z16.literal(1),
2603
+ capturedAt: z16.number(),
2604
+ sessions: z16.array(SessionTelemetrySchema)
2569
2605
  });
2570
2606
 
2571
2607
  // src/schemas/gezel.ts
2572
- var ProviderNameSchema = z16.enum([
2608
+ var ProviderNameSchema = z17.enum([
2573
2609
  "copilot",
2574
2610
  "openai",
2575
2611
  "anthropic",
@@ -2591,27 +2627,27 @@ var ProviderNameSchema = z16.enum([
2591
2627
  // forward-pass is remoted — so `remote` is NOT a local provider.
2592
2628
  "remote"
2593
2629
  ]);
2594
- var GezelGenderSchema = z16.enum(["male", "female", "non-binary"]);
2595
- var FixedFunctionConfigSchema = z16.object({
2630
+ var GezelGenderSchema = z17.enum(["male", "female", "non-binary"]);
2631
+ var FixedFunctionConfigSchema = z17.object({
2596
2632
  /** MCP tool name to forward to (e.g. `'generate_image'`). */
2597
- tool: z16.string().min(1),
2633
+ tool: z17.string().min(1),
2598
2634
  /** Argument key on the tool that receives the user's message text. */
2599
- promptKey: z16.string().min(1).default("prompt"),
2635
+ promptKey: z17.string().min(1).default("prompt"),
2600
2636
  /** Defaults merged into every call; user text on `promptKey` always wins. */
2601
- defaults: z16.record(z16.string(), z16.unknown()).optional()
2637
+ defaults: z17.record(z17.string(), z17.unknown()).optional()
2602
2638
  });
2603
- var GezelTraitSchema = z16.object({
2604
- id: z16.string(),
2639
+ var GezelTraitSchema = z17.object({
2640
+ id: z17.string(),
2605
2641
  /** One imperative second-person sentence, rendered as a prompt bullet. */
2606
- text: z16.string().min(1).max(200),
2607
- adoptedAt: z16.string(),
2608
- source: z16.enum(["levelup", "manual"]).optional()
2642
+ text: z17.string().min(1).max(200),
2643
+ adoptedAt: z17.string(),
2644
+ source: z17.enum(["levelup", "manual"]).optional()
2609
2645
  });
2610
- var GezelFrontmatterSchema = z16.object({
2646
+ var GezelFrontmatterSchema = z17.object({
2611
2647
  id: EntityIdSchema.optional(),
2612
- name: z16.string(),
2613
- description: z16.string().optional(),
2614
- role: z16.string().optional(),
2648
+ name: z17.string(),
2649
+ description: z17.string().optional(),
2650
+ role: z17.string().optional(),
2615
2651
  /**
2616
2652
  * Kebab-case slug derived from `role` (or `gezel-N` when role is absent),
2617
2653
  * globally unique across the install. Collisions get `-2`, `-3`, …
@@ -2619,7 +2655,7 @@ var GezelFrontmatterSchema = z16.object({
2619
2655
  * identifier for @-mentions and as the sole rendered identifier when
2620
2656
  * `config.roleBasedNameOnlyMode` is enabled.
2621
2657
  */
2622
- roleBasedName: z16.string().optional(),
2658
+ roleBasedName: z17.string().optional(),
2623
2659
  /**
2624
2660
  * One of `male` / `female` / `non-binary`. Assigned at creation time
2625
2661
  * from the matching gendered first-name pool (with a small chance of
@@ -2628,9 +2664,9 @@ var GezelFrontmatterSchema = z16.object({
2628
2664
  * own prompt. Absent on legacy gezels, where references omit pronouns.
2629
2665
  */
2630
2666
  gender: GezelGenderSchema.optional(),
2631
- model: z16.string().optional(),
2667
+ model: z17.string().optional(),
2632
2668
  provider: ProviderNameSchema.optional(),
2633
- reasoningEffort: z16.string().optional(),
2669
+ reasoningEffort: z17.string().optional(),
2634
2670
  /**
2635
2671
  * Per-gezel sampling / reasoning / structured-output / tool-call overrides.
2636
2672
  * Sparse — only set fields override the catalog's recommended defaults.
@@ -2663,8 +2699,8 @@ var GezelFrontmatterSchema = z16.object({
2663
2699
  * low-temperature `thinking-precise` without locking the user out.
2664
2700
  */
2665
2701
  suggestedTuningProfile: TuningProfileIdSchema.optional(),
2666
- tools: z16.array(z16.string()).optional(),
2667
- tags: z16.array(z16.string()).optional(),
2702
+ tools: z17.array(z17.string()).optional(),
2703
+ tags: z17.array(z17.string()).optional(),
2668
2704
  /**
2669
2705
  * When set, switches this gezel into "fixed-function" mode: chat
2670
2706
  * messages bypass the LLM and forward to the named MCP tool. See
@@ -2674,14 +2710,14 @@ var GezelFrontmatterSchema = z16.object({
2674
2710
  */
2675
2711
  fixedFunction: FixedFunctionConfigSchema.optional(),
2676
2712
  /** Ollama-only: override the context window (tokens) for this gezel. */
2677
- numCtx: z16.number().int().positive().optional(),
2713
+ numCtx: z17.number().int().positive().optional(),
2678
2714
  /** When false, suppresses auto-recall on session start for this gezel. */
2679
- autoRecall: z16.boolean().optional(),
2715
+ autoRecall: z17.boolean().optional(),
2680
2716
  /**
2681
2717
  * Chat bubble font id (one of `GEZEL_CHAT_FONTS[*].id`). When unset or
2682
2718
  * unrecognized, chat bubbles inherit the app default (Hanken Grotesk).
2683
2719
  */
2684
- font: z16.string().optional(),
2720
+ font: z17.string().optional(),
2685
2721
  /**
2686
2722
  * Kokoro TTS voice id (one of `KOKORO_VOICES[*].id`, e.g. `af_heart`,
2687
2723
  * `bm_george`). Drives spoken audio rendering — `synthesize_speech`
@@ -2690,7 +2726,7 @@ var GezelFrontmatterSchema = z16.object({
2690
2726
  * dialog. Absent on legacy gezels — synthesize falls back to the
2691
2727
  * default voice (`af_heart`) when missing.
2692
2728
  */
2693
- voice: z16.string().optional(),
2729
+ voice: z17.string().optional(),
2694
2730
  /**
2695
2731
  * Provenance: the id of the gilde catalog template this gezel was
2696
2732
  * created from, if any. Written by exact-template or about-omitted
@@ -2698,7 +2734,7 @@ var GezelFrontmatterSchema = z16.object({
2698
2734
  * Absent on bespoke-generated or hand-authored gezels. The UI uses
2699
2735
  * this to offer "reset to original template" on the about editor.
2700
2736
  */
2701
- templateId: z16.string().optional(),
2737
+ templateId: z17.string().optional(),
2702
2738
  /**
2703
2739
  * Provenance: the semver of the template version installed at create
2704
2740
  * time. Paired with `templateId`. Absent on gezels created before this
@@ -2706,7 +2742,7 @@ var GezelFrontmatterSchema = z16.object({
2706
2742
  * source version" and offers a refresh to current latest without
2707
2743
  * comparing.
2708
2744
  */
2709
- templateVersion: z16.string().optional(),
2745
+ templateVersion: z17.string().optional(),
2710
2746
  /**
2711
2747
  * Copilot-only: when true, deny the Copilot CLI's built-in tools
2712
2748
  * (bash, web_fetch, view, str_replace_editor, read_file, write_file,
@@ -2715,7 +2751,7 @@ var GezelFrontmatterSchema = z16.object({
2715
2751
  * itself defaults to the sandboxed MCP surface.
2716
2752
  * Provider other than copilot: ignored.
2717
2753
  */
2718
- sandboxCopilot: z16.boolean().optional(),
2754
+ sandboxCopilot: z17.boolean().optional(),
2719
2755
  /**
2720
2756
  * `anthropic-cli`-only: per-gezel override for the Claude CLI permission
2721
2757
  * mode. Forwarded as `--permission-mode <value>` to each `claude` invocation.
@@ -2725,10 +2761,11 @@ var GezelFrontmatterSchema = z16.object({
2725
2761
  * - `plan`: read-only — useful for review-style gezels.
2726
2762
  * - `bypassPermissions`: yolo — every tool call auto-approved including
2727
2763
  * Bash. Reserve for builder gezels you trust to run shell commands.
2728
- * When unset, inherits `config.anthropicCli.defaultPermissionMode` (which
2729
- * itself defaults to `acceptEdits`). Other providers: ignored.
2764
+ * When unset, inherits the project override and then
2765
+ * `config.anthropicCli.defaultPermissionMode` (which itself defaults to
2766
+ * `acceptEdits`). Other providers: ignored.
2730
2767
  */
2731
- claudePermissionMode: z16.enum(["default", "acceptEdits", "plan", "bypassPermissions"]).optional(),
2768
+ claudePermissionMode: ClaudePermissionModeSchema.optional(),
2732
2769
  /**
2733
2770
  * `codex-cli`-only execution posture. New writes use Plan / Edit /
2734
2771
  * Reviewed / Full; legacy Codex values remain readable for compatibility.
@@ -2740,7 +2777,7 @@ var GezelFrontmatterSchema = z16.object({
2740
2777
  * abstract sigil instead of the parametric poppetje. Default (absent /
2741
2778
  * false) renders the poppetje everywhere. Toggled from Gezel Detail.
2742
2779
  */
2743
- iconOverride: z16.boolean().optional(),
2780
+ iconOverride: z17.boolean().optional(),
2744
2781
  /**
2745
2782
  * Standing behavior traits, adopted through the growth system (or
2746
2783
  * hand-authored). Rendered as their own `### Traits` block in the
@@ -2749,7 +2786,7 @@ var GezelFrontmatterSchema = z16.object({
2749
2786
  * The frontmatter list is AUTHORITATIVE for what's active — growth.json
2750
2787
  * keeps the evidence-bearing adoption log.
2751
2788
  */
2752
- traits: z16.array(GezelTraitSchema).max(8).optional(),
2789
+ traits: z17.array(GezelTraitSchema).max(8).optional(),
2753
2790
  /**
2754
2791
  * Overrides `config.recognition.mode` for this gezel. A gezel whose job is
2755
2792
  * reading screenshots sets `always`; everyone else inherits.
@@ -2759,48 +2796,48 @@ var GezelFrontmatterSchema = z16.object({
2759
2796
  * support burden. Native vision is a property of the model *install*, not of
2760
2797
  * the gezel, so it has no frontmatter counterpart.
2761
2798
  */
2762
- recognition: z16.enum(["auto", "always", "off"]).optional()
2799
+ recognition: z17.enum(["auto", "always", "off"]).optional()
2763
2800
  });
2764
- var GezelSectionSchema = z16.object({
2765
- heading: z16.string(),
2766
- template: z16.string().optional(),
2767
- params: z16.record(z16.string(), z16.string()).optional(),
2768
- body: z16.string()
2801
+ var GezelSectionSchema = z17.object({
2802
+ heading: z17.string(),
2803
+ template: z17.string().optional(),
2804
+ params: z17.record(z17.string(), z17.string()).optional(),
2805
+ body: z17.string()
2769
2806
  });
2770
- var ParsedGezelSchema = z16.object({
2807
+ var ParsedGezelSchema = z17.object({
2771
2808
  frontmatter: GezelFrontmatterSchema,
2772
- sections: z16.array(GezelSectionSchema),
2773
- source: z16.string()
2809
+ sections: z17.array(GezelSectionSchema),
2810
+ source: z17.string()
2774
2811
  });
2775
- var GezelSummarySchema = z16.object({
2812
+ var GezelSummarySchema = z17.object({
2776
2813
  id: EntityIdSchema,
2777
- name: z16.string(),
2778
- description: z16.string().optional(),
2779
- role: z16.string().optional(),
2814
+ name: z17.string(),
2815
+ description: z17.string().optional(),
2816
+ role: z17.string().optional(),
2780
2817
  /** Mirrors `GezelFrontmatter.roleBasedName`. */
2781
- roleBasedName: z16.string().optional(),
2818
+ roleBasedName: z17.string().optional(),
2782
2819
  /** Mirrors `GezelFrontmatter.gender`. */
2783
2820
  gender: GezelGenderSchema.optional(),
2784
- model: z16.string().optional(),
2821
+ model: z17.string().optional(),
2785
2822
  provider: ProviderNameSchema.optional(),
2786
- reasoningEffort: z16.string().optional(),
2823
+ reasoningEffort: z17.string().optional(),
2787
2824
  /** Mirrors `GezelFrontmatter.tuningProfile`. */
2788
2825
  tuningProfile: TuningProfileIdSchema.optional(),
2789
2826
  /** Mirrors `GezelFrontmatter.suggestedTuningProfile`. */
2790
2827
  suggestedTuningProfile: TuningProfileIdSchema.optional(),
2791
- numCtx: z16.number().int().positive().optional(),
2792
- autoRecall: z16.boolean().optional(),
2793
- font: z16.string().optional(),
2828
+ numCtx: z17.number().int().positive().optional(),
2829
+ autoRecall: z17.boolean().optional(),
2830
+ font: z17.string().optional(),
2794
2831
  /** Mirrors `GezelFrontmatter.voice` — Kokoro TTS voice id. */
2795
- voice: z16.string().optional(),
2832
+ voice: z17.string().optional(),
2796
2833
  /** Mirrors `GezelFrontmatter.templateId` when the gezel came from a gilde template. */
2797
- templateId: z16.string().optional(),
2834
+ templateId: z17.string().optional(),
2798
2835
  /** Mirrors `GezelFrontmatter.templateVersion`. */
2799
- templateVersion: z16.string().optional(),
2836
+ templateVersion: z17.string().optional(),
2800
2837
  /** Mirrors `GezelFrontmatter.sandboxCopilot`. */
2801
- sandboxCopilot: z16.boolean().optional(),
2838
+ sandboxCopilot: z17.boolean().optional(),
2802
2839
  /** Mirrors `GezelFrontmatter.claudePermissionMode`. */
2803
- claudePermissionMode: z16.enum(["default", "acceptEdits", "plan", "bypassPermissions"]).optional(),
2840
+ claudePermissionMode: ClaudePermissionModeSchema.optional(),
2804
2841
  /** Mirrors `GezelFrontmatter.codexPermissionMode`. */
2805
2842
  codexPermissionMode: CodexPermissionModeCompatSchema.optional(),
2806
2843
  /**
@@ -2811,7 +2848,7 @@ var GezelSummarySchema = z16.object({
2811
2848
  * affordance.
2812
2849
  */
2813
2850
  fixedFunction: FixedFunctionConfigSchema.optional(),
2814
- icon: z16.string().optional(),
2851
+ icon: z17.string().optional(),
2815
2852
  /**
2816
2853
  * The resolved poppetje character data for this gezel. Inlined on
2817
2854
  * every list/detail response so the UI can render the parametric SVG
@@ -2821,9 +2858,9 @@ var GezelSummarySchema = z16.object({
2821
2858
  */
2822
2859
  poppetje: PoppetjeSchema.optional(),
2823
2860
  /** Mirrors `GezelFrontmatter.iconOverride`. */
2824
- iconOverride: z16.boolean().optional(),
2861
+ iconOverride: z17.boolean().optional(),
2825
2862
  /** Mirrors `GezelFrontmatter.recognition`. */
2826
- recognition: z16.enum(["auto", "always", "off"]).optional(),
2863
+ recognition: z17.enum(["auto", "always", "off"]).optional(),
2827
2864
  /**
2828
2865
  * Where this gezel lives. `global` (the default when absent — back-compat
2829
2866
  * with every gezel on disk before this field existed) is the install-wide
@@ -2833,15 +2870,15 @@ var GezelSummarySchema = z16.object({
2833
2870
  * badges project-scoped gezels and the roster only surfaces them inside
2834
2871
  * their own project.
2835
2872
  */
2836
- scope: z16.enum(["global", "project"]).optional(),
2873
+ scope: z17.enum(["global", "project"]).optional(),
2837
2874
  /**
2838
2875
  * Filesystem ownership boundary, distinct from `scope` above. Shared gezel
2839
2876
  * identity lives in the installer-managed machine root; chats, memories,
2840
2877
  * growth, credentials, and installed toolsets remain in the user home.
2841
2878
  */
2842
- storageScope: z16.enum(["user", "machine-shared"]).optional(),
2879
+ storageScope: z17.enum(["user", "machine-shared"]).optional(),
2843
2880
  /** Mirrors `GezelFrontmatter.traits`. */
2844
- traits: z16.array(GezelTraitSchema).optional(),
2881
+ traits: z17.array(GezelTraitSchema).optional(),
2845
2882
  /**
2846
2883
  * Lightweight growth summary (level + pending level-up flag),
2847
2884
  * hydrated from growth.json and inlined on list/detail responses —
@@ -2849,11 +2886,11 @@ var GezelSummarySchema = z16.object({
2849
2886
  * without N+1 follow-up requests.
2850
2887
  */
2851
2888
  growth: GezelGrowthSummarySchema.optional(),
2852
- updatedAt: z16.string()
2889
+ updatedAt: z17.string()
2853
2890
  });
2854
2891
  var GezelDetailSchema = GezelSummarySchema.extend({
2855
2892
  parsed: ParsedGezelSchema,
2856
- about: z16.string(),
2893
+ about: z17.string(),
2857
2894
  /**
2858
2895
  * Optional contents of the per-gezel `tools.md` file. When present
2859
2896
  * (non-null), fully replaces the auto-injected `## Tools available
@@ -2863,43 +2900,43 @@ var GezelDetailSchema = GezelSummarySchema.extend({
2863
2900
  * default) means no override file exists and the runtime renders
2864
2901
  * the auto-block from the live MCP bridge.
2865
2902
  */
2866
- toolsMd: z16.string().nullable().default(null)
2903
+ toolsMd: z17.string().nullable().default(null)
2867
2904
  });
2868
- var ToolCallImageSchema = z16.object({
2905
+ var ToolCallImageSchema = z17.object({
2869
2906
  /** Path relative to the project's artifacts/ root (e.g. `sessions/2026-04-19_143015_snake-test/tool-3-img-0.png`). */
2870
- path: z16.string(),
2907
+ path: z17.string(),
2871
2908
  /** MIME type of the image, used by the UI to set the right `<img>` src URL. */
2872
- mimeType: z16.string()
2909
+ mimeType: z17.string()
2873
2910
  });
2874
- var ToolCallAudioSchema = z16.object({
2911
+ var ToolCallAudioSchema = z17.object({
2875
2912
  /** Path relative to the project's artifacts/ root. */
2876
- path: z16.string(),
2913
+ path: z17.string(),
2877
2914
  /** MIME type, e.g. `audio/wav`. */
2878
- mimeType: z16.string(),
2915
+ mimeType: z17.string(),
2879
2916
  /** Duration in seconds when known — used by the UI to show length without preloading the blob. */
2880
- durationSeconds: z16.number().optional(),
2917
+ durationSeconds: z17.number().optional(),
2881
2918
  /** Voice id used to produce this audio (TTS only). */
2882
- voice: z16.string().optional()
2919
+ voice: z17.string().optional()
2883
2920
  });
2884
- var ToolCallVideoSchema = z16.object({
2921
+ var ToolCallVideoSchema = z17.object({
2885
2922
  /** Path relative to the project's artifacts/ root (e.g. `generated/video-123.mp4`). */
2886
- path: z16.string(),
2923
+ path: z17.string(),
2887
2924
  /** MIME type, e.g. `video/mp4`. */
2888
- mimeType: z16.string(),
2925
+ mimeType: z17.string(),
2889
2926
  /** Optional poster-frame artifact path for the `<video poster>` attribute. */
2890
- posterPath: z16.string().optional()
2927
+ posterPath: z17.string().optional()
2891
2928
  });
2892
- var ChatMessageToolCallSchema = z16.object({
2893
- name: z16.string(),
2894
- durationMs: z16.number(),
2895
- success: z16.boolean(),
2896
- errorMessage: z16.string().optional(),
2929
+ var ChatMessageToolCallSchema = z17.object({
2930
+ name: z17.string(),
2931
+ durationMs: z17.number(),
2932
+ success: z17.boolean(),
2933
+ errorMessage: z17.string().optional(),
2897
2934
  /** File path the tool touched, for the References pane. */
2898
- path: z16.string().optional(),
2935
+ path: z17.string().optional(),
2899
2936
  /** Ordered file paths touched by a batched filesystem tool. */
2900
- paths: z16.array(z16.string()).optional(),
2937
+ paths: z17.array(z17.string()).optional(),
2901
2938
  /** Compact, human-readable one-liner ("→ Freja: update the game loop · file: workspace/index.html"). */
2902
- argsSummary: z16.string().optional(),
2939
+ argsSummary: z17.string().optional(),
2903
2940
  /**
2904
2941
  * The tool call's FULL arguments, rendered as readable text (field by
2905
2942
  * field, bulky values shown in full — not truncated like
@@ -2910,34 +2947,34 @@ var ChatMessageToolCallSchema = z16.object({
2910
2947
  * arguments are not a secret vector in this codebase (secrets live in
2911
2948
  * the toolset-config path), so this is not separately redacted.
2912
2949
  */
2913
- argsFull: z16.string().optional(),
2950
+ argsFull: z17.string().optional(),
2914
2951
  /** Short full response, or a bounded beginning/end summary for a long response. */
2915
- resultText: z16.string().optional(),
2952
+ resultText: z17.string().optional(),
2916
2953
  /** True when `resultText` is a bounded summary rather than the complete response. */
2917
- resultTruncated: z16.boolean().optional(),
2954
+ resultTruncated: z17.boolean().optional(),
2918
2955
  /** Image artifacts the tool returned (e.g. browser_snapshot screenshots). */
2919
- images: z16.array(ToolCallImageSchema).optional(),
2956
+ images: z17.array(ToolCallImageSchema).optional(),
2920
2957
  /** Audio artifacts the tool returned (e.g. synthesize_speech WAV). */
2921
- audios: z16.array(ToolCallAudioSchema).optional(),
2958
+ audios: z17.array(ToolCallAudioSchema).optional(),
2922
2959
  /** Video artifacts the tool returned (e.g. generate_video mp4). */
2923
- videos: z16.array(ToolCallVideoSchema).optional(),
2960
+ videos: z17.array(ToolCallVideoSchema).optional(),
2924
2961
  /**
2925
2962
  * Unified diff describing the change a surgical-edit tool made
2926
2963
  * (`replace_in_file`, `apply_patch`, `insert_at_marker`). Used by the UI
2927
2964
  * to render an inline diff under the tool-call row. Capped at ~100KB
2928
2965
  * server-side; larger diffs are truncated with a marker line.
2929
2966
  */
2930
- diff: z16.string().optional(),
2931
- addedLines: z16.number().int().nonnegative().optional(),
2932
- removedLines: z16.number().int().nonnegative().optional()
2967
+ diff: z17.string().optional(),
2968
+ addedLines: z17.number().int().nonnegative().optional(),
2969
+ removedLines: z17.number().int().nonnegative().optional()
2933
2970
  });
2934
- var ChatMessageSchema = z16.object({
2935
- role: z16.enum(["user", "assistant"]),
2936
- content: z16.string(),
2937
- at: z16.string(),
2938
- from: z16.object({
2939
- gezelId: z16.string(),
2940
- gezelName: z16.string()
2971
+ var ChatMessageSchema = z17.object({
2972
+ role: z17.enum(["user", "assistant"]),
2973
+ content: z17.string(),
2974
+ at: z17.string(),
2975
+ from: z17.object({
2976
+ gezelId: z17.string(),
2977
+ gezelName: z17.string()
2941
2978
  }).optional(),
2942
2979
  /**
2943
2980
  * Artifact paths (relative to the project's `artifacts/` directory)
@@ -2947,7 +2984,7 @@ var ChatMessageSchema = z16.object({
2947
2984
  * that match a real artifact. Back-stops Copilot's tool-call
2948
2985
  * blindspot and any "AI wrote a file outside the MCP tools" paths.
2949
2986
  */
2950
- referencedArtifacts: z16.array(z16.string()).optional(),
2987
+ referencedArtifacts: z17.array(z17.string()).optional(),
2951
2988
  /**
2952
2989
  * Task refs (`<projectId>/<num>`) the assistant reply mentioned. Same
2953
2990
  * shape as `referencedArtifacts` — populated on save, gated on the
@@ -2956,14 +2993,14 @@ var ChatMessageSchema = z16.object({
2956
2993
  * gezel-ux-roadmap/2" mention so the user can jump to it without
2957
2994
  * scrolling the body for the ref.
2958
2995
  */
2959
- referencedTasks: z16.array(z16.string()).optional(),
2996
+ referencedTasks: z17.array(z17.string()).optional(),
2960
2997
  /**
2961
2998
  * Tool calls the assistant fired during this turn. Populated on the
2962
2999
  * final assistant message; the UI renders them as a collapsible
2963
3000
  * "thinking" expando above the reply body so the user can still see
2964
3001
  * what ran even after the live stream has closed.
2965
3002
  */
2966
- toolCalls: z16.array(ChatMessageToolCallSchema).optional(),
3003
+ toolCalls: z17.array(ChatMessageToolCallSchema).optional(),
2967
3004
  /**
2968
3005
  * Phase announcements the model emitted via Copilot's `report_intent`
2969
3006
  * tool during this turn. Each entry carries the intent label and an
@@ -2974,10 +3011,10 @@ var ChatMessageSchema = z16.object({
2974
3011
  * replay and history export are unaffected. Copilot-only; other
2975
3012
  * providers don't emit these.
2976
3013
  */
2977
- intents: z16.array(
2978
- z16.object({
2979
- label: z16.string(),
2980
- afterChars: z16.number().int().min(0)
3014
+ intents: z17.array(
3015
+ z17.object({
3016
+ label: z17.string(),
3017
+ afterChars: z17.number().int().min(0)
2981
3018
  })
2982
3019
  ).optional(),
2983
3020
  /**
@@ -2987,7 +3024,7 @@ var ChatMessageSchema = z16.object({
2987
3024
  * itself lives in the per-project questions file; this id is just
2988
3025
  * the foreign key.
2989
3026
  */
2990
- pendingQuestionId: z16.string().optional(),
3027
+ pendingQuestionId: z17.string().optional(),
2991
3028
  /**
2992
3029
  * Marks the message as a system-generated synthesis rather than a real
2993
3030
  * model turn.
@@ -3016,7 +3053,7 @@ var ChatMessageSchema = z16.object({
3016
3053
  * UI renders these as muted bubbles; the model sees them as normal
3017
3054
  * assistant turns (the role label is what matters to the API).
3018
3055
  */
3019
- synthetic: z16.enum([
3056
+ synthetic: z17.enum([
3020
3057
  "compaction-summary",
3021
3058
  "context-loop-halt",
3022
3059
  "turn-aborted",
@@ -3034,7 +3071,7 @@ var ChatMessageSchema = z16.object({
3034
3071
  * from loaded transcripts and the live-timeline handler skips its bubble
3035
3072
  * while still opening the assistant's streaming slot.
3036
3073
  */
3037
- hidden: z16.boolean().optional(),
3074
+ hidden: z17.boolean().optional(),
3038
3075
  /**
3039
3076
  * This user message was delivered from the session's mid-turn queue
3040
3077
  * as a nudge — typed while the previous turn was still streaming and
@@ -3042,7 +3079,7 @@ var ChatMessageSchema = z16.object({
3042
3079
  * Display-only marker: the model sees a normal user turn; the UI
3043
3080
  * renders a small "nudged" chip on the bubble.
3044
3081
  */
3045
- nudge: z16.boolean().optional(),
3082
+ nudge: z17.boolean().optional(),
3046
3083
  /**
3047
3084
  * Persistent warnings attached to this assistant turn — fabricated
3048
3085
  * tool-use detection, degraded provider state, etc. The streaming
@@ -3052,7 +3089,7 @@ var ChatMessageSchema = z16.object({
3052
3089
  * reload. Populated by the chat manager just before `events.publish`
3053
3090
  * fires the `complete` event.
3054
3091
  */
3055
- warnings: z16.array(z16.string()).optional(),
3092
+ warnings: z17.array(z17.string()).optional(),
3056
3093
  /**
3057
3094
  * Chain-of-thought captured during this turn. Local providers
3058
3095
  * (ollama, llama-cpp, mlx, ds4) extract `<think>…</think>` /
@@ -3065,14 +3102,14 @@ var ChatMessageSchema = z16.object({
3065
3102
  * Responses hides reasoning server-side and leaves this unset.
3066
3103
  * Empty / whitespace-only captures are dropped.
3067
3104
  */
3068
- reasoning: z16.string().optional(),
3105
+ reasoning: z17.string().optional(),
3069
3106
  /**
3070
3107
  * Observed wall-clock span of the streamed private-reasoning trace,
3071
3108
  * measured from the first `reasoning_delta` to the last. Optional
3072
3109
  * because older messages and providers that only expose reasoning at
3073
3110
  * commit time have no trustworthy phase timing.
3074
3111
  */
3075
- reasoningDurationMs: z16.number().int().nonnegative().optional(),
3112
+ reasoningDurationMs: z17.number().int().nonnegative().optional(),
3076
3113
  /**
3077
3114
  * Tool-call bodies the model emitted that the salvage layer
3078
3115
  * couldn't parse — the literal text from `<|tool_call|>` markers
@@ -3087,10 +3124,10 @@ var ChatMessageSchema = z16.object({
3087
3124
  * hundred chars per body in the populator so a long fabricated body
3088
3125
  * doesn't blow up the session file.
3089
3126
  */
3090
- attemptedToolCalls: z16.array(
3091
- z16.object({
3092
- body: z16.string(),
3093
- reason: z16.string().optional()
3127
+ attemptedToolCalls: z17.array(
3128
+ z17.object({
3129
+ body: z17.string(),
3130
+ reason: z17.string().optional()
3094
3131
  })
3095
3132
  ).optional(),
3096
3133
  /**
@@ -3106,28 +3143,28 @@ var ChatMessageSchema = z16.object({
3106
3143
  * daemon restart, a provider reset, or a context-pressure rebuild — leaving
3107
3144
  * the model replaying a bare `![](attachments/9f3.png)`.
3108
3145
  */
3109
- recognizedImages: z16.array(MessageImageDigestSchema).optional()
3146
+ recognizedImages: z17.array(MessageImageDigestSchema).optional()
3110
3147
  });
3111
- var ChatTurnErrorDetailSchema = z16.object({
3112
- code: z16.string().max(64).optional(),
3148
+ var ChatTurnErrorDetailSchema = z17.object({
3149
+ code: z17.string().max(64).optional(),
3113
3150
  /** Component that failed — a provider name (`llama-cpp`) or a subsystem. */
3114
- engine: z16.string().max(64).optional(),
3151
+ engine: z17.string().max(64).optional(),
3115
3152
  /** Correlation key, also written into the engine's own incident log. */
3116
- incidentId: z16.string().max(64).optional(),
3153
+ incidentId: z17.string().max(64).optional(),
3117
3154
  /** Native crash class from the exit snapshot, e.g. `cuda-out-of-memory`. */
3118
- panicKind: z16.string().max(64).optional(),
3119
- exitCode: z16.number().int().nullable().optional(),
3120
- signal: z16.string().max(32).nullable().optional(),
3155
+ panicKind: z17.string().max(64).optional(),
3156
+ exitCode: z17.number().int().nullable().optional(),
3157
+ signal: z17.string().max(32).nullable().optional(),
3121
3158
  /**
3122
3159
  * Request-independent launch facts copied from the crash snapshot, which
3123
3160
  * is contractually free of prompts, tool arguments, and secrets. Bounded
3124
3161
  * by the extractor. A machine profile cannot reconstruct which model at
3125
3162
  * which context size with which KV type crashed; this can.
3126
3163
  */
3127
- diagnostics: z16.record(z16.string(), z16.union([z16.string(), z16.number(), z16.boolean()])).optional()
3164
+ diagnostics: z17.record(z17.string(), z17.union([z17.string(), z17.number(), z17.boolean()])).optional()
3128
3165
  });
3129
- var ChatEventSchema = z16.discriminatedUnion("type", [
3130
- z16.object({ type: z16.literal("delta"), content: z16.string() }),
3166
+ var ChatEventSchema = z17.discriminatedUnion("type", [
3167
+ z17.object({ type: z17.literal("delta"), content: z17.string() }),
3131
3168
  /**
3132
3169
  * Live private-reasoning tokens (ds4's think phase), streamed on their
3133
3170
  * own channel so they never mix into the visible `delta` stream, the
@@ -3135,8 +3172,8 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3135
3172
  * renders them as a distinct "thinking" block that collapses into the
3136
3173
  * committed message's reasoning expander once `complete` lands.
3137
3174
  */
3138
- z16.object({ type: z16.literal("reasoning_delta"), content: z16.string() }),
3139
- z16.object({ type: z16.literal("complete"), message: ChatMessageSchema }),
3175
+ z17.object({ type: z17.literal("reasoning_delta"), content: z17.string() }),
3176
+ z17.object({ type: z17.literal("complete"), message: ChatMessageSchema }),
3140
3177
  /**
3141
3178
  * Emitted right after the user's message is appended to the session
3142
3179
  * record. The legacy session-scoped UI inserted user messages locally
@@ -3144,27 +3181,27 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3144
3181
  * envelope streams need it so the interleaved timeline can render the
3145
3182
  * user's bubble immediately, before any assistant deltas.
3146
3183
  */
3147
- z16.object({ type: z16.literal("user_message"), message: ChatMessageSchema }),
3184
+ z17.object({ type: z17.literal("user_message"), message: ChatMessageSchema }),
3148
3185
  /**
3149
3186
  * Emitted when the assistant invokes an MCP tool (OpenAI + Mock paths
3150
3187
  * only — Copilot runs tools inside its subprocess, invisible to us).
3151
3188
  * The UI surfaces these as "thinking" breadcrumbs.
3152
3189
  */
3153
- z16.object({
3154
- type: z16.literal("tool"),
3155
- name: z16.string(),
3156
- durationMs: z16.number(),
3157
- success: z16.boolean(),
3158
- errorMessage: z16.string().optional(),
3190
+ z17.object({
3191
+ type: z17.literal("tool"),
3192
+ name: z17.string(),
3193
+ durationMs: z17.number(),
3194
+ success: z17.boolean(),
3195
+ errorMessage: z17.string().optional(),
3159
3196
  /**
3160
3197
  * File path the tool touched (if any). Set for tools that take a `path`
3161
3198
  * argument: readFile, writeFile, read_artifact, write_artifact,
3162
3199
  * read_document, write_document. Lets the UI build a References panel
3163
3200
  * without guessing.
3164
3201
  */
3165
- path: z16.string().optional(),
3202
+ path: z17.string().optional(),
3166
3203
  /** Ordered file paths touched by a batched filesystem tool. */
3167
- paths: z16.array(z16.string()).optional(),
3204
+ paths: z17.array(z17.string()).optional(),
3168
3205
  /**
3169
3206
  * Compact human-readable preview of the non-bulky arguments. Example:
3170
3207
  * `gezel: "Maya", message: "what's the status of..."`. Values are
@@ -3172,44 +3209,44 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3172
3209
  * UI to render a useful in-progress tool line instead of just the
3173
3210
  * tool name.
3174
3211
  */
3175
- argsSummary: z16.string().optional(),
3212
+ argsSummary: z17.string().optional(),
3176
3213
  /** Full, readable args for the expand + copy affordance. See the persisted `ChatMessageToolCall.argsFull`. */
3177
- argsFull: z16.string().optional(),
3214
+ argsFull: z17.string().optional(),
3178
3215
  /** Short full response, or a bounded beginning/end summary. */
3179
- resultText: z16.string().optional(),
3216
+ resultText: z17.string().optional(),
3180
3217
  /** True when `resultText` is a bounded summary rather than the complete response. */
3181
- resultTruncated: z16.boolean().optional(),
3218
+ resultTruncated: z17.boolean().optional(),
3182
3219
  /**
3183
3220
  * Image artifacts the tool returned (most commonly browser screenshots).
3184
3221
  * Paths are relative to the project's artifacts/ root and resolved
3185
3222
  * to URLs by the UI via the artifact-read endpoint.
3186
3223
  */
3187
- images: z16.array(ToolCallImageSchema).optional(),
3224
+ images: z17.array(ToolCallImageSchema).optional(),
3188
3225
  /**
3189
3226
  * Audio artifacts the tool returned (synthesize_speech narrations,
3190
3227
  * voice memos transcribed via transcribe_audio). Same artifact-path
3191
3228
  * resolution as `images`.
3192
3229
  */
3193
- audios: z16.array(ToolCallAudioSchema).optional(),
3230
+ audios: z17.array(ToolCallAudioSchema).optional(),
3194
3231
  /**
3195
3232
  * Video artifacts the tool returned (`generate_video`). Same
3196
3233
  * artifact-path resolution as `images`; rendered as a `<video>`
3197
3234
  * player in the chat row.
3198
3235
  */
3199
- videos: z16.array(ToolCallVideoSchema).optional(),
3236
+ videos: z17.array(ToolCallVideoSchema).optional(),
3200
3237
  /**
3201
3238
  * Unified diff describing the change a surgical-edit tool made
3202
3239
  * (`replace_in_file`, `apply_patch`, `insert_at_marker`). Streams to the
3203
3240
  * UI mid-turn so the chat bubble can render an inline diff under
3204
3241
  * the tool-call row even before the assistant message is finalized.
3205
3242
  */
3206
- diff: z16.string().optional(),
3207
- addedLines: z16.number().int().nonnegative().optional(),
3208
- removedLines: z16.number().int().nonnegative().optional()
3243
+ diff: z17.string().optional(),
3244
+ addedLines: z17.number().int().nonnegative().optional(),
3245
+ removedLines: z17.number().int().nonnegative().optional()
3209
3246
  }),
3210
- z16.object({
3211
- type: z16.literal("error"),
3212
- error: z16.string(),
3247
+ z17.object({
3248
+ type: z17.literal("error"),
3249
+ error: z17.string(),
3213
3250
  // Not `detail` — three sibling variants in this union already use that
3214
3251
  // name for free-form progress prose, and one union with two meanings for
3215
3252
  // one key is a trap.
@@ -3220,8 +3257,8 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3220
3257
  * surface. This is terminal for the live UI, but is deliberately not an
3221
3258
  * error: it must not poison the session or render failure recovery UI.
3222
3259
  */
3223
- z16.object({ type: z16.literal("cancelled") }),
3224
- z16.object({ type: z16.literal("done") }),
3260
+ z17.object({ type: z17.literal("cancelled") }),
3261
+ z17.object({ type: z17.literal("done") }),
3225
3262
  /**
3226
3263
  * Emitted when a turn ends up waiting in the provider queue for more
3227
3264
  * than a brief grace period (~200ms). `aheadOf` is an approximate
@@ -3231,7 +3268,7 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3231
3268
  * emit this event — avoids flashing the indicator on the happy path
3232
3269
  * where the queue is empty.
3233
3270
  */
3234
- z16.object({ type: z16.literal("queued"), aheadOf: z16.number().int().min(0) }),
3271
+ z17.object({ type: z17.literal("queued"), aheadOf: z17.number().int().min(0) }),
3235
3272
  /**
3236
3273
  * Ollama-only: emitted for each bare framing chunk that arrives
3237
3274
  * on the wire without visible content / tool_calls — the
@@ -3241,7 +3278,7 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3241
3278
  * when the model isn't producing visible output. Reset on the
3242
3279
  * next real `delta`, `tool`, or `complete`.
3243
3280
  */
3244
- z16.object({ type: z16.literal("wire_pulse") }),
3281
+ z17.object({ type: z17.literal("wire_pulse") }),
3245
3282
  /**
3246
3283
  * Live tool-argument stream. Fired while the model is generating a
3247
3284
  * structured tool call — most visibly a multi-minute `write_file`
@@ -3253,7 +3290,7 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3253
3290
  * "working" block (same pattern as `reasoning_delta`) and drops the
3254
3291
  * block when the corresponding `tool` event lands.
3255
3292
  */
3256
- z16.object({ type: z16.literal("tool_args_delta"), name: z16.string(), content: z16.string() }),
3293
+ z17.object({ type: z17.literal("tool_args_delta"), name: z17.string(), content: z17.string() }),
3257
3294
  /**
3258
3295
  * Emitted when a provider tells us it's still doing work — even though
3259
3296
  * no visible text/tool event has arrived. Today this is wired from
@@ -3264,24 +3301,24 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3264
3301
  * Optional `label` carries a short phase hint ('thinking', 'tool',
3265
3302
  * etc.) that the streaming bubble can surface as a status line.
3266
3303
  */
3267
- z16.object({ type: z16.literal("heartbeat"), label: z16.string().optional() }),
3304
+ z17.object({ type: z17.literal("heartbeat"), label: z17.string().optional() }),
3268
3305
  /**
3269
3306
  * Provider-side warning surfaced mid-turn (e.g. Copilot rate-limit,
3270
3307
  * context pressure, degraded mode). The UI renders these inline on
3271
3308
  * the streaming bubble so the user sees them immediately instead of
3272
3309
  * only finding out when the turn completes or times out.
3273
3310
  */
3274
- z16.object({
3275
- type: z16.literal("warning"),
3276
- message: z16.string(),
3311
+ z17.object({
3312
+ type: z17.literal("warning"),
3313
+ message: z17.string(),
3277
3314
  /**
3278
3315
  * Optional in-app destination for a warning's inline action. Kept
3279
3316
  * deliberately narrow: warnings are still readable prose when an older
3280
3317
  * client ignores this additive field.
3281
3318
  */
3282
- action: z16.object({
3283
- kind: z16.literal("settings"),
3284
- section: z16.enum(["llamaCpp", "mlx", "ds4"])
3319
+ action: z17.object({
3320
+ kind: z17.literal("settings"),
3321
+ section: z17.enum(["llamaCpp", "mlx", "ds4"])
3285
3322
  }).optional()
3286
3323
  }),
3287
3324
  /**
@@ -3292,18 +3329,18 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3292
3329
  * offset on the final assistant message so completed bubbles render
3293
3330
  * the same segmentation on reload.
3294
3331
  */
3295
- z16.object({ type: z16.literal("intent"), label: z16.string() }),
3332
+ z17.object({ type: z17.literal("intent"), label: z17.string() }),
3296
3333
  /**
3297
3334
  * Emitted when a new message is enqueued on the per-session queue
3298
3335
  * because the session already has a turn in flight. The timeline
3299
3336
  * renders a "ghost bubble" under the session's streaming bubble
3300
3337
  * showing the queued text preview. Cleared via `queue_removed`.
3301
3338
  */
3302
- z16.object({
3303
- type: z16.literal("queue_enqueued"),
3304
- queueId: z16.string(),
3305
- preview: z16.string(),
3306
- enqueuedAt: z16.string(),
3339
+ z17.object({
3340
+ type: z17.literal("queue_enqueued"),
3341
+ queueId: z17.string(),
3342
+ preview: z17.string(),
3343
+ enqueuedAt: z17.string(),
3307
3344
  /**
3308
3345
  * The entry was queued as a mid-turn nudge — the ghost bubble labels
3309
3346
  * it "nudge" and contiguous nudges merge into one turn on drain.
@@ -3311,7 +3348,7 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3311
3348
  * every coalesce/edit); the edit affordance fetches it lazily via
3312
3349
  * `GET /api/sessions/:id/queue`.
3313
3350
  */
3314
- nudge: z16.boolean().optional()
3351
+ nudge: z17.boolean().optional()
3315
3352
  }),
3316
3353
  /**
3317
3354
  * Emitted when a queued entry leaves the queue — either because
@@ -3320,10 +3357,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3320
3357
  * dropped without running (`reason: 'canceled'` via user action,
3321
3358
  * `reason: 'rejected'` via session archive / delete / shutdown).
3322
3359
  */
3323
- z16.object({
3324
- type: z16.literal("queue_removed"),
3325
- queueId: z16.string(),
3326
- reason: z16.enum(["started", "canceled", "rejected"])
3360
+ z17.object({
3361
+ type: z17.literal("queue_removed"),
3362
+ queueId: z17.string(),
3363
+ reason: z17.enum(["started", "canceled", "rejected"])
3327
3364
  }),
3328
3365
  /**
3329
3366
  * Local-provider context policy: emitted when accumulated conversation
@@ -3331,11 +3368,11 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3331
3368
  * The UI may suggest starting fresh because this event is never emitted
3332
3369
  * for a first-turn standing system/tool prefix.
3333
3370
  */
3334
- z16.object({
3335
- type: z16.literal("context_warning"),
3336
- estimatedTokens: z16.number(),
3337
- numCtx: z16.number(),
3338
- model: z16.string()
3371
+ z17.object({
3372
+ type: z17.literal("context_warning"),
3373
+ estimatedTokens: z17.number(),
3374
+ numCtx: z17.number(),
3375
+ model: z17.string()
3339
3376
  }),
3340
3377
  /**
3341
3378
  * Local-provider context policy: emitted right after in-flight compaction collapses
@@ -3344,10 +3381,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3344
3381
  * for a "compacted" variant and refreshes the visible timeline (older
3345
3382
  * bubbles are now gone from disk).
3346
3383
  */
3347
- z16.object({
3348
- type: z16.literal("context_compacted"),
3349
- removedCount: z16.number().int().nonnegative(),
3350
- model: z16.string()
3384
+ z17.object({
3385
+ type: z17.literal("context_compacted"),
3386
+ removedCount: z17.number().int().nonnegative(),
3387
+ model: z17.string()
3351
3388
  }),
3352
3389
  /**
3353
3390
  * Emitted when the chat manager detects a self-chat / compaction loop —
@@ -3356,10 +3393,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3356
3393
  * compaction cycle without making progress. The pipeline halts the turn
3357
3394
  * so the user can intervene; the UI surfaces a "looks stuck" banner.
3358
3395
  */
3359
- z16.object({
3360
- type: z16.literal("context_loop"),
3361
- compactionsThisSend: z16.number().int().positive(),
3362
- reason: z16.string()
3396
+ z17.object({
3397
+ type: z17.literal("context_loop"),
3398
+ compactionsThisSend: z17.number().int().positive(),
3399
+ reason: z17.string()
3363
3400
  }),
3364
3401
  /**
3365
3402
  * Emitted when the Keurmeester (frontier quality inspector) steps in
@@ -3367,23 +3404,23 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3367
3404
  * UI renders a "stepped in" notice on the thread; the full case
3368
3405
  * record lives under `~/.gezel/keurmeester/cases/` keyed by caseId.
3369
3406
  */
3370
- z16.object({
3371
- type: z16.literal("keurmeester_intervention"),
3372
- caseId: z16.string(),
3373
- gezelId: z16.string(),
3374
- gezelName: z16.string(),
3375
- action: z16.string(),
3376
- summary: z16.string()
3407
+ z17.object({
3408
+ type: z17.literal("keurmeester_intervention"),
3409
+ caseId: z17.string(),
3410
+ gezelId: z17.string(),
3411
+ gezelName: z17.string(),
3412
+ action: z17.string(),
3413
+ summary: z17.string()
3377
3414
  }),
3378
3415
  /**
3379
3416
  * Emitted once per session the first time auto-recall runs, so the UI
3380
3417
  * can render a "pulled N memories from prior work" chip above the first
3381
3418
  * assistant reply.
3382
3419
  */
3383
- z16.object({
3384
- type: z16.literal("recall_applied"),
3385
- hitCount: z16.number(),
3386
- query: z16.string()
3420
+ z17.object({
3421
+ type: z17.literal("recall_applied"),
3422
+ hitCount: z17.number(),
3423
+ query: z17.string()
3387
3424
  }),
3388
3425
  /**
3389
3426
  * Emitted when a gezel posts a structured question via the
@@ -3391,14 +3428,14 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3391
3428
  * questions on this event so the in-chat card, Home pane, and Home
3392
3429
  * tab badge all light up together.
3393
3430
  */
3394
- z16.object({ type: z16.literal("question_asked"), question: QuestionSchema }),
3431
+ z17.object({ type: z17.literal("question_asked"), question: QuestionSchema }),
3395
3432
  /**
3396
3433
  * Emitted when the user submits (or declines) an answer. The UI
3397
3434
  * uses the same fan-out as `question_asked` to refresh every
3398
3435
  * surface; the chat bubble's pending card collapses to its
3399
3436
  * answered state.
3400
3437
  */
3401
- z16.object({ type: z16.literal("question_answered"), question: QuestionSchema }),
3438
+ z17.object({ type: z17.literal("question_answered"), question: QuestionSchema }),
3402
3439
  /**
3403
3440
  * A durable task audit event, fanned onto the project's live stream after
3404
3441
  * it has been appended to History. This keeps lightweight clients (most
@@ -3406,24 +3443,24 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3406
3443
  * second task lifecycle bus. `task.tick` heartbeats are intentionally not
3407
3444
  * published; this channel is for user-meaningful changes.
3408
3445
  */
3409
- z16.object({
3410
- type: z16.literal("task_event"),
3411
- eventId: z16.string(),
3412
- kind: z16.string(),
3413
- summary: z16.string(),
3414
- at: z16.string(),
3415
- taskRef: z16.string().optional()
3446
+ z17.object({
3447
+ type: z17.literal("task_event"),
3448
+ eventId: z17.string(),
3449
+ kind: z17.string(),
3450
+ summary: z17.string(),
3451
+ at: z17.string(),
3452
+ taskRef: z17.string().optional()
3416
3453
  }),
3417
3454
  /**
3418
3455
  * Emitted when a gezel crosses a growth level threshold and a pending
3419
3456
  * level-up is created. The UI refreshes growth badges/dots and raises
3420
3457
  * a single calm OS notification when the window is hidden.
3421
3458
  */
3422
- z16.object({
3423
- type: z16.literal("growth_level_up"),
3424
- gezelId: z16.string(),
3425
- gezelName: z16.string(),
3426
- toLevel: z16.number().int()
3459
+ z17.object({
3460
+ type: z17.literal("growth_level_up"),
3461
+ gezelId: z17.string(),
3462
+ gezelName: z17.string(),
3463
+ toLevel: z17.number().int()
3427
3464
  }),
3428
3465
  /**
3429
3466
  * llama-cpp-only: lifecycle phase of the supervised on-device engine
@@ -3446,13 +3483,13 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3446
3483
  * the phase label so users who want to know what's happening can
3447
3484
  * see, without cluttering the happy-path status line.
3448
3485
  */
3449
- z16.object({
3450
- type: z16.literal("engine_phase"),
3451
- provider: z16.enum(["llama-cpp", "mlx", "ds4"]),
3452
- phase: z16.enum(["starting", "loading_model", "prefill", "generating", "ready"]),
3453
- detail: z16.string().optional(),
3454
- progress: z16.number().min(0).max(1).optional(),
3455
- ttftMs: z16.number().int().nonnegative().optional()
3486
+ z17.object({
3487
+ type: z17.literal("engine_phase"),
3488
+ provider: z17.enum(["llama-cpp", "mlx", "ds4"]),
3489
+ phase: z17.enum(["starting", "loading_model", "prefill", "generating", "ready"]),
3490
+ detail: z17.string().optional(),
3491
+ progress: z17.number().min(0).max(1).optional(),
3492
+ ttftMs: z17.number().int().nonnegative().optional()
3456
3493
  }),
3457
3494
  /**
3458
3495
  * Per-turn telemetry for locally-hosted providers (llama-cpp +
@@ -3467,14 +3504,14 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3467
3504
  * local speed metric isn't meaningful when the latency is
3468
3505
  * dominated by network round-trips.
3469
3506
  */
3470
- z16.object({
3471
- type: z16.literal("turn_stats"),
3472
- provider: z16.enum(["llama-cpp", "ollama", "mlx", "ds4"]),
3473
- promptTokens: z16.number().int().nonnegative(),
3474
- completionTokens: z16.number().int().nonnegative(),
3475
- durationMs: z16.number().int().nonnegative(),
3507
+ z17.object({
3508
+ type: z17.literal("turn_stats"),
3509
+ provider: z17.enum(["llama-cpp", "ollama", "mlx", "ds4"]),
3510
+ promptTokens: z17.number().int().nonnegative(),
3511
+ completionTokens: z17.number().int().nonnegative(),
3512
+ durationMs: z17.number().int().nonnegative(),
3476
3513
  /** Generation speed in tokens/sec — completionTokens / generationSeconds. */
3477
- tokensPerSec: z16.number().nonnegative().optional()
3514
+ tokensPerSec: z17.number().nonnegative().optional()
3478
3515
  }),
3479
3516
  /**
3480
3517
  * Static engine-level metrics that don't change during a session —
@@ -3486,11 +3523,11 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3486
3523
  * `engine_phase` (every session waiting on the same supervisor
3487
3524
  * startup gets a copy).
3488
3525
  */
3489
- z16.object({
3490
- type: z16.literal("engine_stats"),
3491
- provider: z16.enum(["llama-cpp", "mlx", "ds4"]),
3526
+ z17.object({
3527
+ type: z17.literal("engine_stats"),
3528
+ provider: z17.enum(["llama-cpp", "mlx", "ds4"]),
3492
3529
  /** Total bytes allocated across all GGUF buffers + KV cache. */
3493
- ramAllocBytes: z16.number().nonnegative()
3530
+ ramAllocBytes: z17.number().nonnegative()
3494
3531
  }),
3495
3532
  /**
3496
3533
  * VRAM tenancy change — a non-LLM workload has taken (or released)
@@ -3520,9 +3557,9 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3520
3557
  * `step`/`totalSteps` drive a real progress bar; `secondsPerStep`
3521
3558
  * lets the UI show an ETA.
3522
3559
  */
3523
- z16.object({
3524
- type: z16.literal("gpu_swap"),
3525
- state: z16.enum(["started", "progress", "ended"]),
3560
+ z17.object({
3561
+ type: z17.literal("gpu_swap"),
3562
+ state: z17.enum(["started", "progress", "ended"]),
3526
3563
  /**
3527
3564
  * Shared with session telemetry so a new workload can't light up the
3528
3565
  * bubble while staying invisible to stall detection.
@@ -3535,12 +3572,12 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3535
3572
  * seconds", which reads as a bug.
3536
3573
  */
3537
3574
  task: SessionGpuTaskSchema,
3538
- detail: z16.string().optional(),
3539
- prompt: z16.string().optional(),
3540
- progress: z16.number().min(0).max(1).optional(),
3541
- step: z16.number().int().nonnegative().optional(),
3542
- totalSteps: z16.number().int().positive().optional(),
3543
- secondsPerStep: z16.number().nonnegative().optional()
3575
+ detail: z17.string().optional(),
3576
+ prompt: z17.string().optional(),
3577
+ progress: z17.number().min(0).max(1).optional(),
3578
+ step: z17.number().int().nonnegative().optional(),
3579
+ totalSteps: z17.number().int().positive().optional(),
3580
+ secondsPerStep: z17.number().nonnegative().optional()
3544
3581
  }),
3545
3582
  /**
3546
3583
  * The turn is parked inside a synchronous `ask_gezel` /
@@ -3563,10 +3600,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3563
3600
  * side, same as the `ask_gezel` tool result), so the UI can render
3564
3601
  * it verbatim.
3565
3602
  */
3566
- z16.object({
3567
- type: z16.literal("awaiting_gezel"),
3568
- state: z16.enum(["started", "ended"]),
3569
- targetGezelName: z16.string()
3603
+ z17.object({
3604
+ type: z17.literal("awaiting_gezel"),
3605
+ state: z17.enum(["started", "ended"]),
3606
+ targetGezelName: z17.string()
3570
3607
  }),
3571
3608
  /**
3572
3609
  * A new project was created (via the New Project dialog, the
@@ -3577,10 +3614,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3577
3614
  * for the next manual refresh / tab-focus poll. Not a renderable
3578
3615
  * timeline event (like `growth_level_up`); the chat surfaces ignore it.
3579
3616
  */
3580
- z16.object({
3581
- type: z16.literal("project_created"),
3582
- projectId: z16.string(),
3583
- name: z16.string()
3617
+ z17.object({
3618
+ type: z17.literal("project_created"),
3619
+ projectId: z17.string(),
3620
+ name: z17.string()
3584
3621
  }),
3585
3622
  /**
3586
3623
  * A project was deleted (via the Project Actions menu, or an equivalent
@@ -3590,10 +3627,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3590
3627
  * waiting for the next manual refresh / tab-focus poll. Not a renderable
3591
3628
  * timeline event; the chat surfaces ignore it.
3592
3629
  */
3593
- z16.object({
3594
- type: z16.literal("project_deleted"),
3595
- projectId: z16.string(),
3596
- name: z16.string()
3630
+ z17.object({
3631
+ type: z17.literal("project_deleted"),
3632
+ projectId: z17.string(),
3633
+ name: z17.string()
3597
3634
  }),
3598
3635
  /**
3599
3636
  * A new shared gezel joined the global roster. Emitted on the global
@@ -3602,10 +3639,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3602
3639
  * gezels deliberately do not emit this event because they do not belong in
3603
3640
  * the global Gezellen list.
3604
3641
  */
3605
- z16.object({
3606
- type: z16.literal("gezel_created"),
3607
- gezelId: z16.string(),
3608
- name: z16.string()
3642
+ z17.object({
3643
+ type: z17.literal("gezel_created"),
3644
+ gezelId: z17.string(),
3645
+ name: z17.string()
3609
3646
  }),
3610
3647
  /**
3611
3648
  * Global (project-less) signal that Night Shift mode flipped ON/OFF.
@@ -3613,10 +3650,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3613
3650
  * menu pill reflects the live state. `source` is the active driver
3614
3651
  * (scheduled window vs. a manual shift), null when inactive.
3615
3652
  */
3616
- z16.object({
3617
- type: z16.literal("night_shift"),
3618
- active: z16.boolean(),
3619
- source: z16.enum(["scheduled", "manual"]).nullable()
3653
+ z17.object({
3654
+ type: z17.literal("night_shift"),
3655
+ active: z17.boolean(),
3656
+ source: z17.enum(["scheduled", "manual"]).nullable()
3620
3657
  }),
3621
3658
  /**
3622
3659
  * Global signal from the meester status generator. `started` fires
@@ -3625,10 +3662,10 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3625
3662
  * produced nothing usable — the Home greeting refetches on the
3626
3663
  * terminal states instead of polling.
3627
3664
  */
3628
- z16.object({
3629
- type: z16.literal("meester_status"),
3630
- state: z16.enum(["started", "ended", "failed"]),
3631
- generatedAt: z16.string().optional()
3665
+ z17.object({
3666
+ type: z17.literal("meester_status"),
3667
+ state: z17.enum(["started", "ended", "failed"]),
3668
+ generatedAt: z17.string().optional()
3632
3669
  }),
3633
3670
  /**
3634
3671
  * Global (history-free) heartbeat from the boekwachter indexing loops —
@@ -3636,23 +3673,23 @@ var ChatEventSchema = z16.discriminatedUnion("type", [
3636
3673
  * indicator pill; complements (doesn't replace) the polled per-project
3637
3674
  * index status. `pending` = files still awaiting AI enrichment when known.
3638
3675
  */
3639
- z16.object({
3640
- type: z16.literal("index_progress"),
3641
- phase: z16.enum(["scan", "shadow", "enrich", "review", "digest"]),
3642
- state: z16.enum(["started", "progress", "ended"]),
3643
- projectId: z16.string().optional(),
3644
- detail: z16.string().optional(),
3645
- pending: z16.number().int().nonnegative().optional(),
3676
+ z17.object({
3677
+ type: z17.literal("index_progress"),
3678
+ phase: z17.enum(["scan", "shadow", "enrich", "review", "digest"]),
3679
+ state: z17.enum(["started", "progress", "ended"]),
3680
+ projectId: z17.string().optional(),
3681
+ detail: z17.string().optional(),
3682
+ pending: z17.number().int().nonnegative().optional(),
3646
3683
  /** The concrete autonomous gezel doing this work, when the project has one. */
3647
- gezelId: z16.string().optional(),
3684
+ gezelId: z17.string().optional(),
3648
3685
  /** Snapshot of their display name so transient progress remains human-readable. */
3649
- gezelName: z16.string().optional()
3686
+ gezelName: z17.string().optional()
3650
3687
  })
3651
3688
  ]);
3652
- var ChatEventEnvelopeSchema = z16.object({
3653
- sessionId: z16.string(),
3654
- gezelId: z16.string(),
3655
- projectId: z16.string(),
3689
+ var ChatEventEnvelopeSchema = z17.object({
3690
+ sessionId: z17.string(),
3691
+ gezelId: z17.string(),
3692
+ projectId: z17.string(),
3656
3693
  event: ChatEventSchema
3657
3694
  });
3658
3695
 
@@ -3783,8 +3820,8 @@ function promoteBareChannelNames(text) {
3783
3820
  }
3784
3821
 
3785
3822
  // src/schemas/report-action.ts
3786
- import { z as z17 } from "zod";
3787
- var ReportActionKindSchema = z17.enum(["fire-craftbook", "create-task", "apply-edits"]);
3823
+ import { z as z18 } from "zod";
3824
+ var ReportActionKindSchema = z18.enum(["fire-craftbook", "create-task", "apply-edits"]);
3788
3825
  var commonFields = {
3789
3826
  /**
3790
3827
  * Author-supplied stable slug — keeps lifecycle state attached across
@@ -3792,121 +3829,121 @@ var commonFields = {
3792
3829
  * content hash (`a-<hash>`), which is stable only while the block's
3793
3830
  * body is byte-identical.
3794
3831
  */
3795
- id: z17.string().regex(/^[a-z0-9][a-z0-9_-]*$/i).optional(),
3832
+ id: z18.string().regex(/^[a-z0-9][a-z0-9_-]*$/i).optional(),
3796
3833
  /** Short human label for the card ("Fix the unchecked null in parser.ts"). */
3797
- title: z17.string().min(1),
3834
+ title: z18.string().min(1),
3798
3835
  /** One-or-two-sentence rationale shown under the title. */
3799
- reason: z17.string().optional(),
3836
+ reason: z18.string().optional(),
3800
3837
  /**
3801
3838
  * Target project. Defaults to the report's own project. Cross-project
3802
3839
  * targets are a primary case — the bundled oversight report lives in
3803
3840
  * `default` but recommends work in specific projects.
3804
3841
  */
3805
- projectId: z17.string().optional()
3842
+ projectId: z18.string().optional()
3806
3843
  };
3807
- var FireCraftbookActionSchema = z17.object({
3808
- kind: z17.literal("fire-craftbook"),
3844
+ var FireCraftbookActionSchema = z18.object({
3845
+ kind: z18.literal("fire-craftbook"),
3809
3846
  ...commonFields,
3810
- craftbookId: z17.string().min(1),
3847
+ craftbookId: z18.string().min(1),
3811
3848
  /** Invocation params for the craftbook's paramSchema (stringified values). */
3812
- params: z17.record(z17.string(), z17.string()).optional()
3849
+ params: z18.record(z18.string(), z18.string()).optional()
3813
3850
  });
3814
- var CreateTaskActionSchema = z17.object({
3815
- kind: z17.literal("create-task"),
3851
+ var CreateTaskActionSchema = z18.object({
3852
+ kind: z18.literal("create-task"),
3816
3853
  ...commonFields,
3817
3854
  /** Full work instruction for the bespoke task's single step. */
3818
- prompt: z17.string().min(1),
3855
+ prompt: z18.string().min(1),
3819
3856
  /** Role to recruit for the work (ensure_gezel jobTitle). Default: software developer. */
3820
- role: z17.string().optional()
3857
+ role: z18.string().optional()
3821
3858
  });
3822
- var ApplyEditsActionSchema = z17.object({
3823
- kind: z17.literal("apply-edits"),
3859
+ var ApplyEditsActionSchema = z18.object({
3860
+ kind: z18.literal("apply-edits"),
3824
3861
  ...commonFields,
3825
- edits: z17.array(
3826
- z17.object({
3862
+ edits: z18.array(
3863
+ z18.object({
3827
3864
  /** Workspace-relative target file in the TARGET project. */
3828
- path: z17.string().min(1),
3865
+ path: z18.string().min(1),
3829
3866
  /** Artifacts-relative sidecar `.diff` path in the REPORT's project. */
3830
- diffArtifact: z17.string().min(1)
3867
+ diffArtifact: z18.string().min(1)
3831
3868
  })
3832
3869
  ).min(1)
3833
3870
  });
3834
- var ReportActionSchema = z17.discriminatedUnion("kind", [
3871
+ var ReportActionSchema = z18.discriminatedUnion("kind", [
3835
3872
  FireCraftbookActionSchema,
3836
3873
  CreateTaskActionSchema,
3837
3874
  ApplyEditsActionSchema
3838
3875
  ]);
3839
- var ReportActionStateSchema = z17.enum([
3876
+ var ReportActionStateSchema = z18.enum([
3840
3877
  "suggested",
3841
3878
  "fired",
3842
3879
  "applied",
3843
3880
  "failed",
3844
3881
  "dismissed"
3845
3882
  ]);
3846
- var ReportActionRecordSchema = z17.object({
3847
- actionId: z17.string(),
3883
+ var ReportActionRecordSchema = z18.object({
3884
+ actionId: z18.string(),
3848
3885
  /** Artifacts-relative path of the report the action came from. */
3849
- reportPath: z17.string(),
3886
+ reportPath: z18.string(),
3850
3887
  kind: ReportActionKindSchema,
3851
- contentHash: z17.string(),
3852
- firstSeenAt: z17.string(),
3888
+ contentHash: z18.string(),
3889
+ firstSeenAt: z18.string(),
3853
3890
  state: ReportActionStateSchema,
3854
3891
  /** Task materialized by fire-craftbook / create-task. */
3855
- taskRef: z17.string().optional(),
3856
- firedAt: z17.string().optional(),
3892
+ taskRef: z18.string().optional(),
3893
+ firedAt: z18.string().optional(),
3857
3894
  /** Stamped when the fired task settles. */
3858
- settledAt: z17.string().optional(),
3859
- outcome: z17.enum(["complete", "canceled"]).optional(),
3895
+ settledAt: z18.string().optional(),
3896
+ outcome: z18.enum(["complete", "canceled"]).optional(),
3860
3897
  /** apply-edits per-file results. */
3861
- results: z17.array(
3862
- z17.object({
3863
- path: z17.string(),
3864
- ok: z17.boolean(),
3865
- error: z17.string().optional()
3898
+ results: z18.array(
3899
+ z18.object({
3900
+ path: z18.string(),
3901
+ ok: z18.boolean(),
3902
+ error: z18.string().optional()
3866
3903
  })
3867
3904
  ).optional()
3868
3905
  });
3869
- var ReportActionParseIssueSchema = z17.object({
3906
+ var ReportActionParseIssueSchema = z18.object({
3870
3907
  /** Zero-based index among the report's gezel-action fences. */
3871
- index: z17.number().int(),
3872
- message: z17.string(),
3908
+ index: z18.number().int(),
3909
+ message: z18.string(),
3873
3910
  /** Raw fence body, for the "unreadable action block" card. */
3874
- raw: z17.string()
3911
+ raw: z18.string()
3875
3912
  });
3876
- var ReportActionViewSchema = z17.object({
3913
+ var ReportActionViewSchema = z18.object({
3877
3914
  action: ReportActionSchema,
3878
- id: z17.string(),
3879
- contentHash: z17.string(),
3915
+ id: z18.string(),
3916
+ contentHash: z18.string(),
3880
3917
  state: ReportActionStateSchema,
3881
- taskRef: z17.string().optional(),
3882
- firedAt: z17.string().optional(),
3883
- settledAt: z17.string().optional(),
3884
- outcome: z17.enum(["complete", "canceled"]).optional(),
3885
- results: z17.array(z17.object({ path: z17.string(), ok: z17.boolean(), error: z17.string().optional() })).optional(),
3918
+ taskRef: z18.string().optional(),
3919
+ firedAt: z18.string().optional(),
3920
+ settledAt: z18.string().optional(),
3921
+ outcome: z18.enum(["complete", "canceled"]).optional(),
3922
+ results: z18.array(z18.object({ path: z18.string(), ok: z18.boolean(), error: z18.string().optional() })).optional(),
3886
3923
  /** The stored record predates a changed block body (report regenerated). */
3887
- contentChanged: z17.boolean().optional()
3924
+ contentChanged: z18.boolean().optional()
3888
3925
  });
3889
- var ReportActionsResponseSchema = z17.object({
3890
- actions: z17.array(ReportActionViewSchema),
3891
- issues: z17.array(ReportActionParseIssueSchema),
3926
+ var ReportActionsResponseSchema = z18.object({
3927
+ actions: z18.array(ReportActionViewSchema),
3928
+ issues: z18.array(ReportActionParseIssueSchema),
3892
3929
  /** Records whose action vanished from the regenerated report. */
3893
- stale: z17.array(ReportActionRecordSchema)
3930
+ stale: z18.array(ReportActionRecordSchema)
3894
3931
  });
3895
- var FireReportActionRequestSchema = z17.object({
3932
+ var FireReportActionRequestSchema = z18.object({
3896
3933
  /** Artifacts-relative report path. */
3897
- path: z17.string().min(1),
3898
- actionId: z17.string().min(1),
3934
+ path: z18.string().min(1),
3935
+ actionId: z18.string().min(1),
3899
3936
  /** apply-edits: none. fire-craftbook: overrides the block's params. */
3900
- params: z17.record(z17.string(), z17.string()).optional()
3937
+ params: z18.record(z18.string(), z18.string()).optional()
3901
3938
  });
3902
- var FireReportActionResponseSchema = z17.object({
3939
+ var FireReportActionResponseSchema = z18.object({
3903
3940
  record: ReportActionRecordSchema,
3904
3941
  /** Set for fire-craftbook / create-task. */
3905
- taskRef: z17.string().optional()
3942
+ taskRef: z18.string().optional()
3906
3943
  });
3907
- var DismissReportActionRequestSchema = z17.object({
3908
- path: z17.string().min(1),
3909
- actionId: z17.string().min(1)
3944
+ var DismissReportActionRequestSchema = z18.object({
3945
+ path: z18.string().min(1),
3946
+ actionId: z18.string().min(1)
3910
3947
  });
3911
3948
 
3912
3949
  // src/markdown/report-actions.ts