@tai42/api-client 15.0.0 → 16.0.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.
package/dist/schemas.d.ts CHANGED
@@ -5,33 +5,633 @@
5
5
  * auto-form renderer interprets them at runtime.
6
6
  */
7
7
  import { z } from 'zod';
8
+ export { templatedText, requiredTemplatedText } from './templated-text';
9
+ export type { TemplatedText } from './templated-text';
10
+ export declare const stateInjection: z.ZodObject<{
11
+ into: z.ZodString;
12
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
13
+ content: z.ZodOptional<z.ZodString>;
14
+ id: z.ZodOptional<z.ZodString>;
15
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
16
+ }, z.core.$strict>, z.ZodNull]>>;
17
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
18
+ }, z.core.$strict>;
19
+ export type StateInjection = z.infer<typeof stateInjection>;
20
+ export declare const stateUpdate: z.ZodObject<{
21
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
22
+ content: z.ZodOptional<z.ZodString>;
23
+ id: z.ZodOptional<z.ZodString>;
24
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
25
+ }, z.core.$strict>, z.ZodNull]>>;
26
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
27
+ content: z.ZodOptional<z.ZodString>;
28
+ id: z.ZodOptional<z.ZodString>;
29
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
30
+ }, z.core.$strict>, z.ZodNull]>>;
31
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
32
+ content: z.ZodOptional<z.ZodString>;
33
+ id: z.ZodOptional<z.ZodString>;
34
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ }, z.core.$strict>, z.ZodNull]>>;
36
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
37
+ }, z.core.$strict>;
38
+ export type StateUpdate = z.infer<typeof stateUpdate>;
39
+ export declare const stateAttach: z.ZodObject<{
40
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
41
+ into: z.ZodString;
42
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
43
+ content: z.ZodOptional<z.ZodString>;
44
+ id: z.ZodOptional<z.ZodString>;
45
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
46
+ }, z.core.$strict>, z.ZodNull]>>;
47
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
48
+ }, z.core.$strict>>>;
49
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
50
+ content: z.ZodOptional<z.ZodString>;
51
+ id: z.ZodOptional<z.ZodString>;
52
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
53
+ }, z.core.$strict>, z.ZodNull]>>;
54
+ state: z.ZodString;
55
+ subject_expr: z.ZodObject<{
56
+ content: z.ZodOptional<z.ZodString>;
57
+ id: z.ZodOptional<z.ZodString>;
58
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
59
+ }, z.core.$strict>;
60
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
61
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
62
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
63
+ content: z.ZodOptional<z.ZodString>;
64
+ id: z.ZodOptional<z.ZodString>;
65
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
66
+ }, z.core.$strict>, z.ZodNull]>>;
67
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
68
+ content: z.ZodOptional<z.ZodString>;
69
+ id: z.ZodOptional<z.ZodString>;
70
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
71
+ }, z.core.$strict>, z.ZodNull]>>;
72
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
73
+ content: z.ZodOptional<z.ZodString>;
74
+ id: z.ZodOptional<z.ZodString>;
75
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
76
+ }, z.core.$strict>, z.ZodNull]>>;
77
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
78
+ }, z.core.$strict>>>;
79
+ }, z.core.$strict>;
80
+ export type StateAttach = z.infer<typeof stateAttach>;
81
+ export declare const stateBinding: z.ZodObject<{
82
+ states: z.ZodArray<z.ZodObject<{
83
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
84
+ into: z.ZodString;
85
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
86
+ content: z.ZodOptional<z.ZodString>;
87
+ id: z.ZodOptional<z.ZodString>;
88
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
89
+ }, z.core.$strict>, z.ZodNull]>>;
90
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
91
+ }, z.core.$strict>>>;
92
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
93
+ content: z.ZodOptional<z.ZodString>;
94
+ id: z.ZodOptional<z.ZodString>;
95
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
96
+ }, z.core.$strict>, z.ZodNull]>>;
97
+ state: z.ZodString;
98
+ subject_expr: z.ZodObject<{
99
+ content: z.ZodOptional<z.ZodString>;
100
+ id: z.ZodOptional<z.ZodString>;
101
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
102
+ }, z.core.$strict>;
103
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
104
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
105
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
106
+ content: z.ZodOptional<z.ZodString>;
107
+ id: z.ZodOptional<z.ZodString>;
108
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
109
+ }, z.core.$strict>, z.ZodNull]>>;
110
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
111
+ content: z.ZodOptional<z.ZodString>;
112
+ id: z.ZodOptional<z.ZodString>;
113
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
114
+ }, z.core.$strict>, z.ZodNull]>>;
115
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
116
+ content: z.ZodOptional<z.ZodString>;
117
+ id: z.ZodOptional<z.ZodString>;
118
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
119
+ }, z.core.$strict>, z.ZodNull]>>;
120
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
121
+ }, z.core.$strict>>>;
122
+ }, z.core.$strict>>;
123
+ }, z.core.$strict>;
124
+ export type StateBinding = z.infer<typeof stateBinding>;
125
+ export declare const presetBody: z.ZodObject<{
126
+ base_tool: z.ZodString;
127
+ description: z.ZodDefault<z.ZodString>;
128
+ extensions: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>>;
129
+ fixed_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
130
+ input_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
131
+ content: z.ZodOptional<z.ZodString>;
132
+ id: z.ZodOptional<z.ZodString>;
133
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
134
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
135
+ output_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
136
+ content: z.ZodOptional<z.ZodString>;
137
+ id: z.ZodOptional<z.ZodString>;
138
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
139
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
140
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
141
+ states: z.ZodArray<z.ZodObject<{
142
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
143
+ into: z.ZodString;
144
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
145
+ content: z.ZodOptional<z.ZodString>;
146
+ id: z.ZodOptional<z.ZodString>;
147
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
148
+ }, z.core.$strict>, z.ZodNull]>>;
149
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
150
+ }, z.core.$strict>>>;
151
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
152
+ content: z.ZodOptional<z.ZodString>;
153
+ id: z.ZodOptional<z.ZodString>;
154
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
155
+ }, z.core.$strict>, z.ZodNull]>>;
156
+ state: z.ZodString;
157
+ subject_expr: z.ZodObject<{
158
+ content: z.ZodOptional<z.ZodString>;
159
+ id: z.ZodOptional<z.ZodString>;
160
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
161
+ }, z.core.$strict>;
162
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
163
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
164
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
165
+ content: z.ZodOptional<z.ZodString>;
166
+ id: z.ZodOptional<z.ZodString>;
167
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
168
+ }, z.core.$strict>, z.ZodNull]>>;
169
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
170
+ content: z.ZodOptional<z.ZodString>;
171
+ id: z.ZodOptional<z.ZodString>;
172
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
173
+ }, z.core.$strict>, z.ZodNull]>>;
174
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
175
+ content: z.ZodOptional<z.ZodString>;
176
+ id: z.ZodOptional<z.ZodString>;
177
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
178
+ }, z.core.$strict>, z.ZodNull]>>;
179
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
180
+ }, z.core.$strict>>>;
181
+ }, z.core.$strict>>;
182
+ }, z.core.$strict>, z.ZodNull]>>;
183
+ }, z.core.$strip>;
184
+ export type PresetBody = z.input<typeof presetBody>;
185
+ export declare const conversationRoute: z.ZodObject<{
186
+ callback_secret: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
187
+ callback_url: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
188
+ channel: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
189
+ door: z.ZodEnum<{
190
+ channel: "channel";
191
+ api: "api";
192
+ }>;
193
+ error_reply_text: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
194
+ execution_key: z.ZodString;
195
+ execution_key_fingerprint: z.ZodString;
196
+ initial_mode: z.ZodDefault<z.ZodEnum<{
197
+ agent: "agent";
198
+ manual: "manual";
199
+ }>>;
200
+ locale: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
201
+ our_identity: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
202
+ payload_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
203
+ content: z.ZodOptional<z.ZodString>;
204
+ id: z.ZodOptional<z.ZodString>;
205
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
206
+ }, z.core.$strict>, z.ZodNull]>>;
207
+ reply_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
208
+ content: z.ZodOptional<z.ZodString>;
209
+ id: z.ZodOptional<z.ZodString>;
210
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
211
+ }, z.core.$strict>, z.ZodNull]>>;
212
+ route_name: z.ZodString;
213
+ target_kind: z.ZodEnum<{
214
+ tool: "tool";
215
+ agent: "agent";
216
+ }>;
217
+ target_name: z.ZodString;
218
+ turns_per_hour_override: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
219
+ }, z.core.$strip>;
220
+ export type ConversationRoute = z.infer<typeof conversationRoute>;
221
+ export declare const conversationRouteCreate: z.ZodObject<{
222
+ callback_url: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
223
+ channel: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
224
+ door: z.ZodEnum<{
225
+ channel: "channel";
226
+ api: "api";
227
+ }>;
228
+ error_reply_text: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
229
+ execution_key: z.ZodString;
230
+ initial_mode: z.ZodDefault<z.ZodEnum<{
231
+ agent: "agent";
232
+ manual: "manual";
233
+ }>>;
234
+ locale: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
235
+ our_identity: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
236
+ payload_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
237
+ content: z.ZodOptional<z.ZodString>;
238
+ id: z.ZodOptional<z.ZodString>;
239
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
240
+ }, z.core.$strict>, z.ZodNull]>>;
241
+ reply_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
242
+ content: z.ZodOptional<z.ZodString>;
243
+ id: z.ZodOptional<z.ZodString>;
244
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
245
+ }, z.core.$strict>, z.ZodNull]>>;
246
+ route_name: z.ZodString;
247
+ target_kind: z.ZodEnum<{
248
+ tool: "tool";
249
+ agent: "agent";
250
+ }>;
251
+ target_name: z.ZodString;
252
+ turns_per_hour_override: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
253
+ }, z.core.$strip>;
254
+ export type ConversationRouteCreate = z.input<typeof conversationRouteCreate>;
255
+ export declare const targetConversationConfig: z.ZodObject<{
256
+ greeting_template: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
257
+ multichannel: z.ZodDefault<z.ZodBoolean>;
258
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
259
+ states: z.ZodArray<z.ZodObject<{
260
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
261
+ into: z.ZodString;
262
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
263
+ content: z.ZodOptional<z.ZodString>;
264
+ id: z.ZodOptional<z.ZodString>;
265
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
266
+ }, z.core.$strict>, z.ZodNull]>>;
267
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
268
+ }, z.core.$strict>>>;
269
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
270
+ content: z.ZodOptional<z.ZodString>;
271
+ id: z.ZodOptional<z.ZodString>;
272
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
273
+ }, z.core.$strict>, z.ZodNull]>>;
274
+ state: z.ZodString;
275
+ subject_expr: z.ZodObject<{
276
+ content: z.ZodOptional<z.ZodString>;
277
+ id: z.ZodOptional<z.ZodString>;
278
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
279
+ }, z.core.$strict>;
280
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
281
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
282
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
283
+ content: z.ZodOptional<z.ZodString>;
284
+ id: z.ZodOptional<z.ZodString>;
285
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
286
+ }, z.core.$strict>, z.ZodNull]>>;
287
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
288
+ content: z.ZodOptional<z.ZodString>;
289
+ id: z.ZodOptional<z.ZodString>;
290
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
291
+ }, z.core.$strict>, z.ZodNull]>>;
292
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
293
+ content: z.ZodOptional<z.ZodString>;
294
+ id: z.ZodOptional<z.ZodString>;
295
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
296
+ }, z.core.$strict>, z.ZodNull]>>;
297
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
298
+ }, z.core.$strict>>>;
299
+ }, z.core.$strict>>;
300
+ }, z.core.$strict>, z.ZodNull]>>;
301
+ target_kind: z.ZodEnum<{
302
+ tool: "tool";
303
+ agent: "agent";
304
+ }>;
305
+ target_name: z.ZodString;
306
+ }, z.core.$strip>;
307
+ export type TargetConversationConfig = z.input<typeof targetConversationConfig>;
308
+ export declare const channelTemplate: z.ZodObject<{
309
+ body_parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
310
+ buttons: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
311
+ header_media: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
312
+ caption: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
313
+ filename: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
314
+ kind: z.ZodEnum<{
315
+ image: "image";
316
+ link: "link";
317
+ document: "document";
318
+ video: "video";
319
+ audio: "audio";
320
+ }>;
321
+ url: z.ZodString;
322
+ }, z.core.$strip>, z.ZodNull]>>;
323
+ language: z.ZodString;
324
+ name: z.ZodString;
325
+ }, z.core.$strip>;
326
+ export type ChannelTemplate = z.infer<typeof channelTemplate>;
327
+ export declare const hookSubject: z.ZodObject<{
328
+ key_expr: z.ZodObject<{
329
+ content: z.ZodOptional<z.ZodString>;
330
+ id: z.ZodOptional<z.ZodString>;
331
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
332
+ }, z.core.$strict>;
333
+ kind: z.ZodString;
334
+ target_kind: z.ZodEnum<{
335
+ tool: "tool";
336
+ agent: "agent";
337
+ }>;
338
+ target_name: z.ZodString;
339
+ }, z.core.$strict>;
340
+ export type HookSubject = z.infer<typeof hookSubject>;
341
+ export declare const hookParams: z.ZodObject<{
342
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
343
+ content: z.ZodOptional<z.ZodString>;
344
+ id: z.ZodOptional<z.ZodString>;
345
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
346
+ }, z.core.$strict>, z.ZodNull]>>;
347
+ execution_key: z.ZodString;
348
+ execution_key_fingerprint: z.ZodString;
349
+ expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
350
+ content: z.ZodOptional<z.ZodString>;
351
+ id: z.ZodOptional<z.ZodString>;
352
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
353
+ }, z.core.$strict>, z.ZodNull]>>;
354
+ name: z.ZodString;
355
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
356
+ states: z.ZodArray<z.ZodObject<{
357
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
358
+ into: z.ZodString;
359
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
360
+ content: z.ZodOptional<z.ZodString>;
361
+ id: z.ZodOptional<z.ZodString>;
362
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
363
+ }, z.core.$strict>, z.ZodNull]>>;
364
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
365
+ }, z.core.$strict>>>;
366
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
367
+ content: z.ZodOptional<z.ZodString>;
368
+ id: z.ZodOptional<z.ZodString>;
369
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
370
+ }, z.core.$strict>, z.ZodNull]>>;
371
+ state: z.ZodString;
372
+ subject_expr: z.ZodObject<{
373
+ content: z.ZodOptional<z.ZodString>;
374
+ id: z.ZodOptional<z.ZodString>;
375
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
376
+ }, z.core.$strict>;
377
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
378
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
379
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
380
+ content: z.ZodOptional<z.ZodString>;
381
+ id: z.ZodOptional<z.ZodString>;
382
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
383
+ }, z.core.$strict>, z.ZodNull]>>;
384
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
385
+ content: z.ZodOptional<z.ZodString>;
386
+ id: z.ZodOptional<z.ZodString>;
387
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
388
+ }, z.core.$strict>, z.ZodNull]>>;
389
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
390
+ content: z.ZodOptional<z.ZodString>;
391
+ id: z.ZodOptional<z.ZodString>;
392
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
393
+ }, z.core.$strict>, z.ZodNull]>>;
394
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
395
+ }, z.core.$strict>>>;
396
+ }, z.core.$strict>>;
397
+ }, z.core.$strict>, z.ZodNull]>>;
398
+ subject: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
399
+ key_expr: z.ZodObject<{
400
+ content: z.ZodOptional<z.ZodString>;
401
+ id: z.ZodOptional<z.ZodString>;
402
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
403
+ }, z.core.$strict>;
404
+ kind: z.ZodString;
405
+ target_kind: z.ZodEnum<{
406
+ tool: "tool";
407
+ agent: "agent";
408
+ }>;
409
+ target_name: z.ZodString;
410
+ }, z.core.$strict>, z.ZodNull]>>;
411
+ tool: z.ZodString;
412
+ tool_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
413
+ topic: z.ZodString;
414
+ }, z.core.$strip>;
415
+ export type HookParams = z.infer<typeof hookParams>;
416
+ export declare const hookRegister: z.ZodObject<{
417
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
418
+ content: z.ZodOptional<z.ZodString>;
419
+ id: z.ZodOptional<z.ZodString>;
420
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
421
+ }, z.core.$strict>, z.ZodNull]>>;
422
+ execution_key: z.ZodString;
423
+ expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
424
+ content: z.ZodOptional<z.ZodString>;
425
+ id: z.ZodOptional<z.ZodString>;
426
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
427
+ }, z.core.$strict>, z.ZodNull]>>;
428
+ name: z.ZodString;
429
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
430
+ states: z.ZodArray<z.ZodObject<{
431
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
432
+ into: z.ZodString;
433
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
434
+ content: z.ZodOptional<z.ZodString>;
435
+ id: z.ZodOptional<z.ZodString>;
436
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
437
+ }, z.core.$strict>, z.ZodNull]>>;
438
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
439
+ }, z.core.$strict>>>;
440
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
441
+ content: z.ZodOptional<z.ZodString>;
442
+ id: z.ZodOptional<z.ZodString>;
443
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
444
+ }, z.core.$strict>, z.ZodNull]>>;
445
+ state: z.ZodString;
446
+ subject_expr: z.ZodObject<{
447
+ content: z.ZodOptional<z.ZodString>;
448
+ id: z.ZodOptional<z.ZodString>;
449
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
450
+ }, z.core.$strict>;
451
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
452
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
453
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
454
+ content: z.ZodOptional<z.ZodString>;
455
+ id: z.ZodOptional<z.ZodString>;
456
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
457
+ }, z.core.$strict>, z.ZodNull]>>;
458
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
459
+ content: z.ZodOptional<z.ZodString>;
460
+ id: z.ZodOptional<z.ZodString>;
461
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
462
+ }, z.core.$strict>, z.ZodNull]>>;
463
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
464
+ content: z.ZodOptional<z.ZodString>;
465
+ id: z.ZodOptional<z.ZodString>;
466
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
467
+ }, z.core.$strict>, z.ZodNull]>>;
468
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
469
+ }, z.core.$strict>>>;
470
+ }, z.core.$strict>>;
471
+ }, z.core.$strict>, z.ZodNull]>>;
472
+ subject: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
473
+ key_expr: z.ZodObject<{
474
+ content: z.ZodOptional<z.ZodString>;
475
+ id: z.ZodOptional<z.ZodString>;
476
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
477
+ }, z.core.$strict>;
478
+ kind: z.ZodString;
479
+ target_kind: z.ZodEnum<{
480
+ tool: "tool";
481
+ agent: "agent";
482
+ }>;
483
+ target_name: z.ZodString;
484
+ }, z.core.$strict>, z.ZodNull]>>;
485
+ tool: z.ZodString;
486
+ tool_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
487
+ topic: z.ZodString;
488
+ }, z.core.$strip>;
489
+ export type HookRegister = z.input<typeof hookRegister>;
490
+ export declare const stateDeclaration: z.ZodObject<{
491
+ default_subject_kind: z.ZodString;
492
+ description: z.ZodDefault<z.ZodString>;
493
+ effective_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
494
+ name: z.ZodString;
495
+ regimes: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodNull]>>;
496
+ retention_days: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
497
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
498
+ content: z.ZodOptional<z.ZodString>;
499
+ id: z.ZodOptional<z.ZodString>;
500
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
501
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
502
+ subject_kinds: z.ZodArray<z.ZodString>;
503
+ updated_at: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
504
+ }, z.core.$strict>;
505
+ export type StateDeclaration = z.infer<typeof stateDeclaration>;
506
+ export declare const stateTemplateDocument: z.ZodObject<{
507
+ declarations: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
508
+ check: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
509
+ content: z.ZodOptional<z.ZodString>;
510
+ id: z.ZodOptional<z.ZodString>;
511
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
512
+ }, z.core.$strict>, z.ZodNull]>>;
513
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
514
+ }, z.core.$strict>, z.ZodNull]>>;
515
+ description: z.ZodDefault<z.ZodString>;
516
+ kind: z.ZodDefault<z.ZodLiteral<"state-template">>;
517
+ name: z.ZodString;
518
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
519
+ reconcile: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
520
+ close: z.ZodObject<{
521
+ content: z.ZodOptional<z.ZodString>;
522
+ id: z.ZodOptional<z.ZodString>;
523
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
524
+ }, z.core.$strict>;
525
+ orphans: z.ZodObject<{
526
+ content: z.ZodOptional<z.ZodString>;
527
+ id: z.ZodOptional<z.ZodString>;
528
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
529
+ }, z.core.$strict>;
530
+ resolutions: z.ZodObject<{
531
+ content: z.ZodOptional<z.ZodString>;
532
+ id: z.ZodOptional<z.ZodString>;
533
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
534
+ }, z.core.$strict>;
535
+ }, z.core.$strict>, z.ZodNull]>>;
536
+ regimes: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
537
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
538
+ content: z.ZodOptional<z.ZodString>;
539
+ id: z.ZodOptional<z.ZodString>;
540
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
541
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
542
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodObject<{
543
+ description: z.ZodDefault<z.ZodString>;
544
+ jq: z.ZodObject<{
545
+ content: z.ZodOptional<z.ZodString>;
546
+ id: z.ZodOptional<z.ZodString>;
547
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
548
+ }, z.core.$strict>;
549
+ params: z.ZodDefault<z.ZodArray<z.ZodString>>;
550
+ purpose: z.ZodEnum<{
551
+ input: "input";
552
+ update: "update";
553
+ }>;
554
+ reads: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
555
+ writes: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
556
+ }, z.core.$strict>>, z.ZodNull]>>;
557
+ trace: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
558
+ }, z.core.$strict>;
559
+ export type StateTemplateDocument = z.infer<typeof stateTemplateDocument>;
560
+ export declare const templateJq: z.ZodObject<{
561
+ description: z.ZodDefault<z.ZodString>;
562
+ jq: z.ZodObject<{
563
+ content: z.ZodOptional<z.ZodString>;
564
+ id: z.ZodOptional<z.ZodString>;
565
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
566
+ }, z.core.$strict>;
567
+ params: z.ZodDefault<z.ZodArray<z.ZodString>>;
568
+ purpose: z.ZodEnum<{
569
+ input: "input";
570
+ update: "update";
571
+ }>;
572
+ reads: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
573
+ writes: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
574
+ }, z.core.$strict>;
575
+ export type TemplateJq = z.infer<typeof templateJq>;
576
+ export declare const templateReconcile: z.ZodObject<{
577
+ close: z.ZodObject<{
578
+ content: z.ZodOptional<z.ZodString>;
579
+ id: z.ZodOptional<z.ZodString>;
580
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
581
+ }, z.core.$strict>;
582
+ orphans: z.ZodObject<{
583
+ content: z.ZodOptional<z.ZodString>;
584
+ id: z.ZodOptional<z.ZodString>;
585
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
586
+ }, z.core.$strict>;
587
+ resolutions: z.ZodObject<{
588
+ content: z.ZodOptional<z.ZodString>;
589
+ id: z.ZodOptional<z.ZodString>;
590
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
591
+ }, z.core.$strict>;
592
+ }, z.core.$strict>;
593
+ export type TemplateReconcile = z.infer<typeof templateReconcile>;
594
+ export declare const templateDeclarations: z.ZodObject<{
595
+ check: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
596
+ content: z.ZodOptional<z.ZodString>;
597
+ id: z.ZodOptional<z.ZodString>;
598
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
599
+ }, z.core.$strict>, z.ZodNull]>>;
600
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
601
+ }, z.core.$strict>;
602
+ export type TemplateDeclarations = z.infer<typeof templateDeclarations>;
603
+ export declare const policyBody: z.ZodObject<{
604
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
605
+ content: z.ZodOptional<z.ZodString>;
606
+ id: z.ZodOptional<z.ZodString>;
607
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
608
+ }, z.core.$strict>, z.ZodNull]>>;
609
+ policy_data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
610
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
611
+ }, z.core.$strip>;
612
+ export type PolicyBody = z.infer<typeof policyBody>;
613
+ export declare const roleBody: z.ZodObject<{
614
+ allow_all: z.ZodDefault<z.ZodBoolean>;
615
+ base_tier: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
616
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
617
+ content: z.ZodOptional<z.ZodString>;
618
+ id: z.ZodOptional<z.ZodString>;
619
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
620
+ }, z.core.$strict>, z.ZodNull]>>;
621
+ description: z.ZodString;
622
+ grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
623
+ none: "none";
624
+ read: "read";
625
+ write: "write";
626
+ }>>;
627
+ name: z.ZodString;
628
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
629
+ }, z.core.$strip>;
630
+ export type RoleBody = z.infer<typeof roleBody>;
8
631
  /** An arbitrary JSON value (tool results, rendered payloads). */
