@anchrd/colab-sdk 0.1.54 → 0.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/action-blocks/action-blocks.d.ts +1 -0
  2. package/dist/action-blocks/action-blocks.js +22 -0
  3. package/dist/actions/actions.d.ts +356 -3
  4. package/dist/actions/actions.js +21 -3
  5. package/dist/boards/boards.d.ts +0 -14
  6. package/dist/boards/boards.js +3 -18
  7. package/dist/documents/documents.d.ts +2 -0
  8. package/dist/flows/flow-runs.d.ts +34 -0
  9. package/dist/flows/flow-runs.js +48 -4
  10. package/dist/flows/flows.d.ts +5 -0
  11. package/dist/flows/flows.js +3 -0
  12. package/dist/gadgets/gadgets.d.ts +4 -0
  13. package/dist/gadgets/gadgets.js +5 -0
  14. package/dist/goals/goals.d.ts +1 -0
  15. package/dist/goals/goals.js +2 -2
  16. package/dist/grammar/grammar.d.ts +1 -2
  17. package/dist/grammar/grammar.js +5 -7
  18. package/dist/home/home.d.ts +2 -0
  19. package/dist/links/links.d.ts +15 -2
  20. package/dist/links/links.js +25 -13
  21. package/dist/messages/messages.js +5 -4
  22. package/dist/nodes/nodes.d.ts +11 -6
  23. package/dist/nodes/nodes.js +11 -7
  24. package/dist/operators/operators.d.ts +87 -4
  25. package/dist/operators/operators.js +55 -2
  26. package/dist/processes/processes.d.ts +1999 -0
  27. package/dist/processes/processes.js +417 -0
  28. package/dist/runs/runs.d.ts +1 -200
  29. package/dist/runs/runs.js +3 -64
  30. package/dist/schedule/schedule.js +3 -3
  31. package/dist/sdk.d.ts +10 -11
  32. package/dist/sdk.js +10 -11
  33. package/dist/skills/skills.d.ts +1 -0
  34. package/dist/sources/sources.d.ts +4 -3
  35. package/dist/tables/tables.d.ts +114 -1
  36. package/dist/tables/tables.js +86 -2
  37. package/dist/tool.d.ts +1 -0
  38. package/dist/users/users.d.ts +30 -0
  39. package/dist/users/users.js +32 -0
  40. package/dist/written/written.d.ts +2 -4
  41. package/dist/written/written.js +2 -5
  42. package/package.json +2 -1
  43. package/dist/relations/relations.d.ts +0 -342
  44. package/dist/relations/relations.js +0 -129
  45. package/dist/types/types.d.ts +0 -181
  46. package/dist/types/types.js +0 -124
@@ -61,3 +61,4 @@ export declare const ActionBlock: z.ZodUnion<readonly [z.ZodObject<{
61
61
  label: z.ZodOptional<z.ZodString>;
62
62
  }, z.core.$strict>]>;
63
63
  export type ActionBlock = z.infer<typeof ActionBlock>;
64
+ export declare function readActionBlock(yaml: string): ActionBlock | null;
@@ -1,3 +1,4 @@
1
+ import { parseDocument } from "yaml";
1
2
  import { z } from "zod";
2
3
  import { idSchema } from "../ids/ids.js";
3
4
  // The blocks an AI writes into a text so that Colab draws buttons and fields (E270, #1215, Nodes ›
