robotrock 0.6.0 → 0.8.0

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.
@@ -60,134 +60,43 @@ type UiSchema = {
60
60
  };
61
61
  declare const webhookHandlerSchema: z.ZodObject<{
62
62
  type: z.ZodLiteral<"webhook">;
63
- url: z.ZodEffects<z.ZodString, string, string>;
63
+ url: z.ZodString;
64
64
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
65
- }, "strip", z.ZodTypeAny, {
66
- type: "webhook";
67
- url: string;
68
- headers: Record<string, string>;
69
- }, {
70
- type: "webhook";
71
- url: string;
72
- headers: Record<string, string>;
73
- }>;
65
+ }, z.core.$strip>;
74
66
  declare const triggerHandlerSchema: z.ZodObject<{
75
- url: z.ZodEffects<z.ZodString, string, string>;
67
+ url: z.ZodString;
76
68
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
77
- } & {
78
69
  type: z.ZodLiteral<"trigger">;
79
70
  tokenId: z.ZodString;
80
- }, "strip", z.ZodTypeAny, {
81
- type: "trigger";
82
- url: string;
83
- headers: Record<string, string>;
84
- tokenId: string;
85
- }, {
86
- type: "trigger";
87
- url: string;
88
- headers: Record<string, string>;
89
- tokenId: string;
90
- }>;
91
- declare const handlerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
71
+ }, z.core.$strip>;
72
+ declare const handlerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
92
73
  type: z.ZodLiteral<"webhook">;
