@anchrd/colab-sdk 0.1.22 → 0.1.24

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.
@@ -0,0 +1,245 @@
1
+ import { z } from "zod";
2
+ import { idSchema } from "../ids/ids.js";
3
+ import { Flag, Limit } from "../list-input.js";
4
+ import { NodeId, NodePath, NodePerson } from "../nodes/nodes.js";
5
+ import { IdempotencyKey, Rev } from "../primitives/primitives.js";
6
+ // Skills (#817, #807, Nodes › Skill, E140): the inputs of `intelligence_skill_create|get|update|test`
7
+ // and `intelligence_skill_run_list|get`, and their answers. A skill says how something is done well:
8
+ // its text in Markdown, the result that is there at the end, and a trigger that says when it fits.
9
+ // Its tests check the result, not the way, with recordings of real runs.
10
+ export const SkillId = NodeId.describe("The skill's id, a `node_…` of kind skill.");
11
+ // A run of a skill is the resource `run` (`run_…`), like a run of a goal.
12
+ const RunId = idSchema("run").describe("The run's id, `run_…`, as intelligence_skill_run_list names it.");
13
+ const Content = z
14
+ .string()
15
+ .max(200_000)
16
+ .describe("The skill's text as Markdown, without a fixed structure and without a title (the name is the title). Its first paragraph says what the skill is for.");
17
+ const Result = z
18
+ .string()
19
+ .max(20_000)
20
+ .describe("What is there at the end, as a Markdown list of checkable sentences, one point per line. The tests check against it; optional, but tests need it.");
21
+ const Trigger = z
22
+ .string()
23
+ .max(2000)
24
+ .describe("When the skill fits, like the description of a Claude skill: an Operator reads it with the name at the start of a run and decides itself whether to load the skill. Used only while triggerOn is true.");
25
+ const TriggerOn = z
26
+ .boolean()
27
+ .describe("Whether the trigger is used. Off, the skill comes only when someone names it with @Skill; its trigger text stays.");
28
+ // The code of a skill (#807): `evals.yaml` and `data/<case>/<tool>.json`.
29
+ export const skillFilePattern = /^(evals\.yaml|data\/[a-z0-9][a-z0-9-]{0,63}\/[a-z0-9_]{1,80}\.json)$/;
30
+ export const SkillFilePath = z
31
+ .string()
32
+ .regex(skillFilePattern)
33
+ .describe("`evals.yaml`, or `data/<case>/<tool>.json` with the recorded answers of one tool for one test case (case in kebab-case).");
34
+ const FileText = z.string().max(500_000);
35
+ export const SkillCreateInput = z.strictObject({
36
+ // ⚠️ Required and nullable (trap C015): null is the top level of Shared.
37
+ parentId: NodeId.nullable().describe("The folder to create the skill in, one you can write to, mostly `.Skills` or the folder it is for; null creates it on the top level of Shared."),
38
+ name: z.string().max(200).describe("The name as people read it, like `Leads übernehmen`."),
39
+ content: Content,
40
+ result: Result.optional(),
41
+ trigger: Trigger.optional(),
42
+ triggerOn: TriggerOn.optional(),
43
+ idempotencyKey: IdempotencyKey,
44
+ });
45
+ export const SkillGetInput = z.strictObject({
46
+ skillId: SkillId,
47
+ files: Flag.optional().describe("Also answer the code (evals.yaml and data/) and the latest test run. Only for whoever may change the skill; a reader gets neither."),
48
+ });
49
+ export const SkillUpdateInput = z.strictObject({
50
+ skillId: SkillId,
51
+ content: Content.optional(),
52
+ result: Result.optional(),
53
+ trigger: Trigger.optional(),
54
+ triggerOn: TriggerOn.optional(),
55
+ files: z
56
+ .record(SkillFilePath, FileText.nullable())
57
+ .optional()
58
+ .describe("Files of the code to write, by path; null removes one. Files you leave out stay as they are."),
59
+ fromRun: RunId.optional().describe("A run of the skill's log to take over as a test case: writes data/<case>/ with the answers of its reading tools and a case in evals.yaml with aus_lauf. Write the expectation into the case afterwards."),
60
+ rev: Rev,
61
+ editSession: z
62
+ .string()
63
+ .min(1)
64
+ .max(100)
65
+ .optional()
66
+ .describe("The editing session the editor keeps while a person stays on the skill: saves of one session go into one version. Leaving it out makes every save a version of its own, which is right for an AI."),
67
+ });
68
+ export const SkillTestInput = z.strictObject({
69
+ skillId: SkillId,
70
+ record: z
71
+ .string()
72
+ .min(1)
73
+ .max(200)
74
+ .optional()
75
+ .describe("The name of one case to record anew: it runs once with real reading tools and the rights of the Operator in evals.yaml; if it passes, its data/ replaces the old recording. Writing still goes into the sandbox."),
76
+ });
77
+ export const SkillRunListInput = z.strictObject({
78
+ skillId: SkillId,
79
+ cursor: z
80
+ .string()
81
+ .max(1000)
82
+ .optional()
83
+ .describe("The nextCursor of the previous page, unchanged. Leaving it out starts at the newest."),
84
+ limit: Limit.optional().describe("How many runs one page holds, 1 to 100. Leaving it out gives 50."),
85
+ });
86
+ export const SkillRunGetInput = z.strictObject({ skillId: SkillId, runId: RunId });
87
+ export const SkillFile = z.object({ path: z.string(), content: z.string() });
88
+ // One point a case is checked against: a line of the result, or one it expects in addition.
89
+ export const SkillPoint = z.object({
90
+ text: z.string(),
91
+ kind: z.enum(["result", "expected"]),
92
+ ok: z.boolean(),
93
+ // Why it failed, as the grading model read the trace and the result; null when it passed.
94
+ reason: z.string().nullable(),
95
+ });
96
+ export const skillCaseStatuses = ["passed", "failed", "missing"];
97
+ // What the model read and wrote in a step of the tests, in tokens (#835, E146).
98
+ export const SkillTokens = z.object({ input: z.int(), output: z.int() });
99
+ export const SkillCaseResult = z.object({
100
+ name: z.string(),
101
+ // passed: every run passed every point; failed: one did not; missing: a tool without a recording
102
+ // was called, so the case stopped before it ran it. Not a fault of the skill.
103
+ status: z.enum(skillCaseStatuses),
104
+ // When the case's data was recorded, with which version; null where evals.yaml does not say.
105
+ recordedAt: z.string().nullable(),
106
+ fromRun: z.string().nullable(),
107
+ runs: z.int(),
108
+ passedRuns: z.int(),
109
+ points: z.array(SkillPoint),
110
+ // The call without a recording that stopped the case.
111
+ missing: z.object({ tool: z.string(), path: z.string() }).nullable(),
112
+ // The sandbox's writes of the last run: what it would have written, written nowhere.
113
+ sandbox: z.array(z.object({ tool: z.string() })),
114
+ costUsd: z.number(),
115
+ // The model's tokens over every run of the case (#835); absent in a report from before.
116
+ tokens: SkillTokens.optional(),
117
+ // The probe run of the case's last attempt, its trace in the log.
118
+ runId: RunId.nullable(),
119
+ });
120
+ export const SkillTriggerHit = z.object({
121
+ kind: z.enum(["should", "shouldNot"]),
122
+ request: z.string(),
123
+ // The skill the model chose for the request, by name; null for none.
124
+ chosen: z.string().nullable(),
125
+ ok: z.boolean(),
126
+ });
127
+ export const SkillTestReport = z.object({
128
+ version: z.int(),
129
+ at: z.iso.datetime(),
130
+ by: NodePerson,
131
+ passed: z.int(),
132
+ failed: z.int(),
133
+ missing: z.int(),
134
+ // Only while the trigger is on and evals.yaml names requests.
135
+ trigger: z
136
+ .object({
137
+ // How many skills the list held that the Operator sees at its start.
138
+ skills: z.int(),
139
+ operator: NodePerson.nullable(),
140
+ hits: z.array(SkillTriggerHit),
141
+ costUsd: z.number(),
142
+ tokens: SkillTokens.optional(),
143
+ })
144
+ .nullable(),
145
+ cases: z.array(SkillCaseResult),
146
+ // What evals.yaml got wrong, a sentence; null when it reads.
147
+ problem: z.string().nullable(),
148
+ });
149
+ export const SkillDetail = z.object({
150
+ skillId: SkillId,
151
+ name: z.string(),
152
+ hidden: z.boolean(),
153
+ parentId: NodeId.nullable(),
154
+ path: NodePath,
155
+ content: z.string(),
156
+ result: z.string(),
157
+ trigger: z.string(),
158
+ triggerOn: z.boolean(),
159
+ // The current version's number ("Version 13").
160
+ version: z.int(),
161
+ rev: z.int(),
162
+ archivedAt: z.iso.datetime().nullable(),
163
+ // The code and the latest test run, only for whoever may change the skill and asked for them;
164
+ // null otherwise. Recordings carry real data of runs that a reader does not see (E140).
165
+ files: z.array(SkillFile).nullable(),
166
+ test: SkillTestReport.nullable(),
167
+ rights: z.object({
168
+ // Change the skill, see its code and console, run its tests.
169
+ write: z.boolean(),
170
+ }),
171
+ });
172
+ export const skillRunKinds = ["operator", "person", "probe"];
173
+ export const skillRunStatuses = [
174
+ "open",
175
+ "reached",
176
+ "missed",
177
+ "passed",
178
+ "failed",
179
+ "missing",
180
+ ];
181
+ export const SkillRunItem = z.object({
182
+ runId: RunId,
183
+ skillId: SkillId,
184
+ // operator: an Operator ran it; person: a person through their AI; probe: a test case.
185
+ kind: z.enum(skillRunKinds),
186
+ by: NodePerson,
187
+ // The connected app it came through ("Claude"), null for an Operator and a probe.
188
+ via: z.string().nullable(),
189
+ // Where it ran: the goal of an Operator run, the chat or a test case.
190
+ context: z.object({
191
+ kind: z.enum(["goal", "chat", "tests"]),
192
+ nodeId: NodeId.nullable(),
193
+ name: z.string().nullable(),
194
+ }),
195
+ // The skill's version it ran with.
196
+ version: z.int(),
197
+ // open while nothing says how it ended; reached and missed from the goal run it worked for;
198
+ // passed, failed and missing for a probe.
199
+ status: z.enum(skillRunStatuses),
200
+ startedAt: z.iso.datetime(),
201
+ calls: z.int(),
202
+ // The case of a probe, null otherwise.
203
+ caseName: z.string().nullable(),
204
+ // Taken over as a test case: its recording stays past the 30 days.
205
+ kept: z.boolean(),
206
+ });
207
+ export const SkillRunCall = z.object({
208
+ seq: z.int(),
209
+ tool: z.string(),
210
+ write: z.boolean(),
211
+ // Recorded only in the sandbox of a probe: written nowhere.
212
+ sandbox: z.boolean(),
213
+ input: z.unknown(),
214
+ answer: z.unknown(),
215
+ // How many rows or entries the answer carried, null where it holds no list.
216
+ size: z.int().nullable(),
217
+ durationMs: z.int(),
218
+ // The error code of a refused call, null otherwise.
219
+ code: z.string().nullable(),
220
+ });
221
+ export const SkillRunDetail = SkillRunItem.extend({
222
+ calls: z.array(SkillRunCall),
223
+ // A point that failed, with the grading's reason; null where nothing failed.
224
+ note: z.string().nullable(),
225
+ // When the recording goes: 30 days after the run, null when kept.
226
+ expiresAt: z.iso.datetime().nullable(),
227
+ });
228
+ export const SkillRunList = z.object({
229
+ items: z.array(SkillRunItem),
230
+ nextCursor: z.string().nullable(),
231
+ });
232
+ // What a version of a skill holds beside its text (E140): result, trigger and the code.
233
+ export const SkillFields = z.object({
234
+ result: z.string(),
235
+ trigger: z.string(),
236
+ triggerOn: z.boolean(),
237
+ files: z.record(z.string(), z.string()),
238
+ });
239
+ // The skills an Operator gets at the start of a run (E140): name and trigger of every readable skill
240
+ // with its trigger on, from `.Skills` and the folders above the nodes it works at.
241
+ export const SkillOffer = z.object({
242
+ skillId: SkillId,
243
+ name: z.string(),
244
+ trigger: z.string(),
245
+ });
package/dist/tool.d.ts CHANGED
@@ -10,6 +10,7 @@ export type Actor = {
10
10
  adminMode: boolean;
11
11
  client?: string;
12
12
  session?: string;
13
+ operator?: string;
13
14
  };
