clinkx 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/clinkx-workflows/dist/artifacts.d.ts +65 -0
  2. package/clinkx-workflows/dist/artifacts.js +268 -0
  3. package/clinkx-workflows/dist/artifacts.js.map +1 -0
  4. package/clinkx-workflows/dist/backend.d.ts +33 -0
  5. package/clinkx-workflows/dist/backend.js +9 -0
  6. package/clinkx-workflows/dist/backend.js.map +1 -0
  7. package/clinkx-workflows/dist/child-env.d.ts +23 -0
  8. package/clinkx-workflows/dist/child-env.js +53 -0
  9. package/clinkx-workflows/dist/child-env.js.map +1 -0
  10. package/clinkx-workflows/dist/clink-client.d.ts +51 -0
  11. package/clinkx-workflows/dist/clink-client.js +216 -0
  12. package/clinkx-workflows/dist/clink-client.js.map +1 -0
  13. package/clinkx-workflows/dist/config.d.ts +126 -0
  14. package/clinkx-workflows/dist/config.js +226 -0
  15. package/clinkx-workflows/dist/config.js.map +1 -0
  16. package/clinkx-workflows/dist/definition-normalizer.d.ts +59 -0
  17. package/clinkx-workflows/dist/definition-normalizer.js +75 -0
  18. package/clinkx-workflows/dist/definition-normalizer.js.map +1 -0
  19. package/clinkx-workflows/dist/engine.d.ts +235 -0
  20. package/clinkx-workflows/dist/engine.js +1044 -0
  21. package/clinkx-workflows/dist/engine.js.map +1 -0
  22. package/clinkx-workflows/dist/errors.d.ts +74 -0
  23. package/clinkx-workflows/dist/errors.js +84 -0
  24. package/clinkx-workflows/dist/errors.js.map +1 -0
  25. package/clinkx-workflows/dist/fidelity.d.ts +112 -0
  26. package/clinkx-workflows/dist/fidelity.js +140 -0
  27. package/clinkx-workflows/dist/fidelity.js.map +1 -0
  28. package/clinkx-workflows/dist/fingerprint.d.ts +69 -0
  29. package/clinkx-workflows/dist/fingerprint.js +143 -0
  30. package/clinkx-workflows/dist/fingerprint.js.map +1 -0
  31. package/clinkx-workflows/dist/index.d.ts +16 -0
  32. package/clinkx-workflows/dist/index.js +42 -0
  33. package/clinkx-workflows/dist/index.js.map +1 -0
  34. package/clinkx-workflows/dist/loader.d.ts +64 -0
  35. package/clinkx-workflows/dist/loader.js +371 -0
  36. package/clinkx-workflows/dist/loader.js.map +1 -0
  37. package/clinkx-workflows/dist/logger.d.ts +16 -0
  38. package/clinkx-workflows/dist/logger.js +31 -0
  39. package/clinkx-workflows/dist/logger.js.map +1 -0
  40. package/clinkx-workflows/dist/path-validation.d.ts +23 -0
  41. package/clinkx-workflows/dist/path-validation.js +73 -0
  42. package/clinkx-workflows/dist/path-validation.js.map +1 -0
  43. package/clinkx-workflows/dist/prompt-budget.d.ts +31 -0
  44. package/clinkx-workflows/dist/prompt-budget.js +78 -0
  45. package/clinkx-workflows/dist/prompt-budget.js.map +1 -0
  46. package/clinkx-workflows/dist/queue.d.ts +16 -0
  47. package/clinkx-workflows/dist/queue.js +46 -0
  48. package/clinkx-workflows/dist/queue.js.map +1 -0
  49. package/clinkx-workflows/dist/ranking-reducer.d.ts +11 -0
  50. package/clinkx-workflows/dist/ranking-reducer.js +245 -0
  51. package/clinkx-workflows/dist/ranking-reducer.js.map +1 -0
  52. package/clinkx-workflows/dist/reducers/index.d.ts +8 -0
  53. package/clinkx-workflows/dist/reducers/index.js +12 -0
  54. package/clinkx-workflows/dist/reducers/index.js.map +1 -0
  55. package/clinkx-workflows/dist/run-id.d.ts +17 -0
  56. package/clinkx-workflows/dist/run-id.js +26 -0
  57. package/clinkx-workflows/dist/run-id.js.map +1 -0
  58. package/clinkx-workflows/dist/run-summary/cards/council-answer.d.ts +8 -0
  59. package/clinkx-workflows/dist/run-summary/cards/council-answer.js +75 -0
  60. package/clinkx-workflows/dist/run-summary/cards/council-answer.js.map +1 -0
  61. package/clinkx-workflows/dist/run-summary/cards/council-code-review.d.ts +13 -0
  62. package/clinkx-workflows/dist/run-summary/cards/council-code-review.js +90 -0
  63. package/clinkx-workflows/dist/run-summary/cards/council-code-review.js.map +1 -0
  64. package/clinkx-workflows/dist/run-summary/cards/council-debug.d.ts +9 -0
  65. package/clinkx-workflows/dist/run-summary/cards/council-debug.js +79 -0
  66. package/clinkx-workflows/dist/run-summary/cards/council-debug.js.map +1 -0
  67. package/clinkx-workflows/dist/run-summary/cards/council-default.d.ts +11 -0
  68. package/clinkx-workflows/dist/run-summary/cards/council-default.js +57 -0
  69. package/clinkx-workflows/dist/run-summary/cards/council-default.js.map +1 -0
  70. package/clinkx-workflows/dist/run-summary/cards/council-discover.d.ts +10 -0
  71. package/clinkx-workflows/dist/run-summary/cards/council-discover.js +79 -0
  72. package/clinkx-workflows/dist/run-summary/cards/council-discover.js.map +1 -0
  73. package/clinkx-workflows/dist/run-summary/cards/generic.d.ts +2 -0
  74. package/clinkx-workflows/dist/run-summary/cards/generic.js +4 -0
  75. package/clinkx-workflows/dist/run-summary/cards/generic.js.map +1 -0
  76. package/clinkx-workflows/dist/run-summary/cards/index.d.ts +6 -0
  77. package/clinkx-workflows/dist/run-summary/cards/index.js +17 -0
  78. package/clinkx-workflows/dist/run-summary/cards/index.js.map +1 -0
  79. package/clinkx-workflows/dist/run-summary/utils.d.ts +6 -0
  80. package/clinkx-workflows/dist/run-summary/utils.js +30 -0
  81. package/clinkx-workflows/dist/run-summary/utils.js.map +1 -0
  82. package/clinkx-workflows/dist/run-summary-derived.d.ts +19 -0
  83. package/clinkx-workflows/dist/run-summary-derived.js +100 -0
  84. package/clinkx-workflows/dist/run-summary-derived.js.map +1 -0
  85. package/clinkx-workflows/dist/run-summary.d.ts +70 -0
  86. package/clinkx-workflows/dist/run-summary.js +125 -0
  87. package/clinkx-workflows/dist/run-summary.js.map +1 -0
  88. package/clinkx-workflows/dist/schema.d.ts +609 -0
  89. package/clinkx-workflows/dist/schema.js +123 -0
  90. package/clinkx-workflows/dist/schema.js.map +1 -0
  91. package/clinkx-workflows/dist/server.d.ts +16 -0
  92. package/clinkx-workflows/dist/server.js +33 -0
  93. package/clinkx-workflows/dist/server.js.map +1 -0
  94. package/clinkx-workflows/dist/shutdown.d.ts +54 -0
  95. package/clinkx-workflows/dist/shutdown.js +120 -0
  96. package/clinkx-workflows/dist/shutdown.js.map +1 -0
  97. package/clinkx-workflows/dist/state-schema.d.ts +141 -0
  98. package/clinkx-workflows/dist/state-schema.js +21 -0
  99. package/clinkx-workflows/dist/state-schema.js.map +1 -0
  100. package/clinkx-workflows/dist/state.d.ts +37 -0
  101. package/clinkx-workflows/dist/state.js +838 -0
  102. package/clinkx-workflows/dist/state.js.map +1 -0
  103. package/clinkx-workflows/dist/template-loader.d.ts +30 -0
  104. package/clinkx-workflows/dist/template-loader.js +77 -0
  105. package/clinkx-workflows/dist/template-loader.js.map +1 -0
  106. package/clinkx-workflows/dist/template.d.ts +54 -0
  107. package/clinkx-workflows/dist/template.js +128 -0
  108. package/clinkx-workflows/dist/template.js.map +1 -0
  109. package/clinkx-workflows/dist/transport.d.ts +91 -0
  110. package/clinkx-workflows/dist/transport.js +249 -0
  111. package/clinkx-workflows/dist/transport.js.map +1 -0
  112. package/clinkx-workflows/dist/types.d.ts +137 -0
  113. package/clinkx-workflows/dist/types.js +11 -0
  114. package/clinkx-workflows/dist/types.js.map +1 -0
  115. package/clinkx-workflows/dist/validators/council.d.ts +1488 -0
  116. package/clinkx-workflows/dist/validators/council.js +509 -0
  117. package/clinkx-workflows/dist/validators/council.js.map +1 -0
  118. package/clinkx-workflows/dist/validators/index.d.ts +40 -0
  119. package/clinkx-workflows/dist/validators/index.js +43 -0
  120. package/clinkx-workflows/dist/validators/index.js.map +1 -0
  121. package/clinkx-workflows/dist/workflow-receipt.d.ts +4 -0
  122. package/clinkx-workflows/dist/workflow-receipt.js +177 -0
  123. package/clinkx-workflows/dist/workflow-receipt.js.map +1 -0
  124. package/clinkx-workflows/dist/workflow-tools.d.ts +77 -0
  125. package/clinkx-workflows/dist/workflow-tools.js +1131 -0
  126. package/clinkx-workflows/dist/workflow-tools.js.map +1 -0
  127. package/clinkx-workflows/dist/workflows/council-default.d.ts +123 -0
  128. package/clinkx-workflows/dist/workflows/council-default.js +141 -0
  129. package/clinkx-workflows/dist/workflows/council-default.js.map +1 -0
  130. package/clinkx-workflows/dist/workflows/index.d.ts +12 -0
  131. package/clinkx-workflows/dist/workflows/index.js +15 -0
  132. package/clinkx-workflows/dist/workflows/index.js.map +1 -0
  133. package/conf/adapters/codex.json +2 -2
  134. package/conf/adapters/hapi/codex.json +2 -2
  135. package/dist/config.d.ts +5 -0
  136. package/dist/config.js +17 -0
  137. package/dist/config.js.map +1 -1
  138. package/dist/parsers/extract.d.ts +2 -0
  139. package/dist/parsers/extract.js +29 -20
  140. package/dist/parsers/extract.js.map +1 -1
  141. package/dist/pipeline.d.ts +2 -4
  142. package/dist/pipeline.js +93 -8
  143. package/dist/pipeline.js.map +1 -1
  144. package/dist/result-contract.d.ts +6 -1
  145. package/dist/result-contract.js +10 -22
  146. package/dist/result-contract.js.map +1 -1
  147. package/dist/runner.js +43 -1
  148. package/dist/runner.js.map +1 -1
  149. package/package.json +12 -5