93
- url: z.ZodEffects<z.ZodString, string, string>;
74
+ url: z.ZodString;
94
75
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
95
- }, "strip", z.ZodTypeAny, {
96
- type: "webhook";
97
- url: string;
98
- headers: Record<string, string>;
99
- }, {
100
- type: "webhook";
101
- url: string;
102
- headers: Record<string, string>;
103
- }>, z.ZodObject<{
104
- url: z.ZodEffects<z.ZodString, string, string>;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ url: z.ZodString;
105
78
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
106
- } & {
107
79
  type: z.ZodLiteral<"trigger">;
108
80
  tokenId: z.ZodString;
109
- }, "strip", z.ZodTypeAny, {
110
- type: "trigger";
111
- url: string;
112
- headers: Record<string, string>;
113
- tokenId: string;
114
- }, {
115
- type: "trigger";
116
- url: string;
117
- headers: Record<string, string>;
118
- tokenId: string;
119
- }>]>;
81
+ }, z.core.$strip>], "type">;
120
82
  declare const taskActionSchema: z.ZodObject<{
121
83
  id: z.ZodString;
122
84
  title: z.ZodString;
123
85
  description: z.ZodOptional<z.ZodString>;
124
- schema: z.ZodOptional<z.ZodType<ExtendedJSONSchema7, z.ZodTypeDef, ExtendedJSONSchema7>>;
125
- ui: z.ZodOptional<z.ZodType<UiSchema, z.ZodTypeDef, UiSchema>>;
86
+ schema: z.ZodOptional<z.ZodCustom<ExtendedJSONSchema7, ExtendedJSONSchema7>>;
87
+ ui: z.ZodOptional<z.ZodCustom<UiSchema, UiSchema>>;
126
88
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
127
- handlers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
89
+ handlers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
128
90
  type: z.ZodLiteral<"webhook">;
129
- url: z.ZodEffects<z.ZodString, string, string>;
91
+ url: z.ZodString;
130
92
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
131
- }, "strip", z.ZodTypeAny, {
132
- type: "webhook";
133
- url: string;
134
- headers: Record<string, string>;
135
- }, {
136
- type: "webhook";
137
- url: string;
138
- headers: Record<string, string>;
139
- }>, z.ZodObject<{
140
- url: z.ZodEffects<z.ZodString, string, string>;
93
+ }, z.core.$strip>, z.ZodObject<{
94
+ url: z.ZodString;
141
95
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
142
- } & {
143
96
  type: z.ZodLiteral<"trigger">;
144
97
  tokenId: z.ZodString;
145
- }, "strip", z.ZodTypeAny, {
146
- type: "trigger";
147
- url: string;
148
- headers: Record<string, string>;
149
- tokenId: string;
150
- }, {
151
- type: "trigger";
152
- url: string;
153
- headers: Record<string, string>;
154
- tokenId: string;
155
- }>]>, "many">>;
156
- }, "strip", z.ZodTypeAny, {
157
- id: string;
158
- title: string;
159
- description?: string | undefined;
160
- schema?: ExtendedJSONSchema7 | undefined;
161
- ui?: UiSchema | undefined;
162
- data?: Record<string, unknown> | undefined;
163
- handlers?: ({
164
- type: "webhook";
165
- url: string;
166
- headers: Record<string, string>;
167
- } | {
168
- type: "trigger";
169
- url: string;
170
- headers: Record<string, string>;
171
- tokenId: string;
172
- })[] | undefined;
173
- }, {
174
- id: string;
175
- title: string;
176
- description?: string | undefined;
177
- schema?: ExtendedJSONSchema7 | undefined;
178
- ui?: UiSchema | undefined;
179
- data?: Record<string, unknown> | undefined;
180
- handlers?: ({
181
- type: "webhook";
182
- url: string;
183
- headers: Record<string, string>;
184
- } | {
185
- type: "trigger";
186
- url: string;
187
- headers: Record<string, string>;
188
- tokenId: string;
189
- })[] | undefined;
190
- }>;
98
+ }, z.core.$strip>], "type">>>;
99
+ }, z.core.$strip>;
191
100
  declare const taskContextSchema: z.ZodObject<{
192
101
  app: z.ZodOptional<z.ZodString>;
193
102
  type: z.ZodString;
@@ -196,165 +105,36 @@ declare const taskContextSchema: z.ZodObject<{
196
105
  validUntil: z.ZodOptional<z.ZodString>;
197
106
  context: z.ZodOptional<z.ZodObject<{
198
107
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
199
- ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Record<string, unknown>, z.ZodTypeDef, Record<string, unknown>>>>;
200
- }, "strip", z.ZodTypeAny, {
201
- data: Record<string, unknown>;
202
- ui?: Record<string, Record<string, unknown>> | undefined;
203
- }, {
204
- data: Record<string, unknown>;
205
- ui?: Record<string, Record<string, unknown>> | undefined;
206
- }>>;
108
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>>;
109
+ }, z.core.$strip>>;
207
110
  version: z.ZodOptional<z.ZodLiteral<2>>;
208
111
  actions: z.ZodArray<z.ZodObject<{
209
112
  id: z.ZodString;
210
113
  title: z.ZodString;
211
114
  description: z.ZodOptional<z.ZodString>;
212
- schema: z.ZodOptional<z.ZodType<ExtendedJSONSchema7, z.ZodTypeDef, ExtendedJSONSchema7>>;
213
- ui: z.ZodOptional<z.ZodType<UiSchema, z.ZodTypeDef, UiSchema>>;
115
+ schema: z.ZodOptional<z.ZodCustom<ExtendedJSONSchema7, ExtendedJSONSchema7>>;
116
+ ui: z.ZodOptional<z.ZodCustom<UiSchema, UiSchema>>;
214
117
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
215
- handlers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
118
+ handlers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
216
119
  type: z.ZodLiteral<"webhook">;
217
- url: z.ZodEffects<z.ZodString, string, string>;
120
+ url: z.ZodString;
218
121
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
219
- }, "strip", z.ZodTypeAny, {
220
- type: "webhook";
221
- url: string;
222
- headers: Record<string, string>;
223
- }, {
224
- type: "webhook";
225
- url: string;
226
- headers: Record<string, string>;
227
- }>, z.ZodObject<{
228
- url: z.ZodEffects<z.ZodString, string, string>;
122
+ }, z.core.$strip>, z.ZodObject<{
123
+ url: z.ZodString;
229
124
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
230
- } & {
231
125
  type: z.ZodLiteral<"trigger">;
232
126
  tokenId: z.ZodString;
233
- }, "strip", z.ZodTypeAny, {
234
- type: "trigger";
235
- url: string;
236
- headers: Record<string, string>;
237
- tokenId: string;
238
- }, {
239
- type: "trigger";
240
- url: string;
241
- headers: Record<string, string>;
242
- tokenId: string;
243
- }>]>, "many">>;
244
- }, "strip", z.ZodTypeAny, {
245
- id: string;
246
- title: string;
247
- description?: string | undefined;
248
- schema?: ExtendedJSONSchema7 | undefined;
249
- ui?: UiSchema | undefined;
250
- data?: Record<string, unknown> | undefined;
251
- handlers?: ({
252
- type: "webhook";
253
- url: string;
254
- headers: Record<string, string>;
255
- } | {
256
- type: "trigger";
257
- url: string;
258
- headers: Record<string, string>;
259
- tokenId: string;
260
- })[] | undefined;
261
- }, {
262
- id: string;
263
- title: string;
264
- description?: string | undefined;
265
- schema?: ExtendedJSONSchema7 | undefined;
266
- ui?: UiSchema | undefined;
267
- data?: Record<string, unknown> | undefined;
268
- handlers?: ({
269
- type: "webhook";
270
- url: string;
271
- headers: Record<string, string>;
272
- } | {
273
- type: "trigger";
274
- url: string;
275
- headers: Record<string, string>;
276
- tokenId: string;
277
- })[] | undefined;
278
- }>, "many">;
279
- }, "strip", z.ZodTypeAny, {
280
- type: string;
281
- name: string;
282
- actions: {
283
- id: string;
284
- title: string;
285
- description?: string | undefined;
286
- schema?: ExtendedJSONSchema7 | undefined;
287
- ui?: UiSchema | undefined;
288
- data?: Record<string, unknown> | undefined;
289
- handlers?: ({
290
- type: "webhook";
291
- url: string;
292
- headers: Record<string, string>;
293
- } | {
294
- type: "trigger";
295
- url: string;
296
- headers: Record<string, string>;
297
- tokenId: string;
298
- })[] | undefined;
299
- }[];
300
- description?: string | undefined;
301
- app?: string | undefined;
302
- validUntil?: string | undefined;
303
- context?: {
304
- data: Record<string, unknown>;
305
- ui?: Record<string, Record<string, unknown>> | undefined;
306
- } | undefined;
307
- version?: 2 | undefined;
308
- }, {
309
- type: string;
310
- name: string;
311
- actions: {
312
- id: string;
313
- title: string;
314
- description?: string | undefined;
315
- schema?: ExtendedJSONSchema7 | undefined;
316
- ui?: UiSchema | undefined;
317
- data?: Record<string, unknown> | undefined;
318
- handlers?: ({
319
- type: "webhook";
320
- url: string;
321
- headers: Record<string, string>;
322
- } | {
323
- type: "trigger";
324
- url: string;
325
- headers: Record<string, string>;
326
- tokenId: string;
327
- })[] | undefined;
328
- }[];
329
- description?: string | undefined;
330
- app?: string | undefined;
331
- validUntil?: string | undefined;
332
- context?: {
333
- data: Record<string, unknown>;
334
- ui?: Record<string, Record<string, unknown>> | undefined;
335
- } | undefined;
336
- version?: 2 | undefined;
337
- }>;
127
+ }, z.core.$strip>], "type">>>;
128
+ }, z.core.$strip>>;
129
+ }, z.core.$strip>;
338
130
  /**
339
131
  * Assignment targets at task create (not stored in task context JSON).
340
- * Unknown user emails are auto-provisioned as assignee memberships (not full team seats).
132
+ * Unknown user emails are auto-provisioned as assignee memberships (count toward seat limits).
341
133
  */
