@anchrd/intel-contract 0.12.0 → 0.14.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.
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const IntelId: z.ZodString;
3
3
  export declare const IsoDateTime: z.ZodISODateTime;
4
+ export declare const IdempotencyKey: z.ZodString;
4
5
  export declare const UI_LANGUAGES: readonly ["en", "de", "es"];
5
6
  export type UiLanguage = (typeof UI_LANGUAGES)[number];
6
7
  export declare const ProblemDetails: z.ZodObject<{
@@ -16,3379 +17,9 @@ export declare const SessionUser: z.ZodObject<{
16
17
  id: z.ZodString;
17
18
  email: z.ZodEmail;
18
19
  name: z.ZodNullable<z.ZodString>;
20
+ isAdmin: z.ZodBoolean;
19
21
  }, z.core.$strict>;
20
22
  export type SessionUser = z.infer<typeof SessionUser>;
21
- export declare const IntelCapabilities: z.ZodObject<{
22
- agentRuntime: z.ZodBoolean;
23
- }, z.core.$strict>;
24
- export type IntelCapabilities = z.infer<typeof IntelCapabilities>;
25
- export declare const NodeKind: z.ZodEnum<{
26
- folder: "folder";
27
- document: "document";
28
- attachment: "attachment";
29
- table: "table";
30
- agent: "agent";
31
- board: "board";
32
- }>;
33
- export type NodeKind = z.infer<typeof NodeKind>;
34
- export declare const ResourceVerb: z.ZodEnum<{
35
- read: "read";
36
- write: "write";
37
- execute: "execute";
38
- share: "share";
39
- }>;
40
- export type ResourceVerb = z.infer<typeof ResourceVerb>;
41
- export declare const SharePrincipal: z.ZodDiscriminatedUnion<[z.ZodObject<{
42
- type: z.ZodLiteral<"user">;
43
- id: z.ZodString;
44
- }, z.core.$strict>, z.ZodObject<{
45
- type: z.ZodLiteral<"email">;
46
- email: z.ZodEmail;
47
- }, z.core.$strict>, z.ZodObject<{
48
- type: z.ZodLiteral<"organization">;
49
- }, z.core.$strict>], "type">;
50
- export type SharePrincipal = z.infer<typeof SharePrincipal>;
51
- export declare const Node: z.ZodObject<{
52
- id: z.ZodString;
53
- parentId: z.ZodNullable<z.ZodString>;
54
- kind: z.ZodEnum<{
55
- folder: "folder";
56
- document: "document";
57
- attachment: "attachment";
58
- table: "table";
59
- agent: "agent";
60
- board: "board";
61
- }>;
62
- title: z.ZodString;
63
- description: z.ZodNullable<z.ZodString>;
64
- ownerId: z.ZodString;
65
- currentVersionId: z.ZodNullable<z.ZodString>;
66
- createdAt: z.ZodISODateTime;
67
- updatedAt: z.ZodISODateTime;
68
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
69
- }, z.core.$strict>;
70
- export type Node = z.infer<typeof Node>;
71
- export declare const NodeVersionSegment: z.ZodEnum<{
72
- append: "append";
73
- snapshot: "snapshot";
74
- }>;
75
- export type NodeVersionSegment = z.infer<typeof NodeVersionSegment>;
76
- export declare const NodeVersion: z.ZodObject<{
77
- id: z.ZodString;
78
- nodeId: z.ZodString;
79
- sequence: z.ZodNumber;
80
- contentKey: z.ZodString;
81
- mediaType: z.ZodString;
82
- contentHash: z.ZodString;
83
- size: z.ZodNumber;
84
- segment: z.ZodNullable<z.ZodEnum<{
85
- append: "append";
86
- snapshot: "snapshot";
87
- }>>;
88
- createdBy: z.ZodString;
89
- createdAt: z.ZodISODateTime;
90
- }, z.core.$strict>;
91
- export type NodeVersion = z.infer<typeof NodeVersion>;
92
- export declare const ListNodesInput: z.ZodObject<{
93
- parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
94
- includeArchived: z.ZodDefault<z.ZodBoolean>;
95
- archivedOnly: z.ZodOptional<z.ZodBoolean>;
96
- }, z.core.$strict>;
97
- export type ListNodesInput = z.infer<typeof ListNodesInput>;
98
- export declare const GetNodeInput: z.ZodObject<{
99
- nodeId: z.ZodString;
100
- }, z.core.$strict>;
101
- export type GetNodeInput = z.infer<typeof GetNodeInput>;
102
- export declare const GetNodeVersionInput: z.ZodObject<{
103
- nodeId: z.ZodString;
104
- versionId: z.ZodString;
105
- }, z.core.$strict>;
106
- export type GetNodeVersionInput = z.infer<typeof GetNodeVersionInput>;
107
- export declare const ListGrantsInput: z.ZodObject<{
23
+ export declare const LinkConfiguration: z.ZodObject<{
108
24
  resourceId: z.ZodString;
109
25
  }, z.core.$strict>;
110
- export type ListGrantsInput = z.infer<typeof ListGrantsInput>;
111
- export declare const CreateNodeInput: z.ZodObject<{
112
- parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
113
- kind: z.ZodEnum<{
114
- folder: "folder";
115
- document: "document";
116
- attachment: "attachment";
117
- table: "table";
118
- agent: "agent";
119
- board: "board";
120
- }>;
121
- title: z.ZodString;
122
- description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
123
- idempotencyKey: z.ZodString;
124
- }, z.core.$strict>;
125
- export type CreateNodeInput = z.infer<typeof CreateNodeInput>;
126
- export declare const SaveNodeVersionInput: z.ZodObject<{
127
- nodeId: z.ZodString;
128
- baseVersionId: z.ZodNullable<z.ZodString>;
129
- content: z.ZodString;
130
- mediaType: z.ZodDefault<z.ZodString>;
131
- idempotencyKey: z.ZodString;
132
- }, z.core.$strict>;
133
- export type SaveNodeVersionInput = z.infer<typeof SaveNodeVersionInput>;
134
- export declare const SaveAttachmentInput: z.ZodObject<{
135
- nodeId: z.ZodString;
136
- baseVersionId: z.ZodNullable<z.ZodString>;
137
- contentBase64: z.ZodString;
138
- mediaType: z.ZodString;
139
- idempotencyKey: z.ZodString;
140
- }, z.core.$strict>;
141
- export type SaveAttachmentInput = z.infer<typeof SaveAttachmentInput>;
142
- export declare const UpdateNodeInput: z.ZodObject<{
143
- nodeId: z.ZodString;
144
- baseUpdatedAt: z.ZodISODateTime;
145
- title: z.ZodOptional<z.ZodString>;
146
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
- idempotencyKey: z.ZodString;
149
- }, z.core.$strict>;
150
- export type UpdateNodeInput = z.infer<typeof UpdateNodeInput>;
151
- export declare const ArchiveNodeInput: z.ZodObject<{
152
- nodeId: z.ZodString;
153
- baseUpdatedAt: z.ZodISODateTime;
154
- archived: z.ZodBoolean;
155
- idempotencyKey: z.ZodString;
156
- }, z.core.$strict>;
157
- export type ArchiveNodeInput = z.infer<typeof ArchiveNodeInput>;
158
- export declare const NodeList: z.ZodObject<{
159
- items: z.ZodArray<z.ZodObject<{
160
- id: z.ZodString;
161
- parentId: z.ZodNullable<z.ZodString>;
162
- kind: z.ZodEnum<{
163
- folder: "folder";
164
- document: "document";
165
- attachment: "attachment";
166
- table: "table";
167
- agent: "agent";
168
- board: "board";
169
- }>;
170
- title: z.ZodString;
171
- description: z.ZodNullable<z.ZodString>;
172
- ownerId: z.ZodString;
173
- currentVersionId: z.ZodNullable<z.ZodString>;
174
- createdAt: z.ZodISODateTime;
175
- updatedAt: z.ZodISODateTime;
176
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
177
- }, z.core.$strict>>;
178
- withChildren: z.ZodDefault<z.ZodArray<z.ZodString>>;
179
- }, z.core.$strict>;
180
- export type NodeList = z.infer<typeof NodeList>;
181
- export declare const NodeVersionList: z.ZodObject<{
182
- items: z.ZodArray<z.ZodObject<{
183
- id: z.ZodString;
184
- nodeId: z.ZodString;
185
- sequence: z.ZodNumber;
186
- contentKey: z.ZodString;
187
- mediaType: z.ZodString;
188
- contentHash: z.ZodString;
189
- size: z.ZodNumber;
190
- segment: z.ZodNullable<z.ZodEnum<{
191
- append: "append";
192
- snapshot: "snapshot";
193
- }>>;
194
- createdBy: z.ZodString;
195
- createdAt: z.ZodISODateTime;
196
- }, z.core.$strict>>;
197
- }, z.core.$strict>;
198
- export type NodeVersionList = z.infer<typeof NodeVersionList>;
199
- export declare const NodeDocument: z.ZodObject<{
200
- node: z.ZodObject<{
201
- id: z.ZodString;
202
- parentId: z.ZodNullable<z.ZodString>;
203
- kind: z.ZodEnum<{
204
- folder: "folder";
205
- document: "document";
206
- attachment: "attachment";
207
- table: "table";
208
- agent: "agent";
209
- board: "board";
210
- }>;
211
- title: z.ZodString;
212
- description: z.ZodNullable<z.ZodString>;
213
- ownerId: z.ZodString;
214
- currentVersionId: z.ZodNullable<z.ZodString>;
215
- createdAt: z.ZodISODateTime;
216
- updatedAt: z.ZodISODateTime;
217
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
218
- }, z.core.$strict>;
219
- version: z.ZodNullable<z.ZodObject<{
220
- id: z.ZodString;
221
- nodeId: z.ZodString;
222
- sequence: z.ZodNumber;
223
- contentKey: z.ZodString;
224
- mediaType: z.ZodString;
225
- contentHash: z.ZodString;
226
- size: z.ZodNumber;
227
- segment: z.ZodNullable<z.ZodEnum<{
228
- append: "append";
229
- snapshot: "snapshot";
230
- }>>;
231
- createdBy: z.ZodString;
232
- createdAt: z.ZodISODateTime;
233
- }, z.core.$strict>>;
234
- content: z.ZodNullable<z.ZodString>;
235
- }, z.core.$strict>;
236
- export type NodeDocument = z.infer<typeof NodeDocument>;
237
- export declare const NodeAttachment: z.ZodObject<{
238
- node: z.ZodObject<{
239
- id: z.ZodString;
240
- parentId: z.ZodNullable<z.ZodString>;
241
- kind: z.ZodEnum<{
242
- folder: "folder";
243
- document: "document";
244
- attachment: "attachment";
245
- table: "table";
246
- agent: "agent";
247
- board: "board";
248
- }>;
249
- title: z.ZodString;
250
- description: z.ZodNullable<z.ZodString>;
251
- ownerId: z.ZodString;
252
- currentVersionId: z.ZodNullable<z.ZodString>;
253
- createdAt: z.ZodISODateTime;
254
- updatedAt: z.ZodISODateTime;
255
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
256
- }, z.core.$strict>;
257
- version: z.ZodObject<{
258
- id: z.ZodString;
259
- nodeId: z.ZodString;
260
- sequence: z.ZodNumber;
261
- contentKey: z.ZodString;
262
- mediaType: z.ZodString;
263
- contentHash: z.ZodString;
264
- size: z.ZodNumber;
265
- segment: z.ZodNullable<z.ZodEnum<{
266
- append: "append";
267
- snapshot: "snapshot";
268
- }>>;
269
- createdBy: z.ZodString;
270
- createdAt: z.ZodISODateTime;
271
- }, z.core.$strict>;
272
- resourceUri: z.ZodString;
273
- }, z.core.$strict>;
274
- export type NodeAttachment = z.infer<typeof NodeAttachment>;
275
- export declare const TableMediaType = "text/csv";
276
- export declare const TableColumn: z.ZodString;
277
- export declare const TableCell: z.ZodString;
278
- export declare const TableRow: z.ZodArray<z.ZodString>;
279
- export declare const DefineTableInput: z.ZodObject<{
280
- nodeId: z.ZodString;
281
- columns: z.ZodArray<z.ZodString>;
282
- idempotencyKey: z.ZodString;
283
- }, z.core.$strict>;
284
- export type DefineTableInput = z.infer<typeof DefineTableInput>;
285
- export declare const AppendTableRowsInput: z.ZodObject<{
286
- nodeId: z.ZodString;
287
- rows: z.ZodArray<z.ZodArray<z.ZodString>>;
288
- idempotencyKey: z.ZodString;
289
- }, z.core.$strict>;
290
- export type AppendTableRowsInput = z.infer<typeof AppendTableRowsInput>;
291
- export declare const GetTableInput: z.ZodObject<{
292
- nodeId: z.ZodString;
293
- }, z.core.$strict>;
294
- export type GetTableInput = z.infer<typeof GetTableInput>;
295
- export declare const NodeTable: z.ZodObject<{
296
- node: z.ZodObject<{
297
- id: z.ZodString;
298
- parentId: z.ZodNullable<z.ZodString>;
299
- kind: z.ZodEnum<{
300
- folder: "folder";
301
- document: "document";
302
- attachment: "attachment";
303
- table: "table";
304
- agent: "agent";
305
- board: "board";
306
- }>;
307
- title: z.ZodString;
308
- description: z.ZodNullable<z.ZodString>;
309
- ownerId: z.ZodString;
310
- currentVersionId: z.ZodNullable<z.ZodString>;
311
- createdAt: z.ZodISODateTime;
312
- updatedAt: z.ZodISODateTime;
313
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
314
- }, z.core.$strict>;
315
- columns: z.ZodArray<z.ZodString>;
316
- rows: z.ZodArray<z.ZodArray<z.ZodString>>;
317
- versionId: z.ZodNullable<z.ZodString>;
318
- }, z.core.$strict>;
319
- export type NodeTable = z.infer<typeof NodeTable>;
320
- export declare const AppendTableRowsResult: z.ZodObject<{
321
- node: z.ZodObject<{
322
- id: z.ZodString;
323
- parentId: z.ZodNullable<z.ZodString>;
324
- kind: z.ZodEnum<{
325
- folder: "folder";
326
- document: "document";
327
- attachment: "attachment";
328
- table: "table";
329
- agent: "agent";
330
- board: "board";
331
- }>;
332
- title: z.ZodString;
333
- description: z.ZodNullable<z.ZodString>;
334
- ownerId: z.ZodString;
335
- currentVersionId: z.ZodNullable<z.ZodString>;
336
- createdAt: z.ZodISODateTime;
337
- updatedAt: z.ZodISODateTime;
338
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
339
- }, z.core.$strict>;
340
- version: z.ZodObject<{
341
- id: z.ZodString;
342
- nodeId: z.ZodString;
343
- sequence: z.ZodNumber;
344
- contentKey: z.ZodString;
345
- mediaType: z.ZodString;
346
- contentHash: z.ZodString;
347
- size: z.ZodNumber;
348
- segment: z.ZodNullable<z.ZodEnum<{
349
- append: "append";
350
- snapshot: "snapshot";
351
- }>>;
352
- createdBy: z.ZodString;
353
- createdAt: z.ZodISODateTime;
354
- }, z.core.$strict>;
355
- appended: z.ZodNumber;
356
- }, z.core.$strict>;
357
- export type AppendTableRowsResult = z.infer<typeof AppendTableRowsResult>;
358
- export declare const TableRowPosition: z.ZodNumber;
359
- export declare const UpdateTableRowsInput: z.ZodObject<{
360
- nodeId: z.ZodString;
361
- baseVersionId: z.ZodString;
362
- updates: z.ZodArray<z.ZodObject<{
363
- position: z.ZodNumber;
364
- row: z.ZodArray<z.ZodString>;
365
- }, z.core.$strict>>;
366
- idempotencyKey: z.ZodString;
367
- }, z.core.$strict>;
368
- export type UpdateTableRowsInput = z.infer<typeof UpdateTableRowsInput>;
369
- export declare const UpdateTableRowsResult: z.ZodObject<{
370
- node: z.ZodObject<{
371
- id: z.ZodString;
372
- parentId: z.ZodNullable<z.ZodString>;
373
- kind: z.ZodEnum<{
374
- folder: "folder";
375
- document: "document";
376
- attachment: "attachment";
377
- table: "table";
378
- agent: "agent";
379
- board: "board";
380
- }>;
381
- title: z.ZodString;
382
- description: z.ZodNullable<z.ZodString>;
383
- ownerId: z.ZodString;
384
- currentVersionId: z.ZodNullable<z.ZodString>;
385
- createdAt: z.ZodISODateTime;
386
- updatedAt: z.ZodISODateTime;
387
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
388
- }, z.core.$strict>;
389
- version: z.ZodObject<{
390
- id: z.ZodString;
391
- nodeId: z.ZodString;
392
- sequence: z.ZodNumber;
393
- contentKey: z.ZodString;
394
- mediaType: z.ZodString;
395
- contentHash: z.ZodString;
396
- size: z.ZodNumber;
397
- segment: z.ZodNullable<z.ZodEnum<{
398
- append: "append";
399
- snapshot: "snapshot";
400
- }>>;
401
- createdBy: z.ZodString;
402
- createdAt: z.ZodISODateTime;
403
- }, z.core.$strict>;
404
- updated: z.ZodNumber;
405
- }, z.core.$strict>;
406
- export type UpdateTableRowsResult = z.infer<typeof UpdateTableRowsResult>;
407
- export declare const DeleteTableRowsInput: z.ZodObject<{
408
- nodeId: z.ZodString;
409
- baseVersionId: z.ZodString;
410
- positions: z.ZodArray<z.ZodNumber>;
411
- idempotencyKey: z.ZodString;
412
- }, z.core.$strict>;
413
- export type DeleteTableRowsInput = z.infer<typeof DeleteTableRowsInput>;
414
- export declare const DeleteTableRowsResult: z.ZodObject<{
415
- node: z.ZodObject<{
416
- id: z.ZodString;
417
- parentId: z.ZodNullable<z.ZodString>;
418
- kind: z.ZodEnum<{
419
- folder: "folder";
420
- document: "document";
421
- attachment: "attachment";
422
- table: "table";
423
- agent: "agent";
424
- board: "board";
425
- }>;
426
- title: z.ZodString;
427
- description: z.ZodNullable<z.ZodString>;
428
- ownerId: z.ZodString;
429
- currentVersionId: z.ZodNullable<z.ZodString>;
430
- createdAt: z.ZodISODateTime;
431
- updatedAt: z.ZodISODateTime;
432
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
433
- }, z.core.$strict>;
434
- version: z.ZodObject<{
435
- id: z.ZodString;
436
- nodeId: z.ZodString;
437
- sequence: z.ZodNumber;
438
- contentKey: z.ZodString;
439
- mediaType: z.ZodString;
440
- contentHash: z.ZodString;
441
- size: z.ZodNumber;
442
- segment: z.ZodNullable<z.ZodEnum<{
443
- append: "append";
444
- snapshot: "snapshot";
445
- }>>;
446
- createdBy: z.ZodString;
447
- createdAt: z.ZodISODateTime;
448
- }, z.core.$strict>;
449
- deleted: z.ZodNumber;
450
- }, z.core.$strict>;
451
- export type DeleteTableRowsResult = z.infer<typeof DeleteTableRowsResult>;
452
- export declare const RedefineTableColumn: z.ZodObject<{
453
- name: z.ZodString;
454
- source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
455
- }, z.core.$strict>;
456
- export type RedefineTableColumn = z.infer<typeof RedefineTableColumn>;
457
- export declare const RedefineTableInput: z.ZodObject<{
458
- nodeId: z.ZodString;
459
- baseVersionId: z.ZodString;
460
- columns: z.ZodArray<z.ZodObject<{
461
- name: z.ZodString;
462
- source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
463
- }, z.core.$strict>>;
464
- idempotencyKey: z.ZodString;
465
- }, z.core.$strict>;
466
- export type RedefineTableInput = z.infer<typeof RedefineTableInput>;
467
- export declare const BoardMediaType = "application/vnd.anchrd.board+json";
468
- export declare const ArchivedBoardStatusId = "archived";
469
- export declare const BoardStatusId: z.ZodString;
470
- export declare const BoardStatus: z.ZodObject<{
471
- id: z.ZodString;
472
- label: z.ZodString;
473
- order: z.ZodNumber;
474
- terminal: z.ZodBoolean;
475
- }, z.core.$strict>;
476
- export type BoardStatus = z.infer<typeof BoardStatus>;
477
- export declare const BoardDefaultStatuses: readonly BoardStatus[];
478
- /**
479
- * Who a task is on: a person Gate knows, or an agent node in this installation (#285).
480
- *
481
- * ⚠️ A `user` id is deliberately NOT validated against Intel's own id shape. Identity is Gate's
482
- * (see the product boundary), so a rule here would be Intel inventing one about somebody else's
483
- * identifier — the same reason `GateApplicationId` is a plain bounded string.
484
- */
485
- export declare const BoardAssignee: z.ZodDiscriminatedUnion<[z.ZodObject<{
486
- type: z.ZodLiteral<"user">;
487
- id: z.ZodString;
488
- }, z.core.$strict>, z.ZodObject<{
489
- type: z.ZodLiteral<"agent">;
490
- nodeId: z.ZodString;
491
- }, z.core.$strict>], "type">;
492
- export type BoardAssignee = z.infer<typeof BoardAssignee>;
493
- /**
494
- * A task's place among the others, as a fractional index (#285).
495
- *
496
- * ⚠️ Server-assigned, and a caller can never send one. A move names its NEIGHBOURS and the server
497
- * mints a key between theirs, so moving one task writes one task and renumbers nothing — the whole
498
- * reason a board is not addressed by position the way a table's rows are (`TableRowPosition`).
499
- * A hand-written key could collide, and two tasks sharing a key have no defined order at all.
500
- *
501
- * ⚠️ This CHARACTER CLASS is the truth about a stored key, not `fractional-indexing`, and the two
502
- * are deliberately not the same set (anchrd/intel#359). A board that arrived through a bundle may
503
- * spell `"0"`, `"a00"`, `"zzz"` or `"A"` — all of them legal here, none of them readable by that
504
- * library. Narrowing the regex to what it reads would be a rule on the STORED document, so a board
505
- * carrying one would stop parsing in all four places a board body is read (the board read, the
506
- * indexer, the link reader, the bundle import) — unreadable, unsearchable and unmovable at once,
507
- * over a value its owner never wrote. That is the trap #311, #318 and #321 each walked into from a
508
- * different side.
509
- *
510
- * ⚠️ What every consumer may therefore rely on is exactly what stands here: keys are non-empty
511
- * strings over `[0-9A-Za-z]` and are ORDERED BY STRING COMPARISON. Nothing may assume more — and
512
- * `packages/api`'s `orderBetween` is the one place that asks `fractional-indexing` for a key and
513
- * carries on without it when it refuses a bound.
514
- */
515
- export declare const MaxBoardTaskOrderLength = 64;
516
- export declare const BoardTaskOrder: z.ZodString;
517
- export declare const BoardTaskId: z.ZodString;
518
- export declare const BoardTaskLabel: z.ZodString;
519
- export declare const BoardTaskDate: z.ZodISODate;
520
- export declare const BoardTaskDescription: z.ZodString;
521
- /**
522
- * The tasks one task waits for (#285), each of them at most once (anchrd/intel#318).
523
- *
524
- * ⚠️ Board-internal only, enforced on the write path: a dependency on a task in another board would
525
- * hang this node on a file that can change without anyone here noticing. Across boards the link is
526
- * `references`, which points at the board NODE and lands in the link graph.
527
- *
528
- * ⚠️ Refused rather than folded together, the same shape as the status ids in `ConfigureBoardInput`.
529
- * A repeat carries no information — but that is a fact about the value, not about the answer: a
530
- * caller handed back a shorter list than it sent is told nothing, and composes the same one again.
531
- * The refusal names the mistake once, and the caller is holding the list it has to fix. (The one
532
- * place a repeat is folded instead is `upgradeStoredBoard`, where there is no caller to tell.)
533
- *
534
- * ⚠️ It sits on the STORED task as well as on the two inputs, so a consumer may rely on it rather
535
- * than defend against it — `createBoardGraph` mints one edge key per pair, and a second one threw
536
- * the whole graph view off the screen for everybody looking at that board.
537
- */
538
- export declare const BoardTaskDependsOn: z.ZodArray<z.ZodString>;
539
- /**
540
- * A task's labels, each of them at most once (anchrd/intel#318).
541
- *
542
- * ⚠️ The same rule the detail panel has always applied to what a person types — it refuses to add a
543
- * label the task already carries — stated where every surface meets it, because the MCP write path
544
- * did not. A repeated label draws the same chip twice on the card, with two remove buttons of which
545
- * either takes both away, and weights that word higher in the search text (`indexing.ts`).
546
- */
547
- export declare const BoardTaskLabels: z.ZodArray<z.ZodString>;
548
- /**
549
- * The Intel nodes a task points at, each of them at most once (anchrd/intel#318).
550
- *
551
- * They land in the link graph as `text` links, the same way a document's inline links do, so what a
552
- * board points at is visible from the other side too.
553
- *
554
- * ⚠️ Distinct for the same reason as `labels`: the picker in the detail panel already refuses one
555
- * the task holds, and the link graph counts a repeat once anyway (`ON CONFLICT DO NOTHING`), so a
556
- * duplicate is a second row in the panel and nothing else — which is exactly the kind of value that
557
- * has no reading and should not be storable.
558
- */
559
- export declare const BoardTaskReferences: z.ZodArray<z.ZodString>;
560
- export declare const BoardTask: z.ZodObject<{
561
- id: z.ZodString;
562
- title: z.ZodString;
563
- status: z.ZodString;
564
- assignee: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
565
- type: z.ZodLiteral<"user">;
566
- id: z.ZodString;
567
- }, z.core.$strict>, z.ZodObject<{
568
- type: z.ZodLiteral<"agent">;
569
- nodeId: z.ZodString;
570
- }, z.core.$strict>], "type">>;
571
- labels: z.ZodArray<z.ZodString>;
572
- startDate: z.ZodNullable<z.ZodISODate>;
573
- dueDate: z.ZodNullable<z.ZodISODate>;
574
- parentId: z.ZodNullable<z.ZodString>;
575
- dependsOn: z.ZodArray<z.ZodString>;
576
- order: z.ZodString;
577
- description: z.ZodString;
578
- references: z.ZodArray<z.ZodString>;
579
- }, z.core.$strict>;
580
- export type BoardTask = z.infer<typeof BoardTask>;
581
- export declare const BoardDocument: z.ZodObject<{
582
- statuses: z.ZodArray<z.ZodObject<{
583
- id: z.ZodString;
584
- label: z.ZodString;
585
- order: z.ZodNumber;
586
- terminal: z.ZodBoolean;
587
- }, z.core.$strict>>;
588
- tasks: z.ZodArray<z.ZodObject<{
589
- id: z.ZodString;
590
- title: z.ZodString;
591
- status: z.ZodString;
592
- assignee: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
593
- type: z.ZodLiteral<"user">;
594
- id: z.ZodString;
595
- }, z.core.$strict>, z.ZodObject<{
596
- type: z.ZodLiteral<"agent">;
597
- nodeId: z.ZodString;
598
- }, z.core.$strict>], "type">>;
599
- labels: z.ZodArray<z.ZodString>;
600
- startDate: z.ZodNullable<z.ZodISODate>;
601
- dueDate: z.ZodNullable<z.ZodISODate>;
602
- parentId: z.ZodNullable<z.ZodString>;
603
- dependsOn: z.ZodArray<z.ZodString>;
604
- order: z.ZodString;
605
- description: z.ZodString;
606
- references: z.ZodArray<z.ZodString>;
607
- }, z.core.$strict>>;
608
- }, z.core.$strict>;
609
- export type BoardDocument = z.infer<typeof BoardDocument>;
610
- export declare const BoardMaxTaskDepth = 5;
611
- export declare const GetBoardInput: z.ZodObject<{
612
- nodeId: z.ZodString;
613
- }, z.core.$strict>;
614
- export type GetBoardInput = z.infer<typeof GetBoardInput>;
615
- export declare const NodeBoard: z.ZodObject<{
616
- node: z.ZodObject<{
617
- id: z.ZodString;
618
- parentId: z.ZodNullable<z.ZodString>;
619
- kind: z.ZodEnum<{
620
- folder: "folder";
621
- document: "document";
622
- attachment: "attachment";
623
- table: "table";
624
- agent: "agent";
625
- board: "board";
626
- }>;
627
- title: z.ZodString;
628
- description: z.ZodNullable<z.ZodString>;
629
- ownerId: z.ZodString;
630
- currentVersionId: z.ZodNullable<z.ZodString>;
631
- createdAt: z.ZodISODateTime;
632
- updatedAt: z.ZodISODateTime;
633
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
634
- }, z.core.$strict>;
635
- board: z.ZodObject<{
636
- statuses: z.ZodArray<z.ZodObject<{
637
- id: z.ZodString;
638
- label: z.ZodString;
639
- order: z.ZodNumber;
640
- terminal: z.ZodBoolean;
641
- }, z.core.$strict>>;
642
- tasks: z.ZodArray<z.ZodObject<{
643
- id: z.ZodString;
644
- title: z.ZodString;
645
- status: z.ZodString;
646
- assignee: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
647
- type: z.ZodLiteral<"user">;
648
- id: z.ZodString;
649
- }, z.core.$strict>, z.ZodObject<{
650
- type: z.ZodLiteral<"agent">;
651
- nodeId: z.ZodString;
652
- }, z.core.$strict>], "type">>;
653
- labels: z.ZodArray<z.ZodString>;
654
- startDate: z.ZodNullable<z.ZodISODate>;
655
- dueDate: z.ZodNullable<z.ZodISODate>;
656
- parentId: z.ZodNullable<z.ZodString>;
657
- dependsOn: z.ZodArray<z.ZodString>;
658
- order: z.ZodString;
659
- description: z.ZodString;
660
- references: z.ZodArray<z.ZodString>;
661
- }, z.core.$strict>>;
662
- }, z.core.$strict>;
663
- versionId: z.ZodNullable<z.ZodString>;
664
- }, z.core.$strict>;
665
- export type NodeBoard = z.infer<typeof NodeBoard>;
666
- export declare const BoardStatusInput: z.ZodObject<{
667
- id: z.ZodString;
668
- label: z.ZodString;
669
- terminal: z.ZodOptional<z.ZodBoolean>;
670
- }, z.core.$strict>;
671
- export type BoardStatusInput = z.infer<typeof BoardStatusInput>;
672
- export declare const ConfigureBoardInput: z.ZodObject<{
673
- nodeId: z.ZodString;
674
- statuses: z.ZodArray<z.ZodObject<{
675
- id: z.ZodString;
676
- label: z.ZodString;
677
- terminal: z.ZodOptional<z.ZodBoolean>;
678
- }, z.core.$strict>>;
679
- idempotencyKey: z.ZodString;
680
- }, z.core.$strict>;
681
- export type ConfigureBoardInput = z.infer<typeof ConfigureBoardInput>;
682
- /**
683
- * A new task (#285).
684
- *
685
- * ⚠️ No `baseVersionId`, on this and on every other task operation, and that absence is the
686
- * feature. A board is addressed by stable task id and never by position, so two agents touching two
687
- * different tasks cannot collide — demanding a base version would invent the `version_conflict`
688
- * that #285 exists to remove, and force every caller to read the whole board first.
689
- */
690
- export declare const AddBoardTaskInput: z.ZodObject<{
691
- nodeId: z.ZodString;
692
- title: z.ZodString;
693
- status: z.ZodOptional<z.ZodString>;
694
- assignee: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
695
- type: z.ZodLiteral<"user">;
696
- id: z.ZodString;
697
- }, z.core.$strict>, z.ZodObject<{
698
- type: z.ZodLiteral<"agent">;
699
- nodeId: z.ZodString;
700
- }, z.core.$strict>], "type">>>;
701
- labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
702
- startDate: z.ZodDefault<z.ZodNullable<z.ZodISODate>>;
703
- dueDate: z.ZodDefault<z.ZodNullable<z.ZodISODate>>;
704
- parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
705
- dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
706
- description: z.ZodDefault<z.ZodString>;
707
- references: z.ZodDefault<z.ZodArray<z.ZodString>>;
708
- afterTaskId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
709
- beforeTaskId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
710
- idempotencyKey: z.ZodString;
711
- }, z.core.$strict>;
712
- export type AddBoardTaskInput = z.infer<typeof AddBoardTaskInput>;
713
- /**
714
- * What a task says about itself.
715
- *
716
- * ⚠️ Deliberately no `status`, no `parentId` and no `order`: where a task SITS is a move, and a
717
- * move is the operation that has to mint an order key and re-check the two cycle rules. Folding
718
- * both into one call would mean every field edit pays for those checks and every move could quietly
719
- * rewrite a description.
720
- */
721
- export declare const UpdateBoardTaskInput: z.ZodObject<{
722
- nodeId: z.ZodString;
723
- taskId: z.ZodString;
724
- title: z.ZodOptional<z.ZodString>;
725
- assignee: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
726
- type: z.ZodLiteral<"user">;
727
- id: z.ZodString;
728
- }, z.core.$strict>, z.ZodObject<{
729
- type: z.ZodLiteral<"agent">;
730
- nodeId: z.ZodString;
731
- }, z.core.$strict>], "type">>>;
732
- labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
733
- startDate: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
734
- dueDate: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
735
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
736
- description: z.ZodOptional<z.ZodString>;
737
- references: z.ZodOptional<z.ZodArray<z.ZodString>>;
738
- idempotencyKey: z.ZodString;
739
- }, z.core.$strict>;
740
- export type UpdateBoardTaskInput = z.infer<typeof UpdateBoardTaskInput>;
741
- export declare const MoveBoardTaskInput: z.ZodObject<{
742
- nodeId: z.ZodString;
743
- taskId: z.ZodString;
744
- status: z.ZodOptional<z.ZodString>;
745
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
746
- afterTaskId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
747
- beforeTaskId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
748
- idempotencyKey: z.ZodString;
749
- }, z.core.$strict>;
750
- export type MoveBoardTaskInput = z.infer<typeof MoveBoardTaskInput>;
751
- export declare const DeleteBoardTaskInput: z.ZodObject<{
752
- nodeId: z.ZodString;
753
- taskId: z.ZodString;
754
- idempotencyKey: z.ZodString;
755
- }, z.core.$strict>;
756
- export type DeleteBoardTaskInput = z.infer<typeof DeleteBoardTaskInput>;
757
- /**
758
- * The way out of a board whose `tasks[]` names one id twice (anchrd/intel#341).
759
- *
760
- * ⚠️ It names no task, and that is not an oversight. Such a board holds a pair the caller cannot
761
- * tell apart — every other operation here addresses a task BY id (#285), so the one thing nobody
762
- * can say is "the second of the two". The board is what is named, and the server does the one thing
763
- * that removes the ambiguity: the first entry under an id keeps it, every later one gets a freshly
764
- * minted id and keeps everything else it carries.
765
- *
766
- * ⚠️ It exists because the pair is deliberately NOT folded away on read (`upgradeStoredBoard`,
767
- * `repeatedBoardId`): two tasks under one id are two whole tasks, and a fold on the read is written
768
- * back by the next save of any kind. So somebody has to ask for the repair, and this is the asking.
769
- */
770
- export declare const RepairBoardTaskIdsInput: z.ZodObject<{
771
- nodeId: z.ZodString;
772
- idempotencyKey: z.ZodString;
773
- }, z.core.$strict>;
774
- export type RepairBoardTaskIdsInput = z.infer<typeof RepairBoardTaskIdsInput>;
775
- export declare const BoardTaskResult: z.ZodObject<{
776
- node: z.ZodObject<{
777
- id: z.ZodString;
778
- parentId: z.ZodNullable<z.ZodString>;
779
- kind: z.ZodEnum<{
780
- folder: "folder";
781
- document: "document";
782
- attachment: "attachment";
783
- table: "table";
784
- agent: "agent";
785
- board: "board";
786
- }>;
787
- title: z.ZodString;
788
- description: z.ZodNullable<z.ZodString>;
789
- ownerId: z.ZodString;
790
- currentVersionId: z.ZodNullable<z.ZodString>;
791
- createdAt: z.ZodISODateTime;
792
- updatedAt: z.ZodISODateTime;
793
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
794
- }, z.core.$strict>;
795
- version: z.ZodObject<{
796
- id: z.ZodString;
797
- nodeId: z.ZodString;
798
- sequence: z.ZodNumber;
799
- contentKey: z.ZodString;
800
- mediaType: z.ZodString;
801
- contentHash: z.ZodString;
802
- size: z.ZodNumber;
803
- segment: z.ZodNullable<z.ZodEnum<{
804
- append: "append";
805
- snapshot: "snapshot";
806
- }>>;
807
- createdBy: z.ZodString;
808
- createdAt: z.ZodISODateTime;
809
- }, z.core.$strict>;
810
- task: z.ZodObject<{
811
- id: z.ZodString;
812
- title: z.ZodString;
813
- status: z.ZodString;
814
- assignee: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
815
- type: z.ZodLiteral<"user">;
816
- id: z.ZodString;
817
- }, z.core.$strict>, z.ZodObject<{
818
- type: z.ZodLiteral<"agent">;
819
- nodeId: z.ZodString;
820
- }, z.core.$strict>], "type">>;
821
- labels: z.ZodArray<z.ZodString>;
822
- startDate: z.ZodNullable<z.ZodISODate>;
823
- dueDate: z.ZodNullable<z.ZodISODate>;
824
- parentId: z.ZodNullable<z.ZodString>;
825
- dependsOn: z.ZodArray<z.ZodString>;
826
- order: z.ZodString;
827
- description: z.ZodString;
828
- references: z.ZodArray<z.ZodString>;
829
- }, z.core.$strict>;
830
- }, z.core.$strict>;
831
- export type BoardTaskResult = z.infer<typeof BoardTaskResult>;
832
- export declare const DeleteBoardTaskResult: z.ZodObject<{
833
- node: z.ZodObject<{
834
- id: z.ZodString;
835
- parentId: z.ZodNullable<z.ZodString>;
836
- kind: z.ZodEnum<{
837
- folder: "folder";
838
- document: "document";
839
- attachment: "attachment";
840
- table: "table";
841
- agent: "agent";
842
- board: "board";
843
- }>;
844
- title: z.ZodString;
845
- description: z.ZodNullable<z.ZodString>;
846
- ownerId: z.ZodString;
847
- currentVersionId: z.ZodNullable<z.ZodString>;
848
- createdAt: z.ZodISODateTime;
849
- updatedAt: z.ZodISODateTime;
850
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
851
- }, z.core.$strict>;
852
- version: z.ZodObject<{
853
- id: z.ZodString;
854
- nodeId: z.ZodString;
855
- sequence: z.ZodNumber;
856
- contentKey: z.ZodString;
857
- mediaType: z.ZodString;
858
- contentHash: z.ZodString;
859
- size: z.ZodNumber;
860
- segment: z.ZodNullable<z.ZodEnum<{
861
- append: "append";
862
- snapshot: "snapshot";
863
- }>>;
864
- createdBy: z.ZodString;
865
- createdAt: z.ZodISODateTime;
866
- }, z.core.$strict>;
867
- deleted: z.ZodNumber;
868
- }, z.core.$strict>;
869
- export type DeleteBoardTaskResult = z.infer<typeof DeleteBoardTaskResult>;
870
- export declare const ConfigureBoardResult: z.ZodObject<{
871
- node: z.ZodObject<{
872
- id: z.ZodString;
873
- parentId: z.ZodNullable<z.ZodString>;
874
- kind: z.ZodEnum<{
875
- folder: "folder";
876
- document: "document";
877
- attachment: "attachment";
878
- table: "table";
879
- agent: "agent";
880
- board: "board";
881
- }>;
882
- title: z.ZodString;
883
- description: z.ZodNullable<z.ZodString>;
884
- ownerId: z.ZodString;
885
- currentVersionId: z.ZodNullable<z.ZodString>;
886
- createdAt: z.ZodISODateTime;
887
- updatedAt: z.ZodISODateTime;
888
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
889
- }, z.core.$strict>;
890
- version: z.ZodObject<{
891
- id: z.ZodString;
892
- nodeId: z.ZodString;
893
- sequence: z.ZodNumber;
894
- contentKey: z.ZodString;
895
- mediaType: z.ZodString;
896
- contentHash: z.ZodString;
897
- size: z.ZodNumber;
898
- segment: z.ZodNullable<z.ZodEnum<{
899
- append: "append";
900
- snapshot: "snapshot";
901
- }>>;
902
- createdBy: z.ZodString;
903
- createdAt: z.ZodISODateTime;
904
- }, z.core.$strict>;
905
- statuses: z.ZodArray<z.ZodObject<{
906
- id: z.ZodString;
907
- label: z.ZodString;
908
- order: z.ZodNumber;
909
- terminal: z.ZodBoolean;
910
- }, z.core.$strict>>;
911
- }, z.core.$strict>;
912
- export type ConfigureBoardResult = z.infer<typeof ConfigureBoardResult>;
913
- /**
914
- * What the repair did, task by task (anchrd/intel#341).
915
- *
916
- * ⚠️ `previousId` is the id the entry shared, and it still names a task on this board — the FIRST
917
- * entry under it, the one that kept it. That is what makes the repair readable: nothing that
918
- * pointed at that id moved, so a caller can see which of the two the board's `parentId` and
919
- * `dependsOn` edges have been meaning all along, and move them with `board_task_move` and
920
- * `board_task_update` if they meant the other one.
921
- *
922
- * ⚠️ At least one entry, because a board with nothing to repair is refused rather than answered
923
- * with an empty list and a new version that changed nothing.
924
- */
925
- export declare const RepairBoardTaskIdsResult: z.ZodObject<{
926
- node: z.ZodObject<{
927
- id: z.ZodString;
928
- parentId: z.ZodNullable<z.ZodString>;
929
- kind: z.ZodEnum<{
930
- folder: "folder";
931
- document: "document";
932
- attachment: "attachment";
933
- table: "table";
934
- agent: "agent";
935
- board: "board";
936
- }>;
937
- title: z.ZodString;
938
- description: z.ZodNullable<z.ZodString>;
939
- ownerId: z.ZodString;
940
- currentVersionId: z.ZodNullable<z.ZodString>;
941
- createdAt: z.ZodISODateTime;
942
- updatedAt: z.ZodISODateTime;
943
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
944
- }, z.core.$strict>;
945
- version: z.ZodObject<{
946
- id: z.ZodString;
947
- nodeId: z.ZodString;
948
- sequence: z.ZodNumber;
949
- contentKey: z.ZodString;
950
- mediaType: z.ZodString;
951
- contentHash: z.ZodString;
952
- size: z.ZodNumber;
953
- segment: z.ZodNullable<z.ZodEnum<{
954
- append: "append";
955
- snapshot: "snapshot";
956
- }>>;
957
- createdBy: z.ZodString;
958
- createdAt: z.ZodISODateTime;
959
- }, z.core.$strict>;
960
- renumbered: z.ZodArray<z.ZodObject<{
961
- previousId: z.ZodString;
962
- task: z.ZodObject<{
963
- id: z.ZodString;
964
- title: z.ZodString;
965
- status: z.ZodString;
966
- assignee: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
967
- type: z.ZodLiteral<"user">;
968
- id: z.ZodString;
969
- }, z.core.$strict>, z.ZodObject<{
970
- type: z.ZodLiteral<"agent">;
971
- nodeId: z.ZodString;
972
- }, z.core.$strict>], "type">>;
973
- labels: z.ZodArray<z.ZodString>;
974
- startDate: z.ZodNullable<z.ZodISODate>;
975
- dueDate: z.ZodNullable<z.ZodISODate>;
976
- parentId: z.ZodNullable<z.ZodString>;
977
- dependsOn: z.ZodArray<z.ZodString>;
978
- order: z.ZodString;
979
- description: z.ZodString;
980
- references: z.ZodArray<z.ZodString>;
981
- }, z.core.$strict>;
982
- }, z.core.$strict>>;
983
- }, z.core.$strict>;
984
- export type RepairBoardTaskIdsResult = z.infer<typeof RepairBoardTaskIdsResult>;
985
- export declare const AgentMediaType = "application/vnd.anchrd.agent+json";
986
- export declare const AgentReferenceRole: z.ZodEnum<{
987
- "system-message": "system-message";
988
- "semantic-context": "semantic-context";
989
- memory: "memory";
990
- }>;
991
- export type AgentReferenceRole = z.infer<typeof AgentReferenceRole>;
992
- export declare const AgentReference: z.ZodObject<{
993
- nodeId: z.ZodString;
994
- role: z.ZodEnum<{
995
- "system-message": "system-message";
996
- "semantic-context": "semantic-context";
997
- memory: "memory";
998
- }>;
999
- }, z.core.$strict>;
1000
- export type AgentReference = z.infer<typeof AgentReference>;
1001
- /**
1002
- * Which kinds of node each role can actually be given (#255).
1003
- *
1004
- * ⚠️ Not every role takes every kind, and the reasons are about what the runtime DOES with a
1005
- * reference rather than about tidiness:
1006
- *
1007
- * `memory` is a folder because the agent WRITES there — `agent_remember` creates a note inside
1008
- * it. A single document as memory would mean the agent overwrites the document it was given.
1009
- *
1010
- * `semantic-context` is a folder because it is a search SPACE, searched per folder by
1011
- * `loop/scoped-search`. A single document is not a narrower search space; reading it whole is a
1012
- * different behaviour, and one that gets named before it is introduced, not slipped in.
1013
- *
1014
- * `system-message` reads single nodes already and takes a document or a table as well as a
1015
- * folder. A document is the natural case — a skill somebody wrote as ordinary text — and a table
1016
- * is the same read: the runtime asks intel for the node and prepends its content, which for a
1017
- * table is its CSV.
1018
- *
1019
- * ⚠️ `folder` stays on `system-message` although a folder carries no content of its own. Every
1020
- * definition written before #255 could only name folders, and taking the combination away here
1021
- * would refuse the next save of an agent that has been working for months — "existing definitions
1022
- * stay valid" is not only about reading them.
1023
- *
1024
- * ⚠️ This is the ONE place the rule lives. The screen offers what it says and the write path
1025
- * refuses what it forbids; a surface that made its own list would eventually disagree with the
1026
- * other, and the one that matters is whichever runs last.
1027
- */
1028
- export declare const AgentReferenceKinds: {
1029
- readonly "system-message": readonly ["folder", "document", "table"];
1030
- readonly "semantic-context": readonly ["folder"];
1031
- readonly memory: readonly ["folder"];
1032
- };
1033
- export declare function agentReferenceAccepts(role: AgentReferenceRole, kind: NodeKind): boolean;
1034
- /** The roles a node of this kind may be given — the same rule, read from the other side. */
1035
- export declare function agentReferenceRolesFor(kind: NodeKind): AgentReferenceRole[];
1036
- export declare const AgentScheduleTarget: z.ZodObject<{
1037
- kind: z.ZodEnum<{
1038
- document: "document";
1039
- flow: "flow";
1040
- }>;
1041
- id: z.ZodString;
1042
- }, z.core.$strict>;
1043
- export type AgentScheduleTarget = z.infer<typeof AgentScheduleTarget>;
1044
- export declare const AgentSchedule: z.ZodObject<{
1045
- cron: z.ZodString;
1046
- timezone: z.ZodDefault<z.ZodString>;
1047
- target: z.ZodObject<{
1048
- kind: z.ZodEnum<{
1049
- document: "document";
1050
- flow: "flow";
1051
- }>;
1052
- id: z.ZodString;
1053
- }, z.core.$strict>;
1054
- }, z.core.$strict>;
1055
- export type AgentSchedule = z.infer<typeof AgentSchedule>;
1056
- export declare const AgentModel: z.ZodObject<{
1057
- provider: z.ZodEnum<{
1058
- "workers-ai": "workers-ai";
1059
- anthropic: "anthropic";
1060
- }>;
1061
- model: z.ZodString;
1062
- }, z.core.$strict>;
1063
- export type AgentModel = z.infer<typeof AgentModel>;
1064
- /**
1065
- * One MCP server as the portal names it. The handle is what the portal puts in front of every tool
1066
- * that server offers (`notion_notion-search` belongs to `notion`), and it is the only identifier
1067
- * Intel can both store and recognise again in a live `tools/list`.
1068
- *
1069
- * ⚠️ A handle is never invented from a tool name. Which servers exist is the portal's answer
1070
- * (`portal_list_servers`), and the prefix is only used to attribute a tool to a server that answer
1071
- * already named — see `packages/api/src/tools/tool-servers` for why splitting on the underscore
1072
- * alone would be ambiguous.
1073
- */
1074
- export declare const ToolServerHandle: z.ZodString;
1075
- export type ToolServerHandle = z.infer<typeof ToolServerHandle>;
1076
- /**
1077
- * What a caller may ASK for: whole MCP servers, and nothing about who delegates them (D30).
1078
- *
1079
- * ⚠️ The absence of `delegatedBy` is the point, and it is why the write shape differs from the read
1080
- * shape at all. Intel writes that field from the session it authorized; a caller who could name
1081
- * somebody else would be handing an agent a portal connection they do not have, and the agent would
1082
- * act on it unattended. Leaving the field out of the input makes that structural instead of a
1083
- * runtime overwrite: a body carrying it is a parse error at the boundary, on every surface, and no
1084
- * screen ever has to invent a value it has no business knowing.
1085
- */
1086
- export declare const AgentToolSelection: z.ZodObject<{
1087
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1088
- }, z.core.$strict>;
1089
- export type AgentToolSelection = z.infer<typeof AgentToolSelection>;
1090
- /**
1091
- * What is STORED and read back: the selection plus whose portal connection it came from (D30).
1092
- *
1093
- * ⚠️ This is a selection, not a permission. Nothing here grants anything: whether a server is
1094
- * reachable is still decided by one live `tools/list` with `delegatedBy`'s own portal token, so a
1095
- * delegator who loses the server or the connection takes it away from the agent at the next run
1096
- * with no edit to this document.
1097
- *
1098
- * ⚠️ Read shape only. It appears in `AgentDefinition` and never in an input — see
1099
- * `AgentToolSelection` for why the two are deliberately different documents rather than one schema
1100
- * with an optional field.
1101
- */
1102
- export declare const AgentToolDelegation: z.ZodObject<{
1103
- delegatedBy: z.ZodString;
1104
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1105
- }, z.core.$strict>;
1106
- export type AgentToolDelegation = z.infer<typeof AgentToolDelegation>;
1107
- export declare const AgentDefinition: z.ZodObject<{
1108
- tools: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1109
- delegatedBy: z.ZodString;
1110
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1111
- }, z.core.$strict>>>;
1112
- references: z.ZodDefault<z.ZodArray<z.ZodObject<{
1113
- nodeId: z.ZodString;
1114
- role: z.ZodEnum<{
1115
- "system-message": "system-message";
1116
- "semantic-context": "semantic-context";
1117
- memory: "memory";
1118
- }>;
1119
- }, z.core.$strict>>>;
1120
- schedules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1121
- cron: z.ZodString;
1122
- timezone: z.ZodDefault<z.ZodString>;
1123
- target: z.ZodObject<{
1124
- kind: z.ZodEnum<{
1125
- document: "document";
1126
- flow: "flow";
1127
- }>;
1128
- id: z.ZodString;
1129
- }, z.core.$strict>;
1130
- }, z.core.$strict>>>;
1131
- model: z.ZodObject<{
1132
- provider: z.ZodEnum<{
1133
- "workers-ai": "workers-ai";
1134
- anthropic: "anthropic";
1135
- }>;
1136
- model: z.ZodString;
1137
- }, z.core.$strict>;
1138
- }, z.core.$strict>;
1139
- export type AgentDefinition = z.infer<typeof AgentDefinition>;
1140
- /**
1141
- * The same document as `AgentDefinition`, minus the one field a caller may not write.
1142
- *
1143
- * ⚠️ Two schemas rather than one, and the split is load-bearing (#208, D30). Everything an agent IS
1144
- * comes from whoever edits it; **whose portal connection it acts on** does not, because that is an
1145
- * authority the editor would be granting to themselves. So the write shape simply has no place to
1146
- * put it: `{ tools: { servers: [...] } }` is what a screen or an MCP client sends, Intel adds
1147
- * `delegatedBy` from the session, and a body that tries to name one is refused by the strict object
1148
- * before any of it is read. The reading shape keeps the field because a reader must be able to see
1149
- * whose connection an agent runs on.
1150
- */
1151
- export declare const AgentDefinitionInput: z.ZodObject<{
1152
- tools: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1153
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1154
- }, z.core.$strict>>>;
1155
- references: z.ZodDefault<z.ZodArray<z.ZodObject<{
1156
- nodeId: z.ZodString;
1157
- role: z.ZodEnum<{
1158
- "system-message": "system-message";
1159
- "semantic-context": "semantic-context";
1160
- memory: "memory";
1161
- }>;
1162
- }, z.core.$strict>>>;
1163
- schedules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1164
- cron: z.ZodString;
1165
- timezone: z.ZodDefault<z.ZodString>;
1166
- target: z.ZodObject<{
1167
- kind: z.ZodEnum<{
1168
- document: "document";
1169
- flow: "flow";
1170
- }>;
1171
- id: z.ZodString;
1172
- }, z.core.$strict>;
1173
- }, z.core.$strict>>>;
1174
- model: z.ZodObject<{
1175
- provider: z.ZodEnum<{
1176
- "workers-ai": "workers-ai";
1177
- anthropic: "anthropic";
1178
- }>;
1179
- model: z.ZodString;
1180
- }, z.core.$strict>;
1181
- }, z.core.$strict>;
1182
- export type AgentDefinitionInput = z.infer<typeof AgentDefinitionInput>;
1183
- export declare const SaveAgentDefinitionInput: z.ZodObject<{
1184
- nodeId: z.ZodString;
1185
- baseVersionId: z.ZodNullable<z.ZodString>;
1186
- definition: z.ZodObject<{
1187
- tools: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1188
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1189
- }, z.core.$strict>>>;
1190
- references: z.ZodDefault<z.ZodArray<z.ZodObject<{
1191
- nodeId: z.ZodString;
1192
- role: z.ZodEnum<{
1193
- "system-message": "system-message";
1194
- "semantic-context": "semantic-context";
1195
- memory: "memory";
1196
- }>;
1197
- }, z.core.$strict>>>;
1198
- schedules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1199
- cron: z.ZodString;
1200
- timezone: z.ZodDefault<z.ZodString>;
1201
- target: z.ZodObject<{
1202
- kind: z.ZodEnum<{
1203
- document: "document";
1204
- flow: "flow";
1205
- }>;
1206
- id: z.ZodString;
1207
- }, z.core.$strict>;
1208
- }, z.core.$strict>>>;
1209
- model: z.ZodObject<{
1210
- provider: z.ZodEnum<{
1211
- "workers-ai": "workers-ai";
1212
- anthropic: "anthropic";
1213
- }>;
1214
- model: z.ZodString;
1215
- }, z.core.$strict>;
1216
- }, z.core.$strict>;
1217
- idempotencyKey: z.ZodString;
1218
- }, z.core.$strict>;
1219
- export type SaveAgentDefinitionInput = z.infer<typeof SaveAgentDefinitionInput>;
1220
- export declare const GetAgentInput: z.ZodObject<{
1221
- nodeId: z.ZodString;
1222
- }, z.core.$strict>;
1223
- export type GetAgentInput = z.infer<typeof GetAgentInput>;
1224
- export declare const PauseAgentInput: z.ZodObject<{
1225
- nodeId: z.ZodString;
1226
- }, z.core.$strict>;
1227
- export type PauseAgentInput = z.infer<typeof PauseAgentInput>;
1228
- export declare const RunAgentNowInput: z.ZodObject<{
1229
- nodeId: z.ZodString;
1230
- target: z.ZodObject<{
1231
- kind: z.ZodEnum<{
1232
- document: "document";
1233
- flow: "flow";
1234
- }>;
1235
- id: z.ZodString;
1236
- }, z.core.$strict>;
1237
- }, z.core.$strict>;
1238
- export type RunAgentNowInput = z.infer<typeof RunAgentNowInput>;
1239
- /**
1240
- * What one agent has actually cost, read out of Cloudflare's AI Gateway log (#251).
1241
- *
1242
- * ⚠️ Intel computes none of this from tokens and a price table. The gateway publishes the billed
1243
- * figure per call, and that figure is the debit from the Cloudflare balance 1:1 — Cloudflare takes
1244
- * its 5 % when the balance is loaded and passes inference through unchanged (measured 2026-08-07).
1245
- * A second, self-maintained answer beside it would be wrong on the day the two disagreed, and the
1246
- * wrong one would be the one on screen.
1247
- *
1248
- * ⚠️ `status` travels with the numbers and may never be dropped. `runs: []` means "cost nothing"
1249
- * only when `status` is `read`; under `not_configured` or `unreadable` it means "not known", and a
1250
- * screen that renders the two alike reports an outage as a saving.
1251
- */
1252
- export declare const AgentCostStatus: z.ZodEnum<{
1253
- read: "read";
1254
- not_configured: "not_configured";
1255
- unreadable: "unreadable";
1256
- }>;
1257
- export type AgentCostStatus = z.infer<typeof AgentCostStatus>;
1258
- export declare const AgentRunCost: z.ZodObject<{
1259
- runId: z.ZodString;
1260
- cost: z.ZodNumber;
1261
- calls: z.ZodNumber;
1262
- }, z.core.$strict>;
1263
- export type AgentRunCost = z.infer<typeof AgentRunCost>;
1264
- export declare const AgentCostWindow: z.ZodObject<{
1265
- days: z.ZodNumber;
1266
- cost: z.ZodNumber;
1267
- calls: z.ZodNumber;
1268
- models: z.ZodArray<z.ZodString>;
1269
- }, z.core.$strict>;
1270
- export type AgentCostWindow = z.infer<typeof AgentCostWindow>;
1271
- export declare const AgentCosts: z.ZodObject<{
1272
- status: z.ZodEnum<{
1273
- read: "read";
1274
- not_configured: "not_configured";
1275
- unreadable: "unreadable";
1276
- }>;
1277
- currency: z.ZodLiteral<"USD">;
1278
- runs: z.ZodArray<z.ZodObject<{
1279
- runId: z.ZodString;
1280
- cost: z.ZodNumber;
1281
- calls: z.ZodNumber;
1282
- }, z.core.$strict>>;
1283
- windows: z.ZodArray<z.ZodObject<{
1284
- days: z.ZodNumber;
1285
- cost: z.ZodNumber;
1286
- calls: z.ZodNumber;
1287
- models: z.ZodArray<z.ZodString>;
1288
- }, z.core.$strict>>;
1289
- partial: z.ZodBoolean;
1290
- }, z.core.$strict>;
1291
- export type AgentCosts = z.infer<typeof AgentCosts>;
1292
- /**
1293
- * What the models on offer cost and how much they hold (#257).
1294
- *
1295
- * ⚠️ `source` is per ENTRY and not per response, and that is not over-engineering. Cloudflare
1296
- * publishes figures for the models it serves itself and none at all for the Anthropic models it
1297
- * resells through Unified Billing — so a perfectly healthy read still leaves half the list on a
1298
- * written-out table, and one flag for the whole answer would call either the read stale or the
1299
- * table live.
1300
- */
1301
- export declare const ModelPrice: z.ZodObject<{
1302
- inputPerMillion: z.ZodNumber;
1303
- outputPerMillion: z.ZodNumber;
1304
- }, z.core.$strict>;
1305
- export type ModelPrice = z.infer<typeof ModelPrice>;
1306
- export declare const ModelCatalogEntry: z.ZodObject<{
1307
- provider: z.ZodEnum<{
1308
- "workers-ai": "workers-ai";
1309
- anthropic: "anthropic";
1310
- }>;
1311
- model: z.ZodString;
1312
- name: z.ZodString;
1313
- contextTokens: z.ZodNullable<z.ZodNumber>;
1314
- price: z.ZodNullable<z.ZodObject<{
1315
- inputPerMillion: z.ZodNumber;
1316
- outputPerMillion: z.ZodNumber;
1317
- }, z.core.$strict>>;
1318
- source: z.ZodEnum<{
1319
- cloudflare: "cloudflare";
1320
- builtin: "builtin";
1321
- }>;
1322
- }, z.core.$strict>;
1323
- export type ModelCatalogEntry = z.infer<typeof ModelCatalogEntry>;
1324
- export declare const ModelCatalog: z.ZodObject<{
1325
- entries: z.ZodArray<z.ZodObject<{
1326
- provider: z.ZodEnum<{
1327
- "workers-ai": "workers-ai";
1328
- anthropic: "anthropic";
1329
- }>;
1330
- model: z.ZodString;
1331
- name: z.ZodString;
1332
- contextTokens: z.ZodNullable<z.ZodNumber>;
1333
- price: z.ZodNullable<z.ZodObject<{
1334
- inputPerMillion: z.ZodNumber;
1335
- outputPerMillion: z.ZodNumber;
1336
- }, z.core.$strict>>;
1337
- source: z.ZodEnum<{
1338
- cloudflare: "cloudflare";
1339
- builtin: "builtin";
1340
- }>;
1341
- }, z.core.$strict>>;
1342
- liveStatus: z.ZodEnum<{
1343
- read: "read";
1344
- not_configured: "not_configured";
1345
- unreadable: "unreadable";
1346
- }>;
1347
- }, z.core.$strict>;
1348
- export type ModelCatalog = z.infer<typeof ModelCatalog>;
1349
- export declare const ListAgentsInput: z.ZodObject<{
1350
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1351
- includeArchived: z.ZodDefault<z.ZodBoolean>;
1352
- }, z.core.$strict>;
1353
- export type ListAgentsInput = z.infer<typeof ListAgentsInput>;
1354
- export declare const CreateAgentInput: z.ZodObject<{
1355
- parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1356
- title: z.ZodString;
1357
- description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1358
- definition: z.ZodObject<{
1359
- tools: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1360
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1361
- }, z.core.$strict>>>;
1362
- references: z.ZodDefault<z.ZodArray<z.ZodObject<{
1363
- nodeId: z.ZodString;
1364
- role: z.ZodEnum<{
1365
- "system-message": "system-message";
1366
- "semantic-context": "semantic-context";
1367
- memory: "memory";
1368
- }>;
1369
- }, z.core.$strict>>>;
1370
- schedules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1371
- cron: z.ZodString;
1372
- timezone: z.ZodDefault<z.ZodString>;
1373
- target: z.ZodObject<{
1374
- kind: z.ZodEnum<{
1375
- document: "document";
1376
- flow: "flow";
1377
- }>;
1378
- id: z.ZodString;
1379
- }, z.core.$strict>;
1380
- }, z.core.$strict>>>;
1381
- model: z.ZodObject<{
1382
- provider: z.ZodEnum<{
1383
- "workers-ai": "workers-ai";
1384
- anthropic: "anthropic";
1385
- }>;
1386
- model: z.ZodString;
1387
- }, z.core.$strict>;
1388
- }, z.core.$strict>;
1389
- idempotencyKey: z.ZodString;
1390
- }, z.core.$strict>;
1391
- export type CreateAgentInput = z.infer<typeof CreateAgentInput>;
1392
- export declare const GateApplicationId: z.ZodString;
1393
- export declare const NodeAgent: z.ZodObject<{
1394
- node: z.ZodObject<{
1395
- id: z.ZodString;
1396
- parentId: z.ZodNullable<z.ZodString>;
1397
- kind: z.ZodEnum<{
1398
- folder: "folder";
1399
- document: "document";
1400
- attachment: "attachment";
1401
- table: "table";
1402
- agent: "agent";
1403
- board: "board";
1404
- }>;
1405
- title: z.ZodString;
1406
- description: z.ZodNullable<z.ZodString>;
1407
- ownerId: z.ZodString;
1408
- currentVersionId: z.ZodNullable<z.ZodString>;
1409
- createdAt: z.ZodISODateTime;
1410
- updatedAt: z.ZodISODateTime;
1411
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
1412
- }, z.core.$strict>;
1413
- version: z.ZodNullable<z.ZodObject<{
1414
- id: z.ZodString;
1415
- nodeId: z.ZodString;
1416
- sequence: z.ZodNumber;
1417
- contentKey: z.ZodString;
1418
- mediaType: z.ZodString;
1419
- contentHash: z.ZodString;
1420
- size: z.ZodNumber;
1421
- segment: z.ZodNullable<z.ZodEnum<{
1422
- append: "append";
1423
- snapshot: "snapshot";
1424
- }>>;
1425
- createdBy: z.ZodString;
1426
- createdAt: z.ZodISODateTime;
1427
- }, z.core.$strict>>;
1428
- definition: z.ZodNullable<z.ZodObject<{
1429
- tools: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1430
- delegatedBy: z.ZodString;
1431
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1432
- }, z.core.$strict>>>;
1433
- references: z.ZodDefault<z.ZodArray<z.ZodObject<{
1434
- nodeId: z.ZodString;
1435
- role: z.ZodEnum<{
1436
- "system-message": "system-message";
1437
- "semantic-context": "semantic-context";
1438
- memory: "memory";
1439
- }>;
1440
- }, z.core.$strict>>>;
1441
- schedules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1442
- cron: z.ZodString;
1443
- timezone: z.ZodDefault<z.ZodString>;
1444
- target: z.ZodObject<{
1445
- kind: z.ZodEnum<{
1446
- document: "document";
1447
- flow: "flow";
1448
- }>;
1449
- id: z.ZodString;
1450
- }, z.core.$strict>;
1451
- }, z.core.$strict>>>;
1452
- model: z.ZodObject<{
1453
- provider: z.ZodEnum<{
1454
- "workers-ai": "workers-ai";
1455
- anthropic: "anthropic";
1456
- }>;
1457
- model: z.ZodString;
1458
- }, z.core.$strict>;
1459
- }, z.core.$strict>>;
1460
- applicationId: z.ZodNullable<z.ZodString>;
1461
- }, z.core.$strict>;
1462
- export type NodeAgent = z.infer<typeof NodeAgent>;
1463
- /**
1464
- * ⚠️ There is NO key field in this file, and adding one back would be the regression (D29, #207).
1465
- *
1466
- * Until #207 the create answer carried the Application key in plain text, once, and a person had to
1467
- * carry it into a Worker secret by hand — which is why an agent created through the screen could
1468
- * never run (#200). The key now goes from Gate straight into the agent runtime over Intel's service
1469
- * binding and is encrypted into that agent's Durable Object; it reaches no browser, no MCP tool
1470
- * result and no response body at all. `NodeAgent` is a `z.strictObject`, so a field named `key`
1471
- * added anywhere in this file is a parse error at the boundary rather than a leak somebody has to
1472
- * spot in review.
1473
- *
1474
- * What `POST /nodes/agents` and `agent_create` answer is therefore exactly what every read answers:
1475
- * the node, its first definition, and the `applicationId` that NAMES the principal without
1476
- * authenticating it.
1477
- */
1478
- export declare const CreatedAgent: z.ZodObject<{
1479
- node: z.ZodObject<{
1480
- id: z.ZodString;
1481
- parentId: z.ZodNullable<z.ZodString>;
1482
- kind: z.ZodEnum<{
1483
- folder: "folder";
1484
- document: "document";
1485
- attachment: "attachment";
1486
- table: "table";
1487
- agent: "agent";
1488
- board: "board";
1489
- }>;
1490
- title: z.ZodString;
1491
- description: z.ZodNullable<z.ZodString>;
1492
- ownerId: z.ZodString;
1493
- currentVersionId: z.ZodNullable<z.ZodString>;
1494
- createdAt: z.ZodISODateTime;
1495
- updatedAt: z.ZodISODateTime;
1496
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
1497
- }, z.core.$strict>;
1498
- version: z.ZodNullable<z.ZodObject<{
1499
- id: z.ZodString;
1500
- nodeId: z.ZodString;
1501
- sequence: z.ZodNumber;
1502
- contentKey: z.ZodString;
1503
- mediaType: z.ZodString;
1504
- contentHash: z.ZodString;
1505
- size: z.ZodNumber;
1506
- segment: z.ZodNullable<z.ZodEnum<{
1507
- append: "append";
1508
- snapshot: "snapshot";
1509
- }>>;
1510
- createdBy: z.ZodString;
1511
- createdAt: z.ZodISODateTime;
1512
- }, z.core.$strict>>;
1513
- definition: z.ZodNullable<z.ZodObject<{
1514
- tools: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1515
- delegatedBy: z.ZodString;
1516
- servers: z.ZodDefault<z.ZodArray<z.ZodString>>;
1517
- }, z.core.$strict>>>;
1518
- references: z.ZodDefault<z.ZodArray<z.ZodObject<{
1519
- nodeId: z.ZodString;
1520
- role: z.ZodEnum<{
1521
- "system-message": "system-message";
1522
- "semantic-context": "semantic-context";
1523
- memory: "memory";
1524
- }>;
1525
- }, z.core.$strict>>>;
1526
- schedules: z.ZodDefault<z.ZodArray<z.ZodObject<{
1527
- cron: z.ZodString;
1528
- timezone: z.ZodDefault<z.ZodString>;
1529
- target: z.ZodObject<{
1530
- kind: z.ZodEnum<{
1531
- document: "document";
1532
- flow: "flow";
1533
- }>;
1534
- id: z.ZodString;
1535
- }, z.core.$strict>;
1536
- }, z.core.$strict>>>;
1537
- model: z.ZodObject<{
1538
- provider: z.ZodEnum<{
1539
- "workers-ai": "workers-ai";
1540
- anthropic: "anthropic";
1541
- }>;
1542
- model: z.ZodString;
1543
- }, z.core.$strict>;
1544
- }, z.core.$strict>>;
1545
- applicationId: z.ZodNullable<z.ZodString>;
1546
- }, z.core.$strict>;
1547
- export type CreatedAgent = z.infer<typeof CreatedAgent>;
1548
- export declare const RotateAgentKeyInput: z.ZodObject<{
1549
- nodeId: z.ZodString;
1550
- }, z.core.$strict>;
1551
- export type RotateAgentKeyInput = z.infer<typeof RotateAgentKeyInput>;
1552
- /**
1553
- * What replacing an agent's key answers.
1554
- *
1555
- * ⚠️ No key, and that is the whole shape of D29: Intel asks Gate for a new one, hands it to the
1556
- * runtime over the service binding, and forgets it inside the same call. What the caller gets is
1557
- * the fact that it happened, so a screen can say so — `applicationId` names the principal whose key
1558
- * was replaced, which is a name and not a credential.
1559
- */
1560
- export declare const AgentKeyRotated: z.ZodObject<{
1561
- nodeId: z.ZodString;
1562
- applicationId: z.ZodString;
1563
- rotatedAt: z.ZodISODateTime;
1564
- }, z.core.$strict>;
1565
- export type AgentKeyRotated = z.infer<typeof AgentKeyRotated>;
1566
- export declare const AgentList: z.ZodObject<{
1567
- items: z.ZodArray<z.ZodObject<{
1568
- id: z.ZodString;
1569
- parentId: z.ZodNullable<z.ZodString>;
1570
- kind: z.ZodEnum<{
1571
- folder: "folder";
1572
- document: "document";
1573
- attachment: "attachment";
1574
- table: "table";
1575
- agent: "agent";
1576
- board: "board";
1577
- }>;
1578
- title: z.ZodString;
1579
- description: z.ZodNullable<z.ZodString>;
1580
- ownerId: z.ZodString;
1581
- currentVersionId: z.ZodNullable<z.ZodString>;
1582
- createdAt: z.ZodISODateTime;
1583
- updatedAt: z.ZodISODateTime;
1584
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
1585
- }, z.core.$strict>>;
1586
- }, z.core.$strict>;
1587
- export type AgentList = z.infer<typeof AgentList>;
1588
- export declare const NodeLinkRelation: z.ZodEnum<{
1589
- references: "references";
1590
- related: "related";
1591
- depends_on: "depends_on";
1592
- implements: "implements";
1593
- }>;
1594
- export type NodeLinkRelation = z.infer<typeof NodeLinkRelation>;
1595
- export declare const NodeLinkOrigin: z.ZodEnum<{
1596
- text: "text";
1597
- manual: "manual";
1598
- }>;
1599
- export type NodeLinkOrigin = z.infer<typeof NodeLinkOrigin>;
1600
- export declare const NodeLink: z.ZodObject<{
1601
- id: z.ZodString;
1602
- sourceNodeId: z.ZodString;
1603
- targetNodeId: z.ZodString;
1604
- relation: z.ZodEnum<{
1605
- references: "references";
1606
- related: "related";
1607
- depends_on: "depends_on";
1608
- implements: "implements";
1609
- }>;
1610
- origin: z.ZodEnum<{
1611
- text: "text";
1612
- manual: "manual";
1613
- }>;
1614
- label: z.ZodNullable<z.ZodString>;
1615
- createdBy: z.ZodString;
1616
- createdAt: z.ZodISODateTime;
1617
- }, z.core.$strict>;
1618
- export type NodeLink = z.infer<typeof NodeLink>;
1619
- export declare const NodeLinkList: z.ZodObject<{
1620
- items: z.ZodArray<z.ZodObject<{
1621
- id: z.ZodString;
1622
- sourceNodeId: z.ZodString;
1623
- targetNodeId: z.ZodString;
1624
- relation: z.ZodEnum<{
1625
- references: "references";
1626
- related: "related";
1627
- depends_on: "depends_on";
1628
- implements: "implements";
1629
- }>;
1630
- origin: z.ZodEnum<{
1631
- text: "text";
1632
- manual: "manual";
1633
- }>;
1634
- label: z.ZodNullable<z.ZodString>;
1635
- createdBy: z.ZodString;
1636
- createdAt: z.ZodISODateTime;
1637
- }, z.core.$strict>>;
1638
- }, z.core.$strict>;
1639
- export type NodeLinkList = z.infer<typeof NodeLinkList>;
1640
- export declare const DocumentLinkInlineType = "documentLink";
1641
- export declare const ResolveNodeLinksInput: z.ZodObject<{
1642
- nodeIds: z.ZodArray<z.ZodString>;
1643
- }, z.core.$strict>;
1644
- export type ResolveNodeLinksInput = z.infer<typeof ResolveNodeLinksInput>;
1645
- export declare const ResolvedNodeLink: z.ZodObject<{
1646
- nodeId: z.ZodString;
1647
- title: z.ZodString;
1648
- }, z.core.$strict>;
1649
- export type ResolvedNodeLink = z.infer<typeof ResolvedNodeLink>;
1650
- export declare const ResolveNodeLinksResult: z.ZodObject<{
1651
- items: z.ZodArray<z.ZodObject<{
1652
- nodeId: z.ZodString;
1653
- title: z.ZodString;
1654
- }, z.core.$strict>>;
1655
- }, z.core.$strict>;
1656
- export type ResolveNodeLinksResult = z.infer<typeof ResolveNodeLinksResult>;
1657
- export declare const NodeGraphInput: z.ZodObject<{
1658
- limit: z.ZodDefault<z.ZodNumber>;
1659
- }, z.core.$strict>;
1660
- export type NodeGraphInput = z.infer<typeof NodeGraphInput>;
1661
- export declare const NodeGraph: z.ZodObject<{
1662
- nodes: z.ZodArray<z.ZodObject<{
1663
- id: z.ZodString;
1664
- parentId: z.ZodNullable<z.ZodString>;
1665
- kind: z.ZodEnum<{
1666
- folder: "folder";
1667
- document: "document";
1668
- attachment: "attachment";
1669
- table: "table";
1670
- agent: "agent";
1671
- board: "board";
1672
- }>;
1673
- title: z.ZodString;
1674
- description: z.ZodNullable<z.ZodString>;
1675
- ownerId: z.ZodString;
1676
- currentVersionId: z.ZodNullable<z.ZodString>;
1677
- createdAt: z.ZodISODateTime;
1678
- updatedAt: z.ZodISODateTime;
1679
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
1680
- }, z.core.$strict>>;
1681
- links: z.ZodArray<z.ZodObject<{
1682
- id: z.ZodString;
1683
- sourceNodeId: z.ZodString;
1684
- targetNodeId: z.ZodString;
1685
- relation: z.ZodEnum<{
1686
- references: "references";
1687
- related: "related";
1688
- depends_on: "depends_on";
1689
- implements: "implements";
1690
- }>;
1691
- origin: z.ZodEnum<{
1692
- text: "text";
1693
- manual: "manual";
1694
- }>;
1695
- label: z.ZodNullable<z.ZodString>;
1696
- createdBy: z.ZodString;
1697
- createdAt: z.ZodISODateTime;
1698
- }, z.core.$strict>>;
1699
- }, z.core.$strict>;
1700
- export type NodeGraph = z.infer<typeof NodeGraph>;
1701
- export declare const BlockNoteMediaType = "application/vnd.anchrd.intel.blocknote+json";
1702
- export declare const BlockNoteDocument: z.ZodObject<{
1703
- format: z.ZodLiteral<"blocknote">;
1704
- schemaVersion: z.ZodLiteral<1>;
1705
- blocks: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1706
- markdown: z.ZodString;
1707
- }, z.core.$strict>;
1708
- export type BlockNoteDocument = z.infer<typeof BlockNoteDocument>;
1709
- export declare const ResourceGrant: z.ZodObject<{
1710
- id: z.ZodString;
1711
- resourceId: z.ZodString;
1712
- principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
1713
- type: z.ZodLiteral<"user">;
1714
- id: z.ZodString;
1715
- }, z.core.$strict>, z.ZodObject<{
1716
- type: z.ZodLiteral<"email">;
1717
- email: z.ZodEmail;
1718
- }, z.core.$strict>, z.ZodObject<{
1719
- type: z.ZodLiteral<"organization">;
1720
- }, z.core.$strict>], "type">;
1721
- verb: z.ZodEnum<{
1722
- read: "read";
1723
- write: "write";
1724
- execute: "execute";
1725
- share: "share";
1726
- }>;
1727
- expiresAt: z.ZodNullable<z.ZodISODateTime>;
1728
- createdBy: z.ZodString;
1729
- createdAt: z.ZodISODateTime;
1730
- }, z.core.$strict>;
1731
- export type ResourceGrant = z.infer<typeof ResourceGrant>;
1732
- export declare const ShareInput: z.ZodObject<{
1733
- resourceId: z.ZodString;
1734
- principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
1735
- type: z.ZodLiteral<"user">;
1736
- id: z.ZodString;
1737
- }, z.core.$strict>, z.ZodObject<{
1738
- type: z.ZodLiteral<"email">;
1739
- email: z.ZodEmail;
1740
- }, z.core.$strict>, z.ZodObject<{
1741
- type: z.ZodLiteral<"organization">;
1742
- }, z.core.$strict>], "type">;
1743
- verb: z.ZodEnum<{
1744
- read: "read";
1745
- write: "write";
1746
- execute: "execute";
1747
- share: "share";
1748
- }>;
1749
- expiresAt: z.ZodDefault<z.ZodNullable<z.ZodISODateTime>>;
1750
- idempotencyKey: z.ZodString;
1751
- }, z.core.$strict>;
1752
- export type ShareInput = z.infer<typeof ShareInput>;
1753
- export declare const RevokeGrantInput: z.ZodObject<{
1754
- resourceId: z.ZodString;
1755
- grantId: z.ZodString;
1756
- idempotencyKey: z.ZodString;
1757
- }, z.core.$strict>;
1758
- export type RevokeGrantInput = z.infer<typeof RevokeGrantInput>;
1759
- export declare const UnreadableNodes: z.ZodObject<{
1760
- titles: z.ZodArray<z.ZodString>;
1761
- hidden: z.ZodNumber;
1762
- }, z.core.$strict>;
1763
- export type UnreadableNodes = z.infer<typeof UnreadableNodes>;
1764
- export declare const ShareResult: z.ZodObject<{
1765
- grant: z.ZodObject<{
1766
- id: z.ZodString;
1767
- resourceId: z.ZodString;
1768
- principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
1769
- type: z.ZodLiteral<"user">;
1770
- id: z.ZodString;
1771
- }, z.core.$strict>, z.ZodObject<{
1772
- type: z.ZodLiteral<"email">;
1773
- email: z.ZodEmail;
1774
- }, z.core.$strict>, z.ZodObject<{
1775
- type: z.ZodLiteral<"organization">;
1776
- }, z.core.$strict>], "type">;
1777
- verb: z.ZodEnum<{
1778
- read: "read";
1779
- write: "write";
1780
- execute: "execute";
1781
- share: "share";
1782
- }>;
1783
- expiresAt: z.ZodNullable<z.ZodISODateTime>;
1784
- createdBy: z.ZodString;
1785
- createdAt: z.ZodISODateTime;
1786
- }, z.core.$strict>;
1787
- unreadable: z.ZodObject<{
1788
- titles: z.ZodArray<z.ZodString>;
1789
- hidden: z.ZodNumber;
1790
- }, z.core.$strict>;
1791
- }, z.core.$strict>;
1792
- export type ShareResult = z.infer<typeof ShareResult>;
1793
- export declare const ResourceGrantList: z.ZodObject<{
1794
- resourceId: z.ZodString;
1795
- applicableVerbs: z.ZodArray<z.ZodEnum<{
1796
- read: "read";
1797
- write: "write";
1798
- execute: "execute";
1799
- share: "share";
1800
- }>>;
1801
- items: z.ZodArray<z.ZodObject<{
1802
- id: z.ZodString;
1803
- resourceId: z.ZodString;
1804
- principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
1805
- type: z.ZodLiteral<"user">;
1806
- id: z.ZodString;
1807
- }, z.core.$strict>, z.ZodObject<{
1808
- type: z.ZodLiteral<"email">;
1809
- email: z.ZodEmail;
1810
- }, z.core.$strict>, z.ZodObject<{
1811
- type: z.ZodLiteral<"organization">;
1812
- }, z.core.$strict>], "type">;
1813
- verb: z.ZodEnum<{
1814
- read: "read";
1815
- write: "write";
1816
- execute: "execute";
1817
- share: "share";
1818
- }>;
1819
- expiresAt: z.ZodNullable<z.ZodISODateTime>;
1820
- createdBy: z.ZodString;
1821
- createdAt: z.ZodISODateTime;
1822
- }, z.core.$strict>>;
1823
- }, z.core.$strict>;
1824
- export type ResourceGrantList = z.infer<typeof ResourceGrantList>;
1825
- export declare const SearchInput: z.ZodObject<{
1826
- query: z.ZodString;
1827
- limit: z.ZodDefault<z.ZodNumber>;
1828
- scopeId: z.ZodOptional<z.ZodString>;
1829
- }, z.core.$strict>;
1830
- export type SearchInput = z.infer<typeof SearchInput>;
1831
- export declare const NodeCitation: z.ZodObject<{
1832
- nodeId: z.ZodString;
1833
- versionId: z.ZodString;
1834
- title: z.ZodString;
1835
- passage: z.ZodString;
1836
- source: z.ZodString;
1837
- freshness: z.ZodISODateTime;
1838
- score: z.ZodNumber;
1839
- match: z.ZodEnum<{
1840
- lexical: "lexical";
1841
- semantic: "semantic";
1842
- hybrid: "hybrid";
1843
- }>;
1844
- }, z.core.$strict>;
1845
- export type NodeCitation = z.infer<typeof NodeCitation>;
1846
- export declare const SearchResult: z.ZodObject<{
1847
- items: z.ZodArray<z.ZodObject<{
1848
- nodeId: z.ZodString;
1849
- versionId: z.ZodString;
1850
- title: z.ZodString;
1851
- passage: z.ZodString;
1852
- source: z.ZodString;
1853
- freshness: z.ZodISODateTime;
1854
- score: z.ZodNumber;
1855
- match: z.ZodEnum<{
1856
- lexical: "lexical";
1857
- semantic: "semantic";
1858
- hybrid: "hybrid";
1859
- }>;
1860
- }, z.core.$strict>>;
1861
- }, z.core.$strict>;
1862
- export type SearchResult = z.infer<typeof SearchResult>;
1863
- export declare const ReindexResult: z.ZodObject<{
1864
- queued: z.ZodNumber;
1865
- }, z.core.$strict>;
1866
- export type ReindexResult = z.infer<typeof ReindexResult>;
1867
- export declare const RevokeGrantResult: z.ZodObject<{
1868
- revoked: z.ZodBoolean;
1869
- }, z.core.$strict>;
1870
- export type RevokeGrantResult = z.infer<typeof RevokeGrantResult>;
1871
- export declare const ToolSourceUrl: z.ZodURL;
1872
- export declare const ToolName: z.ZodString;
1873
- export declare const ToolAnnotations: z.ZodObject<{
1874
- title: z.ZodOptional<z.ZodString>;
1875
- readOnlyHint: z.ZodOptional<z.ZodBoolean>;
1876
- destructiveHint: z.ZodOptional<z.ZodBoolean>;
1877
- idempotentHint: z.ZodOptional<z.ZodBoolean>;
1878
- openWorldHint: z.ZodOptional<z.ZodBoolean>;
1879
- }, z.core.$strict>;
1880
- export type ToolAnnotations = z.infer<typeof ToolAnnotations>;
1881
- export declare const ToolCapability: z.ZodObject<{
1882
- name: z.ZodString;
1883
- title: z.ZodNullable<z.ZodString>;
1884
- description: z.ZodNullable<z.ZodString>;
1885
- inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1886
- outputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1887
- annotations: z.ZodObject<{
1888
- title: z.ZodOptional<z.ZodString>;
1889
- readOnlyHint: z.ZodOptional<z.ZodBoolean>;
1890
- destructiveHint: z.ZodOptional<z.ZodBoolean>;
1891
- idempotentHint: z.ZodOptional<z.ZodBoolean>;
1892
- openWorldHint: z.ZodOptional<z.ZodBoolean>;
1893
- }, z.core.$strict>;
1894
- fingerprint: z.ZodString;
1895
- }, z.core.$strict>;
1896
- export type ToolCapability = z.infer<typeof ToolCapability>;
1897
- export declare const ToolCatalog: z.ZodObject<{
1898
- portalConnected: z.ZodBoolean;
1899
- items: z.ZodArray<z.ZodObject<{
1900
- name: z.ZodString;
1901
- title: z.ZodNullable<z.ZodString>;
1902
- description: z.ZodNullable<z.ZodString>;
1903
- inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1904
- outputSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1905
- annotations: z.ZodObject<{
1906
- title: z.ZodOptional<z.ZodString>;
1907
- readOnlyHint: z.ZodOptional<z.ZodBoolean>;
1908
- destructiveHint: z.ZodOptional<z.ZodBoolean>;
1909
- idempotentHint: z.ZodOptional<z.ZodBoolean>;
1910
- openWorldHint: z.ZodOptional<z.ZodBoolean>;
1911
- }, z.core.$strict>;
1912
- fingerprint: z.ZodString;
1913
- }, z.core.$strict>>;
1914
- reached: z.ZodOptional<z.ZodArray<z.ZodString>>;
1915
- }, z.core.$strict>;
1916
- export type ToolCatalog = z.infer<typeof ToolCatalog>;
1917
- /**
1918
- * One MCP server the asking user reaches right now, as the portal itself names it (D30).
1919
- *
1920
- * ⚠️ `toolCount` is a fact about this moment and this user, not a size. It exists so a picker can
1921
- * say "9 tools" instead of showing a handle alone, and it must never be read as what an agent will
1922
- * get: the delegated run asks the portal again, with the delegator's token.
1923
- */
1924
- export declare const ToolServer: z.ZodObject<{
1925
- handle: z.ZodString;
1926
- name: z.ZodString;
1927
- toolCount: z.ZodNumber;
1928
- }, z.core.$strict>;
1929
- export type ToolServer = z.infer<typeof ToolServer>;
1930
- export declare const ToolServerCatalog: z.ZodObject<{
1931
- portalConnected: z.ZodBoolean;
1932
- items: z.ZodArray<z.ZodObject<{
1933
- handle: z.ZodString;
1934
- name: z.ZodString;
1935
- toolCount: z.ZodNumber;
1936
- }, z.core.$strict>>;
1937
- }, z.core.$strict>;
1938
- export type ToolServerCatalog = z.infer<typeof ToolServerCatalog>;
1939
- /**
1940
- * Which of the named servers a tool belongs to, or `null` for none of them.
1941
- *
1942
- * ⚠️ THE TRAP: a tool name does not say where its server name ends.
1943
- *
1944
- * The portal writes `<server>_<tool>`, and both halves may contain underscores — `intel_flow_get`
1945
- * reads equally well as server `intel` with tool `flow_get` and as a server called `intel_flow`
1946
- * with tool `get`. Splitting on the first underscore is therefore a guess that is wrong the day
1947
- * somebody adds a server whose name contains one, and on the API side being wrong means an agent
1948
- * delegated server A quietly reaching server B.
1949
- *
1950
- * So the prefix is never split. It is only ever MATCHED against handles the portal itself named,
1951
- * and the longest match wins: with `intel` and `intel_flow` both declared, `intel_flow_get` belongs
1952
- * to `intel_flow`, which is the only reading in which both declarations stay true.
1953
- *
1954
- * ⚠️ This lives in the contract because HOW A NAME IS READ is a property of the wire, and both
1955
- * surfaces read the same wire: `packages/api` cuts a delegation with it, `packages/ui` groups the
1956
- * tools screen with it (#212). A second implementation in the browser would be the third answer to
1957
- * one question — the underscore rule has already been answered differently in two places once
1958
- * (#106, #107), and the copies disagreed. What deliberately stays OUT of here is everything about
1959
- * reach: which handles are declared, which are enabled, which may be delegated and which one owns
1960
- * the portal's own management tools are decisions with consequences, and they belong to
1961
- * `packages/api/src/tools/tool-servers`. This function only reads a name.
1962
- */
1963
- export declare function serverOf(toolName: string, handles: Iterable<string>): string | null;
1964
- export declare const TestToolInput: z.ZodObject<{
1965
- name: z.ZodString;
1966
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1967
- }, z.core.$strict>;
1968
- export type TestToolInput = z.infer<typeof TestToolInput>;
1969
- export declare const ExecuteToolInput: z.ZodObject<{
1970
- name: z.ZodString;
1971
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1972
- }, z.core.$strict>;
1973
- export type ExecuteToolInput = z.infer<typeof ExecuteToolInput>;
1974
- export declare const ToolTestResult: z.ZodObject<{
1975
- isError: z.ZodBoolean;
1976
- content: z.ZodArray<z.ZodUnknown>;
1977
- structuredContent: z.ZodOptional<z.ZodUnknown>;
1978
- }, z.core.$strict>;
1979
- export type ToolTestResult = z.infer<typeof ToolTestResult>;
1980
- export declare const FlowNodeId: z.ZodString;
1981
- export declare const FlowPosition: z.ZodObject<{
1982
- x: z.ZodNumber;
1983
- y: z.ZodNumber;
1984
- }, z.core.$strict>;
1985
- export declare const SubflowVersionMode: z.ZodEnum<{
1986
- latest: "latest";
1987
- follows: "follows";
1988
- pinned: "pinned";
1989
- }>;
1990
- export type SubflowVersionMode = z.infer<typeof SubflowVersionMode>;
1991
- export declare const SubflowVersion: z.ZodDiscriminatedUnion<[z.ZodObject<{
1992
- mode: z.ZodLiteral<"latest">;
1993
- }, z.core.$strict>, z.ZodObject<{
1994
- mode: z.ZodLiteral<"follows">;
1995
- }, z.core.$strict>, z.ZodObject<{
1996
- mode: z.ZodLiteral<"pinned">;
1997
- versionId: z.ZodString;
1998
- }, z.core.$strict>], "mode">;
1999
- export type SubflowVersion = z.infer<typeof SubflowVersion>;
2000
- export declare const FlowNodeLayer: z.ZodEnum<{
2001
- marker: "marker";
2002
- step: "step";
2003
- link: "link";
2004
- }>;
2005
- export type FlowNodeLayer = z.infer<typeof FlowNodeLayer>;
2006
- export declare const flowNodeLayer: {
2007
- readonly trigger: "marker";
2008
- readonly output: "marker";
2009
- readonly instruction: "step";
2010
- readonly condition: "step";
2011
- readonly subflow: "step";
2012
- readonly folder: "link";
2013
- readonly document: "link";
2014
- readonly upload: "link";
2015
- readonly table: "link";
2016
- readonly tool: "link";
2017
- };
2018
- export declare const FlowNode: z.ZodDiscriminatedUnion<[z.ZodObject<{
2019
- kind: z.ZodLiteral<"trigger">;
2020
- configuration: z.ZodObject<{
2021
- mode: z.ZodLiteral<"manual">;
2022
- }, z.core.$strict>;
2023
- id: z.ZodString;
2024
- position: z.ZodObject<{
2025
- x: z.ZodNumber;
2026
- y: z.ZodNumber;
2027
- }, z.core.$strict>;
2028
- label: z.ZodString;
2029
- }, z.core.$strict>, z.ZodObject<{
2030
- kind: z.ZodLiteral<"instruction">;
2031
- configuration: z.ZodObject<{
2032
- prompt: z.ZodString;
2033
- }, z.core.$strict>;
2034
- id: z.ZodString;
2035
- position: z.ZodObject<{
2036
- x: z.ZodNumber;
2037
- y: z.ZodNumber;
2038
- }, z.core.$strict>;
2039
- label: z.ZodString;
2040
- }, z.core.$strict>, z.ZodObject<{
2041
- kind: z.ZodLiteral<"folder">;
2042
- configuration: z.ZodObject<{
2043
- resourceId: z.ZodString;
2044
- }, z.core.$strict>;
2045
- id: z.ZodString;
2046
- position: z.ZodObject<{
2047
- x: z.ZodNumber;
2048
- y: z.ZodNumber;
2049
- }, z.core.$strict>;
2050
- label: z.ZodString;
2051
- }, z.core.$strict>, z.ZodObject<{
2052
- kind: z.ZodLiteral<"document">;
2053
- configuration: z.ZodObject<{
2054
- resourceId: z.ZodString;
2055
- }, z.core.$strict>;
2056
- id: z.ZodString;
2057
- position: z.ZodObject<{
2058
- x: z.ZodNumber;
2059
- y: z.ZodNumber;
2060
- }, z.core.$strict>;
2061
- label: z.ZodString;
2062
- }, z.core.$strict>, z.ZodObject<{
2063
- kind: z.ZodLiteral<"upload">;
2064
- configuration: z.ZodObject<{
2065
- resourceId: z.ZodString;
2066
- }, z.core.$strict>;
2067
- id: z.ZodString;
2068
- position: z.ZodObject<{
2069
- x: z.ZodNumber;
2070
- y: z.ZodNumber;
2071
- }, z.core.$strict>;
2072
- label: z.ZodString;
2073
- }, z.core.$strict>, z.ZodObject<{
2074
- kind: z.ZodLiteral<"table">;
2075
- configuration: z.ZodObject<{
2076
- resourceId: z.ZodString;
2077
- }, z.core.$strict>;
2078
- id: z.ZodString;
2079
- position: z.ZodObject<{
2080
- x: z.ZodNumber;
2081
- y: z.ZodNumber;
2082
- }, z.core.$strict>;
2083
- label: z.ZodString;
2084
- }, z.core.$strict>, z.ZodObject<{
2085
- kind: z.ZodLiteral<"tool">;
2086
- configuration: z.ZodObject<{
2087
- toolName: z.ZodString;
2088
- fingerprint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2089
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2090
- }, z.core.$strict>;
2091
- id: z.ZodString;
2092
- position: z.ZodObject<{
2093
- x: z.ZodNumber;
2094
- y: z.ZodNumber;
2095
- }, z.core.$strict>;
2096
- label: z.ZodString;
2097
- }, z.core.$strict>, z.ZodObject<{
2098
- kind: z.ZodLiteral<"condition">;
2099
- configuration: z.ZodObject<{
2100
- mode: z.ZodLiteral<"semantic">;
2101
- instruction: z.ZodString;
2102
- }, z.core.$strict>;
2103
- id: z.ZodString;
2104
- position: z.ZodObject<{
2105
- x: z.ZodNumber;
2106
- y: z.ZodNumber;
2107
- }, z.core.$strict>;
2108
- label: z.ZodString;
2109
- }, z.core.$strict>, z.ZodObject<{
2110
- kind: z.ZodLiteral<"subflow">;
2111
- configuration: z.ZodObject<{
2112
- flowId: z.ZodString;
2113
- version: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
2114
- mode: z.ZodLiteral<"latest">;
2115
- }, z.core.$strict>, z.ZodObject<{
2116
- mode: z.ZodLiteral<"follows">;
2117
- }, z.core.$strict>, z.ZodObject<{
2118
- mode: z.ZodLiteral<"pinned">;
2119
- versionId: z.ZodString;
2120
- }, z.core.$strict>], "mode">>;
2121
- }, z.core.$strict>;
2122
- id: z.ZodString;
2123
- position: z.ZodObject<{
2124
- x: z.ZodNumber;
2125
- y: z.ZodNumber;
2126
- }, z.core.$strict>;
2127
- label: z.ZodString;
2128
- }, z.core.$strict>, z.ZodObject<{
2129
- kind: z.ZodLiteral<"output">;
2130
- configuration: z.ZodObject<{}, z.core.$strict>;
2131
- id: z.ZodString;
2132
- position: z.ZodObject<{
2133
- x: z.ZodNumber;
2134
- y: z.ZodNumber;
2135
- }, z.core.$strict>;
2136
- label: z.ZodString;
2137
- }, z.core.$strict>], "kind">;
2138
- export type FlowNode = z.infer<typeof FlowNode>;
2139
- export declare const FlowEdgeKind: z.ZodEnum<{
2140
- flow: "flow";
2141
- context: "context";
2142
- }>;
2143
- export type FlowEdgeKind = z.infer<typeof FlowEdgeKind>;
2144
- export declare const FlowEdge: z.ZodObject<{
2145
- id: z.ZodString;
2146
- source: z.ZodString;
2147
- target: z.ZodString;
2148
- kind: z.ZodDefault<z.ZodEnum<{
2149
- flow: "flow";
2150
- context: "context";
2151
- }>>;
2152
- label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2153
- sourceHandle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2154
- }, z.core.$strict>;
2155
- export type FlowEdge = z.infer<typeof FlowEdge>;
2156
- export declare const FlowGraph: z.ZodObject<{
2157
- nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2158
- kind: z.ZodLiteral<"trigger">;
2159
- configuration: z.ZodObject<{
2160
- mode: z.ZodLiteral<"manual">;
2161
- }, z.core.$strict>;
2162
- id: z.ZodString;
2163
- position: z.ZodObject<{
2164
- x: z.ZodNumber;
2165
- y: z.ZodNumber;
2166
- }, z.core.$strict>;
2167
- label: z.ZodString;
2168
- }, z.core.$strict>, z.ZodObject<{
2169
- kind: z.ZodLiteral<"instruction">;
2170
- configuration: z.ZodObject<{
2171
- prompt: z.ZodString;
2172
- }, z.core.$strict>;
2173
- id: z.ZodString;
2174
- position: z.ZodObject<{
2175
- x: z.ZodNumber;
2176
- y: z.ZodNumber;
2177
- }, z.core.$strict>;
2178
- label: z.ZodString;
2179
- }, z.core.$strict>, z.ZodObject<{
2180
- kind: z.ZodLiteral<"folder">;
2181
- configuration: z.ZodObject<{
2182
- resourceId: z.ZodString;
2183
- }, z.core.$strict>;
2184
- id: z.ZodString;
2185
- position: z.ZodObject<{
2186
- x: z.ZodNumber;
2187
- y: z.ZodNumber;
2188
- }, z.core.$strict>;
2189
- label: z.ZodString;
2190
- }, z.core.$strict>, z.ZodObject<{
2191
- kind: z.ZodLiteral<"document">;
2192
- configuration: z.ZodObject<{
2193
- resourceId: z.ZodString;
2194
- }, z.core.$strict>;
2195
- id: z.ZodString;
2196
- position: z.ZodObject<{
2197
- x: z.ZodNumber;
2198
- y: z.ZodNumber;
2199
- }, z.core.$strict>;
2200
- label: z.ZodString;
2201
- }, z.core.$strict>, z.ZodObject<{
2202
- kind: z.ZodLiteral<"upload">;
2203
- configuration: z.ZodObject<{
2204
- resourceId: z.ZodString;
2205
- }, z.core.$strict>;
2206
- id: z.ZodString;
2207
- position: z.ZodObject<{
2208
- x: z.ZodNumber;
2209
- y: z.ZodNumber;
2210
- }, z.core.$strict>;
2211
- label: z.ZodString;
2212
- }, z.core.$strict>, z.ZodObject<{
2213
- kind: z.ZodLiteral<"table">;
2214
- configuration: z.ZodObject<{
2215
- resourceId: z.ZodString;
2216
- }, z.core.$strict>;
2217
- id: z.ZodString;
2218
- position: z.ZodObject<{
2219
- x: z.ZodNumber;
2220
- y: z.ZodNumber;
2221
- }, z.core.$strict>;
2222
- label: z.ZodString;
2223
- }, z.core.$strict>, z.ZodObject<{
2224
- kind: z.ZodLiteral<"tool">;
2225
- configuration: z.ZodObject<{
2226
- toolName: z.ZodString;
2227
- fingerprint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2228
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2229
- }, z.core.$strict>;
2230
- id: z.ZodString;
2231
- position: z.ZodObject<{
2232
- x: z.ZodNumber;
2233
- y: z.ZodNumber;
2234
- }, z.core.$strict>;
2235
- label: z.ZodString;
2236
- }, z.core.$strict>, z.ZodObject<{
2237
- kind: z.ZodLiteral<"condition">;
2238
- configuration: z.ZodObject<{
2239
- mode: z.ZodLiteral<"semantic">;
2240
- instruction: z.ZodString;
2241
- }, z.core.$strict>;
2242
- id: z.ZodString;
2243
- position: z.ZodObject<{
2244
- x: z.ZodNumber;
2245
- y: z.ZodNumber;
2246
- }, z.core.$strict>;
2247
- label: z.ZodString;
2248
- }, z.core.$strict>, z.ZodObject<{
2249
- kind: z.ZodLiteral<"subflow">;
2250
- configuration: z.ZodObject<{
2251
- flowId: z.ZodString;
2252
- version: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
2253
- mode: z.ZodLiteral<"latest">;
2254
- }, z.core.$strict>, z.ZodObject<{
2255
- mode: z.ZodLiteral<"follows">;
2256
- }, z.core.$strict>, z.ZodObject<{
2257
- mode: z.ZodLiteral<"pinned">;
2258
- versionId: z.ZodString;
2259
- }, z.core.$strict>], "mode">>;
2260
- }, z.core.$strict>;
2261
- id: z.ZodString;
2262
- position: z.ZodObject<{
2263
- x: z.ZodNumber;
2264
- y: z.ZodNumber;
2265
- }, z.core.$strict>;
2266
- label: z.ZodString;
2267
- }, z.core.$strict>, z.ZodObject<{
2268
- kind: z.ZodLiteral<"output">;
2269
- configuration: z.ZodObject<{}, z.core.$strict>;
2270
- id: z.ZodString;
2271
- position: z.ZodObject<{
2272
- x: z.ZodNumber;
2273
- y: z.ZodNumber;
2274
- }, z.core.$strict>;
2275
- label: z.ZodString;
2276
- }, z.core.$strict>], "kind">>;
2277
- edges: z.ZodArray<z.ZodObject<{
2278
- id: z.ZodString;
2279
- source: z.ZodString;
2280
- target: z.ZodString;
2281
- kind: z.ZodDefault<z.ZodEnum<{
2282
- flow: "flow";
2283
- context: "context";
2284
- }>>;
2285
- label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2286
- sourceHandle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2287
- }, z.core.$strict>>;
2288
- }, z.core.$strict>;
2289
- export type FlowGraph = z.infer<typeof FlowGraph>;
2290
- export declare const Flow: z.ZodObject<{
2291
- id: z.ZodString;
2292
- parentId: z.ZodNullable<z.ZodString>;
2293
- title: z.ZodString;
2294
- description: z.ZodNullable<z.ZodString>;
2295
- ownerId: z.ZodString;
2296
- currentVersionId: z.ZodNullable<z.ZodString>;
2297
- publishedVersionId: z.ZodNullable<z.ZodString>;
2298
- createdAt: z.ZodISODateTime;
2299
- updatedAt: z.ZodISODateTime;
2300
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
2301
- }, z.core.$strict>;
2302
- export type Flow = z.infer<typeof Flow>;
2303
- export declare const FlowVersion: z.ZodObject<{
2304
- id: z.ZodString;
2305
- flowId: z.ZodString;
2306
- sequence: z.ZodNumber;
2307
- graph: z.ZodObject<{
2308
- nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2309
- kind: z.ZodLiteral<"trigger">;
2310
- configuration: z.ZodObject<{
2311
- mode: z.ZodLiteral<"manual">;
2312
- }, z.core.$strict>;
2313
- id: z.ZodString;
2314
- position: z.ZodObject<{
2315
- x: z.ZodNumber;
2316
- y: z.ZodNumber;
2317
- }, z.core.$strict>;
2318
- label: z.ZodString;
2319
- }, z.core.$strict>, z.ZodObject<{
2320
- kind: z.ZodLiteral<"instruction">;
2321
- configuration: z.ZodObject<{
2322
- prompt: z.ZodString;
2323
- }, z.core.$strict>;
2324
- id: z.ZodString;
2325
- position: z.ZodObject<{
2326
- x: z.ZodNumber;
2327
- y: z.ZodNumber;
2328
- }, z.core.$strict>;
2329
- label: z.ZodString;
2330
- }, z.core.$strict>, z.ZodObject<{
2331
- kind: z.ZodLiteral<"folder">;
2332
- configuration: z.ZodObject<{
2333
- resourceId: z.ZodString;
2334
- }, z.core.$strict>;
2335
- id: z.ZodString;
2336
- position: z.ZodObject<{
2337
- x: z.ZodNumber;
2338
- y: z.ZodNumber;
2339
- }, z.core.$strict>;
2340
- label: z.ZodString;
2341
- }, z.core.$strict>, z.ZodObject<{
2342
- kind: z.ZodLiteral<"document">;
2343
- configuration: z.ZodObject<{
2344
- resourceId: z.ZodString;
2345
- }, z.core.$strict>;
2346
- id: z.ZodString;
2347
- position: z.ZodObject<{
2348
- x: z.ZodNumber;
2349
- y: z.ZodNumber;
2350
- }, z.core.$strict>;
2351
- label: z.ZodString;
2352
- }, z.core.$strict>, z.ZodObject<{
2353
- kind: z.ZodLiteral<"upload">;
2354
- configuration: z.ZodObject<{
2355
- resourceId: z.ZodString;
2356
- }, z.core.$strict>;
2357
- id: z.ZodString;
2358
- position: z.ZodObject<{
2359
- x: z.ZodNumber;
2360
- y: z.ZodNumber;
2361
- }, z.core.$strict>;
2362
- label: z.ZodString;
2363
- }, z.core.$strict>, z.ZodObject<{
2364
- kind: z.ZodLiteral<"table">;
2365
- configuration: z.ZodObject<{
2366
- resourceId: z.ZodString;
2367
- }, z.core.$strict>;
2368
- id: z.ZodString;
2369
- position: z.ZodObject<{
2370
- x: z.ZodNumber;
2371
- y: z.ZodNumber;
2372
- }, z.core.$strict>;
2373
- label: z.ZodString;
2374
- }, z.core.$strict>, z.ZodObject<{
2375
- kind: z.ZodLiteral<"tool">;
2376
- configuration: z.ZodObject<{
2377
- toolName: z.ZodString;
2378
- fingerprint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2379
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2380
- }, z.core.$strict>;
2381
- id: z.ZodString;
2382
- position: z.ZodObject<{
2383
- x: z.ZodNumber;
2384
- y: z.ZodNumber;
2385
- }, z.core.$strict>;
2386
- label: z.ZodString;
2387
- }, z.core.$strict>, z.ZodObject<{
2388
- kind: z.ZodLiteral<"condition">;
2389
- configuration: z.ZodObject<{
2390
- mode: z.ZodLiteral<"semantic">;
2391
- instruction: z.ZodString;
2392
- }, z.core.$strict>;
2393
- id: z.ZodString;
2394
- position: z.ZodObject<{
2395
- x: z.ZodNumber;
2396
- y: z.ZodNumber;
2397
- }, z.core.$strict>;
2398
- label: z.ZodString;
2399
- }, z.core.$strict>, z.ZodObject<{
2400
- kind: z.ZodLiteral<"subflow">;
2401
- configuration: z.ZodObject<{
2402
- flowId: z.ZodString;
2403
- version: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
2404
- mode: z.ZodLiteral<"latest">;
2405
- }, z.core.$strict>, z.ZodObject<{
2406
- mode: z.ZodLiteral<"follows">;
2407
- }, z.core.$strict>, z.ZodObject<{
2408
- mode: z.ZodLiteral<"pinned">;
2409
- versionId: z.ZodString;
2410
- }, z.core.$strict>], "mode">>;
2411
- }, z.core.$strict>;
2412
- id: z.ZodString;
2413
- position: z.ZodObject<{
2414
- x: z.ZodNumber;
2415
- y: z.ZodNumber;
2416
- }, z.core.$strict>;
2417
- label: z.ZodString;
2418
- }, z.core.$strict>, z.ZodObject<{
2419
- kind: z.ZodLiteral<"output">;
2420
- configuration: z.ZodObject<{}, z.core.$strict>;
2421
- id: z.ZodString;
2422
- position: z.ZodObject<{
2423
- x: z.ZodNumber;
2424
- y: z.ZodNumber;
2425
- }, z.core.$strict>;
2426
- label: z.ZodString;
2427
- }, z.core.$strict>], "kind">>;
2428
- edges: z.ZodArray<z.ZodObject<{
2429
- id: z.ZodString;
2430
- source: z.ZodString;
2431
- target: z.ZodString;
2432
- kind: z.ZodDefault<z.ZodEnum<{
2433
- flow: "flow";
2434
- context: "context";
2435
- }>>;
2436
- label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2437
- sourceHandle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2438
- }, z.core.$strict>>;
2439
- }, z.core.$strict>;
2440
- createdBy: z.ZodString;
2441
- createdAt: z.ZodISODateTime;
2442
- }, z.core.$strict>;
2443
- export type FlowVersion = z.infer<typeof FlowVersion>;
2444
- export declare const FlowDocument: z.ZodObject<{
2445
- flow: z.ZodObject<{
2446
- id: z.ZodString;
2447
- parentId: z.ZodNullable<z.ZodString>;
2448
- title: z.ZodString;
2449
- description: z.ZodNullable<z.ZodString>;
2450
- ownerId: z.ZodString;
2451
- currentVersionId: z.ZodNullable<z.ZodString>;
2452
- publishedVersionId: z.ZodNullable<z.ZodString>;
2453
- createdAt: z.ZodISODateTime;
2454
- updatedAt: z.ZodISODateTime;
2455
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
2456
- }, z.core.$strict>;
2457
- version: z.ZodNullable<z.ZodObject<{
2458
- id: z.ZodString;
2459
- flowId: z.ZodString;
2460
- sequence: z.ZodNumber;
2461
- graph: z.ZodObject<{
2462
- nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2463
- kind: z.ZodLiteral<"trigger">;
2464
- configuration: z.ZodObject<{
2465
- mode: z.ZodLiteral<"manual">;
2466
- }, z.core.$strict>;
2467
- id: z.ZodString;
2468
- position: z.ZodObject<{
2469
- x: z.ZodNumber;
2470
- y: z.ZodNumber;
2471
- }, z.core.$strict>;
2472
- label: z.ZodString;
2473
- }, z.core.$strict>, z.ZodObject<{
2474
- kind: z.ZodLiteral<"instruction">;
2475
- configuration: z.ZodObject<{
2476
- prompt: z.ZodString;
2477
- }, z.core.$strict>;
2478
- id: z.ZodString;
2479
- position: z.ZodObject<{
2480
- x: z.ZodNumber;
2481
- y: z.ZodNumber;
2482
- }, z.core.$strict>;
2483
- label: z.ZodString;
2484
- }, z.core.$strict>, z.ZodObject<{
2485
- kind: z.ZodLiteral<"folder">;
2486
- configuration: z.ZodObject<{
2487
- resourceId: z.ZodString;
2488
- }, z.core.$strict>;
2489
- id: z.ZodString;
2490
- position: z.ZodObject<{
2491
- x: z.ZodNumber;
2492
- y: z.ZodNumber;
2493
- }, z.core.$strict>;
2494
- label: z.ZodString;
2495
- }, z.core.$strict>, z.ZodObject<{
2496
- kind: z.ZodLiteral<"document">;
2497
- configuration: z.ZodObject<{
2498
- resourceId: z.ZodString;
2499
- }, z.core.$strict>;
2500
- id: z.ZodString;
2501
- position: z.ZodObject<{
2502
- x: z.ZodNumber;
2503
- y: z.ZodNumber;
2504
- }, z.core.$strict>;
2505
- label: z.ZodString;
2506
- }, z.core.$strict>, z.ZodObject<{
2507
- kind: z.ZodLiteral<"upload">;
2508
- configuration: z.ZodObject<{
2509
- resourceId: z.ZodString;
2510
- }, z.core.$strict>;
2511
- id: z.ZodString;
2512
- position: z.ZodObject<{
2513
- x: z.ZodNumber;
2514
- y: z.ZodNumber;
2515
- }, z.core.$strict>;
2516
- label: z.ZodString;
2517
- }, z.core.$strict>, z.ZodObject<{
2518
- kind: z.ZodLiteral<"table">;
2519
- configuration: z.ZodObject<{
2520
- resourceId: z.ZodString;
2521
- }, z.core.$strict>;
2522
- id: z.ZodString;
2523
- position: z.ZodObject<{
2524
- x: z.ZodNumber;
2525
- y: z.ZodNumber;
2526
- }, z.core.$strict>;
2527
- label: z.ZodString;
2528
- }, z.core.$strict>, z.ZodObject<{
2529
- kind: z.ZodLiteral<"tool">;
2530
- configuration: z.ZodObject<{
2531
- toolName: z.ZodString;
2532
- fingerprint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2533
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2534
- }, z.core.$strict>;
2535
- id: z.ZodString;
2536
- position: z.ZodObject<{
2537
- x: z.ZodNumber;
2538
- y: z.ZodNumber;
2539
- }, z.core.$strict>;
2540
- label: z.ZodString;
2541
- }, z.core.$strict>, z.ZodObject<{
2542
- kind: z.ZodLiteral<"condition">;
2543
- configuration: z.ZodObject<{
2544
- mode: z.ZodLiteral<"semantic">;
2545
- instruction: z.ZodString;
2546
- }, z.core.$strict>;
2547
- id: z.ZodString;
2548
- position: z.ZodObject<{
2549
- x: z.ZodNumber;
2550
- y: z.ZodNumber;
2551
- }, z.core.$strict>;
2552
- label: z.ZodString;
2553
- }, z.core.$strict>, z.ZodObject<{
2554
- kind: z.ZodLiteral<"subflow">;
2555
- configuration: z.ZodObject<{
2556
- flowId: z.ZodString;
2557
- version: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
2558
- mode: z.ZodLiteral<"latest">;
2559
- }, z.core.$strict>, z.ZodObject<{
2560
- mode: z.ZodLiteral<"follows">;
2561
- }, z.core.$strict>, z.ZodObject<{
2562
- mode: z.ZodLiteral<"pinned">;
2563
- versionId: z.ZodString;
2564
- }, z.core.$strict>], "mode">>;
2565
- }, z.core.$strict>;
2566
- id: z.ZodString;
2567
- position: z.ZodObject<{
2568
- x: z.ZodNumber;
2569
- y: z.ZodNumber;
2570
- }, z.core.$strict>;
2571
- label: z.ZodString;
2572
- }, z.core.$strict>, z.ZodObject<{
2573
- kind: z.ZodLiteral<"output">;
2574
- configuration: z.ZodObject<{}, z.core.$strict>;
2575
- id: z.ZodString;
2576
- position: z.ZodObject<{
2577
- x: z.ZodNumber;
2578
- y: z.ZodNumber;
2579
- }, z.core.$strict>;
2580
- label: z.ZodString;
2581
- }, z.core.$strict>], "kind">>;
2582
- edges: z.ZodArray<z.ZodObject<{
2583
- id: z.ZodString;
2584
- source: z.ZodString;
2585
- target: z.ZodString;
2586
- kind: z.ZodDefault<z.ZodEnum<{
2587
- flow: "flow";
2588
- context: "context";
2589
- }>>;
2590
- label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2591
- sourceHandle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2592
- }, z.core.$strict>>;
2593
- }, z.core.$strict>;
2594
- createdBy: z.ZodString;
2595
- createdAt: z.ZodISODateTime;
2596
- }, z.core.$strict>>;
2597
- }, z.core.$strict>;
2598
- export type FlowDocument = z.infer<typeof FlowDocument>;
2599
- export declare const FlowVersionSummary: z.ZodObject<{
2600
- id: z.ZodString;
2601
- flowId: z.ZodString;
2602
- sequence: z.ZodNumber;
2603
- createdBy: z.ZodString;
2604
- createdAt: z.ZodISODateTime;
2605
- published: z.ZodBoolean;
2606
- }, z.core.$strict>;
2607
- export type FlowVersionSummary = z.infer<typeof FlowVersionSummary>;
2608
- export declare const FlowVersionList: z.ZodObject<{
2609
- flowId: z.ZodString;
2610
- items: z.ZodArray<z.ZodObject<{
2611
- id: z.ZodString;
2612
- flowId: z.ZodString;
2613
- sequence: z.ZodNumber;
2614
- createdBy: z.ZodString;
2615
- createdAt: z.ZodISODateTime;
2616
- published: z.ZodBoolean;
2617
- }, z.core.$strict>>;
2618
- }, z.core.$strict>;
2619
- export type FlowVersionList = z.infer<typeof FlowVersionList>;
2620
- export declare const GetFlowVersionInput: z.ZodObject<{
2621
- flowId: z.ZodString;
2622
- versionId: z.ZodString;
2623
- }, z.core.$strict>;
2624
- export type GetFlowVersionInput = z.infer<typeof GetFlowVersionInput>;
2625
- export declare const FlowList: z.ZodObject<{
2626
- items: z.ZodArray<z.ZodObject<{
2627
- id: z.ZodString;
2628
- parentId: z.ZodNullable<z.ZodString>;
2629
- title: z.ZodString;
2630
- description: z.ZodNullable<z.ZodString>;
2631
- ownerId: z.ZodString;
2632
- currentVersionId: z.ZodNullable<z.ZodString>;
2633
- publishedVersionId: z.ZodNullable<z.ZodString>;
2634
- createdAt: z.ZodISODateTime;
2635
- updatedAt: z.ZodISODateTime;
2636
- archivedAt: z.ZodNullable<z.ZodISODateTime>;
2637
- }, z.core.$strict>>;
2638
- withCalls: z.ZodDefault<z.ZodArray<z.ZodString>>;
2639
- }, z.core.$strict>;
2640
- export type FlowList = z.infer<typeof FlowList>;
2641
- export declare const ReferencedNode: z.ZodObject<{
2642
- id: z.ZodString;
2643
- title: z.ZodString;
2644
- }, z.core.$strict>;
2645
- export type ReferencedNode = z.infer<typeof ReferencedNode>;
2646
- export declare const FlowRequirements: z.ZodObject<{
2647
- flowId: z.ZodString;
2648
- versionId: z.ZodNullable<z.ZodString>;
2649
- nodes: z.ZodArray<z.ZodObject<{
2650
- id: z.ZodString;
2651
- title: z.ZodString;
2652
- }, z.core.$strict>>;
2653
- hiddenNodes: z.ZodNumber;
2654
- tools: z.ZodArray<z.ZodString>;
2655
- }, z.core.$strict>;
2656
- export type FlowRequirements = z.infer<typeof FlowRequirements>;
2657
- export declare const FlowValidation: z.ZodObject<{
2658
- flowId: z.ZodString;
2659
- versionId: z.ZodNullable<z.ZodString>;
2660
- problems: z.ZodArray<z.ZodObject<{
2661
- code: z.ZodString;
2662
- detail: z.ZodString;
2663
- }, z.core.$strict>>;
2664
- checkedAt: z.ZodISODateTime;
2665
- }, z.core.$strict>;
2666
- export type FlowValidation = z.infer<typeof FlowValidation>;
2667
- export declare const CreateFlowInput: z.ZodObject<{
2668
- parentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2669
- title: z.ZodString;
2670
- description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2671
- idempotencyKey: z.ZodString;
2672
- }, z.core.$strict>;
2673
- export type CreateFlowInput = z.infer<typeof CreateFlowInput>;
2674
- export declare const UpdateFlowInput: z.ZodObject<{
2675
- flowId: z.ZodString;
2676
- baseUpdatedAt: z.ZodISODateTime;
2677
- title: z.ZodOptional<z.ZodString>;
2678
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2679
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2680
- idempotencyKey: z.ZodString;
2681
- }, z.core.$strict>;
2682
- export type UpdateFlowInput = z.infer<typeof UpdateFlowInput>;
2683
- export declare const ArchiveFlowInput: z.ZodObject<{
2684
- flowId: z.ZodString;
2685
- baseUpdatedAt: z.ZodISODateTime;
2686
- archived: z.ZodBoolean;
2687
- idempotencyKey: z.ZodString;
2688
- }, z.core.$strict>;
2689
- export type ArchiveFlowInput = z.infer<typeof ArchiveFlowInput>;
2690
- export declare const ListFlowsInput: z.ZodObject<{
2691
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2692
- includeArchived: z.ZodOptional<z.ZodBoolean>;
2693
- archivedOnly: z.ZodOptional<z.ZodBoolean>;
2694
- }, z.core.$strict>;
2695
- export type ListFlowsInput = z.infer<typeof ListFlowsInput>;
2696
- export declare const GetFlowInput: z.ZodObject<{
2697
- flowId: z.ZodString;
2698
- }, z.core.$strict>;
2699
- export type GetFlowInput = z.infer<typeof GetFlowInput>;
2700
- export declare const SaveFlowVersionInput: z.ZodObject<{
2701
- flowId: z.ZodString;
2702
- baseVersionId: z.ZodNullable<z.ZodString>;
2703
- graph: z.ZodObject<{
2704
- nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2705
- kind: z.ZodLiteral<"trigger">;
2706
- configuration: z.ZodObject<{
2707
- mode: z.ZodLiteral<"manual">;
2708
- }, z.core.$strict>;
2709
- id: z.ZodString;
2710
- position: z.ZodObject<{
2711
- x: z.ZodNumber;
2712
- y: z.ZodNumber;
2713
- }, z.core.$strict>;
2714
- label: z.ZodString;
2715
- }, z.core.$strict>, z.ZodObject<{
2716
- kind: z.ZodLiteral<"instruction">;
2717
- configuration: z.ZodObject<{
2718
- prompt: z.ZodString;
2719
- }, z.core.$strict>;
2720
- id: z.ZodString;
2721
- position: z.ZodObject<{
2722
- x: z.ZodNumber;
2723
- y: z.ZodNumber;
2724
- }, z.core.$strict>;
2725
- label: z.ZodString;
2726
- }, z.core.$strict>, z.ZodObject<{
2727
- kind: z.ZodLiteral<"folder">;
2728
- configuration: z.ZodObject<{
2729
- resourceId: z.ZodString;
2730
- }, z.core.$strict>;
2731
- id: z.ZodString;
2732
- position: z.ZodObject<{
2733
- x: z.ZodNumber;
2734
- y: z.ZodNumber;
2735
- }, z.core.$strict>;
2736
- label: z.ZodString;
2737
- }, z.core.$strict>, z.ZodObject<{
2738
- kind: z.ZodLiteral<"document">;
2739
- configuration: z.ZodObject<{
2740
- resourceId: z.ZodString;
2741
- }, z.core.$strict>;
2742
- id: z.ZodString;
2743
- position: z.ZodObject<{
2744
- x: z.ZodNumber;
2745
- y: z.ZodNumber;
2746
- }, z.core.$strict>;
2747
- label: z.ZodString;
2748
- }, z.core.$strict>, z.ZodObject<{
2749
- kind: z.ZodLiteral<"upload">;
2750
- configuration: z.ZodObject<{
2751
- resourceId: z.ZodString;
2752
- }, z.core.$strict>;
2753
- id: z.ZodString;
2754
- position: z.ZodObject<{
2755
- x: z.ZodNumber;
2756
- y: z.ZodNumber;
2757
- }, z.core.$strict>;
2758
- label: z.ZodString;
2759
- }, z.core.$strict>, z.ZodObject<{
2760
- kind: z.ZodLiteral<"table">;
2761
- configuration: z.ZodObject<{
2762
- resourceId: z.ZodString;
2763
- }, z.core.$strict>;
2764
- id: z.ZodString;
2765
- position: z.ZodObject<{
2766
- x: z.ZodNumber;
2767
- y: z.ZodNumber;
2768
- }, z.core.$strict>;
2769
- label: z.ZodString;
2770
- }, z.core.$strict>, z.ZodObject<{
2771
- kind: z.ZodLiteral<"tool">;
2772
- configuration: z.ZodObject<{
2773
- toolName: z.ZodString;
2774
- fingerprint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2775
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2776
- }, z.core.$strict>;
2777
- id: z.ZodString;
2778
- position: z.ZodObject<{
2779
- x: z.ZodNumber;
2780
- y: z.ZodNumber;
2781
- }, z.core.$strict>;
2782
- label: z.ZodString;
2783
- }, z.core.$strict>, z.ZodObject<{
2784
- kind: z.ZodLiteral<"condition">;
2785
- configuration: z.ZodObject<{
2786
- mode: z.ZodLiteral<"semantic">;
2787
- instruction: z.ZodString;
2788
- }, z.core.$strict>;
2789
- id: z.ZodString;
2790
- position: z.ZodObject<{
2791
- x: z.ZodNumber;
2792
- y: z.ZodNumber;
2793
- }, z.core.$strict>;
2794
- label: z.ZodString;
2795
- }, z.core.$strict>, z.ZodObject<{
2796
- kind: z.ZodLiteral<"subflow">;
2797
- configuration: z.ZodObject<{
2798
- flowId: z.ZodString;
2799
- version: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
2800
- mode: z.ZodLiteral<"latest">;
2801
- }, z.core.$strict>, z.ZodObject<{
2802
- mode: z.ZodLiteral<"follows">;
2803
- }, z.core.$strict>, z.ZodObject<{
2804
- mode: z.ZodLiteral<"pinned">;
2805
- versionId: z.ZodString;
2806
- }, z.core.$strict>], "mode">>;
2807
- }, z.core.$strict>;
2808
- id: z.ZodString;
2809
- position: z.ZodObject<{
2810
- x: z.ZodNumber;
2811
- y: z.ZodNumber;
2812
- }, z.core.$strict>;
2813
- label: z.ZodString;
2814
- }, z.core.$strict>, z.ZodObject<{
2815
- kind: z.ZodLiteral<"output">;
2816
- configuration: z.ZodObject<{}, z.core.$strict>;
2817
- id: z.ZodString;
2818
- position: z.ZodObject<{
2819
- x: z.ZodNumber;
2820
- y: z.ZodNumber;
2821
- }, z.core.$strict>;
2822
- label: z.ZodString;
2823
- }, z.core.$strict>], "kind">>;
2824
- edges: z.ZodArray<z.ZodObject<{
2825
- id: z.ZodString;
2826
- source: z.ZodString;
2827
- target: z.ZodString;
2828
- kind: z.ZodDefault<z.ZodEnum<{
2829
- flow: "flow";
2830
- context: "context";
2831
- }>>;
2832
- label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2833
- sourceHandle: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2834
- }, z.core.$strict>>;
2835
- }, z.core.$strict>;
2836
- idempotencyKey: z.ZodString;
2837
- }, z.core.$strict>;
2838
- export type SaveFlowVersionInput = z.infer<typeof SaveFlowVersionInput>;
2839
- export declare const PublishFlowInput: z.ZodObject<{
2840
- flowId: z.ZodString;
2841
- versionId: z.ZodString;
2842
- idempotencyKey: z.ZodString;
2843
- }, z.core.$strict>;
2844
- export type PublishFlowInput = z.infer<typeof PublishFlowInput>;
2845
- export declare const UnpublishFlowInput: z.ZodObject<{
2846
- flowId: z.ZodString;
2847
- idempotencyKey: z.ZodString;
2848
- }, z.core.$strict>;
2849
- export type UnpublishFlowInput = z.infer<typeof UnpublishFlowInput>;
2850
- export declare const PreviewFlowPublishInput: z.ZodObject<{
2851
- flowId: z.ZodString;
2852
- versionId: z.ZodString;
2853
- }, z.core.$strict>;
2854
- export type PreviewFlowPublishInput = z.infer<typeof PreviewFlowPublishInput>;
2855
- export declare const FlowPublishCall: z.ZodObject<{
2856
- nodeId: z.ZodString;
2857
- nodeLabel: z.ZodString;
2858
- calleeId: z.ZodString;
2859
- calleeTitle: z.ZodString;
2860
- mode: z.ZodEnum<{
2861
- latest: "latest";
2862
- follows: "follows";
2863
- pinned: "pinned";
2864
- }>;
2865
- versionId: z.ZodNullable<z.ZodString>;
2866
- versionSequence: z.ZodNullable<z.ZodNumber>;
2867
- freezes: z.ZodBoolean;
2868
- available: z.ZodBoolean;
2869
- }, z.core.$strict>;
2870
- export type FlowPublishCall = z.infer<typeof FlowPublishCall>;
2871
- export declare const FlowPublishPreview: z.ZodObject<{
2872
- flowId: z.ZodString;
2873
- versionId: z.ZodString;
2874
- calls: z.ZodArray<z.ZodObject<{
2875
- nodeId: z.ZodString;
2876
- nodeLabel: z.ZodString;
2877
- calleeId: z.ZodString;
2878
- calleeTitle: z.ZodString;
2879
- mode: z.ZodEnum<{
2880
- latest: "latest";
2881
- follows: "follows";
2882
- pinned: "pinned";
2883
- }>;
2884
- versionId: z.ZodNullable<z.ZodString>;
2885
- versionSequence: z.ZodNullable<z.ZodNumber>;
2886
- freezes: z.ZodBoolean;
2887
- available: z.ZodBoolean;
2888
- }, z.core.$strict>>;
2889
- }, z.core.$strict>;
2890
- export type FlowPublishPreview = z.infer<typeof FlowPublishPreview>;
2891
- export declare const RelationNodeKind: z.ZodEnum<{
2892
- folder: "folder";
2893
- document: "document";
2894
- attachment: "attachment";
2895
- table: "table";
2896
- agent: "agent";
2897
- board: "board";
2898
- flow: "flow";
2899
- }>;
2900
- export type RelationNodeKind = z.infer<typeof RelationNodeKind>;
2901
- export declare const RelationNode: z.ZodObject<{
2902
- id: z.ZodString;
2903
- kind: z.ZodEnum<{
2904
- folder: "folder";
2905
- document: "document";
2906
- attachment: "attachment";
2907
- table: "table";
2908
- agent: "agent";
2909
- board: "board";
2910
- flow: "flow";
2911
- }>;
2912
- title: z.ZodString;
2913
- inScope: z.ZodBoolean;
2914
- }, z.core.$strict>;
2915
- export type RelationNode = z.infer<typeof RelationNode>;
2916
- export declare const RelationEdge: z.ZodObject<{
2917
- id: z.ZodString;
2918
- source: z.ZodString;
2919
- target: z.ZodString;
2920
- relation: z.ZodEnum<{
2921
- calls: "calls";
2922
- reads: "reads";
2923
- }>;
2924
- }, z.core.$strict>;
2925
- export type RelationEdge = z.infer<typeof RelationEdge>;
2926
- export declare const RelationGraphScope: z.ZodDiscriminatedUnion<[z.ZodObject<{
2927
- of: z.ZodLiteral<"folder">;
2928
- folderId: z.ZodNullable<z.ZodString>;
2929
- }, z.core.$strict>, z.ZodObject<{
2930
- of: z.ZodLiteral<"flow">;
2931
- flowId: z.ZodString;
2932
- }, z.core.$strict>], "of">;
2933
- export type RelationGraphScope = z.infer<typeof RelationGraphScope>;
2934
- export declare const RelationGraphInput: z.ZodObject<{
2935
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
2936
- of: z.ZodLiteral<"folder">;
2937
- folderId: z.ZodNullable<z.ZodString>;
2938
- }, z.core.$strict>, z.ZodObject<{
2939
- of: z.ZodLiteral<"flow">;
2940
- flowId: z.ZodString;
2941
- }, z.core.$strict>], "of">;
2942
- limit: z.ZodDefault<z.ZodNumber>;
2943
- }, z.core.$strict>;
2944
- export type RelationGraphInput = z.infer<typeof RelationGraphInput>;
2945
- export declare const RelationGraph: z.ZodObject<{
2946
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
2947
- of: z.ZodLiteral<"folder">;
2948
- folderId: z.ZodNullable<z.ZodString>;
2949
- }, z.core.$strict>, z.ZodObject<{
2950
- of: z.ZodLiteral<"flow">;
2951
- flowId: z.ZodString;
2952
- }, z.core.$strict>], "of">;
2953
- nodes: z.ZodArray<z.ZodObject<{
2954
- id: z.ZodString;
2955
- kind: z.ZodEnum<{
2956
- folder: "folder";
2957
- document: "document";
2958
- attachment: "attachment";
2959
- table: "table";
2960
- agent: "agent";
2961
- board: "board";
2962
- flow: "flow";
2963
- }>;
2964
- title: z.ZodString;
2965
- inScope: z.ZodBoolean;
2966
- }, z.core.$strict>>;
2967
- edges: z.ZodArray<z.ZodObject<{
2968
- id: z.ZodString;
2969
- source: z.ZodString;
2970
- target: z.ZodString;
2971
- relation: z.ZodEnum<{
2972
- calls: "calls";
2973
- reads: "reads";
2974
- }>;
2975
- }, z.core.$strict>>;
2976
- omitted: z.ZodNumber;
2977
- limit: z.ZodNumber;
2978
- }, z.core.$strict>;
2979
- export type RelationGraph = z.infer<typeof RelationGraph>;
2980
- export declare const FlowRunStatus: z.ZodEnum<{
2981
- queued: "queued";
2982
- running: "running";
2983
- completed: "completed";
2984
- failed: "failed";
2985
- cancelled: "cancelled";
2986
- }>;
2987
- export type FlowRunStatus = z.infer<typeof FlowRunStatus>;
2988
- export declare const FlowRun: z.ZodObject<{
2989
- id: z.ZodString;
2990
- flowId: z.ZodString;
2991
- versionId: z.ZodString;
2992
- status: z.ZodEnum<{
2993
- queued: "queued";
2994
- running: "running";
2995
- completed: "completed";
2996
- failed: "failed";
2997
- cancelled: "cancelled";
2998
- }>;
2999
- currentNodeId: z.ZodNullable<z.ZodString>;
3000
- input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3001
- output: z.ZodNullable<z.ZodUnknown>;
3002
- error: z.ZodNullable<z.ZodString>;
3003
- initiatedBy: z.ZodString;
3004
- parentRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3005
- parentNodeId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3006
- createdAt: z.ZodISODateTime;
3007
- updatedAt: z.ZodISODateTime;
3008
- completedAt: z.ZodNullable<z.ZodISODateTime>;
3009
- }, z.core.$strict>;
3010
- export type FlowRun = z.infer<typeof FlowRun>;
3011
- export declare const FlowRunTrailEntry: z.ZodObject<{
3012
- runId: z.ZodString;
3013
- flowId: z.ZodString;
3014
- flowTitle: z.ZodString;
3015
- nodeId: z.ZodNullable<z.ZodString>;
3016
- nodeLabel: z.ZodNullable<z.ZodString>;
3017
- }, z.core.$strict>;
3018
- export type FlowRunTrailEntry = z.infer<typeof FlowRunTrailEntry>;
3019
- export declare const FlowRunStep: z.ZodObject<{
3020
- run: z.ZodObject<{
3021
- id: z.ZodString;
3022
- flowId: z.ZodString;
3023
- versionId: z.ZodString;
3024
- status: z.ZodEnum<{
3025
- queued: "queued";
3026
- running: "running";
3027
- completed: "completed";
3028
- failed: "failed";
3029
- cancelled: "cancelled";
3030
- }>;
3031
- currentNodeId: z.ZodNullable<z.ZodString>;
3032
- input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3033
- output: z.ZodNullable<z.ZodUnknown>;
3034
- error: z.ZodNullable<z.ZodString>;
3035
- initiatedBy: z.ZodString;
3036
- parentRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3037
- parentNodeId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3038
- createdAt: z.ZodISODateTime;
3039
- updatedAt: z.ZodISODateTime;
3040
- completedAt: z.ZodNullable<z.ZodISODateTime>;
3041
- }, z.core.$strict>;
3042
- node: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
3043
- kind: z.ZodLiteral<"trigger">;
3044
- configuration: z.ZodObject<{
3045
- mode: z.ZodLiteral<"manual">;
3046
- }, z.core.$strict>;
3047
- id: z.ZodString;
3048
- position: z.ZodObject<{
3049
- x: z.ZodNumber;
3050
- y: z.ZodNumber;
3051
- }, z.core.$strict>;
3052
- label: z.ZodString;
3053
- }, z.core.$strict>, z.ZodObject<{
3054
- kind: z.ZodLiteral<"instruction">;
3055
- configuration: z.ZodObject<{
3056
- prompt: z.ZodString;
3057
- }, z.core.$strict>;
3058
- id: z.ZodString;
3059
- position: z.ZodObject<{
3060
- x: z.ZodNumber;
3061
- y: z.ZodNumber;
3062
- }, z.core.$strict>;
3063
- label: z.ZodString;
3064
- }, z.core.$strict>, z.ZodObject<{
3065
- kind: z.ZodLiteral<"folder">;
3066
- configuration: z.ZodObject<{
3067
- resourceId: z.ZodString;
3068
- }, z.core.$strict>;
3069
- id: z.ZodString;
3070
- position: z.ZodObject<{
3071
- x: z.ZodNumber;
3072
- y: z.ZodNumber;
3073
- }, z.core.$strict>;
3074
- label: z.ZodString;
3075
- }, z.core.$strict>, z.ZodObject<{
3076
- kind: z.ZodLiteral<"document">;
3077
- configuration: z.ZodObject<{
3078
- resourceId: z.ZodString;
3079
- }, z.core.$strict>;
3080
- id: z.ZodString;
3081
- position: z.ZodObject<{
3082
- x: z.ZodNumber;
3083
- y: z.ZodNumber;
3084
- }, z.core.$strict>;
3085
- label: z.ZodString;
3086
- }, z.core.$strict>, z.ZodObject<{
3087
- kind: z.ZodLiteral<"upload">;
3088
- configuration: z.ZodObject<{
3089
- resourceId: z.ZodString;
3090
- }, z.core.$strict>;
3091
- id: z.ZodString;
3092
- position: z.ZodObject<{
3093
- x: z.ZodNumber;
3094
- y: z.ZodNumber;
3095
- }, z.core.$strict>;
3096
- label: z.ZodString;
3097
- }, z.core.$strict>, z.ZodObject<{
3098
- kind: z.ZodLiteral<"table">;
3099
- configuration: z.ZodObject<{
3100
- resourceId: z.ZodString;
3101
- }, z.core.$strict>;
3102
- id: z.ZodString;
3103
- position: z.ZodObject<{
3104
- x: z.ZodNumber;
3105
- y: z.ZodNumber;
3106
- }, z.core.$strict>;
3107
- label: z.ZodString;
3108
- }, z.core.$strict>, z.ZodObject<{
3109
- kind: z.ZodLiteral<"tool">;
3110
- configuration: z.ZodObject<{
3111
- toolName: z.ZodString;
3112
- fingerprint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3113
- arguments: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3114
- }, z.core.$strict>;
3115
- id: z.ZodString;
3116
- position: z.ZodObject<{
3117
- x: z.ZodNumber;
3118
- y: z.ZodNumber;
3119
- }, z.core.$strict>;
3120
- label: z.ZodString;
3121
- }, z.core.$strict>, z.ZodObject<{
3122
- kind: z.ZodLiteral<"condition">;
3123
- configuration: z.ZodObject<{
3124
- mode: z.ZodLiteral<"semantic">;
3125
- instruction: z.ZodString;
3126
- }, z.core.$strict>;
3127
- id: z.ZodString;
3128
- position: z.ZodObject<{
3129
- x: z.ZodNumber;
3130
- y: z.ZodNumber;
3131
- }, z.core.$strict>;
3132
- label: z.ZodString;
3133
- }, z.core.$strict>, z.ZodObject<{
3134
- kind: z.ZodLiteral<"subflow">;
3135
- configuration: z.ZodObject<{
3136
- flowId: z.ZodString;
3137
- version: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
3138
- mode: z.ZodLiteral<"latest">;
3139
- }, z.core.$strict>, z.ZodObject<{
3140
- mode: z.ZodLiteral<"follows">;
3141
- }, z.core.$strict>, z.ZodObject<{
3142
- mode: z.ZodLiteral<"pinned">;
3143
- versionId: z.ZodString;
3144
- }, z.core.$strict>], "mode">>;
3145
- }, z.core.$strict>;
3146
- id: z.ZodString;
3147
- position: z.ZodObject<{
3148
- x: z.ZodNumber;
3149
- y: z.ZodNumber;
3150
- }, z.core.$strict>;
3151
- label: z.ZodString;
3152
- }, z.core.$strict>, z.ZodObject<{
3153
- kind: z.ZodLiteral<"output">;
3154
- configuration: z.ZodObject<{}, z.core.$strict>;
3155
- id: z.ZodString;
3156
- position: z.ZodObject<{
3157
- x: z.ZodNumber;
3158
- y: z.ZodNumber;
3159
- }, z.core.$strict>;
3160
- label: z.ZodString;
3161
- }, z.core.$strict>], "kind">>;
3162
- trail: z.ZodDefault<z.ZodArray<z.ZodObject<{
3163
- runId: z.ZodString;
3164
- flowId: z.ZodString;
3165
- flowTitle: z.ZodString;
3166
- nodeId: z.ZodNullable<z.ZodString>;
3167
- nodeLabel: z.ZodNullable<z.ZodString>;
3168
- }, z.core.$strict>>>;
3169
- }, z.core.$strict>;
3170
- export type FlowRunStep = z.infer<typeof FlowRunStep>;
3171
- export declare const StartFlowRunInput: z.ZodObject<{
3172
- flowId: z.ZodString;
3173
- input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3174
- parent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
3175
- runId: z.ZodString;
3176
- nodeId: z.ZodString;
3177
- }, z.core.$strict>>>;
3178
- idempotencyKey: z.ZodString;
3179
- }, z.core.$strict>;
3180
- export type StartFlowRunInput = z.infer<typeof StartFlowRunInput>;
3181
- export declare const GetFlowRunInput: z.ZodObject<{
3182
- runId: z.ZodString;
3183
- }, z.core.$strict>;
3184
- export type GetFlowRunInput = z.infer<typeof GetFlowRunInput>;
3185
- export declare const CancelFlowRunInput: z.ZodObject<{
3186
- runId: z.ZodString;
3187
- idempotencyKey: z.ZodString;
3188
- }, z.core.$strict>;
3189
- export type CancelFlowRunInput = z.infer<typeof CancelFlowRunInput>;
3190
- export declare const CompleteFlowRunStepInput: z.ZodObject<{
3191
- runId: z.ZodString;
3192
- nodeId: z.ZodString;
3193
- outcome: z.ZodEnum<{
3194
- completed: "completed";
3195
- failed: "failed";
3196
- }>;
3197
- branch: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3198
- output: z.ZodDefault<z.ZodNullable<z.ZodUnknown>>;
3199
- error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3200
- idempotencyKey: z.ZodString;
3201
- }, z.core.$strict>;
3202
- export type CompleteFlowRunStepInput = z.infer<typeof CompleteFlowRunStepInput>;
3203
- export declare const FlowRunTrigger: z.ZodEnum<{
3204
- manual: "manual";
3205
- subflow: "subflow";
3206
- }>;
3207
- export type FlowRunTrigger = z.infer<typeof FlowRunTrigger>;
3208
- export declare const FlowRunFailure: z.ZodObject<{
3209
- nodeId: z.ZodString;
3210
- nodeLabel: z.ZodString;
3211
- detail: z.ZodString;
3212
- calledRunId: z.ZodNullable<z.ZodString>;
3213
- }, z.core.$strict>;
3214
- export type FlowRunFailure = z.infer<typeof FlowRunFailure>;
3215
- export declare const FlowRunSummary: z.ZodObject<{
3216
- id: z.ZodString;
3217
- flowId: z.ZodString;
3218
- versionId: z.ZodString;
3219
- status: z.ZodEnum<{
3220
- queued: "queued";
3221
- running: "running";
3222
- completed: "completed";
3223
- failed: "failed";
3224
- cancelled: "cancelled";
3225
- }>;
3226
- trigger: z.ZodEnum<{
3227
- manual: "manual";
3228
- subflow: "subflow";
3229
- }>;
3230
- startedAt: z.ZodISODateTime;
3231
- completedAt: z.ZodNullable<z.ZodISODateTime>;
3232
- durationMs: z.ZodNullable<z.ZodNumber>;
3233
- initiatedBy: z.ZodString;
3234
- parentRunId: z.ZodNullable<z.ZodString>;
3235
- failure: z.ZodNullable<z.ZodObject<{
3236
- nodeId: z.ZodString;
3237
- nodeLabel: z.ZodString;
3238
- detail: z.ZodString;
3239
- calledRunId: z.ZodNullable<z.ZodString>;
3240
- }, z.core.$strict>>;
3241
- }, z.core.$strict>;
3242
- export type FlowRunSummary = z.infer<typeof FlowRunSummary>;
3243
- export declare const ListFlowRunsInput: z.ZodObject<{
3244
- flowId: z.ZodString;
3245
- failedOnly: z.ZodDefault<z.ZodBoolean>;
3246
- limit: z.ZodDefault<z.ZodNumber>;
3247
- cursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3248
- }, z.core.$strict>;
3249
- export type ListFlowRunsInput = z.infer<typeof ListFlowRunsInput>;
3250
- export declare const FlowRunList: z.ZodObject<{
3251
- items: z.ZodArray<z.ZodObject<{
3252
- id: z.ZodString;
3253
- flowId: z.ZodString;
3254
- versionId: z.ZodString;
3255
- status: z.ZodEnum<{
3256
- queued: "queued";
3257
- running: "running";
3258
- completed: "completed";
3259
- failed: "failed";
3260
- cancelled: "cancelled";
3261
- }>;
3262
- trigger: z.ZodEnum<{
3263
- manual: "manual";
3264
- subflow: "subflow";
3265
- }>;
3266
- startedAt: z.ZodISODateTime;
3267
- completedAt: z.ZodNullable<z.ZodISODateTime>;
3268
- durationMs: z.ZodNullable<z.ZodNumber>;
3269
- initiatedBy: z.ZodString;
3270
- parentRunId: z.ZodNullable<z.ZodString>;
3271
- failure: z.ZodNullable<z.ZodObject<{
3272
- nodeId: z.ZodString;
3273
- nodeLabel: z.ZodString;
3274
- detail: z.ZodString;
3275
- calledRunId: z.ZodNullable<z.ZodString>;
3276
- }, z.core.$strict>>;
3277
- }, z.core.$strict>>;
3278
- nextCursor: z.ZodNullable<z.ZodString>;
3279
- }, z.core.$strict>;
3280
- export type FlowRunList = z.infer<typeof FlowRunList>;
3281
- export declare const FlowRunStepRecord: z.ZodObject<{
3282
- nodeId: z.ZodString;
3283
- nodeLabel: z.ZodString;
3284
- outcome: z.ZodEnum<{
3285
- completed: "completed";
3286
- failed: "failed";
3287
- }>;
3288
- branch: z.ZodNullable<z.ZodString>;
3289
- detail: z.ZodNullable<z.ZodString>;
3290
- calledRunId: z.ZodNullable<z.ZodString>;
3291
- completedAt: z.ZodISODateTime;
3292
- }, z.core.$strict>;
3293
- export type FlowRunStepRecord = z.infer<typeof FlowRunStepRecord>;
3294
- export declare const FlowRunHistory: z.ZodObject<{
3295
- runId: z.ZodString;
3296
- flowId: z.ZodString;
3297
- status: z.ZodEnum<{
3298
- queued: "queued";
3299
- running: "running";
3300
- completed: "completed";
3301
- failed: "failed";
3302
- cancelled: "cancelled";
3303
- }>;
3304
- steps: z.ZodArray<z.ZodObject<{
3305
- nodeId: z.ZodString;
3306
- nodeLabel: z.ZodString;
3307
- outcome: z.ZodEnum<{
3308
- completed: "completed";
3309
- failed: "failed";
3310
- }>;
3311
- branch: z.ZodNullable<z.ZodString>;
3312
- detail: z.ZodNullable<z.ZodString>;
3313
- calledRunId: z.ZodNullable<z.ZodString>;
3314
- completedAt: z.ZodISODateTime;
3315
- }, z.core.$strict>>;
3316
- trail: z.ZodArray<z.ZodObject<{
3317
- runId: z.ZodString;
3318
- flowId: z.ZodString;
3319
- flowTitle: z.ZodString;
3320
- nodeId: z.ZodNullable<z.ZodString>;
3321
- nodeLabel: z.ZodNullable<z.ZodString>;
3322
- }, z.core.$strict>>;
3323
- }, z.core.$strict>;
3324
- export type FlowRunHistory = z.infer<typeof FlowRunHistory>;
3325
- export declare const BundleManifestFilename = "manifest.json";
3326
- export declare const BundleEntryKind: z.ZodEnum<{
3327
- folder: "folder";
3328
- document: "document";
3329
- attachment: "attachment";
3330
- table: "table";
3331
- agent: "agent";
3332
- board: "board";
3333
- flow: "flow";
3334
- }>;
3335
- export type BundleEntryKind = z.infer<typeof BundleEntryKind>;
3336
- export declare const BundleManifestEntry: z.ZodObject<{
3337
- id: z.ZodString;
3338
- kind: z.ZodEnum<{
3339
- folder: "folder";
3340
- document: "document";
3341
- attachment: "attachment";
3342
- table: "table";
3343
- agent: "agent";
3344
- board: "board";
3345
- flow: "flow";
3346
- }>;
3347
- title: z.ZodString;
3348
- description: z.ZodNullable<z.ZodString>;
3349
- mediaType: z.ZodNullable<z.ZodString>;
3350
- path: z.ZodString;
3351
- }, z.core.$strict>;
3352
- export type BundleManifestEntry = z.infer<typeof BundleManifestEntry>;
3353
- export declare const BundleExclusion: z.ZodEnum<{
3354
- "version-history": "version-history";
3355
- grants: "grants";
3356
- "flow-runs": "flow-runs";
3357
- "archived-nodes": "archived-nodes";
3358
- }>;
3359
- export type BundleExclusion = z.infer<typeof BundleExclusion>;
3360
- export declare const BundleManifest: z.ZodObject<{
3361
- version: z.ZodLiteral<1>;
3362
- exportedAt: z.ZodISODateTime;
3363
- rootId: z.ZodNullable<z.ZodString>;
3364
- entries: z.ZodArray<z.ZodObject<{
3365
- id: z.ZodString;
3366
- kind: z.ZodEnum<{
3367
- folder: "folder";
3368
- document: "document";
3369
- attachment: "attachment";
3370
- table: "table";
3371
- agent: "agent";
3372
- board: "board";
3373
- flow: "flow";
3374
- }>;
3375
- title: z.ZodString;
3376
- description: z.ZodNullable<z.ZodString>;
3377
- mediaType: z.ZodNullable<z.ZodString>;
3378
- path: z.ZodString;
3379
- }, z.core.$strict>>;
3380
- excluded: z.ZodArray<z.ZodEnum<{
3381
- "version-history": "version-history";
3382
- grants: "grants";
3383
- "flow-runs": "flow-runs";
3384
- "archived-nodes": "archived-nodes";
3385
- }>>;
3386
- }, z.core.$strict>;
3387
- export type BundleManifest = z.infer<typeof BundleManifest>;
3388
- export declare const BundleImportResult: z.ZodObject<{
3389
- nodes: z.ZodNumber;
3390
- flows: z.ZodNumber;
3391
- rootNodeIds: z.ZodArray<z.ZodString>;
3392
- replayed: z.ZodBoolean;
3393
- }, z.core.$strict>;
3394
- export type BundleImportResult = z.infer<typeof BundleImportResult>;