9
632
  export declare const jsonValue: z.ZodType;
10
633
  /** A JSON Schema object (Pydantic-emitted). Permissive; parsed by the auto-form. */
11
634
  export declare const jsonSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
12
- /**
13
- * One authored-text value: either inline `content` (text written in place) or a
14
- * stored template `id` (a template resource fetched and rendered), never both and
15
- * never neither. `kwargs` are the render parameters and apply in BOTH cases — a
16
- * prompt with placeholders needs its values whether it was typed inline or fetched.
17
- * `.strict()` refuses any other key so a drifting field fails the parse loudly.
18
- */
19
- export declare const templatedText: z.ZodObject<{
20
- content: z.ZodOptional<z.ZodString>;
21
- id: z.ZodOptional<z.ZodString>;
22
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
23
- }, z.core.$strict>;
24
- export type TemplatedText = z.infer<typeof templatedText>;
25
- /**
26
- * A templated-text value that must carry a source: inline `content` is non-empty, or
27
- * a stored template `id` is chosen. Used where the platform contract requires a
28
- * value (e.g. a state binding's subject, an update's adapter when present).
29
- */
30
- export declare const requiredTemplatedText: z.ZodObject<{
31
- content: z.ZodOptional<z.ZodString>;
32
- id: z.ZodOptional<z.ZodString>;
33
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
34
- }, z.core.$strict>;
35
635
  export declare const toolNames: z.ZodArray<z.ZodString>;