@@ -45,3 +46,24 @@ export const ChecklistBlock = z.strictObject({
45
46
  // A text or number field, with a label above it (the field's name without one).
46
47
  export const InputBlock = z.strictObject({ input: FieldRef, label: Text.optional() });
47
48
  export const ActionBlock = z.union([ButtonsBlock, ChoiceBlock, ChecklistBlock, InputBlock]);
49
+ // The YAML of a `colab` block as a block of the catalog, or null (E270): read by the UI in a text and
50
+ // a message, and by Actions for a task's row (E285), so both agree on what is a block. ⚠️ No custom
51
+ // tags, no aliases: YAML is read as plain data (the `core` schema), and a strict schema refuses every
52
+ // key it does not know, an `onclick` included, so nothing in the text can reach the page as anything
53
+ // but text. A block is a few lines; a larger text is no block and is not parsed at all.
54
+ const maxBlockLength = 8_000;
55
+ export function readActionBlock(yaml) {
56
+ if (yaml.length > maxBlockLength)
57
+ return null;
58
+ try {
59
+ const document = parseDocument(yaml, { schema: "core", customTags: [], uniqueKeys: true });
60
+ // An unknown tag is only a warning to `yaml`, read as a string; here it makes the block text.
61
+ if (document.errors.length > 0 || document.warnings.length > 0)
62
+ return null;
63
+ const parsed = ActionBlock.safeParse(document.toJS({ maxAliasCount: 0 }));
64
+ return parsed.success ? parsed.data : null;
65
+ }
66
+ catch {
67
+ return null;
68
+ }
69
+ }
@@ -17,6 +17,34 @@ export declare const ActionSection: z.ZodEnum<{
17
17
  waiting: "waiting";
18
18
  }>;
19
19
  export type ActionSection = z.infer<typeof ActionSection>;
20
+ export declare const ActionTaskBlock: z.ZodObject<{
21
+ source: z.ZodEnum<{
22
+ message: "message";
23
+ text: "text";
24
+ }>;
25
+ block: z.ZodUnion<readonly [z.ZodObject<{
26
+ buttons: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
27
+ label: z.ZodString;
28
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
29
+ column: z.ZodString;
30
+ }, z.core.$strict>, z.ZodObject<{
31
+ label: z.ZodString;
32
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
33
+ field: z.ZodString;
34
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
35
+ }, z.core.$strict>]>>;
36
+ }, z.core.$strict>, z.ZodObject<{
37
+ choice: z.ZodString;
38
+ options: z.ZodArray<z.ZodString>;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ checklist: z.ZodString;
41
+ items: z.ZodArray<z.ZodString>;
42
+ }, z.core.$strict>, z.ZodObject<{
43
+ input: z.ZodString;
44
+ label: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strict>]>;
46
+ }, z.core.$strip>;
47
+ export type ActionTaskBlock = z.infer<typeof ActionTaskBlock>;
20
48
  export declare const ActionTask: z.ZodObject<{
21
49
  column: z.ZodObject<{
22
50
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
@@ -48,6 +76,33 @@ export declare const ActionTask: z.ZodObject<{
48
76
  rev: z.ZodNumber;
49
77
  startsToday: z.ZodOptional<z.ZodLiteral<true>>;
50
78
  dueToday: z.ZodOptional<z.ZodLiteral<true>>;
79
+ block: z.ZodOptional<z.ZodObject<{
80
+ source: z.ZodEnum<{
81
+ message: "message";
82
+ text: "text";
83
+ }>;
84
+ block: z.ZodUnion<readonly [z.ZodObject<{
85
+ buttons: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
86
+ label: z.ZodString;
87
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
88
+ column: z.ZodString;
89
+ }, z.core.$strict>, z.ZodObject<{
90
+ label: z.ZodString;
91
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
92
+ field: z.ZodString;
93
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
94
+ }, z.core.$strict>]>>;
95
+ }, z.core.$strict>, z.ZodObject<{
96
+ choice: z.ZodString;
97
+ options: z.ZodArray<z.ZodString>;
98
+ }, z.core.$strict>, z.ZodObject<{
99
+ checklist: z.ZodString;
100
+ items: z.ZodArray<z.ZodString>;
101
+ }, z.core.$strict>, z.ZodObject<{
102
+ input: z.ZodString;
103
+ label: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strict>]>;
105
+ }, z.core.$strip>>;
51
106
  }, z.core.$strip>;
52
107
  export type ActionTask = z.infer<typeof ActionTask>;
53
108
  export declare const ActionChat: z.ZodObject<{
@@ -77,6 +132,7 @@ export declare const ActionChat: z.ZodObject<{
77
132
  appHandle: z.ZodNullable<z.ZodString>;
78
133
  }, z.core.$strip>;
79
134
  line: z.ZodString;
135
+ truncated: z.ZodOptional<z.ZodBoolean>;
80
136
  topic: z.ZodNullable<z.ZodString>;
81
137
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
82
138
  attachmentId: z.ZodTemplateLiteral<`attachment_${string}`>;
@@ -160,11 +216,11 @@ export declare const ActionItem: z.ZodObject<{
160
216
  items: z.ZodArray<z.ZodObject<{
161
217
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
162
218
  name: z.ZodString;
219
+ process: z.ZodBoolean;
163
220
  }, z.core.$strip>>;
164
221
  }, z.core.$strip>;
165
222
  boardKind: z.ZodNullable<z.ZodEnum<{
166
223
  board: "board";
167
- process: "process";
168
224
  }>>;
169
225
  }, z.core.$strip>;
170
226
  section: z.ZodEnum<{
@@ -203,6 +259,33 @@ export declare const ActionItem: z.ZodObject<{
203
259
  rev: z.ZodNumber;
204
260
  startsToday: z.ZodOptional<z.ZodLiteral<true>>;
205
261
  dueToday: z.ZodOptional<z.ZodLiteral<true>>;
262
+ block: z.ZodOptional<z.ZodObject<{
263
+ source: z.ZodEnum<{
264
+ message: "message";
265
+ text: "text";
266
+ }>;
267
+ block: z.ZodUnion<readonly [z.ZodObject<{
268
+ buttons: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
269
+ label: z.ZodString;
270
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
271
+ column: z.ZodString;
272
+ }, z.core.$strict>, z.ZodObject<{
273
+ label: z.ZodString;
274
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
275
+ field: z.ZodString;
276
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
277
+ }, z.core.$strict>]>>;
278
+ }, z.core.$strict>, z.ZodObject<{
279
+ choice: z.ZodString;
280
+ options: z.ZodArray<z.ZodString>;
281
+ }, z.core.$strict>, z.ZodObject<{
282
+ checklist: z.ZodString;
283
+ items: z.ZodArray<z.ZodString>;
284
+ }, z.core.$strict>, z.ZodObject<{
285
+ input: z.ZodString;
286
+ label: z.ZodOptional<z.ZodString>;
287
+ }, z.core.$strict>]>;
288
+ }, z.core.$strip>>;
206
289
  }, z.core.$strip>>;
207
290
  chat: z.ZodNullable<z.ZodObject<{
208
291
  unreadCount: z.ZodNumber;
@@ -231,6 +314,7 @@ export declare const ActionItem: z.ZodObject<{
231
314
  appHandle: z.ZodNullable<z.ZodString>;
232
315
  }, z.core.$strip>;
233
316
  line: z.ZodString;
317
+ truncated: z.ZodOptional<z.ZodBoolean>;
234
318
  topic: z.ZodNullable<z.ZodString>;
235
319
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
236
320
  attachmentId: z.ZodTemplateLiteral<`attachment_${string}`>;
@@ -264,6 +348,77 @@ export declare const ActionItem: z.ZodObject<{
264
348
  }>;
265
349
  runId: z.ZodTemplateLiteral<`run_${string}`>;
266
350
  }, z.core.$strip>>>;
351
+ role: z.ZodOptional<z.ZodNullable<z.ZodObject<{
352
+ process: z.ZodObject<{
353
+ processId: z.ZodTemplateLiteral<`node_${string}`>;
354
+ name: z.ZodString;
355
+ version: z.ZodNumber;
356
+ }, z.core.$strip>;
357
+ step: z.ZodObject<{
358
+ stepId: z.ZodTemplateLiteral<`step_${string}`>;
359
+ name: z.ZodString;
360
+ }, z.core.$strip>;
361
+ action: z.ZodObject<{
362
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
363
+ name: z.ZodString;
364
+ instruction: z.ZodString;
365
+ }, z.core.$strip>;
366
+ start: z.ZodObject<{
367
+ index: z.ZodNumber;
368
+ place: z.ZodDiscriminatedUnion<[z.ZodObject<{
369
+ kind: z.ZodLiteral<"task">;
370
+ boardId: z.ZodTemplateLiteral<`node_${string}`>;
371
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
372
+ }, z.core.$strict>, z.ZodObject<{
373
+ kind: z.ZodLiteral<"goal">;
374
+ goalId: z.ZodTemplateLiteral<`node_${string}`>;
375
+ }, z.core.$strict>, z.ZodObject<{
376
+ kind: z.ZodLiteral<"mention">;
377
+ nodeId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
378
+ }, z.core.$strict>], "kind">;
379
+ name: z.ZodNullable<z.ZodString>;
380
+ when: z.ZodString;
381
+ }, z.core.$strip>;
382
+ steps: z.ZodArray<z.ZodObject<{
383
+ name: z.ZodString;
384
+ nodes: z.ZodArray<z.ZodObject<{
385
+ nodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
386
+ kind: z.ZodNullable<z.ZodString>;
387
+ name: z.ZodNullable<z.ZodString>;
388
+ description: z.ZodNullable<z.ZodString>;
389
+ }, z.core.$strip>>;
390
+ }, z.core.$strip>>;
391
+ connections: z.ZodArray<z.ZodObject<{
392
+ to: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
393
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
394
+ }, z.core.$strict>, z.ZodObject<{
395
+ processId: z.ZodTemplateLiteral<`node_${string}`>;
396
+ }, z.core.$strict>]>>;
397
+ name: z.ZodNullable<z.ZodString>;
398
+ when: z.ZodString;
399
+ }, z.core.$strip>>;
400
+ run: z.ZodNullable<z.ZodObject<{
401
+ runId: z.ZodTemplateLiteral<`run_${string}`>;
402
+ startedAt: z.ZodISODateTime;
403
+ start: z.ZodObject<{
404
+ manual: z.ZodBoolean;
405
+ goal: z.ZodNullable<z.ZodObject<{
406
+ goalId: z.ZodTemplateLiteral<`node_${string}`>;
407
+ name: z.ZodNullable<z.ZodString>;
408
+ goalRunId: z.ZodString;
409
+ }, z.core.$strip>>;
410
+ task: z.ZodNullable<z.ZodObject<{
411
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
412
+ name: z.ZodNullable<z.ZodString>;
413
+ }, z.core.$strip>>;
414
+ }, z.core.$strip>;
415
+ done: z.ZodArray<z.ZodObject<{
416
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
417
+ name: z.ZodString;
418
+ at: z.ZodISODateTime;
419
+ }, z.core.$strip>>;
420
+ }, z.core.$strip>>;
421
+ }, z.core.$strip>>>;
267
422
  }, z.core.$strip>;
