robotrock 0.5.0 → 0.7.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.
- package/dist/ai/index.d.ts +3 -3
- package/dist/ai/{index.mjs → index.js} +4 -4
- package/dist/ai/trigger.d.ts +2 -2
- package/dist/ai/{trigger.mjs → trigger.js} +4 -4
- package/dist/ai/workflow.d.ts +2 -2
- package/dist/ai/{workflow.mjs → workflow.js} +4 -4
- package/dist/{chunk-CWQTNK24.mjs → chunk-55JHCNYX.js} +27 -25
- package/dist/chunk-55JHCNYX.js.map +1 -0
- package/dist/{chunk-3ZYQE5LF.mjs → chunk-D2FBSEZK.js} +1 -1
- package/dist/{chunk-E7ZWBFZ6.mjs → chunk-ZG2XVK6Y.js} +4 -2
- package/dist/chunk-ZG2XVK6Y.js.map +1 -0
- package/dist/chunk-ZHASQUX6.js +195 -0
- package/dist/chunk-ZHASQUX6.js.map +1 -0
- package/dist/{client-BOm2Ce2f.d.ts → client-CLcHdjOz.d.ts} +6 -1
- package/dist/index.d.ts +3 -3
- package/dist/{index.mjs → index.js} +24 -14
- package/dist/{index.mjs.map → index.js.map} +1 -1
- package/dist/schemas/index.d.ts +161 -11
- package/dist/schemas/{index.mjs → index.js} +12 -2
- package/dist/trigger/index.d.ts +1 -1
- package/dist/trigger/{index.mjs → index.js} +4 -4
- package/dist/workflow/index.d.ts +1 -1
- package/dist/workflow/{index.mjs → index.js} +4 -4
- package/dist/{workflow-CUkzjf6m.d.ts → workflow-F_06QpHc.d.ts} +15 -59
- package/package.json +3 -2
- package/dist/chunk-CWQTNK24.mjs.map +0 -1
- package/dist/chunk-E7ZWBFZ6.mjs.map +0 -1
- package/dist/chunk-VNXWLPRV.mjs +0 -4203
- package/dist/chunk-VNXWLPRV.mjs.map +0 -1
- /package/dist/ai/{index.mjs.map → index.js.map} +0 -0
- /package/dist/ai/{trigger.mjs.map → trigger.js.map} +0 -0
- /package/dist/ai/{workflow.mjs.map → workflow.js.map} +0 -0
- /package/dist/{chunk-3ZYQE5LF.mjs.map → chunk-D2FBSEZK.js.map} +0 -0
- /package/dist/schemas/{index.mjs.map → index.js.map} +0 -0
- /package/dist/trigger/{index.mjs.map → index.js.map} +0 -0
- /package/dist/workflow/{index.mjs.map → index.js.map} +0 -0
package/dist/schemas/index.d.ts
CHANGED
|
@@ -156,10 +156,10 @@ declare const taskActionSchema: z.ZodObject<{
|
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
id: string;
|
|
158
158
|
title: string;
|
|
159
|
+
data?: Record<string, unknown> | undefined;
|
|
159
160
|
description?: string | undefined;
|
|
160
161
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
161
162
|
ui?: UiSchema | undefined;
|
|
162
|
-
data?: Record<string, unknown> | undefined;
|
|
163
163
|
handlers?: ({
|
|
164
164
|
type: "webhook";
|
|
165
165
|
url: string;
|
|
@@ -173,10 +173,10 @@ declare const taskActionSchema: z.ZodObject<{
|
|
|
173
173
|
}, {
|
|
174
174
|
id: string;
|
|
175
175
|
title: string;
|
|
176
|
+
data?: Record<string, unknown> | undefined;
|
|
176
177
|
description?: string | undefined;
|
|
177
178
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
178
179
|
ui?: UiSchema | undefined;
|
|
179
|
-
data?: Record<string, unknown> | undefined;
|
|
180
180
|
handlers?: ({
|
|
181
181
|
type: "webhook";
|
|
182
182
|
url: string;
|
|
@@ -188,7 +188,7 @@ declare const taskActionSchema: z.ZodObject<{
|
|
|
188
188
|
tokenId: string;
|
|
189
189
|
})[] | undefined;
|
|
190
190
|
}>;
|
|
191
|
-
declare const taskContextSchema: z.ZodObject<{
|
|
191
|
+
declare const taskContextSchema: z.ZodEffects<z.ZodObject<{
|
|
192
192
|
app: z.ZodOptional<z.ZodString>;
|
|
193
193
|
type: z.ZodString;
|
|
194
194
|
name: z.ZodString;
|
|
@@ -244,10 +244,10 @@ declare const taskContextSchema: z.ZodObject<{
|
|
|
244
244
|
}, "strip", z.ZodTypeAny, {
|
|
245
245
|
id: string;
|
|
246
246
|
title: string;
|
|
247
|
+
data?: Record<string, unknown> | undefined;
|
|
247
248
|
description?: string | undefined;
|
|
248
249
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
249
250
|
ui?: UiSchema | undefined;
|
|
250
|
-
data?: Record<string, unknown> | undefined;
|
|
251
251
|
handlers?: ({
|
|
252
252
|
type: "webhook";
|
|
253
253
|
url: string;
|
|
@@ -261,10 +261,10 @@ declare const taskContextSchema: z.ZodObject<{
|
|
|
261
261
|
}, {
|
|
262
262
|
id: string;
|
|
263
263
|
title: string;
|
|
264
|
+
data?: Record<string, unknown> | undefined;
|
|
264
265
|
description?: string | undefined;
|
|
265
266
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
266
267
|
ui?: UiSchema | undefined;
|
|
267
|
-
data?: Record<string, unknown> | undefined;
|
|
268
268
|
handlers?: ({
|
|
269
269
|
type: "webhook";
|
|
270
270
|
url: string;
|
|
@@ -282,10 +282,10 @@ declare const taskContextSchema: z.ZodObject<{
|
|
|
282
282
|
actions: {
|
|
283
283
|
id: string;
|
|
284
284
|
title: string;
|
|
285
|
+
data?: Record<string, unknown> | undefined;
|
|
285
286
|
description?: string | undefined;
|
|
286
287
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
287
288
|
ui?: UiSchema | undefined;
|
|
288
|
-
data?: Record<string, unknown> | undefined;
|
|
289
289
|
handlers?: ({
|
|
290
290
|
type: "webhook";
|
|
291
291
|
url: string;
|
|
@@ -311,10 +311,68 @@ declare const taskContextSchema: z.ZodObject<{
|
|
|
311
311
|
actions: {
|
|
312
312
|
id: string;
|
|
313
313
|
title: string;
|
|
314
|
+
data?: Record<string, unknown> | undefined;
|
|
315
|
+
description?: string | undefined;
|
|
316
|
+
schema?: ExtendedJSONSchema7 | undefined;
|
|
317
|
+
ui?: UiSchema | 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
|
+
}>, {
|
|
338
|
+
type: string;
|
|
339
|
+
name: string;
|
|
340
|
+
actions: {
|
|
341
|
+
id: string;
|
|
342
|
+
title: string;
|
|
343
|
+
data?: Record<string, unknown> | undefined;
|
|
314
344
|
description?: string | undefined;
|
|
315
345
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
316
346
|
ui?: UiSchema | undefined;
|
|
347
|
+
handlers?: ({
|
|
348
|
+
type: "webhook";
|
|
349
|
+
url: string;
|
|
350
|
+
headers: Record<string, string>;
|
|
351
|
+
} | {
|
|
352
|
+
type: "trigger";
|
|
353
|
+
url: string;
|
|
354
|
+
headers: Record<string, string>;
|
|
355
|
+
tokenId: string;
|
|
356
|
+
})[] | undefined;
|
|
357
|
+
}[];
|
|
358
|
+
description?: string | undefined;
|
|
359
|
+
app?: string | undefined;
|
|
360
|
+
validUntil?: string | undefined;
|
|
361
|
+
context?: {
|
|
362
|
+
data: Record<string, unknown>;
|
|
363
|
+
ui?: Record<string, Record<string, unknown>> | undefined;
|
|
364
|
+
} | undefined;
|
|
365
|
+
version?: 2 | undefined;
|
|
366
|
+
}, {
|
|
367
|
+
type: string;
|
|
368
|
+
name: string;
|
|
369
|
+
actions: {
|
|
370
|
+
id: string;
|
|
371
|
+
title: string;
|
|
317
372
|
data?: Record<string, unknown> | undefined;
|
|
373
|
+
description?: string | undefined;
|
|
374
|
+
schema?: ExtendedJSONSchema7 | undefined;
|
|
375
|
+
ui?: UiSchema | undefined;
|
|
318
376
|
handlers?: ({
|
|
319
377
|
type: "webhook";
|
|
320
378
|
url: string;
|
|
@@ -376,7 +434,14 @@ declare const threadUpdateInputSchema: z.ZodObject<{
|
|
|
376
434
|
message: string;
|
|
377
435
|
status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
378
436
|
}>;
|
|
379
|
-
|
|
437
|
+
/** Thread priority levels for inbox ordering and display. */
|
|
438
|
+
declare const taskPriorities: readonly ["low", "normal", "high", "urgent"];
|
|
439
|
+
declare const taskPrioritySchema: z.ZodEnum<["low", "normal", "high", "urgent"]>;
|
|
440
|
+
type TaskPriority = (typeof taskPriorities)[number];
|
|
441
|
+
declare const DEFAULT_TASK_PRIORITY: TaskPriority;
|
|
442
|
+
declare const LOWEST_TASK_PRIORITY: TaskPriority;
|
|
443
|
+
declare const TASK_PRIORITY_RANK: Record<TaskPriority, number>;
|
|
444
|
+
declare const createTaskBodySchema: z.ZodEffects<z.ZodObject<{
|
|
380
445
|
app: z.ZodOptional<z.ZodString>;
|
|
381
446
|
type: z.ZodString;
|
|
382
447
|
name: z.ZodString;
|
|
@@ -432,10 +497,10 @@ declare const createTaskBodySchema: z.ZodObject<{
|
|
|
432
497
|
}, "strip", z.ZodTypeAny, {
|
|
433
498
|
id: string;
|
|
434
499
|
title: string;
|
|
500
|
+
data?: Record<string, unknown> | undefined;
|
|
435
501
|
description?: string | undefined;
|
|
436
502
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
437
503
|
ui?: UiSchema | undefined;
|
|
438
|
-
data?: Record<string, unknown> | undefined;
|
|
439
504
|
handlers?: ({
|
|
440
505
|
type: "webhook";
|
|
441
506
|
url: string;
|
|
@@ -449,10 +514,10 @@ declare const createTaskBodySchema: z.ZodObject<{
|
|
|
449
514
|
}, {
|
|
450
515
|
id: string;
|
|
451
516
|
title: string;
|
|
517
|
+
data?: Record<string, unknown> | undefined;
|
|
452
518
|
description?: string | undefined;
|
|
453
519
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
454
520
|
ui?: UiSchema | undefined;
|
|
455
|
-
data?: Record<string, unknown> | undefined;
|
|
456
521
|
handlers?: ({
|
|
457
522
|
type: "webhook";
|
|
458
523
|
url: string;
|
|
@@ -486,6 +551,11 @@ declare const createTaskBodySchema: z.ZodObject<{
|
|
|
486
551
|
* returns it so the caller can reuse it on later tasks in the same thread.
|
|
487
552
|
*/
|
|
488
553
|
threadId: z.ZodOptional<z.ZodString>;
|
|
554
|
+
/**
|
|
555
|
+
* Optional thread priority. When set, applies to the whole thread and
|
|
556
|
+
* overwrites any previous priority. Omit on later tasks to leave unchanged.
|
|
557
|
+
*/
|
|
558
|
+
priority: z.ZodOptional<z.ZodEnum<["low", "normal", "high", "urgent"]>>;
|
|
489
559
|
/**
|
|
490
560
|
* Optional initial status update logged against the task's thread. Shows in
|
|
491
561
|
* the inbox status bar and the thread update log.
|
|
@@ -506,10 +576,10 @@ declare const createTaskBodySchema: z.ZodObject<{
|
|
|
506
576
|
actions: {
|
|
507
577
|
id: string;
|
|
508
578
|
title: string;
|
|
579
|
+
data?: Record<string, unknown> | undefined;
|
|
509
580
|
description?: string | undefined;
|
|
510
581
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
511
582
|
ui?: UiSchema | undefined;
|
|
512
|
-
data?: Record<string, unknown> | undefined;
|
|
513
583
|
handlers?: ({
|
|
514
584
|
type: "webhook";
|
|
515
585
|
url: string;
|
|
@@ -534,6 +604,7 @@ declare const createTaskBodySchema: z.ZodObject<{
|
|
|
534
604
|
groups?: string[] | undefined;
|
|
535
605
|
} | undefined;
|
|
536
606
|
threadId?: string | undefined;
|
|
607
|
+
priority?: "low" | "normal" | "high" | "urgent" | undefined;
|
|
537
608
|
update?: {
|
|
538
609
|
message: string;
|
|
539
610
|
status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
@@ -544,10 +615,88 @@ declare const createTaskBodySchema: z.ZodObject<{
|
|
|
544
615
|
actions: {
|
|
545
616
|
id: string;
|
|
546
617
|
title: string;
|
|
618
|
+
data?: Record<string, unknown> | undefined;
|
|
619
|
+
description?: string | undefined;
|
|
620
|
+
schema?: ExtendedJSONSchema7 | undefined;
|
|
621
|
+
ui?: UiSchema | undefined;
|
|
622
|
+
handlers?: ({
|
|
623
|
+
type: "webhook";
|
|
624
|
+
url: string;
|
|
625
|
+
headers: Record<string, string>;
|
|
626
|
+
} | {
|
|
627
|
+
type: "trigger";
|
|
628
|
+
url: string;
|
|
629
|
+
headers: Record<string, string>;
|
|
630
|
+
tokenId: string;
|
|
631
|
+
})[] | undefined;
|
|
632
|
+
}[];
|
|
633
|
+
description?: string | undefined;
|
|
634
|
+
app?: string | undefined;
|
|
635
|
+
validUntil?: string | undefined;
|
|
636
|
+
context?: {
|
|
637
|
+
data: Record<string, unknown>;
|
|
638
|
+
ui?: Record<string, Record<string, unknown>> | undefined;
|
|
639
|
+
} | undefined;
|
|
640
|
+
version?: 2 | undefined;
|
|
641
|
+
assignTo?: {
|
|
642
|
+
users?: string[] | undefined;
|
|
643
|
+
groups?: string[] | undefined;
|
|
644
|
+
} | undefined;
|
|
645
|
+
threadId?: string | undefined;
|
|
646
|
+
priority?: "low" | "normal" | "high" | "urgent" | undefined;
|
|
647
|
+
update?: {
|
|
648
|
+
message: string;
|
|
649
|
+
status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
650
|
+
} | undefined;
|
|
651
|
+
}>, {
|
|
652
|
+
type: string;
|
|
653
|
+
name: string;
|
|
654
|
+
actions: {
|
|
655
|
+
id: string;
|
|
656
|
+
title: string;
|
|
657
|
+
data?: Record<string, unknown> | undefined;
|
|
547
658
|
description?: string | undefined;
|
|
548
659
|
schema?: ExtendedJSONSchema7 | undefined;
|
|
549
660
|
ui?: UiSchema | undefined;
|
|
661
|
+
handlers?: ({
|
|
662
|
+
type: "webhook";
|
|
663
|
+
url: string;
|
|
664
|
+
headers: Record<string, string>;
|
|
665
|
+
} | {
|
|
666
|
+
type: "trigger";
|
|
667
|
+
url: string;
|
|
668
|
+
headers: Record<string, string>;
|
|
669
|
+
tokenId: string;
|
|
670
|
+
})[] | undefined;
|
|
671
|
+
}[];
|
|
672
|
+
description?: string | undefined;
|
|
673
|
+
app?: string | undefined;
|
|
674
|
+
validUntil?: string | undefined;
|
|
675
|
+
context?: {
|
|
676
|
+
data: Record<string, unknown>;
|
|
677
|
+
ui?: Record<string, Record<string, unknown>> | undefined;
|
|
678
|
+
} | undefined;
|
|
679
|
+
version?: 2 | undefined;
|
|
680
|
+
assignTo?: {
|
|
681
|
+
users?: string[] | undefined;
|
|
682
|
+
groups?: string[] | undefined;
|
|
683
|
+
} | undefined;
|
|
684
|
+
threadId?: string | undefined;
|
|
685
|
+
priority?: "low" | "normal" | "high" | "urgent" | undefined;
|
|
686
|
+
update?: {
|
|
687
|
+
message: string;
|
|
688
|
+
status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
689
|
+
} | undefined;
|
|
690
|
+
}, {
|
|
691
|
+
type: string;
|
|
692
|
+
name: string;
|
|
693
|
+
actions: {
|
|
694
|
+
id: string;
|
|
695
|
+
title: string;
|
|
550
696
|
data?: Record<string, unknown> | undefined;
|
|
697
|
+
description?: string | undefined;
|
|
698
|
+
schema?: ExtendedJSONSchema7 | undefined;
|
|
699
|
+
ui?: UiSchema | undefined;
|
|
551
700
|
handlers?: ({
|
|
552
701
|
type: "webhook";
|
|
553
702
|
url: string;
|
|
@@ -572,6 +721,7 @@ declare const createTaskBodySchema: z.ZodObject<{
|
|
|
572
721
|
groups?: string[] | undefined;
|
|
573
722
|
} | undefined;
|
|
574
723
|
threadId?: string | undefined;
|
|
724
|
+
priority?: "low" | "normal" | "high" | "urgent" | undefined;
|
|
575
725
|
update?: {
|
|
576
726
|
message: string;
|
|
577
727
|
status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
@@ -715,4 +865,4 @@ type DiscriminatedApprovalResult<TActions extends readonly {
|
|
|
715
865
|
} : never;
|
|
716
866
|
}[TupleElementIndices<TActions>];
|
|
717
867
|
|
|
718
|
-
export { type ApprovalResult, type AssignToInput, type CreateTaskBody, type CreateTaskBodyInput, DEFAULT_THREAD_UPDATE_STATUS, type DiscriminatedApprovalResult, type ExtendedJSONSchema7, type Handler, type InferActionData, type InferJsonSchema7, type JSONSchema7, type JSONSchema7TypeName, type Task, type TaskAction, type TaskContext, type TaskContextInput, type TaskContextOutput, 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, threadUpdateBodySchema, threadUpdateInputSchema, threadUpdateMessageSchema, threadUpdateStatusSchema, threadUpdateStatuses };
|
|
868
|
+
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 };
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DEFAULT_TASK_PRIORITY,
|
|
2
3
|
DEFAULT_THREAD_UPDATE_STATUS,
|
|
4
|
+
LOWEST_TASK_PRIORITY,
|
|
5
|
+
TASK_PRIORITY_RANK,
|
|
3
6
|
assignToSchema,
|
|
4
7
|
createTaskBodySchema,
|
|
5
8
|
taskContextSchema,
|
|
9
|
+
taskPriorities,
|
|
10
|
+
taskPrioritySchema,
|
|
6
11
|
threadUpdateBodySchema,
|
|
7
12
|
threadUpdateInputSchema,
|
|
8
13
|
threadUpdateMessageSchema,
|
|
9
14
|
threadUpdateStatusSchema,
|
|
10
15
|
threadUpdateStatuses
|
|
11
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-ZHASQUX6.js";
|
|
12
17
|
export {
|
|
18
|
+
DEFAULT_TASK_PRIORITY,
|
|
13
19
|
DEFAULT_THREAD_UPDATE_STATUS,
|
|
20
|
+
LOWEST_TASK_PRIORITY,
|
|
21
|
+
TASK_PRIORITY_RANK,
|
|
14
22
|
assignToSchema,
|
|
15
23
|
createTaskBodySchema,
|
|
16
24
|
taskContextSchema,
|
|
25
|
+
taskPriorities,
|
|
26
|
+
taskPrioritySchema,
|
|
17
27
|
threadUpdateBodySchema,
|
|
18
28
|
threadUpdateInputSchema,
|
|
19
29
|
threadUpdateMessageSchema,
|
|
20
30
|
threadUpdateStatusSchema,
|
|
21
31
|
threadUpdateStatuses
|
|
22
32
|
};
|
|
23
|
-
//# sourceMappingURL=index.
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
package/dist/trigger/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _trigger_dev_sdk from '@trigger.dev/sdk';
|
|
2
|
-
import { S as SendToHumanActionInput, a as SendToHumanInput } from '../client-
|
|
2
|
+
import { S as SendToHumanActionInput, a as SendToHumanInput } from '../client-CLcHdjOz.js';
|
|
3
3
|
export { R as RobotRockHandlerWebhookPayload } from '../handler-webhook-BqEi6Bk-.js';
|
|
4
4
|
export { ApprovalResult, DiscriminatedApprovalResult, TaskContextInput, TaskResult } from '../schemas/index.js';
|
|
5
5
|
import 'zod';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isRobotRockHandlerWebhookPayload,
|
|
3
3
|
resolveWaitTiming
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-D2FBSEZK.js";
|
|
5
5
|
import {
|
|
6
6
|
createClient,
|
|
7
7
|
resolveRobotRockConfig,
|
|
8
8
|
toDiscriminatedApprovalResult
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-ZG2XVK6Y.js";
|
|
10
|
+
import "../chunk-ZHASQUX6.js";
|
|
11
11
|
|
|
12
12
|
// src/trigger/index.ts
|
|
13
13
|
import { task, wait } from "@trigger.dev/sdk";
|
|
@@ -75,4 +75,4 @@ export {
|
|
|
75
75
|
approveByHumanTask,
|
|
76
76
|
sendToHumanTask
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=index.
|
|
78
|
+
//# sourceMappingURL=index.js.map
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscriminatedApprovalResult, ThreadUpdateStatus, ThreadUpdate } from '../schemas/index.js';
|
|
2
2
|
export { ApprovalResult, TaskContextInput, TaskResult } from '../schemas/index.js';
|
|
3
|
-
import { S as SendToHumanActionInput, a as SendToHumanInput } from '../client-
|
|
3
|
+
import { S as SendToHumanActionInput, a as SendToHumanInput } from '../client-CLcHdjOz.js';
|
|
4
4
|
export { R as RobotRockHandlerWebhookPayload } from '../handler-webhook-BqEi6Bk-.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
isRobotRockHandlerWebhookPayload,
|
|
3
3
|
parseValidUntilMs,
|
|
4
4
|
resolveWaitTiming
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-D2FBSEZK.js";
|
|
6
6
|
import {
|
|
7
7
|
createClient,
|
|
8
8
|
resolveRobotRockConfig,
|
|
9
9
|
toDiscriminatedApprovalResult
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-ZG2XVK6Y.js";
|
|
11
11
|
import {
|
|
12
12
|
__callDispose,
|
|
13
13
|
__using
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-ZHASQUX6.js";
|
|
15
15
|
|
|
16
16
|
// src/workflow/index.ts
|
|
17
17
|
import { createWebhook, sleep } from "workflow";
|
|
@@ -112,4 +112,4 @@ export {
|
|
|
112
112
|
sendToHumanInWorkflow,
|
|
113
113
|
sendUpdateInWorkflow
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=index.
|
|
115
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ToolApprovalResponse } from 'ai';
|
|
1
|
+
import { Tool, ToolApprovalResponse } from 'ai';
|
|
3
2
|
import { z } from 'zod';
|
|
4
|
-
import { b as RobotRock, a as SendToHumanInput, S as SendToHumanActionInput, l as SendUpdateInput } from './client-
|
|
3
|
+
import { b as RobotRock, a as SendToHumanInput, S as SendToHumanActionInput, l as SendUpdateInput } from './client-CLcHdjOz.js';
|
|
5
4
|
import { DiscriminatedApprovalResult, ThreadUpdate } from './schemas/index.js';
|
|
6
5
|
|
|
7
6
|
declare const APPROVE_BY_HUMAN_ACTIONS$1: readonly [{
|
|
@@ -109,13 +108,13 @@ declare const approveByHumanInputSchema: z.ZodObject<{
|
|
|
109
108
|
description: z.ZodString;
|
|
110
109
|
contextSummary: z.ZodOptional<z.ZodString>;
|
|
111
110
|
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
name: string;
|
|
113
111
|
description: string;
|
|
112
|
+
name: string;
|
|
114
113
|
type?: string | undefined;
|
|
115
114
|
contextSummary?: string | undefined;
|
|
116
115
|
}, {
|
|
117
|
-
name: string;
|
|
118
116
|
description: string;
|
|
117
|
+
name: string;
|
|
119
118
|
type?: string | undefined;
|
|
120
119
|
contextSummary?: string | undefined;
|
|
121
120
|
}>;
|
|
@@ -134,12 +133,7 @@ type ApproveByHumanToolDurableOptions = ApproveByHumanToolOptions & RobotRockAiC
|
|
|
134
133
|
* - `approveByHumanTool({ mode: "trigger", app?: "my-agent" })` — durable wait via Trigger.dev.
|
|
135
134
|
* - `approveByHumanTool({ mode: "workflow", app?: "my-agent" })` — durable wait via Vercel Workflow.
|
|
136
135
|
*/
|
|
137
|
-
declare function approveByHumanTool(clientOrContext: RobotRock | ApproveByHumanToolDurableOptions, maybeOptions?: ApproveByHumanToolOptions):
|
|
138
|
-
name: string;
|
|
139
|
-
description: string;
|
|
140
|
-
type?: string | undefined;
|
|
141
|
-
contextSummary?: string | undefined;
|
|
142
|
-
}, HumanToolResult>;
|
|
136
|
+
declare function approveByHumanTool(clientOrContext: RobotRock | ApproveByHumanToolDurableOptions, maybeOptions?: ApproveByHumanToolOptions): Tool<z.infer<typeof approveByHumanInputSchema>, HumanToolResult>;
|
|
143
137
|
|
|
144
138
|
declare const sendToHumanToolInputSchema: z.ZodObject<{
|
|
145
139
|
type: z.ZodString;
|
|
@@ -220,20 +214,7 @@ type CreateSendToHumanToolDurableOptions<A extends readonly SendToHumanActionInp
|
|
|
220
214
|
* - `createSendToHumanTool({ mode: "trigger", actions: [...], app?: "my-agent" })` — Trigger.dev wait tokens.
|
|
221
215
|
* - `createSendToHumanTool({ mode: "workflow", actions: [...], app?: "my-agent" })` — Vercel Workflow webhooks.
|
|
222
216
|
*/
|
|
223
|
-
declare function createSendToHumanTool<A extends readonly SendToHumanActionInput[] = readonly SendToHumanActionInput[]>(clientOrOptions: RobotRock | CreateSendToHumanToolDurableOptions<A>, maybeOptions?: CreateSendToHumanToolOptions<A>):
|
|
224
|
-
type: string;
|
|
225
|
-
name: string;
|
|
226
|
-
description?: string | undefined;
|
|
227
|
-
validUntil?: string | undefined;
|
|
228
|
-
context?: {
|
|
229
|
-
data?: Record<string, unknown> | undefined;
|
|
230
|
-
ui?: Record<string, unknown> | undefined;
|
|
231
|
-
} | undefined;
|
|
232
|
-
assignTo?: {
|
|
233
|
-
users?: string[] | undefined;
|
|
234
|
-
groups?: string[] | undefined;
|
|
235
|
-
} | undefined;
|
|
236
|
-
}, HumanToolResult>;
|
|
217
|
+
declare function createSendToHumanTool<A extends readonly SendToHumanActionInput[] = readonly SendToHumanActionInput[]>(clientOrOptions: RobotRock | CreateSendToHumanToolDurableOptions<A>, maybeOptions?: CreateSendToHumanToolOptions<A>): Tool<z.infer<typeof sendToHumanToolInputSchema>, HumanToolResult>;
|
|
237
218
|
|
|
238
219
|
/**
|
|
239
220
|
* Result returned to the model by {@link createSendUpdateTool}.
|
|
@@ -290,11 +271,7 @@ type CreateSendUpdateToolDurableOptions = CreateSendUpdateToolOptions & RobotRoc
|
|
|
290
271
|
* The thread is resolved from the tool input `threadId`, falling back to a
|
|
291
272
|
* session `threadId` in the options. Provide at least one.
|
|
292
273
|
*/
|
|
293
|
-
declare function createSendUpdateTool(clientOrOptions: RobotRock | CreateSendUpdateToolDurableOptions, maybeOptions?: CreateSendUpdateToolOptions):
|
|
294
|
-
message: string;
|
|
295
|
-
status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
296
|
-
threadId?: string | undefined;
|
|
297
|
-
}, SendUpdateToolResult>;
|
|
274
|
+
declare function createSendUpdateTool(clientOrOptions: RobotRock | CreateSendUpdateToolDurableOptions, maybeOptions?: CreateSendUpdateToolOptions): Tool<z.infer<typeof sendUpdateToolInputSchema>, SendUpdateToolResult>;
|
|
298
275
|
|
|
299
276
|
type CreateRobotRockAiToolsOptions = {
|
|
300
277
|
/** @default "polling" when `client` is passed; `"trigger"` or `"workflow"` for durable waits. */
|
|
@@ -307,6 +284,12 @@ type CreateRobotRockAiToolsOptions = {
|
|
|
307
284
|
*/
|
|
308
285
|
threadId?: string;
|
|
309
286
|
};
|
|
287
|
+
type RobotRockAiTools = {
|
|
288
|
+
context: RobotRockAiContext;
|
|
289
|
+
approveByHuman: (toolOptions?: ApproveByHumanToolOptions) => Tool<z.infer<typeof approveByHumanInputSchema>, HumanToolResult>;
|
|
290
|
+
sendToHuman: <A extends readonly SendToHumanActionInput[]>(toolOptions: CreateSendToHumanToolOptions<A>) => Tool<z.infer<typeof sendToHumanToolInputSchema>, HumanToolResult>;
|
|
291
|
+
sendUpdate: (toolOptions?: CreateSendUpdateToolOptions) => Tool<z.infer<typeof sendUpdateToolInputSchema>, SendUpdateToolResult>;
|
|
292
|
+
};
|
|
310
293
|
/**
|
|
311
294
|
* Build AI SDK tools for a given RobotRock execution mode.
|
|
312
295
|
*
|
|
@@ -325,34 +308,7 @@ type CreateRobotRockAiToolsOptions = {
|
|
|
325
308
|
* const tools = createRobotRockAiTools({ mode: "workflow", app: "my-agent" });
|
|
326
309
|
* ```
|
|
327
310
|
*/
|
|
328
|
-
declare function createRobotRockAiTools(options: CreateRobotRockAiToolsOptions):
|
|
329
|
-
context: RobotRockAiContext;
|
|
330
|
-
approveByHuman: (toolOptions?: ApproveByHumanToolOptions) => ai.Tool<{
|
|
331
|
-
name: string;
|
|
332
|
-
description: string;
|
|
333
|
-
type?: string | undefined;
|
|
334
|
-
contextSummary?: string | undefined;
|
|
335
|
-
}, HumanToolResult>;
|
|
336
|
-
sendToHuman: <A extends readonly SendToHumanActionInput[]>(toolOptions: CreateSendToHumanToolOptions<A>) => ai.Tool<{
|
|
337
|
-
type: string;
|
|
338
|
-
name: string;
|
|
339
|
-
description?: string | undefined;
|
|
340
|
-
validUntil?: string | undefined;
|
|
341
|
-
context?: {
|
|
342
|
-
data?: Record<string, unknown> | undefined;
|
|
343
|
-
ui?: Record<string, unknown> | undefined;
|
|
344
|
-
} | undefined;
|
|
345
|
-
assignTo?: {
|
|
346
|
-
users?: string[] | undefined;
|
|
347
|
-
groups?: string[] | undefined;
|
|
348
|
-
} | undefined;
|
|
349
|
-
}, HumanToolResult>;
|
|
350
|
-
sendUpdate: (toolOptions?: CreateSendUpdateToolOptions) => ai.Tool<{
|
|
351
|
-
message: string;
|
|
352
|
-
status?: "info" | "queued" | "running" | "waiting" | "succeeded" | "failed" | "cancelled" | undefined;
|
|
353
|
-
threadId?: string | undefined;
|
|
354
|
-
}, SendUpdateToolResult>;
|
|
355
|
-
};
|
|
311
|
+
declare function createRobotRockAiTools(options: CreateRobotRockAiToolsOptions): RobotRockAiTools;
|
|
356
312
|
/** Shorthand for `{ mode: "trigger", app }`. */
|
|
357
313
|
declare function createRobotRockAiTriggerContext(options?: Omit<RobotRockAiTriggerContext, "mode">): RobotRockAiContext;
|
|
358
314
|
/** Shorthand for `{ mode: "workflow", app }`. */
|
|
@@ -390,4 +346,4 @@ declare function resolveToolApprovalsViaRobotRock(clientOrContext: RobotRock | R
|
|
|
390
346
|
*/
|
|
391
347
|
declare function runWithRobotRockApprovals<T>(options: RunWithRobotRockApprovalsOptions<T>): Promise<T>;
|
|
392
348
|
|
|
393
|
-
export { APPROVE_BY_HUMAN_ACTIONS as A,
|
|
349
|
+
export { APPROVE_BY_HUMAN_ACTIONS as A, collectApprovalRequests as B, type CreateSendToHumanToolOptions as C, createRobotRockNeedsApproval as D, createRobotRockToolApproval as E, type FormatToolApprovalTaskOptions as F, resolveToolApprovalsViaRobotRock as G, type HumanToolResult as H, runWithRobotRockApprovals as I, type RobotRockToolApprovalDecision as J, type ResolveToolApprovalsOptions as K, type RobotRockToolApprovalConfig as L, type RunWithRobotRockApprovalsOptions as M, type RobotRockToolCallInfo as R, type SendUpdateToolResult as S, type ToolApprovalRequestPart as T, approveByHumanTool as a, approveByHumanInputSchema as b, type ApproveByHumanToolOptions as c, type ApproveByHumanToolDurableOptions as d, createSendToHumanTool as e, type CreateSendToHumanToolDurableOptions as f, createSendUpdateTool as g, sendUpdateToolInputSchema as h, type CreateSendUpdateToolOptions as i, type CreateSendUpdateToolDurableOptions as j, approveByHumanForAi as k, sendToHumanForAi as l, sendUpdateForAi as m, normalizeRobotRockAiContext as n, type RobotRockAiContext as o, type RobotRockAiMode as p, type RobotRockAiPollingContext as q, type RobotRockAiTriggerContext as r, sendToHumanToolInputSchema as s, type RobotRockAiWorkflowContext as t, createRobotRockAiTools as u, createRobotRockAiTriggerContext as v, createRobotRockAiWorkflowContext as w, type CreateRobotRockAiToolsOptions as x, type RobotRockAiTools as y, applyRobotRockToolApprovalToTools as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robotrock",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Human-in-the-loop approval workflows for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"url": "https://github.com/quintenb/robotrock-sdk/issues"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
+
"@robotrock/core": "workspace:*",
|
|
66
67
|
"zod": "^3.25.0"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"@robotrock/core": "workspace:*",
|
|
71
72
|
"@trigger.dev/sdk": "4.4.6",
|
|
72
73
|
"@types/node": "^25.0.3",
|
|
73
|
-
"ai": "^
|
|
74
|
+
"ai": "^7.0.2",
|
|
74
75
|
"eslint": "^9.39.2",
|
|
75
76
|
"tsup": "^8.0.0",
|
|
76
77
|
"typescript": "^5.9.3",
|