36
636
  export declare const toolSchema: z.ZodObject<{
37
637
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -199,209 +799,6 @@ export declare const presetDetail: z.ZodObject<{
199
799
  fixed_kwargs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
200
800
  }, z.core.$strip>;
201
801
  export type PresetDetail = z.infer<typeof presetDetail>;
202
- /**
203
- * One input injection of a state binding: BEFORE the run, a value is produced and
204
- * placed into the run input under `into` (the run-input field name). A template
205
- * `input` jq (`template_jq`, named `name` or attachment-qualified `template.name`) reads the
206
- * record — its input is the record (`.`), with declared params bound as `$params`; a
207
- * custom `jq` reads `{record, input}` → the value. Exactly one of `template_jq`/`jq`
208
- * carries the program; the other is `null`.
209
- */
210
- export declare const stateInjection: z.ZodObject<{
211
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
212
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
213
- content: z.ZodOptional<z.ZodString>;
214
- id: z.ZodOptional<z.ZodString>;
215
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
216
- }, z.core.$strict>>>;
217
- into: z.ZodString;
218
- }, z.core.$strip>;
219
- export type StateInjection = z.infer<typeof stateInjection>;
220
- /**
221
- * One update of a state binding: AFTER the run, a template-relative op batch is
222
- * applied through the store. A NAMED update (`template_jq`) runs the template `update`
223
- * jq over `{record, input}` where `input` is built by `adapter` — a jq over
224
- * `{output, input}` that constructs the update jq's declared input object. A custom
225
- * `jq` runs over `{record, output, input}` → `[{op, path, value}]` and carries no
226
- * adapter. `op_id` is an optional idempotency-key expression. Exactly one of
227
- * `template_jq`/`jq` carries the program.
228
- */
229
- export declare const stateUpdate: z.ZodObject<{
230
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
231
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
232
- content: z.ZodOptional<z.ZodString>;
233
- id: z.ZodOptional<z.ZodString>;
234
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
235
- }, z.core.$strict>>>;
236
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
237
- content: z.ZodOptional<z.ZodString>;
238
- id: z.ZodOptional<z.ZodString>;
239
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
240
- }, z.core.$strict>>>;
241
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
242
- content: z.ZodOptional<z.ZodString>;
243
- id: z.ZodOptional<z.ZodString>;
244
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
245
- }, z.core.$strict>>>;
246
- }, z.core.$strip>;
247
- export type StateUpdate = z.infer<typeof stateUpdate>;
248
- /**
249
- * One attached state of a binding: the `state`, one or more `templates`
250
- * (attach-on-use — attached to the state on the binding's save), the `subject_expr`
251
- * (a jq yielding the record KEY — a bare key string OR a full subject object — that
252
- * this binding reads and updates), an optional `scope_expr` (a boolean jq predicate;
253
- * when it is false this state is skipped for the run), and the ordered
254
- * `input_injections` (before the run) and `updates` (after it).
255
- */
256
- export declare const stateAttach: z.ZodObject<{
257
- state: z.ZodString;
258
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
259
- subject_expr: z.ZodObject<{
260
- content: z.ZodOptional<z.ZodString>;
261
- id: z.ZodOptional<z.ZodString>;
262
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
263
- }, z.core.$strict>;
264
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
265
- content: z.ZodOptional<z.ZodString>;
266
- id: z.ZodOptional<z.ZodString>;
267
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
268
- }, z.core.$strict>>>;
269
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
270
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
271
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
272
- content: z.ZodOptional<z.ZodString>;
273
- id: z.ZodOptional<z.ZodString>;
274
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
275
- }, z.core.$strict>>>;
276
- into: z.ZodString;
277
- }, z.core.$strip>>>;
278
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
279
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
280
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
281
- content: z.ZodOptional<z.ZodString>;
282
- id: z.ZodOptional<z.ZodString>;
283
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
284
- }, z.core.$strict>>>;
285
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
286
- content: z.ZodOptional<z.ZodString>;
287
- id: z.ZodOptional<z.ZodString>;
288
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
289
- }, z.core.$strict>>>;
290
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
291
- content: z.ZodOptional<z.ZodString>;
292
- id: z.ZodOptional<z.ZodString>;
293
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
294
- }, z.core.$strict>>>;
295
- }, z.core.$strip>>>;
296
- }, z.core.$strip>;
297
- export type StateAttach = z.infer<typeof stateAttach>;
298
- /**
299
- * The one generic binding shape carried, optionally, on every runnable definition
300
- * (a preset, a channel route, a schedule, a hook) and repeated per node by the
301
- * flow engine. It attaches one or more states, each with its templates, subject,
302
- * injections and updates. `null` on a definition means no binding. Mirrors the
303
- * platform `StateBinding` document.
304
- */
305
- export declare const stateBinding: z.ZodObject<{
306
- states: z.ZodArray<z.ZodObject<{
307
- state: z.ZodString;
308
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
309
- subject_expr: z.ZodObject<{
310
- content: z.ZodOptional<z.ZodString>;
311
- id: z.ZodOptional<z.ZodString>;
312
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
313
- }, z.core.$strict>;
314
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
315
- content: z.ZodOptional<z.ZodString>;
316
- id: z.ZodOptional<z.ZodString>;
317
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
318
- }, z.core.$strict>>>;
319
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
320
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
321
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
322
- content: z.ZodOptional<z.ZodString>;
323
- id: z.ZodOptional<z.ZodString>;
324
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
325
- }, z.core.$strict>>>;
326
- into: z.ZodString;
327
- }, z.core.$strip>>>;
328
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
329
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
330
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
331
- content: z.ZodOptional<z.ZodString>;
332
- id: z.ZodOptional<z.ZodString>;
333
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
334
- }, z.core.$strict>>>;
335
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
336
- content: z.ZodOptional<z.ZodString>;
337
- id: z.ZodOptional<z.ZodString>;
338
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
339
- }, z.core.$strict>>>;
340
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
341
- content: z.ZodOptional<z.ZodString>;
342
- id: z.ZodOptional<z.ZodString>;
343
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
344
- }, z.core.$strict>>>;
345
- }, z.core.$strip>>>;
346
- }, z.core.$strip>>;
347
- }, z.core.$strip>;
348
- export type StateBinding = z.infer<typeof stateBinding>;
349
- /** The full version body a preset stores under `kind="preset"`. */
350
- export declare const presetBody: z.ZodObject<{
351
- base_tool: z.ZodString;
352
- description: z.ZodString;
353
- fixed_kwargs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
354
- extensions: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
355
- name: z.ZodString;
356
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
357
- }, z.core.$strip>]>>>;
358
- output_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
359
- input_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
360
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
361
- states: z.ZodArray<z.ZodObject<{
362
- state: z.ZodString;
363
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
364
- subject_expr: z.ZodObject<{
365
- content: z.ZodOptional<z.ZodString>;
366
- id: z.ZodOptional<z.ZodString>;
367
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
368
- }, z.core.$strict>;
369
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
370
- content: z.ZodOptional<z.ZodString>;
371
- id: z.ZodOptional<z.ZodString>;
372
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
373
- }, z.core.$strict>>>;
374
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
375
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
376
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
377
- content: z.ZodOptional<z.ZodString>;
378
- id: z.ZodOptional<z.ZodString>;
379
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
380
- }, z.core.$strict>>>;
381
- into: z.ZodString;
382
- }, z.core.$strip>>>;
383
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
384
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
385
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
386
- content: z.ZodOptional<z.ZodString>;
387
- id: z.ZodOptional<z.ZodString>;
388
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
389
- }, z.core.$strict>>>;
390
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
391
- content: z.ZodOptional<z.ZodString>;
392
- id: z.ZodOptional<z.ZodString>;
393
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
394
- }, z.core.$strict>>>;
395
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
396
- content: z.ZodOptional<z.ZodString>;
397
- id: z.ZodOptional<z.ZodString>;
398
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
399
- }, z.core.$strict>>>;
400
- }, z.core.$strip>>>;
401
- }, z.core.$strip>>;
402
- }, z.core.$strip>>>;
403
- }, z.core.$strip>;
404
- export type PresetBody = z.infer<typeof presetBody>;
405
802
  /**
406
803
  * One immutable version row (`GET /api/presets/{name}/versions[/{version}]`).
407
804
  * `is_current` flags the active version; `tags` here is the GENERIC per-version
@@ -412,57 +809,62 @@ export declare const presetVersion: z.ZodObject<{
412
809
  version: z.ZodNumber;
413
810
  body: z.ZodObject<{
414
811
  base_tool: z.ZodString;
415
- description: z.ZodString;
416
- fixed_kwargs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
417
- extensions: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
418
- name: z.ZodString;
419
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
420
- }, z.core.$strip>]>>>;
421
- output_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
422
- input_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
423
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
812
+ description: z.ZodDefault<z.ZodString>;
813
+ extensions: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>>;
814
+ fixed_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
815
+ input_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
816
+ content: z.ZodOptional<z.ZodString>;
817
+ id: z.ZodOptional<z.ZodString>;
818
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
819
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
820
+ output_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
821
+ content: z.ZodOptional<z.ZodString>;
822
+ id: z.ZodOptional<z.ZodString>;
823
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
824
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
825
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
424
826
  states: z.ZodArray<z.ZodObject<{
425
- state: z.ZodString;
426
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
427
- subject_expr: z.ZodObject<{
428
- content: z.ZodOptional<z.ZodString>;
429
- id: z.ZodOptional<z.ZodString>;
430
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
431
- }, z.core.$strict>;
432
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
433
- content: z.ZodOptional<z.ZodString>;
434
- id: z.ZodOptional<z.ZodString>;
435
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
436
- }, z.core.$strict>>>;
437
827
  input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
438
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
439
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
828
+ into: z.ZodString;
829
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
440
830
  content: z.ZodOptional<z.ZodString>;
441
831
  id: z.ZodOptional<z.ZodString>;
442
832
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
443
- }, z.core.$strict>>>;
444
- into: z.ZodString;
445
- }, z.core.$strip>>>;
833
+ }, z.core.$strict>, z.ZodNull]>>;
834
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
835
+ }, z.core.$strict>>>;
836
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
837
+ content: z.ZodOptional<z.ZodString>;
838
+ id: z.ZodOptional<z.ZodString>;
839
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
840
+ }, z.core.$strict>, z.ZodNull]>>;
841
+ state: z.ZodString;
842
+ subject_expr: z.ZodObject<{
843
+ content: z.ZodOptional<z.ZodString>;
844
+ id: z.ZodOptional<z.ZodString>;
845
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
846
+ }, z.core.$strict>;
847
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
446
848
  updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
447
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
448
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
849
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
449
850
  content: z.ZodOptional<z.ZodString>;
450
851
  id: z.ZodOptional<z.ZodString>;
451
852
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
452
- }, z.core.$strict>>>;
453
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
853
+ }, z.core.$strict>, z.ZodNull]>>;
854
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
454
855
  content: z.ZodOptional<z.ZodString>;
455
856
  id: z.ZodOptional<z.ZodString>;
456
857
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
457
- }, z.core.$strict>>>;
458
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
858
+ }, z.core.$strict>, z.ZodNull]>>;
859
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
459
860
  content: z.ZodOptional<z.ZodString>;
460
861
  id: z.ZodOptional<z.ZodString>;
461
862
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
462
- }, z.core.$strict>>>;
463
- }, z.core.$strip>>>;
464
- }, z.core.$strip>>;
465
- }, z.core.$strip>>>;
863
+ }, z.core.$strict>, z.ZodNull]>>;
864
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
865
+ }, z.core.$strict>>>;
866
+ }, z.core.$strict>>;
867
+ }, z.core.$strict>, z.ZodNull]>>;
466
868
  }, z.core.$strip>;
467
869
  tags: z.ZodArray<z.ZodString>;
468
870
  created_at: z.ZodString;
@@ -473,57 +875,62 @@ export declare const presetVersionList: z.ZodArray<z.ZodObject<{
473
875
  version: z.ZodNumber;
474
876
  body: z.ZodObject<{
475
877
  base_tool: z.ZodString;
476
- description: z.ZodString;
477
- fixed_kwargs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
478
- extensions: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
479
- name: z.ZodString;
480
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
481
- }, z.core.$strip>]>>>;
482
- output_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
483
- input_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
484
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
878
+ description: z.ZodDefault<z.ZodString>;
879
+ extensions: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>>;
880
+ fixed_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
881
+ input_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
882
+ content: z.ZodOptional<z.ZodString>;
883
+ id: z.ZodOptional<z.ZodString>;
884
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
885
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
886
+ output_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
887
+ content: z.ZodOptional<z.ZodString>;
888
+ id: z.ZodOptional<z.ZodString>;
889
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
890
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
891
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
485
892
  states: z.ZodArray<z.ZodObject<{
486
- state: z.ZodString;
487
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
488
- subject_expr: z.ZodObject<{
893
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
894
+ into: z.ZodString;
895
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
896
+ content: z.ZodOptional<z.ZodString>;
897
+ id: z.ZodOptional<z.ZodString>;
898
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
899
+ }, z.core.$strict>, z.ZodNull]>>;
900
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
901
+ }, z.core.$strict>>>;
902
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
489
903
  content: z.ZodOptional<z.ZodString>;
490
904
  id: z.ZodOptional<z.ZodString>;
491
905
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
492
- }, z.core.$strict>;
493
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
906
+ }, z.core.$strict>, z.ZodNull]>>;
907
+ state: z.ZodString;
908
+ subject_expr: z.ZodObject<{
494
909
  content: z.ZodOptional<z.ZodString>;
495
910
  id: z.ZodOptional<z.ZodString>;
496
911
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
497
- }, z.core.$strict>>>;
498
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
499
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
500
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
501
- content: z.ZodOptional<z.ZodString>;
502
- id: z.ZodOptional<z.ZodString>;
503
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
504
- }, z.core.$strict>>>;
505
- into: z.ZodString;
506
- }, z.core.$strip>>>;
912
+ }, z.core.$strict>;
913
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
507
914
  updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
508
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
509
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
915
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
510
916
  content: z.ZodOptional<z.ZodString>;
511
917
  id: z.ZodOptional<z.ZodString>;
512
918
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
513
- }, z.core.$strict>>>;
514
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
919
+ }, z.core.$strict>, z.ZodNull]>>;
920
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
515
921
  content: z.ZodOptional<z.ZodString>;
516
922
  id: z.ZodOptional<z.ZodString>;
517
923
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
518
- }, z.core.$strict>>>;
519
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
924
+ }, z.core.$strict>, z.ZodNull]>>;
925
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
520
926
  content: z.ZodOptional<z.ZodString>;
521
927
  id: z.ZodOptional<z.ZodString>;
522
928
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
523
- }, z.core.$strict>>>;
524
- }, z.core.$strip>>>;
525
- }, z.core.$strip>>;
526
- }, z.core.$strip>>>;
929
+ }, z.core.$strict>, z.ZodNull]>>;
930
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
931
+ }, z.core.$strict>>>;
932
+ }, z.core.$strict>>;
933
+ }, z.core.$strict>, z.ZodNull]>>;
527
934
  }, z.core.$strip>;
528
935
  tags: z.ZodArray<z.ZodString>;
529
936
  created_at: z.ZodString;
@@ -1446,8 +1853,8 @@ export declare const providerView: z.ZodObject<{
1446
1853
  description: z.ZodString;
1447
1854
  icon_url: z.ZodURL;
1448
1855
  kind: z.ZodEnum<{
1449
- oauth: "oauth";
1450
1856
  none: "none";
1857
+ oauth: "oauth";
1451
1858
  }>;
1452
1859
  origin: z.ZodEnum<{
1453
1860
  system: "system";
@@ -1495,8 +1902,8 @@ export declare const providers: z.ZodObject<{
1495
1902
  description: z.ZodString;
1496
1903
  icon_url: z.ZodURL;
1497
1904
  kind: z.ZodEnum<{
1498
- oauth: "oauth";
1499
1905
  none: "none";
1906
+ oauth: "oauth";
1500
1907
  }>;
1501
1908
  origin: z.ZodEnum<{
1502
1909
  system: "system";
@@ -1532,8 +1939,8 @@ export declare const connectionView: z.ZodObject<{
1532
1939
  provider_id: z.ZodString;
1533
1940
  alias: z.ZodString;
1534
1941
  kind: z.ZodEnum<{
1535
- oauth: "oauth";
1536
1942
  none: "none";
1943
+ oauth: "oauth";
1537
1944
  }>;
1538
1945
  account_identity: z.ZodNullable<z.ZodString>;
1539
1946
  enabled_sub_services: z.ZodArray<z.ZodString>;
@@ -1553,8 +1960,8 @@ export declare const connectionsList: z.ZodObject<{
1553
1960
  provider_id: z.ZodString;
1554
1961
  alias: z.ZodString;
1555
1962
  kind: z.ZodEnum<{
1556
- oauth: "oauth";
1557
1963
  none: "none";
1964
+ oauth: "oauth";
1558
1965
  }>;
1559
1966
  account_identity: z.ZodNullable<z.ZodString>;
1560
1967
  enabled_sub_services: z.ZodArray<z.ZodString>;
@@ -1841,8 +2248,8 @@ export declare const answerFormat: z.ZodEnum<{
1841
2248
  export type AnswerFormat = z.infer<typeof answerFormat>;
1842
2249
  /** The kind of a question's display-only media item: a remote/inline image, or a link. */