342
- declare const assignToSchema: z.ZodEffects<z.ZodObject<{
343
- users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
344
- groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
345
- }, "strip", z.ZodTypeAny, {
346
- users?: string[] | undefined;
347
- groups?: string[] | undefined;
348
- }, {
349
- users?: string[] | undefined;
350
- groups?: string[] | undefined;
351
- }>, {
352
- users?: string[] | undefined;
353
- groups?: string[] | undefined;
354
- }, {
355
- users?: string[] | undefined;
356
- groups?: string[] | undefined;
357
- }>;
134
+ declare const assignToSchema: z.ZodObject<{
135
+ users: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
137
+ }, z.core.$strip>;
358
138
  /** A short thread-scoped status update message (1-2 sentences). */
359
139
  declare const threadUpdateMessageSchema: z.ZodString;
360
140
  /**
@@ -362,27 +142,70 @@ declare const threadUpdateMessageSchema: z.ZodString;
362
142
  * in the inbox status bar. Defaults to `info` when omitted.
363
143
  */
364
144
  declare const threadUpdateStatuses: readonly ["info", "queued", "running", "waiting", "succeeded", "failed", "cancelled"];
365
- declare const threadUpdateStatusSchema: z.ZodEnum<["info", "queued", "running", "waiting", "succeeded", "failed", "cancelled"]>;
145
+ declare const threadUpdateStatusSchema: z.ZodEnum<{
146
+ info: "info";
147
+ queued: "queued";
148
+ running: "running";
149
+ waiting: "waiting";
150
+ succeeded: "succeeded";
151
+ failed: "failed";
152
+ cancelled: "cancelled";
153
+ }>;
366
154
  /** The default status applied when an update omits one. */
