@anchrd/colab-sdk 0.1.6 → 0.1.8

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.
Files changed (75) hide show
  1. package/dist/actions/actions.d.ts +120 -112
  2. package/dist/actions/actions.js +29 -23
  3. package/dist/apps/apps.d.ts +8 -8
  4. package/dist/apps/apps.js +6 -6
  5. package/dist/archive/archive.d.ts +2 -2
  6. package/dist/archive/archive.js +2 -2
  7. package/dist/boards/boards.d.ts +60 -60
  8. package/dist/boards/boards.js +19 -19
  9. package/dist/columns/columns.d.ts +1 -1
  10. package/dist/columns/columns.js +1 -1
  11. package/dist/connections/connections.d.ts +15 -15
  12. package/dist/connections/connections.js +6 -6
  13. package/dist/connectors/connectors.d.ts +14 -14
  14. package/dist/connectors/connectors.js +7 -7
  15. package/dist/dashboards/dashboards.d.ts +3 -3
  16. package/dist/dashboards/dashboards.js +3 -3
  17. package/dist/directory/directory.d.ts +1 -1
  18. package/dist/directory/directory.js +1 -1
  19. package/dist/documents/documents.d.ts +6 -6
  20. package/dist/documents/documents.js +1 -1
  21. package/dist/events/events.d.ts +7 -7
  22. package/dist/events/events.js +4 -4
  23. package/dist/files/files.d.ts +19 -5
  24. package/dist/files/files.js +12 -6
  25. package/dist/functions/functions.d.ts +1 -1
  26. package/dist/functions/functions.js +1 -1
  27. package/dist/grammar/grammar.d.ts +1 -0
  28. package/dist/grammar/grammar.js +5 -1
  29. package/dist/grants/grants.d.ts +7 -7
  30. package/dist/grants/grants.js +5 -5
  31. package/dist/instructions/instructions.d.ts +3 -3
  32. package/dist/instructions/instructions.js +2 -2
  33. package/dist/interfaces/interfaces.d.ts +1 -1
  34. package/dist/interfaces/interfaces.js +1 -1
  35. package/dist/invitations/invitations.d.ts +8 -8
  36. package/dist/invitations/invitations.js +4 -4
  37. package/dist/links/links.d.ts +3 -3
  38. package/dist/links/links.js +2 -2
  39. package/dist/machines/machines.d.ts +5 -5
  40. package/dist/machines/machines.js +2 -2
  41. package/dist/messages/messages.d.ts +12 -12
  42. package/dist/messages/messages.js +5 -5
  43. package/dist/nodes/nodes.d.ts +58 -58
  44. package/dist/nodes/nodes.js +19 -19
  45. package/dist/operators/operators.d.ts +149 -43
  46. package/dist/operators/operators.js +88 -19
  47. package/dist/pages/pages.d.ts +22 -22
  48. package/dist/pages/pages.js +8 -6
  49. package/dist/profile/profile.d.ts +1 -1
  50. package/dist/profile/profile.js +1 -1
  51. package/dist/roles/roles.d.ts +12 -12
  52. package/dist/roles/roles.js +7 -7
  53. package/dist/runs/runs.d.ts +23 -23
  54. package/dist/runs/runs.js +9 -9
  55. package/dist/runtime-config.d.ts +1 -1
  56. package/dist/runtime-config.js +1 -1
  57. package/dist/sdk.d.ts +3 -3
  58. package/dist/sdk.js +3 -3
  59. package/dist/secrets/secrets.d.ts +5 -5
  60. package/dist/secrets/secrets.js +2 -2
  61. package/dist/services/services.d.ts +15 -15
  62. package/dist/services/services.js +6 -6
  63. package/dist/sso/sso.d.ts +4 -4
  64. package/dist/sso/sso.js +3 -3
  65. package/dist/tables/tables.d.ts +4 -4
  66. package/dist/tables/tables.js +4 -4
  67. package/dist/user-settings/user-settings.d.ts +1 -1
  68. package/dist/user-settings/user-settings.js +1 -1
  69. package/dist/users/users.d.ts +23 -23
  70. package/dist/users/users.js +9 -9
  71. package/dist/validation/validation.d.ts +11 -11
  72. package/dist/validation/validation.js +4 -4
  73. package/dist/versions/versions.d.ts +7 -7
  74. package/dist/versions/versions.js +2 -2
  75. package/package.json +1 -1
@@ -68,16 +68,16 @@ export const BoardUpdateInput = z.strictObject({
68
68
  .optional()
69
69
  .describe("The board's labels, all of them: a label with labelId is kept or renamed, one without is made, and a label left out is removed from the board and from every task carrying it."),
70
70
  });