268
423
  export type ActionItem = z.infer<typeof ActionItem>;
269
424
  export declare const ActionAbortReason: z.ZodEnum<{
@@ -693,11 +848,11 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
693
848
  items: z.ZodArray<z.ZodObject<{
694
849
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
695
850
  name: z.ZodString;
851
+ process: z.ZodBoolean;
696
852
  }, z.core.$strip>>;
697
853
  }, z.core.$strip>;
698
854
  boardKind: z.ZodNullable<z.ZodEnum<{
699
855
  board: "board";
700
- process: "process";
701
856
  }>>;
702
857
  }, z.core.$strip>;
703
858
  section: z.ZodEnum<{
@@ -736,6 +891,33 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
736
891
  rev: z.ZodNumber;
737
892
  startsToday: z.ZodOptional<z.ZodLiteral<true>>;
738
893
  dueToday: z.ZodOptional<z.ZodLiteral<true>>;
894
+ block: z.ZodOptional<z.ZodObject<{
895
+ source: z.ZodEnum<{
896
+ message: "message";
897
+ text: "text";
898
+ }>;
899
+ block: z.ZodUnion<readonly [z.ZodObject<{
900
+ buttons: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
901
+ label: z.ZodString;
902
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
903
+ column: z.ZodString;
904
+ }, z.core.$strict>, z.ZodObject<{
905
+ label: z.ZodString;
906
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
907
+ field: z.ZodString;
908
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
909
+ }, z.core.$strict>]>>;
910
+ }, z.core.$strict>, z.ZodObject<{
911
+ choice: z.ZodString;
912
+ options: z.ZodArray<z.ZodString>;
913
+ }, z.core.$strict>, z.ZodObject<{
914
+ checklist: z.ZodString;
915
+ items: z.ZodArray<z.ZodString>;
916
+ }, z.core.$strict>, z.ZodObject<{
917
+ input: z.ZodString;
918
+ label: z.ZodOptional<z.ZodString>;
919
+ }, z.core.$strict>]>;
920
+ }, z.core.$strip>>;
739
921
  }, z.core.$strip>>;