367
155
  declare const DEFAULT_THREAD_UPDATE_STATUS: ThreadUpdateStatus;
368
156
  /** Shared shape for a thread update (standalone and at task creation). */
369
157
  declare const threadUpdateInputSchema: z.ZodObject<{
370
158
  message: z.ZodString;
371
- status: z.ZodOptional<z.ZodEnum<["info", "queued", "running", "waiting", "succeeded", "failed", "cancelled"]>>;
372
- }, "strip", z.ZodTypeAny, {
373
- message: string;
374
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
375
- }, {
376
- message: string;
377
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
378
- }>;
159
+ status: z.ZodOptional<z.ZodEnum<{
160
+ info: "info";
161
+ queued: "queued";
162
+ running: "running";
163
+ waiting: "waiting";
164
+ succeeded: "succeeded";
165
+ failed: "failed";
166
+ cancelled: "cancelled";
167
+ }>>;
168
+ }, z.core.$strip>;
379
169
  /** Thread priority levels for inbox ordering and display. */
380
170
  declare const taskPriorities: readonly ["low", "normal", "high", "urgent"];
381
- declare const taskPrioritySchema: z.ZodEnum<["low", "normal", "high", "urgent"]>;
171
+ declare const taskPrioritySchema: z.ZodEnum<{
172
+ low: "low";
173
+ normal: "normal";
174
+ high: "high";
175
+ urgent: "urgent";
176
+ }>;
382
177
  type TaskPriority = (typeof taskPriorities)[number];
383
178
  declare const DEFAULT_TASK_PRIORITY: TaskPriority;
384
179
  declare const LOWEST_TASK_PRIORITY: TaskPriority;
385
180
  declare const TASK_PRIORITY_RANK: Record<TaskPriority, number>;
