@anchrd/colab-sdk 0.1.21 → 0.1.23

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.
@@ -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,
@@ -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>;
@@ -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.21",
3
+ "version": "0.1.23",
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",