@jaggerxtrm/specialists 3.9.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/config/mandatory-rules/README.md +4 -0
  2. package/config/mandatory-rules/gitnexus-required.md +12 -1
  3. package/config/mandatory-rules/serena-cheatsheet.md +41 -0
  4. package/config/specialists/debugger.specialist.json +2 -1
  5. package/config/specialists/executor.specialist.json +2 -1
  6. package/config/specialists/explorer.specialist.json +2 -1
  7. package/config/specialists/memory-processor.specialist.json +6 -1
  8. package/config/specialists/overthinker.specialist.json +2 -1
  9. package/config/specialists/planner.specialist.json +6 -1
  10. package/config/specialists/researcher.specialist.json +2 -1
  11. package/config/specialists/reviewer.specialist.json +2 -1
  12. package/config/specialists/specialists-creator.specialist.json +7 -1
  13. package/config/specialists/sync-docs.specialist.json +2 -1
  14. package/config/specialists/test-runner.specialist.json +2 -1
  15. package/dist/index.js +998 -533
  16. package/dist/lib.js +13219 -0
  17. package/dist/types/cli/attach.d.ts +2 -0
  18. package/dist/types/cli/attach.d.ts.map +1 -0
  19. package/dist/types/cli/clean.d.ts +2 -0
  20. package/dist/types/cli/clean.d.ts.map +1 -0
  21. package/dist/types/cli/config.d.ts +2 -0
  22. package/dist/types/cli/config.d.ts.map +1 -0
  23. package/dist/types/cli/db.d.ts +2 -0
  24. package/dist/types/cli/db.d.ts.map +1 -0
  25. package/dist/types/cli/doctor.d.ts +15 -0
  26. package/dist/types/cli/doctor.d.ts.map +1 -0
  27. package/dist/types/cli/edit.d.ts +2 -0
  28. package/dist/types/cli/edit.d.ts.map +1 -0
  29. package/dist/types/cli/end.d.ts +2 -0
  30. package/dist/types/cli/end.d.ts.map +1 -0
  31. package/dist/types/cli/epic.d.ts +8 -0
  32. package/dist/types/cli/epic.d.ts.map +1 -0
  33. package/dist/types/cli/feed.d.ts +19 -0
  34. package/dist/types/cli/feed.d.ts.map +1 -0
  35. package/dist/types/cli/follow-up.d.ts +2 -0
  36. package/dist/types/cli/follow-up.d.ts.map +1 -0
  37. package/dist/types/cli/format-helpers.d.ts +108 -0
  38. package/dist/types/cli/format-helpers.d.ts.map +1 -0
  39. package/dist/types/cli/help.d.ts +2 -0
  40. package/dist/types/cli/help.d.ts.map +1 -0
  41. package/dist/types/cli/init.d.ts +10 -0
  42. package/dist/types/cli/init.d.ts.map +1 -0
  43. package/dist/types/cli/install.d.ts +2 -0
  44. package/dist/types/cli/install.d.ts.map +1 -0
  45. package/dist/types/cli/list-rules.d.ts +2 -0
  46. package/dist/types/cli/list-rules.d.ts.map +1 -0
  47. package/dist/types/cli/list.d.ts +13 -0
  48. package/dist/types/cli/list.d.ts.map +1 -0
  49. package/dist/types/cli/memory.d.ts +2 -0
  50. package/dist/types/cli/memory.d.ts.map +1 -0
  51. package/dist/types/cli/merge.d.ts +79 -0
  52. package/dist/types/cli/merge.d.ts.map +1 -0
  53. package/dist/types/cli/models.d.ts +2 -0
  54. package/dist/types/cli/models.d.ts.map +1 -0
  55. package/dist/types/cli/node.d.ts +2 -0
  56. package/dist/types/cli/node.d.ts.map +1 -0
  57. package/dist/types/cli/poll.d.ts +25 -0
  58. package/dist/types/cli/poll.d.ts.map +1 -0
  59. package/dist/types/cli/ps.d.ts +2 -0
  60. package/dist/types/cli/ps.d.ts.map +1 -0
  61. package/dist/types/cli/quickstart.d.ts +2 -0
  62. package/dist/types/cli/quickstart.d.ts.map +1 -0
  63. package/dist/types/cli/result.d.ts +2 -0
  64. package/dist/types/cli/result.d.ts.map +1 -0
  65. package/dist/types/cli/resume.d.ts +2 -0
  66. package/dist/types/cli/resume.d.ts.map +1 -0
  67. package/dist/types/cli/run.d.ts +2 -0
  68. package/dist/types/cli/run.d.ts.map +1 -0
  69. package/dist/types/cli/script.d.ts +23 -0
  70. package/dist/types/cli/script.d.ts.map +1 -0
  71. package/dist/types/cli/serve.d.ts +17 -0
  72. package/dist/types/cli/serve.d.ts.map +1 -0
  73. package/dist/types/cli/setup.d.ts +2 -0
  74. package/dist/types/cli/setup.d.ts.map +1 -0
  75. package/dist/types/cli/status.d.ts +4 -0
  76. package/dist/types/cli/status.d.ts.map +1 -0
  77. package/dist/types/cli/steer.d.ts +2 -0
  78. package/dist/types/cli/steer.d.ts.map +1 -0
  79. package/dist/types/cli/stop.d.ts +2 -0
  80. package/dist/types/cli/stop.d.ts.map +1 -0
  81. package/dist/types/cli/tmux-utils.d.ts +23 -0
  82. package/dist/types/cli/tmux-utils.d.ts.map +1 -0
  83. package/dist/types/cli/validate.d.ts +11 -0
  84. package/dist/types/cli/validate.d.ts.map +1 -0
  85. package/dist/types/cli/version.d.ts +2 -0
  86. package/dist/types/cli/version.d.ts.map +1 -0
  87. package/dist/types/cli/view.d.ts +2 -0
  88. package/dist/types/cli/view.d.ts.map +1 -0
  89. package/dist/types/constants.d.ts +140 -0
  90. package/dist/types/constants.d.ts.map +1 -0
  91. package/dist/types/index.d.ts +8 -0
  92. package/dist/types/index.d.ts.map +1 -0
  93. package/dist/types/lib.d.ts +5 -0
  94. package/dist/types/lib.d.ts.map +1 -0
  95. package/dist/types/pi/backendMap.d.ts +3 -0
  96. package/dist/types/pi/backendMap.d.ts.map +1 -0
  97. package/dist/types/pi/session.d.ts +209 -0
  98. package/dist/types/pi/session.d.ts.map +1 -0
  99. package/dist/types/server.d.ts +10 -0
  100. package/dist/types/server.d.ts.map +1 -0
  101. package/dist/types/specialist/beads.d.ts +60 -0
  102. package/dist/types/specialist/beads.d.ts.map +1 -0
  103. package/dist/types/specialist/chain-identity.d.ts +18 -0
  104. package/dist/types/specialist/chain-identity.d.ts.map +1 -0
  105. package/dist/types/specialist/epic-lifecycle.d.ts +57 -0
  106. package/dist/types/specialist/epic-lifecycle.d.ts.map +1 -0
  107. package/dist/types/specialist/epic-readiness.d.ts +55 -0
  108. package/dist/types/specialist/epic-readiness.d.ts.map +1 -0
  109. package/dist/types/specialist/epic-reconciler.d.ts +35 -0
  110. package/dist/types/specialist/epic-reconciler.d.ts.map +1 -0
  111. package/dist/types/specialist/hooks.d.ts +44 -0
  112. package/dist/types/specialist/hooks.d.ts.map +1 -0
  113. package/dist/types/specialist/job-control.d.ts +29 -0
  114. package/dist/types/specialist/job-control.d.ts.map +1 -0
  115. package/dist/types/specialist/job-file-output.d.ts +4 -0
  116. package/dist/types/specialist/job-file-output.d.ts.map +1 -0
  117. package/dist/types/specialist/job-root.d.ts +21 -0
  118. package/dist/types/specialist/job-root.d.ts.map +1 -0
  119. package/dist/types/specialist/jobRegistry.d.ts +69 -0
  120. package/dist/types/specialist/jobRegistry.d.ts.map +1 -0
  121. package/dist/types/specialist/json-output.d.ts +2 -0
  122. package/dist/types/specialist/json-output.d.ts.map +1 -0
  123. package/dist/types/specialist/loader.d.ts +48 -0
  124. package/dist/types/specialist/loader.d.ts.map +1 -0
  125. package/dist/types/specialist/mandatory-rules.d.ts +41 -0
  126. package/dist/types/specialist/mandatory-rules.d.ts.map +1 -0
  127. package/dist/types/specialist/memory-retrieval.d.ts +34 -0
  128. package/dist/types/specialist/memory-retrieval.d.ts.map +1 -0
  129. package/dist/types/specialist/model-display.d.ts +4 -0
  130. package/dist/types/specialist/model-display.d.ts.map +1 -0
  131. package/dist/types/specialist/node-contract.d.ts +343 -0
  132. package/dist/types/specialist/node-contract.d.ts.map +1 -0
  133. package/dist/types/specialist/node-resolve.d.ts +5 -0
  134. package/dist/types/specialist/node-resolve.d.ts.map +1 -0
  135. package/dist/types/specialist/node-supervisor.d.ts +198 -0
  136. package/dist/types/specialist/node-supervisor.d.ts.map +1 -0
  137. package/dist/types/specialist/observability-db.d.ts +19 -0
  138. package/dist/types/specialist/observability-db.d.ts.map +1 -0
  139. package/dist/types/specialist/observability-sqlite.d.ts +218 -0
  140. package/dist/types/specialist/observability-sqlite.d.ts.map +1 -0
  141. package/dist/types/specialist/pipeline.d.ts +23 -0
  142. package/dist/types/specialist/pipeline.d.ts.map +1 -0
  143. package/dist/types/specialist/process-liveness.d.ts +2 -0
  144. package/dist/types/specialist/process-liveness.d.ts.map +1 -0
  145. package/dist/types/specialist/runner.d.ts +98 -0
  146. package/dist/types/specialist/runner.d.ts.map +1 -0
  147. package/dist/types/specialist/schema.d.ts +2875 -0
  148. package/dist/types/specialist/schema.d.ts.map +1 -0
  149. package/dist/types/specialist/script-runner.d.ts +47 -0
  150. package/dist/types/specialist/script-runner.d.ts.map +1 -0
  151. package/dist/types/specialist/supervisor.d.ts +142 -0
  152. package/dist/types/specialist/supervisor.d.ts.map +1 -0
  153. package/dist/types/specialist/templateEngine.d.ts +2 -0
  154. package/dist/types/specialist/templateEngine.d.ts.map +1 -0
  155. package/dist/types/specialist/timeline-events.d.ts +563 -0
  156. package/dist/types/specialist/timeline-events.d.ts.map +1 -0
  157. package/dist/types/specialist/timeline-query.d.ts +129 -0
  158. package/dist/types/specialist/timeline-query.d.ts.map +1 -0
  159. package/dist/types/specialist/worktree-gc.d.ts +24 -0
  160. package/dist/types/specialist/worktree-gc.d.ts.map +1 -0
  161. package/dist/types/specialist/worktree.d.ts +69 -0
  162. package/dist/types/specialist/worktree.d.ts.map +1 -0
  163. package/dist/types/tools/specialist/feed_specialist.tool.d.ts +51 -0
  164. package/dist/types/tools/specialist/feed_specialist.tool.d.ts.map +1 -0
  165. package/dist/types/tools/specialist/list_specialists.tool.d.ts +28 -0
  166. package/dist/types/tools/specialist/list_specialists.tool.d.ts.map +1 -0
  167. package/dist/types/tools/specialist/resume_specialist.tool.d.ts +46 -0
  168. package/dist/types/tools/specialist/resume_specialist.tool.d.ts.map +1 -0
  169. package/dist/types/tools/specialist/specialist_init.tool.d.ts +26 -0
  170. package/dist/types/tools/specialist/specialist_init.tool.d.ts.map +1 -0
  171. package/dist/types/tools/specialist/specialist_status.tool.d.ts +33 -0
  172. package/dist/types/tools/specialist/specialist_status.tool.d.ts.map +1 -0
  173. package/dist/types/tools/specialist/steer_specialist.tool.d.ts +38 -0
  174. package/dist/types/tools/specialist/steer_specialist.tool.d.ts.map +1 -0
  175. package/dist/types/tools/specialist/stop_specialist.tool.d.ts +31 -0
  176. package/dist/types/tools/specialist/stop_specialist.tool.d.ts.map +1 -0
  177. package/dist/types/tools/specialist/use_specialist.tool.d.ts +93 -0
  178. package/dist/types/tools/specialist/use_specialist.tool.d.ts.map +1 -0
  179. package/dist/types/utils/circuitBreaker.d.ts +19 -0
  180. package/dist/types/utils/circuitBreaker.d.ts.map +1 -0
  181. package/dist/types/utils/logger.d.ts +11 -0
  182. package/dist/types/utils/logger.d.ts.map +1 -0
  183. package/package.json +13 -2