181
+ declare const agentCostTokensSchema: z.ZodObject<{
182
+ input: z.ZodOptional<z.ZodNumber>;
183
+ output: z.ZodOptional<z.ZodNumber>;
184
+ total: z.ZodOptional<z.ZodNumber>;
185
+ }, z.core.$strip>;
186
+ declare const agentCostSchema: z.ZodObject<{
187
+ tokens: z.ZodOptional<z.ZodObject<{
188
+ input: z.ZodOptional<z.ZodNumber>;
189
+ output: z.ZodOptional<z.ZodNumber>;
190
+ total: z.ZodOptional<z.ZodNumber>;
191
+ }, z.core.$strip>>;
192
+ eur: z.ZodOptional<z.ZodNumber>;
193
+ usd: z.ZodOptional<z.ZodNumber>;
194
+ }, z.core.$strip>;
195
+ declare const agentTelemetrySchema: z.ZodObject<{
196
+ version: z.ZodOptional<z.ZodString>;
197
+ toolCallCount: z.ZodOptional<z.ZodNumber>;
198
+ cost: z.ZodOptional<z.ZodObject<{
199
+ tokens: z.ZodOptional<z.ZodObject<{
200
+ input: z.ZodOptional<z.ZodNumber>;
201
+ output: z.ZodOptional<z.ZodNumber>;
202
+ total: z.ZodOptional<z.ZodNumber>;
203
+ }, z.core.$strip>>;
204
+ eur: z.ZodOptional<z.ZodNumber>;
205
+ usd: z.ZodOptional<z.ZodNumber>;
206
+ }, z.core.$strip>>;
207
+ info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
208
+ }, z.core.$strip>;
386
209
  declare const createTaskBodySchema: z.ZodObject<{
387
210
  app: z.ZodOptional<z.ZodString>;
388
211
  type: z.ZodString;
@@ -391,217 +214,78 @@ declare const createTaskBodySchema: z.ZodObject<{
391
214
  validUntil: z.ZodOptional<z.ZodString>;
392
215
  context: z.ZodOptional<z.ZodObject<{
393
216
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
394
- ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Record<string, unknown>, z.ZodTypeDef, Record<string, unknown>>>>;
395
- }, "strip", z.ZodTypeAny, {
396
- data: Record<string, unknown>;
397
- ui?: Record<string, Record<string, unknown>> | undefined;
398
- }, {
399
- data: Record<string, unknown>;
400
- ui?: Record<string, Record<string, unknown>> | undefined;
401
- }>>;
217
+ ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<Record<string, unknown>, unknown, z.core.$ZodTypeInternals<Record<string, unknown>, unknown>>>>;
218
+ }, z.core.$strip>>;
402
219
  version: z.ZodOptional<z.ZodLiteral<2>>;
403
220
  actions: z.ZodArray<z.ZodObject<{
404
221
  id: z.ZodString;
405
222
  title: z.ZodString;
406
223
  description: z.ZodOptional<z.ZodString>;
407
- schema: z.ZodOptional<z.ZodType<ExtendedJSONSchema7, z.ZodTypeDef, ExtendedJSONSchema7>>;
408
- ui: z.ZodOptional<z.ZodType<UiSchema, z.ZodTypeDef, UiSchema>>;
224
+ schema: z.ZodOptional<z.ZodCustom<ExtendedJSONSchema7, ExtendedJSONSchema7>>;
225
+ ui: z.ZodOptional<z.ZodCustom<UiSchema, UiSchema>>;
409
226
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
410
- handlers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
227
+ handlers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
411
228
  type: z.ZodLiteral<"webhook">;
412
- url: z.ZodEffects<z.ZodString, string, string>;
229
+ url: z.ZodString;
413
230
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
414
- }, "strip", z.ZodTypeAny, {
415
- type: "webhook";
416
- url: string;
417
- headers: Record<string, string>;
418
- }, {
419
- type: "webhook";
420
- url: string;
421
- headers: Record<string, string>;
422
- }>, z.ZodObject<{
423
- url: z.ZodEffects<z.ZodString, string, string>;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ url: z.ZodString;
424
233
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
425
- } & {
426
234
  type: z.ZodLiteral<"trigger">;
427
235
  tokenId: z.ZodString;
428
- }, "strip", z.ZodTypeAny, {
429
- type: "trigger";
430
- url: string;
431
- headers: Record<string, string>;
432
- tokenId: string;
433
- }, {
434
- type: "trigger";
435
- url: string;
436
- headers: Record<string, string>;
437
- tokenId: string;
438
- }>]>, "many">>;
439
- }, "strip", z.ZodTypeAny, {
440
- id: string;
441
- title: string;
442
- description?: string | undefined;
443
- schema?: ExtendedJSONSchema7 | undefined;
444
- ui?: UiSchema | undefined;
445
- data?: Record<string, unknown> | undefined;
446
- handlers?: ({
447
- type: "webhook";
448
- url: string;
449
- headers: Record<string, string>;
450
- } | {
451
- type: "trigger";
452
- url: string;
453
- headers: Record<string, string>;
454
- tokenId: string;
455
- })[] | undefined;
456
- }, {
457
- id: string;
458
- title: string;
459
- description?: string | undefined;
460
- schema?: ExtendedJSONSchema7 | undefined;
461
- ui?: UiSchema | undefined;
462
- data?: Record<string, unknown> | undefined;
463
- handlers?: ({
464
- type: "webhook";
465
- url: string;
466
- headers: Record<string, string>;
467
- } | {
468
- type: "trigger";
469
- url: string;
470
- headers: Record<string, string>;
471
- tokenId: string;
472
- })[] | undefined;
473
- }>, "many">;
474
- } & {
475
- assignTo: z.ZodOptional<z.ZodEffects<z.ZodObject<{
476
- users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
477
- groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
478
- }, "strip", z.ZodTypeAny, {
479
- users?: string[] | undefined;
480
- groups?: string[] | undefined;
481
- }, {
482
- users?: string[] | undefined;
483
- groups?: string[] | undefined;
484
- }>, {
485
- users?: string[] | undefined;
486
- groups?: string[] | undefined;
487
- }, {
488
- users?: string[] | undefined;
489
- groups?: string[] | undefined;
490
- }>>;
491
- /**
492
- * Groups related tasks together. When omitted, the server generates one and
493
- * returns it so the caller can reuse it on later tasks in the same thread.
494
- */
236
+ }, z.core.$strip>], "type">>>;
237
+ }, z.core.$strip>>;
238
+ assignTo: z.ZodOptional<z.ZodObject<{
239
+ users: z.ZodOptional<z.ZodArray<z.ZodString>>;
240
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
241
+ }, z.core.$strip>>;
495
242
  threadId: z.ZodOptional<z.ZodString>;