71
- export const BoardColumn = z.strictObject({
71
+ export const BoardColumn = z.object({
72
72
  columnId: ColumnId,
73
73
  name: z.string(),
74
74
  type: ColumnType,
75
75
  visible: z.boolean(),
76
76
  });
77
- export const BoardLabel = z.strictObject({ labelId: LabelId, name: z.string() });
77
+ export const BoardLabel = z.object({ labelId: LabelId, name: z.string() });
78
78
  // What stands between a board and saving it as a process (#43): the UI shows a box for each, and the
79
79
  // server refuses on its own (trap P066).
80
- export const ProcessCheck = z.strictObject({
80
+ export const ProcessCheck = z.object({
81
81
  // A machine (an Operator) holds write on the board (#334: any machine, whatever its roles).
82
82
  operator: z.boolean(),
83
83
  // The first column is of type backlog.
@@ -87,9 +87,9 @@ export const ProcessCheck = z.strictObject({
87
87
  // Every machine that is neither locked nor archived, whatever its roles, by name (#148, #334):
88
88
  // whom the settings offer "Für Operator freigeben". Empty when there is none. Readable with the board,
89
89
  // without any right in `access`.
90
- operators: z.array(z.strictObject({ userId: z.string(), name: z.string() })),
90
+ operators: z.array(z.object({ userId: z.string(), name: z.string() })),
91
91
  });
92
- export const BoardDetail = z.strictObject({
92
+ export const BoardDetail = z.object({
93
93
  boardId: NodeId,
94
94
  name: z.string(),
95
95
  kind: BoardShownKind,
@@ -109,7 +109,7 @@ export const BoardDetail = z.strictObject({
109
109
  validator: NodePerson.nullable(),
110
110
  columns: z.array(BoardColumn),
111
111
  labels: z.array(BoardLabel),
112
- rights: z.strictObject({ write: z.boolean() }),
112
+ rights: z.object({ write: z.boolean() }),
113
113
  rev: z.number().int(),
114
114
  updatedAt: z.iso.datetime(),
115
115
  });
@@ -204,10 +204,10 @@ export const TaskUpdateInput = z.strictObject({
204
204
  });
205
205
  // An image linked in a task's content: an outside URL, or a file in Colab the caller can read.
206
206
  export const TaskImage = z.union([
207
- z.strictObject({ kind: z.literal("url"), url: z.string() }),
208
- z.strictObject({ kind: z.literal("file"), nodeId: NodeId }),
207
+ z.object({ kind: z.literal("url"), url: z.string() }),
208
+ z.object({ kind: z.literal("file"), nodeId: NodeId }),
209
209
  ]);
210
- export const BoardTaskItem = z.strictObject({
210
+ export const BoardTaskItem = z.object({
211
211
  taskId: NodeId,
212
212
  // The run the task belongs to, null for a task of the board itself (the template of a process).
213
213
  runId: RunRef.nullable(),
@@ -228,20 +228,20 @@ export const BoardTaskItem = z.strictObject({
228
228
  // Whether the caller may change this task, as intelligence_task_update decides it: the board's
229
229
  // right for a task, its node's for a ticket (#47: the node's responsible person, the holder of
230
230
  // `validator` (#334), an admin in admin mode; only reading while the node is archived).
231
- rights: z.strictObject({ write: z.boolean() }),
231
+ rights: z.object({ write: z.boolean() }),
232
232
  position: z.string(),
233
233
  rev: z.number().int(),
234
234
  updatedAt: z.iso.datetime(),
235
235
  });
236
- export const BoardTaskList = z.strictObject({
236
+ export const BoardTaskList = z.object({
237
237
  items: z.array(BoardTaskItem),
238
238
  nextCursor: z.string().nullable(),
239
239
  // Over MCP only (E87, #354): the board's instruction, a run's copy of it with `runId`; null
240
240
  // without one.
241
241
  instruction: z.string().nullable().optional(),
242
242
  });
243
- const TaskRef = z.strictObject({ taskId: NodeId, title: z.string(), column: TaskColumn });
244
- export const TaskDetail = z.strictObject({
243
+ const TaskRef = z.object({ taskId: NodeId, title: z.string(), column: TaskColumn });
244
+ export const TaskDetail = z.object({
245
245
  taskId: NodeId,
246
246
  boardId: NodeId,
247
247
  runId: RunRef.nullable(),
@@ -257,12 +257,12 @@ export const TaskDetail = z.strictObject({
257
257
  parentTaskId: NodeId.nullable(),
258
258
  position: z.string(),
259
259
  // The crumbs: the board with what board it is (its icon, #385), then every task above it, top down.
260
- path: z.strictObject({
261
- board: z.strictObject({ boardId: NodeId, name: z.string(), boardKind: BoardShownKind }),
262
- tasks: z.array(z.strictObject({ taskId: NodeId, title: z.string() })),
260
+ path: z.object({
261
+ board: z.object({ boardId: NodeId, name: z.string(), boardKind: BoardShownKind }),
262
+ tasks: z.array(z.object({ taskId: NodeId, title: z.string() })),
263
263
  }),
264
264
  // The direct subtasks, and how many of them are done.
265
- subtasks: z.strictObject({
265
+ subtasks: z.object({
266
266
  items: z.array(TaskRef),
267
267
  done: z.number().int(),
268
268
  total: z.number().int(),
@@ -270,10 +270,10 @@ export const TaskDetail = z.strictObject({
270
270
  dependencies: z.array(TaskRef),
271
271
  ready: z.boolean(),
272
272
  images: z.array(TaskImage),
273
- rights: z.strictObject({ write: z.boolean() }),
273
+ rights: z.object({ write: z.boolean() }),
274
274
  // The task waits (#377, E77): its assignee lacks something, a right above all, and asked in the
275
275
  // chat. Shown in place of the column; null while it does not wait.
276
- waiting: z.strictObject({ since: z.iso.datetime(), by: NodePerson }).nullable(),
276
+ waiting: z.object({ since: z.iso.datetime(), by: NodePerson }).nullable(),
277
277
  // A ticket of the validation board (#47): the node it validates with its path, and every move,
278
278
  // newest first. Both null for every other task.
279
279
  subject: TicketSubject.nullable(),
@@ -24,5 +24,5 @@ export declare const TaskColumn: z.ZodObject<{
24
24
  blocked: "blocked";
25
25
  archive: "archive";
26
26
  }>;
27
- }, z.core.$strict>;
27
+ }, z.core.$strip>;
28
28
  export type TaskColumn = z.infer<typeof TaskColumn>;
@@ -21,7 +21,7 @@ export const columnTypes = [
21
21
  export const ColumnType = z
22
22
  .enum(columnTypes)
23
23
  .describe("What a column means: backlog (not ready yet), open (waiting), progress (being worked on), done (closed with yes), discarded (closed with no: rejected or lost, no error), blocked (an error), archive (the shelf at the bottom of every board, hidden by default).");
24
- export const TaskColumn = z.strictObject({
24
+ export const TaskColumn = z.object({
25
25
  columnId: ColumnId,
26
26
  name: z.string(),
27
27
  type: ColumnType,
@@ -39,7 +39,7 @@ export type ConnectionRevokeInput = z.infer<typeof ConnectionRevokeInput>;
39
39
  export declare const ConnectionCredential: z.ZodObject<{
40
40
  name: z.ZodString;
41
41
  setAt: z.ZodISODateTime;
42
- }, z.core.$strict>;
42
+ }, z.core.$strip>;
43
43
  export type ConnectionCredential = z.infer<typeof ConnectionCredential>;
44
44
  export declare const Connection: z.ZodObject<{
45
45
  connectorId: z.ZodString;
@@ -59,8 +59,8 @@ export declare const Connection: z.ZodObject<{
59
59
  credentials: z.ZodArray<z.ZodObject<{
60
60
  name: z.ZodString;
61
61
  setAt: z.ZodISODateTime;
62
- }, z.core.$strict>>;
63
- }, z.core.$strict>;
62
+ }, z.core.$strip>>;
63
+ }, z.core.$strip>;
64
64
  export type Connection = z.infer<typeof Connection>;
65
65
  export declare const ConnectionDetail: z.ZodObject<{
66
66
  connectorId: z.ZodString;
@@ -80,9 +80,9 @@ export declare const ConnectionDetail: z.ZodObject<{
80
80
  credentials: z.ZodArray<z.ZodObject<{
81
81
  name: z.ZodString;
82
82
  setAt: z.ZodISODateTime;
83
- }, z.core.$strict>>;
83
+ }, z.core.$strip>>;
84
84
  settings: z.ZodRecord<z.ZodString, z.ZodString>;
85
- }, z.core.$strict>;
85
+ }, z.core.$strip>;
86
86
  export type ConnectionDetail = z.infer<typeof ConnectionDetail>;
87
87
  export declare const ConnectionList: z.ZodObject<{
88
88
  items: z.ZodArray<z.ZodObject<{
@@ -103,18 +103,18 @@ export declare const ConnectionList: z.ZodObject<{
103
103
  credentials: z.ZodArray<z.ZodObject<{
104
104
  name: z.ZodString;
105
105
  setAt: z.ZodISODateTime;
106
- }, z.core.$strict>>;
107
- }, z.core.$strict>>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>>;
108
108
  nextCursor: z.ZodNullable<z.ZodString>;
109
- }, z.core.$strict>;
109
+ }, z.core.$strip>;
110
110
  export type ConnectionList = z.infer<typeof ConnectionList>;
111
111
  export declare const ConnectionTestResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
112
112
  ok: z.ZodLiteral<true>;
113
113
  detail: z.ZodNullable<z.ZodString>;
114
- }, z.core.$strict>, z.ZodObject<{
114
+ }, z.core.$strip>, z.ZodObject<{
115
115
  ok: z.ZodLiteral<false>;
116
116
  error: z.ZodString;
117
- }, z.core.$strict>], "ok">;
117
+ }, z.core.$strip>], "ok">;
118
118
  export type ConnectionTestResult = z.infer<typeof ConnectionTestResult>;
119
119
  export declare const ConnectionTested: z.ZodObject<{
120
120
  connection: z.ZodObject<{
@@ -135,15 +135,15 @@ export declare const ConnectionTested: z.ZodObject<{
135
135
  credentials: z.ZodArray<z.ZodObject<{
136
136
  name: z.ZodString;
137
137
  setAt: z.ZodISODateTime;
138
- }, z.core.$strict>>;
138
+ }, z.core.$strip>>;
139
139
  settings: z.ZodRecord<z.ZodString, z.ZodString>;
140
- }, z.core.$strict>;
140
+ }, z.core.$strip>;
141
141
  test: z.ZodDiscriminatedUnion<[z.ZodObject<{
142
142
  ok: z.ZodLiteral<true>;
143
143
  detail: z.ZodNullable<z.ZodString>;
144
- }, z.core.$strict>, z.ZodObject<{
144
+ }, z.core.$strip>, z.ZodObject<{
145
145
  ok: z.ZodLiteral<false>;
146
146
  error: z.ZodString;
147
- }, z.core.$strict>], "ok">;
148
- }, z.core.$strict>;
147
+ }, z.core.$strip>], "ok">;
148
+ }, z.core.$strip>;
149
149
  export type ConnectionTested = z.infer<typeof ConnectionTested>;
@@ -35,12 +35,12 @@ export const ConnectionUpdateInput = z.strictObject({
35
35
  export const ConnectionTestInput = z.strictObject({ connectionId: ConnectionId });
36
36
  export const ConnectionRevokeInput = z.strictObject({ connectionId: ConnectionId });
37
37
  // A set secret: its field and when it was set, never its value.
38
- export const ConnectionCredential = z.strictObject({
38
+ export const ConnectionCredential = z.object({
39
39
  name: z.string(),
40
40
  setAt: z.iso.datetime(),
41
41
  });
42
42
  // One connector's connection as the list shows it, also for a connector never connected.
43
- export const Connection = z.strictObject({
43
+ export const Connection = z.object({
44
44
  connectorId: ConnectorId,
45
45
  // Null while the connector was never connected.
46
46
  connectionId: ConnectionId.nullable(),
@@ -58,17 +58,17 @@ export const Connection = z.strictObject({
58
58
  credentials: z.array(ConnectionCredential),
59
59
  });
60
60
  export const ConnectionDetail = Connection.extend({ settings: z.record(z.string(), z.string()) });
61
- export const ConnectionList = z.strictObject({
61
+ export const ConnectionList = z.object({
62
62
  items: z.array(Connection),
63
63
  nextCursor: ConnectorId.nullable(),
64
64
  });
65
65
  // The connector's own test against its provider; an error is struck of every secret.
66
66
  export const ConnectionTestResult = z.discriminatedUnion("ok", [
67
- z.strictObject({ ok: z.literal(true), detail: z.string().nullable() }),
68
- z.strictObject({ ok: z.literal(false), error: z.string() }),
67
+ z.object({ ok: z.literal(true), detail: z.string().nullable() }),
68
+ z.object({ ok: z.literal(false), error: z.string() }),
69
69
  ]);
70
70
  // The answer of create, update and test: the connection after the test, and the test.
71
- export const ConnectionTested = z.strictObject({
71
+ export const ConnectionTested = z.object({
72
72
  connection: ConnectionDetail,
73
73
  test: ConnectionTestResult,
74
74
  });
@@ -21,13 +21,13 @@ export declare const ConnectorField: z.ZodObject<{
21
21
  secret: "secret";
22
22
  setting: "setting";
23
23
  }>;
24
- }, z.core.$strict>;
24
+ }, z.core.$strip>;
25
25
  export type ConnectorField = z.infer<typeof ConnectorField>;
26
26
  export declare const ConnectorTool: z.ZodObject<{
27
27
  function: z.ZodString;
28
28
  description: z.ZodString;
29
29
  writes: z.ZodBoolean;
30
- }, z.core.$strict>;
30
+ }, z.core.$strip>;
31
31
  export type ConnectorTool = z.infer<typeof ConnectorTool>;
32
32
  export declare const Connector: z.ZodObject<{
33
33
  connectorId: z.ZodString;
@@ -40,7 +40,7 @@ export declare const Connector: z.ZodObject<{
40
40
  function: z.ZodString;
41
41
  description: z.ZodString;
42
42
  writes: z.ZodBoolean;
43
- }, z.core.$strict>>;
43
+ }, z.core.$strip>>;
44
44
  fields: z.ZodArray<z.ZodObject<{
45
45
  name: z.ZodString;
46
46
  label: z.ZodString;
@@ -51,8 +51,8 @@ export declare const Connector: z.ZodObject<{
51
51
  secret: "secret";
52
52
  setting: "setting";
53
53
  }>;
54
- }, z.core.$strict>>;
55
- }, z.core.$strict>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>;
56
56
  export type Connector = z.infer<typeof Connector>;
57
57
  export declare const ConnectorList: z.ZodObject<{
58
58
  items: z.ZodArray<z.ZodObject<{
@@ -66,7 +66,7 @@ export declare const ConnectorList: z.ZodObject<{
66
66
  function: z.ZodString;
67
67
  description: z.ZodString;
68
68
  writes: z.ZodBoolean;
69
- }, z.core.$strict>>;
69
+ }, z.core.$strip>>;
70
70
  fields: z.ZodArray<z.ZodObject<{
71
71
  name: z.ZodString;
72
72
  label: z.ZodString;
@@ -77,10 +77,10 @@ export declare const ConnectorList: z.ZodObject<{
77
77
  secret: "secret";
78
78
  setting: "setting";
79
79
  }>;
80
- }, z.core.$strict>>;
81
- }, z.core.$strict>>;
80
+ }, z.core.$strip>>;
81
+ }, z.core.$strip>>;
82
82
  nextCursor: z.ZodNullable<z.ZodString>;
83
- }, z.core.$strict>;
83
+ }, z.core.$strip>;
84
84
  export type ConnectorList = z.infer<typeof ConnectorList>;
85
85
  export declare const CallSource: z.ZodEnum<{
86
86
  schedule: "schedule";
@@ -116,8 +116,8 @@ export declare const Call: z.ZodObject<{
116
116
  human: "human";
117
117
  }>>;
118
118
  image: z.ZodNullable<z.ZodString>;
119
- }, z.core.$strict>>;
120
- }, z.core.$strict>;
119
+ }, z.core.$strip>>;
120
+ }, z.core.$strip>;
121
121
  export type Call = z.infer<typeof Call>;
122
122
  export declare const CallList: z.ZodObject<{
123
123
  items: z.ZodArray<z.ZodObject<{
@@ -141,8 +141,8 @@ export declare const CallList: z.ZodObject<{
141
141
  human: "human";
142
142
  }>>;
143
143
  image: z.ZodNullable<z.ZodString>;
144
- }, z.core.$strict>>;
145
- }, z.core.$strict>>;
144
+ }, z.core.$strip>>;
145
+ }, z.core.$strip>>;
146
146
  nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`call_${string}`>>;
147
- }, z.core.$strict>;
147
+ }, z.core.$strip>;
148
148
  export type CallList = z.infer<typeof CallList>;
@@ -16,7 +16,7 @@ export const ConnectorGetInput = z.strictObject({ connectorId: ConnectorId });
16
16
  //
17
17
  // ⚠️ Not `key` and not `secret: true`: `/mcp` strikes every value under a key that looks like a
18
18
  // secret (`redactSecrets` in `shared`), and both names match. `name` and `kind` survive it.
19
- export const ConnectorField = z.strictObject({
19
+ export const ConnectorField = z.object({
20
20
  // The key in `settings` or `secrets`, `SHOPIFY_SHOP`.
21
21
  name: z.string(),
22
22
  label: z.string(),
@@ -25,13 +25,13 @@ export const ConnectorField = z.strictObject({
25
25
  optional: z.boolean(),
26
26
  kind: z.enum(["setting", "secret"]),
27
27
  });
28
- export const ConnectorTool = z.strictObject({
28
+ export const ConnectorTool = z.object({
29
29
  // The key in the connector's `tools`, `order-list`; the right is `connectors / <id> / <function>`.
30
30
  function: z.string(),
31
31
  description: z.string(),
32
32
  writes: z.boolean(),
33
33
  });
34
- export const Connector = z.strictObject({
34
+ export const Connector = z.object({
35
35
  connectorId: ConnectorId,
36
36
  name: z.string(),
37
37
  category: z.string(),
@@ -43,7 +43,7 @@ export const Connector = z.strictObject({
43
43
  tools: z.array(ConnectorTool),
44
44
  fields: z.array(ConnectorField),
45
45
  });
46
- export const ConnectorList = z.strictObject({
46
+ export const ConnectorList = z.object({
47
47
  items: z.array(Connector),
48
48
  nextCursor: ConnectorId.nullable(),
49
49
  });
@@ -58,7 +58,7 @@ export const CallListInput = z.strictObject({
58
58
  });
59
59
  // One line of a connector's log: who, which function, the answer and how long it took, never the
60
60
  // arguments or the result (E69).
61
- export const Call = z.strictObject({
61
+ export const Call = z.object({
62
62
  callId: CallId,
63
63
  connectorId: ConnectorId,
64
64
  // `order-list`, or `test` for the connection test.
@@ -72,7 +72,7 @@ export const Call = z.strictObject({
72
72
  // Null for the daily test, which nobody started. Name, kind and picture come from `access`, null
73
73
  // when it no longer knows the id; the picture is null for a machine and a person without one (#140).
74
74
  actor: z
75
- .strictObject({
75
+ .object({
76
76
  userId: z.string(),
77
77
  name: z.string().nullable(),
78
78
  kind: z.enum(["human", "machine"]).nullable(),
@@ -80,4 +80,4 @@ export const Call = z.strictObject({
80
80
  })
81
81
  .nullable(),
82
82
  });
83
- export const CallList = z.strictObject({ items: z.array(Call), nextCursor: CallId.nullable() });
83
+ export const CallList = z.object({ items: z.array(Call), nextCursor: CallId.nullable() });
@@ -210,12 +210,12 @@ export declare const DashboardDetail: z.ZodObject<{
210
210
  dueAt: z.ZodNullable<z.ZodISODateTime>;
211
211
  processCheck: z.ZodObject<{
212
212
  operator: z.ZodBoolean;
213
- }, z.core.$strict>;
213
+ }, z.core.$strip>;
214
214
  rights: z.ZodObject<{
215
215
  write: z.ZodBoolean;
216
- }, z.core.$strict>;
216
+ }, z.core.$strip>;
217
217
  rev: z.ZodNumber;
218
218
  updatedAt: z.ZodISODateTime;
219
- }, z.core.$strict>;
219
+ }, z.core.$strip>;
220
220
  export type DashboardDetail = z.infer<typeof DashboardDetail>;
221
221
  export {};
@@ -503,7 +503,7 @@ export const DashboardUpdateInput = z.strictObject({
503
503
  config: config.describe("The whole new configuration as an object, replacing the old one. Send exactly one of config and yaml."),
504
504
  yaml: yaml.describe("The whole new configuration as YAML text, replacing the old one; read it from intelligence_dashboard_get, change it, send it back. Send exactly one of config and yaml."),
505
505
  });
506
- export const DashboardDetail = z.strictObject({
506
+ export const DashboardDetail = z.object({
507
507
  dashboardId: DashboardId,
508
508
  name: z.string(),
509
509
  config: DashboardConfig,
@@ -513,8 +513,8 @@ export const DashboardDetail = z.strictObject({
513
513
  // The moment a run is owed for now (passed, unanswered, no run open), else null.
514
514
  dueAt: z.iso.datetime().nullable(),
515
515
  // Whether a machine (an Operator) can write on it: a schedule other than manual needs one (#334).
516
- processCheck: z.strictObject({ operator: z.boolean() }),
517
- rights: z.strictObject({ write: z.boolean() }),
516
+ processCheck: z.object({ operator: z.boolean() }),
517
+ rights: z.object({ write: z.boolean() }),
518
518
  rev: z.number().int(),
519
519
  updatedAt: z.iso.datetime(),
520
520
  });
@@ -8,7 +8,7 @@ export declare const DirectoryPrincipal: z.ZodObject<{
8
8
  name: z.ZodString;
9
9
  email: z.ZodString;
10
10
  image: z.ZodNullable<z.ZodString>;
11
- }, z.core.$strict>;
11
+ }, z.core.$strip>;
12
12
  export type DirectoryPrincipal = z.infer<typeof DirectoryPrincipal>;
13
13
  export declare const DirectorySearchInput: z.ZodObject<{
14
14
  query: z.ZodString;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  // The directory (A24, E49, #26): who exists, for the @ menu and the share dialog. `access` answers it
3
3
  // in-process to the other packages; there is no HTTP door. The shape is here because the UI draws it.
4
- export const DirectoryPrincipal = z.strictObject({
4
+ export const DirectoryPrincipal = z.object({
5
5
  userId: z.string(),
6
6
  kind: z.enum(["human", "machine"]),
7
7
  name: z.string(),
@@ -33,8 +33,8 @@ export declare const DocumentDetail: z.ZodObject<{
33
33
  items: z.ZodArray<z.ZodObject<{
34
34
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
35
35
  name: z.ZodString;
36
- }, z.core.$strict>>;
37
- }, z.core.$strict>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
38
38
  content: z.ZodString;
39
39
  version: z.ZodNullable<z.ZodNumber>;
40
40
  savedAt: z.ZodNullable<z.ZodISODateTime>;
@@ -45,7 +45,7 @@ export declare const DocumentDetail: z.ZodObject<{
45
45
  machine: "machine";
46
46
  human: "human";
47
47
  }>>;
48
- }, z.core.$strict>>;
48
+ }, z.core.$strip>>;
49
49
  appHandle: z.ZodNullable<z.ZodString>;
50
50
  rev: z.ZodNumber;
51
51
  archivedAt: z.ZodNullable<z.ZodISODateTime>;
@@ -54,8 +54,8 @@ export declare const DocumentDetail: z.ZodObject<{
54
54
  path: z.ZodString;
55
55
  status: z.ZodNullable<z.ZodString>;
56
56
  markdown: z.ZodString;
57
- }, z.core.$strict>>;
57
+ }, z.core.$strip>>;
58
58
  hint: z.ZodOptional<z.ZodString>;
59
- }, z.core.$strict>>;
60
- }, z.core.$strict>;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>;
61
61
  export type DocumentDetail = z.infer<typeof DocumentDetail>;
@@ -33,7 +33,7 @@ export const DocumentUpdateInput = z.strictObject({
33
33
  .optional()
34
34
  .describe("The editing session the editor keeps while a person stays on the document: 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."),
35
35
  });
36
- export const DocumentDetail = z.strictObject({
36
+ export const DocumentDetail = z.object({
37
37
  documentId: DocumentId,
38
38
  name: z.string(),
39
39
  hidden: z.boolean(),
@@ -52,7 +52,7 @@ export declare const Event: z.ZodObject<{
52
52
  target: z.ZodNullable<z.ZodObject<{
53
53
  id: z.ZodString;
54
54
  name: z.ZodNullable<z.ZodString>;
55
- }, z.core.$strict>>;
55
+ }, z.core.$strip>>;
56
56
  actor: z.ZodNullable<z.ZodObject<{
57
57
  userId: z.ZodString;
58
58
  name: z.ZodNullable<z.ZodString>;
@@ -62,12 +62,12 @@ export declare const Event: z.ZodObject<{
62
62
  human: "human";
63
63
  }>>;
64
64
  image: z.ZodNullable<z.ZodString>;
65
- }, z.core.$strict>>;
65
+ }, z.core.$strip>>;
66
66
  failed: z.ZodBoolean;
67
67
  code: z.ZodNullable<z.ZodString>;
68
68
  ip: z.ZodNullable<z.ZodString>;
69
69
  detail: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
70
- }, z.core.$strict>;
70
+ }, z.core.$strip>;
71
71
  export type Event = z.infer<typeof Event>;
72
72
  export declare const EventList: z.ZodObject<{
73
73
  items: z.ZodArray<z.ZodObject<{
@@ -83,7 +83,7 @@ export declare const EventList: z.ZodObject<{
83
83
  target: z.ZodNullable<z.ZodObject<{
84
84
  id: z.ZodString;
85
85
  name: z.ZodNullable<z.ZodString>;
86
- }, z.core.$strict>>;
86
+ }, z.core.$strip>>;
87
87
  actor: z.ZodNullable<z.ZodObject<{
88
88
  userId: z.ZodString;
89
89
  name: z.ZodNullable<z.ZodString>;
@@ -93,12 +93,12 @@ export declare const EventList: z.ZodObject<{
93
93
  human: "human";
94
94
  }>>;
95
95
  image: z.ZodNullable<z.ZodString>;
96
- }, z.core.$strict>>;
96
+ }, z.core.$strip>>;
97
97
  failed: z.ZodBoolean;
98
98
  code: z.ZodNullable<z.ZodString>;
99
99
  ip: z.ZodNullable<z.ZodString>;
100
100
  detail: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
101
- }, z.core.$strict>>;
101
+ }, z.core.$strip>>;
102
102
  nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`event_${string}`>>;
103
- }, z.core.$strict>;
103
+ }, z.core.$strip>;
104
104
  export type EventList = z.infer<typeof EventList>;
@@ -37,7 +37,7 @@ export const EventListInput = z.strictObject({
37
37
  cursor: EventId.optional(),
38
38
  limit: Limit.optional(),
39
39
  });
40
- export const Event = z.strictObject({
40
+ export const Event = z.object({
41
41
  eventId: EventId,
42
42
  createdAt: z.iso.datetime(),
43
43
  // `resource.action`: `role.update`, `session.create` (a sign-in).
@@ -45,14 +45,14 @@ export const Event = z.strictObject({
45
45
  kind: EventKind,
46
46
  // The name is the one at the time of the event: after a rename or a removal it is still the name
47
47
  // the event was about.
48
- target: z.strictObject({ id: z.string(), name: z.string().nullable() }).nullable(),
48
+ target: z.object({ id: z.string(), name: z.string().nullable() }).nullable(),
49
49
  // Null for an anonymous attempt (a failed sign-in) and for what Colab does itself (a cleanup).
50
50
  // Name and kind are null when the id no longer names anybody. `image` is the person's picture as
51
51
  // `access.directory.resolve` gives it: null for a machine, a service and a person without one
52
52
  // (#140). ⚠️ `userId` also carries a `service_…` id when `kind` is `service` (#178): the field
53
53
  // keeps its name so the answer's shape stays as the UI reads it.
54
54
  actor: z
55
- .strictObject({
55
+ .object({
56
56
  userId: z.string(),
57
57
  name: z.string().nullable(),
58
58
  kind: ActorKind.nullable(),
@@ -66,4 +66,4 @@ export const Event = z.strictObject({
66
66
  ip: z.string().nullable(),
67
67
  detail: z.record(z.string(), z.unknown()).nullable(),
68
68
  });
69
- export const EventList = z.strictObject({ items: z.array(Event), nextCursor: EventId.nullable() });
69
+ export const EventList = z.object({ items: z.array(Event), nextCursor: EventId.nullable() });
@@ -34,7 +34,7 @@ export declare const UploadTicket: z.ZodObject<{
34
34
  ticket: z.ZodString;
35
35
  expiresAt: z.ZodISODateTime;
36
36
  curl: z.ZodString;
37
- }, z.core.$strict>;
37
+ }, z.core.$strip>;
38
38
  export type UploadTicket = z.infer<typeof UploadTicket>;
39
39
  export declare const FileUpload: z.ZodObject<{
40
40
  upload: z.ZodObject<{
@@ -42,9 +42,17 @@ export declare const FileUpload: z.ZodObject<{
42
42
  ticket: z.ZodString;
43
43
  expiresAt: z.ZodISODateTime;
44
44
  curl: z.ZodString;
45
- }, z.core.$strict>;
46
- }, z.core.$strict>;
45
+ }, z.core.$strip>;
46
+ }, z.core.$strip>;
47
47
  export type FileUpload = z.infer<typeof FileUpload>;
48
+ export declare const fileTextStates: readonly ["reading", "done", "failed", "none"];
49
+ export declare const FileTextState: z.ZodEnum<{
50
+ done: "done";
51
+ failed: "failed";
52
+ reading: "reading";
53
+ none: "none";
54
+ }>;
55
+ export type FileTextState = z.infer<typeof FileTextState>;
48
56
  export declare const FileDetail: z.ZodObject<{
49
57
  fileId: z.ZodTemplateLiteral<`node_${string}`>;
50
58
  name: z.ZodString;
@@ -54,11 +62,17 @@ export declare const FileDetail: z.ZodObject<{
54
62
  version: z.ZodObject<{
55
63
  versionId: z.ZodTemplateLiteral<`version_${string}`>;
56
64
  number: z.ZodNumber;
57
- }, z.core.$strict>;
65
+ }, z.core.$strip>;
58
66
  rev: z.ZodNumber;
59
67
  text: z.ZodNullable<z.ZodString>;
68
+ textState: z.ZodEnum<{
69
+ done: "done";
70
+ failed: "failed";
71
+ reading: "reading";
72
+ none: "none";
73
+ }>;
60
74
  contentUrl: z.ZodURL;
61
75
  sourceUrl: z.ZodOptional<z.ZodString>;
62
76
  fetchedAt: z.ZodOptional<z.ZodISODateTime>;
63
- }, z.core.$strict>;
77
+ }, z.core.$strip>;
64
78
  export type FileDetail = z.infer<typeof FileDetail>;
@@ -146,16 +146,22 @@ export const FileGetInput = z.strictObject({ fileId: FileId });
146
146
  // What `_create` and `_update` answer: the door, the ticket and the whole command. ⚠️ `ticket` is a
147
147
  // credential, and it is in this answer on purpose: it opens ONE upload for ONE person for fifteen
148
148
  // minutes. It appears nowhere else, never in an error and never in a log.
149
- export const UploadTicket = z.strictObject({
149
+ export const UploadTicket = z.object({
150
150
  url: z.url(),
151
151
  ticket: z.string().min(1),
152
152
  expiresAt: z.iso.datetime(),
153
153
  // A shell command that sends the file; the path to the file is the one placeholder left.
154
154
  curl: z.string().min(1),
155
155
  });
156
- export const FileUpload = z.strictObject({ upload: UploadTicket });
156
+ export const FileUpload = z.object({ upload: UploadTicket });
157
+ // Where the text of a file's current version stands (#553): `reading` while the queue `index` reads
158
+ // it, `done` once `text` holds it, `failed` once the last attempt failed (search then finds the file
159
+ // by its name only), `none` for a file without text (an image, a ZIP, or a format the converter
160
+ // does not run for, as locally).
161
+ export const fileTextStates = ["reading", "done", "failed", "none"];
162
+ export const FileTextState = z.enum(fileTextStates);
157
163
  // A file as `_get` and the upload door answer it, always about its current version.
158
- export const FileDetail = z.strictObject({
164
+ export const FileDetail = z.object({
159
165
  fileId: FileId,
160
166
  // The node's name, as the tree shows it.
161
167
  name: z.string(),
@@ -163,12 +169,12 @@ export const FileDetail = z.strictObject({
163
169
  fileName: z.string(),
164
170
  mediaType: z.string(),
165
171
  size: z.number().int(),
166
- version: z.strictObject({ versionId: VersionId, number: z.number().int() }),
172
+ version: z.object({ versionId: VersionId, number: z.number().int() }),
167
173
  // The node's revision, to send with the next `_update`.
168
174
  rev: z.number().int(),
169
- // The text read from the current version for search and AI; null while it is being read, and for
170
- // a file without text (an image, a ZIP).
175
+ // The text read from the current version for search and AI; null unless `textState` is `done`.
171
176
  text: z.string().nullable(),
177
+ textState: FileTextState,
172
178
  // Where the bytes are read, with a session or a token and the right to read the file.
173
179
  contentUrl: z.url(),
174
180
  // Only on a version Colab fetched from an address (#556): the address asked for and when.