1843
2250
  export declare const mediaKind: z.ZodEnum<{
1844
- link: "link";
1845
2251
  image: "image";
2252
+ link: "link";
1846
2253
  }>;
1847
2254
  export type MediaKind = z.infer<typeof mediaKind>;
1848
2255
  /**
@@ -1860,8 +2267,8 @@ export type MediaKind = z.infer<typeof mediaKind>;
1860
2267
  */
1861
2268
  export declare const interactionMediaItem: z.ZodObject<{
1862
2269
  kind: z.ZodEnum<{
1863
- link: "link";
1864
2270
  image: "image";
2271
+ link: "link";
1865
2272
  }>;
1866
2273
  url: z.ZodString;
1867
2274
  caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -2043,236 +2450,45 @@ export declare const conversationRecordOrigin: z.ZodEnum<{
2043
2450
  operator: "operator";
2044
2451
  }>;
2045
2452
  export type ConversationRecordOrigin = z.infer<typeof conversationRecordOrigin>;
2046
- /**
2047
- * A stored routing row as a read door returns it, its `callback_secret` withheld.
2048
- *
2049
- * `initial_mode`, `turns_per_hour_override`, and `error_reply_text` carry defaults
2050
- * because a stored row always returns them, while a hand-built stub/fixture may
2051
- * omit them — the default keeps such a payload valid without inventing a field the
2052
- * server never sends.
2053
- */
2054
- export declare const conversationRoute: z.ZodObject<{
2055
- route_name: z.ZodString;
2056
- door: z.ZodEnum<{
2057
- channel: "channel";
2058
- api: "api";
2059
- }>;
2060
- target_kind: z.ZodEnum<{
2061
- tool: "tool";
2062
- agent: "agent";
2063
- }>;
2064
- target_name: z.ZodString;
2065
- payload_expr: z.ZodNullable<z.ZodString>;
2066
- reply_expr: z.ZodNullable<z.ZodString>;
2067
- initial_mode: z.ZodDefault<z.ZodEnum<{
2068
- agent: "agent";
2069
- manual: "manual";
2070
- }>>;
2071
- execution_key: z.ZodString;
2072
- channel: z.ZodNullable<z.ZodString>;
2073
- our_identity: z.ZodNullable<z.ZodString>;
2074
- callback_url: z.ZodNullable<z.ZodString>;
2075
- turns_per_hour_override: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2076
- error_reply_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2077
- execution_key_fingerprint: z.ZodString;
2078
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2079
- states: z.ZodArray<z.ZodObject<{
2080
- state: z.ZodString;
2081
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2082
- subject_expr: z.ZodObject<{
2083
- content: z.ZodOptional<z.ZodString>;
2084
- id: z.ZodOptional<z.ZodString>;
2085
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2086
- }, z.core.$strict>;
2087
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2088
- content: z.ZodOptional<z.ZodString>;
2089
- id: z.ZodOptional<z.ZodString>;
2090
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2091
- }, z.core.$strict>>>;
2092
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2093
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2094
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2095
- content: z.ZodOptional<z.ZodString>;
2096
- id: z.ZodOptional<z.ZodString>;
2097
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2098
- }, z.core.$strict>>>;
2099
- into: z.ZodString;
2100
- }, z.core.$strip>>>;
2101
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2102
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2103
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2104
- content: z.ZodOptional<z.ZodString>;
2105
- id: z.ZodOptional<z.ZodString>;
2106
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2107
- }, z.core.$strict>>>;
2108
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2109
- content: z.ZodOptional<z.ZodString>;
2110
- id: z.ZodOptional<z.ZodString>;
2111
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2112
- }, z.core.$strict>>>;
2113
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2114
- content: z.ZodOptional<z.ZodString>;
2115
- id: z.ZodOptional<z.ZodString>;
2116
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2117
- }, z.core.$strict>>>;
2118
- }, z.core.$strip>>>;
2119
- }, z.core.$strip>>;
2120
- }, z.core.$strip>>>;
2121
- }, z.core.$strip>;
2122
- export type ConversationRoute = z.infer<typeof conversationRoute>;
2123
2453
  export declare const conversationRoutes: z.ZodObject<{
2124
2454
  items: z.ZodArray<z.ZodObject<{
2125
- route_name: z.ZodString;
2455
+ callback_secret: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2456
+ callback_url: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2457
+ channel: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2126
2458
  door: z.ZodEnum<{
2127
2459
  channel: "channel";
2128
2460
  api: "api";
2129
2461
  }>;
2462
+ error_reply_text: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2463
+ execution_key: z.ZodString;
2464
+ execution_key_fingerprint: z.ZodString;
2465
+ initial_mode: z.ZodDefault<z.ZodEnum<{
2466
+ agent: "agent";
2467
+ manual: "manual";
2468
+ }>>;
2469
+ locale: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2470
+ our_identity: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2471
+ payload_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2472
+ content: z.ZodOptional<z.ZodString>;
2473
+ id: z.ZodOptional<z.ZodString>;
2474
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2475
+ }, z.core.$strict>, z.ZodNull]>>;
2476
+ reply_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2477
+ content: z.ZodOptional<z.ZodString>;
2478
+ id: z.ZodOptional<z.ZodString>;
2479
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2480
+ }, z.core.$strict>, z.ZodNull]>>;
2481
+ route_name: z.ZodString;
2130
2482
  target_kind: z.ZodEnum<{
2131
2483
  tool: "tool";
2132
2484
  agent: "agent";
2133
2485
  }>;
2134
2486
  target_name: z.ZodString;
2135
- payload_expr: z.ZodNullable<z.ZodString>;
2136
- reply_expr: z.ZodNullable<z.ZodString>;
2137
- initial_mode: z.ZodDefault<z.ZodEnum<{
2138
- agent: "agent";
2139
- manual: "manual";
2140
- }>>;
2141
- execution_key: z.ZodString;
2142
- channel: z.ZodNullable<z.ZodString>;
2143
- our_identity: z.ZodNullable<z.ZodString>;
2144
- callback_url: z.ZodNullable<z.ZodString>;
2145
- turns_per_hour_override: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2146
- error_reply_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2147
- execution_key_fingerprint: z.ZodString;
2148
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2149
- states: z.ZodArray<z.ZodObject<{
2150
- state: z.ZodString;
2151
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2152
- subject_expr: z.ZodObject<{
2153
- content: z.ZodOptional<z.ZodString>;
2154
- id: z.ZodOptional<z.ZodString>;
2155
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2156
- }, z.core.$strict>;
2157
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2158
- content: z.ZodOptional<z.ZodString>;
2159
- id: z.ZodOptional<z.ZodString>;
2160
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2161
- }, z.core.$strict>>>;
2162
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2163
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2164
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2165
- content: z.ZodOptional<z.ZodString>;
2166
- id: z.ZodOptional<z.ZodString>;
2167
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2168
- }, z.core.$strict>>>;
2169
- into: z.ZodString;
2170
- }, z.core.$strip>>>;
2171
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2172
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2173
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2174
- content: z.ZodOptional<z.ZodString>;
2175
- id: z.ZodOptional<z.ZodString>;
2176
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2177
- }, z.core.$strict>>>;
2178
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2179
- content: z.ZodOptional<z.ZodString>;
2180
- id: z.ZodOptional<z.ZodString>;
2181
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2182
- }, z.core.$strict>>>;
2183
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2184
- content: z.ZodOptional<z.ZodString>;
2185
- id: z.ZodOptional<z.ZodString>;
2186
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2187
- }, z.core.$strict>>>;
2188
- }, z.core.$strip>>>;
2189
- }, z.core.$strip>>;
2190
- }, z.core.$strip>>>;
2487
+ turns_per_hour_override: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
2191
2488
  }, z.core.$strip>>;
2192
2489
  total: z.ZodNumber;
2193
2490
  }, z.core.$strip>;
2194
2491
  export type ConversationRoutes = z.infer<typeof conversationRoutes>;
