@anchrd/colab-sdk 0.1.53 → 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.
- package/dist/action-blocks/action-blocks.d.ts +1 -0
- package/dist/action-blocks/action-blocks.js +22 -0
- package/dist/actions/actions.d.ts +356 -23
- package/dist/actions/actions.js +21 -6
- package/dist/boards/boards.d.ts +0 -14
- package/dist/boards/boards.js +3 -18
- package/dist/documents/documents.d.ts +2 -0
- package/dist/flows/flow-runs.d.ts +34 -0
- package/dist/flows/flow-runs.js +48 -4
- package/dist/flows/flows.d.ts +5 -10
- package/dist/flows/flows.js +5 -4
- package/dist/gadgets/gadgets.d.ts +4 -21
- package/dist/gadgets/gadgets.js +6 -6
- package/dist/goals/goals.d.ts +1 -0
- package/dist/goals/goals.js +2 -2
- package/dist/grammar/grammar.d.ts +1 -2
- package/dist/grammar/grammar.js +5 -7
- package/dist/home/home.d.ts +2 -5
- package/dist/links/links.d.ts +15 -2
- package/dist/links/links.js +25 -13
- package/dist/messages/messages.js +5 -4
- package/dist/nodes/nodes.d.ts +11 -6
- package/dist/nodes/nodes.js +11 -7
- package/dist/operators/operators.d.ts +87 -4
- package/dist/operators/operators.js +57 -3
- package/dist/processes/processes.d.ts +1999 -0
- package/dist/processes/processes.js +417 -0
- package/dist/runs/runs.d.ts +1 -200
- package/dist/runs/runs.js +3 -64
- package/dist/schedule/schedule.js +3 -3
- package/dist/sdk.d.ts +11 -12
- package/dist/sdk.js +11 -12
- package/dist/skills/skills.d.ts +1 -0
- package/dist/sources/sources.d.ts +4 -13
- package/dist/sources/sources.js +4 -4
- package/dist/tables/tables.d.ts +114 -1
- package/dist/tables/tables.js +86 -2
- package/dist/tool.d.ts +1 -0
- package/dist/users/users.d.ts +30 -0
- package/dist/users/users.js +32 -0
- package/dist/written/written.d.ts +2 -4
- package/dist/written/written.js +2 -5
- package/package.json +2 -1
- package/dist/relations/relations.d.ts +0 -342
- package/dist/relations/relations.js +0 -129
- package/dist/types/types.d.ts +0 -181
- package/dist/types/types.js +0 -124
|
@@ -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}`>;
|
|
@@ -115,11 +171,6 @@ export declare const ActionGadget: z.ZodObject<{
|
|
|
115
171
|
message: z.ZodString;
|
|
116
172
|
callId: z.ZodNullable<z.ZodTemplateLiteral<`call_${string}`>>;
|
|
117
173
|
open: z.ZodNumber;
|
|
118
|
-
level: z.ZodEnum<{
|
|
119
|
-
publish: "publish";
|
|
120
|
-
draft: "draft";
|
|
121
|
-
report: "report";
|
|
122
|
-
}>;
|
|
123
174
|
hint: z.ZodBoolean;
|
|
124
175
|
}, z.core.$strip>;
|
|
125
176
|
export type ActionGadget = z.infer<typeof ActionGadget>;
|
|
@@ -165,11 +216,11 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
165
216
|
items: z.ZodArray<z.ZodObject<{
|
|
166
217
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
167
218
|
name: z.ZodString;
|
|
219
|
+
process: z.ZodBoolean;
|
|
168
220
|
}, z.core.$strip>>;
|
|
169
221
|
}, z.core.$strip>;
|
|
170
222
|
boardKind: z.ZodNullable<z.ZodEnum<{
|
|
171
223
|
board: "board";
|
|
172
|
-
process: "process";
|
|
173
224
|
}>>;
|
|
174
225
|
}, z.core.$strip>;
|
|
175
226
|
section: z.ZodEnum<{
|
|
@@ -208,6 +259,33 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
208
259
|
rev: z.ZodNumber;
|
|
209
260
|
startsToday: z.ZodOptional<z.ZodLiteral<true>>;
|
|
210
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>>;
|
|
211
289
|
}, z.core.$strip>>;
|
|
212
290
|
chat: z.ZodNullable<z.ZodObject<{
|
|
213
291
|
unreadCount: z.ZodNumber;
|
|
@@ -236,6 +314,7 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
236
314
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
237
315
|
}, z.core.$strip>;
|
|
238
316
|
line: z.ZodString;
|
|
317
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
239
318
|
topic: z.ZodNullable<z.ZodString>;
|
|
240
319
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
241
320
|
attachmentId: z.ZodTemplateLiteral<`attachment_${string}`>;
|
|
@@ -254,11 +333,6 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
254
333
|
message: z.ZodString;
|
|
255
334
|
callId: z.ZodNullable<z.ZodTemplateLiteral<`call_${string}`>>;
|
|
256
335
|
open: z.ZodNumber;
|
|
257
|
-
level: z.ZodEnum<{
|
|
258
|
-
publish: "publish";
|
|
259
|
-
draft: "draft";
|
|
260
|
-
report: "report";
|
|
261
|
-
}>;
|
|
262
336
|
hint: z.ZodBoolean;
|
|
263
337
|
}, z.core.$strip>>;
|
|
264
338
|
source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -274,6 +348,77 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
274
348
|
}>;
|
|
275
349
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
276
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>>>;
|
|
277
422
|
}, z.core.$strip>;
|
|
278
423
|
export type ActionItem = z.infer<typeof ActionItem>;
|
|
279
424
|
export declare const ActionAbortReason: z.ZodEnum<{
|
|
@@ -703,11 +848,11 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
703
848
|
items: z.ZodArray<z.ZodObject<{
|
|
704
849
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
705
850
|
name: z.ZodString;
|
|
851
|
+
process: z.ZodBoolean;
|
|
706
852
|
}, z.core.$strip>>;
|
|
707
853
|
}, z.core.$strip>;
|
|
708
854
|
boardKind: z.ZodNullable<z.ZodEnum<{
|
|
709
855
|
board: "board";
|
|
710
|
-
process: "process";
|
|
711
856
|
}>>;
|
|
712
857
|
}, z.core.$strip>;
|
|
713
858
|
section: z.ZodEnum<{
|
|
@@ -746,6 +891,33 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
746
891
|
rev: z.ZodNumber;
|
|
747
892
|
startsToday: z.ZodOptional<z.ZodLiteral<true>>;
|
|
748
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>>;
|
|
749
921
|
}, z.core.$strip>>;
|
|
750
922
|
chat: z.ZodNullable<z.ZodObject<{
|
|
751
923
|
unreadCount: z.ZodNumber;
|
|
@@ -774,6 +946,7 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
774
946
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
775
947
|
}, z.core.$strip>;
|
|
776
948
|
line: z.ZodString;
|
|
949
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
777
950
|
topic: z.ZodNullable<z.ZodString>;
|
|
778
951
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
779
952
|
attachmentId: z.ZodTemplateLiteral<`attachment_${string}`>;
|
|
@@ -792,11 +965,6 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
792
965
|
message: z.ZodString;
|
|
793
966
|
callId: z.ZodNullable<z.ZodTemplateLiteral<`call_${string}`>>;
|
|
794
967
|
open: z.ZodNumber;
|
|
795
|
-
level: z.ZodEnum<{
|
|
796
|
-
publish: "publish";
|
|
797
|
-
draft: "draft";
|
|
798
|
-
report: "report";
|
|
799
|
-
}>;
|
|
800
968
|
hint: z.ZodBoolean;
|
|
801
969
|
}, z.core.$strip>>;
|
|
802
970
|
source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -812,6 +980,77 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
812
980
|
}>;
|
|
813
981
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
814
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>>>;
|
|
815
1054
|
}, z.core.$strip>, z.ZodObject<{
|
|
816
1055
|
notice: z.ZodObject<{
|
|
817
1056
|
package: z.ZodEnum<{
|
|
@@ -994,11 +1233,11 @@ export declare const ActionList: z.ZodObject<{
|
|
|
994
1233
|
items: z.ZodArray<z.ZodObject<{
|
|
995
1234
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
996
1235
|
name: z.ZodString;
|
|
1236
|
+
process: z.ZodBoolean;
|
|
997
1237
|
}, z.core.$strip>>;
|
|
998
1238
|
}, z.core.$strip>;
|
|
999
1239
|
boardKind: z.ZodNullable<z.ZodEnum<{
|
|
1000
1240
|
board: "board";
|
|
1001
|
-
process: "process";
|
|
1002
1241
|
}>>;
|
|
1003
1242
|
}, z.core.$strip>;
|
|
1004
1243
|
section: z.ZodEnum<{
|
|
@@ -1037,6 +1276,33 @@ export declare const ActionList: z.ZodObject<{
|
|
|
1037
1276
|
rev: z.ZodNumber;
|
|
1038
1277
|
startsToday: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1039
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>>;
|
|
1040
1306
|
}, z.core.$strip>>;
|
|
1041
1307
|
chat: z.ZodNullable<z.ZodObject<{
|
|
1042
1308
|
unreadCount: z.ZodNumber;
|
|
@@ -1065,6 +1331,7 @@ export declare const ActionList: z.ZodObject<{
|
|
|
1065
1331
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
1066
1332
|
}, z.core.$strip>;
|
|
1067
1333
|
line: z.ZodString;
|
|
1334
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
1068
1335
|
topic: z.ZodNullable<z.ZodString>;
|
|
1069
1336
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1070
1337
|
attachmentId: z.ZodTemplateLiteral<`attachment_${string}`>;
|
|
@@ -1083,11 +1350,6 @@ export declare const ActionList: z.ZodObject<{
|
|
|
1083
1350
|
message: z.ZodString;
|
|
1084
1351
|
callId: z.ZodNullable<z.ZodTemplateLiteral<`call_${string}`>>;
|
|
1085
1352
|
open: z.ZodNumber;
|
|
1086
|
-
level: z.ZodEnum<{
|
|
1087
|
-
publish: "publish";
|
|
1088
|
-
draft: "draft";
|
|
1089
|
-
report: "report";
|
|
1090
|
-
}>;
|
|
1091
1353
|
hint: z.ZodBoolean;
|
|
1092
1354
|
}, z.core.$strip>>;
|
|
1093
1355
|
source: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1103,6 +1365,77 @@ export declare const ActionList: z.ZodObject<{
|
|
|
1103
1365
|
}>;
|
|
1104
1366
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
1105
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>>>;
|
|
1106
1439
|
}, z.core.$strip>, z.ZodObject<{
|
|
1107
1440
|
notice: z.ZodObject<{
|
|
1108
1441
|
package: z.ZodEnum<{
|
package/dist/actions/actions.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
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
|
-
import { GadgetLevel } from "../gadgets/gadgets.js";
|
|
5
5
|
import { packages } from "../grammar/grammar.js";
|
|
6
6
|
import { Digest, InstructionsLink, Known, KnownText } from "../instructions/instructions.js";
|
|
7
7
|
import { Limit as PageSize } from "../list-input.js";
|
|
8
8
|
import { AttachmentId, MessageAuthor, MessageId } from "../messages/messages.js";
|
|
9
9
|
import { BoardShownKind, NodeId, NodeKindRead, NodePath } from "../nodes/nodes.js";
|
|
10
10
|
import { OperatorRunId } from "../operators/operators.js";
|
|
11
|
+
import { ProcessRole } from "../processes/processes.js";
|
|
11
12
|
import { SkillOffer } from "../skills/skills.js";
|
|
12
13
|
import { UserId } from "../users/users.js";
|
|
13
14
|
// Actions (#46, Seiten › Actions, E43, E67): one list over every board and chat with what waits on a
|
|
@@ -31,11 +32,18 @@ export const ActionListInput = z.strictObject({
|
|
|
31
32
|
});
|
|
32
33
|
// The two sections of the page: waiting (open tasks, chats) and in progress (tasks in progress).
|
|
33
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
|
+
});
|
|
34
43
|
export const ActionTask = z.object({
|
|
35
44
|
column: TaskColumn,
|
|
36
|
-
// The columns of type done, discarded and blocked of the task's own board
|
|
37
|
-
//
|
|
38
|
-
// 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.
|
|
39
47
|
buttons: z.array(TaskColumn),
|
|
40
48
|
// A machine moved it into its column last: "handed over by the Operator".
|
|
41
49
|
handedOver: z.boolean(),
|
|
@@ -47,6 +55,8 @@ export const ActionTask = z.object({
|
|
|
47
55
|
// Its due date (`endsAt`) was reached within the last 24 hours (E141): "due today", like
|
|
48
56
|
// `startsToday`. Absent otherwise.
|
|
49
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(),
|
|
50
60
|
});
|
|
51
61
|
export const ActionChat = z.object({
|
|
52
62
|
// The messages of others not read yet, by the person themselves (not their AI).
|
|
@@ -56,6 +66,9 @@ export const ActionChat = z.object({
|
|
|
56
66
|
author: MessageAuthor,
|
|
57
67
|
// The first line of its text that is not empty, at most 200 characters.
|
|
58
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(),
|
|
59
72
|
// Its topic (#994, E223); null for the general one (Allgemein). Read it with
|
|
60
73
|
// intelligence_message_list and topic.
|
|
61
74
|
topic: z.string().nullable(),
|
|
@@ -90,8 +103,6 @@ export const ActionGadget = z.object({
|
|
|
90
103
|
callId: CallId.nullable(),
|
|
91
104
|
// How many different problems are open, each counted once however often it happened.
|
|
92
105
|
open: z.number().int(),
|
|
93
|
-
// How far the responsible may go: report, repair as a draft, or repair and publish.
|
|
94
|
-
level: GadgetLevel,
|
|
95
106
|
// Nobody is responsible: the row reaches the publisher only to name one.
|
|
96
107
|
hint: z.boolean(),
|
|
97
108
|
});
|
|
@@ -135,6 +146,10 @@ export const ActionItem = z.object({
|
|
|
135
146
|
source: ActionSource.nullable().optional(),
|
|
136
147
|
// Left out on every row that is no goal's with such a run.
|
|
137
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(),
|
|
138
153
|
});
|
|
139
154
|
// What another package puts into a person's Actions (#334, E81, E82): "access invalid" for every
|
|
140
155
|
// admin, "Operator paused" for its responsible person. Gathered when asked like every row, never
|