496
- /**
497
- * Optional thread priority. When set, applies to the whole thread and
498
- * overwrites any previous priority. Omit on later tasks to leave unchanged.
499
- */
500
- priority: z.ZodOptional<z.ZodEnum<["low", "normal", "high", "urgent"]>>;
501
- /**
502
- * Optional initial status update logged against the task's thread. Shows in
503
- * the inbox status bar and the thread update log.
504
- */
243
+ priority: z.ZodOptional<z.ZodEnum<{
244
+ low: "low";
245
+ normal: "normal";
246
+ high: "high";
247
+ urgent: "urgent";
248
+ }>>;
505
249
  update: z.ZodOptional<z.ZodObject<{
506
250
  message: z.ZodString;
507
- status: z.ZodOptional<z.ZodEnum<["info", "queued", "running", "waiting", "succeeded", "failed", "cancelled"]>>;
508
- }, "strip", z.ZodTypeAny, {
509
- message: string;
510
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
511
- }, {
512
- message: string;
513
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
514
- }>>;
515
- }, "strip", z.ZodTypeAny, {
516
- type: string;
517
- name: string;
518
- actions: {
519
- id: string;
520
- title: string;
521
- description?: string | undefined;
522
- schema?: ExtendedJSONSchema7 | undefined;
523
- ui?: UiSchema | undefined;
524
- data?: Record<string, unknown> | undefined;
525
- handlers?: ({
526
- type: "webhook";
527
- url: string;
528
- headers: Record<string, string>;
529
- } | {
530
- type: "trigger";
531
- url: string;
532
- headers: Record<string, string>;
533
- tokenId: string;
534
- })[] | undefined;
535
- }[];
536
- description?: string | undefined;
537
- app?: string | undefined;
538
- validUntil?: string | undefined;
539
- context?: {
540
- data: Record<string, unknown>;
541
- ui?: Record<string, Record<string, unknown>> | undefined;
542
- } | undefined;
543
- version?: 2 | undefined;
544
- assignTo?: {
545
- users?: string[] | undefined;
546
- groups?: string[] | undefined;
547
- } | undefined;
548
- threadId?: string | undefined;
549
- priority?: "low" | "normal" | "high" | "urgent" | undefined;
550
- update?: {
551
- message: string;
552
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
553
- } | undefined;
554
- }, {
555
- type: string;
556
- name: string;
557
- actions: {
558
- id: string;
559
- title: string;
560
- description?: string | undefined;
561
- schema?: ExtendedJSONSchema7 | undefined;
562
- ui?: UiSchema | undefined;
563
- data?: Record<string, unknown> | undefined;
564
- handlers?: ({
565
- type: "webhook";
566
- url: string;
567
- headers: Record<string, string>;
568
- } | {
569
- type: "trigger";
570
- url: string;
571
- headers: Record<string, string>;
572
- tokenId: string;
573
- })[] | undefined;
574
- }[];
575
- description?: string | undefined;
576
- app?: string | undefined;
577
- validUntil?: string | undefined;
578
- context?: {
579
- data: Record<string, unknown>;
580
- ui?: Record<string, Record<string, unknown>> | undefined;
581
- } | undefined;
582
- version?: 2 | undefined;
583
- assignTo?: {
584
- users?: string[] | undefined;
585
- groups?: string[] | undefined;
586
- } | undefined;
587
- threadId?: string | undefined;
588
- priority?: "low" | "normal" | "high" | "urgent" | undefined;
589
- update?: {
590
- message: string;
591
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
592
- } | undefined;
593
- }>;
251
+ status: z.ZodOptional<z.ZodEnum<{
252
+ info: "info";
253
+ queued: "queued";
254
+ running: "running";
255
+ waiting: "waiting";
256
+ succeeded: "succeeded";
257
+ failed: "failed";
258
+ cancelled: "cancelled";
259
+ }>>;
260
+ }, z.core.$strip>>;
261
+ agent: z.ZodOptional<z.ZodObject<{
262
+ version: z.ZodOptional<z.ZodString>;
263
+ toolCallCount: z.ZodOptional<z.ZodNumber>;
264
+ cost: z.ZodOptional<z.ZodObject<{
265
+ tokens: z.ZodOptional<z.ZodObject<{
266
+ input: z.ZodOptional<z.ZodNumber>;
267
+ output: z.ZodOptional<z.ZodNumber>;
268
+ total: z.ZodOptional<z.ZodNumber>;
269
+ }, z.core.$strip>>;
270
+ eur: z.ZodOptional<z.ZodNumber>;
271
+ usd: z.ZodOptional<z.ZodNumber>;
272
+ }, z.core.$strip>>;
273
+ info: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
274
+ }, z.core.$strip>>;
275
+ }, z.core.$strip>;
594
276
  /** POST /v1/threads/:threadId/updates body: a standalone thread update. */