2195
- /**
2196
- * The client-facing create/edit body for a conversation route — the wire model of
2197
- * `tai42_contract.conversations.ConversationRouteCreate`. `POST
2198
- * /api/conversations/{route_name}` is an UPSERT, so this one shape is both the
2199
- * create AND the edit body. `route_name` rides the URL path; it is carried here too
2200
- * (the door rejects a body whose `route_name` disagrees with the path).
2201
- *
2202
- * The contract's cross-field validators are mirrored where the form authors this
2203
- * body: `payload_expr`/`reply_expr` are tool-only; an `api` door carries a
2204
- * `callback_url` (and no channel identity); a `channel` door carries `channel` +
2205
- * `our_identity` (and no callback). Sent explicitly (including `null`) so an edit
2206
- * clears a field the operator emptied rather than leaving the stored value.
2207
- */
2208
- export declare const conversationRouteCreate: z.ZodObject<{
2209
- route_name: z.ZodString;
2210
- door: z.ZodEnum<{
2211
- channel: "channel";
2212
- api: "api";
2213
- }>;
2214
- target_kind: z.ZodEnum<{
2215
- tool: "tool";
2216
- agent: "agent";
2217
- }>;
2218
- target_name: z.ZodString;
2219
- payload_expr: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2220
- reply_expr: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2221
- initial_mode: z.ZodDefault<z.ZodEnum<{
2222
- agent: "agent";
2223
- manual: "manual";
2224
- }>>;
2225
- execution_key: z.ZodString;
2226
- channel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2227
- our_identity: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2228
- callback_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2229
- turns_per_hour_override: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2230
- error_reply_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2231
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2232
- states: z.ZodArray<z.ZodObject<{
2233
- state: z.ZodString;
2234
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2235
- subject_expr: z.ZodObject<{
2236
- content: z.ZodOptional<z.ZodString>;
2237
- id: z.ZodOptional<z.ZodString>;
2238
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2239
- }, z.core.$strict>;
2240
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2241
- content: z.ZodOptional<z.ZodString>;
2242
- id: z.ZodOptional<z.ZodString>;
2243
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2244
- }, z.core.$strict>>>;
2245
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2246
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2247
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2248
- content: z.ZodOptional<z.ZodString>;
2249
- id: z.ZodOptional<z.ZodString>;
2250
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2251
- }, z.core.$strict>>>;
2252
- into: z.ZodString;
2253
- }, z.core.$strip>>>;
2254
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2255
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2256
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2257
- content: z.ZodOptional<z.ZodString>;
2258
- id: z.ZodOptional<z.ZodString>;
2259
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2260
- }, z.core.$strict>>>;
2261
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2262
- content: z.ZodOptional<z.ZodString>;
2263
- id: z.ZodOptional<z.ZodString>;
2264
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2265
- }, z.core.$strict>>>;
2266
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2267
- content: z.ZodOptional<z.ZodString>;
2268
- id: z.ZodOptional<z.ZodString>;
2269
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2270
- }, z.core.$strict>>>;
2271
- }, z.core.$strip>>>;
2272
- }, z.core.$strip>>;
2273
- }, z.core.$strip>>>;
2274
- }, z.core.$strip>;
2275
- export type ConversationRouteCreate = z.infer<typeof conversationRouteCreate>;
2276
2492
  /**
2277
2493
  * The create/replace reply: whether THIS call created the row (vs. replaced an
2278
2494
  * existing one), the row itself (its `callback_secret` withheld), and the
@@ -2284,72 +2500,39 @@ export declare const conversationRouteWritten: z.ZodObject<{
2284
2500
  created: z.ZodBoolean;
2285
2501
  route_name: z.ZodString;
2286
2502
  route: z.ZodObject<{
2287
- route_name: z.ZodString;
2503
+ callback_secret: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2504
+ callback_url: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2505
+ channel: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2288
2506
  door: z.ZodEnum<{
2289
2507
  channel: "channel";
2290
2508
  api: "api";
2291
2509
  }>;
2292
- target_kind: z.ZodEnum<{
2293
- tool: "tool";
2294
- agent: "agent";
2295
- }>;
2296
- target_name: z.ZodString;
2297
- payload_expr: z.ZodNullable<z.ZodString>;
2298
- reply_expr: z.ZodNullable<z.ZodString>;
2299
- initial_mode: z.ZodDefault<z.ZodEnum<{
2300
- agent: "agent";
2301
- manual: "manual";
2302
- }>>;
2510
+ error_reply_text: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2303
2511
  execution_key: z.ZodString;
2304
- channel: z.ZodNullable<z.ZodString>;
2305
- our_identity: z.ZodNullable<z.ZodString>;
2306
- callback_url: z.ZodNullable<z.ZodString>;
2307
- turns_per_hour_override: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
2308
- error_reply_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2309
- execution_key_fingerprint: z.ZodString;
2310
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2311
- states: z.ZodArray<z.ZodObject<{
2312
- state: z.ZodString;
2313
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2314
- subject_expr: z.ZodObject<{
2315
- content: z.ZodOptional<z.ZodString>;
2316
- id: z.ZodOptional<z.ZodString>;
2317
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2318
- }, z.core.$strict>;
2319
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2320
- content: z.ZodOptional<z.ZodString>;
2321
- id: z.ZodOptional<z.ZodString>;
2322
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2323
- }, z.core.$strict>>>;
2324
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2325
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2326
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2327
- content: z.ZodOptional<z.ZodString>;
2328
- id: z.ZodOptional<z.ZodString>;
2329
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2330
- }, z.core.$strict>>>;
2331
- into: z.ZodString;
2332
- }, z.core.$strip>>>;
2333
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2334
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2335
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2336
- content: z.ZodOptional<z.ZodString>;
2337
- id: z.ZodOptional<z.ZodString>;
2338
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2339
- }, z.core.$strict>>>;
2340
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2341
- content: z.ZodOptional<z.ZodString>;
2342
- id: z.ZodOptional<z.ZodString>;
2343
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2344
- }, z.core.$strict>>>;
2345
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2346
- content: z.ZodOptional<z.ZodString>;
2347
- id: z.ZodOptional<z.ZodString>;
2348
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2349
- }, z.core.$strict>>>;
2350
- }, z.core.$strip>>>;
2351
- }, z.core.$strip>>;
2352
- }, z.core.$strip>>>;
2512
+ execution_key_fingerprint: z.ZodString;
2513
+ initial_mode: z.ZodDefault<z.ZodEnum<{
2514
+ agent: "agent";
2515
+ manual: "manual";
2516
+ }>>;
2517
+ locale: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2518
+ our_identity: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2519
+ payload_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2520
+ content: z.ZodOptional<z.ZodString>;
2521
+ id: z.ZodOptional<z.ZodString>;
2522
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2523
+ }, z.core.$strict>, z.ZodNull]>>;
2524
+ reply_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2525
+ content: z.ZodOptional<z.ZodString>;
2526
+ id: z.ZodOptional<z.ZodString>;
2527
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2528
+ }, z.core.$strict>, z.ZodNull]>>;
2529
+ route_name: z.ZodString;
2530
+ target_kind: z.ZodEnum<{
2531
+ tool: "tool";
2532
+ agent: "agent";
2533
+ }>;
2534
+ target_name: z.ZodString;
2535
+ turns_per_hour_override: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
2353
2536
  }, z.core.$strip>;
2354
2537
  callback_secret: z.ZodNullable<z.ZodString>;
2355
2538
  }, z.core.$strip>;
@@ -2602,40 +2785,59 @@ export declare const conversationThreadMessageSent: z.ZodObject<{
2602
2785
  thread_id: z.ZodString;
2603
2786
  }, z.core.$strip>;
2604
2787
  export type ConversationThreadMessageSent = z.infer<typeof conversationThreadMessageSent>;
2605
- /**
2606
- * Per-target presentation config for the conversation bridge, keyed by
2607
- * `(target_kind, target_name)` — the wire model of
2608
- * `tai42_contract.conversations.TargetConversationConfig`. The row carries no
2609
- * server-derived fields, so this ONE shape is the stored row AND the upsert body
2610
- * (`PUT /api/conversation-configs/{target_kind}/{target_name}` is the create AND
2611
- * the edit path).
2612
- *
2613
- * `multichannel` opts the target into person linking; `greeting_template` is the
2614
- * first-contact greeting. `greeting_template` is a `str.format` template (NOT a jq
2615
- * expression) that may reference at most the `{pairing_code}` placeholder — it
2616
- * carries no `x-tai42-expression`. `null` is the explicit spelling for "no
2617
- * greeting"; a blank string is refused server-side.
2618
- */
2619
- export declare const targetConversationConfig: z.ZodObject<{
2620
- target_kind: z.ZodEnum<{
2621
- tool: "tool";
2622
- agent: "agent";
2623
- }>;
2624
- target_name: z.ZodString;
2625
- multichannel: z.ZodDefault<z.ZodBoolean>;
2626
- greeting_template: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2627
- }, z.core.$strip>;
2628
- export type TargetConversationConfig = z.infer<typeof targetConversationConfig>;
2629
2788
  /** Every stored per-target config (`GET /api/conversation-configs`). */
2630
2789
  export declare const conversationConfigs: z.ZodObject<{
2631
2790
  items: z.ZodArray<z.ZodObject<{
2791
+ greeting_template: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2792
+ multichannel: z.ZodDefault<z.ZodBoolean>;
2793
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2794
+ states: z.ZodArray<z.ZodObject<{
2795
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2796
+ into: z.ZodString;
2797
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2798
+ content: z.ZodOptional<z.ZodString>;
2799
+ id: z.ZodOptional<z.ZodString>;
2800
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2801
+ }, z.core.$strict>, z.ZodNull]>>;
2802
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2803
+ }, z.core.$strict>>>;
2804
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2805
+ content: z.ZodOptional<z.ZodString>;
2806
+ id: z.ZodOptional<z.ZodString>;
2807
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2808
+ }, z.core.$strict>, z.ZodNull]>>;
2809
+ state: z.ZodString;
2810
+ subject_expr: z.ZodObject<{
2811
+ content: z.ZodOptional<z.ZodString>;
2812
+ id: z.ZodOptional<z.ZodString>;
2813
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2814
+ }, z.core.$strict>;
2815
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2816
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2817
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2818
+ content: z.ZodOptional<z.ZodString>;
2819
+ id: z.ZodOptional<z.ZodString>;
2820
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2821
+ }, z.core.$strict>, z.ZodNull]>>;
2822
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2823
+ content: z.ZodOptional<z.ZodString>;
2824
+ id: z.ZodOptional<z.ZodString>;
2825
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2826
+ }, z.core.$strict>, z.ZodNull]>>;
2827
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2828
+ content: z.ZodOptional<z.ZodString>;
2829
+ id: z.ZodOptional<z.ZodString>;
2830
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2831
+ }, z.core.$strict>, z.ZodNull]>>;
2832
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2833
+ }, z.core.$strict>>>;
2834
+ }, z.core.$strict>>;
2835
+ }, z.core.$strict>, z.ZodNull]>>;
2632
2836
  target_kind: z.ZodEnum<{
2633
2837
  tool: "tool";
2634
2838
  agent: "agent";
2635
2839
  }>;
2636
2840
  target_name: z.ZodString;
2637
- multichannel: z.ZodDefault<z.ZodBoolean>;
2638
- greeting_template: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2639
2841
  }, z.core.$strip>>;
2640
2842
  total: z.ZodNumber;
2641
2843
  }, z.core.$strip>;
@@ -2652,13 +2854,56 @@ export declare const conversationConfigWritten: z.ZodObject<{
2652
2854
  }>;
2653
2855
  target_name: z.ZodString;
2654
2856
  config: z.ZodObject<{
2857
+ greeting_template: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2858
+ multichannel: z.ZodDefault<z.ZodBoolean>;
2859
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2860
+ states: z.ZodArray<z.ZodObject<{
2861
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2862
+ into: z.ZodString;
2863
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2864
+ content: z.ZodOptional<z.ZodString>;
2865
+ id: z.ZodOptional<z.ZodString>;
2866
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2867
+ }, z.core.$strict>, z.ZodNull]>>;
2868
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2869
+ }, z.core.$strict>>>;
2870
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2871
+ content: z.ZodOptional<z.ZodString>;
2872
+ id: z.ZodOptional<z.ZodString>;
2873
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2874
+ }, z.core.$strict>, z.ZodNull]>>;
2875
+ state: z.ZodString;
2876
+ subject_expr: z.ZodObject<{
2877
+ content: z.ZodOptional<z.ZodString>;
2878
+ id: z.ZodOptional<z.ZodString>;
2879
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2880
+ }, z.core.$strict>;
2881
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2882
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2883
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2884
+ content: z.ZodOptional<z.ZodString>;
2885
+ id: z.ZodOptional<z.ZodString>;
2886
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2887
+ }, z.core.$strict>, z.ZodNull]>>;
2888
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2889
+ content: z.ZodOptional<z.ZodString>;
2890
+ id: z.ZodOptional<z.ZodString>;
2891
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2892
+ }, z.core.$strict>, z.ZodNull]>>;
2893
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2894
+ content: z.ZodOptional<z.ZodString>;
2895
+ id: z.ZodOptional<z.ZodString>;
2896
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2897
+ }, z.core.$strict>, z.ZodNull]>>;
2898
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
2899
+ }, z.core.$strict>>>;
2900
+ }, z.core.$strict>>;
2901
+ }, z.core.$strict>, z.ZodNull]>>;
2655
2902
  target_kind: z.ZodEnum<{
2656
2903
  tool: "tool";
2657
2904
  agent: "agent";
2658
2905
  }>;
2659
2906
  target_name: z.ZodString;
2660
- multichannel: z.ZodDefault<z.ZodBoolean>;
2661
- greeting_template: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2662
2907
  }, z.core.$strip>;
2663
2908
  }, z.core.$strip>;
2664
2909
  export type ConversationConfigWritten = z.infer<typeof conversationConfigWritten>;
@@ -2789,18 +3034,6 @@ export declare const webEntryCodeRevoked: z.ZodObject<{
2789
3034
  status: z.ZodLiteral<"revoked">;
2790
3035
  }, z.core.$strip>;
2791
3036
  export type WebEntryCodeRevoked = z.infer<typeof webEntryCodeRevoked>;