740
922
  chat: z.ZodNullable<z.ZodObject<{
741
923
  unreadCount: z.ZodNumber;
@@ -764,6 +946,7 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
764
946
  appHandle: z.ZodNullable<z.ZodString>;
765
947
  }, z.core.$strip>;
766
948
  line: z.ZodString;
949
+ truncated: z.ZodOptional<z.ZodBoolean>;
767
950
  topic: z.ZodNullable<z.ZodString>;
768
951
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
769
952
  attachmentId: z.ZodTemplateLiteral<`attachment_${string}`>;
@@ -797,6 +980,77 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
797
980
  }>;
798
981
  runId: z.ZodTemplateLiteral<`run_${string}`>;
799
982
  }, z.core.$strip>>>;
983
+ role: z.ZodOptional<z.ZodNullable<z.ZodObject<{
984
+ process: z.ZodObject<{
985
+ processId: z.ZodTemplateLiteral<`node_${string}`>;
986
+ name: z.ZodString;
987
+ version: z.ZodNumber;
988
+ }, z.core.$strip>;
989
+ step: z.ZodObject<{
990
+ stepId: z.ZodTemplateLiteral<`step_${string}`>;
991
+ name: z.ZodString;
992
+ }, z.core.$strip>;
993
+ action: z.ZodObject<{
994
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
995
+ name: z.ZodString;
996
+ instruction: z.ZodString;
997
+ }, z.core.$strip>;
998
+ start: z.ZodObject<{
999
+ index: z.ZodNumber;
1000
+ place: z.ZodDiscriminatedUnion<[z.ZodObject<{
1001
+ kind: z.ZodLiteral<"task">;
1002
+ boardId: z.ZodTemplateLiteral<`node_${string}`>;
1003
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
1004
+ }, z.core.$strict>, z.ZodObject<{
1005
+ kind: z.ZodLiteral<"goal">;
1006
+ goalId: z.ZodTemplateLiteral<`node_${string}`>;
1007
+ }, z.core.$strict>, z.ZodObject<{
1008
+ kind: z.ZodLiteral<"mention">;
1009
+ nodeId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
1010
+ }, z.core.$strict>], "kind">;
1011
+ name: z.ZodNullable<z.ZodString>;
1012
+ when: z.ZodString;
1013
+ }, z.core.$strip>;
1014
+ steps: z.ZodArray<z.ZodObject<{
1015
+ name: z.ZodString;
1016
+ nodes: z.ZodArray<z.ZodObject<{
1017
+ nodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
1018
+ kind: z.ZodNullable<z.ZodString>;
1019
+ name: z.ZodNullable<z.ZodString>;
1020
+ description: z.ZodNullable<z.ZodString>;
1021
+ }, z.core.$strip>>;
1022
+ }, z.core.$strip>>;
1023
+ connections: z.ZodArray<z.ZodObject<{
1024
+ to: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
1025
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
1026
+ }, z.core.$strict>, z.ZodObject<{
1027
+ processId: z.ZodTemplateLiteral<`node_${string}`>;
1028
+ }, z.core.$strict>]>>;
1029
+ name: z.ZodNullable<z.ZodString>;
1030
+ when: z.ZodString;
1031
+ }, z.core.$strip>>;
1032
+ run: z.ZodNullable<z.ZodObject<{
1033
+ runId: z.ZodTemplateLiteral<`run_${string}`>;
1034
+ startedAt: z.ZodISODateTime;
1035
+ start: z.ZodObject<{
1036
+ manual: z.ZodBoolean;
1037
+ goal: z.ZodNullable<z.ZodObject<{
1038
+ goalId: z.ZodTemplateLiteral<`node_${string}`>;
1039
+ name: z.ZodNullable<z.ZodString>;
1040
+ goalRunId: z.ZodString;
1041
+ }, z.core.$strip>>;
1042
+ task: z.ZodNullable<z.ZodObject<{
1043
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
1044
+ name: z.ZodNullable<z.ZodString>;
1045
+ }, z.core.$strip>>;
1046
+ }, z.core.$strip>;
1047
+ done: z.ZodArray<z.ZodObject<{
1048
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
1049
+ name: z.ZodString;
1050
+ at: z.ZodISODateTime;
1051
+ }, z.core.$strip>>;
1052
+ }, z.core.$strip>>;
1053
+ }, z.core.$strip>>>;
800
1054
  }, z.core.$strip>, z.ZodObject<{
801
1055
  notice: z.ZodObject<{
802
1056
  package: z.ZodEnum<{
@@ -979,11 +1233,11 @@ export declare const ActionList: z.ZodObject<{
979
1233
  items: z.ZodArray<z.ZodObject<{
980
1234
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
981
1235
  name: z.ZodString;
1236
+ process: z.ZodBoolean;
982
1237
  }, z.core.$strip>>;
983
1238
  }, z.core.$strip>;
984
1239
  boardKind: z.ZodNullable<z.ZodEnum<{
985
1240
  board: "board";
986
- process: "process";
987
1241
  }>>;
988
1242
  }, z.core.$strip>;
989
1243
  section: z.ZodEnum<{
@@ -1022,6 +1276,33 @@ export declare const ActionList: z.ZodObject<{
1022
1276
  rev: z.ZodNumber;
1023
1277
  startsToday: z.ZodOptional<z.ZodLiteral<true>>;
1024
1278
  dueToday: z.ZodOptional<z.ZodLiteral<true>>;
1279
+ block: z.ZodOptional<z.ZodObject<{
1280
+ source: z.ZodEnum<{
1281
+ message: "message";
1282
+ text: "text";
1283
+ }>;
1284
+ block: z.ZodUnion<readonly [z.ZodObject<{
1285
+ buttons: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1286
+ label: z.ZodString;
1287
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
1288
+ column: z.ZodString;
1289
+ }, z.core.$strict>, z.ZodObject<{
1290
+ label: z.ZodString;
1291
+ task: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
1292
+ field: z.ZodString;
1293
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
1294
+ }, z.core.$strict>]>>;
1295
+ }, z.core.$strict>, z.ZodObject<{
1296
+ choice: z.ZodString;
1297
+ options: z.ZodArray<z.ZodString>;
1298
+ }, z.core.$strict>, z.ZodObject<{
1299
+ checklist: z.ZodString;
1300
+ items: z.ZodArray<z.ZodString>;
1301
+ }, z.core.$strict>, z.ZodObject<{
1302
+ input: z.ZodString;
1303
+ label: z.ZodOptional<z.ZodString>;
1304
+ }, z.core.$strict>]>;
1305
+ }, z.core.$strip>>;
1025
1306
  }, z.core.$strip>>;
1026
1307
  chat: z.ZodNullable<z.ZodObject<{
1027
1308
  unreadCount: z.ZodNumber;
@@ -1050,6 +1331,7 @@ export declare const ActionList: z.ZodObject<{
1050
1331
  appHandle: z.ZodNullable<z.ZodString>;
1051
1332
  }, z.core.$strip>;
1052
1333
  line: z.ZodString;
1334
+ truncated: z.ZodOptional<z.ZodBoolean>;
1053
1335
  topic: z.ZodNullable<z.ZodString>;
1054
1336
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1055
1337
  attachmentId: z.ZodTemplateLiteral<`attachment_${string}`>;
@@ -1083,6 +1365,77 @@ export declare const ActionList: z.ZodObject<{
1083
1365
  }>;
1084
1366
  runId: z.ZodTemplateLiteral<`run_${string}`>;
1085
1367
  }, z.core.$strip>>>;
1368
+ role: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1369
+ process: z.ZodObject<{
1370
+ processId: z.ZodTemplateLiteral<`node_${string}`>;
1371
+ name: z.ZodString;
1372
+ version: z.ZodNumber;
1373
+ }, z.core.$strip>;
1374
+ step: z.ZodObject<{
1375
+ stepId: z.ZodTemplateLiteral<`step_${string}`>;
1376
+ name: z.ZodString;
1377
+ }, z.core.$strip>;
1378
+ action: z.ZodObject<{
1379
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
1380
+ name: z.ZodString;
1381
+ instruction: z.ZodString;
1382
+ }, z.core.$strip>;
1383
+ start: z.ZodObject<{
1384
+ index: z.ZodNumber;
1385
+ place: z.ZodDiscriminatedUnion<[z.ZodObject<{
1386
+ kind: z.ZodLiteral<"task">;
1387
+ boardId: z.ZodTemplateLiteral<`node_${string}`>;
1388
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
1389
+ }, z.core.$strict>, z.ZodObject<{
1390
+ kind: z.ZodLiteral<"goal">;
1391
+ goalId: z.ZodTemplateLiteral<`node_${string}`>;
1392
+ }, z.core.$strict>, z.ZodObject<{
1393
+ kind: z.ZodLiteral<"mention">;
1394
+ nodeId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
1395
+ }, z.core.$strict>], "kind">;
1396
+ name: z.ZodNullable<z.ZodString>;
1397
+ when: z.ZodString;
1398
+ }, z.core.$strip>;
1399
+ steps: z.ZodArray<z.ZodObject<{
1400
+ name: z.ZodString;
1401
+ nodes: z.ZodArray<z.ZodObject<{
1402
+ nodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
1403
+ kind: z.ZodNullable<z.ZodString>;
1404
+ name: z.ZodNullable<z.ZodString>;
1405
+ description: z.ZodNullable<z.ZodString>;
1406
+ }, z.core.$strip>>;
1407
+ }, z.core.$strip>>;
1408
+ connections: z.ZodArray<z.ZodObject<{
1409
+ to: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
1410
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
1411
+ }, z.core.$strict>, z.ZodObject<{
1412
+ processId: z.ZodTemplateLiteral<`node_${string}`>;
1413
+ }, z.core.$strict>]>>;
1414
+ name: z.ZodNullable<z.ZodString>;
1415
+ when: z.ZodString;
1416
+ }, z.core.$strip>>;
1417
+ run: z.ZodNullable<z.ZodObject<{
1418
+ runId: z.ZodTemplateLiteral<`run_${string}`>;
1419
+ startedAt: z.ZodISODateTime;
1420
+ start: z.ZodObject<{
1421
+ manual: z.ZodBoolean;
1422
+ goal: z.ZodNullable<z.ZodObject<{
1423
+ goalId: z.ZodTemplateLiteral<`node_${string}`>;
1424
+ name: z.ZodNullable<z.ZodString>;
1425
+ goalRunId: z.ZodString;
1426
+ }, z.core.$strip>>;
1427
+ task: z.ZodNullable<z.ZodObject<{
1428
+ taskId: z.ZodTemplateLiteral<`node_${string}`>;
1429
+ name: z.ZodNullable<z.ZodString>;
1430
+ }, z.core.$strip>>;
1431
+ }, z.core.$strip>;
1432
+ done: z.ZodArray<z.ZodObject<{
1433
+ actionId: z.ZodTemplateLiteral<`action_${string}`>;
1434
+ name: z.ZodString;
1435
+ at: z.ZodISODateTime;
1436
+ }, z.core.$strip>>;
1437
+ }, z.core.$strip>>;
1438
+ }, z.core.$strip>>>;
1086
1439
  }, z.core.$strip>, z.ZodObject<{
1087
1440
  notice: z.ZodObject<{
1088
1441
  package: z.ZodEnum<{
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { ActionBlock } from "../action-blocks/action-blocks.js";
2
3
  import { TaskColumn } from "../columns/columns.js";
3
4
  import { CallId } from "../connectors/connectors.js";
4
5
  import { packages } from "../grammar/grammar.js";
@@ -7,6 +8,7 @@ import { Limit as PageSize } from "../list-input.js";
7
8
  import { AttachmentId, MessageAuthor, MessageId } from "../messages/messages.js";
8
9
  import { BoardShownKind, NodeId, NodeKindRead, NodePath } from "../nodes/nodes.js";
9
10
  import { OperatorRunId } from "../operators/operators.js";
11
+ import { ProcessRole } from "../processes/processes.js";
10
12
  import { SkillOffer } from "../skills/skills.js";
11
13
  import { UserId } from "../users/users.js";
12
14
  // Actions (#46, Seiten › Actions, E43, E67): one list over every board and chat with what waits on a
@@ -30,11 +32,18 @@ export const ActionListInput = z.strictObject({
30
32
  });
31
33
  // The two sections of the page: waiting (open tasks, chats) and in progress (tasks in progress).
32
34
  export const ActionSection = z.enum(["waiting", "progress"]);
35
+ // The `colab` block whose buttons a task's row draws instead of its end columns (E285, #1277): the
36
+ // one in the newest unread message of the task's chat, else the one in the task's text; the first
37
+ // block of that text that is one of the catalog. The UI reads from the card whether it holds already
38
+ // and what each button acts on, as in the task (E270, E272).
39
+ export const ActionTaskBlock = z.object({
40
+ source: z.enum(["message", "text"]),
41
+ block: ActionBlock,
42
+ });
33
43
  export const ActionTask = z.object({
34
44
  column: TaskColumn,
35
- // The columns of type done, discarded and blocked of the task's own board (a run's own columns
36
- // for a run's task), in their order on the board: the buttons that move it there. Empty when the
37
- // board has none.
45
+ // The columns of type done, discarded and blocked of the task's own board, in their order on the
46
+ // board: the buttons that move it there. Empty when the board has none.
38
47
  buttons: z.array(TaskColumn),
39
48
  // A machine moved it into its column last: "handed over by the Operator".
40
49
  handedOver: z.boolean(),
@@ -46,6 +55,8 @@ export const ActionTask = z.object({
46
55
  // Its due date (`endsAt`) was reached within the last 24 hours (E141): "due today", like
47
56
  // `startsToday`. Absent otherwise.
48
57
  dueToday: z.literal(true).optional(),
58
+ // The block whose buttons stand in the row instead of `buttons` (E285). Absent without one.
59
+ block: ActionTaskBlock.optional(),
49
60
  });
50
61
  export const ActionChat = z.object({
51
62
  // The messages of others not read yet, by the person themselves (not their AI).
@@ -55,6 +66,9 @@ export const ActionChat = z.object({
55
66
  author: MessageAuthor,
56
67
  // The first line of its text that is not empty, at most 200 characters.
57
68
  line: z.string(),
69
+ // Whether the text holds more than that line (#1278, E287). Optional only for the readers' sake:
70
+ // the server always names it.
71
+ truncated: z.boolean().optional(),
58
72
  // Its topic (#994, E223); null for the general one (Allgemein). Read it with
59
73
  // intelligence_message_list and topic.
60
74
  topic: z.string().nullable(),
@@ -132,6 +146,10 @@ export const ActionItem = z.object({
132
146
  source: ActionSource.nullable().optional(),
133
147
  // Left out on every row that is no goal's with such a run.
134
148
  goalRun: ActionGoalRun.nullable().optional(),
149
+ // The role in a process (#1260, E286): the way that woke the row (a card into a start column, a
150
+ // goal's run, a mention set as a start) meets the start of a live action whose actor the person
151
+ // is, in a process folder they read. Left out on every other row.
152
+ role: ProcessRole.nullable().optional(),
135
153
  });
136
154
  // What another package puts into a person's Actions (#334, E81, E82): "access invalid" for every
137
155
  // admin, "Operator paused" for its responsible person. Gathered when asked like every row, never
@@ -5,11 +5,6 @@ export declare const TaskId: z.ZodTemplateLiteral<`node_${string}`>;
5
5
  export type TaskId = z.infer<typeof TaskId>;
6
6
  export declare const LabelId: z.ZodTemplateLiteral<`label_${string}`>;
7
7
  export type LabelId = z.infer<typeof LabelId>;
8
- export declare const boardKinds: readonly ["board"];
9
- export declare const BoardKind: z.ZodEnum<{
10
- board: "board";
11
- }>;
12
- export type BoardKind = z.infer<typeof BoardKind>;
13
8
  export declare const BoardCreateInput: z.ZodObject<{
14
9
  parentId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
15
10
  section: z.ZodOptional<z.ZodEnum<{
@@ -86,9 +81,6 @@ export type BoardGetInput = z.infer<typeof BoardGetInput>;
86
81
  export declare const BoardUpdateInput: z.ZodObject<{
87
82
  boardId: z.ZodTemplateLiteral<`node_${string}`>;
88
83
  rev: z.ZodNumber;
89
- kind: z.ZodOptional<z.ZodEnum<{
90
- board: "board";
91
- }>>;
92
84
  instruction: z.ZodOptional<z.ZodString>;
93
85
  columns: z.ZodOptional<z.ZodArray<z.ZodObject<{
94
86
  columnId: z.ZodOptional<z.ZodTemplateLiteral<`column_${string}`>>;
@@ -181,7 +173,6 @@ export declare const BoardDetail: z.ZodObject<{
181
173
  name: z.ZodString;
182
174
  kind: z.ZodEnum<{
183
175
  board: "board";
184
- process: "process";
185
176
  }>;
186
177
  instruction: z.ZodNullable<z.ZodString>;
187
178
  columns: z.ZodArray<z.ZodObject<{
@@ -258,7 +249,6 @@ export declare const compactTaskLimit = 50;
258
249
  export declare const maxBulkTasks = 100;
259
250
  export declare const BoardTaskListInput: z.ZodObject<{
260
251
  boardId: z.ZodTemplateLiteral<`node_${string}`>;
261
- runId: z.ZodOptional<z.ZodTemplateLiteral<`run_${string}`>>;
262
252
  columnId: z.ZodOptional<z.ZodTemplateLiteral<`column_${string}`>>;
263
253
  type: z.ZodOptional<z.ZodEnum<{
264
254
  archive: "archive";
@@ -412,7 +402,6 @@ export declare const TaskImage: z.ZodUnion<readonly [z.ZodObject<{
412
402
  export type TaskImage = z.infer<typeof TaskImage>;
413
403
  export declare const BoardTaskItem: z.ZodObject<{
414
404
  taskId: z.ZodTemplateLiteral<`node_${string}`>;
415
- runId: z.ZodNullable<z.ZodTemplateLiteral<`run_${string}`>>;
416
405
  title: z.ZodString;
417
406
  column: z.ZodObject<{
418
407
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
@@ -490,7 +479,6 @@ export type BoardTaskItem = z.infer<typeof BoardTaskItem>;
490
479
  export declare const BoardTaskList: z.ZodObject<{
491
480
  items: z.ZodArray<z.ZodObject<{
492
481
  taskId: z.ZodTemplateLiteral<`node_${string}`>;
493
- runId: z.ZodNullable<z.ZodTemplateLiteral<`run_${string}`>>;
494
482
  title: z.ZodString;
495
483
  column: z.ZodObject<{
496
484
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
@@ -679,7 +667,6 @@ export type TaskRule = z.infer<typeof TaskRule>;
679
667
  export declare const TaskDetail: z.ZodObject<{
680
668
  taskId: z.ZodTemplateLiteral<`node_${string}`>;
681
669
  boardId: z.ZodTemplateLiteral<`node_${string}`>;
682
- runId: z.ZodNullable<z.ZodTemplateLiteral<`run_${string}`>>;
683
670
  title: z.ZodString;
684
671
  content: z.ZodString;
685
672
  column: z.ZodObject<{
@@ -726,7 +713,6 @@ export declare const TaskDetail: z.ZodObject<{
726
713
  name: z.ZodString;
727
714
  boardKind: z.ZodEnum<{
728
715
  board: "board";
729
- process: "process";
730
716
  }>;
731
717
  }, z.core.$strip>;
732
718
  tasks: z.ZodArray<z.ZodObject<{