595
277
  declare const threadUpdateBodySchema: z.ZodObject<{
596
278
  message: z.ZodString;
597
- status: z.ZodOptional<z.ZodEnum<["info", "queued", "running", "waiting", "succeeded", "failed", "cancelled"]>>;
598
- }, "strip", z.ZodTypeAny, {
599
- message: string;
600
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
601
- }, {
602
- message: string;
603
- status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
604
- }>;
279
+ status: z.ZodOptional<z.ZodEnum<{
280
+ info: "info";
281
+ queued: "queued";
282
+ running: "running";
283
+ waiting: "waiting";
284
+ succeeded: "succeeded";
285
+ failed: "failed";
286
+ cancelled: "cancelled";
287
+ }>>;
288
+ }, z.core.$strip>;
605
289
  /** Where a thread update originated. */
606
290
  type ThreadUpdateSource = "api" | "task_create" | "dashboard";
607
291
  /** Lifecycle status carried by a thread update. */
@@ -628,6 +312,10 @@ type TaskAction = z.infer<typeof taskActionSchema>;
628
312
  type WebhookHandler = z.infer<typeof webhookHandlerSchema>;
629
313
  type TriggerHandler = z.infer<typeof triggerHandlerSchema>;
630
314
  type Handler = z.infer<typeof handlerSchema>;