2792
- /**
2793
- * A pre-approved channel template a notification carried, stored raw on the sink
2794
- * record when the notify supplied one (server-side it is mutually exclusive with
2795
- * `media`/`options`). `parameters` is the POSITIONAL list of body-text values
2796
- * substituted into the template's placeholders in order; empty when it has none.
2797
- */
2798
- export declare const channelTemplate: z.ZodObject<{
2799
- name: z.ZodString;
2800
- language: z.ZodString;
2801
- parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
2802
- }, z.core.$strip>;
2803
- export type ChannelTemplate = z.infer<typeof channelTemplate>;
2804
3037
  export declare const notification: z.ZodObject<{
2805
3038
  id: z.ZodString;
2806
3039
  message: z.ZodString;
@@ -2808,9 +3041,22 @@ export declare const notification: z.ZodObject<{
2808
3041
  audience: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2809
3042
  media: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
2810
3043
  template: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2811
- name: z.ZodString;
3044
+ body_parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
3045
+ buttons: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
3046
+ header_media: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3047
+ caption: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3048
+ filename: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3049
+ kind: z.ZodEnum<{
3050
+ image: "image";
3051
+ link: "link";
3052
+ document: "document";
3053
+ video: "video";
3054
+ audio: "audio";
3055
+ }>;
3056
+ url: z.ZodString;
3057
+ }, z.core.$strip>, z.ZodNull]>>;
2812
3058
  language: z.ZodString;
2813
- parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
3059
+ name: z.ZodString;
2814
3060
  }, z.core.$strip>>>;
2815
3061
  options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
2816
3062
  created_at: z.ZodString;
@@ -2824,9 +3070,22 @@ export declare const notifications: z.ZodObject<{
2824
3070
  audience: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2825
3071
  media: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnknown>>>;
2826
3072
  template: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2827
- name: z.ZodString;
3073
+ body_parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
3074
+ buttons: z.ZodDefault<z.ZodArray<z.ZodUnknown>>;
3075
+ header_media: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3076
+ caption: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3077
+ filename: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3078
+ kind: z.ZodEnum<{
3079
+ image: "image";
3080
+ link: "link";
3081
+ document: "document";
3082
+ video: "video";
3083
+ audio: "audio";
3084
+ }>;
3085
+ url: z.ZodString;
3086
+ }, z.core.$strip>, z.ZodNull]>>;
2828
3087
  language: z.ZodString;
2829
- parameters: z.ZodDefault<z.ZodArray<z.ZodString>>;
3088
+ name: z.ZodString;
2830
3089
  }, z.core.$strip>>>;
2831
3090
  options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
2832
3091
  created_at: z.ZodString;
@@ -2842,161 +3101,80 @@ export declare const triggerAuth: z.ZodEnum<{
2842
3101
  "out-of-service": "out-of-service";
2843
3102
  }>;
2844
3103
  export type TriggerAuth = z.infer<typeof triggerAuth>;
2845
- /**
2846
- * The optional state subject a hook fire targets (mirrors
2847
- * `tai42_contract.hooks.HookSubject`): the conversation-target scope plus the subject
2848
- * `kind` and a `key_expr` jq evaluated over the event payload at fire. `null` leaves the
2849
- * fire with no ambient state context.
2850
- */
2851
- export declare const hookSubject: z.ZodObject<{
2852
- target_kind: z.ZodEnum<{
2853
- tool: "tool";
2854
- agent: "agent";
2855
- }>;
2856
- target_name: z.ZodString;
2857
- kind: z.ZodString;
2858
- key_expr: z.ZodString;
2859
- }, z.core.$strip>;
2860
- export type HookSubject = z.infer<typeof hookSubject>;
2861
- export declare const hookParams: z.ZodObject<{
2862
- name: z.ZodString;
2863
- topic: z.ZodString;
2864
- tool: z.ZodString;
2865
- execution_key: z.ZodString;
2866
- tool_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2867
- subject: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2868
- target_kind: z.ZodEnum<{
2869
- tool: "tool";
2870
- agent: "agent";
2871
- }>;
2872
- target_name: z.ZodString;
2873
- kind: z.ZodString;
2874
- key_expr: z.ZodString;
2875
- }, z.core.$strip>>>;
2876
- condition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2877
- content: z.ZodOptional<z.ZodString>;
2878
- id: z.ZodOptional<z.ZodString>;
2879
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2880
- }, z.core.$strict>>>;
2881
- expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2882
- content: z.ZodOptional<z.ZodString>;
2883
- id: z.ZodOptional<z.ZodString>;
2884
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2885
- }, z.core.$strict>>>;
2886
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2887
- states: z.ZodArray<z.ZodObject<{
2888
- state: z.ZodString;
2889
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2890
- subject_expr: z.ZodObject<{
2891
- content: z.ZodOptional<z.ZodString>;
2892
- id: z.ZodOptional<z.ZodString>;
2893
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2894
- }, z.core.$strict>;
2895
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2896
- content: z.ZodOptional<z.ZodString>;
2897
- id: z.ZodOptional<z.ZodString>;
2898
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2899
- }, z.core.$strict>>>;
2900
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2901
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2902
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2903
- content: z.ZodOptional<z.ZodString>;
2904
- id: z.ZodOptional<z.ZodString>;
2905
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2906
- }, z.core.$strict>>>;
2907
- into: z.ZodString;
2908
- }, z.core.$strip>>>;
2909
- updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2910
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2911
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2912
- content: z.ZodOptional<z.ZodString>;
2913
- id: z.ZodOptional<z.ZodString>;
2914
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2915
- }, z.core.$strict>>>;
2916
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2917
- content: z.ZodOptional<z.ZodString>;
2918
- id: z.ZodOptional<z.ZodString>;
2919
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2920
- }, z.core.$strict>>>;
2921
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2922
- content: z.ZodOptional<z.ZodString>;
2923
- id: z.ZodOptional<z.ZodString>;
2924
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2925
- }, z.core.$strict>>>;
2926
- }, z.core.$strip>>>;
2927
- }, z.core.$strip>>;
2928
- }, z.core.$strip>>>;
2929
- }, z.core.$strip>;
2930
- export type HookParams = z.infer<typeof hookParams>;
2931
3104
  export declare const hookList: z.ZodObject<{
2932
3105
  items: z.ZodArray<z.ZodObject<{
2933
- name: z.ZodString;
2934
- topic: z.ZodString;
2935
- tool: z.ZodString;
2936
- execution_key: z.ZodString;
2937
- tool_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2938
- subject: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2939
- target_kind: z.ZodEnum<{
2940
- tool: "tool";
2941
- agent: "agent";
2942
- }>;
2943
- target_name: z.ZodString;
2944
- kind: z.ZodString;
2945
- key_expr: z.ZodString;
2946
- }, z.core.$strip>>>;
2947
- condition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3106
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2948
3107
  content: z.ZodOptional<z.ZodString>;
2949
3108
  id: z.ZodOptional<z.ZodString>;
2950
3109
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2951
- }, z.core.$strict>>>;
2952
- expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3110
+ }, z.core.$strict>, z.ZodNull]>>;
3111
+ execution_key: z.ZodString;
3112
+ execution_key_fingerprint: z.ZodString;
3113
+ expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2953
3114
  content: z.ZodOptional<z.ZodString>;
2954
3115
  id: z.ZodOptional<z.ZodString>;
2955
3116
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2956
- }, z.core.$strict>>>;
2957
- state_binding: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3117
+ }, z.core.$strict>, z.ZodNull]>>;
3118
+ name: z.ZodString;
3119
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2958
3120
  states: z.ZodArray<z.ZodObject<{
2959
- state: z.ZodString;
2960
- templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2961
- subject_expr: z.ZodObject<{
3121
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
3122
+ into: z.ZodString;
3123
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3124
+ content: z.ZodOptional<z.ZodString>;
3125
+ id: z.ZodOptional<z.ZodString>;
3126
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3127
+ }, z.core.$strict>, z.ZodNull]>>;
3128
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3129
+ }, z.core.$strict>>>;
3130
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2962
3131
  content: z.ZodOptional<z.ZodString>;
2963
3132
  id: z.ZodOptional<z.ZodString>;
2964
3133
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2965
- }, z.core.$strict>;
2966
- scope_expr: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3134
+ }, z.core.$strict>, z.ZodNull]>>;
3135
+ state: z.ZodString;
3136
+ subject_expr: z.ZodObject<{
2967
3137
  content: z.ZodOptional<z.ZodString>;
2968
3138
  id: z.ZodOptional<z.ZodString>;
2969
3139
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2970
- }, z.core.$strict>>>;
2971
- input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
2972
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2973
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
2974
- content: z.ZodOptional<z.ZodString>;
2975
- id: z.ZodOptional<z.ZodString>;
2976
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2977
- }, z.core.$strict>>>;
2978
- into: z.ZodString;
2979
- }, z.core.$strip>>>;
3140
+ }, z.core.$strict>;
3141
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
2980
3142
  updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
2981
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2982
- jq: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3143
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2983
3144
  content: z.ZodOptional<z.ZodString>;
2984
3145
  id: z.ZodOptional<z.ZodString>;
2985
3146
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2986
- }, z.core.$strict>>>;
2987
- adapter: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3147
+ }, z.core.$strict>, z.ZodNull]>>;
3148
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2988
3149
  content: z.ZodOptional<z.ZodString>;
2989
3150
  id: z.ZodOptional<z.ZodString>;
2990
3151
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2991
- }, z.core.$strict>>>;
2992
- op_id: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3152
+ }, z.core.$strict>, z.ZodNull]>>;
3153
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
2993
3154
  content: z.ZodOptional<z.ZodString>;
2994
3155
  id: z.ZodOptional<z.ZodString>;
2995
3156
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2996
- }, z.core.$strict>>>;
2997
- }, z.core.$strip>>>;
2998
- }, z.core.$strip>>;
2999
- }, z.core.$strip>>>;
3157
+ }, z.core.$strict>, z.ZodNull]>>;
3158
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3159
+ }, z.core.$strict>>>;
3160
+ }, z.core.$strict>>;
3161
+ }, z.core.$strict>, z.ZodNull]>>;
3162
+ subject: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3163
+ key_expr: z.ZodObject<{
3164
+ content: z.ZodOptional<z.ZodString>;
3165
+ id: z.ZodOptional<z.ZodString>;
3166
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3167
+ }, z.core.$strict>;
3168
+ kind: z.ZodString;
3169
+ target_kind: z.ZodEnum<{
3170
+ tool: "tool";
3171
+ agent: "agent";
3172
+ }>;
3173
+ target_name: z.ZodString;
3174
+ }, z.core.$strict>, z.ZodNull]>>;
3175
+ tool: z.ZodString;
3176
+ tool_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3177
+ topic: z.ZodString;
3000
3178
  }, z.core.$strip>>;
3001
3179
  total: z.ZodNumber;
3002
3180
  topic_verifiers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -3140,9 +3318,9 @@ export declare const removeScopeResult: z.ZodObject<{
3140
3318
  * (an unregistered/ungated path — no feature tags, no action).
3141
3319
  */
3142
3320
  export declare const routeAction: z.ZodEnum<{
3143
- secret: "secret";
3144
3321
  read: "read";
3145
3322
  write: "write";
3323
+ secret: "secret";
3146
3324
  fenced: "fenced";
3147
3325
  }>;
3148
3326
  export type RouteAction = z.infer<typeof routeAction>;
@@ -3164,9 +3342,9 @@ export declare const authRoute: z.ZodObject<{
3164
3342
  tags: z.ZodArray<z.ZodString>;
3165
3343
  summary: z.ZodString;
3166
3344
  action: z.ZodNullable<z.ZodEnum<{
3167
- secret: "secret";
3168
3345
  read: "read";
3169
3346
  write: "write";
3347
+ secret: "secret";
3170
3348
  fenced: "fenced";
3171
3349
  }>>;
3172
3350
  }, z.core.$strip>;
@@ -3178,9 +3356,9 @@ export declare const authRoutes: z.ZodArray<z.ZodObject<{
3178
3356
  tags: z.ZodArray<z.ZodString>;
3179
3357
  summary: z.ZodString;
3180
3358
  action: z.ZodNullable<z.ZodEnum<{
3181
- secret: "secret";
3182
3359
  read: "read";
3183
3360
  write: "write";
3361
+ secret: "secret";
3184
3362
  fenced: "fenced";
3185
3363
  }>>;
3186
3364
  }, z.core.$strip>>;
@@ -3191,55 +3369,29 @@ export declare const grantLevel: z.ZodEnum<{
3191
3369
  write: "write";
3192
3370
  }>;
3193
3371
  export type GrantLevel = z.infer<typeof grantLevel>;
3194
- /** A role's editable grant map: feature-group TAG name → the role's access level. */
3195
- export declare const roleGrants: z.ZodRecord<z.ZodString, z.ZodEnum<{
3196
- none: "none";
3197
- read: "read";
3198
- write: "write";
3199
- }>>;
3200
- export type RoleGrants = z.infer<typeof roleGrants>;
3201
- /**
3202
- * A role body (`GET /api/auth/roles`, and the write routes' echo). Layer 1 is the
3203
- * read-only base-tier ceiling — the seeded jq `condition` plus `base_tier`
3204
- * (`editor`/`viewer`, or `null` for the reserved `allow_all` admin). Layer 2 is the
3205
- * editable per-tag `grants` map. `allow_all` (admin) carries an empty `grants` map
3206
- * and reaches everything, un-lockable. `condition` is the base-tier jq (an authored
3207
- * templated-text value) — READ-ONLY here (no raw-jq authoring surface).
3208
- */
3209
- export declare const roleBody: z.ZodObject<{
3210
- name: z.ZodString;
3211
- description: z.ZodString;
3212
- scopes: z.ZodArray<z.ZodString>;
3213
- condition: z.ZodNullable<z.ZodObject<{
3214
- content: z.ZodOptional<z.ZodString>;
3215
- id: z.ZodOptional<z.ZodString>;
3216
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3217
- }, z.core.$strict>>;
3218
- base_tier: z.ZodNullable<z.ZodString>;
3219
- allow_all: z.ZodBoolean;
3220
- grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
3221
- none: "none";
3222
- read: "read";
3223
- write: "write";
3224
- }>>;
3225
- }, z.core.$strip>;
3226
- export type RoleBody = z.infer<typeof roleBody>;
3372
+ /** A role's editable grant map: feature-group TAG name → the role's access level. */
3373
+ export declare const roleGrants: z.ZodRecord<z.ZodString, z.ZodEnum<{
3374
+ none: "none";
3375
+ read: "read";
3376
+ write: "write";
3377
+ }>>;
3378
+ export type RoleGrants = z.infer<typeof roleGrants>;
3227
3379
  export declare const roleList: z.ZodArray<z.ZodObject<{
3228
- name: z.ZodString;
3229
- description: z.ZodString;
3230
- scopes: z.ZodArray<z.ZodString>;
3231
- condition: z.ZodNullable<z.ZodObject<{
3380
+ allow_all: z.ZodDefault<z.ZodBoolean>;
3381
+ base_tier: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3382
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3232
3383
  content: z.ZodOptional<z.ZodString>;
3233
3384
  id: z.ZodOptional<z.ZodString>;
3234
3385
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3235
- }, z.core.$strict>>;
3236
- base_tier: z.ZodNullable<z.ZodString>;
3237
- allow_all: z.ZodBoolean;
3386
+ }, z.core.$strict>, z.ZodNull]>>;
3387
+ description: z.ZodString;
3238
3388
  grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