14
15
  export type ToolSource = "api" | "mcp";
15
16
  export type ToolContext = {
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
  export declare const validationBoardId: "node_0000000000000000000000VA1D";
3
3
  export declare const ValidationBoardId: z.ZodLiteral<"node_0000000000000000000000VA1D">;
4
4
  export type ValidationBoardId = z.infer<typeof ValidationBoardId>;
5
+ export declare const validationGoalId: "node_0000000000000000000000VA1G";
5
6
  export declare const TicketSubject: z.ZodObject<{
6
7
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
7
8
  kind: z.ZodEnum<{
@@ -12,6 +13,8 @@ export declare const TicketSubject: z.ZodObject<{
12
13
  board: "board";
13
14
  task: "task";
14
15
  gadget: "gadget";
16
+ goal: "goal";
17
+ skill: "skill";
15
18
  }>;
16
19
  name: z.ZodString;
17
20
  path: z.ZodObject<{
@@ -37,6 +40,8 @@ export declare const TicketSubjectRef: z.ZodObject<{
37
40
  board: "board";
38
41
  task: "task";
39
42
  gadget: "gadget";
43
+ goal: "goal";
44
+ skill: "skill";
40
45
  }>;
41
46
  path: z.ZodObject<{
42
47
  section: z.ZodEnum<{
@@ -10,6 +10,10 @@ export const validationBoardId = "node_0000000000000000000000VA1D";
10
10
  export const ValidationBoardId = z
11
11
  .literal(validationBoardId)
12
12
  .describe("The validation board, the same id in every Colab.");
13
+ // ⚠️ The system goal of the validation (#814, E139): when and how the board is worked, a goal with
14
+ // rhythm, budget and runs like any. Exactly one per Colab, a node of kind `goal` that stands in no
15
+ // area of the tree, made beside the board on its first use, never archived. A ULID of zeros and `VA1G`.
16
+ export const validationGoalId = "node_0000000000000000000000VA1G";
13
17
  // The node a ticket validates, as the caller can read it.
14
18
  export const TicketSubject = z.object({
15
19
  nodeId: NodeId,
@@ -52,11 +52,11 @@ export declare const TaskVersionChange: z.ZodEnum<{
52
52
  title: "title";
53
53
  text: "text";
54
54
  dates: "dates";
55
+ waiting: "waiting";
55
56
  assignee: "assignee";
56
57
  labels: "labels";
57
58
  parent: "parent";
58
59
  dependencies: "dependencies";
59
- waiting: "waiting";
60
60
  }>;
61
61
  export type TaskVersionChange = z.infer<typeof TaskVersionChange>;
62
62
  export declare const TaskMove: z.ZodObject<{
@@ -168,11 +168,11 @@ export declare const NodeVersion: z.ZodObject<{
168
168
  title: "title";
169
169
  text: "text";
170
170
  dates: "dates";
171
+ waiting: "waiting";
171
172
  assignee: "assignee";
172
173
  labels: "labels";
173
174
  parent: "parent";
174
175
  dependencies: "dependencies";
175
- waiting: "waiting";
176
176
  }>>>;
177
177
  }, z.core.$strip>;
178
178
  export type NodeVersion = z.infer<typeof NodeVersion>;
@@ -229,11 +229,11 @@ export declare const NodeVersionList: z.ZodObject<{
229
229
  title: "title";
230
230
  text: "text";
231
231
  dates: "dates";
232
+ waiting: "waiting";
232
233
  assignee: "assignee";
233
234
  labels: "labels";
234
235
  parent: "parent";
235
236
  dependencies: "dependencies";
236
- waiting: "waiting";
237
237
  }>>>;
238
238
  }, z.core.$strip>>;
239
239
  nextCursor: z.ZodNullable<z.ZodString>;
@@ -292,11 +292,11 @@ export declare const NodeVersionDetail: z.ZodObject<{
292
292
  title: "title";
293
293
  text: "text";
294
294
  dates: "dates";
295
+ waiting: "waiting";
295
296
  assignee: "assignee";
296
297
  labels: "labels";
297
298
  parent: "parent";
298
299
  dependencies: "dependencies";
299
- waiting: "waiting";
300
300
  }>>>;
301
301
  secret: z.ZodOptional<z.ZodLiteral<true>>;
302
302
  locked: z.ZodOptional<z.ZodBoolean>;
@@ -328,6 +328,66 @@ export declare const NodeVersionDetail: z.ZodObject<{
328
328
  done: z.ZodBoolean;
329
329
  }, z.core.$strip>>]>;
330
330
  }, z.core.$strip>>>;
331
+ goal: z.ZodNullable<z.ZodObject<{
332
+ operatorId: z.ZodNullable<z.ZodString>;
333
+ rhythm: z.ZodNullable<z.ZodObject<{
334
+ rhythm: z.ZodEnum<{
335
+ manual: "manual";
336
+ daily: "daily";
337
+ weekly: "weekly";
338
+ monthly: "monthly";
339
+ dates: "dates";
340
+ }>;
341
+ days: z.ZodOptional<z.ZodArray<z.ZodEnum<{
342
+ monday: "monday";
343
+ tuesday: "tuesday";
344
+ wednesday: "wednesday";
345
+ thursday: "thursday";
346
+ friday: "friday";
347
+ saturday: "saturday";
348
+ sunday: "sunday";
349
+ }>>>;
350
+ dayOfMonth: z.ZodOptional<z.ZodArray<z.ZodInt>>;
351
+ weekdayOfMonth: z.ZodOptional<z.ZodObject<{
352
+ week: z.ZodEnum<{
353
+ first: "first";
354
+ last: "last";
355
+ second: "second";
356
+ third: "third";
357
+ fourth: "fourth";
358
+ }>;
359
+ day: z.ZodEnum<{
360
+ monday: "monday";
361
+ tuesday: "tuesday";
362
+ wednesday: "wednesday";
363
+ thursday: "thursday";
364
+ friday: "friday";
365
+ saturday: "saturday";
366
+ sunday: "sunday";
367
+ }>;
368
+ }, z.core.$strict>>;
369
+ times: z.ZodOptional<z.ZodArray<z.ZodString>>;
370
+ dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
371
+ zone: z.ZodOptional<z.ZodString>;
372
+ whileOpen: z.ZodOptional<z.ZodEnum<{
373
+ wait: "wait";
374
+ continue: "continue";
375
+ }>>;
376
+ }, z.core.$strict>>;
377
+ budget: z.ZodNullable<z.ZodNumber>;
378
+ maxHours: z.ZodNullable<z.ZodInt>;
379
+ planning: z.ZodEnum<{
380
+ short: "short";
381
+ detailed: "detailed";
382
+ }>;
383
+ reportToId: z.ZodNullable<z.ZodString>;
384
+ }, z.core.$strip>>;
385
+ skill: z.ZodNullable<z.ZodObject<{
386
+ result: z.ZodString;
387
+ trigger: z.ZodString;
388
+ triggerOn: z.ZodBoolean;
389
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
390
+ }, z.core.$strip>>;
331
391
  rev: z.ZodNumber;
332
392
  }, z.core.$strip>;
333
393
  export type NodeVersionDetail = z.infer<typeof NodeVersionDetail>;
@@ -383,11 +443,11 @@ export declare const NodeVersionExcerpt: z.ZodObject<{
383
443
  title: "title";
384
444
  text: "text";
385
445
  dates: "dates";
446
+ waiting: "waiting";
386
447
  assignee: "assignee";
387
448
  labels: "labels";
388
449
  parent: "parent";
389
450
  dependencies: "dependencies";
390
- waiting: "waiting";
391
451
  }>>>;
392
452
  secret: z.ZodOptional<z.ZodLiteral<true>>;
393
453
  locked: z.ZodOptional<z.ZodBoolean>;
@@ -419,6 +479,66 @@ export declare const NodeVersionExcerpt: z.ZodObject<{
419
479
  done: z.ZodBoolean;
420
480
  }, z.core.$strip>>]>;
421
481
  }, z.core.$strip>>>;
482
+ goal: z.ZodNullable<z.ZodObject<{
483
+ operatorId: z.ZodNullable<z.ZodString>;
484
+ rhythm: z.ZodNullable<z.ZodObject<{
485
+ rhythm: z.ZodEnum<{
486
+ manual: "manual";
487
+ daily: "daily";
488
+ weekly: "weekly";
489
+ monthly: "monthly";
490
+ dates: "dates";
491
+ }>;
492
+ days: z.ZodOptional<z.ZodArray<z.ZodEnum<{
493
+ monday: "monday";
494
+ tuesday: "tuesday";
495
+ wednesday: "wednesday";
496
+ thursday: "thursday";
497
+ friday: "friday";
498
+ saturday: "saturday";
499
+ sunday: "sunday";
500
+ }>>>;
501
+ dayOfMonth: z.ZodOptional<z.ZodArray<z.ZodInt>>;
502
+ weekdayOfMonth: z.ZodOptional<z.ZodObject<{
503
+ week: z.ZodEnum<{
504
+ first: "first";
505
+ last: "last";
506
+ second: "second";
507
+ third: "third";
508
+ fourth: "fourth";
509
+ }>;
510
+ day: z.ZodEnum<{
511
+ monday: "monday";
512
+ tuesday: "tuesday";
513
+ wednesday: "wednesday";
514
+ thursday: "thursday";
515
+ friday: "friday";
516
+ saturday: "saturday";
517
+ sunday: "sunday";
518
+ }>;
519
+ }, z.core.$strict>>;
520
+ times: z.ZodOptional<z.ZodArray<z.ZodString>>;
521
+ dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
522
+ zone: z.ZodOptional<z.ZodString>;
523
+ whileOpen: z.ZodOptional<z.ZodEnum<{
524
+ wait: "wait";
525
+ continue: "continue";
526
+ }>>;
527
+ }, z.core.$strict>>;
528
+ budget: z.ZodNullable<z.ZodNumber>;
529
+ maxHours: z.ZodNullable<z.ZodInt>;
530
+ planning: z.ZodEnum<{
531
+ short: "short";
532
+ detailed: "detailed";
533
+ }>;
534
+ reportToId: z.ZodNullable<z.ZodString>;
535
+ }, z.core.$strip>>;
536
+ skill: z.ZodNullable<z.ZodObject<{
537
+ result: z.ZodString;
538
+ trigger: z.ZodString;
539
+ triggerOn: z.ZodBoolean;
540
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
541
+ }, z.core.$strip>>;
422
542
  excerpt: z.ZodUnion<readonly [z.ZodObject<{
423
543
  offset: z.ZodNumber;
424
544
  length: z.ZodNumber;
@@ -2,10 +2,12 @@ import { z } from "zod";
2
2
  import { CardFieldType, CardFieldValue } from "../card-kinds/card-kinds.js";
3
3
  import { ColumnId, ColumnType } from "../columns/columns.js";
4
4
  import { ExcerptCursor, RowsExcerpt, TextExcerpt } from "../excerpt/excerpt.js";
5
+ import { GoalFields } from "../goals/goals.js";
5
6
  import { idSchema } from "../ids/ids.js";
6
7
  import { Limit as PageSize } from "../list-input.js";
7
8
  import { NodeId, NodePerson, SecretFields } from "../nodes/nodes.js";
8
9
  import { Rev } from "../primitives/primitives.js";
10
+ import { SkillFields } from "../skills/skills.js";
9
11
  import { TableColumn } from "../tables/tables.js";
10
12
  // Versions of documents, tables, files and tasks (#38, #637, Funktionen › Freigeben und Versionen, E37,
11
13
  // E70, E117): the inputs of `intelligence_node_version_list`, `_get` and `_create`, and their answers.
@@ -112,6 +114,10 @@ export const NodeVersionDetail = NodeVersion.extend({
112
114
  fields: z
113
115
  .array(z.object({ name: z.string(), type: CardFieldType, value: CardFieldValue }))
114
116
  .nullable(),
117
+ // Only for a goal (#813, E139): its fields above the line in this version; null for every other.
118
+ goal: GoalFields.nullable(),
119
+ // Only for a skill (#817, E140): its result, trigger and code in this version; null for every other.
120
+ skill: SkillFields.nullable(),
115
121
  // The node's revision now: after a restore the one the next save sends.
116
122
  rev: z.number().int(),
117
123
  // A version of a secret node (#357): `content` and `columns` are null while it is `locked` for
@@ -7,6 +7,8 @@ export declare const Changed: z.ZodObject<{
7
7
  boardId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
8
8
  taskId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
9
9
  gadgetId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
10
+ goalId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
11
+ skillId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
10
12
  runId: z.ZodOptional<z.ZodTemplateLiteral<`run_${string}`>>;
11
13
  messageId: z.ZodOptional<z.ZodTemplateLiteral<`message_${string}`>>;
12
14
  chatId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
@@ -29,6 +31,7 @@ export declare const Changed: z.ZodObject<{
29
31
  connectorId: z.ZodOptional<z.ZodString>;
30
32
  connectionId: z.ZodOptional<z.ZodTemplateLiteral<`connection_${string}`>>;
31
33
  credentialId: z.ZodOptional<z.ZodTemplateLiteral<`credential_${string}`>>;
34
+ mcpId: z.ZodOptional<z.ZodTemplateLiteral<`mcp_${string}`>>;
32
35
  ref: z.ZodOptional<z.ZodString>;
33
36
  rev: z.ZodOptional<z.ZodNumber>;
34
37
  version: z.ZodOptional<z.ZodNumber>;
@@ -95,6 +98,8 @@ export declare const Written: z.ZodObject<{
95
98
  boardId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
96
99
  taskId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
97
100
  gadgetId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
101
+ goalId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
102
+ skillId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
98
103
  runId: z.ZodOptional<z.ZodTemplateLiteral<`run_${string}`>>;
99
104
  messageId: z.ZodOptional<z.ZodTemplateLiteral<`message_${string}`>>;
100
105
  chatId: z.ZodOptional<z.ZodTemplateLiteral<`node_${string}`>>;
@@ -117,6 +122,7 @@ export declare const Written: z.ZodObject<{
117
122
  connectorId: z.ZodOptional<z.ZodString>;
118
123
  connectionId: z.ZodOptional<z.ZodTemplateLiteral<`connection_${string}`>>;
119
124
  credentialId: z.ZodOptional<z.ZodTemplateLiteral<`credential_${string}`>>;
125
+ mcpId: z.ZodOptional<z.ZodTemplateLiteral<`mcp_${string}`>>;
120
126
  ref: z.ZodOptional<z.ZodString>;
121
127
  rev: z.ZodOptional<z.ZodNumber>;
122
128
  version: z.ZodOptional<z.ZodNumber>;
@@ -7,6 +7,7 @@ import { GrantId } from "../grants/grants.js";
7
7
  import { InvitationId } from "../invitations/invitations.js";
8
8
  import { LinkId } from "../links/links.js";
9
9
  import { MachineId } from "../machines/machines.js";
10
+ import { McpId } from "../mcps/mcps.js";
10
11
  import { MessageId } from "../messages/messages.js";
11
12
  import { Missing, Reached } from "../missing/missing.js";
12
13
  import { NodeId, NodeReader } from "../nodes/nodes.js";
@@ -30,6 +31,8 @@ export const Changed = z.object({
30
31
  boardId: NodeId.optional(),
31
32
  taskId: NodeId.optional(),
32
33
  gadgetId: NodeId.optional(),
34
+ goalId: NodeId.optional(),
35
+ skillId: NodeId.optional(),
33
36
  runId: RunId.optional(),
34
37
  messageId: MessageId.optional(),
35
38
  // A chat is its node's (#45).
@@ -54,6 +57,8 @@ export const Changed = z.object({
54
57
  connectorId: ConnectorId.optional(),
55
58
  connectionId: ConnectionId.optional(),
56
59
  credentialId: CredentialId.optional(),
60
+ // A person's own MCP (#802).
61
+ mcpId: McpId.optional(),
57
62
  // The caller's own name for an entry of a create of many (#625).
58
63
  ref: z.string().optional(),
59
64
  rev: z.number().int().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "Types, Zod schemas and the service client of Colab, the contract between its UI, backends and outside services.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",