@anchrd/colab-sdk 0.1.10 → 0.1.12
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 +64 -11
- package/dist/actions/actions.js +22 -7
- package/dist/boards/boards.d.ts +321 -10
- package/dist/boards/boards.js +111 -13
- package/dist/card-kinds/card-kinds.d.ts +265 -0
- package/dist/card-kinds/card-kinds.js +153 -0
- package/dist/error/error.d.ts +6 -4
- package/dist/error/error.js +4 -3
- package/dist/gadgets/gadgets.d.ts +532 -0
- package/dist/gadgets/gadgets.js +329 -0
- package/dist/grammar/grammar.d.ts +1 -1
- package/dist/grammar/grammar.js +8 -1
- package/dist/nodes/nodes.d.ts +10 -10
- package/dist/nodes/nodes.js +4 -3
- package/dist/operators/operators.d.ts +4 -4
- package/dist/operators/operators.js +2 -2
- package/dist/runs/runs.d.ts +41 -70
- package/dist/runs/runs.js +14 -73
- package/dist/schedule/schedule.d.ts +36 -0
- package/dist/schedule/schedule.js +93 -0
- package/dist/sdk.d.ts +8 -6
- package/dist/sdk.js +8 -6
- package/dist/tables/tables.d.ts +8 -0
- package/dist/tables/tables.js +29 -4
- package/dist/users/users.js +2 -2
- package/dist/validation/validation.d.ts +2 -55
- package/dist/validation/validation.js +3 -22
- package/dist/versions/versions.d.ts +233 -1
- package/dist/versions/versions.js +57 -10
- package/package.json +1 -1
- package/dist/dashboards/dashboards.d.ts +0 -221
- package/dist/dashboards/dashboards.js +0 -520
package/dist/runs/runs.d.ts
CHANGED
|
@@ -32,50 +32,15 @@ export declare const BoardRunCreateInput: z.ZodObject<{
|
|
|
32
32
|
idempotencyKey: z.ZodString;
|
|
33
33
|
}, z.core.$strict>;
|
|
34
34
|
export type BoardRunCreateInput = z.infer<typeof BoardRunCreateInput>;
|
|
35
|
-
export declare const DashboardRunCreateInput: z.ZodObject<{
|
|
36
|
-
dashboardId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
37
|
-
idempotencyKey: z.ZodString;
|
|
38
|
-
}, z.core.$strict>;
|
|
39
|
-
export type DashboardRunCreateInput = z.infer<typeof DashboardRunCreateInput>;
|
|
40
|
-
export declare const RunUpdateInput: z.ZodObject<{
|
|
41
|
-
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
42
|
-
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
43
|
-
yaml: z.ZodOptional<z.ZodString>;
|
|
44
|
-
}, z.core.$strict>;
|
|
45
|
-
export type RunUpdateInput = z.infer<typeof RunUpdateInput>;
|
|
46
35
|
export declare const RunCompleteInput: z.ZodObject<{
|
|
47
36
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
48
37
|
summary: z.ZodOptional<z.ZodString>;
|
|
49
|
-
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
|
-
yaml: z.ZodOptional<z.ZodString>;
|
|
51
38
|
}, z.core.$strict>;
|
|
52
39
|
export type RunCompleteInput = z.infer<typeof RunCompleteInput>;
|
|
53
|
-
export declare const RunValueValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>;
|
|
54
|
-
export type RunValueValue = z.infer<typeof RunValueValue>;
|
|
55
|
-
export declare const RunValue: z.ZodObject<{
|
|
56
|
-
metrics: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
57
|
-
value: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>;
|
|
58
|
-
source: z.ZodNullable<z.ZodString>;
|
|
59
|
-
node: z.ZodNullable<z.ZodObject<{
|
|
60
|
-
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
61
|
-
name: z.ZodString;
|
|
62
|
-
}, z.core.$strip>>;
|
|
63
|
-
parameter: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
64
|
-
report: z.ZodNullable<z.ZodString>;
|
|
65
|
-
recommendation: z.ZodNullable<z.ZodString>;
|
|
66
|
-
}, z.core.$strip>>;
|
|
67
|
-
summaries: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
68
|
-
text: z.ZodNullable<z.ZodString>;
|
|
69
|
-
report: z.ZodNullable<z.ZodString>;
|
|
70
|
-
recommendation: z.ZodNullable<z.ZodString>;
|
|
71
|
-
}, z.core.$strip>>;
|
|
72
|
-
}, z.core.$strip>;
|
|
73
|
-
export type RunValue = z.infer<typeof RunValue>;
|
|
74
40
|
export declare const RunItem: z.ZodObject<{
|
|
75
41
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
76
42
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
77
43
|
kind: z.ZodEnum<{
|
|
78
|
-
dashboard: "dashboard";
|
|
79
44
|
validation: "validation";
|
|
80
45
|
process: "process";
|
|
81
46
|
}>;
|
|
@@ -105,9 +70,6 @@ export declare const RunItem: z.ZodObject<{
|
|
|
105
70
|
}>>;
|
|
106
71
|
}, z.core.$strip>>;
|
|
107
72
|
summary: z.ZodNullable<z.ZodString>;
|
|
108
|
-
values: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>>;
|
|
109
|
-
summaries: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
110
|
-
reports: z.ZodNullable<z.ZodNumber>;
|
|
111
73
|
rights: z.ZodObject<{
|
|
112
74
|
complete: z.ZodBoolean;
|
|
113
75
|
}, z.core.$strip>;
|
|
@@ -118,7 +80,6 @@ export declare const RunList: z.ZodObject<{
|
|
|
118
80
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
119
81
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
120
82
|
kind: z.ZodEnum<{
|
|
121
|
-
dashboard: "dashboard";
|
|
122
83
|
validation: "validation";
|
|
123
84
|
process: "process";
|
|
124
85
|
}>;
|
|
@@ -148,9 +109,6 @@ export declare const RunList: z.ZodObject<{
|
|
|
148
109
|
}>>;
|
|
149
110
|
}, z.core.$strip>>;
|
|
150
111
|
summary: z.ZodNullable<z.ZodString>;
|
|
151
|
-
values: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>>;
|
|
152
|
-
summaries: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
153
|
-
reports: z.ZodNullable<z.ZodNumber>;
|
|
154
112
|
rights: z.ZodObject<{
|
|
155
113
|
complete: z.ZodBoolean;
|
|
156
114
|
}, z.core.$strip>;
|
|
@@ -182,38 +140,54 @@ export declare const RunDetail: z.ZodObject<{
|
|
|
182
140
|
}>;
|
|
183
141
|
tasks: z.ZodNumber;
|
|
184
142
|
}, z.core.$strip>>>;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
143
|
+
cardKinds: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
144
|
+
kindId: z.ZodTemplateLiteral<`kind_${string}`>;
|
|
145
|
+
name: z.ZodString;
|
|
146
|
+
icon: z.ZodEnum<{
|
|
147
|
+
message: "message";
|
|
148
|
+
user: "user";
|
|
149
|
+
package: "package";
|
|
150
|
+
search: "search";
|
|
151
|
+
flag: "flag";
|
|
152
|
+
route: "route";
|
|
153
|
+
"arrow-right": "arrow-right";
|
|
154
|
+
"square-check": "square-check";
|
|
155
|
+
"file-text": "file-text";
|
|
156
|
+
bulb: "bulb";
|
|
157
|
+
target: "target";
|
|
158
|
+
calendar: "calendar";
|
|
159
|
+
star: "star";
|
|
160
|
+
bolt: "bolt";
|
|
161
|
+
bug: "bug";
|
|
162
|
+
rocket: "rocket";
|
|
163
|
+
}>;
|
|
164
|
+
description: z.ZodString;
|
|
165
|
+
standard: z.ZodBoolean;
|
|
166
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
167
|
+
fieldId: z.ZodTemplateLiteral<`field_${string}`>;
|
|
168
|
+
name: z.ZodString;
|
|
169
|
+
type: z.ZodEnum<{
|
|
170
|
+
number: "number";
|
|
171
|
+
date: "date";
|
|
172
|
+
list: "list";
|
|
173
|
+
link: "link";
|
|
174
|
+
text: "text";
|
|
175
|
+
checklist: "checklist";
|
|
176
|
+
select: "select";
|
|
177
|
+
}>;
|
|
178
|
+
description: z.ZodString;
|
|
179
|
+
required: z.ZodBoolean;
|
|
180
|
+
visible: z.ZodBoolean;
|
|
181
|
+
options: z.ZodArray<z.ZodObject<{
|
|
182
|
+
optionId: z.ZodTemplateLiteral<`option_${string}`>;
|
|
191
183
|
name: z.ZodString;
|
|
192
184
|
}, z.core.$strip>>;
|
|
193
|
-
parameter: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
194
|
-
report: z.ZodNullable<z.ZodString>;
|
|
195
|
-
recommendation: z.ZodNullable<z.ZodString>;
|
|
196
|
-
}, z.core.$strip>>;
|
|
197
|
-
summaries: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
198
|
-
text: z.ZodNullable<z.ZodString>;
|
|
199
|
-
report: z.ZodNullable<z.ZodString>;
|
|
200
|
-
recommendation: z.ZodNullable<z.ZodString>;
|
|
201
185
|
}, z.core.$strip>>;
|
|
202
|
-
}, z.core.$strip
|
|
203
|
-
assignees: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
|
|
204
|
-
userId: z.ZodString;
|
|
205
|
-
name: z.ZodNullable<z.ZodString>;
|
|
206
|
-
kind: z.ZodNullable<z.ZodEnum<{
|
|
207
|
-
machine: "machine";
|
|
208
|
-
human: "human";
|
|
209
|
-
}>>;
|
|
210
|
-
}, z.core.$strip>>>>;
|
|
211
|
-
template: z.ZodNullable<z.ZodString>;
|
|
186
|
+
}, z.core.$strip>>>;
|
|
212
187
|
instruction: z.ZodNullable<z.ZodString>;
|
|
213
188
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
214
189
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
215
190
|
kind: z.ZodEnum<{
|
|
216
|
-
dashboard: "dashboard";
|
|
217
191
|
validation: "validation";
|
|
218
192
|
process: "process";
|
|
219
193
|
}>;
|
|
@@ -243,9 +217,6 @@ export declare const RunDetail: z.ZodObject<{
|
|
|
243
217
|
}>>;
|
|
244
218
|
}, z.core.$strip>>;
|
|
245
219
|
summary: z.ZodNullable<z.ZodString>;
|
|
246
|
-
values: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>>;
|
|
247
|
-
summaries: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
248
|
-
reports: z.ZodNullable<z.ZodNumber>;
|
|
249
220
|
rights: z.ZodObject<{
|
|
250
221
|
complete: z.ZodBoolean;
|
|
251
222
|
}, z.core.$strip>;
|
package/dist/runs/runs.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { BoardId } from "../boards/boards.js";
|
|
3
|
+
import { CardKind } from "../card-kinds/card-kinds.js";
|
|
3
4
|
import { ColumnId, ColumnType } from "../columns/columns.js";
|
|
4
|
-
import { DashboardId } from "../dashboards/dashboards.js";
|
|
5
5
|
import { idSchema } from "../ids/ids.js";
|
|
6
6
|
import { Limit } from "../list-input.js";
|
|
7
7
|
import { NodeId, NodePerson } from "../nodes/nodes.js";
|
|
8
8
|
import { IdempotencyKey } from "../primitives/primitives.js";
|
|
9
|
-
// Runs of a process board and of
|
|
10
|
-
//
|
|
11
|
-
// `intelligence_board_run_create`, `
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
export const RunId = idSchema("run").describe("The run's id, `run_…`, as intelligence_board_run_create, intelligence_dashboard_run_create or intelligence_run_list returned it.");
|
|
9
|
+
// Runs of a process board and of the validation (#43, Funktionen › Läufe, Nodes › Board › Prozess,
|
|
10
|
+
// E42, E45, E67, E70, E119): the inputs of `intelligence_run_list`, `_get`,
|
|
11
|
+
// `intelligence_board_run_create`, `intelligence_run_complete`, and the answers. A run is a
|
|
12
|
+
// sub-resource of its board when it is made, and a resource of its own afterwards.
|
|
13
|
+
export const RunId = idSchema("run").describe("The run's id, `run_…`, as intelligence_board_run_create or intelligence_run_list returned it.");
|
|
15
14
|
export const runStatuses = ["running", "done", "open", "error"];
|
|
16
15
|
export const RunStatus = z
|
|
17
16
|
.enum(runStatuses)
|
|
18
|
-
.describe("The run's status, set by Colab from its result, never by the caller: running (started, not completed), done (a process: every task in a done, discarded or archive column;
|
|
17
|
+
.describe("The run's status, set by Colab from its result, never by the caller: running (started, not completed), done (a process: every task in a done, discarded or archive column; the validation: no ticket in a column of type open waits on a person), open (a process: a task not in such a column; the validation: a ticket in a column of type open is assigned to a person), error (a process: a task in a blocked column; the validation never errs).");
|
|
19
18
|
const Moment = z.iso.datetime({ offset: true });
|
|
20
19
|
export const RunListInput = z.strictObject({
|
|
21
|
-
nodeId: NodeId.describe("The process board or
|
|
20
|
+
nodeId: NodeId.describe("The process board or the validation board whose runs to list, one you can read. Runs never stand in the tree."),
|
|
22
21
|
status: RunStatus.optional().describe("Only the runs with this status."),
|
|
23
22
|
from: Moment.optional().describe("Only the runs started at or after this moment, ISO 8601."),
|
|
24
23
|
to: Moment.optional().describe("Only the runs started at or before this moment, ISO 8601."),
|
|
@@ -34,61 +33,16 @@ export const BoardRunCreateInput = z.strictObject({
|
|
|
34
33
|
boardId: BoardId.describe("The process board to start a run of, one you can write to. The run is a copy of its columns and of every task of the template, all in the first column."),
|
|
35
34
|
idempotencyKey: IdempotencyKey,
|
|
36
35
|
});
|
|
37
|
-
export const DashboardRunCreateInput = z.strictObject({
|
|
38
|
-
dashboardId: DashboardId.describe("The dashboard to start a run of, one you can write to. The run keeps a copy of the configuration as it is now and answers its template."),
|
|
39
|
-
idempotencyKey: IdempotencyKey,
|
|
40
|
-
});
|
|
41
36
|
const Text = z.string().max(20_000);
|
|
42
|
-
const RunValues = z
|
|
43
|
-
.record(z.string(), z.unknown())
|
|
44
|
-
.optional()
|
|
45
|
-
.describe("A dashboard run's entries as an object, the shape of the template of intelligence_run_get: metrics (value, source, parameter, report, recommendation) and summaries (text, report, recommendation), each under its key. Send at most one of values and yaml.");
|
|
46
|
-
const RunYaml = z
|
|
47
|
-
.string()
|
|
48
|
-
.max(200_000)
|
|
49
|
-
.optional()
|
|
50
|
-
.describe("A dashboard run's entries as YAML text, the template of intelligence_run_get filled in. Send at most one of values and yaml.");
|
|
51
|
-
// A dashboard run is filled by its assignees, each their own entries (E78, Nodes › Dashboard,
|
|
52
|
-
// Zuständig je Kennzahl): the run closes by itself once every entry is there.
|
|
53
|
-
export const RunUpdateInput = z.strictObject({
|
|
54
|
-
runId: RunId,
|
|
55
|
-
values: RunValues.describe("Your entries of a dashboard run as an object: metrics and summaries assigned to you (and those without anybody, where you can write on the dashboard), each under its key with value and source, or text, and a report and a recommendation where something is worth saying. Send exactly one of values and yaml."),
|
|
56
|
-
yaml: RunYaml.describe("Your entries of a dashboard run as YAML text, the template of intelligence_run_get filled in. Send exactly one of values and yaml."),
|
|
57
|
-
});
|
|
58
37
|
export const RunCompleteInput = z.strictObject({
|
|
59
38
|
runId: RunId,
|
|
60
39
|
summary: Text.optional().describe("What the run did, in a few sentences: what people read in the list of runs."),
|
|
61
|
-
values: RunValues.describe("Only for a dashboard: the last entries you may write, as an object, before it closes. Entries nobody wrote stay missing and the run is open. Send at most one of values and yaml, neither for a process."),
|
|
62
|
-
yaml: RunYaml.describe("Only for a dashboard: the last entries you may write, as YAML text, before it closes. Send at most one of values and yaml, neither for a process."),
|
|
63
|
-
});
|
|
64
|
-
// A value as a run stores it: a number, a short text, or null when it is missing.
|
|
65
|
-
export const RunValueValue = z.union([z.number(), z.string(), z.null()]);
|
|
66
|
-
// ⚠️ The entries of a dashboard run as records under their key, the shape the Operator sent
|
|
67
|
-
// (`DashboardRun`), never as a list with a field `key`: `/mcp` strikes every field called `key` as a
|
|
68
|
-
// secret (`redactSecrets` in `shared`), and the answer would name no metric.
|
|
69
|
-
export const RunValue = z.object({
|
|
70
|
-
metrics: z.record(z.string(), z.object({
|
|
71
|
-
value: RunValueValue,
|
|
72
|
-
source: z.string().nullable(),
|
|
73
|
-
// The node a source `colab://node_…` names, when the caller can read it; null for a tool,
|
|
74
|
-
// and for a node that is gone or the caller cannot read: then neither its id nor its name,
|
|
75
|
-
// and `source` is null too (#165).
|
|
76
|
-
node: z.object({ nodeId: NodeId, name: z.string() }).nullable(),
|
|
77
|
-
parameter: z.record(z.string(), z.unknown()).nullable(),
|
|
78
|
-
report: z.string().nullable(),
|
|
79
|
-
recommendation: z.string().nullable(),
|
|
80
|
-
})),
|
|
81
|
-
summaries: z.record(z.string(), z.object({
|
|
82
|
-
text: z.string().nullable(),
|
|
83
|
-
report: z.string().nullable(),
|
|
84
|
-
recommendation: z.string().nullable(),
|
|
85
|
-
})),
|
|
86
40
|
});
|
|
87
41
|
export const RunItem = z.object({
|
|
88
42
|
runId: RunId,
|
|
89
43
|
nodeId: NodeId,
|
|
90
44
|
// A validation run (#47) copies nothing and carries only its summary.
|
|
91
|
-
kind: z.enum(["process", "
|
|
45
|
+
kind: z.enum(["process", "validation"]),
|
|
92
46
|
status: RunStatus,
|
|
93
47
|
// The moment of the schedule this run stands for, null for a run started by hand.
|
|
94
48
|
dueAt: z.iso.datetime().nullable(),
|
|
@@ -97,16 +51,8 @@ export const RunItem = z.object({
|
|
|
97
51
|
completedAt: z.iso.datetime().nullable(),
|
|
98
52
|
completedBy: NodePerson.nullable(),
|
|
99
53
|
summary: z.string().nullable(),
|
|
100
|
-
// A dashboard's value per metric key, one row of its table; null for a process.
|
|
101
|
-
values: z.record(z.string(), RunValueValue).nullable(),
|
|
102
|
-
// A dashboard's summary text per summary key, cut to 280 characters for a cell of its table, null
|
|
103
|
-
// where the Operator wrote none; null for a process. The whole text is in `entries` of
|
|
104
|
-
// intelligence_run_get (#164).
|
|
105
|
-
summaries: z.record(z.string(), z.string().nullable()).nullable(),
|
|
106
|
-
// A dashboard's count of values and summaries that carry a report; null for a process (#164).
|
|
107
|
-
reports: z.number().int().nullable(),
|
|
108
54
|
// `complete`: whether the caller may close this run with intelligence_run_complete, by the same
|
|
109
|
-
// check the tool makes (E107): write on a process board
|
|
55
|
+
// check the tool makes (E107): write on a process board; on the validation the holder
|
|
110
56
|
// of validator or an admin in admin mode. The UI shows "Lauf beenden" by it.
|
|
111
57
|
rights: z.object({ complete: z.boolean() }),
|
|
112
58
|
});
|
|
@@ -128,14 +74,9 @@ export const RunDetail = z.object({
|
|
|
128
74
|
tasks: z.number().int(),
|
|
129
75
|
}))
|
|
130
76
|
.nullable(),
|
|
131
|
-
// A
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
// the run started (
|
|
135
|
-
assignees: z.record(z.string(), NodePerson.nullable()).nullable(),
|
|
136
|
-
// A dashboard run while it runs: the YAML of the entries the caller may write and has not written
|
|
137
|
-
// yet, to fill in and send to intelligence_run_update; null when there is none.
|
|
138
|
-
template: z.string().nullable(),
|
|
139
|
-
// The instruction of the board or dashboard as the run started (E87, #354); null without one.
|
|
77
|
+
// A process run: the card kinds it copied when it started, with their fields (#638); empty for a
|
|
78
|
+
// run of a board without kinds, null for the validation.
|
|
79
|
+
cardKinds: z.array(CardKind).nullable(),
|
|
80
|
+
// The instruction of the board as the run started (E87, #354); null without one.
|
|
140
81
|
instruction: z.string().nullable(),
|
|
141
82
|
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const rhythms: readonly ["manual", "daily", "weekly", "monthly", "dates"];
|
|
3
|
+
export declare const weekdays: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
4
|
+
export declare const whileOpenModes: readonly ["wait", "continue"];
|
|
5
|
+
export declare const WhileOpen: z.ZodEnum<{
|
|
6
|
+
wait: "wait";
|
|
7
|
+
continue: "continue";
|
|
8
|
+
}>;
|
|
9
|
+
export type WhileOpen = z.infer<typeof WhileOpen>;
|
|
10
|
+
export declare const Schedule: z.ZodObject<{
|
|
11
|
+
rhythm: z.ZodEnum<{
|
|
12
|
+
manual: "manual";
|
|
13
|
+
daily: "daily";
|
|
14
|
+
weekly: "weekly";
|
|
15
|
+
monthly: "monthly";
|
|
16
|
+
dates: "dates";
|
|
17
|
+
}>;
|
|
18
|
+
days: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
19
|
+
monday: "monday";
|
|
20
|
+
tuesday: "tuesday";
|
|
21
|
+
wednesday: "wednesday";
|
|
22
|
+
thursday: "thursday";
|
|
23
|
+
friday: "friday";
|
|
24
|
+
saturday: "saturday";
|
|
25
|
+
sunday: "sunday";
|
|
26
|
+
}>>>;
|
|
27
|
+
dayOfMonth: z.ZodOptional<z.ZodArray<z.ZodInt>>;
|
|
28
|
+
times: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
dates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
zone: z.ZodOptional<z.ZodString>;
|
|
31
|
+
whileOpen: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
wait: "wait";
|
|
33
|
+
continue: "continue";
|
|
34
|
+
}>>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export type Schedule = z.infer<typeof Schedule>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TimeZone } from "../profile/profile.js";
|
|
3
|
+
// The schedule (Ausführung) of a process board and the validation (#43, Funktionen › Läufe): when a
|
|
4
|
+
// run falls due and what happens while the last one is still open.
|
|
5
|
+
export const rhythms = ["manual", "daily", "weekly", "monthly", "dates"];
|
|
6
|
+
export const weekdays = [
|
|
7
|
+
"monday",
|
|
8
|
+
"tuesday",
|
|
9
|
+
"wednesday",
|
|
10
|
+
"thursday",
|
|
11
|
+
"friday",
|
|
12
|
+
"saturday",
|
|
13
|
+
"sunday",
|
|
14
|
+
];
|
|
15
|
+
// No seconds and no zone on the string: a run happens at eight, and the zone is the schedule's own.
|
|
16
|
+
// `24:00` is refused rather than read as midnight, so one moment has one spelling (anchrd/intel
|
|
17
|
+
// `contract/process.ts`, f4eccd16).
|
|
18
|
+
const TimeOfDay = z
|
|
19
|
+
.string()
|
|
20
|
+
.regex(/^([01]\d|2[0-3]):[0-5]\d$/, "A time of day is HH:MM, from 00:00 to 23:59, like 08:00.");
|
|
21
|
+
// A fixed moment on the wall clock of the schedule's zone, without seconds and without an offset.
|
|
22
|
+
const LocalMoment = z
|
|
23
|
+
.string()
|
|
24
|
+
.regex(/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])T([01]\d|2[0-3]):[0-5]\d$/, "A date is YYYY-MM-DDTHH:MM on the schedule's clock, like 2026-10-15T08:00.");
|
|
25
|
+
// Which fields each rhythm takes; every other one is refused, so nothing lies stored that no rhythm
|
|
26
|
+
// reads.
|
|
27
|
+
const rhythmFields = {
|
|
28
|
+
manual: [],
|
|
29
|
+
daily: ["times"],
|
|
30
|
+
weekly: ["days", "times"],
|
|
31
|
+
monthly: ["dayOfMonth", "times"],
|
|
32
|
+
dates: ["dates"],
|
|
33
|
+
};
|
|
34
|
+
const scheduleFields = ["days", "dayOfMonth", "times", "dates"];
|
|
35
|
+
// What happens when a run falls due while the last one is still open (E75, Funktionen › Läufe):
|
|
36
|
+
// wait (the default) starts none until the last is completed, continue starts it anyway and the
|
|
37
|
+
// open ones stay open.
|
|
38
|
+
export const whileOpenModes = ["wait", "continue"];
|
|
39
|
+
export const WhileOpen = z
|
|
40
|
+
.enum(whileOpenModes)
|
|
41
|
+
.describe("When the last run is still open: wait (the default) starts no new run until it is completed, and the process stands overdue in the Actions; continue starts the new run anyway, and the open ones stay open.");
|
|
42
|
+
export const Schedule = z
|
|
43
|
+
.strictObject({
|
|
44
|
+
rhythm: z
|
|
45
|
+
.enum(rhythms)
|
|
46
|
+
.describe("How often a run falls due: manual (a person starts it), daily, weekly (on days), monthly (on dayOfMonth), or dates (fixed moments, each once)."),
|
|
47
|
+
days: z
|
|
48
|
+
.array(z.enum(weekdays))
|
|
49
|
+
.min(1)
|
|
50
|
+
.max(7)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe("The weekdays of a weekly rhythm, like [monday, thursday]. Only with weekly."),
|
|
53
|
+
dayOfMonth: z
|
|
54
|
+
.array(z.int().min(1).max(31))
|
|
55
|
+
.min(1)
|
|
56
|
+
.max(31)
|
|
57
|
+
.optional()
|
|
58
|
+
.describe("The days of the month of a monthly rhythm, like [1, 15]. A month without that day is skipped, never moved to its last day. Only with monthly."),
|
|
59
|
+
times: z
|
|
60
|
+
.array(TimeOfDay)
|
|
61
|
+
.min(1)
|
|
62
|
+
.max(24)
|
|
63
|
+
.optional()
|
|
64
|
+
.describe("The times of day a daily, weekly or monthly run falls due, HH:MM in zone, like [08:00]."),
|
|
65
|
+
dates: z
|
|
66
|
+
.array(LocalMoment)
|
|
67
|
+
.min(1)
|
|
68
|
+
.max(200)
|
|
69
|
+
.optional()
|
|
70
|
+
.describe("The fixed moments of the rhythm dates, YYYY-MM-DDTHH:MM in zone, each falling due once. Only with dates."),
|
|
71
|
+
zone: TimeZone.optional().describe("The IANA time zone the times and dates are read in, like Europe/Berlin. Leaving it out takes the time zone of the creator of the process board."),
|
|
72
|
+
whileOpen: WhileOpen.optional().describe("When the last run is still open: wait starts no new run until it is completed, continue starts it anyway and the open ones stay open. Leaving it out is wait."),
|
|
73
|
+
})
|
|
74
|
+
.superRefine((schedule, ctx) => {
|
|
75
|
+
const wanted = rhythmFields[schedule.rhythm];
|
|
76
|
+
for (const field of scheduleFields) {
|
|
77
|
+
const present = schedule[field] !== undefined;
|
|
78
|
+
if (wanted.includes(field) && !present) {
|
|
79
|
+
ctx.addIssue({
|
|
80
|
+
code: "custom",
|
|
81
|
+
path: [field],
|
|
82
|
+
message: `A ${schedule.rhythm} rhythm needs ${field}${field === "times" ? ", like [08:00]" : ""}.`,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (!wanted.includes(field) && present) {
|
|
86
|
+
ctx.addIssue({
|
|
87
|
+
code: "custom",
|
|
88
|
+
path: [field],
|
|
89
|
+
message: `${field} belongs to ${field === "times" ? "a daily, weekly or monthly" : `a ${Object.entries(rhythmFields).find(([, fields]) => fields.includes(field))?.[0]}`} rhythm, not to ${schedule.rhythm}; leave it out.`,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
export { ActionChat, ActionItem, ActionList, ActionListInput, ActionNotice, ActionNoticeButton, ActionNoticeCrumb, ActionNoticeItem, ActionNoticeKind, ActionNoticeReason, ActionNoticeTitle, ActionProcess, ActionRow, ActionRun, ActionSection, ActionTask, actionFilters, isNodeRow, MachineInstructions, } from "./actions/actions.js";
|
|
1
|
+
export { ActionChat, ActionGadget, ActionItem, ActionList, ActionListInput, ActionNotice, ActionNoticeButton, ActionNoticeCrumb, ActionNoticeItem, ActionNoticeKind, ActionNoticeReason, ActionNoticeTitle, ActionProcess, ActionRow, ActionRun, ActionSection, ActionTask, actionFilters, isNodeRow, MachineInstructions, } from "./actions/actions.js";
|
|
2
2
|
export { adminModeHeader, adminModeOn } from "./admin-mode.js";
|
|
3
3
|
export { App, AppId, AppList, AppListInput, AppRevoked, AppRevokeInput, OwnAppListQuery, OwnSessionListQuery, Session, SessionId, SessionList, SessionListInput, SessionRevokeInput, SessionsRevoked, } from "./apps/apps.js";
|
|
4
4
|
export { NodeArchived, NodeArchiveInput, NodePurged, NodePurgeInput, NodeRestoreInput, } from "./archive/archive.js";
|
|
5
5
|
export { PasskeyDeleteInput, SetPasswordInput, SignUpInput, } from "./auth/auth.js";
|
|
6
6
|
export { AuthorizationRequest, AuthorizationResponse, Identity, Rules, } from "./authorization/authorization.js";
|
|
7
|
-
export { BoardColumn, BoardCreateInput, BoardDetail, BoardGetInput, BoardId, BoardKind, BoardLabel, BoardTaskCreateInput, BoardTaskItem, BoardTaskList, BoardTaskListInput, BoardUpdateInput, boardKinds, LabelId, ProcessCheck, TaskDetail, TaskGetInput, TaskId, TaskImage, TaskUpdateInput, } from "./boards/boards.js";
|
|
7
|
+
export { BoardColumn, BoardCreateInput, BoardDetail, BoardGetInput, BoardId, BoardKind, BoardLabel, BoardTaskCreated, BoardTaskCreateInput, BoardTaskItem, BoardTaskList, BoardTaskListInput, BoardTaskUpdated, BoardTaskUpdateInput, BoardUpdateInput, boardKinds, LabelId, maxBulkTasks, ProcessCheck, TaskDetail, TaskGetInput, TaskId, TaskImage, TaskUpdateInput, } from "./boards/boards.js";
|
|
8
|
+
export { CardField, CardFieldId, CardFieldInput, CardFieldOption, CardFieldType, CardFieldValue, CardKind, CardKindIcon, CardKindId, CardKindInput, CardOptionId, ChecklistItem, cardFieldTypes, cardKindIcons, emptyValue, TaskFields, TaskKind, } from "./card-kinds/card-kinds.js";
|
|
8
9
|
export { ColumnId, ColumnType, columnTypes, TaskColumn } from "./columns/columns.js";
|
|
9
10
|
export { Connection, ConnectionCreateInput, ConnectionCredential, ConnectionDetail, ConnectionGetInput, ConnectionId, ConnectionList, ConnectionListInput, ConnectionRevokeInput, ConnectionState, ConnectionTested, ConnectionTestInput, ConnectionTestResult, ConnectionUpdateInput, } from "./connections/connections.js";
|
|
10
11
|
export { Call, CallId, CallList, CallListInput, CallSource, Connector, ConnectorField, ConnectorGetInput, ConnectorId, ConnectorList, ConnectorListInput, ConnectorTool, } from "./connectors/connectors.js";
|
|
11
|
-
export { type BoxType, boxTypes, chartTypes, type DashboardBox, DashboardConfig, DashboardCreateInput, DashboardDetail, DashboardGetInput, DashboardId, DashboardKey, DashboardRun, DashboardUpdateInput, rhythms, Schedule, WhileOpen, weekdays, whileOpenModes, } from "./dashboards/dashboards.js";
|
|
12
12
|
export { DirectoryPrincipal, DirectorySearchInput } from "./directory/directory.js";
|
|
13
13
|
export { DocumentCreateInput, DocumentDetail, DocumentGetInput, DocumentUpdateInput, } from "./documents/documents.js";
|
|
14
14
|
export { ErrorCode, ErrorIssue, ErrorResponse, errorCodes } from "./error/error.js";
|
|
15
15
|
export { ActorKind, Event, EventId, EventKind, EventList, EventListInput, } from "./events/events.js";
|
|
16
16
|
export { FileCreateInput, FileDetail, type FileFormat, FileGetInput, FileId, FileTextState, FileUpdateInput, FileUpload, fileFormatExtensions, fileFormatOf, fileTextStates, maxFileBytes, UploadTicket, uploadTicketHeader, uploadTicketLifetimeMs, } from "./files/files.js";
|
|
17
17
|
export { FunctionRemoved, ServiceInterfaceFunctionCreateInput, ServiceInterfaceFunctionRemoveInput, ServiceInterfaceFunctionUpdateInput, } from "./functions/functions.js";
|
|
18
|
+
export { GadgetCall, GadgetCallCreateInput, GadgetCallEntry, GadgetCallGetInput, GadgetCallItem, GadgetCallList, GadgetCallListInput, GadgetCallStatus, GadgetChange, GadgetClientLog, GadgetConsoleLine, GadgetCreateInput, GadgetDetail, GadgetFile, GadgetFilePath, GadgetFunction, GadgetFunctionName, GadgetGetInput, GadgetLevel, GadgetManifest, GadgetPublishInput, GadgetSettings, GadgetTestInput, GadgetTestResult, GadgetTestRun, GadgetToolUse, GadgetUpdateInput, GadgetVersionRef, gadgetLimits, gadgetLogDays, } from "./gadgets/gadgets.js";
|
|
18
19
|
export { type Action, actions, hasRoute, isAction, isPackage, isWord, type Package, packages, parseConnectorFunction, parseToolName, type Resource, type Route, resources, type ToolName, toolEvent, toolPermission, toolRoute, toolSchemaName, verbs, } from "./grammar/grammar.js";
|
|
19
20
|
export { GrantId, GrantRight, NodeGrant, NodeGrantList, NodeGrantListInput, NodeGrantRevoked, NodeGrantRevokeInput, NodeShared, NodeShareInput, } from "./grants/grants.js";
|
|
20
21
|
export { createId, type Id, idSchema } from "./ids/ids.js";
|
|
@@ -31,8 +32,9 @@ export { PageDetail, PageGetInput, PageHead, PageHeading, PageId, PageList, Page
|
|
|
31
32
|
export { IdempotencyKey, Rev } from "./primitives/primitives.js";
|
|
32
33
|
export { Locale, locales, Name, ProfileImageResponse, ProfileUpdateInput, profileImageMaxBytes, profileImageTypes, Theme, TimeZone, themes, } from "./profile/profile.js";
|
|
33
34
|
export { GrantChange, PermissionsResponse, RightInCode, RightPath, RightTree, Role, RoleArchiveInput, RoleCreateInput, RoleDetail, RoleGetInput, RoleGrantCreateInput, RoleGrantRevokeInput, RoleId, RoleList, RoleListInput, RoleRestoreInput, RoleUpdateInput, } from "./roles/roles.js";
|
|
34
|
-
export { BoardRunCreateInput,
|
|
35
|
+
export { BoardRunCreateInput, RunCompleteInput, RunDetail, RunGetInput, RunId, RunItem, RunList, RunListInput, RunStatus, runStatuses, } from "./runs/runs.js";
|
|
35
36
|
export { RuntimeConfig } from "./runtime-config.js";
|
|
37
|
+
export { rhythms, Schedule, WhileOpen, weekdays, whileOpenModes } from "./schedule/schedule.js";
|
|
36
38
|
export { NodeSecret, NodeSecretCreateInput, NodeSecretDetail, NodeSecretGetInput, NodeSecretRemoveInput, NodeSecretUpdateInput, NodeUnlocked, NodeUnlockInput, unlockMinutes, } from "./secrets/secrets.js";
|
|
37
39
|
export { type Authorized, type AuthorizeResult, createServiceClient, type InterfaceDeclaredResult, type InterfaceRemovedResult, type ServiceClient, type ServiceClientDeps, type ServiceClientFailure, } from "./service-client/service-client.js";
|
|
38
40
|
export { FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
|
|
@@ -41,5 +43,5 @@ export { TableColumn, TableColumnChange, TableColumnType, TableCreateInput, Tabl
|
|
|
41
43
|
export { type Actor, defineTool, type Permission, type Tool, type ToolAnnotations, type ToolContext, type ToolInput, type ToolSource, } from "./tool.js";
|
|
42
44
|
export { IntelligenceUserGetInput, IntelligenceUserUpdateInput, NotifyMode, notifyModes, UserSettings, } from "./user-settings/user-settings.js";
|
|
43
45
|
export { MachineFacts, MachineKeyFacts, MachineKind, MessageMachine, OperatorProvider, OwnRoleList, SignInMethod, User, UserDetail, UserDisableInput, UserEnableInput, UserGetInput, UserId, UserKind, UserList, UserListInput, UserListItem, UserStatus, UserTestInput, UserTestResult, UserUpdateInput, } from "./users/users.js";
|
|
44
|
-
export {
|
|
45
|
-
export { NodeVersion, NodeVersionCreateInput, NodeVersionDetail, NodeVersionGetInput, NodeVersionList, NodeVersionListInput, VersionId, versionKinds, } from "./versions/versions.js";
|
|
46
|
+
export { TicketSubject, TicketSubjectRef, ValidationBoardId, validationBoardId, } from "./validation/validation.js";
|
|
47
|
+
export { MoveColumn, NodeVersion, NodeVersionCreateInput, NodeVersionDetail, NodeVersionGetInput, NodeVersionList, NodeVersionListInput, TaskMove, TaskVersionChange, taskVersionChanges, VersionId, VersionMove, versionKinds, } from "./versions/versions.js";
|
package/dist/sdk.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
// The contract between UI, backends and outside services, published as `@anchrd/colab-sdk`. The
|
|
2
2
|
// package exports only this file, so everything public is named here once.
|
|
3
3
|
// biome-ignore lint/performance/noBarrelFile: this file IS the entry point of the package.
|
|
4
|
-
export { ActionChat, ActionItem, ActionList, ActionListInput, ActionNotice, ActionNoticeButton, ActionNoticeCrumb, ActionNoticeItem, ActionNoticeKind, ActionNoticeReason, ActionNoticeTitle, ActionProcess, ActionRow, ActionRun, ActionSection, ActionTask, actionFilters, isNodeRow, MachineInstructions, } from "./actions/actions.js";
|
|
4
|
+
export { ActionChat, ActionGadget, ActionItem, ActionList, ActionListInput, ActionNotice, ActionNoticeButton, ActionNoticeCrumb, ActionNoticeItem, ActionNoticeKind, ActionNoticeReason, ActionNoticeTitle, ActionProcess, ActionRow, ActionRun, ActionSection, ActionTask, actionFilters, isNodeRow, MachineInstructions, } from "./actions/actions.js";
|
|
5
5
|
export { adminModeHeader, adminModeOn } from "./admin-mode.js";
|
|
6
6
|
export { App, AppId, AppList, AppListInput, AppRevoked, AppRevokeInput, OwnAppListQuery, OwnSessionListQuery, Session, SessionId, SessionList, SessionListInput, SessionRevokeInput, SessionsRevoked, } from "./apps/apps.js";
|
|
7
7
|
export { NodeArchived, NodeArchiveInput, NodePurged, NodePurgeInput, NodeRestoreInput, } from "./archive/archive.js";
|
|
8
8
|
export { PasskeyDeleteInput, SetPasswordInput, SignUpInput, } from "./auth/auth.js";
|
|
9
9
|
export { AuthorizationRequest, AuthorizationResponse, Identity, Rules, } from "./authorization/authorization.js";
|
|
10
|
-
export { BoardColumn, BoardCreateInput, BoardDetail, BoardGetInput, BoardId, BoardKind, BoardLabel, BoardTaskCreateInput, BoardTaskItem, BoardTaskList, BoardTaskListInput, BoardUpdateInput, boardKinds, LabelId, ProcessCheck, TaskDetail, TaskGetInput, TaskId, TaskImage, TaskUpdateInput, } from "./boards/boards.js";
|
|
10
|
+
export { BoardColumn, BoardCreateInput, BoardDetail, BoardGetInput, BoardId, BoardKind, BoardLabel, BoardTaskCreated, BoardTaskCreateInput, BoardTaskItem, BoardTaskList, BoardTaskListInput, BoardTaskUpdated, BoardTaskUpdateInput, BoardUpdateInput, boardKinds, LabelId, maxBulkTasks, ProcessCheck, TaskDetail, TaskGetInput, TaskId, TaskImage, TaskUpdateInput, } from "./boards/boards.js";
|
|
11
|
+
export { CardField, CardFieldId, CardFieldInput, CardFieldOption, CardFieldType, CardFieldValue, CardKind, CardKindIcon, CardKindId, CardKindInput, CardOptionId, ChecklistItem, cardFieldTypes, cardKindIcons, emptyValue, TaskFields, TaskKind, } from "./card-kinds/card-kinds.js";
|
|
11
12
|
export { ColumnId, ColumnType, columnTypes, TaskColumn } from "./columns/columns.js";
|
|
12
13
|
export { Connection, ConnectionCreateInput, ConnectionCredential, ConnectionDetail, ConnectionGetInput, ConnectionId, ConnectionList, ConnectionListInput, ConnectionRevokeInput, ConnectionState, ConnectionTested, ConnectionTestInput, ConnectionTestResult, ConnectionUpdateInput, } from "./connections/connections.js";
|
|
13
14
|
export { Call, CallId, CallList, CallListInput, CallSource, Connector, ConnectorField, ConnectorGetInput, ConnectorId, ConnectorList, ConnectorListInput, ConnectorTool, } from "./connectors/connectors.js";
|
|
14
|
-
export { boxTypes, chartTypes, DashboardConfig, DashboardCreateInput, DashboardDetail, DashboardGetInput, DashboardId, DashboardKey, DashboardRun, DashboardUpdateInput, rhythms, Schedule, WhileOpen, weekdays, whileOpenModes, } from "./dashboards/dashboards.js";
|
|
15
15
|
export { DirectoryPrincipal, DirectorySearchInput } from "./directory/directory.js";
|
|
16
16
|
export { DocumentCreateInput, DocumentDetail, DocumentGetInput, DocumentUpdateInput, } from "./documents/documents.js";
|
|
17
17
|
export { ErrorCode, ErrorIssue, ErrorResponse, errorCodes } from "./error/error.js";
|
|
18
18
|
export { ActorKind, Event, EventId, EventKind, EventList, EventListInput, } from "./events/events.js";
|
|
19
19
|
export { FileCreateInput, FileDetail, FileGetInput, FileId, FileTextState, FileUpdateInput, FileUpload, fileFormatExtensions, fileFormatOf, fileTextStates, maxFileBytes, UploadTicket, uploadTicketHeader, uploadTicketLifetimeMs, } from "./files/files.js";
|
|
20
20
|
export { FunctionRemoved, ServiceInterfaceFunctionCreateInput, ServiceInterfaceFunctionRemoveInput, ServiceInterfaceFunctionUpdateInput, } from "./functions/functions.js";
|
|
21
|
+
export { GadgetCall, GadgetCallCreateInput, GadgetCallEntry, GadgetCallGetInput, GadgetCallItem, GadgetCallList, GadgetCallListInput, GadgetCallStatus, GadgetChange, GadgetClientLog, GadgetConsoleLine, GadgetCreateInput, GadgetDetail, GadgetFile, GadgetFilePath, GadgetFunction, GadgetFunctionName, GadgetGetInput, GadgetLevel, GadgetManifest, GadgetPublishInput, GadgetSettings, GadgetTestInput, GadgetTestResult, GadgetTestRun, GadgetToolUse, GadgetUpdateInput, GadgetVersionRef, gadgetLimits, gadgetLogDays, } from "./gadgets/gadgets.js";
|
|
21
22
|
export { actions, hasRoute, isAction, isPackage, isWord, packages, parseConnectorFunction, parseToolName, resources, toolEvent, toolPermission, toolRoute, toolSchemaName, verbs, } from "./grammar/grammar.js";
|
|
22
23
|
export { GrantId, GrantRight, NodeGrant, NodeGrantList, NodeGrantListInput, NodeGrantRevoked, NodeGrantRevokeInput, NodeShared, NodeShareInput, } from "./grants/grants.js";
|
|
23
24
|
export { createId, idSchema } from "./ids/ids.js";
|
|
@@ -34,8 +35,9 @@ export { PageDetail, PageGetInput, PageHead, PageHeading, PageId, PageList, Page
|
|
|
34
35
|
export { IdempotencyKey, Rev } from "./primitives/primitives.js";
|
|
35
36
|
export { Locale, locales, Name, ProfileImageResponse, ProfileUpdateInput, profileImageMaxBytes, profileImageTypes, Theme, TimeZone, themes, } from "./profile/profile.js";
|
|
36
37
|
export { GrantChange, PermissionsResponse, RightInCode, RightPath, RightTree, Role, RoleArchiveInput, RoleCreateInput, RoleDetail, RoleGetInput, RoleGrantCreateInput, RoleGrantRevokeInput, RoleId, RoleList, RoleListInput, RoleRestoreInput, RoleUpdateInput, } from "./roles/roles.js";
|
|
37
|
-
export { BoardRunCreateInput,
|
|
38
|
+
export { BoardRunCreateInput, RunCompleteInput, RunDetail, RunGetInput, RunId, RunItem, RunList, RunListInput, RunStatus, runStatuses, } from "./runs/runs.js";
|
|
38
39
|
export { RuntimeConfig } from "./runtime-config.js";
|
|
40
|
+
export { rhythms, Schedule, WhileOpen, weekdays, whileOpenModes } from "./schedule/schedule.js";
|
|
39
41
|
export { NodeSecret, NodeSecretCreateInput, NodeSecretDetail, NodeSecretGetInput, NodeSecretRemoveInput, NodeSecretUpdateInput, NodeUnlocked, NodeUnlockInput, unlockMinutes, } from "./secrets/secrets.js";
|
|
40
42
|
export { createServiceClient, } from "./service-client/service-client.js";
|
|
41
43
|
export { FunctionId, InterfaceId, RightWord, Service, ServiceArchiveInput, ServiceCreateInput, ServiceFunction, ServiceId, ServiceInterface, ServiceKeyIssued, ServiceList, ServiceListInput, ServiceName, ServicePurged, ServicePurgeInput, ServiceRestoreInput, ServiceRotateInput, ServiceUpdateInput, } from "./services/services.js";
|
|
@@ -44,5 +46,5 @@ export { TableColumn, TableColumnChange, TableColumnType, TableCreateInput, Tabl
|
|
|
44
46
|
export { defineTool, } from "./tool.js";
|
|
45
47
|
export { IntelligenceUserGetInput, IntelligenceUserUpdateInput, NotifyMode, notifyModes, UserSettings, } from "./user-settings/user-settings.js";
|
|
46
48
|
export { MachineFacts, MachineKeyFacts, MachineKind, MessageMachine, OperatorProvider, OwnRoleList, SignInMethod, User, UserDetail, UserDisableInput, UserEnableInput, UserGetInput, UserId, UserKind, UserList, UserListInput, UserListItem, UserStatus, UserTestInput, UserTestResult, UserUpdateInput, } from "./users/users.js";
|
|
47
|
-
export {
|
|
48
|
-
export { NodeVersion, NodeVersionCreateInput, NodeVersionDetail, NodeVersionGetInput, NodeVersionList, NodeVersionListInput, VersionId, versionKinds, } from "./versions/versions.js";
|
|
49
|
+
export { TicketSubject, TicketSubjectRef, ValidationBoardId, validationBoardId, } from "./validation/validation.js";
|
|
50
|
+
export { MoveColumn, NodeVersion, NodeVersionCreateInput, NodeVersionDetail, NodeVersionGetInput, NodeVersionList, NodeVersionListInput, TaskMove, TaskVersionChange, taskVersionChanges, VersionId, VersionMove, versionKinds, } from "./versions/versions.js";
|
package/dist/tables/tables.d.ts
CHANGED
|
@@ -76,6 +76,14 @@ export declare const TableUpdateInput: z.ZodObject<{
|
|
|
76
76
|
from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
77
|
}, z.core.$strict>>>;
|
|
78
78
|
csv: z.ZodOptional<z.ZodString>;
|
|
79
|
+
key: z.ZodOptional<z.ZodString>;
|
|
80
|
+
set: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
|
+
keyValue: z.ZodString;
|
|
82
|
+
cells: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
83
|
+
value: z.ZodString;
|
|
84
|
+
from: z.ZodString;
|
|
85
|
+
}, z.core.$strict>>;
|
|
86
|
+
}, z.core.$strict>>>;
|
|
79
87
|
append: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString>>>;
|
|
80
88
|
replace: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
81
89
|
position: z.ZodNumber;
|
package/dist/tables/tables.js
CHANGED
|
@@ -4,8 +4,9 @@ import { IdempotencyKey, Rev } from "../primitives/primitives.js";
|
|
|
4
4
|
// Tables (#40, Nodes › Tabelle, E39, E59, E70): the inputs of `intelligence_table_create`, `_get`
|
|
5
5
|
// and `_update`, and their answers. A table is CSV, stored and exported as it is, whose first line is
|
|
6
6
|
// the header; beside it every version keeps the columns with their types. A row has no id: it is
|
|
7
|
-
// addressed by its position, counted from 1 at the first data row, against the state `rev` names
|
|
8
|
-
//
|
|
7
|
+
// addressed by its position, counted from 1 at the first data row, against the state `rev` names,
|
|
8
|
+
// or by its text in a key column the call names (`set`, #630, E120), checked cell by cell instead.
|
|
9
|
+
// Setting, appending, replacing and removing rows are fields of `_update`, not a resource of their own.
|
|
9
10
|
export const TableId = NodeId.describe("The table's id, a `node_…` of kind table.");
|
|
10
11
|
// The five types of a column (E39). The type only decides how a cell is shown; a cell is never
|
|
11
12
|
// checked against it.
|
|
@@ -65,9 +66,26 @@ export const TableGetInput = z.strictObject({
|
|
|
65
66
|
.optional()
|
|
66
67
|
.describe("rows (the default) answers the rows as lists of cells; csv answers the whole table as CSV text instead, the header line first."),
|
|
67
68
|
});
|
|
69
|
+
// One cell of a `set` entry (#630, E120): the new text and the text that was read. The cell is
|
|
70
|
+
// checked on its own, so a change elsewhere in the table is no conflict.
|
|
71
|
+
const CellChange = z.strictObject({
|
|
72
|
+
value: z.string().describe("The cell's new text."),
|
|
73
|
+
from: z
|
|
74
|
+
.string()
|
|
75
|
+
.describe("The cell's text as you read it. If it is something else now, nothing in the call changes and the answer is conflict, naming the cell."),
|
|
76
|
+
});
|
|
77
|
+
const SetEntry = z.strictObject({
|
|
78
|
+
keyValue: z
|
|
79
|
+
.string()
|
|
80
|
+
.describe("The row to change, by its text in the key column. Exactly one row must hold it; an unknown or doubled one answers invalid and changes nothing."),
|
|
81
|
+
cells: z
|
|
82
|
+
.record(ColumnName, CellChange)
|
|
83
|
+
.refine((cells) => Object.keys(cells).length > 0, "Name at least one cell to change.")
|
|
84
|
+
.describe("Only the cells to change, by column name, each with its new value and the value you read (from). The other cells of the row stay as they are."),
|
|
85
|
+
});
|
|
68
86
|
export const TableUpdateInput = z.strictObject({
|
|
69
87
|
tableId: TableId,
|
|
70
|
-
rev: Rev.optional().describe("The revision of the table this change is based on, as the last read returned it; the positions of replace and remove are counted in that state. Required for
|
|
88
|
+
rev: Rev.optional().describe("The revision of the table this change is based on, as the last read returned it; the positions of replace and remove are counted in that state. Required for replace, remove, columns and csv; set and append work without it. If someone saved in between, the call answers conflict and changes nothing: read the table again and decide."),
|
|
71
89
|
editSession: EditSession,
|
|
72
90
|
columns: z
|
|
73
91
|
.array(TableColumnChange)
|
|
@@ -76,9 +94,16 @@ export const TableUpdateInput = z.strictObject({
|
|
|
76
94
|
.optional()
|
|
77
95
|
.describe("The whole new column list in its new order: names, types, new columns and, by leaving them out, removed ones. A removed column's cells stay only in the table's history; the answer names the rows that had content in it. With csv, it is the header the csv must match instead."),
|
|
78
96
|
csv: Csv.optional().describe("Replace the whole table: CSV whose header line holds exactly the column names, the current ones or those sent in columns alongside."),
|
|
97
|
+
key: ColumnName.optional().describe("The key column of set: the column, by name, whose text names the row of each entry. Any column whose texts are unique in the rows you change; the table itself has no key."),
|
|
98
|
+
set: z
|
|
99
|
+
.array(SetEntry)
|
|
100
|
+
.min(1)
|
|
101
|
+
.max(10_000)
|
|
102
|
+
.optional()
|
|
103
|
+
.describe("Change single cells of rows found by their text in the key column, without rev and without positions: a change elsewhere in the table in between is no conflict, only a cell that is no longer what you read (from). All or nothing: a stale cell answers conflict, an unknown or doubled key value invalid, each with issues naming every entry, and nothing changes. Goes with append only, applied first."),
|
|
79
104
|
append: Rows.min(1)
|
|
80
105
|
.optional()
|
|
81
|
-
.describe("Rows to add at the end, each a list of cells in the order of the columns. Appending alone needs no rev and no reading of the table first."),
|
|
106
|
+
.describe("Rows to add at the end, each a list of cells in the order of the columns. Appending alone or with set needs no rev and no reading of the table first."),
|
|
82
107
|
replace: z
|
|
83
108
|
.array(z.strictObject({
|
|
84
109
|
position: Position,
|
package/dist/users/users.js
CHANGED
|
@@ -17,8 +17,8 @@ export const UserStatus = z.enum(["invited", "expired", "disabled", "archived"])
|
|
|
17
17
|
// extern").
|
|
18
18
|
export const MachineKind = z.enum(["operator", "external"]);
|
|
19
19
|
// The providers of the catalog (`operatorProviders` in `operators.ts`). Here, beside the kinds, so a
|
|
20
|
-
// schema of `nodes` or `messages` can name it without importing `operators`,
|
|
21
|
-
//
|
|
20
|
+
// schema of `nodes` or `messages` can name it without importing `operators`, whose module graph
|
|
21
|
+
// reaches far.
|
|
22
22
|
export const OperatorProvider = z.enum(["claude", "codex", "gemini"]);
|
|
23
23
|
// What a machine is beside its name (#348, #403, E77, E80, E85): its kind from `access`, and for an
|
|
24
24
|
// Operator the provider it runs at from `operator`; null for one whose row is gone there. A chat
|