3239
3389
  none: "none";
3240
3390
  read: "read";
3241
3391
  write: "write";
3242
3392
  }>>;
3393
+ name: z.ZodString;
3394
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3243
3395
  }, z.core.$strip>>;
3244
3396
  /** `DELETE /api/auth/roles/{name}` — the deleted role's name. */
3245
3397
  export declare const roleDeleted: z.ZodObject<{
@@ -3254,21 +3406,21 @@ export declare const roleDeleted: z.ZodObject<{
3254
3406
  export declare const roleVersion: z.ZodObject<{
3255
3407
  version: z.ZodNumber;
3256
3408
  body: z.ZodObject<{
3257
- name: z.ZodString;
3258
- description: z.ZodString;
3259
- scopes: z.ZodArray<z.ZodString>;
3260
- condition: z.ZodNullable<z.ZodObject<{
3409
+ allow_all: z.ZodDefault<z.ZodBoolean>;
3410
+ base_tier: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3411
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3261
3412
  content: z.ZodOptional<z.ZodString>;
3262
3413
  id: z.ZodOptional<z.ZodString>;
3263
3414
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3264
- }, z.core.$strict>>;
3265
- base_tier: z.ZodNullable<z.ZodString>;
3266
- allow_all: z.ZodBoolean;
3415
+ }, z.core.$strict>, z.ZodNull]>>;
3416
+ description: z.ZodString;
3267
3417
  grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
3268
3418
  none: "none";
3269
3419
  read: "read";
3270
3420
  write: "write";
3271
3421
  }>>;
3422
+ name: z.ZodString;
3423
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3272
3424
  }, z.core.$strip>;
3273
3425
  tags: z.ZodArray<z.ZodString>;
3274
3426
  created_at: z.ZodString;
@@ -3298,21 +3450,21 @@ export declare const roleVersions: z.ZodObject<{
3298
3450
  versions: z.ZodArray<z.ZodObject<{
3299
3451
  version: z.ZodNumber;
3300
3452
  body: z.ZodObject<{
3301
- name: z.ZodString;
3302
- description: z.ZodString;
3303
- scopes: z.ZodArray<z.ZodString>;
3304
- condition: z.ZodNullable<z.ZodObject<{
3453
+ allow_all: z.ZodDefault<z.ZodBoolean>;
3454
+ base_tier: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
3455
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3305
3456
  content: z.ZodOptional<z.ZodString>;
3306
3457
  id: z.ZodOptional<z.ZodString>;
3307
3458
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3308
- }, z.core.$strict>>;
3309
- base_tier: z.ZodNullable<z.ZodString>;
3310
- allow_all: z.ZodBoolean;
3459
+ }, z.core.$strict>, z.ZodNull]>>;
3460
+ description: z.ZodString;
3311
3461
  grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
3312
3462
  none: "none";
3313
3463
  read: "read";
3314
3464
  write: "write";
3315
3465
  }>>;
3466
+ name: z.ZodString;
3467
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3316
3468
  }, z.core.$strip>;
3317
3469
  tags: z.ZodArray<z.ZodString>;
3318
3470
  created_at: z.ZodString;
@@ -3565,22 +3717,6 @@ export declare const validateConditionResult: z.ZodObject<{
3565
3717
  result: z.ZodNullable<z.ZodBoolean>;
3566
3718
  }, z.core.$strip>;
3567
3719
  export type ValidateConditionResult = z.infer<typeof validateConditionResult>;
3568
- /**
3569
- * The enforced policy shape a version body carries. SECRET-ADJACENT — `condition`
3570
- * can reveal auth logic, so its fixtures are hand-authored, never captured.
3571
- * `condition` is an authored templated-text value (inline content or a stored
3572
- * template id); `null` when the policy carries no condition.
3573
- */
3574
- export declare const policyBody: z.ZodObject<{
3575
- scopes: z.ZodArray<z.ZodString>;
3576
- policy_data: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
3577
- condition: z.ZodNullable<z.ZodObject<{
3578
- content: z.ZodOptional<z.ZodString>;
3579
- id: z.ZodOptional<z.ZodString>;
3580
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3581
- }, z.core.$strict>>;
3582
- }, z.core.$strip>;
3583
- export type PolicyBody = z.infer<typeof policyBody>;
3584
3720
  /**
3585
3721
  * One immutable policy version row
3586
3722
  * (`GET /api/auth/api-keys/{user_id}/policy/versions`). `is_current` flags the
@@ -3590,13 +3726,13 @@ export type PolicyBody = z.infer<typeof policyBody>;
3590
3726
  export declare const policyVersion: z.ZodObject<{
3591
3727
  version: z.ZodNumber;
3592
3728
  body: z.ZodObject<{
3593
- scopes: z.ZodArray<z.ZodString>;
3594
- policy_data: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
3595
- condition: z.ZodNullable<z.ZodObject<{
3729
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3596
3730
  content: z.ZodOptional<z.ZodString>;
3597
3731
  id: z.ZodOptional<z.ZodString>;
3598
3732
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3599
- }, z.core.$strict>>;
3733
+ }, z.core.$strict>, z.ZodNull]>>;
3734
+ policy_data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3735
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3600
3736
  }, z.core.$strip>;
3601
3737
  tags: z.ZodArray<z.ZodString>;
3602
3738
  created_at: z.ZodString;
@@ -3606,13 +3742,13 @@ export type PolicyVersion = z.infer<typeof policyVersion>;
3606
3742
  export declare const policyVersionList: z.ZodArray<z.ZodObject<{
3607
3743
  version: z.ZodNumber;
3608
3744
  body: z.ZodObject<{
3609
- scopes: z.ZodArray<z.ZodString>;
3610
- policy_data: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
3611
- condition: z.ZodNullable<z.ZodObject<{
3745
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
3612
3746
  content: z.ZodOptional<z.ZodString>;
3613
3747
  id: z.ZodOptional<z.ZodString>;
3614
3748
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3615
- }, z.core.$strict>>;
3749
+ }, z.core.$strict>, z.ZodNull]>>;
3750
+ policy_data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3751
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3616
3752
  }, z.core.$strip>;
3617
3753
  tags: z.ZodArray<z.ZodString>;
3618
3754
  created_at: z.ZodString;
@@ -4550,24 +4686,6 @@ export declare const stateSubject: z.ZodObject<{
4550
4686
  export type StateSubject = z.infer<typeof stateSubject>;
4551
4687
  /** One absolute write-regime rule composed over the attachments: `{path, regime}`, permissive. */
4552
4688
  export declare const stateRegime: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4553
- /**
4554
- * A declared state served on every read. `schema` is the base JSON Schema;
4555
- * `effective_schema` (the base composed with every attached template's fragment) and
4556
- * `regimes` (the absolute write-regime rules) are platform-COMPUTED and served on every
4557
- * read — modelled optional so a write body that omits them, or a server yet to compose
4558
- * them, still parses. A drift throws ApiSchemaError.
4559
- */
4560
- export declare const stateDeclaration: z.ZodObject<{
4561
- name: z.ZodString;
4562
- description: z.ZodDefault<z.ZodString>;
4563
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4564
- subject_kinds: z.ZodArray<z.ZodString>;
4565
- default_subject_kind: z.ZodString;
4566
- retention_days: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
4567
- effective_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4568
- regimes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
4569
- }, z.core.$strip>;
4570
- export type StateDeclaration = z.infer<typeof stateDeclaration>;
4571
4689
  /**
4572
4690
  * One row of `GET /api/states` — a served declaration (`list_states` dumps every
4573
4691
  * `StateDeclaration`) plus `updated_at` (the row's last-write timestamp, ISO or
@@ -4575,28 +4693,36 @@ export type StateDeclaration = z.infer<typeof stateDeclaration>;
4575
4693
  * `getStateStats` lazily per row.
4576
4694
  */
4577
4695
  export declare const stateListItem: z.ZodObject<{
4578
- name: z.ZodString;
4696
+ default_subject_kind: z.ZodString;
4579
4697
  description: z.ZodDefault<z.ZodString>;
4580
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4698
+ effective_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
4699
+ name: z.ZodString;
4700
+ regimes: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodNull]>>;
4701
+ retention_days: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
4702
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
4703
+ content: z.ZodOptional<z.ZodString>;
4704
+ id: z.ZodOptional<z.ZodString>;
4705
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4706
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
4581
4707
  subject_kinds: z.ZodArray<z.ZodString>;
4582
- default_subject_kind: z.ZodString;
4583
- retention_days: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
4584
- effective_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4585
- regimes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
4586
4708
  updated_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4587
- }, z.core.$strip>;
4709
+ }, z.core.$strict>;
4588
4710
  export type StateListItem = z.infer<typeof stateListItem>;
4589
4711
  export declare const stateList: z.ZodArray<z.ZodObject<{
4590
- name: z.ZodString;
4712
+ default_subject_kind: z.ZodString;
4591
4713
  description: z.ZodDefault<z.ZodString>;
4592
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4714
+ effective_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
4715
+ name: z.ZodString;
4716
+ regimes: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodNull]>>;
4717
+ retention_days: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
4718
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
4719
+ content: z.ZodOptional<z.ZodString>;
4720
+ id: z.ZodOptional<z.ZodString>;
4721
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4722
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
4593
4723
  subject_kinds: z.ZodArray<z.ZodString>;
4594
- default_subject_kind: z.ZodString;
4595
- retention_days: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
4596
- effective_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4597
- regimes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
4598
4724
  updated_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4599
- }, z.core.$strip>>;
4725
+ }, z.core.$strict>>;
4600
4726
  /** One template attachment on a state: where the fragment lands + its param/declaration values. */
4601
4727
  export declare const stateAttachment: z.ZodObject<{
4602
4728
  template: z.ZodString;
@@ -4613,21 +4739,26 @@ export declare const stateAttachmentList: z.ZodArray<z.ZodObject<{
4613
4739
  }, z.core.$strip>>;
4614
4740
  /** `GET /api/states/{name}` — the declaration (with effective schema + regimes) plus attachments. */
4615
4741
  export declare const stateDetail: z.ZodObject<{
4616
- name: z.ZodString;
4742
+ default_subject_kind: z.ZodString;
4617
4743
  description: z.ZodDefault<z.ZodString>;
4618
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4744
+ effective_schema: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>>;
4745
+ name: z.ZodString;
4746
+ regimes: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>, z.ZodNull]>>;
4747
+ retention_days: z.ZodDefault<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
4748
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
4749
+ content: z.ZodOptional<z.ZodString>;
4750
+ id: z.ZodOptional<z.ZodString>;
4751
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4752
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
4619
4753
  subject_kinds: z.ZodArray<z.ZodString>;
4620
- default_subject_kind: z.ZodString;
4621
- retention_days: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
4622
- effective_schema: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4623
- regimes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
4754
+ updated_at: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
4624
4755
  attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
4625
4756
  template: z.ZodString;
4626
4757
  path: z.ZodArray<z.ZodString>;
4627
4758
  parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4628
4759
  declarations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4629
4760
  }, z.core.$strip>>>;
4630
- }, z.core.$strip>;
4761
+ }, z.core.$strict>;
4631
4762
  export type StateDetail = z.infer<typeof stateDetail>;