315
+ type AgentCostTokens = z.infer<typeof agentCostTokensSchema>;
316
+ type AgentCost = z.infer<typeof agentCostSchema>;
317
+ type AgentTelemetry = z.infer<typeof agentTelemetrySchema>;
318
+ type AgentTelemetryInput = z.input<typeof agentTelemetrySchema>;
631
319
  type InferObjectProperties<Props, Req extends PropertyKey> = Props extends Record<string, unknown> ? ({
632
320
  [K in keyof Props as K extends Req ? K : never]-?: InferJsonSchema7<Props[K]>;
633
321
  } & {
@@ -729,4 +417,4 @@ type DiscriminatedApprovalResult<TActions extends readonly {
729
417
  } : never;
730
418
  }[TupleElementIndices<TActions>];
731
419
 
732
- export { type ApprovalResult, type AssignToInput, type CreateTaskBody, type CreateTaskBodyInput, DEFAULT_TASK_PRIORITY, DEFAULT_THREAD_UPDATE_STATUS, type DiscriminatedApprovalResult, type ExtendedJSONSchema7, type Handler, type InferActionData, type InferJsonSchema7, type JSONSchema7, type JSONSchema7TypeName, LOWEST_TASK_PRIORITY, TASK_PRIORITY_RANK, type Task, type TaskAction, type TaskContext, type TaskContextInput, type TaskContextOutput, type TaskPriority, type TaskResponse, type TaskResult, type TaskStatus, type ThreadUpdate, type ThreadUpdateBody, type ThreadUpdateBodyInput, type ThreadUpdateInput, type ThreadUpdateResponse, type ThreadUpdateSource, type ThreadUpdateStatus, type TriggerHandler, type TupleElementIndices, type UiSchema, type WebhookHandler, assignToSchema, createTaskBodySchema, taskContextSchema, taskPriorities, taskPrioritySchema, threadUpdateBodySchema, threadUpdateInputSchema, threadUpdateMessageSchema, threadUpdateStatusSchema, threadUpdateStatuses };
420
+ export { type AgentCost, type AgentCostTokens, type AgentTelemetry, type AgentTelemetryInput, type ApprovalResult, type AssignToInput, type CreateTaskBody, type CreateTaskBodyInput, DEFAULT_TASK_PRIORITY, DEFAULT_THREAD_UPDATE_STATUS, type DiscriminatedApprovalResult, type ExtendedJSONSchema7, type Handler, type InferActionData, type InferJsonSchema7, type JSONSchema7, type JSONSchema7TypeName, LOWEST_TASK_PRIORITY, TASK_PRIORITY_RANK, type Task, type TaskAction, type TaskContext, type TaskContextInput, type TaskContextOutput, type TaskPriority, type TaskResponse, type TaskResult, type TaskStatus, type ThreadUpdate, type ThreadUpdateBody, type ThreadUpdateBodyInput, type ThreadUpdateInput, type ThreadUpdateResponse, type ThreadUpdateSource, type ThreadUpdateStatus, type TriggerHandler, type TupleElementIndices, type UiSchema, type WebhookHandler, agentCostSchema, agentCostTokensSchema, agentTelemetrySchema, assignToSchema, createTaskBodySchema, taskContextSchema, taskPriorities, taskPrioritySchema, threadUpdateBodySchema, threadUpdateInputSchema, threadUpdateMessageSchema, threadUpdateStatusSchema, threadUpdateStatuses };