@anchrd/colab-sdk 0.1.17 → 0.1.18
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/actions/actions.d.ts +56 -2
- package/dist/actions/actions.js +36 -6
- package/dist/boards/boards.d.ts +242 -20
- package/dist/boards/boards.js +51 -18
- package/dist/card-kinds/card-kinds.d.ts +5 -5
- package/dist/documents/documents.d.ts +59 -2
- package/dist/documents/documents.js +18 -4
- package/dist/error/error.d.ts +51 -4
- package/dist/error/error.js +143 -8
- package/dist/events/events.d.ts +15 -0
- package/dist/events/events.js +10 -0
- package/dist/excerpt/excerpt.d.ts +16 -0
- package/dist/excerpt/excerpt.js +33 -0
- package/dist/files/files.d.ts +6 -0
- package/dist/files/files.js +5 -1
- package/dist/instructions/instructions.d.ts +36 -0
- package/dist/instructions/instructions.js +29 -0
- package/dist/missing/missing.d.ts +56 -0
- package/dist/missing/missing.js +66 -0
- package/dist/nodes/nodes.d.ts +21 -5
- package/dist/nodes/nodes.js +10 -7
- package/dist/operators/operators.d.ts +13 -3
- package/dist/operators/operators.js +19 -4
- package/dist/primitives/primitives.js +1 -1
- package/dist/runs/runs.d.ts +1 -1
- package/dist/sdk.d.ts +12 -9
- package/dist/sdk.js +12 -9
- package/dist/sso/sso.js +3 -2
- package/dist/tables/tables.d.ts +32 -0
- package/dist/tables/tables.js +12 -1
- package/dist/tool.d.ts +3 -0
- package/dist/versions/versions.d.ts +102 -0
- package/dist/versions/versions.js +14 -0
- package/dist/written/written.d.ts +206 -0
- package/dist/written/written.js +90 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ export declare const ActionListInput: z.ZodObject<{
|
|
|
9
9
|
userId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
10
10
|
cursor: z.ZodOptional<z.ZodString>;
|
|
11
11
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
12
|
+
known: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodString>, unknown>>;
|
|
12
13
|
}, z.core.$strict>;
|
|
13
14
|
export type ActionListInput = z.infer<typeof ActionListInput>;
|
|
14
15
|
export declare const ActionSection: z.ZodEnum<{
|
|
@@ -45,6 +46,7 @@ export declare const ActionTask: z.ZodObject<{
|
|
|
45
46
|
}, z.core.$strip>>;
|
|
46
47
|
handedOver: z.ZodBoolean;
|
|
47
48
|
rev: z.ZodNumber;
|
|
49
|
+
startsToday: z.ZodOptional<z.ZodLiteral<true>>;
|
|
48
50
|
}, z.core.$strip>;
|
|
49
51
|
export type ActionTask = z.infer<typeof ActionTask>;
|
|
50
52
|
export declare const ActionChat: z.ZodObject<{
|
|
@@ -83,6 +85,11 @@ export declare const ActionProcess: z.ZodObject<{
|
|
|
83
85
|
dueAt: z.ZodISODateTime;
|
|
84
86
|
}, z.core.$strip>;
|
|
85
87
|
export type ActionProcess = z.infer<typeof ActionProcess>;
|
|
88
|
+
export declare const ActionRunHint: z.ZodEnum<{
|
|
89
|
+
started: "started";
|
|
90
|
+
stalled: "stalled";
|
|
91
|
+
}>;
|
|
92
|
+
export type ActionRunHint = z.infer<typeof ActionRunHint>;
|
|
86
93
|
export declare const ActionRunTask: z.ZodObject<{
|
|
87
94
|
taskId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
88
95
|
title: z.ZodString;
|
|
@@ -128,6 +135,10 @@ export declare const ActionRun: z.ZodObject<{
|
|
|
128
135
|
}, z.core.$strip>;
|
|
129
136
|
rev: z.ZodNumber;
|
|
130
137
|
}, z.core.$strip>>;
|
|
138
|
+
hint: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
started: "started";
|
|
140
|
+
stalled: "stalled";
|
|
141
|
+
}>>;
|
|
131
142
|
}, z.core.$strip>;
|
|
132
143
|
export type ActionRun = z.infer<typeof ActionRun>;
|
|
133
144
|
export declare const ActionGadget: z.ZodObject<{
|
|
@@ -146,6 +157,10 @@ export declare const ActionGadget: z.ZodObject<{
|
|
|
146
157
|
hint: z.ZodBoolean;
|
|
147
158
|
}, z.core.$strip>;
|
|
148
159
|
export type ActionGadget = z.infer<typeof ActionGadget>;
|
|
160
|
+
export declare const ActionValidation: z.ZodObject<{
|
|
161
|
+
newTickets: z.ZodNumber;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
export type ActionValidation = z.infer<typeof ActionValidation>;
|
|
149
164
|
export declare const ActionItem: z.ZodObject<{
|
|
150
165
|
node: z.ZodObject<{
|
|
151
166
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
@@ -219,6 +234,7 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
219
234
|
}, z.core.$strip>>;
|
|
220
235
|
handedOver: z.ZodBoolean;
|
|
221
236
|
rev: z.ZodNumber;
|
|
237
|
+
startsToday: z.ZodOptional<z.ZodLiteral<true>>;
|
|
222
238
|
}, z.core.$strip>>;
|
|
223
239
|
chat: z.ZodNullable<z.ZodObject<{
|
|
224
240
|
unreadCount: z.ZodNumber;
|
|
@@ -280,6 +296,10 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
280
296
|
}, z.core.$strip>;
|
|
281
297
|
rev: z.ZodNumber;
|
|
282
298
|
}, z.core.$strip>>;
|
|
299
|
+
hint: z.ZodOptional<z.ZodEnum<{
|
|
300
|
+
started: "started";
|
|
301
|
+
stalled: "stalled";
|
|
302
|
+
}>>;
|
|
283
303
|
}, z.core.$strip>>;
|
|
284
304
|
gadget: z.ZodNullable<z.ZodObject<{
|
|
285
305
|
problem: z.ZodEnum<{
|
|
@@ -296,6 +316,9 @@ export declare const ActionItem: z.ZodObject<{
|
|
|
296
316
|
}>;
|
|
297
317
|
hint: z.ZodBoolean;
|
|
298
318
|
}, z.core.$strip>>;
|
|
319
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
320
|
+
newTickets: z.ZodNumber;
|
|
321
|
+
}, z.core.$strip>>;
|
|
299
322
|
}, z.core.$strip>;
|
|
300
323
|
export type ActionItem = z.infer<typeof ActionItem>;
|
|
301
324
|
export declare const ActionNoticeKind: z.ZodEnum<{
|
|
@@ -571,6 +594,7 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
571
594
|
}, z.core.$strip>>;
|
|
572
595
|
handedOver: z.ZodBoolean;
|
|
573
596
|
rev: z.ZodNumber;
|
|
597
|
+
startsToday: z.ZodOptional<z.ZodLiteral<true>>;
|
|
574
598
|
}, z.core.$strip>>;
|
|
575
599
|
chat: z.ZodNullable<z.ZodObject<{
|
|
576
600
|
unreadCount: z.ZodNumber;
|
|
@@ -632,6 +656,10 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
632
656
|
}, z.core.$strip>;
|
|
633
657
|
rev: z.ZodNumber;
|
|
634
658
|
}, z.core.$strip>>;
|
|
659
|
+
hint: z.ZodOptional<z.ZodEnum<{
|
|
660
|
+
started: "started";
|
|
661
|
+
stalled: "stalled";
|
|
662
|
+
}>>;
|
|
635
663
|
}, z.core.$strip>>;
|
|
636
664
|
gadget: z.ZodNullable<z.ZodObject<{
|
|
637
665
|
problem: z.ZodEnum<{
|
|
@@ -648,6 +676,9 @@ export declare const ActionRow: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
648
676
|
}>;
|
|
649
677
|
hint: z.ZodBoolean;
|
|
650
678
|
}, z.core.$strip>>;
|
|
679
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
680
|
+
newTickets: z.ZodNumber;
|
|
681
|
+
}, z.core.$strip>>;
|
|
651
682
|
}, z.core.$strip>, z.ZodObject<{
|
|
652
683
|
notice: z.ZodObject<{
|
|
653
684
|
package: z.ZodEnum<{
|
|
@@ -730,6 +761,17 @@ export declare const MachineInstructions: z.ZodObject<{
|
|
|
730
761
|
version: z.ZodNullable<z.ZodInt>;
|
|
731
762
|
}, z.core.$strip>;
|
|
732
763
|
export type MachineInstructions = z.infer<typeof MachineInstructions>;
|
|
764
|
+
export declare const MachineInstructionsRead: z.ZodUnion<readonly [z.ZodObject<{
|
|
765
|
+
path: z.ZodString;
|
|
766
|
+
status: z.ZodNullable<z.ZodString>;
|
|
767
|
+
markdown: z.ZodString;
|
|
768
|
+
version: z.ZodNullable<z.ZodInt>;
|
|
769
|
+
digest: z.ZodString;
|
|
770
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
771
|
+
digest: z.ZodString;
|
|
772
|
+
known: z.ZodLiteral<true>;
|
|
773
|
+
}, z.core.$strip>]>;
|
|
774
|
+
export type MachineInstructionsRead = z.infer<typeof MachineInstructionsRead>;
|
|
733
775
|
export declare const ActionList: z.ZodObject<{
|
|
734
776
|
items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
735
777
|
node: z.ZodObject<{
|
|
@@ -804,6 +846,7 @@ export declare const ActionList: z.ZodObject<{
|
|
|
804
846
|
}, z.core.$strip>>;
|
|
805
847
|
handedOver: z.ZodBoolean;
|
|
806
848
|
rev: z.ZodNumber;
|
|
849
|
+
startsToday: z.ZodOptional<z.ZodLiteral<true>>;
|
|
807
850
|
}, z.core.$strip>>;
|
|
808
851
|
chat: z.ZodNullable<z.ZodObject<{
|
|
809
852
|
unreadCount: z.ZodNumber;
|
|
@@ -865,6 +908,10 @@ export declare const ActionList: z.ZodObject<{
|
|
|
865
908
|
}, z.core.$strip>;
|
|
866
909
|
rev: z.ZodNumber;
|
|
867
910
|
}, z.core.$strip>>;
|
|
911
|
+
hint: z.ZodOptional<z.ZodEnum<{
|
|
912
|
+
started: "started";
|
|
913
|
+
stalled: "stalled";
|
|
914
|
+
}>>;
|
|
868
915
|
}, z.core.$strip>>;
|
|
869
916
|
gadget: z.ZodNullable<z.ZodObject<{
|
|
870
917
|
problem: z.ZodEnum<{
|
|
@@ -881,6 +928,9 @@ export declare const ActionList: z.ZodObject<{
|
|
|
881
928
|
}>;
|
|
882
929
|
hint: z.ZodBoolean;
|
|
883
930
|
}, z.core.$strip>>;
|
|
931
|
+
validation: z.ZodOptional<z.ZodObject<{
|
|
932
|
+
newTickets: z.ZodNumber;
|
|
933
|
+
}, z.core.$strip>>;
|
|
884
934
|
}, z.core.$strip>, z.ZodObject<{
|
|
885
935
|
notice: z.ZodObject<{
|
|
886
936
|
package: z.ZodEnum<{
|
|
@@ -956,11 +1006,15 @@ export declare const ActionList: z.ZodObject<{
|
|
|
956
1006
|
}, z.core.$strip>]>>;
|
|
957
1007
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
958
1008
|
count: z.ZodNumber;
|
|
959
|
-
instructions: z.ZodOptional<z.ZodObject<{
|
|
1009
|
+
instructions: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
960
1010
|
path: z.ZodString;
|
|
961
1011
|
status: z.ZodNullable<z.ZodString>;
|
|
962
1012
|
markdown: z.ZodString;
|
|
963
1013
|
version: z.ZodNullable<z.ZodInt>;
|
|
964
|
-
|
|
1014
|
+
digest: z.ZodString;
|
|
1015
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1016
|
+
digest: z.ZodString;
|
|
1017
|
+
known: z.ZodLiteral<true>;
|
|
1018
|
+
}, z.core.$strip>]>>;
|
|
965
1019
|
}, z.core.$strip>;
|
|
966
1020
|
export type ActionList = z.infer<typeof ActionList>;
|
package/dist/actions/actions.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ColumnType, TaskColumn } from "../columns/columns.js";
|
|
|
3
3
|
import { CallId } from "../connectors/connectors.js";
|
|
4
4
|
import { GadgetLevel } from "../gadgets/gadgets.js";
|
|
5
5
|
import { packages } from "../grammar/grammar.js";
|
|
6
|
-
import { InstructionsLink } from "../instructions/instructions.js";
|
|
6
|
+
import { Digest, InstructionsLink, Known, KnownText } from "../instructions/instructions.js";
|
|
7
7
|
import { Limit as PageSize } from "../list-input.js";
|
|
8
8
|
import { MessageAuthor, MessageId } from "../messages/messages.js";
|
|
9
9
|
import { BoardShownKind, NodeId, NodeKind, NodePath } from "../nodes/nodes.js";
|
|
@@ -18,7 +18,7 @@ export const ActionListInput = z.strictObject({
|
|
|
18
18
|
filter: z
|
|
19
19
|
.enum(actionFilters)
|
|
20
20
|
.optional()
|
|
21
|
-
.describe("Which rows: all, tasks (tasks, due processes, open runs and broken gadgets you answer for) or chats (rows with something unread, a task's chat included). Notices of other parts of Colab come only with all. Leaving it out gives all. count always counts all."),
|
|
21
|
+
.describe("Which rows: all, tasks (tasks, due processes, open runs, the validation's tickets in New for the holder of validator, and broken gadgets you answer for) or chats (rows with something unread, a task's chat included). Notices of other parts of Colab come only with all. Leaving it out gives all. count always counts all."),
|
|
22
22
|
userId: UserId.optional().describe("Whose Actions to read, `user_…`. Only an admin in admin mode reads another person's, to see where they are stuck; anyone else gets not_found. Leaving it out reads your own."),
|
|
23
23
|
cursor: z
|
|
24
24
|
.string()
|
|
@@ -26,6 +26,7 @@ export const ActionListInput = z.strictObject({
|
|
|
26
26
|
.optional()
|
|
27
27
|
.describe("The nextCursor of the previous page, unchanged, for the rows after it. Leaving it out starts with the newest."),
|
|
28
28
|
limit: PageSize.optional().describe("How many rows one page holds, 1 to 100. Leaving it out gives 50."),
|
|
29
|
+
known: Known.optional(),
|
|
29
30
|
});
|
|
30
31
|
// The two sections of the page: waiting (open tasks, chats, a due process) and in progress (tasks
|
|
31
32
|
// in progress, an open run).
|
|
@@ -40,6 +41,9 @@ export const ActionTask = z.object({
|
|
|
40
41
|
handedOver: z.boolean(),
|
|
41
42
|
// The task's rev (E70, #671): intelligence_task_update takes it without reading the task first.
|
|
42
43
|
rev: z.number().int(),
|
|
44
|
+
// Its start date was reached within the last 24 hours (E124): the row says "starts today", and
|
|
45
|
+
// `since` is that moment when it came later than the task into its column. Absent otherwise.
|
|
46
|
+
startsToday: z.literal(true).optional(),
|
|
43
47
|
});
|
|
44
48
|
export const ActionChat = z.object({
|
|
45
49
|
// The messages of others not read yet, by the person themselves (not their AI).
|
|
@@ -58,6 +62,10 @@ export const ActionProcess = z.object({
|
|
|
58
62
|
// The moment of the schedule the next run stands for.
|
|
59
63
|
dueAt: z.iso.datetime(),
|
|
60
64
|
});
|
|
65
|
+
// A hint to the responsible of a process (E124, E125): `started`, a run began and waits on them to
|
|
66
|
+
// move its first tasks into Open; `stalled`, no task of the run is in Open or In progress though not
|
|
67
|
+
// all are closed, and they move the next one on. Gone as soon as a task of the run is open again.
|
|
68
|
+
export const ActionRunHint = z.enum(["started", "stalled"]);
|
|
61
69
|
// A card of a process run that is the reader's own (#671): what the run waits on from them, with the
|
|
62
70
|
// rev its next save sends, so an Operator writes it without reading the run first.
|
|
63
71
|
export const ActionRunTask = z.object({
|
|
@@ -73,6 +81,8 @@ export const ActionRun = z.object({
|
|
|
73
81
|
// and their position; never another's. Empty without one, and always for the validation, whose run
|
|
74
82
|
// copies no cards.
|
|
75
83
|
tasks: z.array(ActionRunTask),
|
|
84
|
+
// Only for the responsible of the run's process, while the run waits on them (E124, E125).
|
|
85
|
+
hint: ActionRunHint.optional(),
|
|
76
86
|
});
|
|
77
87
|
// A gadget whose live version broke (#643, Nodes › Gadget › Einstellungen): every new error and every
|
|
78
88
|
// red test waits on its responsible; without one, on its publisher as a hint to name one. Open until
|
|
@@ -89,8 +99,17 @@ export const ActionGadget = z.object({
|
|
|
89
99
|
// Nobody is responsible: the row reaches the publisher only to name one.
|
|
90
100
|
hint: z.boolean(),
|
|
91
101
|
});
|
|
102
|
+
// The tickets of the validation that wait on the holder of `validator` (E132): its latest run found
|
|
103
|
+
// tickets in New, and they still lie there, so the holder goes on until they are checked. On the
|
|
104
|
+
// validation board's row, beside its open run or its due moment, or alone.
|
|
105
|
+
export const ActionValidation = z.object({
|
|
106
|
+
// How many tickets lie in New now (a column of type backlog of the validation board), those that
|
|
107
|
+
// came after the run started included.
|
|
108
|
+
newTickets: z.number().int().positive(),
|
|
109
|
+
});
|
|
92
110
|
// One row: the node, where it waits, since when, and what makes it wait. Exactly one of task,
|
|
93
111
|
// process, run and gadget, or none of them on a row that is a chat alone; chat beside any of them.
|
|
112
|
+
// `validation` stands on the validation board's row only, beside process or run or alone.
|
|
94
113
|
export const ActionItem = z.object({
|
|
95
114
|
node: z.object({
|
|
96
115
|
nodeId: NodeId,
|
|
@@ -106,14 +125,19 @@ export const ActionItem = z.object({
|
|
|
106
125
|
boardKind: BoardShownKind.nullable(),
|
|
107
126
|
}),
|
|
108
127
|
section: ActionSection,
|
|
109
|
-
// Since when it waits: a task since it came into its column
|
|
110
|
-
// message, a due process since its moment, an open run since it
|
|
128
|
+
// Since when it waits: a task since it came into its column (or its start date was reached), a
|
|
129
|
+
// chat since its first unread message, a due process since its moment, an open run since it
|
|
130
|
+
// started, a run that stands since its last task left Open or In progress, the tickets left in
|
|
131
|
+
// New since the run that found them ended.
|
|
111
132
|
since: z.iso.datetime(),
|
|
112
133
|
task: ActionTask.nullable(),
|
|
113
134
|
chat: ActionChat.nullable(),
|
|
114
135
|
process: ActionProcess.nullable(),
|
|
115
136
|
run: ActionRun.nullable(),
|
|
116
137
|
gadget: ActionGadget.nullable(),
|
|
138
|
+
// Absent on every row but the validation board's of the holder of `validator`, and there too
|
|
139
|
+
// once no ticket its latest run found lies in New any more.
|
|
140
|
+
validation: ActionValidation.optional(),
|
|
117
141
|
});
|
|
118
142
|
// What another package puts into a person's Actions (#334, E81, E82): "access invalid" for every
|
|
119
143
|
// admin, "Operator paused" for its responsible person. Gathered when asked like every row, never
|
|
@@ -198,6 +222,12 @@ export function isNodeRow(row) {
|
|
|
198
222
|
export const MachineInstructions = InstructionsLink.extend({
|
|
199
223
|
version: z.int().min(1).nullable(),
|
|
200
224
|
});
|
|
225
|
+
// As `intelligence_action_list` answers them (E123, #677): whole with the digest of all four fields,
|
|
226
|
+
// or only the reference when the machine sent that digest under `known`.
|
|
227
|
+
export const MachineInstructionsRead = z.union([
|
|
228
|
+
MachineInstructions.extend({ digest: Digest }),
|
|
229
|
+
KnownText,
|
|
230
|
+
]);
|
|
201
231
|
export const ActionList = z.object({
|
|
202
232
|
// Newest first by since, then by node id (a notice by package and noticeKey). The filters tasks
|
|
203
233
|
// and chats leave the notices out.
|
|
@@ -207,6 +237,6 @@ export const ActionList = z.object({
|
|
|
207
237
|
count: z.number().int(),
|
|
208
238
|
// Only for a machine reading its own Actions over MCP, never over REST: the INSTRUCTIONS of its
|
|
209
239
|
// root folder as one link of #39's chain with its version, empty when there is none (traps P033,
|
|
210
|
-
// P034).
|
|
211
|
-
instructions:
|
|
240
|
+
// P034); only the reference when it sent their digest under `known` (E123).
|
|
241
|
+
instructions: MachineInstructionsRead.optional(),
|
|
212
242
|
});
|