4632
4763
  /**
4633
4764
  * `GET /api/states/{name}/stats` — `records` (total documents), `per_field` (the count
@@ -4643,168 +4774,87 @@ export declare const stateStats: z.ZodObject<{
4643
4774
  }, z.core.$strip>;
4644
4775
  export type StateStats = z.infer<typeof stateStats>;
4645
4776
  /**
4646
- * One template jq: `jq` is a program over the subject's attached subtree, authored as a
4647
- * templated text (inline `content` or a stored template `id`); its `purpose` is either
4648
- * `input` (a read-only program feeding a tool argument) or `update` (a program returning
4649
- * an op batch that mutates the record). `params` are its declared argument names;
4650
- * `reads`/`writes` are the template-relative record paths an `update` declares, each a
4651
- * list of key segments; `description` is the human label.
4777
+ * One row of `GET /api/state-templates`. The template document plus the two derived columns
4778
+ * the Templates tab shows: `attached_to` (how many states attach it — a delete is refused
4779
+ * while > 0) and `shipped_default` (a platform-shipped template). Both are server-derived
4780
+ * columns; the document fields are verbatim.
4652
4781
  */
4653
- export declare const templateJq: z.ZodObject<{
4782
+ export declare const stateTemplateListItem: z.ZodObject<{
4783
+ declarations: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
4784
+ check: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
4785
+ content: z.ZodOptional<z.ZodString>;
4786
+ id: z.ZodOptional<z.ZodString>;
4787
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4788
+ }, z.core.$strict>, z.ZodNull]>>;
4789
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4790
+ }, z.core.$strict>, z.ZodNull]>>;
4654
4791
  description: z.ZodDefault<z.ZodString>;
4655
- purpose: z.ZodEnum<{
4656
- input: "input";
4657
- update: "update";
4658
- }>;
4659
- params: z.ZodDefault<z.ZodArray<z.ZodString>>;
4660
- reads: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4661
- writes: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4662
- jq: z.ZodObject<{
4663
- content: z.ZodOptional<z.ZodString>;
4664
- id: z.ZodOptional<z.ZodString>;
4665
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4666
- }, z.core.$strict>;
4667
- }, z.core.$strip>;
4668
- export type TemplateJq = z.infer<typeof templateJq>;
4669
- /**
4670
- * How a declarations edit settles open records: `orphans` returns the items a record
4671
- * orphans against the new declarations, `close` builds the op batch that closes one
4672
- * orphan, `resolutions` names the resolutions a close may name — each a templated-text
4673
- * jq program (inline `content` or a stored template `id`).
4674
- */
4675
- export declare const templateReconcile: z.ZodObject<{
4676
- orphans: z.ZodObject<{
4677
- content: z.ZodOptional<z.ZodString>;
4678
- id: z.ZodOptional<z.ZodString>;
4679
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4680
- }, z.core.$strict>;
4681
- close: z.ZodObject<{
4682
- content: z.ZodOptional<z.ZodString>;
4683
- id: z.ZodOptional<z.ZodString>;
4684
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4685
- }, z.core.$strict>;
4686
- resolutions: z.ZodObject<{
4687
- content: z.ZodOptional<z.ZodString>;
4688
- id: z.ZodOptional<z.ZodString>;
4689
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4690
- }, z.core.$strict>;
4691
- }, z.core.$strip>;
4692
- export type TemplateReconcile = z.infer<typeof templateReconcile>;
4693
- /**
4694
- * A template's declarations section: `schema` is the JSON schema of the static values an
4695
- * attachment stores, and `check` is an optional attach-time predicate authored as a
4696
- * templated text (inline `content` or a stored template `id`), `null` when the template
4697
- * declares none.
4698
- */
4699
- export declare const templateDeclarations: z.ZodObject<{
4700
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4701
- check: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4702
- content: z.ZodOptional<z.ZodString>;
4703
- id: z.ZodOptional<z.ZodString>;
4704
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4705
- }, z.core.$strict>>>;
4706
- }, z.core.$strip>;
4707
- export type TemplateDeclarations = z.infer<typeof templateDeclarations>;
4708
- /**
4709
- * The platform half of a state-template document (mirrors StateTemplateDocument).
4710
- * `template_jq` maps a name to its definition (each carrying its `purpose`);
4711
- * `reconcile` is the settle policy; `declarations` is the static-values section — all
4712
- * optional (`null` when the template declares none).
4713
- */
4714
- export declare const stateTemplateDocument: z.ZodObject<{
4715
4792
  kind: z.ZodDefault<z.ZodLiteral<"state-template">>;
4716
4793
  name: z.ZodString;
4717
- description: z.ZodDefault<z.ZodString>;
4718
4794
  parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4719
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4720
- regimes: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4721
- declarations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4722
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4723
- check: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4724
- content: z.ZodOptional<z.ZodString>;
4725
- id: z.ZodOptional<z.ZodString>;
4726
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4727
- }, z.core.$strict>>>;
4728
- }, z.core.$strip>>>;
4729
- trace: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4730
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
4731
- description: z.ZodDefault<z.ZodString>;
4732
- purpose: z.ZodEnum<{
4733
- input: "input";
4734
- update: "update";
4735
- }>;
4736
- params: z.ZodDefault<z.ZodArray<z.ZodString>>;
4737
- reads: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4738
- writes: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4739
- jq: z.ZodObject<{
4795
+ reconcile: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
4796
+ close: z.ZodObject<{
4740
4797
  content: z.ZodOptional<z.ZodString>;
4741
4798
  id: z.ZodOptional<z.ZodString>;
4742
4799
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4743
4800
  }, z.core.$strict>;
4744
- }, z.core.$strip>>>>;
4745
- reconcile: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4746
4801
  orphans: z.ZodObject<{
4747
4802
  content: z.ZodOptional<z.ZodString>;
4748
4803
  id: z.ZodOptional<z.ZodString>;
4749
4804
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4750
4805
  }, z.core.$strict>;
4751
- close: z.ZodObject<{
4752
- content: z.ZodOptional<z.ZodString>;
4753
- id: z.ZodOptional<z.ZodString>;
4754
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4755
- }, z.core.$strict>;
4756
4806
  resolutions: z.ZodObject<{
4757
4807
  content: z.ZodOptional<z.ZodString>;
4758
4808
  id: z.ZodOptional<z.ZodString>;
4759
4809
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4760
4810
  }, z.core.$strict>;
4761
- }, z.core.$strip>>>;
4762
- }, z.core.$strip>;
4763
- export type StateTemplateDocument = z.infer<typeof stateTemplateDocument>;
4764
- /**
4765
- * One row of `GET /api/state-templates`. The template document plus the two derived columns
4766
- * the Templates tab shows: `attached_to` (how many states attach it — a delete is refused
4767
- * while > 0) and `shipped_default` (a platform-shipped template). Both are server-derived
4768
- * columns; the document fields are verbatim.
4769
- */
4770
- export declare const stateTemplateListItem: z.ZodObject<{
4771
- kind: z.ZodDefault<z.ZodLiteral<"state-template">>;
4772
- name: z.ZodString;
4773
- description: z.ZodDefault<z.ZodString>;
4774
- parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4775
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4811
+ }, z.core.$strict>, z.ZodNull]>>;
4776
4812
  regimes: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4777
- declarations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4778
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4779
- check: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4813
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
4814
+ content: z.ZodOptional<z.ZodString>;
4815
+ id: z.ZodOptional<z.ZodString>;
4816
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4817
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
4818
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodObject<{
4819
+ description: z.ZodDefault<z.ZodString>;
4820
+ jq: z.ZodObject<{
4780
4821
  content: z.ZodOptional<z.ZodString>;
4781
4822
  id: z.ZodOptional<z.ZodString>;
4782
4823
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4783
- }, z.core.$strict>>>;
4784
- }, z.core.$strip>>>;
4785
- trace: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4786
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
4787
- description: z.ZodDefault<z.ZodString>;
4824
+ }, z.core.$strict>;
4825
+ params: z.ZodDefault<z.ZodArray<z.ZodString>>;
4788
4826
  purpose: z.ZodEnum<{
4789
4827
  input: "input";
4790
4828
  update: "update";
4791
4829
  }>;
4792
- params: z.ZodDefault<z.ZodArray<z.ZodString>>;
4793
4830
  reads: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4794
4831
  writes: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4795
- jq: z.ZodObject<{
4832
+ }, z.core.$strict>>, z.ZodNull]>>;
4833
+ trace: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4834
+ attached_to: z.ZodDefault<z.ZodNumber>;
4835
+ shipped_default: z.ZodDefault<z.ZodBoolean>;
4836
+ }, z.core.$strict>;
4837
+ export type StateTemplateListItem = z.infer<typeof stateTemplateListItem>;
4838
+ export declare const stateTemplateList: z.ZodArray<z.ZodObject<{
4839
+ declarations: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
4840
+ check: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
4796
4841
  content: z.ZodOptional<z.ZodString>;
4797
4842
  id: z.ZodOptional<z.ZodString>;
4798
4843
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4799
- }, z.core.$strict>;
4800
- }, z.core.$strip>>>>;
4801
- reconcile: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4802
- orphans: z.ZodObject<{
4844
+ }, z.core.$strict>, z.ZodNull]>>;
4845
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4846
+ }, z.core.$strict>, z.ZodNull]>>;
4847
+ description: z.ZodDefault<z.ZodString>;
4848
+ kind: z.ZodDefault<z.ZodLiteral<"state-template">>;
4849
+ name: z.ZodString;
4850
+ parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4851
+ reconcile: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
4852
+ close: z.ZodObject<{
4803
4853
  content: z.ZodOptional<z.ZodString>;
4804
4854
  id: z.ZodOptional<z.ZodString>;
4805
4855
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4806
4856
  }, z.core.$strict>;
4807
- close: z.ZodObject<{
4857
+ orphans: z.ZodObject<{
4808
4858
  content: z.ZodOptional<z.ZodString>;
4809
4859
  id: z.ZodOptional<z.ZodString>;
4810
4860
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -4814,62 +4864,32 @@ export declare const stateTemplateListItem: z.ZodObject<{
4814
4864
  id: z.ZodOptional<z.ZodString>;
4815
4865
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4816
4866
  }, z.core.$strict>;
4817
- }, z.core.$strip>>>;
4818
- attached_to: z.ZodDefault<z.ZodNumber>;
4819
- shipped_default: z.ZodDefault<z.ZodBoolean>;
4820
- }, z.core.$strip>;
4821
- export type StateTemplateListItem = z.infer<typeof stateTemplateListItem>;
4822
- export declare const stateTemplateList: z.ZodArray<z.ZodObject<{
4823
- kind: z.ZodDefault<z.ZodLiteral<"state-template">>;
4824
- name: z.ZodString;
4825
- description: z.ZodDefault<z.ZodString>;
4826
- parameters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4827
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4867
+ }, z.core.$strict>, z.ZodNull]>>;
4828
4868
  regimes: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
4829
- declarations: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4830
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4831
- check: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4869
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
4870
+ content: z.ZodOptional<z.ZodString>;
4871
+ id: z.ZodOptional<z.ZodString>;
4872
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4873
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
4874
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodObject<{
4875
+ description: z.ZodDefault<z.ZodString>;
4876
+ jq: z.ZodObject<{
4832
4877
  content: z.ZodOptional<z.ZodString>;
4833
4878
  id: z.ZodOptional<z.ZodString>;
4834
4879
  kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4835
- }, z.core.$strict>>>;
4836
- }, z.core.$strip>>>;
4837
- trace: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4838
- template_jq: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
4839
- description: z.ZodDefault<z.ZodString>;
4880
+ }, z.core.$strict>;
4881
+ params: z.ZodDefault<z.ZodArray<z.ZodString>>;
4840
4882
  purpose: z.ZodEnum<{
4841
4883
  input: "input";
4842
4884
  update: "update";
4843
4885
  }>;
4844
- params: z.ZodDefault<z.ZodArray<z.ZodString>>;
4845
4886
  reads: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4846
4887
  writes: z.ZodDefault<z.ZodArray<z.ZodArray<z.ZodString>>>;
4847
- jq: z.ZodObject<{
4848
- content: z.ZodOptional<z.ZodString>;
4849
- id: z.ZodOptional<z.ZodString>;
4850
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4851
- }, z.core.$strict>;
4852
- }, z.core.$strip>>>>;
4853
- reconcile: z.ZodDefault<z.ZodNullable<z.ZodObject<{
4854
- orphans: z.ZodObject<{
4855
- content: z.ZodOptional<z.ZodString>;
4856
- id: z.ZodOptional<z.ZodString>;
4857
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4858
- }, z.core.$strict>;
4859
- close: z.ZodObject<{
4860
- content: z.ZodOptional<z.ZodString>;
4861
- id: z.ZodOptional<z.ZodString>;
4862
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4863
- }, z.core.$strict>;
4864
- resolutions: z.ZodObject<{
4865
- content: z.ZodOptional<z.ZodString>;
4866
- id: z.ZodOptional<z.ZodString>;
4867
- kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4868
- }, z.core.$strict>;
4869
- }, z.core.$strip>>>;
4888
+ }, z.core.$strict>>, z.ZodNull]>>;
4889
+ trace: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4870
4890
  attached_to: z.ZodDefault<z.ZodNumber>;
4871
4891
  shipped_default: z.ZodDefault<z.ZodBoolean>;
4872
- }, z.core.$strip>>;
4892
+ }, z.core.$strict>>;
4873
4893
  /** A read record: the state, its subject, the document + monotonic seq, and any fold. */
4874
4894
  export declare const stateRecord: z.ZodObject<{
4875
4895
  state: z.ZodString;