@@ -0,0 +1,609 @@
1
+ /**
2
+ * Zod schemas for workflow definitions (clinkx-workflows).
3
+ *
4
+ * This is separate from the parent ClinkX schema.ts — these schemas define
5
+ * workflow definition structure, not MCP tool input.
6
+ *
7
+ * Tasks: 2-1a, 2-2a, 2-3a, 2-4a, 2-5a
8
+ */
9
+ import { z } from "zod";
10
+ /**
11
+ * ID grammar: [A-Za-z0-9_-]+
12
+ * Dots are forbidden because "stage.call" is the reference syntax for context_from.
13
+ */
14
+ declare const ID_PATTERN: RegExp;
15
+ export declare const IdSchema: z.ZodString;
16
+ export declare const VariableTypeSchema: z.ZodEnum<["string", "number", "boolean", "string[]"]>;
17
+ export declare const VariableSchema: z.ZodObject<{
18
+ type: z.ZodEnum<["string", "number", "boolean", "string[]"]>;
19
+ required: z.ZodBoolean;
20
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
21
+ description: z.ZodOptional<z.ZodString>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "string" | "number" | "boolean" | "string[]";
24
+ required: boolean;
25
+ default?: string | number | boolean | string[] | undefined;
26
+ description?: string | undefined;
27
+ }, {
28
+ type: "string" | "number" | "boolean" | "string[]";
29
+ required: boolean;
30
+ default?: string | number | boolean | string[] | undefined;
31
+ description?: string | undefined;
32
+ }>;
33
+ export type Variable = z.infer<typeof VariableSchema>;
34
+ export declare const RetryConfigSchema: z.ZodObject<{
35
+ mode: z.ZodDefault<z.ZodEnum<["transport_only", "all"]>>;
36
+ max_retries: z.ZodDefault<z.ZodNumber>;
37
+ backoff_seconds: z.ZodDefault<z.ZodNumber>;
38
+ max_backoff_seconds: z.ZodDefault<z.ZodNumber>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ mode: "transport_only" | "all";
41
+ max_retries: number;
42
+ backoff_seconds: number;
43
+ max_backoff_seconds: number;
44
+ }, {
45
+ mode?: "transport_only" | "all" | undefined;
46
+ max_retries?: number | undefined;
47
+ backoff_seconds?: number | undefined;
48
+ max_backoff_seconds?: number | undefined;
49
+ }>;
50
+ export type RetryConfig = z.infer<typeof RetryConfigSchema>;
51
+ /**
52
+ * CallSchema: exactly ONE of `prompt` or `prompt_template` (XOR).
53
+ * Uses zod refine for XOR enforcement.
54
+ */
55
+ export declare const CallSchema: z.ZodEffects<z.ZodObject<{
56
+ id: z.ZodString;
57
+ cli_name: z.ZodString;
58
+ role: z.ZodString;
59
+ reducer: z.ZodOptional<z.ZodString>;
60
+ anonymize_context: z.ZodOptional<z.ZodBoolean>;
61
+ timeout_seconds: z.ZodOptional<z.ZodNumber>;
62
+ absolute_file_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
63
+ absolute_file_paths_from: z.ZodOptional<z.ZodString>;
64
+ images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
+ images_from: z.ZodOptional<z.ZodString>;
66
+ context_from: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
67
+ validator_schema_id: z.ZodOptional<z.ZodString>;
68
+ max_response_chars: z.ZodOptional<z.ZodNumber>;
69
+ response_contract: z.ZodOptional<z.ZodEnum<["json"]>>;
70
+ } & {
71
+ prompt: z.ZodOptional<z.ZodString>;
72
+ prompt_template: z.ZodOptional<z.ZodString>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ id: string;
75
+ cli_name: string;
76
+ role: string;
77
+ reducer?: string | undefined;
78
+ anonymize_context?: boolean | undefined;
79
+ timeout_seconds?: number | undefined;
80
+ absolute_file_paths?: string[] | undefined;
81
+ absolute_file_paths_from?: string | undefined;
82
+ images?: string[] | undefined;
83
+ images_from?: string | undefined;
84
+ context_from?: string[] | undefined;
85
+ validator_schema_id?: string | undefined;
86
+ max_response_chars?: number | undefined;
87
+ response_contract?: "json" | undefined;
88
+ prompt?: string | undefined;
89
+ prompt_template?: string | undefined;
90
+ }, {
91
+ id: string;
92
+ cli_name: string;
93
+ role: string;
94
+ reducer?: string | undefined;
95
+ anonymize_context?: boolean | undefined;
96
+ timeout_seconds?: number | undefined;
97
+ absolute_file_paths?: string[] | undefined;
98
+ absolute_file_paths_from?: string | undefined;
99
+ images?: string[] | undefined;
100
+ images_from?: string | undefined;
101
+ context_from?: string | string[] | undefined;
102
+ validator_schema_id?: string | undefined;
103
+ max_response_chars?: number | undefined;
104
+ response_contract?: "json" | undefined;
105
+ prompt?: string | undefined;
106
+ prompt_template?: string | undefined;
107
+ }>, {
108
+ id: string;
109
+ cli_name: string;
110
+ role: string;
111
+ reducer?: string | undefined;
112
+ anonymize_context?: boolean | undefined;
113
+ timeout_seconds?: number | undefined;
114
+ absolute_file_paths?: string[] | undefined;
115
+ absolute_file_paths_from?: string | undefined;
116
+ images?: string[] | undefined;
117
+ images_from?: string | undefined;
118
+ context_from?: string[] | undefined;
119
+ validator_schema_id?: string | undefined;
120
+ max_response_chars?: number | undefined;
121
+ response_contract?: "json" | undefined;
122
+ prompt?: string | undefined;
123
+ prompt_template?: string | undefined;
124
+ }, {
125
+ id: string;
126
+ cli_name: string;
127
+ role: string;
128
+ reducer?: string | undefined;
129
+ anonymize_context?: boolean | undefined;
130
+ timeout_seconds?: number | undefined;
131
+ absolute_file_paths?: string[] | undefined;
132
+ absolute_file_paths_from?: string | undefined;
133
+ images?: string[] | undefined;
134
+ images_from?: string | undefined;
135
+ context_from?: string | string[] | undefined;
136
+ validator_schema_id?: string | undefined;
137
+ max_response_chars?: number | undefined;
138
+ response_contract?: "json" | undefined;
139
+ prompt?: string | undefined;
140
+ prompt_template?: string | undefined;
141
+ }>;
142
+ export type Call = z.infer<typeof CallSchema>;
143
+ export declare const StageSchema: z.ZodObject<{
144
+ id: z.ZodString;
145
+ description: z.ZodOptional<z.ZodString>;
146
+ parallel: z.ZodDefault<z.ZodBoolean>;
147
+ retry: z.ZodDefault<z.ZodObject<{
148
+ mode: z.ZodDefault<z.ZodEnum<["transport_only", "all"]>>;
149
+ max_retries: z.ZodDefault<z.ZodNumber>;
150
+ backoff_seconds: z.ZodDefault<z.ZodNumber>;
151
+ max_backoff_seconds: z.ZodDefault<z.ZodNumber>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ mode: "transport_only" | "all";
154
+ max_retries: number;
155
+ backoff_seconds: number;
156
+ max_backoff_seconds: number;
157
+ }, {
158
+ mode?: "transport_only" | "all" | undefined;
159
+ max_retries?: number | undefined;
160
+ backoff_seconds?: number | undefined;
161
+ max_backoff_seconds?: number | undefined;
162
+ }>>;
163
+ on_failure: z.ZodDefault<z.ZodEnum<["abort", "continue"]>>;
164
+ calls: z.ZodArray<z.ZodEffects<z.ZodObject<{
165
+ id: z.ZodString;
166
+ cli_name: z.ZodString;
167
+ role: z.ZodString;
168
+ reducer: z.ZodOptional<z.ZodString>;
169
+ anonymize_context: z.ZodOptional<z.ZodBoolean>;
170
+ timeout_seconds: z.ZodOptional<z.ZodNumber>;
171
+ absolute_file_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
172
+ absolute_file_paths_from: z.ZodOptional<z.ZodString>;
173
+ images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
174
+ images_from: z.ZodOptional<z.ZodString>;
175
+ context_from: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
176
+ validator_schema_id: z.ZodOptional<z.ZodString>;
177
+ max_response_chars: z.ZodOptional<z.ZodNumber>;
178
+ response_contract: z.ZodOptional<z.ZodEnum<["json"]>>;
179
+ } & {
180
+ prompt: z.ZodOptional<z.ZodString>;
181
+ prompt_template: z.ZodOptional<z.ZodString>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ id: string;
184
+ cli_name: string;
185
+ role: string;
186
+ reducer?: string | undefined;
187
+ anonymize_context?: boolean | undefined;
188
+ timeout_seconds?: number | undefined;
189
+ absolute_file_paths?: string[] | undefined;
190
+ absolute_file_paths_from?: string | undefined;
191
+ images?: string[] | undefined;
192
+ images_from?: string | undefined;
193
+ context_from?: string[] | undefined;
194
+ validator_schema_id?: string | undefined;
195
+ max_response_chars?: number | undefined;
196
+ response_contract?: "json" | undefined;
197
+ prompt?: string | undefined;
198
+ prompt_template?: string | undefined;
199
+ }, {
200
+ id: string;
201
+ cli_name: string;
202
+ role: string;
203
+ reducer?: string | undefined;
204
+ anonymize_context?: boolean | undefined;
205
+ timeout_seconds?: number | undefined;
206
+ absolute_file_paths?: string[] | undefined;
207
+ absolute_file_paths_from?: string | undefined;
208
+ images?: string[] | undefined;
209
+ images_from?: string | undefined;
210
+ context_from?: string | string[] | undefined;
211
+ validator_schema_id?: string | undefined;
212
+ max_response_chars?: number | undefined;
213
+ response_contract?: "json" | undefined;
214
+ prompt?: string | undefined;
215
+ prompt_template?: string | undefined;
216
+ }>, {
217
+ id: string;
218
+ cli_name: string;
219
+ role: string;
220
+ reducer?: string | undefined;
221
+ anonymize_context?: boolean | undefined;
222
+ timeout_seconds?: number | undefined;
223
+ absolute_file_paths?: string[] | undefined;
224
+ absolute_file_paths_from?: string | undefined;
225
+ images?: string[] | undefined;
226
+ images_from?: string | undefined;
227
+ context_from?: string[] | undefined;
228
+ validator_schema_id?: string | undefined;
229
+ max_response_chars?: number | undefined;
230
+ response_contract?: "json" | undefined;
231
+ prompt?: string | undefined;
232
+ prompt_template?: string | undefined;
233
+ }, {
234
+ id: string;
235
+ cli_name: string;
236
+ role: string;
237
+ reducer?: string | undefined;
238
+ anonymize_context?: boolean | undefined;
239
+ timeout_seconds?: number | undefined;
240
+ absolute_file_paths?: string[] | undefined;
241
+ absolute_file_paths_from?: string | undefined;
242
+ images?: string[] | undefined;
243
+ images_from?: string | undefined;
244
+ context_from?: string | string[] | undefined;
245
+ validator_schema_id?: string | undefined;
246
+ max_response_chars?: number | undefined;
247
+ response_contract?: "json" | undefined;
248
+ prompt?: string | undefined;
249
+ prompt_template?: string | undefined;
250
+ }>, "many">;
251
+ }, "strip", z.ZodTypeAny, {
252
+ id: string;
253
+ parallel: boolean;
254
+ retry: {
255
+ mode: "transport_only" | "all";
256
+ max_retries: number;
257
+ backoff_seconds: number;
258
+ max_backoff_seconds: number;
259
+ };
260
+ on_failure: "abort" | "continue";
261
+ calls: {
262
+ id: string;
263
+ cli_name: string;
264
+ role: string;
265
+ reducer?: string | undefined;
266
+ anonymize_context?: boolean | undefined;
267
+ timeout_seconds?: number | undefined;
268
+ absolute_file_paths?: string[] | undefined;
269
+ absolute_file_paths_from?: string | undefined;
270
+ images?: string[] | undefined;
271
+ images_from?: string | undefined;
272
+ context_from?: string[] | undefined;
273
+ validator_schema_id?: string | undefined;
274
+ max_response_chars?: number | undefined;
275
+ response_contract?: "json" | undefined;
276
+ prompt?: string | undefined;
277
+ prompt_template?: string | undefined;
278
+ }[];
279
+ description?: string | undefined;
280
+ }, {
281
+ id: string;
282
+ calls: {
283
+ id: string;
284
+ cli_name: string;
285
+ role: string;
286
+ reducer?: string | undefined;
287
+ anonymize_context?: boolean | undefined;
288
+ timeout_seconds?: number | undefined;
289
+ absolute_file_paths?: string[] | undefined;
290
+ absolute_file_paths_from?: string | undefined;
291
+ images?: string[] | undefined;
292
+ images_from?: string | undefined;
293
+ context_from?: string | string[] | undefined;
294
+ validator_schema_id?: string | undefined;
295
+ max_response_chars?: number | undefined;
296
+ response_contract?: "json" | undefined;
297
+ prompt?: string | undefined;
298
+ prompt_template?: string | undefined;
299
+ }[];
300
+ description?: string | undefined;
301
+ parallel?: boolean | undefined;
302
+ retry?: {
303
+ mode?: "transport_only" | "all" | undefined;
304
+ max_retries?: number | undefined;
305
+ backoff_seconds?: number | undefined;
306
+ max_backoff_seconds?: number | undefined;
307
+ } | undefined;
308
+ on_failure?: "abort" | "continue" | undefined;
309
+ }>;
310
+ export type Stage = z.infer<typeof StageSchema>;
311
+ export declare const WorkflowSettingsSchema: z.ZodObject<{
312
+ timeout_seconds: z.ZodDefault<z.ZodNumber>;
313
+ max_retries: z.ZodDefault<z.ZodNumber>;
314
+ }, "strip", z.ZodTypeAny, {
315
+ max_retries: number;
316
+ timeout_seconds: number;
317
+ }, {
318
+ max_retries?: number | undefined;
319
+ timeout_seconds?: number | undefined;
320
+ }>;
321
+ export type WorkflowSettings = z.infer<typeof WorkflowSettingsSchema>;
322
+ export declare const WorkflowDefinitionSchema: z.ZodObject<{
323
+ name: z.ZodString;
324
+ description: z.ZodString;
325
+ version: z.ZodString;
326
+ stages: z.ZodArray<z.ZodObject<{
327
+ id: z.ZodString;
328
+ description: z.ZodOptional<z.ZodString>;
329
+ parallel: z.ZodDefault<z.ZodBoolean>;
330
+ retry: z.ZodDefault<z.ZodObject<{
331
+ mode: z.ZodDefault<z.ZodEnum<["transport_only", "all"]>>;
332
+ max_retries: z.ZodDefault<z.ZodNumber>;
333
+ backoff_seconds: z.ZodDefault<z.ZodNumber>;
334
+ max_backoff_seconds: z.ZodDefault<z.ZodNumber>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ mode: "transport_only" | "all";
337
+ max_retries: number;
338
+ backoff_seconds: number;
339
+ max_backoff_seconds: number;
340
+ }, {
341
+ mode?: "transport_only" | "all" | undefined;
342
+ max_retries?: number | undefined;
343
+ backoff_seconds?: number | undefined;
344
+ max_backoff_seconds?: number | undefined;
345
+ }>>;
346
+ on_failure: z.ZodDefault<z.ZodEnum<["abort", "continue"]>>;
347
+ calls: z.ZodArray<z.ZodEffects<z.ZodObject<{
348
+ id: z.ZodString;
349
+ cli_name: z.ZodString;
350
+ role: z.ZodString;
351
+ reducer: z.ZodOptional<z.ZodString>;
352
+ anonymize_context: z.ZodOptional<z.ZodBoolean>;
353
+ timeout_seconds: z.ZodOptional<z.ZodNumber>;
354
+ absolute_file_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
355
+ absolute_file_paths_from: z.ZodOptional<z.ZodString>;
356
+ images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
357
+ images_from: z.ZodOptional<z.ZodString>;
358
+ context_from: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
359
+ validator_schema_id: z.ZodOptional<z.ZodString>;
360
+ max_response_chars: z.ZodOptional<z.ZodNumber>;
361
+ response_contract: z.ZodOptional<z.ZodEnum<["json"]>>;
362
+ } & {
363
+ prompt: z.ZodOptional<z.ZodString>;
364
+ prompt_template: z.ZodOptional<z.ZodString>;
365
+ }, "strip", z.ZodTypeAny, {
366
+ id: string;
367
+ cli_name: string;
368
+ role: string;
369
+ reducer?: string | undefined;
370
+ anonymize_context?: boolean | undefined;
371
+ timeout_seconds?: number | undefined;
372
+ absolute_file_paths?: string[] | undefined;
373
+ absolute_file_paths_from?: string | undefined;
374
+ images?: string[] | undefined;
375
+ images_from?: string | undefined;
376
+ context_from?: string[] | undefined;
377
+ validator_schema_id?: string | undefined;
378
+ max_response_chars?: number | undefined;
379
+ response_contract?: "json" | undefined;
380
+ prompt?: string | undefined;
381
+ prompt_template?: string | undefined;
382
+ }, {
383
+ id: string;
384
+ cli_name: string;
385
+ role: string;
386
+ reducer?: string | undefined;
387
+ anonymize_context?: boolean | undefined;
388
+ timeout_seconds?: number | undefined;
389
+ absolute_file_paths?: string[] | undefined;
390
+ absolute_file_paths_from?: string | undefined;
391
+ images?: string[] | undefined;
392
+ images_from?: string | undefined;
393
+ context_from?: string | string[] | undefined;
394
+ validator_schema_id?: string | undefined;
395
+ max_response_chars?: number | undefined;
396
+ response_contract?: "json" | undefined;
397
+ prompt?: string | undefined;
398
+ prompt_template?: string | undefined;
399
+ }>, {
400
+ id: string;
401
+ cli_name: string;
402
+ role: string;
403
+ reducer?: string | undefined;
404
+ anonymize_context?: boolean | undefined;
405
+ timeout_seconds?: number | undefined;
406
+ absolute_file_paths?: string[] | undefined;
407
+ absolute_file_paths_from?: string | undefined;
408
+ images?: string[] | undefined;
409
+ images_from?: string | undefined;
410
+ context_from?: string[] | undefined;
411
+ validator_schema_id?: string | undefined;
412
+ max_response_chars?: number | undefined;
413
+ response_contract?: "json" | undefined;
414
+ prompt?: string | undefined;
415
+ prompt_template?: string | undefined;
416
+ }, {
417
+ id: string;
418
+ cli_name: string;
419
+ role: string;
420
+ reducer?: string | undefined;
421
+ anonymize_context?: boolean | undefined;
422
+ timeout_seconds?: number | undefined;
423
+ absolute_file_paths?: string[] | undefined;
424
+ absolute_file_paths_from?: string | undefined;
425
+ images?: string[] | undefined;
426
+ images_from?: string | undefined;
427
+ context_from?: string | string[] | undefined;
428
+ validator_schema_id?: string | undefined;
429
+ max_response_chars?: number | undefined;
430
+ response_contract?: "json" | undefined;
431
+ prompt?: string | undefined;
432
+ prompt_template?: string | undefined;
433
+ }>, "many">;
434
+ }, "strip", z.ZodTypeAny, {
435
+ id: string;
436
+ parallel: boolean;
437
+ retry: {
438
+ mode: "transport_only" | "all";
439
+ max_retries: number;
440
+ backoff_seconds: number;
441
+ max_backoff_seconds: number;
442
+ };
443
+ on_failure: "abort" | "continue";
444
+ calls: {
445
+ id: string;
446
+ cli_name: string;
447
+ role: string;
448
+ reducer?: string | undefined;
449
+ anonymize_context?: boolean | undefined;
450
+ timeout_seconds?: number | undefined;
451
+ absolute_file_paths?: string[] | undefined;
452
+ absolute_file_paths_from?: string | undefined;
453
+ images?: string[] | undefined;
454
+ images_from?: string | undefined;
455
+ context_from?: string[] | undefined;
456
+ validator_schema_id?: string | undefined;
457
+ max_response_chars?: number | undefined;
458
+ response_contract?: "json" | undefined;
459
+ prompt?: string | undefined;
460
+ prompt_template?: string | undefined;
461
+ }[];
462
+ description?: string | undefined;
463
+ }, {
464
+ id: string;
465
+ calls: {
466
+ id: string;
467
+ cli_name: string;
468
+ role: string;
469
+ reducer?: string | undefined;
470
+ anonymize_context?: boolean | undefined;
471
+ timeout_seconds?: number | undefined;
472
+ absolute_file_paths?: string[] | undefined;
473
+ absolute_file_paths_from?: string | undefined;
474
+ images?: string[] | undefined;
475
+ images_from?: string | undefined;
476
+ context_from?: string | string[] | undefined;
477
+ validator_schema_id?: string | undefined;
478
+ max_response_chars?: number | undefined;
479
+ response_contract?: "json" | undefined;
480
+ prompt?: string | undefined;
481
+ prompt_template?: string | undefined;
482
+ }[];
483
+ description?: string | undefined;
484
+ parallel?: boolean | undefined;
485
+ retry?: {
486
+ mode?: "transport_only" | "all" | undefined;
487
+ max_retries?: number | undefined;
488
+ backoff_seconds?: number | undefined;
489
+ max_backoff_seconds?: number | undefined;
490
+ } | undefined;
491
+ on_failure?: "abort" | "continue" | undefined;
492
+ }>, "many">;
493
+ variables: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
494
+ type: z.ZodEnum<["string", "number", "boolean", "string[]"]>;
495
+ required: z.ZodBoolean;
496
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
497
+ description: z.ZodOptional<z.ZodString>;
498
+ }, "strip", z.ZodTypeAny, {
499
+ type: "string" | "number" | "boolean" | "string[]";
500
+ required: boolean;
501
+ default?: string | number | boolean | string[] | undefined;
502
+ description?: string | undefined;
503
+ }, {
504
+ type: "string" | "number" | "boolean" | "string[]";
505
+ required: boolean;
506
+ default?: string | number | boolean | string[] | undefined;
507
+ description?: string | undefined;
508
+ }>>>;
509
+ settings: z.ZodDefault<z.ZodObject<{
510
+ timeout_seconds: z.ZodDefault<z.ZodNumber>;
511
+ max_retries: z.ZodDefault<z.ZodNumber>;
512
+ }, "strip", z.ZodTypeAny, {
513
+ max_retries: number;
514
+ timeout_seconds: number;
515
+ }, {
516
+ max_retries?: number | undefined;
517
+ timeout_seconds?: number | undefined;
518
+ }>>;
519
+ }, "strip", z.ZodTypeAny, {
520
+ description: string;
521
+ name: string;
522
+ version: string;
523
+ stages: {
524
+ id: string;
525
+ parallel: boolean;
526
+ retry: {
527
+ mode: "transport_only" | "all";
528
+ max_retries: number;
529
+ backoff_seconds: number;
530
+ max_backoff_seconds: number;
531
+ };
532
+ on_failure: "abort" | "continue";
533
+ calls: {
534
+ id: string;
535
+ cli_name: string;
536
+ role: string;
537
+ reducer?: string | undefined;
538
+ anonymize_context?: boolean | undefined;
539
+ timeout_seconds?: number | undefined;
540
+ absolute_file_paths?: string[] | undefined;
541
+ absolute_file_paths_from?: string | undefined;
542
+ images?: string[] | undefined;
543
+ images_from?: string | undefined;
544
+ context_from?: string[] | undefined;
545
+ validator_schema_id?: string | undefined;
546
+ max_response_chars?: number | undefined;
547
+ response_contract?: "json" | undefined;
548
+ prompt?: string | undefined;
549
+ prompt_template?: string | undefined;
550
+ }[];
551
+ description?: string | undefined;
552
+ }[];
553
+ variables: Record<string, {
554
+ type: "string" | "number" | "boolean" | "string[]";
555
+ required: boolean;
556
+ default?: string | number | boolean | string[] | undefined;
557
+ description?: string | undefined;
558
+ }>;
559
+ settings: {
560
+ max_retries: number;
561
+ timeout_seconds: number;
562
+ };
563
+ }, {
564
+ description: string;
565
+ name: string;
566
+ version: string;
567
+ stages: {
568
+ id: string;
569
+ calls: {
570
+ id: string;
571
+ cli_name: string;
572
+ role: string;
573
+ reducer?: string | undefined;
574
+ anonymize_context?: boolean | undefined;
575
+ timeout_seconds?: number | undefined;
576
+ absolute_file_paths?: string[] | undefined;
577
+ absolute_file_paths_from?: string | undefined;
578
+ images?: string[] | undefined;
579
+ images_from?: string | undefined;
580
+ context_from?: string | string[] | undefined;
581
+ validator_schema_id?: string | undefined;
582
+ max_response_chars?: number | undefined;
583
+ response_contract?: "json" | undefined;
584
+ prompt?: string | undefined;
585
+ prompt_template?: string | undefined;
586
+ }[];
587
+ description?: string | undefined;
588
+ parallel?: boolean | undefined;
589
+ retry?: {
590
+ mode?: "transport_only" | "all" | undefined;
591
+ max_retries?: number | undefined;
592
+ backoff_seconds?: number | undefined;
593
+ max_backoff_seconds?: number | undefined;
594
+ } | undefined;
595
+ on_failure?: "abort" | "continue" | undefined;
596
+ }[];
597
+ variables?: Record<string, {
598
+ type: "string" | "number" | "boolean" | "string[]";
599
+ required: boolean;
600
+ default?: string | number | boolean | string[] | undefined;
601
+ description?: string | undefined;
602
+ }> | undefined;
603
+ settings?: {
604
+ max_retries?: number | undefined;
605
+ timeout_seconds?: number | undefined;
606
+ } | undefined;
607
+ }>;
608
+ export type WorkflowDefinition = z.infer<typeof WorkflowDefinitionSchema>;
609
+ export { ID_PATTERN };