@@ -0,0 +1,2875 @@
1
+ import * as z from 'zod';
2
+ export declare const SpecialistSchema: z.ZodObject<{
3
+ specialist: z.ZodObject<{
4
+ metadata: z.ZodObject<{
5
+ name: z.ZodString;
6
+ version: z.ZodString;
7
+ description: z.ZodString;
8
+ category: z.ZodString;
9
+ updated: z.ZodOptional<z.ZodString>;
10
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
11
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
12
+ name: z.ZodString;
13
+ version: z.ZodString;
14
+ description: z.ZodString;
15
+ category: z.ZodString;
16
+ updated: z.ZodOptional<z.ZodString>;
17
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
19
+ name: z.ZodString;
20
+ version: z.ZodString;
21
+ description: z.ZodString;
22
+ category: z.ZodString;
23
+ updated: z.ZodOptional<z.ZodString>;
24
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
25
+ }, z.ZodTypeAny, "passthrough">>;
26
+ execution: z.ZodObject<{
27
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
28
+ model: z.ZodString;
29
+ fallback_model: z.ZodOptional<z.ZodString>;
30
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
31
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
32
+ max_retries: z.ZodDefault<z.ZodNumber>;
33
+ interactive: z.ZodDefault<z.ZodBoolean>;
34
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
35
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
36
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
37
+ /** Controls which pi tools are available to the agent.
38
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
39
+ * LOW : + bash (inspect/run, no file edits)
40
+ * MEDIUM : + edit (can edit existing files)
41
+ * HIGH : + write (full access — create new files)
42
+ */
43
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
44
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
45
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
46
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
47
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
48
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
49
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
50
+ extensions: z.ZodOptional<z.ZodObject<{
51
+ serena: z.ZodOptional<z.ZodBoolean>;
52
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
53
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
54
+ serena: z.ZodOptional<z.ZodBoolean>;
55
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
56
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
57
+ serena: z.ZodOptional<z.ZodBoolean>;
58
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
59
+ }, z.ZodTypeAny, "passthrough">>>;
60
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
61
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
62
+ model: z.ZodString;
63
+ fallback_model: z.ZodOptional<z.ZodString>;
64
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
65
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
66
+ max_retries: z.ZodDefault<z.ZodNumber>;
67
+ interactive: z.ZodDefault<z.ZodBoolean>;
68
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
69
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
70
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
71
+ /** Controls which pi tools are available to the agent.
72
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
73
+ * LOW : + bash (inspect/run, no file edits)
74
+ * MEDIUM : + edit (can edit existing files)
75
+ * HIGH : + write (full access — create new files)
76
+ */
77
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
78
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
79
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
80
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
81
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
82
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
83
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
84
+ extensions: z.ZodOptional<z.ZodObject<{
85
+ serena: z.ZodOptional<z.ZodBoolean>;
86
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
87
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
88
+ serena: z.ZodOptional<z.ZodBoolean>;
89
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
90
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
91
+ serena: z.ZodOptional<z.ZodBoolean>;
92
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
93
+ }, z.ZodTypeAny, "passthrough">>>;
94
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
95
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
96
+ model: z.ZodString;
97
+ fallback_model: z.ZodOptional<z.ZodString>;
98
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
99
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
100
+ max_retries: z.ZodDefault<z.ZodNumber>;
101
+ interactive: z.ZodDefault<z.ZodBoolean>;
102
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
103
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
104
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
105
+ /** Controls which pi tools are available to the agent.
106
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
107
+ * LOW : + bash (inspect/run, no file edits)
108
+ * MEDIUM : + edit (can edit existing files)
109
+ * HIGH : + write (full access — create new files)
110
+ */
111
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
112
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
113
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
114
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
115
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
116
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
117
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
118
+ extensions: z.ZodOptional<z.ZodObject<{
119
+ serena: z.ZodOptional<z.ZodBoolean>;
120
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
121
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
122
+ serena: z.ZodOptional<z.ZodBoolean>;
123
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
124
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
125
+ serena: z.ZodOptional<z.ZodBoolean>;
126
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
127
+ }, z.ZodTypeAny, "passthrough">>>;
128
+ }, z.ZodTypeAny, "passthrough">>;
129
+ prompt: z.ZodObject<{
130
+ system: z.ZodOptional<z.ZodString>;
131
+ task_template: z.ZodString;
132
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
133
+ skill_inherit: z.ZodOptional<z.ZodString>;
134
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
135
+ system: z.ZodOptional<z.ZodString>;
136
+ task_template: z.ZodString;
137
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
138
+ skill_inherit: z.ZodOptional<z.ZodString>;
139
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
140
+ system: z.ZodOptional<z.ZodString>;
141
+ task_template: z.ZodString;
142
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
143
+ skill_inherit: z.ZodOptional<z.ZodString>;
144
+ }, z.ZodTypeAny, "passthrough">>;
145
+ skills: z.ZodOptional<z.ZodObject<{
146
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
147
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
148
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
149
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
150
+ run: z.ZodString;
151
+ phase: z.ZodEnum<["pre", "post"]>;
152
+ inject_output: z.ZodDefault<z.ZodBoolean>;
153
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
154
+ run: z.ZodString;
155
+ phase: z.ZodEnum<["pre", "post"]>;
156
+ inject_output: z.ZodDefault<z.ZodBoolean>;
157
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
158
+ run: z.ZodString;
159
+ phase: z.ZodEnum<["pre", "post"]>;
160
+ inject_output: z.ZodDefault<z.ZodBoolean>;
161
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
162
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
163
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
164
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
165
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
166
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
+ run: z.ZodString;
168
+ phase: z.ZodEnum<["pre", "post"]>;
169
+ inject_output: z.ZodDefault<z.ZodBoolean>;
170
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
171
+ run: z.ZodString;
172
+ phase: z.ZodEnum<["pre", "post"]>;
173
+ inject_output: z.ZodDefault<z.ZodBoolean>;
174
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
175
+ run: z.ZodString;
176
+ phase: z.ZodEnum<["pre", "post"]>;
177
+ inject_output: z.ZodDefault<z.ZodBoolean>;
178
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
179
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
180
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
181
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
182
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
183
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
184
+ run: z.ZodString;
185
+ phase: z.ZodEnum<["pre", "post"]>;
186
+ inject_output: z.ZodDefault<z.ZodBoolean>;
187
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
188
+ run: z.ZodString;
189
+ phase: z.ZodEnum<["pre", "post"]>;
190
+ inject_output: z.ZodDefault<z.ZodBoolean>;
191
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
192
+ run: z.ZodString;
193
+ phase: z.ZodEnum<["pre", "post"]>;
194
+ inject_output: z.ZodDefault<z.ZodBoolean>;
195
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
196
+ }, z.ZodTypeAny, "passthrough">>>;
197
+ capabilities: z.ZodOptional<z.ZodObject<{
198
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
199
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
200
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
201
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
202
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
203
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
204
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
205
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
206
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
207
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
208
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
209
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
210
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
211
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
212
+ }, z.ZodTypeAny, "passthrough">>>;
213
+ validation: z.ZodOptional<z.ZodObject<{
214
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
215
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
216
+ /** Days before STALE escalates to AGED */
217
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
218
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
219
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
220
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
221
+ /** Days before STALE escalates to AGED */
222
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
223
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
224
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
225
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
226
+ /** Days before STALE escalates to AGED */
227
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
228
+ }, z.ZodTypeAny, "passthrough">>>;
229
+ stall_detection: z.ZodOptional<z.ZodObject<{
230
+ /** ms of silence while running before warn (default 60_000) */
231
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
232
+ /** ms of silence while running before marking stale (default 300_000) */
233
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
234
+ /** ms in waiting state before emitting warning (default 3_600_000) */
235
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
236
+ /** ms a single tool execution may run before warning (default 120_000) */
237
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
238
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
239
+ /** ms of silence while running before warn (default 60_000) */
240
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
241
+ /** ms of silence while running before marking stale (default 300_000) */
242
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
243
+ /** ms in waiting state before emitting warning (default 3_600_000) */
244
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
245
+ /** ms a single tool execution may run before warning (default 120_000) */
246
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
247
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
248
+ /** ms of silence while running before warn (default 60_000) */
249
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
250
+ /** ms of silence while running before marking stale (default 300_000) */
251
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
252
+ /** ms in waiting state before emitting warning (default 3_600_000) */
253
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
254
+ /** ms a single tool execution may run before warning (default 120_000) */
255
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
256
+ }, z.ZodTypeAny, "passthrough">>>;
257
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
258
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
259
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
260
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
261
+ id: z.ZodString;
262
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
263
+ text: z.ZodString;
264
+ when: z.ZodOptional<z.ZodString>;
265
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
266
+ id: z.ZodString;
267
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
268
+ text: z.ZodString;
269
+ when: z.ZodOptional<z.ZodString>;
270
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
271
+ id: z.ZodString;
272
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
273
+ text: z.ZodString;
274
+ when: z.ZodOptional<z.ZodString>;
275
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
276
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
277
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
278
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
279
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
280
+ id: z.ZodString;
281
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
282
+ text: z.ZodString;
283
+ when: z.ZodOptional<z.ZodString>;
284
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
285
+ id: z.ZodString;
286
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
287
+ text: z.ZodString;
288
+ when: z.ZodOptional<z.ZodString>;
289
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
290
+ id: z.ZodString;
291
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
292
+ text: z.ZodString;
293
+ when: z.ZodOptional<z.ZodString>;
294
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
295
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
296
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
297
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
298
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
299
+ id: z.ZodString;
300
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
301
+ text: z.ZodString;
302
+ when: z.ZodOptional<z.ZodString>;
303
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
304
+ id: z.ZodString;
305
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
306
+ text: z.ZodString;
307
+ when: z.ZodOptional<z.ZodString>;
308
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
309
+ id: z.ZodString;
310
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
311
+ text: z.ZodString;
312
+ when: z.ZodOptional<z.ZodString>;
313
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
314
+ }, z.ZodTypeAny, "passthrough">>>;
315
+ /** Write the final output to this file path after the session completes */
316
+ output_file: z.ZodOptional<z.ZodString>;
317
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
318
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
319
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
320
+ metadata: z.ZodObject<{
321
+ name: z.ZodString;
322
+ version: z.ZodString;
323
+ description: z.ZodString;
324
+ category: z.ZodString;
325
+ updated: z.ZodOptional<z.ZodString>;
326
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
327
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
328
+ name: z.ZodString;
329
+ version: z.ZodString;
330
+ description: z.ZodString;
331
+ category: z.ZodString;
332
+ updated: z.ZodOptional<z.ZodString>;
333
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
334
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
335
+ name: z.ZodString;
336
+ version: z.ZodString;
337
+ description: z.ZodString;
338
+ category: z.ZodString;
339
+ updated: z.ZodOptional<z.ZodString>;
340
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
341
+ }, z.ZodTypeAny, "passthrough">>;
342
+ execution: z.ZodObject<{
343
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
344
+ model: z.ZodString;
345
+ fallback_model: z.ZodOptional<z.ZodString>;
346
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
347
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
348
+ max_retries: z.ZodDefault<z.ZodNumber>;
349
+ interactive: z.ZodDefault<z.ZodBoolean>;
350
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
351
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
352
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
353
+ /** Controls which pi tools are available to the agent.
354
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
355
+ * LOW : + bash (inspect/run, no file edits)
356
+ * MEDIUM : + edit (can edit existing files)
357
+ * HIGH : + write (full access — create new files)
358
+ */
359
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
360
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
361
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
362
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
363
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
364
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
365
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
366
+ extensions: z.ZodOptional<z.ZodObject<{
367
+ serena: z.ZodOptional<z.ZodBoolean>;
368
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
369
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
370
+ serena: z.ZodOptional<z.ZodBoolean>;
371
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
372
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
373
+ serena: z.ZodOptional<z.ZodBoolean>;
374
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
375
+ }, z.ZodTypeAny, "passthrough">>>;
376
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
377
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
378
+ model: z.ZodString;
379
+ fallback_model: z.ZodOptional<z.ZodString>;
380
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
381
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
382
+ max_retries: z.ZodDefault<z.ZodNumber>;
383
+ interactive: z.ZodDefault<z.ZodBoolean>;
384
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
385
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
386
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
387
+ /** Controls which pi tools are available to the agent.
388
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
389
+ * LOW : + bash (inspect/run, no file edits)
390
+ * MEDIUM : + edit (can edit existing files)
391
+ * HIGH : + write (full access — create new files)
392
+ */
393
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
394
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
395
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
396
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
397
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
398
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
399
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
400
+ extensions: z.ZodOptional<z.ZodObject<{
401
+ serena: z.ZodOptional<z.ZodBoolean>;
402
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
403
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
404
+ serena: z.ZodOptional<z.ZodBoolean>;
405
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
406
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
407
+ serena: z.ZodOptional<z.ZodBoolean>;
408
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
409
+ }, z.ZodTypeAny, "passthrough">>>;
410
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
411
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
412
+ model: z.ZodString;
413
+ fallback_model: z.ZodOptional<z.ZodString>;
414
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
415
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
416
+ max_retries: z.ZodDefault<z.ZodNumber>;
417
+ interactive: z.ZodDefault<z.ZodBoolean>;
418
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
419
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
420
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
421
+ /** Controls which pi tools are available to the agent.
422
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
423
+ * LOW : + bash (inspect/run, no file edits)
424
+ * MEDIUM : + edit (can edit existing files)
425
+ * HIGH : + write (full access — create new files)
426
+ */
427
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
428
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
429
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
430
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
431
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
432
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
433
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
434
+ extensions: z.ZodOptional<z.ZodObject<{
435
+ serena: z.ZodOptional<z.ZodBoolean>;
436
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
437
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
438
+ serena: z.ZodOptional<z.ZodBoolean>;
439
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
440
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
441
+ serena: z.ZodOptional<z.ZodBoolean>;
442
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
443
+ }, z.ZodTypeAny, "passthrough">>>;
444
+ }, z.ZodTypeAny, "passthrough">>;
445
+ prompt: z.ZodObject<{
446
+ system: z.ZodOptional<z.ZodString>;
447
+ task_template: z.ZodString;
448
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
449
+ skill_inherit: z.ZodOptional<z.ZodString>;
450
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
451
+ system: z.ZodOptional<z.ZodString>;
452
+ task_template: z.ZodString;
453
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
454
+ skill_inherit: z.ZodOptional<z.ZodString>;
455
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
456
+ system: z.ZodOptional<z.ZodString>;
457
+ task_template: z.ZodString;
458
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
459
+ skill_inherit: z.ZodOptional<z.ZodString>;
460
+ }, z.ZodTypeAny, "passthrough">>;
461
+ skills: z.ZodOptional<z.ZodObject<{
462
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
463
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
464
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
465
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
466
+ run: z.ZodString;
467
+ phase: z.ZodEnum<["pre", "post"]>;
468
+ inject_output: z.ZodDefault<z.ZodBoolean>;
469
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
470
+ run: z.ZodString;
471
+ phase: z.ZodEnum<["pre", "post"]>;
472
+ inject_output: z.ZodDefault<z.ZodBoolean>;
473
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
474
+ run: z.ZodString;
475
+ phase: z.ZodEnum<["pre", "post"]>;
476
+ inject_output: z.ZodDefault<z.ZodBoolean>;
477
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
478
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
479
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
480
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
481
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
482
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
483
+ run: z.ZodString;
484
+ phase: z.ZodEnum<["pre", "post"]>;
485
+ inject_output: z.ZodDefault<z.ZodBoolean>;
486
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
487
+ run: z.ZodString;
488
+ phase: z.ZodEnum<["pre", "post"]>;
489
+ inject_output: z.ZodDefault<z.ZodBoolean>;
490
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
491
+ run: z.ZodString;
492
+ phase: z.ZodEnum<["pre", "post"]>;
493
+ inject_output: z.ZodDefault<z.ZodBoolean>;
494
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
495
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
496
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
497
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
498
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
499
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
500
+ run: z.ZodString;
501
+ phase: z.ZodEnum<["pre", "post"]>;
502
+ inject_output: z.ZodDefault<z.ZodBoolean>;
503
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
504
+ run: z.ZodString;
505
+ phase: z.ZodEnum<["pre", "post"]>;
506
+ inject_output: z.ZodDefault<z.ZodBoolean>;
507
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
508
+ run: z.ZodString;
509
+ phase: z.ZodEnum<["pre", "post"]>;
510
+ inject_output: z.ZodDefault<z.ZodBoolean>;
511
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
512
+ }, z.ZodTypeAny, "passthrough">>>;
513
+ capabilities: z.ZodOptional<z.ZodObject<{
514
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
515
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
516
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
517
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
518
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
519
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
520
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
521
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
522
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
523
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
524
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
525
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
526
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
527
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
528
+ }, z.ZodTypeAny, "passthrough">>>;
529
+ validation: z.ZodOptional<z.ZodObject<{
530
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
531
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
532
+ /** Days before STALE escalates to AGED */
533
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
534
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
535
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
536
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
537
+ /** Days before STALE escalates to AGED */
538
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
539
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
540
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
541
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
542
+ /** Days before STALE escalates to AGED */
543
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
544
+ }, z.ZodTypeAny, "passthrough">>>;
545
+ stall_detection: z.ZodOptional<z.ZodObject<{
546
+ /** ms of silence while running before warn (default 60_000) */
547
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
548
+ /** ms of silence while running before marking stale (default 300_000) */
549
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
550
+ /** ms in waiting state before emitting warning (default 3_600_000) */
551
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
552
+ /** ms a single tool execution may run before warning (default 120_000) */
553
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
554
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
555
+ /** ms of silence while running before warn (default 60_000) */
556
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
557
+ /** ms of silence while running before marking stale (default 300_000) */
558
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
559
+ /** ms in waiting state before emitting warning (default 3_600_000) */
560
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
561
+ /** ms a single tool execution may run before warning (default 120_000) */
562
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
563
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
564
+ /** ms of silence while running before warn (default 60_000) */
565
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
566
+ /** ms of silence while running before marking stale (default 300_000) */
567
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
568
+ /** ms in waiting state before emitting warning (default 3_600_000) */
569
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
570
+ /** ms a single tool execution may run before warning (default 120_000) */
571
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
572
+ }, z.ZodTypeAny, "passthrough">>>;
573
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
574
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
575
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
576
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
577
+ id: z.ZodString;
578
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
579
+ text: z.ZodString;
580
+ when: z.ZodOptional<z.ZodString>;
581
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
582
+ id: z.ZodString;
583
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
584
+ text: z.ZodString;
585
+ when: z.ZodOptional<z.ZodString>;
586
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
587
+ id: z.ZodString;
588
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
589
+ text: z.ZodString;
590
+ when: z.ZodOptional<z.ZodString>;
591
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
592
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
593
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
594
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
595
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
596
+ id: z.ZodString;
597
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
598
+ text: z.ZodString;
599
+ when: z.ZodOptional<z.ZodString>;
600
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
601
+ id: z.ZodString;
602
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
603
+ text: z.ZodString;
604
+ when: z.ZodOptional<z.ZodString>;
605
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
606
+ id: z.ZodString;
607
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
608
+ text: z.ZodString;
609
+ when: z.ZodOptional<z.ZodString>;
610
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
611
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
612
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
613
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
614
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
615
+ id: z.ZodString;
616
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
617
+ text: z.ZodString;
618
+ when: z.ZodOptional<z.ZodString>;
619
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
620
+ id: z.ZodString;
621
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
622
+ text: z.ZodString;
623
+ when: z.ZodOptional<z.ZodString>;
624
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
625
+ id: z.ZodString;
626
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
627
+ text: z.ZodString;
628
+ when: z.ZodOptional<z.ZodString>;
629
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
630
+ }, z.ZodTypeAny, "passthrough">>>;
631
+ /** Write the final output to this file path after the session completes */
632
+ output_file: z.ZodOptional<z.ZodString>;
633
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
634
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
635
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
636
+ metadata: z.ZodObject<{
637
+ name: z.ZodString;
638
+ version: z.ZodString;
639
+ description: z.ZodString;
640
+ category: z.ZodString;
641
+ updated: z.ZodOptional<z.ZodString>;
642
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
643
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
644
+ name: z.ZodString;
645
+ version: z.ZodString;
646
+ description: z.ZodString;
647
+ category: z.ZodString;
648
+ updated: z.ZodOptional<z.ZodString>;
649
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
650
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
651
+ name: z.ZodString;
652
+ version: z.ZodString;
653
+ description: z.ZodString;
654
+ category: z.ZodString;
655
+ updated: z.ZodOptional<z.ZodString>;
656
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
657
+ }, z.ZodTypeAny, "passthrough">>;
658
+ execution: z.ZodObject<{
659
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
660
+ model: z.ZodString;
661
+ fallback_model: z.ZodOptional<z.ZodString>;
662
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
663
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
664
+ max_retries: z.ZodDefault<z.ZodNumber>;
665
+ interactive: z.ZodDefault<z.ZodBoolean>;
666
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
667
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
668
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
669
+ /** Controls which pi tools are available to the agent.
670
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
671
+ * LOW : + bash (inspect/run, no file edits)
672
+ * MEDIUM : + edit (can edit existing files)
673
+ * HIGH : + write (full access — create new files)
674
+ */
675
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
676
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
677
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
678
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
679
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
680
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
681
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
682
+ extensions: z.ZodOptional<z.ZodObject<{
683
+ serena: z.ZodOptional<z.ZodBoolean>;
684
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
685
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
686
+ serena: z.ZodOptional<z.ZodBoolean>;
687
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
688
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
689
+ serena: z.ZodOptional<z.ZodBoolean>;
690
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
691
+ }, z.ZodTypeAny, "passthrough">>>;
692
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
693
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
694
+ model: z.ZodString;
695
+ fallback_model: z.ZodOptional<z.ZodString>;
696
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
697
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
698
+ max_retries: z.ZodDefault<z.ZodNumber>;
699
+ interactive: z.ZodDefault<z.ZodBoolean>;
700
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
701
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
702
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
703
+ /** Controls which pi tools are available to the agent.
704
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
705
+ * LOW : + bash (inspect/run, no file edits)
706
+ * MEDIUM : + edit (can edit existing files)
707
+ * HIGH : + write (full access — create new files)
708
+ */
709
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
710
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
711
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
712
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
713
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
714
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
715
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
716
+ extensions: z.ZodOptional<z.ZodObject<{
717
+ serena: z.ZodOptional<z.ZodBoolean>;
718
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
719
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
720
+ serena: z.ZodOptional<z.ZodBoolean>;
721
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
722
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
723
+ serena: z.ZodOptional<z.ZodBoolean>;
724
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
725
+ }, z.ZodTypeAny, "passthrough">>>;
726
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
727
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
728
+ model: z.ZodString;
729
+ fallback_model: z.ZodOptional<z.ZodString>;
730
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
731
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
732
+ max_retries: z.ZodDefault<z.ZodNumber>;
733
+ interactive: z.ZodDefault<z.ZodBoolean>;
734
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
735
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
736
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
737
+ /** Controls which pi tools are available to the agent.
738
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
739
+ * LOW : + bash (inspect/run, no file edits)
740
+ * MEDIUM : + edit (can edit existing files)
741
+ * HIGH : + write (full access — create new files)
742
+ */
743
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
744
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
745
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
746
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
747
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
748
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
749
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
750
+ extensions: z.ZodOptional<z.ZodObject<{
751
+ serena: z.ZodOptional<z.ZodBoolean>;
752
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
753
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
754
+ serena: z.ZodOptional<z.ZodBoolean>;
755
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
756
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
757
+ serena: z.ZodOptional<z.ZodBoolean>;
758
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
759
+ }, z.ZodTypeAny, "passthrough">>>;
760
+ }, z.ZodTypeAny, "passthrough">>;
761
+ prompt: z.ZodObject<{
762
+ system: z.ZodOptional<z.ZodString>;
763
+ task_template: z.ZodString;
764
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
765
+ skill_inherit: z.ZodOptional<z.ZodString>;
766
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
767
+ system: z.ZodOptional<z.ZodString>;
768
+ task_template: z.ZodString;
769
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
770
+ skill_inherit: z.ZodOptional<z.ZodString>;
771
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
772
+ system: z.ZodOptional<z.ZodString>;
773
+ task_template: z.ZodString;
774
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
775
+ skill_inherit: z.ZodOptional<z.ZodString>;
776
+ }, z.ZodTypeAny, "passthrough">>;
777
+ skills: z.ZodOptional<z.ZodObject<{
778
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
779
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
780
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
781
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
782
+ run: z.ZodString;
783
+ phase: z.ZodEnum<["pre", "post"]>;
784
+ inject_output: z.ZodDefault<z.ZodBoolean>;
785
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
786
+ run: z.ZodString;
787
+ phase: z.ZodEnum<["pre", "post"]>;
788
+ inject_output: z.ZodDefault<z.ZodBoolean>;
789
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
790
+ run: z.ZodString;
791
+ phase: z.ZodEnum<["pre", "post"]>;
792
+ inject_output: z.ZodDefault<z.ZodBoolean>;
793
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
794
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
795
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
796
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
797
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
798
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
799
+ run: z.ZodString;
800
+ phase: z.ZodEnum<["pre", "post"]>;
801
+ inject_output: z.ZodDefault<z.ZodBoolean>;
802
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
803
+ run: z.ZodString;
804
+ phase: z.ZodEnum<["pre", "post"]>;
805
+ inject_output: z.ZodDefault<z.ZodBoolean>;
806
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
807
+ run: z.ZodString;
808
+ phase: z.ZodEnum<["pre", "post"]>;
809
+ inject_output: z.ZodDefault<z.ZodBoolean>;
810
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
811
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
812
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
813
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
814
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
815
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
816
+ run: z.ZodString;
817
+ phase: z.ZodEnum<["pre", "post"]>;
818
+ inject_output: z.ZodDefault<z.ZodBoolean>;
819
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
820
+ run: z.ZodString;
821
+ phase: z.ZodEnum<["pre", "post"]>;
822
+ inject_output: z.ZodDefault<z.ZodBoolean>;
823
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
824
+ run: z.ZodString;
825
+ phase: z.ZodEnum<["pre", "post"]>;
826
+ inject_output: z.ZodDefault<z.ZodBoolean>;
827
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
828
+ }, z.ZodTypeAny, "passthrough">>>;
829
+ capabilities: z.ZodOptional<z.ZodObject<{
830
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
831
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
832
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
833
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
834
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
835
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
836
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
837
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
838
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
839
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
840
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
841
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
842
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
843
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
844
+ }, z.ZodTypeAny, "passthrough">>>;
845
+ validation: z.ZodOptional<z.ZodObject<{
846
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
847
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
848
+ /** Days before STALE escalates to AGED */
849
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
850
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
851
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
852
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
853
+ /** Days before STALE escalates to AGED */
854
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
855
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
856
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
857
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
858
+ /** Days before STALE escalates to AGED */
859
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
860
+ }, z.ZodTypeAny, "passthrough">>>;
861
+ stall_detection: z.ZodOptional<z.ZodObject<{
862
+ /** ms of silence while running before warn (default 60_000) */
863
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
864
+ /** ms of silence while running before marking stale (default 300_000) */
865
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
866
+ /** ms in waiting state before emitting warning (default 3_600_000) */
867
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
868
+ /** ms a single tool execution may run before warning (default 120_000) */
869
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
870
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
871
+ /** ms of silence while running before warn (default 60_000) */
872
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
873
+ /** ms of silence while running before marking stale (default 300_000) */
874
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
875
+ /** ms in waiting state before emitting warning (default 3_600_000) */
876
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
877
+ /** ms a single tool execution may run before warning (default 120_000) */
878
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
879
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
880
+ /** ms of silence while running before warn (default 60_000) */
881
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
882
+ /** ms of silence while running before marking stale (default 300_000) */
883
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
884
+ /** ms in waiting state before emitting warning (default 3_600_000) */
885
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
886
+ /** ms a single tool execution may run before warning (default 120_000) */
887
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
888
+ }, z.ZodTypeAny, "passthrough">>>;
889
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
890
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
891
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
892
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
893
+ id: z.ZodString;
894
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
895
+ text: z.ZodString;
896
+ when: z.ZodOptional<z.ZodString>;
897
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
898
+ id: z.ZodString;
899
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
900
+ text: z.ZodString;
901
+ when: z.ZodOptional<z.ZodString>;
902
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
903
+ id: z.ZodString;
904
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
905
+ text: z.ZodString;
906
+ when: z.ZodOptional<z.ZodString>;
907
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
908
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
909
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
910
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
911
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
912
+ id: z.ZodString;
913
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
914
+ text: z.ZodString;
915
+ when: z.ZodOptional<z.ZodString>;
916
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
917
+ id: z.ZodString;
918
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
919
+ text: z.ZodString;
920
+ when: z.ZodOptional<z.ZodString>;
921
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
922
+ id: z.ZodString;
923
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
924
+ text: z.ZodString;
925
+ when: z.ZodOptional<z.ZodString>;
926
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
927
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
928
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
929
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
930
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
931
+ id: z.ZodString;
932
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
933
+ text: z.ZodString;
934
+ when: z.ZodOptional<z.ZodString>;
935
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
936
+ id: z.ZodString;
937
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
938
+ text: z.ZodString;
939
+ when: z.ZodOptional<z.ZodString>;
940
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
941
+ id: z.ZodString;
942
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
943
+ text: z.ZodString;
944
+ when: z.ZodOptional<z.ZodString>;
945
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
946
+ }, z.ZodTypeAny, "passthrough">>>;
947
+ /** Write the final output to this file path after the session completes */
948
+ output_file: z.ZodOptional<z.ZodString>;
949
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
950
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
951
+ }, z.ZodTypeAny, "passthrough">>;
952
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
953
+ specialist: z.ZodObject<{
954
+ metadata: z.ZodObject<{
955
+ name: z.ZodString;
956
+ version: z.ZodString;
957
+ description: z.ZodString;
958
+ category: z.ZodString;
959
+ updated: z.ZodOptional<z.ZodString>;
960
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
961
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
962
+ name: z.ZodString;
963
+ version: z.ZodString;
964
+ description: z.ZodString;
965
+ category: z.ZodString;
966
+ updated: z.ZodOptional<z.ZodString>;
967
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
968
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
969
+ name: z.ZodString;
970
+ version: z.ZodString;
971
+ description: z.ZodString;
972
+ category: z.ZodString;
973
+ updated: z.ZodOptional<z.ZodString>;
974
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
975
+ }, z.ZodTypeAny, "passthrough">>;
976
+ execution: z.ZodObject<{
977
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
978
+ model: z.ZodString;
979
+ fallback_model: z.ZodOptional<z.ZodString>;
980
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
981
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
982
+ max_retries: z.ZodDefault<z.ZodNumber>;
983
+ interactive: z.ZodDefault<z.ZodBoolean>;
984
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
985
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
986
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
987
+ /** Controls which pi tools are available to the agent.
988
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
989
+ * LOW : + bash (inspect/run, no file edits)
990
+ * MEDIUM : + edit (can edit existing files)
991
+ * HIGH : + write (full access — create new files)
992
+ */
993
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
994
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
995
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
996
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
997
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
998
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
999
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1000
+ extensions: z.ZodOptional<z.ZodObject<{
1001
+ serena: z.ZodOptional<z.ZodBoolean>;
1002
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1003
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1004
+ serena: z.ZodOptional<z.ZodBoolean>;
1005
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1006
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1007
+ serena: z.ZodOptional<z.ZodBoolean>;
1008
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1009
+ }, z.ZodTypeAny, "passthrough">>>;
1010
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1011
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1012
+ model: z.ZodString;
1013
+ fallback_model: z.ZodOptional<z.ZodString>;
1014
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1015
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1016
+ max_retries: z.ZodDefault<z.ZodNumber>;
1017
+ interactive: z.ZodDefault<z.ZodBoolean>;
1018
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1019
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1020
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1021
+ /** Controls which pi tools are available to the agent.
1022
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1023
+ * LOW : + bash (inspect/run, no file edits)
1024
+ * MEDIUM : + edit (can edit existing files)
1025
+ * HIGH : + write (full access — create new files)
1026
+ */
1027
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1028
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1029
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1030
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1031
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1032
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1033
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1034
+ extensions: z.ZodOptional<z.ZodObject<{
1035
+ serena: z.ZodOptional<z.ZodBoolean>;
1036
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1037
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1038
+ serena: z.ZodOptional<z.ZodBoolean>;
1039
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1040
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1041
+ serena: z.ZodOptional<z.ZodBoolean>;
1042
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1043
+ }, z.ZodTypeAny, "passthrough">>>;
1044
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1045
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1046
+ model: z.ZodString;
1047
+ fallback_model: z.ZodOptional<z.ZodString>;
1048
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1049
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1050
+ max_retries: z.ZodDefault<z.ZodNumber>;
1051
+ interactive: z.ZodDefault<z.ZodBoolean>;
1052
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1053
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1054
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1055
+ /** Controls which pi tools are available to the agent.
1056
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1057
+ * LOW : + bash (inspect/run, no file edits)
1058
+ * MEDIUM : + edit (can edit existing files)
1059
+ * HIGH : + write (full access — create new files)
1060
+ */
1061
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1062
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1063
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1064
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1065
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1066
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1067
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1068
+ extensions: z.ZodOptional<z.ZodObject<{
1069
+ serena: z.ZodOptional<z.ZodBoolean>;
1070
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1071
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1072
+ serena: z.ZodOptional<z.ZodBoolean>;
1073
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1074
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1075
+ serena: z.ZodOptional<z.ZodBoolean>;
1076
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1077
+ }, z.ZodTypeAny, "passthrough">>>;
1078
+ }, z.ZodTypeAny, "passthrough">>;
1079
+ prompt: z.ZodObject<{
1080
+ system: z.ZodOptional<z.ZodString>;
1081
+ task_template: z.ZodString;
1082
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1083
+ skill_inherit: z.ZodOptional<z.ZodString>;
1084
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1085
+ system: z.ZodOptional<z.ZodString>;
1086
+ task_template: z.ZodString;
1087
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1088
+ skill_inherit: z.ZodOptional<z.ZodString>;
1089
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1090
+ system: z.ZodOptional<z.ZodString>;
1091
+ task_template: z.ZodString;
1092
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1093
+ skill_inherit: z.ZodOptional<z.ZodString>;
1094
+ }, z.ZodTypeAny, "passthrough">>;
1095
+ skills: z.ZodOptional<z.ZodObject<{
1096
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1097
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1098
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1099
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1100
+ run: z.ZodString;
1101
+ phase: z.ZodEnum<["pre", "post"]>;
1102
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1103
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1104
+ run: z.ZodString;
1105
+ phase: z.ZodEnum<["pre", "post"]>;
1106
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1107
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1108
+ run: z.ZodString;
1109
+ phase: z.ZodEnum<["pre", "post"]>;
1110
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1111
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1112
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1113
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1114
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1115
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1116
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1117
+ run: z.ZodString;
1118
+ phase: z.ZodEnum<["pre", "post"]>;
1119
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1120
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1121
+ run: z.ZodString;
1122
+ phase: z.ZodEnum<["pre", "post"]>;
1123
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1124
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1125
+ run: z.ZodString;
1126
+ phase: z.ZodEnum<["pre", "post"]>;
1127
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1128
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1129
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1130
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1131
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1132
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1133
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1134
+ run: z.ZodString;
1135
+ phase: z.ZodEnum<["pre", "post"]>;
1136
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1137
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1138
+ run: z.ZodString;
1139
+ phase: z.ZodEnum<["pre", "post"]>;
1140
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1141
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1142
+ run: z.ZodString;
1143
+ phase: z.ZodEnum<["pre", "post"]>;
1144
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1145
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1146
+ }, z.ZodTypeAny, "passthrough">>>;
1147
+ capabilities: z.ZodOptional<z.ZodObject<{
1148
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1149
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1150
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1151
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1152
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1153
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1154
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1155
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1156
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1157
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1158
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1159
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1160
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1161
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1162
+ }, z.ZodTypeAny, "passthrough">>>;
1163
+ validation: z.ZodOptional<z.ZodObject<{
1164
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1165
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1166
+ /** Days before STALE escalates to AGED */
1167
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1168
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1169
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1170
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1171
+ /** Days before STALE escalates to AGED */
1172
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1173
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1174
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1175
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1176
+ /** Days before STALE escalates to AGED */
1177
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1178
+ }, z.ZodTypeAny, "passthrough">>>;
1179
+ stall_detection: z.ZodOptional<z.ZodObject<{
1180
+ /** ms of silence while running before warn (default 60_000) */
1181
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1182
+ /** ms of silence while running before marking stale (default 300_000) */
1183
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1184
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1185
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1186
+ /** ms a single tool execution may run before warning (default 120_000) */
1187
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1188
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1189
+ /** ms of silence while running before warn (default 60_000) */
1190
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1191
+ /** ms of silence while running before marking stale (default 300_000) */
1192
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1193
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1194
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1195
+ /** ms a single tool execution may run before warning (default 120_000) */
1196
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1197
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1198
+ /** ms of silence while running before warn (default 60_000) */
1199
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1200
+ /** ms of silence while running before marking stale (default 300_000) */
1201
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1202
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1203
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1204
+ /** ms a single tool execution may run before warning (default 120_000) */
1205
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1206
+ }, z.ZodTypeAny, "passthrough">>>;
1207
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
1208
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1209
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1210
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1211
+ id: z.ZodString;
1212
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1213
+ text: z.ZodString;
1214
+ when: z.ZodOptional<z.ZodString>;
1215
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1216
+ id: z.ZodString;
1217
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1218
+ text: z.ZodString;
1219
+ when: z.ZodOptional<z.ZodString>;
1220
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1221
+ id: z.ZodString;
1222
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1223
+ text: z.ZodString;
1224
+ when: z.ZodOptional<z.ZodString>;
1225
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1226
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1227
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1228
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1229
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1230
+ id: z.ZodString;
1231
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1232
+ text: z.ZodString;
1233
+ when: z.ZodOptional<z.ZodString>;
1234
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1235
+ id: z.ZodString;
1236
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1237
+ text: z.ZodString;
1238
+ when: z.ZodOptional<z.ZodString>;
1239
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1240
+ id: z.ZodString;
1241
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1242
+ text: z.ZodString;
1243
+ when: z.ZodOptional<z.ZodString>;
1244
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1245
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1246
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1247
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1248
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1249
+ id: z.ZodString;
1250
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1251
+ text: z.ZodString;
1252
+ when: z.ZodOptional<z.ZodString>;
1253
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1254
+ id: z.ZodString;
1255
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1256
+ text: z.ZodString;
1257
+ when: z.ZodOptional<z.ZodString>;
1258
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1259
+ id: z.ZodString;
1260
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1261
+ text: z.ZodString;
1262
+ when: z.ZodOptional<z.ZodString>;
1263
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1264
+ }, z.ZodTypeAny, "passthrough">>>;
1265
+ /** Write the final output to this file path after the session completes */
1266
+ output_file: z.ZodOptional<z.ZodString>;
1267
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
1268
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
1269
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1270
+ metadata: z.ZodObject<{
1271
+ name: z.ZodString;
1272
+ version: z.ZodString;
1273
+ description: z.ZodString;
1274
+ category: z.ZodString;
1275
+ updated: z.ZodOptional<z.ZodString>;
1276
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1277
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1278
+ name: z.ZodString;
1279
+ version: z.ZodString;
1280
+ description: z.ZodString;
1281
+ category: z.ZodString;
1282
+ updated: z.ZodOptional<z.ZodString>;
1283
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1284
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1285
+ name: z.ZodString;
1286
+ version: z.ZodString;
1287
+ description: z.ZodString;
1288
+ category: z.ZodString;
1289
+ updated: z.ZodOptional<z.ZodString>;
1290
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1291
+ }, z.ZodTypeAny, "passthrough">>;
1292
+ execution: z.ZodObject<{
1293
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1294
+ model: z.ZodString;
1295
+ fallback_model: z.ZodOptional<z.ZodString>;
1296
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1297
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1298
+ max_retries: z.ZodDefault<z.ZodNumber>;
1299
+ interactive: z.ZodDefault<z.ZodBoolean>;
1300
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1301
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1302
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1303
+ /** Controls which pi tools are available to the agent.
1304
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1305
+ * LOW : + bash (inspect/run, no file edits)
1306
+ * MEDIUM : + edit (can edit existing files)
1307
+ * HIGH : + write (full access — create new files)
1308
+ */
1309
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1310
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1311
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1312
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1313
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1314
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1315
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1316
+ extensions: z.ZodOptional<z.ZodObject<{
1317
+ serena: z.ZodOptional<z.ZodBoolean>;
1318
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1319
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1320
+ serena: z.ZodOptional<z.ZodBoolean>;
1321
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1322
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1323
+ serena: z.ZodOptional<z.ZodBoolean>;
1324
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1325
+ }, z.ZodTypeAny, "passthrough">>>;
1326
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1327
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1328
+ model: z.ZodString;
1329
+ fallback_model: z.ZodOptional<z.ZodString>;
1330
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1331
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1332
+ max_retries: z.ZodDefault<z.ZodNumber>;
1333
+ interactive: z.ZodDefault<z.ZodBoolean>;
1334
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1335
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1336
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1337
+ /** Controls which pi tools are available to the agent.
1338
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1339
+ * LOW : + bash (inspect/run, no file edits)
1340
+ * MEDIUM : + edit (can edit existing files)
1341
+ * HIGH : + write (full access — create new files)
1342
+ */
1343
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1344
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1345
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1346
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1347
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1348
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1349
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1350
+ extensions: z.ZodOptional<z.ZodObject<{
1351
+ serena: z.ZodOptional<z.ZodBoolean>;
1352
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1353
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1354
+ serena: z.ZodOptional<z.ZodBoolean>;
1355
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1356
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1357
+ serena: z.ZodOptional<z.ZodBoolean>;
1358
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1359
+ }, z.ZodTypeAny, "passthrough">>>;
1360
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1361
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1362
+ model: z.ZodString;
1363
+ fallback_model: z.ZodOptional<z.ZodString>;
1364
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1365
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1366
+ max_retries: z.ZodDefault<z.ZodNumber>;
1367
+ interactive: z.ZodDefault<z.ZodBoolean>;
1368
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1369
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1370
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1371
+ /** Controls which pi tools are available to the agent.
1372
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1373
+ * LOW : + bash (inspect/run, no file edits)
1374
+ * MEDIUM : + edit (can edit existing files)
1375
+ * HIGH : + write (full access — create new files)
1376
+ */
1377
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1378
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1379
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1380
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1381
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1382
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1383
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1384
+ extensions: z.ZodOptional<z.ZodObject<{
1385
+ serena: z.ZodOptional<z.ZodBoolean>;
1386
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1387
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1388
+ serena: z.ZodOptional<z.ZodBoolean>;
1389
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1390
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1391
+ serena: z.ZodOptional<z.ZodBoolean>;
1392
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1393
+ }, z.ZodTypeAny, "passthrough">>>;
1394
+ }, z.ZodTypeAny, "passthrough">>;
1395
+ prompt: z.ZodObject<{
1396
+ system: z.ZodOptional<z.ZodString>;
1397
+ task_template: z.ZodString;
1398
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1399
+ skill_inherit: z.ZodOptional<z.ZodString>;
1400
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1401
+ system: z.ZodOptional<z.ZodString>;
1402
+ task_template: z.ZodString;
1403
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1404
+ skill_inherit: z.ZodOptional<z.ZodString>;
1405
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1406
+ system: z.ZodOptional<z.ZodString>;
1407
+ task_template: z.ZodString;
1408
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1409
+ skill_inherit: z.ZodOptional<z.ZodString>;
1410
+ }, z.ZodTypeAny, "passthrough">>;
1411
+ skills: z.ZodOptional<z.ZodObject<{
1412
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1413
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1414
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1415
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1416
+ run: z.ZodString;
1417
+ phase: z.ZodEnum<["pre", "post"]>;
1418
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1419
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1420
+ run: z.ZodString;
1421
+ phase: z.ZodEnum<["pre", "post"]>;
1422
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1423
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1424
+ run: z.ZodString;
1425
+ phase: z.ZodEnum<["pre", "post"]>;
1426
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1427
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1428
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1429
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1430
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1431
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1432
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1433
+ run: z.ZodString;
1434
+ phase: z.ZodEnum<["pre", "post"]>;
1435
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1436
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1437
+ run: z.ZodString;
1438
+ phase: z.ZodEnum<["pre", "post"]>;
1439
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1440
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1441
+ run: z.ZodString;
1442
+ phase: z.ZodEnum<["pre", "post"]>;
1443
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1444
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1445
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1446
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1447
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1448
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1449
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1450
+ run: z.ZodString;
1451
+ phase: z.ZodEnum<["pre", "post"]>;
1452
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1453
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1454
+ run: z.ZodString;
1455
+ phase: z.ZodEnum<["pre", "post"]>;
1456
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1457
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1458
+ run: z.ZodString;
1459
+ phase: z.ZodEnum<["pre", "post"]>;
1460
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1461
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1462
+ }, z.ZodTypeAny, "passthrough">>>;
1463
+ capabilities: z.ZodOptional<z.ZodObject<{
1464
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1465
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1466
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1467
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1468
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1469
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1470
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1471
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1472
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1473
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1474
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1475
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1476
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1477
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1478
+ }, z.ZodTypeAny, "passthrough">>>;
1479
+ validation: z.ZodOptional<z.ZodObject<{
1480
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1481
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1482
+ /** Days before STALE escalates to AGED */
1483
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1484
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1485
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1486
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1487
+ /** Days before STALE escalates to AGED */
1488
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1489
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1490
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1491
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1492
+ /** Days before STALE escalates to AGED */
1493
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1494
+ }, z.ZodTypeAny, "passthrough">>>;
1495
+ stall_detection: z.ZodOptional<z.ZodObject<{
1496
+ /** ms of silence while running before warn (default 60_000) */
1497
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1498
+ /** ms of silence while running before marking stale (default 300_000) */
1499
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1500
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1501
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1502
+ /** ms a single tool execution may run before warning (default 120_000) */
1503
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1504
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1505
+ /** ms of silence while running before warn (default 60_000) */
1506
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1507
+ /** ms of silence while running before marking stale (default 300_000) */
1508
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1509
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1510
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1511
+ /** ms a single tool execution may run before warning (default 120_000) */
1512
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1513
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1514
+ /** ms of silence while running before warn (default 60_000) */
1515
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1516
+ /** ms of silence while running before marking stale (default 300_000) */
1517
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1518
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1519
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1520
+ /** ms a single tool execution may run before warning (default 120_000) */
1521
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1522
+ }, z.ZodTypeAny, "passthrough">>>;
1523
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
1524
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1525
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1526
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1527
+ id: z.ZodString;
1528
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1529
+ text: z.ZodString;
1530
+ when: z.ZodOptional<z.ZodString>;
1531
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1532
+ id: z.ZodString;
1533
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1534
+ text: z.ZodString;
1535
+ when: z.ZodOptional<z.ZodString>;
1536
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1537
+ id: z.ZodString;
1538
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1539
+ text: z.ZodString;
1540
+ when: z.ZodOptional<z.ZodString>;
1541
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1542
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1543
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1544
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1545
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1546
+ id: z.ZodString;
1547
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1548
+ text: z.ZodString;
1549
+ when: z.ZodOptional<z.ZodString>;
1550
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1551
+ id: z.ZodString;
1552
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1553
+ text: z.ZodString;
1554
+ when: z.ZodOptional<z.ZodString>;
1555
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1556
+ id: z.ZodString;
1557
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1558
+ text: z.ZodString;
1559
+ when: z.ZodOptional<z.ZodString>;
1560
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1561
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1562
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1563
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1564
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1565
+ id: z.ZodString;
1566
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1567
+ text: z.ZodString;
1568
+ when: z.ZodOptional<z.ZodString>;
1569
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1570
+ id: z.ZodString;
1571
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1572
+ text: z.ZodString;
1573
+ when: z.ZodOptional<z.ZodString>;
1574
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1575
+ id: z.ZodString;
1576
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1577
+ text: z.ZodString;
1578
+ when: z.ZodOptional<z.ZodString>;
1579
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1580
+ }, z.ZodTypeAny, "passthrough">>>;
1581
+ /** Write the final output to this file path after the session completes */
1582
+ output_file: z.ZodOptional<z.ZodString>;
1583
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
1584
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
1585
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1586
+ metadata: z.ZodObject<{
1587
+ name: z.ZodString;
1588
+ version: z.ZodString;
1589
+ description: z.ZodString;
1590
+ category: z.ZodString;
1591
+ updated: z.ZodOptional<z.ZodString>;
1592
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1593
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1594
+ name: z.ZodString;
1595
+ version: z.ZodString;
1596
+ description: z.ZodString;
1597
+ category: z.ZodString;
1598
+ updated: z.ZodOptional<z.ZodString>;
1599
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1600
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1601
+ name: z.ZodString;
1602
+ version: z.ZodString;
1603
+ description: z.ZodString;
1604
+ category: z.ZodString;
1605
+ updated: z.ZodOptional<z.ZodString>;
1606
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1607
+ }, z.ZodTypeAny, "passthrough">>;
1608
+ execution: z.ZodObject<{
1609
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1610
+ model: z.ZodString;
1611
+ fallback_model: z.ZodOptional<z.ZodString>;
1612
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1613
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1614
+ max_retries: z.ZodDefault<z.ZodNumber>;
1615
+ interactive: z.ZodDefault<z.ZodBoolean>;
1616
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1617
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1618
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1619
+ /** Controls which pi tools are available to the agent.
1620
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1621
+ * LOW : + bash (inspect/run, no file edits)
1622
+ * MEDIUM : + edit (can edit existing files)
1623
+ * HIGH : + write (full access — create new files)
1624
+ */
1625
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1626
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1627
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1628
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1629
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1630
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1631
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1632
+ extensions: z.ZodOptional<z.ZodObject<{
1633
+ serena: z.ZodOptional<z.ZodBoolean>;
1634
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1635
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1636
+ serena: z.ZodOptional<z.ZodBoolean>;
1637
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1638
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1639
+ serena: z.ZodOptional<z.ZodBoolean>;
1640
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1641
+ }, z.ZodTypeAny, "passthrough">>>;
1642
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1643
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1644
+ model: z.ZodString;
1645
+ fallback_model: z.ZodOptional<z.ZodString>;
1646
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1647
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1648
+ max_retries: z.ZodDefault<z.ZodNumber>;
1649
+ interactive: z.ZodDefault<z.ZodBoolean>;
1650
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1651
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1652
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1653
+ /** Controls which pi tools are available to the agent.
1654
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1655
+ * LOW : + bash (inspect/run, no file edits)
1656
+ * MEDIUM : + edit (can edit existing files)
1657
+ * HIGH : + write (full access — create new files)
1658
+ */
1659
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1660
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1661
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1662
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1663
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1664
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1665
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1666
+ extensions: z.ZodOptional<z.ZodObject<{
1667
+ serena: z.ZodOptional<z.ZodBoolean>;
1668
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1669
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1670
+ serena: z.ZodOptional<z.ZodBoolean>;
1671
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1672
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1673
+ serena: z.ZodOptional<z.ZodBoolean>;
1674
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1675
+ }, z.ZodTypeAny, "passthrough">>>;
1676
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1677
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1678
+ model: z.ZodString;
1679
+ fallback_model: z.ZodOptional<z.ZodString>;
1680
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1681
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1682
+ max_retries: z.ZodDefault<z.ZodNumber>;
1683
+ interactive: z.ZodDefault<z.ZodBoolean>;
1684
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1685
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1686
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1687
+ /** Controls which pi tools are available to the agent.
1688
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1689
+ * LOW : + bash (inspect/run, no file edits)
1690
+ * MEDIUM : + edit (can edit existing files)
1691
+ * HIGH : + write (full access — create new files)
1692
+ */
1693
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1694
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1695
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1696
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1697
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1698
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1699
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1700
+ extensions: z.ZodOptional<z.ZodObject<{
1701
+ serena: z.ZodOptional<z.ZodBoolean>;
1702
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1703
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1704
+ serena: z.ZodOptional<z.ZodBoolean>;
1705
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1706
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1707
+ serena: z.ZodOptional<z.ZodBoolean>;
1708
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1709
+ }, z.ZodTypeAny, "passthrough">>>;
1710
+ }, z.ZodTypeAny, "passthrough">>;
1711
+ prompt: z.ZodObject<{
1712
+ system: z.ZodOptional<z.ZodString>;
1713
+ task_template: z.ZodString;
1714
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1715
+ skill_inherit: z.ZodOptional<z.ZodString>;
1716
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1717
+ system: z.ZodOptional<z.ZodString>;
1718
+ task_template: z.ZodString;
1719
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1720
+ skill_inherit: z.ZodOptional<z.ZodString>;
1721
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1722
+ system: z.ZodOptional<z.ZodString>;
1723
+ task_template: z.ZodString;
1724
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1725
+ skill_inherit: z.ZodOptional<z.ZodString>;
1726
+ }, z.ZodTypeAny, "passthrough">>;
1727
+ skills: z.ZodOptional<z.ZodObject<{
1728
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1729
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1730
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1731
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1732
+ run: z.ZodString;
1733
+ phase: z.ZodEnum<["pre", "post"]>;
1734
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1735
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1736
+ run: z.ZodString;
1737
+ phase: z.ZodEnum<["pre", "post"]>;
1738
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1739
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1740
+ run: z.ZodString;
1741
+ phase: z.ZodEnum<["pre", "post"]>;
1742
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1743
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1744
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1745
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1746
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1747
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1748
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1749
+ run: z.ZodString;
1750
+ phase: z.ZodEnum<["pre", "post"]>;
1751
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1752
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1753
+ run: z.ZodString;
1754
+ phase: z.ZodEnum<["pre", "post"]>;
1755
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1756
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1757
+ run: z.ZodString;
1758
+ phase: z.ZodEnum<["pre", "post"]>;
1759
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1760
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1761
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1762
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
1763
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1764
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
1765
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1766
+ run: z.ZodString;
1767
+ phase: z.ZodEnum<["pre", "post"]>;
1768
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1769
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1770
+ run: z.ZodString;
1771
+ phase: z.ZodEnum<["pre", "post"]>;
1772
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1773
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1774
+ run: z.ZodString;
1775
+ phase: z.ZodEnum<["pre", "post"]>;
1776
+ inject_output: z.ZodDefault<z.ZodBoolean>;
1777
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1778
+ }, z.ZodTypeAny, "passthrough">>>;
1779
+ capabilities: z.ZodOptional<z.ZodObject<{
1780
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1781
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1782
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1783
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1784
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1785
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1786
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1787
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1788
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1789
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1790
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
1791
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1792
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
1793
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1794
+ }, z.ZodTypeAny, "passthrough">>>;
1795
+ validation: z.ZodOptional<z.ZodObject<{
1796
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1797
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1798
+ /** Days before STALE escalates to AGED */
1799
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1800
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1801
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1802
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1803
+ /** Days before STALE escalates to AGED */
1804
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1805
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1806
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
1807
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1808
+ /** Days before STALE escalates to AGED */
1809
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
1810
+ }, z.ZodTypeAny, "passthrough">>>;
1811
+ stall_detection: z.ZodOptional<z.ZodObject<{
1812
+ /** ms of silence while running before warn (default 60_000) */
1813
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1814
+ /** ms of silence while running before marking stale (default 300_000) */
1815
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1816
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1817
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1818
+ /** ms a single tool execution may run before warning (default 120_000) */
1819
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1820
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1821
+ /** ms of silence while running before warn (default 60_000) */
1822
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1823
+ /** ms of silence while running before marking stale (default 300_000) */
1824
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1825
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1826
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1827
+ /** ms a single tool execution may run before warning (default 120_000) */
1828
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1829
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1830
+ /** ms of silence while running before warn (default 60_000) */
1831
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
1832
+ /** ms of silence while running before marking stale (default 300_000) */
1833
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
1834
+ /** ms in waiting state before emitting warning (default 3_600_000) */
1835
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
1836
+ /** ms a single tool execution may run before warning (default 120_000) */
1837
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
1838
+ }, z.ZodTypeAny, "passthrough">>>;
1839
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
1840
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1841
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1842
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1843
+ id: z.ZodString;
1844
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1845
+ text: z.ZodString;
1846
+ when: z.ZodOptional<z.ZodString>;
1847
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1848
+ id: z.ZodString;
1849
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1850
+ text: z.ZodString;
1851
+ when: z.ZodOptional<z.ZodString>;
1852
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1853
+ id: z.ZodString;
1854
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1855
+ text: z.ZodString;
1856
+ when: z.ZodOptional<z.ZodString>;
1857
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1858
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1859
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1860
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1861
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1862
+ id: z.ZodString;
1863
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1864
+ text: z.ZodString;
1865
+ when: z.ZodOptional<z.ZodString>;
1866
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1867
+ id: z.ZodString;
1868
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1869
+ text: z.ZodString;
1870
+ when: z.ZodOptional<z.ZodString>;
1871
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1872
+ id: z.ZodString;
1873
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1874
+ text: z.ZodString;
1875
+ when: z.ZodOptional<z.ZodString>;
1876
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1877
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1878
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1879
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
1880
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1881
+ id: z.ZodString;
1882
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1883
+ text: z.ZodString;
1884
+ when: z.ZodOptional<z.ZodString>;
1885
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1886
+ id: z.ZodString;
1887
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1888
+ text: z.ZodString;
1889
+ when: z.ZodOptional<z.ZodString>;
1890
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1891
+ id: z.ZodString;
1892
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
1893
+ text: z.ZodString;
1894
+ when: z.ZodOptional<z.ZodString>;
1895
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1896
+ }, z.ZodTypeAny, "passthrough">>>;
1897
+ /** Write the final output to this file path after the session completes */
1898
+ output_file: z.ZodOptional<z.ZodString>;
1899
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
1900
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
1901
+ }, z.ZodTypeAny, "passthrough">>;
1902
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1903
+ specialist: z.ZodObject<{
1904
+ metadata: z.ZodObject<{
1905
+ name: z.ZodString;
1906
+ version: z.ZodString;
1907
+ description: z.ZodString;
1908
+ category: z.ZodString;
1909
+ updated: z.ZodOptional<z.ZodString>;
1910
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1911
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1912
+ name: z.ZodString;
1913
+ version: z.ZodString;
1914
+ description: z.ZodString;
1915
+ category: z.ZodString;
1916
+ updated: z.ZodOptional<z.ZodString>;
1917
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1918
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1919
+ name: z.ZodString;
1920
+ version: z.ZodString;
1921
+ description: z.ZodString;
1922
+ category: z.ZodString;
1923
+ updated: z.ZodOptional<z.ZodString>;
1924
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1925
+ }, z.ZodTypeAny, "passthrough">>;
1926
+ execution: z.ZodObject<{
1927
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1928
+ model: z.ZodString;
1929
+ fallback_model: z.ZodOptional<z.ZodString>;
1930
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1931
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1932
+ max_retries: z.ZodDefault<z.ZodNumber>;
1933
+ interactive: z.ZodDefault<z.ZodBoolean>;
1934
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1935
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1936
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1937
+ /** Controls which pi tools are available to the agent.
1938
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1939
+ * LOW : + bash (inspect/run, no file edits)
1940
+ * MEDIUM : + edit (can edit existing files)
1941
+ * HIGH : + write (full access — create new files)
1942
+ */
1943
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1944
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1945
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1946
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1947
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1948
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1949
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1950
+ extensions: z.ZodOptional<z.ZodObject<{
1951
+ serena: z.ZodOptional<z.ZodBoolean>;
1952
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1953
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1954
+ serena: z.ZodOptional<z.ZodBoolean>;
1955
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1956
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1957
+ serena: z.ZodOptional<z.ZodBoolean>;
1958
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1959
+ }, z.ZodTypeAny, "passthrough">>>;
1960
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1961
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1962
+ model: z.ZodString;
1963
+ fallback_model: z.ZodOptional<z.ZodString>;
1964
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1965
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
1966
+ max_retries: z.ZodDefault<z.ZodNumber>;
1967
+ interactive: z.ZodDefault<z.ZodBoolean>;
1968
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
1969
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
1970
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
1971
+ /** Controls which pi tools are available to the agent.
1972
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
1973
+ * LOW : + bash (inspect/run, no file edits)
1974
+ * MEDIUM : + edit (can edit existing files)
1975
+ * HIGH : + write (full access — create new files)
1976
+ */
1977
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
1978
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
1979
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
1980
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
1981
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
1982
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
1983
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
1984
+ extensions: z.ZodOptional<z.ZodObject<{
1985
+ serena: z.ZodOptional<z.ZodBoolean>;
1986
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1987
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1988
+ serena: z.ZodOptional<z.ZodBoolean>;
1989
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1990
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1991
+ serena: z.ZodOptional<z.ZodBoolean>;
1992
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
1993
+ }, z.ZodTypeAny, "passthrough">>>;
1994
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1995
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
1996
+ model: z.ZodString;
1997
+ fallback_model: z.ZodOptional<z.ZodString>;
1998
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
1999
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
2000
+ max_retries: z.ZodDefault<z.ZodNumber>;
2001
+ interactive: z.ZodDefault<z.ZodBoolean>;
2002
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
2003
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
2004
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
2005
+ /** Controls which pi tools are available to the agent.
2006
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
2007
+ * LOW : + bash (inspect/run, no file edits)
2008
+ * MEDIUM : + edit (can edit existing files)
2009
+ * HIGH : + write (full access — create new files)
2010
+ */
2011
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
2012
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
2013
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
2014
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
2015
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
2016
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
2017
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
2018
+ extensions: z.ZodOptional<z.ZodObject<{
2019
+ serena: z.ZodOptional<z.ZodBoolean>;
2020
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2021
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2022
+ serena: z.ZodOptional<z.ZodBoolean>;
2023
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2024
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2025
+ serena: z.ZodOptional<z.ZodBoolean>;
2026
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2027
+ }, z.ZodTypeAny, "passthrough">>>;
2028
+ }, z.ZodTypeAny, "passthrough">>;
2029
+ prompt: z.ZodObject<{
2030
+ system: z.ZodOptional<z.ZodString>;
2031
+ task_template: z.ZodString;
2032
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2033
+ skill_inherit: z.ZodOptional<z.ZodString>;
2034
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2035
+ system: z.ZodOptional<z.ZodString>;
2036
+ task_template: z.ZodString;
2037
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2038
+ skill_inherit: z.ZodOptional<z.ZodString>;
2039
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2040
+ system: z.ZodOptional<z.ZodString>;
2041
+ task_template: z.ZodString;
2042
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2043
+ skill_inherit: z.ZodOptional<z.ZodString>;
2044
+ }, z.ZodTypeAny, "passthrough">>;
2045
+ skills: z.ZodOptional<z.ZodObject<{
2046
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2047
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2048
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2049
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2050
+ run: z.ZodString;
2051
+ phase: z.ZodEnum<["pre", "post"]>;
2052
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2053
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2054
+ run: z.ZodString;
2055
+ phase: z.ZodEnum<["pre", "post"]>;
2056
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2057
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2058
+ run: z.ZodString;
2059
+ phase: z.ZodEnum<["pre", "post"]>;
2060
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2061
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2062
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2063
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2064
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2065
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2066
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2067
+ run: z.ZodString;
2068
+ phase: z.ZodEnum<["pre", "post"]>;
2069
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2070
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2071
+ run: z.ZodString;
2072
+ phase: z.ZodEnum<["pre", "post"]>;
2073
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2074
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2075
+ run: z.ZodString;
2076
+ phase: z.ZodEnum<["pre", "post"]>;
2077
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2078
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2079
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2080
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2081
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2082
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2083
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2084
+ run: z.ZodString;
2085
+ phase: z.ZodEnum<["pre", "post"]>;
2086
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2087
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2088
+ run: z.ZodString;
2089
+ phase: z.ZodEnum<["pre", "post"]>;
2090
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2091
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2092
+ run: z.ZodString;
2093
+ phase: z.ZodEnum<["pre", "post"]>;
2094
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2095
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2096
+ }, z.ZodTypeAny, "passthrough">>>;
2097
+ capabilities: z.ZodOptional<z.ZodObject<{
2098
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2099
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2100
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2101
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2102
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2103
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2104
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2105
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2106
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2107
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2108
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2109
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2110
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2111
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2112
+ }, z.ZodTypeAny, "passthrough">>>;
2113
+ validation: z.ZodOptional<z.ZodObject<{
2114
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2115
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2116
+ /** Days before STALE escalates to AGED */
2117
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2118
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2119
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2120
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2121
+ /** Days before STALE escalates to AGED */
2122
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2123
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2124
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2125
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2126
+ /** Days before STALE escalates to AGED */
2127
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2128
+ }, z.ZodTypeAny, "passthrough">>>;
2129
+ stall_detection: z.ZodOptional<z.ZodObject<{
2130
+ /** ms of silence while running before warn (default 60_000) */
2131
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2132
+ /** ms of silence while running before marking stale (default 300_000) */
2133
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2134
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2135
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2136
+ /** ms a single tool execution may run before warning (default 120_000) */
2137
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2138
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2139
+ /** ms of silence while running before warn (default 60_000) */
2140
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2141
+ /** ms of silence while running before marking stale (default 300_000) */
2142
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2143
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2144
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2145
+ /** ms a single tool execution may run before warning (default 120_000) */
2146
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2147
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2148
+ /** ms of silence while running before warn (default 60_000) */
2149
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2150
+ /** ms of silence while running before marking stale (default 300_000) */
2151
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2152
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2153
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2154
+ /** ms a single tool execution may run before warning (default 120_000) */
2155
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2156
+ }, z.ZodTypeAny, "passthrough">>>;
2157
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
2158
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2159
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2160
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2161
+ id: z.ZodString;
2162
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2163
+ text: z.ZodString;
2164
+ when: z.ZodOptional<z.ZodString>;
2165
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2166
+ id: z.ZodString;
2167
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2168
+ text: z.ZodString;
2169
+ when: z.ZodOptional<z.ZodString>;
2170
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2171
+ id: z.ZodString;
2172
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2173
+ text: z.ZodString;
2174
+ when: z.ZodOptional<z.ZodString>;
2175
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2176
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2177
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2178
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2179
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2180
+ id: z.ZodString;
2181
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2182
+ text: z.ZodString;
2183
+ when: z.ZodOptional<z.ZodString>;
2184
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2185
+ id: z.ZodString;
2186
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2187
+ text: z.ZodString;
2188
+ when: z.ZodOptional<z.ZodString>;
2189
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2190
+ id: z.ZodString;
2191
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2192
+ text: z.ZodString;
2193
+ when: z.ZodOptional<z.ZodString>;
2194
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2195
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2196
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2197
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2198
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2199
+ id: z.ZodString;
2200
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2201
+ text: z.ZodString;
2202
+ when: z.ZodOptional<z.ZodString>;
2203
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2204
+ id: z.ZodString;
2205
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2206
+ text: z.ZodString;
2207
+ when: z.ZodOptional<z.ZodString>;
2208
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2209
+ id: z.ZodString;
2210
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2211
+ text: z.ZodString;
2212
+ when: z.ZodOptional<z.ZodString>;
2213
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2214
+ }, z.ZodTypeAny, "passthrough">>>;
2215
+ /** Write the final output to this file path after the session completes */
2216
+ output_file: z.ZodOptional<z.ZodString>;
2217
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
2218
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
2219
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2220
+ metadata: z.ZodObject<{
2221
+ name: z.ZodString;
2222
+ version: z.ZodString;
2223
+ description: z.ZodString;
2224
+ category: z.ZodString;
2225
+ updated: z.ZodOptional<z.ZodString>;
2226
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2227
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2228
+ name: z.ZodString;
2229
+ version: z.ZodString;
2230
+ description: z.ZodString;
2231
+ category: z.ZodString;
2232
+ updated: z.ZodOptional<z.ZodString>;
2233
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2234
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2235
+ name: z.ZodString;
2236
+ version: z.ZodString;
2237
+ description: z.ZodString;
2238
+ category: z.ZodString;
2239
+ updated: z.ZodOptional<z.ZodString>;
2240
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2241
+ }, z.ZodTypeAny, "passthrough">>;
2242
+ execution: z.ZodObject<{
2243
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
2244
+ model: z.ZodString;
2245
+ fallback_model: z.ZodOptional<z.ZodString>;
2246
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
2247
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
2248
+ max_retries: z.ZodDefault<z.ZodNumber>;
2249
+ interactive: z.ZodDefault<z.ZodBoolean>;
2250
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
2251
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
2252
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
2253
+ /** Controls which pi tools are available to the agent.
2254
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
2255
+ * LOW : + bash (inspect/run, no file edits)
2256
+ * MEDIUM : + edit (can edit existing files)
2257
+ * HIGH : + write (full access — create new files)
2258
+ */
2259
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
2260
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
2261
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
2262
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
2263
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
2264
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
2265
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
2266
+ extensions: z.ZodOptional<z.ZodObject<{
2267
+ serena: z.ZodOptional<z.ZodBoolean>;
2268
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2269
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2270
+ serena: z.ZodOptional<z.ZodBoolean>;
2271
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2272
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2273
+ serena: z.ZodOptional<z.ZodBoolean>;
2274
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2275
+ }, z.ZodTypeAny, "passthrough">>>;
2276
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2277
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
2278
+ model: z.ZodString;
2279
+ fallback_model: z.ZodOptional<z.ZodString>;
2280
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
2281
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
2282
+ max_retries: z.ZodDefault<z.ZodNumber>;
2283
+ interactive: z.ZodDefault<z.ZodBoolean>;
2284
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
2285
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
2286
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
2287
+ /** Controls which pi tools are available to the agent.
2288
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
2289
+ * LOW : + bash (inspect/run, no file edits)
2290
+ * MEDIUM : + edit (can edit existing files)
2291
+ * HIGH : + write (full access — create new files)
2292
+ */
2293
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
2294
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
2295
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
2296
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
2297
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
2298
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
2299
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
2300
+ extensions: z.ZodOptional<z.ZodObject<{
2301
+ serena: z.ZodOptional<z.ZodBoolean>;
2302
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2303
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2304
+ serena: z.ZodOptional<z.ZodBoolean>;
2305
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2306
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2307
+ serena: z.ZodOptional<z.ZodBoolean>;
2308
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2309
+ }, z.ZodTypeAny, "passthrough">>>;
2310
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2311
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
2312
+ model: z.ZodString;
2313
+ fallback_model: z.ZodOptional<z.ZodString>;
2314
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
2315
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
2316
+ max_retries: z.ZodDefault<z.ZodNumber>;
2317
+ interactive: z.ZodDefault<z.ZodBoolean>;
2318
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
2319
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
2320
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
2321
+ /** Controls which pi tools are available to the agent.
2322
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
2323
+ * LOW : + bash (inspect/run, no file edits)
2324
+ * MEDIUM : + edit (can edit existing files)
2325
+ * HIGH : + write (full access — create new files)
2326
+ */
2327
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
2328
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
2329
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
2330
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
2331
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
2332
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
2333
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
2334
+ extensions: z.ZodOptional<z.ZodObject<{
2335
+ serena: z.ZodOptional<z.ZodBoolean>;
2336
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2337
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2338
+ serena: z.ZodOptional<z.ZodBoolean>;
2339
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2340
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2341
+ serena: z.ZodOptional<z.ZodBoolean>;
2342
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2343
+ }, z.ZodTypeAny, "passthrough">>>;
2344
+ }, z.ZodTypeAny, "passthrough">>;
2345
+ prompt: z.ZodObject<{
2346
+ system: z.ZodOptional<z.ZodString>;
2347
+ task_template: z.ZodString;
2348
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2349
+ skill_inherit: z.ZodOptional<z.ZodString>;
2350
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2351
+ system: z.ZodOptional<z.ZodString>;
2352
+ task_template: z.ZodString;
2353
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2354
+ skill_inherit: z.ZodOptional<z.ZodString>;
2355
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2356
+ system: z.ZodOptional<z.ZodString>;
2357
+ task_template: z.ZodString;
2358
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2359
+ skill_inherit: z.ZodOptional<z.ZodString>;
2360
+ }, z.ZodTypeAny, "passthrough">>;
2361
+ skills: z.ZodOptional<z.ZodObject<{
2362
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2363
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2364
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2365
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2366
+ run: z.ZodString;
2367
+ phase: z.ZodEnum<["pre", "post"]>;
2368
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2369
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2370
+ run: z.ZodString;
2371
+ phase: z.ZodEnum<["pre", "post"]>;
2372
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2373
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2374
+ run: z.ZodString;
2375
+ phase: z.ZodEnum<["pre", "post"]>;
2376
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2377
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2378
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2379
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2380
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2381
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2382
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2383
+ run: z.ZodString;
2384
+ phase: z.ZodEnum<["pre", "post"]>;
2385
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2386
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2387
+ run: z.ZodString;
2388
+ phase: z.ZodEnum<["pre", "post"]>;
2389
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2390
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2391
+ run: z.ZodString;
2392
+ phase: z.ZodEnum<["pre", "post"]>;
2393
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2394
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2395
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2396
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2397
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2398
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2399
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2400
+ run: z.ZodString;
2401
+ phase: z.ZodEnum<["pre", "post"]>;
2402
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2403
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2404
+ run: z.ZodString;
2405
+ phase: z.ZodEnum<["pre", "post"]>;
2406
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2407
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2408
+ run: z.ZodString;
2409
+ phase: z.ZodEnum<["pre", "post"]>;
2410
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2411
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2412
+ }, z.ZodTypeAny, "passthrough">>>;
2413
+ capabilities: z.ZodOptional<z.ZodObject<{
2414
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2415
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2416
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2417
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2418
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2419
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2420
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2421
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2422
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2423
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2424
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2425
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2426
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2427
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2428
+ }, z.ZodTypeAny, "passthrough">>>;
2429
+ validation: z.ZodOptional<z.ZodObject<{
2430
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2431
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2432
+ /** Days before STALE escalates to AGED */
2433
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2434
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2435
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2436
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2437
+ /** Days before STALE escalates to AGED */
2438
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2439
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2440
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2441
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2442
+ /** Days before STALE escalates to AGED */
2443
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2444
+ }, z.ZodTypeAny, "passthrough">>>;
2445
+ stall_detection: z.ZodOptional<z.ZodObject<{
2446
+ /** ms of silence while running before warn (default 60_000) */
2447
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2448
+ /** ms of silence while running before marking stale (default 300_000) */
2449
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2450
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2451
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2452
+ /** ms a single tool execution may run before warning (default 120_000) */
2453
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2454
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2455
+ /** ms of silence while running before warn (default 60_000) */
2456
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2457
+ /** ms of silence while running before marking stale (default 300_000) */
2458
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2459
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2460
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2461
+ /** ms a single tool execution may run before warning (default 120_000) */
2462
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2463
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2464
+ /** ms of silence while running before warn (default 60_000) */
2465
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2466
+ /** ms of silence while running before marking stale (default 300_000) */
2467
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2468
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2469
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2470
+ /** ms a single tool execution may run before warning (default 120_000) */
2471
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2472
+ }, z.ZodTypeAny, "passthrough">>>;
2473
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
2474
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2475
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2476
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2477
+ id: z.ZodString;
2478
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2479
+ text: z.ZodString;
2480
+ when: z.ZodOptional<z.ZodString>;
2481
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2482
+ id: z.ZodString;
2483
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2484
+ text: z.ZodString;
2485
+ when: z.ZodOptional<z.ZodString>;
2486
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2487
+ id: z.ZodString;
2488
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2489
+ text: z.ZodString;
2490
+ when: z.ZodOptional<z.ZodString>;
2491
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2492
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2493
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2494
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2495
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2496
+ id: z.ZodString;
2497
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2498
+ text: z.ZodString;
2499
+ when: z.ZodOptional<z.ZodString>;
2500
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2501
+ id: z.ZodString;
2502
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2503
+ text: z.ZodString;
2504
+ when: z.ZodOptional<z.ZodString>;
2505
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2506
+ id: z.ZodString;
2507
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2508
+ text: z.ZodString;
2509
+ when: z.ZodOptional<z.ZodString>;
2510
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2511
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2512
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2513
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2514
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2515
+ id: z.ZodString;
2516
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2517
+ text: z.ZodString;
2518
+ when: z.ZodOptional<z.ZodString>;
2519
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2520
+ id: z.ZodString;
2521
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2522
+ text: z.ZodString;
2523
+ when: z.ZodOptional<z.ZodString>;
2524
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2525
+ id: z.ZodString;
2526
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2527
+ text: z.ZodString;
2528
+ when: z.ZodOptional<z.ZodString>;
2529
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2530
+ }, z.ZodTypeAny, "passthrough">>>;
2531
+ /** Write the final output to this file path after the session completes */
2532
+ output_file: z.ZodOptional<z.ZodString>;
2533
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
2534
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
2535
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2536
+ metadata: z.ZodObject<{
2537
+ name: z.ZodString;
2538
+ version: z.ZodString;
2539
+ description: z.ZodString;
2540
+ category: z.ZodString;
2541
+ updated: z.ZodOptional<z.ZodString>;
2542
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2543
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2544
+ name: z.ZodString;
2545
+ version: z.ZodString;
2546
+ description: z.ZodString;
2547
+ category: z.ZodString;
2548
+ updated: z.ZodOptional<z.ZodString>;
2549
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2550
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2551
+ name: z.ZodString;
2552
+ version: z.ZodString;
2553
+ description: z.ZodString;
2554
+ category: z.ZodString;
2555
+ updated: z.ZodOptional<z.ZodString>;
2556
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2557
+ }, z.ZodTypeAny, "passthrough">>;
2558
+ execution: z.ZodObject<{
2559
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
2560
+ model: z.ZodString;
2561
+ fallback_model: z.ZodOptional<z.ZodString>;
2562
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
2563
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
2564
+ max_retries: z.ZodDefault<z.ZodNumber>;
2565
+ interactive: z.ZodDefault<z.ZodBoolean>;
2566
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
2567
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
2568
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
2569
+ /** Controls which pi tools are available to the agent.
2570
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
2571
+ * LOW : + bash (inspect/run, no file edits)
2572
+ * MEDIUM : + edit (can edit existing files)
2573
+ * HIGH : + write (full access — create new files)
2574
+ */
2575
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
2576
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
2577
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
2578
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
2579
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
2580
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
2581
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
2582
+ extensions: z.ZodOptional<z.ZodObject<{
2583
+ serena: z.ZodOptional<z.ZodBoolean>;
2584
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2585
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2586
+ serena: z.ZodOptional<z.ZodBoolean>;
2587
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2588
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2589
+ serena: z.ZodOptional<z.ZodBoolean>;
2590
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2591
+ }, z.ZodTypeAny, "passthrough">>>;
2592
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2593
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
2594
+ model: z.ZodString;
2595
+ fallback_model: z.ZodOptional<z.ZodString>;
2596
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
2597
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
2598
+ max_retries: z.ZodDefault<z.ZodNumber>;
2599
+ interactive: z.ZodDefault<z.ZodBoolean>;
2600
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
2601
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
2602
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
2603
+ /** Controls which pi tools are available to the agent.
2604
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
2605
+ * LOW : + bash (inspect/run, no file edits)
2606
+ * MEDIUM : + edit (can edit existing files)
2607
+ * HIGH : + write (full access — create new files)
2608
+ */
2609
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
2610
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
2611
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
2612
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
2613
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
2614
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
2615
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
2616
+ extensions: z.ZodOptional<z.ZodObject<{
2617
+ serena: z.ZodOptional<z.ZodBoolean>;
2618
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2619
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2620
+ serena: z.ZodOptional<z.ZodBoolean>;
2621
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2622
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2623
+ serena: z.ZodOptional<z.ZodBoolean>;
2624
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2625
+ }, z.ZodTypeAny, "passthrough">>>;
2626
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2627
+ mode: z.ZodDefault<z.ZodEnum<["tool", "skill", "auto"]>>;
2628
+ model: z.ZodString;
2629
+ fallback_model: z.ZodOptional<z.ZodString>;
2630
+ timeout_ms: z.ZodDefault<z.ZodNumber>;
2631
+ stall_timeout_ms: z.ZodOptional<z.ZodNumber>;
2632
+ max_retries: z.ZodDefault<z.ZodNumber>;
2633
+ interactive: z.ZodDefault<z.ZodBoolean>;
2634
+ response_format: z.ZodDefault<z.ZodEnum<["text", "json", "markdown"]>>;
2635
+ /** Semantic output archetype used for structured output contracts and schema extensions. */
2636
+ output_type: z.ZodDefault<z.ZodEnum<["codegen", "analysis", "review", "synthesis", "orchestration", "workflow", "research", "custom"]>>;
2637
+ /** Controls which pi tools are available to the agent.
2638
+ * READ_ONLY : read, grep, find, ls (no bash, no writes)
2639
+ * LOW : + bash (inspect/run, no file edits)
2640
+ * MEDIUM : + edit (can edit existing files)
2641
+ * HIGH : + write (full access — create new files)
2642
+ */
2643
+ permission_required: z.ZodDefault<z.ZodEnum<["READ_ONLY", "LOW", "MEDIUM", "HIGH"]>>;
2644
+ /** Whether specialist requires worktree isolation. Set false for workflow specialists that write shared state (.xtrm/memory.md) and should commit directly to master. */
2645
+ requires_worktree: z.ZodDefault<z.ZodBoolean>;
2646
+ /** Pass --thinking <level> to pi. Models that don't support thinking ignore this. */
2647
+ thinking_level: z.ZodOptional<z.ZodEnum<["off", "minimal", "low", "medium", "high", "xhigh"]>>;
2648
+ auto_commit: z.ZodDefault<z.ZodEnum<["never", "checkpoint_on_waiting", "checkpoint_on_terminal"]>>;
2649
+ /** Optional per-session extension toggles. `false` disables injection of extension. */
2650
+ extensions: z.ZodOptional<z.ZodObject<{
2651
+ serena: z.ZodOptional<z.ZodBoolean>;
2652
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2653
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2654
+ serena: z.ZodOptional<z.ZodBoolean>;
2655
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2656
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2657
+ serena: z.ZodOptional<z.ZodBoolean>;
2658
+ gitnexus: z.ZodOptional<z.ZodBoolean>;
2659
+ }, z.ZodTypeAny, "passthrough">>>;
2660
+ }, z.ZodTypeAny, "passthrough">>;
2661
+ prompt: z.ZodObject<{
2662
+ system: z.ZodOptional<z.ZodString>;
2663
+ task_template: z.ZodString;
2664
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2665
+ skill_inherit: z.ZodOptional<z.ZodString>;
2666
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2667
+ system: z.ZodOptional<z.ZodString>;
2668
+ task_template: z.ZodString;
2669
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2670
+ skill_inherit: z.ZodOptional<z.ZodString>;
2671
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2672
+ system: z.ZodOptional<z.ZodString>;
2673
+ task_template: z.ZodString;
2674
+ output_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2675
+ skill_inherit: z.ZodOptional<z.ZodString>;
2676
+ }, z.ZodTypeAny, "passthrough">>;
2677
+ skills: z.ZodOptional<z.ZodObject<{
2678
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2679
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2680
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2681
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2682
+ run: z.ZodString;
2683
+ phase: z.ZodEnum<["pre", "post"]>;
2684
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2685
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2686
+ run: z.ZodString;
2687
+ phase: z.ZodEnum<["pre", "post"]>;
2688
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2689
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2690
+ run: z.ZodString;
2691
+ phase: z.ZodEnum<["pre", "post"]>;
2692
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2693
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2694
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2695
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2696
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2697
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2698
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2699
+ run: z.ZodString;
2700
+ phase: z.ZodEnum<["pre", "post"]>;
2701
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2702
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2703
+ run: z.ZodString;
2704
+ phase: z.ZodEnum<["pre", "post"]>;
2705
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2706
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2707
+ run: z.ZodString;
2708
+ phase: z.ZodEnum<["pre", "post"]>;
2709
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2710
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2711
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2712
+ /** Skill folders/files passed as pi --skill; folder loads SKILL.md inside it */
2713
+ paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2714
+ /** Pre/post scripts or commands run locally (not inside the agent session) */
2715
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
2716
+ run: z.ZodString;
2717
+ phase: z.ZodEnum<["pre", "post"]>;
2718
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2719
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2720
+ run: z.ZodString;
2721
+ phase: z.ZodEnum<["pre", "post"]>;
2722
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2723
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2724
+ run: z.ZodString;
2725
+ phase: z.ZodEnum<["pre", "post"]>;
2726
+ inject_output: z.ZodDefault<z.ZodBoolean>;
2727
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2728
+ }, z.ZodTypeAny, "passthrough">>>;
2729
+ capabilities: z.ZodOptional<z.ZodObject<{
2730
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2731
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2732
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2733
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2734
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2735
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2736
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2737
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2738
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2739
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2740
+ /** Pi tool names required by this specialist (validated pre-run against permission level). */
2741
+ required_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2742
+ /** CLI binaries the agent depends on (validated at run-time before session starts). */
2743
+ external_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2744
+ }, z.ZodTypeAny, "passthrough">>>;
2745
+ validation: z.ZodOptional<z.ZodObject<{
2746
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2747
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2748
+ /** Days before STALE escalates to AGED */
2749
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2750
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2751
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2752
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2753
+ /** Days before STALE escalates to AGED */
2754
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2755
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2756
+ /** File paths to watch — if any mtime > metadata.updated, specialist is marked STALE */
2757
+ files_to_watch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2758
+ /** Days before STALE escalates to AGED */
2759
+ stale_threshold_days: z.ZodOptional<z.ZodNumber>;
2760
+ }, z.ZodTypeAny, "passthrough">>>;
2761
+ stall_detection: z.ZodOptional<z.ZodObject<{
2762
+ /** ms of silence while running before warn (default 60_000) */
2763
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2764
+ /** ms of silence while running before marking stale (default 300_000) */
2765
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2766
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2767
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2768
+ /** ms a single tool execution may run before warning (default 120_000) */
2769
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2770
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2771
+ /** ms of silence while running before warn (default 60_000) */
2772
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2773
+ /** ms of silence while running before marking stale (default 300_000) */
2774
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2775
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2776
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2777
+ /** ms a single tool execution may run before warning (default 120_000) */
2778
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2779
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2780
+ /** ms of silence while running before warn (default 60_000) */
2781
+ running_silence_warn_ms: z.ZodOptional<z.ZodNumber>;
2782
+ /** ms of silence while running before marking stale (default 300_000) */
2783
+ running_silence_error_ms: z.ZodOptional<z.ZodNumber>;
2784
+ /** ms in waiting state before emitting warning (default 3_600_000) */
2785
+ waiting_stale_ms: z.ZodOptional<z.ZodNumber>;
2786
+ /** ms a single tool execution may run before warning (default 120_000) */
2787
+ tool_duration_warn_ms: z.ZodOptional<z.ZodNumber>;
2788
+ }, z.ZodTypeAny, "passthrough">>>;
2789
+ mandatory_rules: z.ZodOptional<z.ZodObject<{
2790
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2791
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2792
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2793
+ id: z.ZodString;
2794
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2795
+ text: z.ZodString;
2796
+ when: z.ZodOptional<z.ZodString>;
2797
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2798
+ id: z.ZodString;
2799
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2800
+ text: z.ZodString;
2801
+ when: z.ZodOptional<z.ZodString>;
2802
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2803
+ id: z.ZodString;
2804
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2805
+ text: z.ZodString;
2806
+ when: z.ZodOptional<z.ZodString>;
2807
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2808
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2809
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2810
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2811
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2812
+ id: z.ZodString;
2813
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2814
+ text: z.ZodString;
2815
+ when: z.ZodOptional<z.ZodString>;
2816
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2817
+ id: z.ZodString;
2818
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2819
+ text: z.ZodString;
2820
+ when: z.ZodOptional<z.ZodString>;
2821
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2822
+ id: z.ZodString;
2823
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2824
+ text: z.ZodString;
2825
+ when: z.ZodOptional<z.ZodString>;
2826
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2827
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2828
+ template_sets: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2829
+ disable_default_globals: z.ZodDefault<z.ZodBoolean>;
2830
+ inline_rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
2831
+ id: z.ZodString;
2832
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2833
+ text: z.ZodString;
2834
+ when: z.ZodOptional<z.ZodString>;
2835
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2836
+ id: z.ZodString;
2837
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2838
+ text: z.ZodString;
2839
+ when: z.ZodOptional<z.ZodString>;
2840
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2841
+ id: z.ZodString;
2842
+ level: z.ZodDefault<z.ZodEnum<["error", "warn", "info"]>>;
2843
+ text: z.ZodString;
2844
+ when: z.ZodOptional<z.ZodString>;
2845
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
2846
+ }, z.ZodTypeAny, "passthrough">>>;
2847
+ /** Write the final output to this file path after the session completes */
2848
+ output_file: z.ZodOptional<z.ZodString>;
2849
+ beads_integration: z.ZodDefault<z.ZodEnum<["auto", "always", "never"]>>;
2850
+ beads_write_notes: z.ZodDefault<z.ZodBoolean>;
2851
+ }, z.ZodTypeAny, "passthrough">>;
2852
+ }, z.ZodTypeAny, "passthrough">>;
2853
+ export type Specialist = z.infer<typeof SpecialistSchema>;
2854
+ export type ScriptEntry = {
2855
+ run: string;
2856
+ phase: 'pre' | 'post';
2857
+ inject_output: boolean;
2858
+ };
2859
+ export interface ValidationError {
2860
+ path: string;
2861
+ message: string;
2862
+ code: string;
2863
+ }
2864
+ export interface ValidationResult {
2865
+ valid: boolean;
2866
+ errors: ValidationError[];
2867
+ warnings: string[];
2868
+ }
2869
+ /**
2870
+ * Validate specialist JSON content and return structured results.
2871
+ * Use this for CLI validation and friendly error messages.
2872
+ */
2873
+ export declare function validateSpecialist(jsonContent: string): Promise<ValidationResult>;
2874
+ export declare function parseSpecialist(jsonContent: string): Promise<Specialist>;
2875
+ //# sourceMappingURL=schema.d.ts.map