@anchrd/colab-sdk 0.1.42 → 0.1.44
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 +83 -61
- package/dist/actions/actions.js +12 -6
- package/dist/boards/boards.d.ts +72 -167
- package/dist/boards/boards.js +30 -23
- package/dist/card-kinds/card-kinds.js +1 -1
- package/dist/columns/columns.d.ts +4 -4
- package/dist/columns/columns.js +3 -3
- package/dist/documents/documents.d.ts +0 -2
- package/dist/files/files.d.ts +32 -1
- package/dist/files/files.js +89 -27
- package/dist/grammar/grammar.d.ts +4 -1
- package/dist/grammar/grammar.js +17 -0
- package/dist/grants/grants.d.ts +12 -4
- package/dist/grants/grants.js +23 -8
- package/dist/home/home.d.ts +3 -3
- package/dist/instructions/instructions.d.ts +0 -4
- package/dist/instructions/instructions.js +5 -13
- package/dist/invitations/invitations.d.ts +1 -0
- package/dist/invitations/invitations.js +8 -0
- package/dist/jobs/jobs.d.ts +67 -0
- package/dist/jobs/jobs.js +45 -0
- package/dist/mcps/mcps.d.ts +3 -3
- package/dist/nodes/nodes.d.ts +5 -115
- package/dist/nodes/nodes.js +15 -41
- package/dist/operators/operators.d.ts +89 -7
- package/dist/operators/operators.js +50 -7
- package/dist/roles/roles.d.ts +0 -14
- package/dist/roles/roles.js +2 -10
- package/dist/runs/runs.d.ts +9 -12
- package/dist/runs/runs.js +5 -6
- package/dist/schedule/schedule.js +1 -1
- package/dist/sdk.d.ts +10 -9
- package/dist/sdk.js +10 -9
- package/dist/sources/sources.d.ts +6 -6
- package/dist/teams/teams.d.ts +120 -0
- package/dist/teams/teams.js +70 -0
- package/dist/versions/versions.d.ts +54 -71
- package/dist/versions/versions.js +5 -6
- package/dist/written/written.d.ts +62 -2
- package/dist/written/written.js +16 -2
- package/package.json +1 -1
- package/dist/validation/validation.d.ts +0 -60
- package/dist/validation/validation.js +0 -26
package/dist/written/written.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AppId, SessionId } from "../apps/apps.js";
|
|
3
|
+
import { TaskColumn } from "../columns/columns.js";
|
|
3
4
|
import { ConnectionId } from "../connections/connections.js";
|
|
4
5
|
import { ConnectorId } from "../connectors/connectors.js";
|
|
5
6
|
import { Warning } from "../error/error.js";
|
|
@@ -17,6 +18,7 @@ import { RoleId } from "../roles/roles.js";
|
|
|
17
18
|
import { RunId } from "../runs/runs.js";
|
|
18
19
|
import { FunctionId, InterfaceId, ServiceId } from "../services/services.js";
|
|
19
20
|
import { QueryId } from "../sources/sources.js";
|
|
21
|
+
import { MemberId, TeamId } from "../teams/teams.js";
|
|
20
22
|
import { UserId } from "../users/users.js";
|
|
21
23
|
// What a write answers over `/mcp` (E126, #672): what it changed and what that caused, never the
|
|
22
24
|
// object it wrote. The AI sent the object itself; echoing it back filled an Operator's context with
|
|
@@ -48,6 +50,9 @@ export const Changed = z.object({
|
|
|
48
50
|
// its `user_…` id either way.
|
|
49
51
|
machineId: MachineId.optional(),
|
|
50
52
|
roleId: RoleId.optional(),
|
|
53
|
+
// A team and a membership in it (#1121).
|
|
54
|
+
teamId: TeamId.optional(),
|
|
55
|
+
memberId: MemberId.optional(),
|
|
51
56
|
// The rights a switch of a role really turned on or off, which a level in the call expands to.
|
|
52
57
|
permissions: z.array(z.string()).optional(),
|
|
53
58
|
invitationId: InvitationId.optional(),
|
|
@@ -77,6 +82,15 @@ export const Unblocked = z.object({
|
|
|
77
82
|
rev: z.number().int(),
|
|
78
83
|
own: z.literal(true).optional(),
|
|
79
84
|
});
|
|
85
|
+
// A card Colab moved because a rule on its "waits for" fired (E242, #1132): where it lies now, its
|
|
86
|
+
// `rev` for the next save, and the card whose move caused it.
|
|
87
|
+
export const Moved = z.object({
|
|
88
|
+
taskId: NodeId,
|
|
89
|
+
title: z.string(),
|
|
90
|
+
column: TaskColumn,
|
|
91
|
+
rev: z.number().int(),
|
|
92
|
+
cause: NodeId,
|
|
93
|
+
});
|
|
80
94
|
// What the write caused for others; an empty field is left out.
|
|
81
95
|
export const Effects = z.object({
|
|
82
96
|
// Machines whose Actions changed by it (#334, E124): an Operator among them wakes.
|
|
@@ -85,8 +99,8 @@ export const Effects = z.object({
|
|
|
85
99
|
notified: z.array(Reached).optional(),
|
|
86
100
|
// Tasks ready now, because the last thing they waited on was closed by this call.
|
|
87
101
|
unblocked: z.array(Unblocked).optional(),
|
|
88
|
-
//
|
|
89
|
-
|
|
102
|
+
// Cards moved by a rule on their "waits for" (E242), a chain of them in the order they moved.
|
|
103
|
+
moved: z.array(Moved).optional(),
|
|
90
104
|
// Who reads a moved node now (#36): a move takes the grants of its new folder.
|
|
91
105
|
readers: z.array(NodeReader).optional(),
|
|
92
106
|
});
|
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const validationBoardId: "node_0000000000000000000000VA1D";
|
|
3
|
-
export declare const ValidationBoardId: z.ZodLiteral<"node_0000000000000000000000VA1D">;
|
|
4
|
-
export type ValidationBoardId = z.infer<typeof ValidationBoardId>;
|
|
5
|
-
export declare const validationGoalId: "node_0000000000000000000000VA1G";
|
|
6
|
-
export declare const TicketSubject: z.ZodObject<{
|
|
7
|
-
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
8
|
-
kind: z.ZodEnum<{
|
|
9
|
-
file: "file";
|
|
10
|
-
folder: "folder";
|
|
11
|
-
document: "document";
|
|
12
|
-
table: "table";
|
|
13
|
-
board: "board";
|
|
14
|
-
task: "task";
|
|
15
|
-
gadget: "gadget";
|
|
16
|
-
goal: "goal";
|
|
17
|
-
skill: "skill";
|
|
18
|
-
source: "source";
|
|
19
|
-
}>;
|
|
20
|
-
name: z.ZodString;
|
|
21
|
-
path: z.ZodObject<{
|
|
22
|
-
section: z.ZodEnum<{
|
|
23
|
-
users: "users";
|
|
24
|
-
own: "own";
|
|
25
|
-
shared: "shared";
|
|
26
|
-
}>;
|
|
27
|
-
items: z.ZodArray<z.ZodObject<{
|
|
28
|
-
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
29
|
-
name: z.ZodString;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
export type TicketSubject = z.infer<typeof TicketSubject>;
|
|
34
|
-
export declare const TicketSubjectRef: z.ZodObject<{
|
|
35
|
-
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
36
|
-
kind: z.ZodEnum<{
|
|
37
|
-
file: "file";
|
|
38
|
-
folder: "folder";
|
|
39
|
-
document: "document";
|
|
40
|
-
table: "table";
|
|
41
|
-
board: "board";
|
|
42
|
-
task: "task";
|
|
43
|
-
gadget: "gadget";
|
|
44
|
-
goal: "goal";
|
|
45
|
-
skill: "skill";
|
|
46
|
-
source: "source";
|
|
47
|
-
}>;
|
|
48
|
-
path: z.ZodObject<{
|
|
49
|
-
section: z.ZodEnum<{
|
|
50
|
-
users: "users";
|
|
51
|
-
own: "own";
|
|
52
|
-
shared: "shared";
|
|
53
|
-
}>;
|
|
54
|
-
items: z.ZodArray<z.ZodObject<{
|
|
55
|
-
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
56
|
-
name: z.ZodString;
|
|
57
|
-
}, z.core.$strip>>;
|
|
58
|
-
}, z.core.$strip>;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
export type TicketSubjectRef = z.infer<typeof TicketSubjectRef>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { NodeId, NodeKind, NodePath } from "../nodes/nodes.js";
|
|
3
|
-
// The validation (#47, Seiten › Validierung, E33, E48, E67): one board per Colab and a ticket per
|
|
4
|
-
// document, table and file; a ticket's history stands in its versions (E117). The board is a node with a fixed id
|
|
5
|
-
// that stands in no area of the tree; its tickets are tasks whose node is the one they validate. A
|
|
6
|
-
// node's own status is `NodeValidation` in `nodes.ts`, beside the node it describes.
|
|
7
|
-
// ⚠️ The board's fixed id: the same in every Colab, made on its first use (`ensureValidationBoard`
|
|
8
|
-
// in `intelligence`), never in a folder. A ULID of zeros and `VA1D`, so no `createId` makes it.
|
|
9
|
-
export const validationBoardId = "node_0000000000000000000000VA1D";
|
|
10
|
-
export const ValidationBoardId = z
|
|
11
|
-
.literal(validationBoardId)
|
|
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";
|
|
17
|
-
// The node a ticket validates, as the caller can read it.
|
|
18
|
-
export const TicketSubject = z.object({
|
|
19
|
-
nodeId: NodeId,
|
|
20
|
-
kind: NodeKind,
|
|
21
|
-
name: z.string(),
|
|
22
|
-
path: NodePath,
|
|
23
|
-
});
|
|
24
|
-
// A ticket on a card: which node it validates, and where it stands as the caller reads it (#209:
|
|
25
|
-
// three `.INSTRUCTIONS` on one board are told apart by their place).
|
|
26
|
-
export const TicketSubjectRef = z.object({ nodeId: NodeId, kind: NodeKind, path: NodePath });
|