@anchrd/colab-sdk 0.1.36 → 0.1.37
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 +30 -23
- package/dist/actions/actions.js +2 -2
- package/dist/archive/archive.d.ts +1 -0
- package/dist/archive/archive.js +3 -0
- package/dist/boards/boards.d.ts +21 -21
- package/dist/columns/columns.d.ts +2 -2
- package/dist/connectors/connectors.d.ts +6 -6
- package/dist/crawls/crawls.d.ts +3 -3
- package/dist/error/error.d.ts +9 -3
- package/dist/error/error.js +12 -3
- package/dist/gadgets/gadgets.d.ts +125 -9
- package/dist/gadgets/gadgets.js +123 -0
- package/dist/goals/goals.d.ts +54 -10
- package/dist/goals/goals.js +36 -7
- package/dist/grammar/grammar.d.ts +2 -0
- package/dist/grammar/grammar.js +10 -0
- package/dist/home/home.d.ts +300 -0
- package/dist/home/home.js +53 -0
- package/dist/links/links.d.ts +166 -0
- package/dist/links/links.js +149 -0
- package/dist/mcps/mcps.d.ts +3 -3
- package/dist/messages/messages.d.ts +3 -0
- package/dist/nodes/nodes.d.ts +46 -20
- package/dist/nodes/nodes.js +11 -3
- package/dist/operators/operators.d.ts +389 -47
- package/dist/operators/operators.js +268 -70
- package/dist/organisation/organisation.d.ts +2 -0
- package/dist/organisation/organisation.js +9 -0
- package/dist/primitives/primitives.d.ts +9 -0
- package/dist/primitives/primitives.js +16 -0
- package/dist/roles/roles.d.ts +1 -0
- package/dist/roles/roles.js +3 -0
- package/dist/runs/runs.d.ts +2 -2
- package/dist/sdk.d.ts +10 -9
- package/dist/sdk.js +10 -9
- package/dist/skills/skills.d.ts +37 -7
- package/dist/skills/skills.js +50 -0
- package/dist/sources/sources.d.ts +54 -14
- package/dist/sources/sources.js +50 -5
- package/dist/tables/tables.d.ts +42 -0
- package/dist/tables/tables.js +55 -2
- package/dist/tool.d.ts +1 -0
- package/dist/tree-order/tree-order.d.ts +2 -2
- package/dist/tree-order/tree-order.js +1 -1
- package/dist/users/users.d.ts +2 -0
- package/dist/users/users.js +3 -2
- package/dist/versions/versions.d.ts +13 -13
- package/package.json +1 -1
package/dist/goals/goals.d.ts
CHANGED
|
@@ -143,7 +143,8 @@ export declare const GoalCheck: z.ZodObject<{
|
|
|
143
143
|
}>;
|
|
144
144
|
nodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
145
145
|
name: z.ZodNullable<z.ZodString>;
|
|
146
|
-
nodeKind: z.ZodNullable<z.ZodEnum<{
|
|
146
|
+
nodeKind: z.ZodNullable<z.ZodCatch<z.ZodEnum<{
|
|
147
|
+
unknown: "unknown";
|
|
147
148
|
file: "file";
|
|
148
149
|
folder: "folder";
|
|
149
150
|
document: "document";
|
|
@@ -154,7 +155,7 @@ export declare const GoalCheck: z.ZodObject<{
|
|
|
154
155
|
goal: "goal";
|
|
155
156
|
skill: "skill";
|
|
156
157
|
source: "source";
|
|
157
|
-
}
|
|
158
|
+
}>>>;
|
|
158
159
|
needs: z.ZodNullable<z.ZodEnum<{
|
|
159
160
|
write: "write";
|
|
160
161
|
read: "read";
|
|
@@ -218,7 +219,8 @@ export declare const GoalReady: z.ZodObject<{
|
|
|
218
219
|
}>;
|
|
219
220
|
nodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
220
221
|
name: z.ZodNullable<z.ZodString>;
|
|
221
|
-
nodeKind: z.ZodNullable<z.ZodEnum<{
|
|
222
|
+
nodeKind: z.ZodNullable<z.ZodCatch<z.ZodEnum<{
|
|
223
|
+
unknown: "unknown";
|
|
222
224
|
file: "file";
|
|
223
225
|
folder: "folder";
|
|
224
226
|
document: "document";
|
|
@@ -229,7 +231,7 @@ export declare const GoalReady: z.ZodObject<{
|
|
|
229
231
|
goal: "goal";
|
|
230
232
|
skill: "skill";
|
|
231
233
|
source: "source";
|
|
232
|
-
}
|
|
234
|
+
}>>>;
|
|
233
235
|
needs: z.ZodNullable<z.ZodEnum<{
|
|
234
236
|
write: "write";
|
|
235
237
|
read: "read";
|
|
@@ -300,7 +302,13 @@ export declare const GoalPlanStep: z.ZodObject<{
|
|
|
300
302
|
how: z.ZodNullable<z.ZodString>;
|
|
301
303
|
result: z.ZodNullable<z.ZodString>;
|
|
302
304
|
done: z.ZodBoolean;
|
|
303
|
-
|
|
305
|
+
evidence: z.ZodArray<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
306
|
+
agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
307
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
308
|
+
title: z.ZodString;
|
|
309
|
+
result: z.ZodNullable<z.ZodString>;
|
|
310
|
+
done: z.ZodBoolean;
|
|
311
|
+
}, z.core.$strip>>>;
|
|
304
312
|
}, z.core.$strip>;
|
|
305
313
|
export type GoalPlanStep = z.infer<typeof GoalPlanStep>;
|
|
306
314
|
export declare const GoalFollowUp: z.ZodObject<{
|
|
@@ -338,8 +346,17 @@ export declare const GoalSession: z.ZodObject<{
|
|
|
338
346
|
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
339
347
|
}, z.core.$strip>;
|
|
340
348
|
export type GoalSession = z.infer<typeof GoalSession>;
|
|
349
|
+
export declare const GoalProof: z.ZodObject<{
|
|
350
|
+
criterion: z.ZodString;
|
|
351
|
+
evidence: z.ZodString;
|
|
352
|
+
}, z.core.$strip>;
|
|
353
|
+
export type GoalProof = z.infer<typeof GoalProof>;
|
|
341
354
|
export declare const GoalReport: z.ZodObject<{
|
|
342
355
|
result: z.ZodString;
|
|
356
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
357
|
+
criterion: z.ZodString;
|
|
358
|
+
evidence: z.ZodString;
|
|
359
|
+
}, z.core.$strip>>>;
|
|
343
360
|
changed: z.ZodNullable<z.ZodString>;
|
|
344
361
|
open: z.ZodNullable<z.ZodString>;
|
|
345
362
|
learned: z.ZodNullable<z.ZodString>;
|
|
@@ -495,7 +512,13 @@ export declare const GoalRunDetail: z.ZodObject<{
|
|
|
495
512
|
how: z.ZodNullable<z.ZodString>;
|
|
496
513
|
result: z.ZodNullable<z.ZodString>;
|
|
497
514
|
done: z.ZodBoolean;
|
|
498
|
-
|
|
515
|
+
evidence: z.ZodArray<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
516
|
+
agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
517
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
518
|
+
title: z.ZodString;
|
|
519
|
+
result: z.ZodNullable<z.ZodString>;
|
|
520
|
+
done: z.ZodBoolean;
|
|
521
|
+
}, z.core.$strip>>>;
|
|
499
522
|
}, z.core.$strip>>;
|
|
500
523
|
state: z.ZodNullable<z.ZodString>;
|
|
501
524
|
followUp: z.ZodNullable<z.ZodObject<{
|
|
@@ -533,6 +556,10 @@ export declare const GoalRunDetail: z.ZodObject<{
|
|
|
533
556
|
}, z.core.$strip>>;
|
|
534
557
|
report: z.ZodNullable<z.ZodObject<{
|
|
535
558
|
result: z.ZodString;
|
|
559
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
560
|
+
criterion: z.ZodString;
|
|
561
|
+
evidence: z.ZodString;
|
|
562
|
+
}, z.core.$strip>>>;
|
|
536
563
|
changed: z.ZodNullable<z.ZodString>;
|
|
537
564
|
open: z.ZodNullable<z.ZodString>;
|
|
538
565
|
learned: z.ZodNullable<z.ZodString>;
|
|
@@ -630,6 +657,7 @@ export declare const GoalRunDetail: z.ZodObject<{
|
|
|
630
657
|
claude: "claude";
|
|
631
658
|
codex: "codex";
|
|
632
659
|
gemini: "gemini";
|
|
660
|
+
gateway: "gateway";
|
|
633
661
|
}>>;
|
|
634
662
|
}, z.core.$strip>>;
|
|
635
663
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
@@ -745,7 +773,8 @@ export declare const GoalDetail: z.ZodObject<{
|
|
|
745
773
|
}>;
|
|
746
774
|
nodeId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
747
775
|
name: z.ZodNullable<z.ZodString>;
|
|
748
|
-
nodeKind: z.ZodNullable<z.ZodEnum<{
|
|
776
|
+
nodeKind: z.ZodNullable<z.ZodCatch<z.ZodEnum<{
|
|
777
|
+
unknown: "unknown";
|
|
749
778
|
file: "file";
|
|
750
779
|
folder: "folder";
|
|
751
780
|
document: "document";
|
|
@@ -756,7 +785,7 @@ export declare const GoalDetail: z.ZodObject<{
|
|
|
756
785
|
goal: "goal";
|
|
757
786
|
skill: "skill";
|
|
758
787
|
source: "source";
|
|
759
|
-
}
|
|
788
|
+
}>>>;
|
|
760
789
|
needs: z.ZodNullable<z.ZodEnum<{
|
|
761
790
|
write: "write";
|
|
762
791
|
read: "read";
|
|
@@ -856,7 +885,13 @@ export declare const GoalDetail: z.ZodObject<{
|
|
|
856
885
|
how: z.ZodNullable<z.ZodString>;
|
|
857
886
|
result: z.ZodNullable<z.ZodString>;
|
|
858
887
|
done: z.ZodBoolean;
|
|
859
|
-
|
|
888
|
+
evidence: z.ZodArray<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
889
|
+
agent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
890
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
891
|
+
title: z.ZodString;
|
|
892
|
+
result: z.ZodNullable<z.ZodString>;
|
|
893
|
+
done: z.ZodBoolean;
|
|
894
|
+
}, z.core.$strip>>>;
|
|
860
895
|
}, z.core.$strip>>;
|
|
861
896
|
state: z.ZodNullable<z.ZodString>;
|
|
862
897
|
followUp: z.ZodNullable<z.ZodObject<{
|
|
@@ -894,6 +929,10 @@ export declare const GoalDetail: z.ZodObject<{
|
|
|
894
929
|
}, z.core.$strip>>;
|
|
895
930
|
report: z.ZodNullable<z.ZodObject<{
|
|
896
931
|
result: z.ZodString;
|
|
932
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
933
|
+
criterion: z.ZodString;
|
|
934
|
+
evidence: z.ZodString;
|
|
935
|
+
}, z.core.$strip>>>;
|
|
897
936
|
changed: z.ZodNullable<z.ZodString>;
|
|
898
937
|
open: z.ZodNullable<z.ZodString>;
|
|
899
938
|
learned: z.ZodNullable<z.ZodString>;
|
|
@@ -991,6 +1030,7 @@ export declare const GoalDetail: z.ZodObject<{
|
|
|
991
1030
|
claude: "claude";
|
|
992
1031
|
codex: "codex";
|
|
993
1032
|
gemini: "gemini";
|
|
1033
|
+
gateway: "gateway";
|
|
994
1034
|
}>>;
|
|
995
1035
|
}, z.core.$strip>>;
|
|
996
1036
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
@@ -1095,7 +1135,7 @@ export declare const GoalRunUpdateInput: z.ZodObject<{
|
|
|
1095
1135
|
how: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1096
1136
|
result: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1097
1137
|
done: z.ZodOptional<z.ZodBoolean>;
|
|
1098
|
-
|
|
1138
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodTemplateLiteral<`node_${string}`>>>;
|
|
1099
1139
|
}, z.core.$strict>>>;
|
|
1100
1140
|
state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1101
1141
|
followUp: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1121,6 +1161,10 @@ export declare const GoalRunCompleteInput: z.ZodObject<{
|
|
|
1121
1161
|
participants: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1122
1162
|
frame: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1123
1163
|
}, z.core.$strict>;
|
|
1164
|
+
proof: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1165
|
+
criterion: z.ZodString;
|
|
1166
|
+
evidence: z.ZodString;
|
|
1167
|
+
}, z.core.$strict>>>;
|
|
1124
1168
|
}, z.core.$strict>;
|
|
1125
1169
|
export type GoalRunCompleteInput = z.infer<typeof GoalRunCompleteInput>;
|
|
1126
1170
|
export declare const GoalRunCancelInput: z.ZodObject<{
|
package/dist/goals/goals.js
CHANGED
|
@@ -3,8 +3,8 @@ import { idSchema } from "../ids/ids.js";
|
|
|
3
3
|
import { Limit } from "../list-input.js";
|
|
4
4
|
import { Message } from "../messages/messages.js";
|
|
5
5
|
import { Missing } from "../missing/missing.js";
|
|
6
|
-
import { CreateSection, NodeId,
|
|
7
|
-
import { IdempotencyKey, Rev } from "../primitives/primitives.js";
|
|
6
|
+
import { CreateSection, NodeId, NodeKindRead, NodePath, NodePerson } from "../nodes/nodes.js";
|
|
7
|
+
import { IdempotencyKey, PlanSubstep, planEvidenceMax, Rev } from "../primitives/primitives.js";
|
|
8
8
|
import { Schedule } from "../schedule/schedule.js";
|
|
9
9
|
import { UserId } from "../users/users.js";
|
|
10
10
|
// Goals (#813, Nodes › Ziel, E139): the inputs of `intelligence_goal_create|get|update` and
|
|
@@ -82,7 +82,7 @@ export const GoalCheck = z.object({
|
|
|
82
82
|
nodeId: NodeId.nullable(),
|
|
83
83
|
// The node's name and kind as the caller may read them; null where they may not, or it is gone.
|
|
84
84
|
name: z.string().nullable(),
|
|
85
|
-
nodeKind:
|
|
85
|
+
nodeKind: NodeKindRead.nullable(),
|
|
86
86
|
// The right the Operator needs on the node: write on a board, where it hands over work as cards,
|
|
87
87
|
// read on everything else.
|
|
88
88
|
needs: z.enum(["read", "write"]).nullable(),
|
|
@@ -125,8 +125,12 @@ export const GoalPlanStep = z.object({
|
|
|
125
125
|
how: Paragraph.nullable(),
|
|
126
126
|
result: Paragraph.nullable(),
|
|
127
127
|
done: z.boolean(),
|
|
128
|
-
//
|
|
129
|
-
taskId
|
|
128
|
+
// What the step left (E219, #1037): any node, a document, a table, a card handed over, a file. A
|
|
129
|
+
// step stored before with a `taskId` shows that card here.
|
|
130
|
+
evidence: z.array(NodeId),
|
|
131
|
+
// The subagent of the Operator's run the step went to, and its plan beneath it (E220, #1038).
|
|
132
|
+
agent: z.string().nullable().optional(),
|
|
133
|
+
steps: z.array(PlanSubstep).optional(),
|
|
130
134
|
});
|
|
131
135
|
const GoalPlanStepInput = z.strictObject({
|
|
132
136
|
title: Line.describe("The step in a few words."),
|
|
@@ -135,9 +139,11 @@ const GoalPlanStepInput = z.strictObject({
|
|
|
135
139
|
.describe("How it is done, and by whom: yourself, or a card for someone else."),
|
|
136
140
|
result: Paragraph.nullable().optional().describe("What the step left, once it is done."),
|
|
137
141
|
done: z.boolean().optional().describe("Whether the step is done; leaving it out means not yet."),
|
|
138
|
-
|
|
142
|
+
evidence: z
|
|
143
|
+
.array(NodeId)
|
|
144
|
+
.max(planEvidenceMax)
|
|
139
145
|
.optional()
|
|
140
|
-
.describe("
|
|
146
|
+
.describe("What the step left: the nodes it made or used as proof (a document, a table, a card handed over, a file)."),
|
|
141
147
|
});
|
|
142
148
|
export const GoalFollowUp = z.object({
|
|
143
149
|
at: z.iso.datetime(),
|
|
@@ -172,8 +178,13 @@ const reportParts = {
|
|
|
172
178
|
.describe("Who worked on it, people and Operators."),
|
|
173
179
|
frame: ReportText.nullable().optional().describe("Time and money spent against the frame."),
|
|
174
180
|
};
|
|
181
|
+
// One criterion of the goal's "Fertig wenn" with its proof (E219, #1037): a link to a node or a
|
|
182
|
+
// value someone can check.
|
|
183
|
+
export const GoalProof = z.object({ criterion: z.string(), evidence: z.string() });
|
|
175
184
|
export const GoalReport = z.object({
|
|
176
185
|
result: z.string(),
|
|
186
|
+
// The proof per criterion of a run that was reached (E219); empty for a goal without "Fertig wenn".
|
|
187
|
+
proof: z.array(GoalProof).optional(),
|
|
177
188
|
changed: z.string().nullable(),
|
|
178
189
|
open: z.string().nullable(),
|
|
179
190
|
learned: z.string().nullable(),
|
|
@@ -323,6 +334,24 @@ export const GoalRunCompleteInput = z.strictObject({
|
|
|
323
334
|
.enum(["reached", "missed"])
|
|
324
335
|
.describe("reached when every point of done-when holds, missed otherwise. Ignored for a run that is already over (Colab or a person ended it): then only the report is added."),
|
|
325
336
|
report: z.strictObject(reportParts).describe("The report of the run, sent to Report to."),
|
|
337
|
+
proof: z
|
|
338
|
+
.array(z.strictObject({
|
|
339
|
+
criterion: z
|
|
340
|
+
.string()
|
|
341
|
+
.trim()
|
|
342
|
+
.min(1)
|
|
343
|
+
.max(500)
|
|
344
|
+
.describe("The criterion, as the goal words it."),
|
|
345
|
+
evidence: z
|
|
346
|
+
.string()
|
|
347
|
+
.trim()
|
|
348
|
+
.min(1)
|
|
349
|
+
.max(2000)
|
|
350
|
+
.describe("Its proof: a link to the node (`/n/node_…`) or a value someone can check."),
|
|
351
|
+
}))
|
|
352
|
+
.max(50)
|
|
353
|
+
.optional()
|
|
354
|
+
.describe("With reached: one entry per point of the goal's done-when (Fertig wenn), in its order. reached is refused while one has no proof; missed needs none."),
|
|
326
355
|
});
|
|
327
356
|
export const GoalRunCancelInput = z.strictObject({
|
|
328
357
|
goalId: GoalId,
|
|
@@ -34,6 +34,7 @@ export declare const resources: {
|
|
|
34
34
|
readonly credential: "credentials";
|
|
35
35
|
readonly provider: "providers";
|
|
36
36
|
readonly secret: "secrets";
|
|
37
|
+
readonly token: "tokens";
|
|
37
38
|
readonly step: "steps";
|
|
38
39
|
readonly crawl: "crawls";
|
|
39
40
|
readonly mcp: "mcps";
|
|
@@ -41,6 +42,7 @@ export declare const resources: {
|
|
|
41
42
|
readonly query: "queries";
|
|
42
43
|
readonly item: "items";
|
|
43
44
|
readonly organisation: "organisations";
|
|
45
|
+
readonly home: "homes";
|
|
44
46
|
};
|
|
45
47
|
export declare const actions: readonly ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
46
48
|
export declare const verbs: readonly ["invite", "resend", "disable", "enable", "rotate", "share", "move", "start", "complete", "test", "revoke", "remove", "unlock", "publish", "schedule", "unpublish", "cancel"];
|
package/dist/grammar/grammar.js
CHANGED
|
@@ -63,6 +63,10 @@ export const resources = {
|
|
|
63
63
|
// password, `_get` shows it to an admin in admin mode, `_remove` makes the node public again. One
|
|
64
64
|
// per node, with an id of its own like every sub-resource (`secret_…`).
|
|
65
65
|
secret: "secrets",
|
|
66
|
+
// A Git token of a code node's repository (E215, #976), a sub-resource of the skill, decided by
|
|
67
|
+
// the orchestrator (2026-11-04): `intelligence_skill_token_create` gives one for `git clone` or
|
|
68
|
+
// `git push`, with an expiry; never stored, never in a protocol.
|
|
69
|
+
token: "tokens",
|
|
66
70
|
// One step of an Operator run as its CLI's output showed it (E112), a sub-resource of the run:
|
|
67
71
|
// `operator_run_step_list`. Not `event`, the protocol's resource, and not `message`, a chat's.
|
|
68
72
|
step: "steps",
|
|
@@ -81,6 +85,10 @@ export const resources = {
|
|
|
81
85
|
// The company as a whole (#930, Organisation › System): its default time zone and language,
|
|
82
86
|
// `access_organisation_get` and `_update`. One per installation, so its routes carry no id.
|
|
83
87
|
organisation: "organisations",
|
|
88
|
+
// The start of an installation (#1020, E208, Seiten › Startfläche): `intelligence_home_get`, which
|
|
89
|
+
// gadget stands under `/`, the setup steps and Colab's news. One per installation like
|
|
90
|
+
// `organisation`, so its route carries no id. The word the orchestrator gave the start for #993.
|
|
91
|
+
home: "homes",
|
|
84
92
|
};
|
|
85
93
|
// The closed list of actions with a route of their own shape.
|
|
86
94
|
export const actions = ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
@@ -244,6 +252,8 @@ const routeExceptions = {
|
|
|
244
252
|
// The one organisation of an installation (#930): there is no `organisationId` to name.
|
|
245
253
|
access_organisation_get: { method: "GET", path: "/api/access/organisation" },
|
|
246
254
|
access_organisation_update: { method: "PATCH", path: "/api/access/organisation" },
|
|
255
|
+
// The one start of an installation (#1020): there is no `homeId` to name either.
|
|
256
|
+
intelligence_home_get: { method: "GET", path: "/api/intelligence/home" },
|
|
247
257
|
};
|
|
248
258
|
// `access_user_invite` → `POST /api/access/users/:userId/invite`.
|
|
249
259
|
export function toolRoute(name) {
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const homeSetupSteps: readonly ["profile", "ai", "operator", "goal", "team", "credential", "signin", "connector"];
|
|
3
|
+
export declare const HomeSetupStep: z.ZodEnum<{
|
|
4
|
+
operator: "operator";
|
|
5
|
+
goal: "goal";
|
|
6
|
+
connector: "connector";
|
|
7
|
+
credential: "credential";
|
|
8
|
+
signin: "signin";
|
|
9
|
+
profile: "profile";
|
|
10
|
+
ai: "ai";
|
|
11
|
+
team: "team";
|
|
12
|
+
}>;
|
|
13
|
+
export type HomeSetupStep = z.infer<typeof HomeSetupStep>;
|
|
14
|
+
export declare const homePersonSteps: ReadonlySet<HomeSetupStep>;
|
|
15
|
+
export declare const homeIncludes: readonly ["setup", "news", "gadget"];
|
|
16
|
+
export declare const HomeGetInput: z.ZodObject<{
|
|
17
|
+
include: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodEnum<{
|
|
18
|
+
gadget: "gadget";
|
|
19
|
+
setup: "setup";
|
|
20
|
+
news: "news";
|
|
21
|
+
}>>, unknown>>;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
export type HomeGetInput = z.infer<typeof HomeGetInput>;
|
|
24
|
+
export declare const ColabNews: z.ZodObject<{
|
|
25
|
+
version: z.ZodString;
|
|
26
|
+
area: z.ZodString;
|
|
27
|
+
text: z.ZodString;
|
|
28
|
+
ticket: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type ColabNews = z.infer<typeof ColabNews>;
|
|
31
|
+
export declare const HomeSetupState: z.ZodObject<{
|
|
32
|
+
step: z.ZodEnum<{
|
|
33
|
+
operator: "operator";
|
|
34
|
+
goal: "goal";
|
|
35
|
+
connector: "connector";
|
|
36
|
+
credential: "credential";
|
|
37
|
+
signin: "signin";
|
|
38
|
+
profile: "profile";
|
|
39
|
+
ai: "ai";
|
|
40
|
+
team: "team";
|
|
41
|
+
}>;
|
|
42
|
+
scope: z.ZodEnum<{
|
|
43
|
+
organisation: "organisation";
|
|
44
|
+
person: "person";
|
|
45
|
+
}>;
|
|
46
|
+
done: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type HomeSetupState = z.infer<typeof HomeSetupState>;
|
|
49
|
+
export declare const Home: z.ZodObject<{
|
|
50
|
+
gadgetId: z.ZodNullable<z.ZodString>;
|
|
51
|
+
setup: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
step: z.ZodEnum<{
|
|
53
|
+
operator: "operator";
|
|
54
|
+
goal: "goal";
|
|
55
|
+
connector: "connector";
|
|
56
|
+
credential: "credential";
|
|
57
|
+
signin: "signin";
|
|
58
|
+
profile: "profile";
|
|
59
|
+
ai: "ai";
|
|
60
|
+
team: "team";
|
|
61
|
+
}>;
|
|
62
|
+
scope: z.ZodEnum<{
|
|
63
|
+
organisation: "organisation";
|
|
64
|
+
person: "person";
|
|
65
|
+
}>;
|
|
66
|
+
done: z.ZodBoolean;
|
|
67
|
+
}, z.core.$strip>>>;
|
|
68
|
+
news: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
69
|
+
version: z.ZodString;
|
|
70
|
+
area: z.ZodString;
|
|
71
|
+
text: z.ZodString;
|
|
72
|
+
ticket: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>>>;
|
|
74
|
+
gadget: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
75
|
+
gadgetId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
hidden: z.ZodBoolean;
|
|
78
|
+
parentId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
79
|
+
path: z.ZodObject<{
|
|
80
|
+
section: z.ZodEnum<{
|
|
81
|
+
users: "users";
|
|
82
|
+
own: "own";
|
|
83
|
+
shared: "shared";
|
|
84
|
+
}>;
|
|
85
|
+
items: z.ZodArray<z.ZodObject<{
|
|
86
|
+
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
version: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"draft">]>>;
|
|
91
|
+
manifest: z.ZodNullable<z.ZodObject<{
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
description: z.ZodOptional<z.ZodString>;
|
|
94
|
+
access: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
service: z.ZodTemplateLiteral<`service_${string}`>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
uses: z.ZodOptional<z.ZodRecord<z.ZodTemplateLiteral<`node_${string}`>, z.ZodEnum<{
|
|
98
|
+
write: "write";
|
|
99
|
+
read: "read";
|
|
100
|
+
}>>>;
|
|
101
|
+
functions: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
102
|
+
description: z.ZodString;
|
|
103
|
+
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
104
|
+
requires: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, z.core.$strict>>;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
files: z.ZodArray<z.ZodObject<{
|
|
108
|
+
path: z.ZodString;
|
|
109
|
+
size: z.ZodNumber;
|
|
110
|
+
content: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
live: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
version: z.ZodNumber;
|
|
114
|
+
publishedAt: z.ZodISODateTime;
|
|
115
|
+
publishedBy: z.ZodObject<{
|
|
116
|
+
userId: z.ZodString;
|
|
117
|
+
name: z.ZodNullable<z.ZodString>;
|
|
118
|
+
kind: z.ZodNullable<z.ZodEnum<{
|
|
119
|
+
machine: "machine";
|
|
120
|
+
human: "human";
|
|
121
|
+
}>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
}, z.core.$strip>>;
|
|
124
|
+
draft: z.ZodNullable<z.ZodObject<{
|
|
125
|
+
updatedAt: z.ZodISODateTime;
|
|
126
|
+
updatedBy: z.ZodObject<{
|
|
127
|
+
userId: z.ZodString;
|
|
128
|
+
name: z.ZodNullable<z.ZodString>;
|
|
129
|
+
kind: z.ZodNullable<z.ZodEnum<{
|
|
130
|
+
machine: "machine";
|
|
131
|
+
human: "human";
|
|
132
|
+
}>>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
changes: z.ZodArray<z.ZodObject<{
|
|
135
|
+
path: z.ZodString;
|
|
136
|
+
change: z.ZodEnum<{
|
|
137
|
+
added: "added";
|
|
138
|
+
changed: "changed";
|
|
139
|
+
removed: "removed";
|
|
140
|
+
}>;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
newTools: z.ZodArray<z.ZodString>;
|
|
143
|
+
newUses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
144
|
+
nodeId: z.ZodString;
|
|
145
|
+
name: z.ZodNullable<z.ZodString>;
|
|
146
|
+
right: z.ZodEnum<{
|
|
147
|
+
write: "write";
|
|
148
|
+
read: "read";
|
|
149
|
+
}>;
|
|
150
|
+
}, z.core.$strip>>>;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
test: z.ZodNullable<z.ZodObject<{
|
|
153
|
+
version: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"draft">]>;
|
|
154
|
+
current: z.ZodBoolean;
|
|
155
|
+
status: z.ZodEnum<{
|
|
156
|
+
running: "running";
|
|
157
|
+
failed: "failed";
|
|
158
|
+
passed: "passed";
|
|
159
|
+
}>;
|
|
160
|
+
passed: z.ZodNumber;
|
|
161
|
+
failed: z.ZodNumber;
|
|
162
|
+
at: z.ZodISODateTime;
|
|
163
|
+
by: z.ZodObject<{
|
|
164
|
+
userId: z.ZodString;
|
|
165
|
+
name: z.ZodNullable<z.ZodString>;
|
|
166
|
+
kind: z.ZodNullable<z.ZodEnum<{
|
|
167
|
+
machine: "machine";
|
|
168
|
+
human: "human";
|
|
169
|
+
}>>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
durationMs: z.ZodNumber;
|
|
172
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
173
|
+
message: z.ZodString;
|
|
174
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
tests: z.ZodArray<z.ZodObject<{
|
|
177
|
+
file: z.ZodString;
|
|
178
|
+
path: z.ZodArray<z.ZodString>;
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
status: z.ZodEnum<{
|
|
181
|
+
failed: "failed";
|
|
182
|
+
passed: "passed";
|
|
183
|
+
}>;
|
|
184
|
+
durationMs: z.ZodNumber;
|
|
185
|
+
message: z.ZodNullable<z.ZodString>;
|
|
186
|
+
location: z.ZodNullable<z.ZodObject<{
|
|
187
|
+
file: z.ZodString;
|
|
188
|
+
line: z.ZodNumber;
|
|
189
|
+
column: z.ZodNumber;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
192
|
+
name: z.ZodString;
|
|
193
|
+
durationMs: z.ZodNumber;
|
|
194
|
+
code: z.ZodNullable<z.ZodEnum<{
|
|
195
|
+
unavailable: "unavailable";
|
|
196
|
+
not_found: "not_found";
|
|
197
|
+
invalid: "invalid";
|
|
198
|
+
conflict: "conflict";
|
|
199
|
+
unauthenticated: "unauthenticated";
|
|
200
|
+
}>>;
|
|
201
|
+
}, z.core.$strip>>>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
hooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
204
|
+
file: z.ZodString;
|
|
205
|
+
durationMs: z.ZodNumber;
|
|
206
|
+
calls: z.ZodArray<z.ZodObject<{
|
|
207
|
+
name: z.ZodString;
|
|
208
|
+
durationMs: z.ZodNumber;
|
|
209
|
+
code: z.ZodNullable<z.ZodEnum<{
|
|
210
|
+
unavailable: "unavailable";
|
|
211
|
+
not_found: "not_found";
|
|
212
|
+
invalid: "invalid";
|
|
213
|
+
conflict: "conflict";
|
|
214
|
+
unauthenticated: "unauthenticated";
|
|
215
|
+
}>>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
217
|
+
}, z.core.$strip>>>;
|
|
218
|
+
note: z.ZodOptional<z.ZodString>;
|
|
219
|
+
limits: z.ZodObject<{
|
|
220
|
+
testMs: z.ZodNumber;
|
|
221
|
+
testTools: z.ZodNumber;
|
|
222
|
+
fileMs: z.ZodNumber;
|
|
223
|
+
fileCpuMs: z.ZodNumber;
|
|
224
|
+
fileMemoryMb: z.ZodNumber;
|
|
225
|
+
filesAtOnce: z.ZodNumber;
|
|
226
|
+
runMs: z.ZodNumber;
|
|
227
|
+
hooksMs: z.ZodNumber;
|
|
228
|
+
hooksTools: z.ZodNumber;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
usage: z.ZodNullable<z.ZodObject<{
|
|
232
|
+
calls: z.ZodNumber;
|
|
233
|
+
errors: z.ZodNumber;
|
|
234
|
+
lastCallAt: z.ZodNullable<z.ZodISODateTime>;
|
|
235
|
+
}, z.core.$strip>>;
|
|
236
|
+
settings: z.ZodNullable<z.ZodObject<{
|
|
237
|
+
responsible: z.ZodNullable<z.ZodObject<{
|
|
238
|
+
userId: z.ZodString;
|
|
239
|
+
name: z.ZodNullable<z.ZodString>;
|
|
240
|
+
kind: z.ZodNullable<z.ZodEnum<{
|
|
241
|
+
machine: "machine";
|
|
242
|
+
human: "human";
|
|
243
|
+
}>>;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
level: z.ZodEnum<{
|
|
246
|
+
publish: "publish";
|
|
247
|
+
draft: "draft";
|
|
248
|
+
report: "report";
|
|
249
|
+
}>;
|
|
250
|
+
logDays: z.ZodNumber;
|
|
251
|
+
}, z.core.$strip>>;
|
|
252
|
+
rights: z.ZodObject<{
|
|
253
|
+
write: z.ZodBoolean;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
access: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
256
|
+
serviceId: z.ZodString;
|
|
257
|
+
name: z.ZodNullable<z.ZodString>;
|
|
258
|
+
archived: z.ZodBoolean;
|
|
259
|
+
functions: z.ZodArray<z.ZodString>;
|
|
260
|
+
held: z.ZodArray<z.ZodString>;
|
|
261
|
+
}, z.core.$strip>>>;
|
|
262
|
+
uses: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
263
|
+
nodeId: z.ZodString;
|
|
264
|
+
name: z.ZodNullable<z.ZodString>;
|
|
265
|
+
path: z.ZodArray<z.ZodString>;
|
|
266
|
+
right: z.ZodEnum<{
|
|
267
|
+
write: "write";
|
|
268
|
+
read: "read";
|
|
269
|
+
}>;
|
|
270
|
+
missing: z.ZodBoolean;
|
|
271
|
+
own: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
+
}, z.core.$strip>>>>;
|
|
273
|
+
link: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
274
|
+
originalId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
275
|
+
name: z.ZodNullable<z.ZodString>;
|
|
276
|
+
uses: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
277
|
+
}, z.core.$strip>>>;
|
|
278
|
+
links: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
279
|
+
gadgetId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
280
|
+
name: z.ZodNullable<z.ZodString>;
|
|
281
|
+
}, z.core.$strip>>>>;
|
|
282
|
+
diff: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
283
|
+
from: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"draft">]>>;
|
|
284
|
+
to: z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"draft">]>>;
|
|
285
|
+
files: z.ZodArray<z.ZodObject<{
|
|
286
|
+
path: z.ZodString;
|
|
287
|
+
change: z.ZodEnum<{
|
|
288
|
+
added: "added";
|
|
289
|
+
changed: "changed";
|
|
290
|
+
removed: "removed";
|
|
291
|
+
}>;
|
|
292
|
+
before: z.ZodNullable<z.ZodString>;
|
|
293
|
+
after: z.ZodNullable<z.ZodString>;
|
|
294
|
+
}, z.core.$strip>>;
|
|
295
|
+
}, z.core.$strip>>>;
|
|
296
|
+
rev: z.ZodNumber;
|
|
297
|
+
archivedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
298
|
+
}, z.core.$strip>>>;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
export type Home = z.infer<typeof Home>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GadgetDetail } from "../gadgets/gadgets.js";
|
|
3
|
+
// The start (#1020, E208, Seiten › Startfläche): what stands under `/` is the live version of a
|
|
4
|
+
// gadget the organisation names. This read gives the page which gadget that is, and the gadget what
|
|
5
|
+
// only Colab knows: the setup steps and Colab's news. Its look lives in the gadget, not here.
|
|
6
|
+
// The fixed steps, in the order a gadget may show them; Colab knows when each is done.
|
|
7
|
+
export const homeSetupSteps = [
|
|
8
|
+
"profile",
|
|
9
|
+
"ai",
|
|
10
|
+
"operator",
|
|
11
|
+
"goal",
|
|
12
|
+
"team",
|
|
13
|
+
"credential",
|
|
14
|
+
"signin",
|
|
15
|
+
"connector",
|
|
16
|
+
];
|
|
17
|
+
export const HomeSetupStep = z.enum(homeSetupSteps);
|
|
18
|
+
// The four steps of a person; the others hold for the whole installation.
|
|
19
|
+
export const homePersonSteps = new Set([
|
|
20
|
+
"profile",
|
|
21
|
+
"ai",
|
|
22
|
+
"operator",
|
|
23
|
+
"goal",
|
|
24
|
+
]);
|
|
25
|
+
export const homeIncludes = ["setup", "news", "gadget"];
|
|
26
|
+
// `include` over REST is one comma-separated value (`?include=setup,news`): a query carries text.
|
|
27
|
+
export const HomeGetInput = z.strictObject({
|
|
28
|
+
include: z
|
|
29
|
+
.preprocess((value) => (typeof value === "string" ? value.split(",") : value), z.array(z.enum(homeIncludes)).max(homeIncludes.length))
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("What to add to gadgetId: setup (the fixed setup steps, each done or not), news (Colab's newest changelog lines) and gadget (that gadget's live version with its files, as intelligence_gadget_get answers it, or null where you may not read it or it has none). Left out: none of them."),
|
|
32
|
+
});
|
|
33
|
+
// One line of Colab's changelog: `- Area: what changed (#n).` under `## <version>`.
|
|
34
|
+
export const ColabNews = z.object({
|
|
35
|
+
version: z.string(),
|
|
36
|
+
area: z.string(),
|
|
37
|
+
text: z.string(),
|
|
38
|
+
ticket: z.number().int(),
|
|
39
|
+
});
|
|
40
|
+
export const HomeSetupState = z.object({
|
|
41
|
+
step: HomeSetupStep,
|
|
42
|
+
scope: z.enum(["person", "organisation"]),
|
|
43
|
+
done: z.boolean(),
|
|
44
|
+
});
|
|
45
|
+
export const Home = z.object({
|
|
46
|
+
// The gadget under `/`, null while the organisation names none.
|
|
47
|
+
gadgetId: z.string().nullable(),
|
|
48
|
+
setup: z.array(HomeSetupState).optional(),
|
|
49
|
+
news: z.array(ColabNews).optional(),
|
|
50
|
+
// The start's live version with its files, read with the caller's rights in the same answer, so
|
|
51
|
+
// `/` needs one request (#1020); null without the right or without a live version.
|
|
52
|
+
gadget: GadgetDetail.nullable().optional(),
|
|
53
|
+
});
|