@vercel/factory 0.0.21 → 0.0.22
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/CHANGELOG.md +10 -0
- package/dist/build-factory.d.mts +1 -1
- package/dist/build-factory.mjs +2 -1
- package/dist/build-factory.mjs.map +1 -1
- package/dist/client.d.mts +4 -4
- package/dist/eve/task-execution.d.mts +16 -16
- package/dist/github.d.mts +21 -1
- package/dist/github.mjs +25 -1
- package/dist/github.mjs.map +1 -1
- package/dist/intake-contracts.d.mts +2 -2
- package/dist/integrations/github.d.mts +2 -2
- package/dist/integrations/github.mjs +2 -2
- package/dist/repository-scripts.d.mts +221 -0
- package/dist/repository-scripts.mjs +330 -0
- package/dist/repository-scripts.mjs.map +1 -0
- package/dist/schema/task-graph.d.mts +96 -96
- package/dist/schema/transcript.d.mts +4 -4
- package/docs/recipes/repository-scripts.md +64 -0
- package/package.json +8 -4
|
@@ -258,6 +258,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
258
258
|
reportRef?: string | undefined;
|
|
259
259
|
}>> & z.ZodType<({
|
|
260
260
|
id: `task_${string}`;
|
|
261
|
+
origin: {
|
|
262
|
+
signalId?: `sig_${string}` | undefined;
|
|
263
|
+
operator?: string | undefined;
|
|
264
|
+
};
|
|
261
265
|
schemaVersion: 1;
|
|
262
266
|
replyTo: {
|
|
263
267
|
channel: string;
|
|
@@ -271,10 +275,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
271
275
|
model?: string | undefined;
|
|
272
276
|
area?: string | undefined;
|
|
273
277
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
274
|
-
origin: {
|
|
275
|
-
signalId?: `sig_${string}` | undefined;
|
|
276
|
-
operator?: string | undefined;
|
|
277
|
-
};
|
|
278
278
|
work: {
|
|
279
279
|
title: string;
|
|
280
280
|
input: JsonValue;
|
|
@@ -335,6 +335,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
335
335
|
parentTaskId?: `task_${string}`;
|
|
336
336
|
}) | ({
|
|
337
337
|
id: `task_${string}`;
|
|
338
|
+
origin: {
|
|
339
|
+
signalId?: `sig_${string}` | undefined;
|
|
340
|
+
operator?: string | undefined;
|
|
341
|
+
};
|
|
338
342
|
schemaVersion: 1;
|
|
339
343
|
replyTo: {
|
|
340
344
|
channel: string;
|
|
@@ -348,10 +352,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
348
352
|
model?: string | undefined;
|
|
349
353
|
area?: string | undefined;
|
|
350
354
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
351
|
-
origin: {
|
|
352
|
-
signalId?: `sig_${string}` | undefined;
|
|
353
|
-
operator?: string | undefined;
|
|
354
|
-
};
|
|
355
355
|
work: {
|
|
356
356
|
title: string;
|
|
357
357
|
input: JsonValue;
|
|
@@ -418,6 +418,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
418
418
|
parentTaskId?: `task_${string}`;
|
|
419
419
|
}) | ({
|
|
420
420
|
id: `task_${string}`;
|
|
421
|
+
origin: {
|
|
422
|
+
signalId?: `sig_${string}` | undefined;
|
|
423
|
+
operator?: string | undefined;
|
|
424
|
+
};
|
|
421
425
|
schemaVersion: 1;
|
|
422
426
|
replyTo: {
|
|
423
427
|
channel: string;
|
|
@@ -431,10 +435,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
431
435
|
model?: string | undefined;
|
|
432
436
|
area?: string | undefined;
|
|
433
437
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
434
|
-
origin: {
|
|
435
|
-
signalId?: `sig_${string}` | undefined;
|
|
436
|
-
operator?: string | undefined;
|
|
437
|
-
};
|
|
438
438
|
work: {
|
|
439
439
|
title: string;
|
|
440
440
|
input: JsonValue;
|
|
@@ -501,6 +501,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
501
501
|
parentTaskId: `task_${string}`;
|
|
502
502
|
}) | ({
|
|
503
503
|
id: `task_${string}`;
|
|
504
|
+
origin: {
|
|
505
|
+
signalId?: `sig_${string}` | undefined;
|
|
506
|
+
operator?: string | undefined;
|
|
507
|
+
};
|
|
504
508
|
schemaVersion: 1;
|
|
505
509
|
replyTo: {
|
|
506
510
|
channel: string;
|
|
@@ -514,10 +518,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
514
518
|
model?: string | undefined;
|
|
515
519
|
area?: string | undefined;
|
|
516
520
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
517
|
-
origin: {
|
|
518
|
-
signalId?: `sig_${string}` | undefined;
|
|
519
|
-
operator?: string | undefined;
|
|
520
|
-
};
|
|
521
521
|
work: {
|
|
522
522
|
title: string;
|
|
523
523
|
input: JsonValue;
|
|
@@ -656,6 +656,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
656
656
|
reportRef?: string | undefined;
|
|
657
657
|
}, z.core.$ZodTypeInternals<({
|
|
658
658
|
id: `task_${string}`;
|
|
659
|
+
origin: {
|
|
660
|
+
signalId?: `sig_${string}` | undefined;
|
|
661
|
+
operator?: string | undefined;
|
|
662
|
+
};
|
|
659
663
|
schemaVersion: 1;
|
|
660
664
|
replyTo: {
|
|
661
665
|
channel: string;
|
|
@@ -669,10 +673,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
669
673
|
model?: string | undefined;
|
|
670
674
|
area?: string | undefined;
|
|
671
675
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
672
|
-
origin: {
|
|
673
|
-
signalId?: `sig_${string}` | undefined;
|
|
674
|
-
operator?: string | undefined;
|
|
675
|
-
};
|
|
676
676
|
work: {
|
|
677
677
|
title: string;
|
|
678
678
|
input: JsonValue;
|
|
@@ -733,6 +733,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
733
733
|
parentTaskId?: `task_${string}`;
|
|
734
734
|
}) | ({
|
|
735
735
|
id: `task_${string}`;
|
|
736
|
+
origin: {
|
|
737
|
+
signalId?: `sig_${string}` | undefined;
|
|
738
|
+
operator?: string | undefined;
|
|
739
|
+
};
|
|
736
740
|
schemaVersion: 1;
|
|
737
741
|
replyTo: {
|
|
738
742
|
channel: string;
|
|
@@ -746,10 +750,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
746
750
|
model?: string | undefined;
|
|
747
751
|
area?: string | undefined;
|
|
748
752
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
749
|
-
origin: {
|
|
750
|
-
signalId?: `sig_${string}` | undefined;
|
|
751
|
-
operator?: string | undefined;
|
|
752
|
-
};
|
|
753
753
|
work: {
|
|
754
754
|
title: string;
|
|
755
755
|
input: JsonValue;
|
|
@@ -816,6 +816,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
816
816
|
parentTaskId?: `task_${string}`;
|
|
817
817
|
}) | ({
|
|
818
818
|
id: `task_${string}`;
|
|
819
|
+
origin: {
|
|
820
|
+
signalId?: `sig_${string}` | undefined;
|
|
821
|
+
operator?: string | undefined;
|
|
822
|
+
};
|
|
819
823
|
schemaVersion: 1;
|
|
820
824
|
replyTo: {
|
|
821
825
|
channel: string;
|
|
@@ -829,10 +833,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
829
833
|
model?: string | undefined;
|
|
830
834
|
area?: string | undefined;
|
|
831
835
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
832
|
-
origin: {
|
|
833
|
-
signalId?: `sig_${string}` | undefined;
|
|
834
|
-
operator?: string | undefined;
|
|
835
|
-
};
|
|
836
836
|
work: {
|
|
837
837
|
title: string;
|
|
838
838
|
input: JsonValue;
|
|
@@ -899,6 +899,10 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
899
899
|
parentTaskId: `task_${string}`;
|
|
900
900
|
}) | ({
|
|
901
901
|
id: `task_${string}`;
|
|
902
|
+
origin: {
|
|
903
|
+
signalId?: `sig_${string}` | undefined;
|
|
904
|
+
operator?: string | undefined;
|
|
905
|
+
};
|
|
902
906
|
schemaVersion: 1;
|
|
903
907
|
replyTo: {
|
|
904
908
|
channel: string;
|
|
@@ -912,10 +916,6 @@ declare const taskGraphAdmissionSchema: Omit<z.ZodObject<{
|
|
|
912
916
|
model?: string | undefined;
|
|
913
917
|
area?: string | undefined;
|
|
914
918
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
915
|
-
origin: {
|
|
916
|
-
signalId?: `sig_${string}` | undefined;
|
|
917
|
-
operator?: string | undefined;
|
|
918
|
-
};
|
|
919
919
|
work: {
|
|
920
920
|
title: string;
|
|
921
921
|
input: JsonValue;
|
|
@@ -1308,6 +1308,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1308
1308
|
reportRef?: string | undefined;
|
|
1309
1309
|
}>> & z.ZodType<({
|
|
1310
1310
|
id: `task_${string}`;
|
|
1311
|
+
origin: {
|
|
1312
|
+
signalId?: `sig_${string}` | undefined;
|
|
1313
|
+
operator?: string | undefined;
|
|
1314
|
+
};
|
|
1311
1315
|
schemaVersion: 1;
|
|
1312
1316
|
replyTo: {
|
|
1313
1317
|
channel: string;
|
|
@@ -1321,10 +1325,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1321
1325
|
model?: string | undefined;
|
|
1322
1326
|
area?: string | undefined;
|
|
1323
1327
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1324
|
-
origin: {
|
|
1325
|
-
signalId?: `sig_${string}` | undefined;
|
|
1326
|
-
operator?: string | undefined;
|
|
1327
|
-
};
|
|
1328
1328
|
work: {
|
|
1329
1329
|
title: string;
|
|
1330
1330
|
input: JsonValue;
|
|
@@ -1385,6 +1385,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1385
1385
|
parentTaskId?: `task_${string}`;
|
|
1386
1386
|
}) | ({
|
|
1387
1387
|
id: `task_${string}`;
|
|
1388
|
+
origin: {
|
|
1389
|
+
signalId?: `sig_${string}` | undefined;
|
|
1390
|
+
operator?: string | undefined;
|
|
1391
|
+
};
|
|
1388
1392
|
schemaVersion: 1;
|
|
1389
1393
|
replyTo: {
|
|
1390
1394
|
channel: string;
|
|
@@ -1398,10 +1402,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1398
1402
|
model?: string | undefined;
|
|
1399
1403
|
area?: string | undefined;
|
|
1400
1404
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1401
|
-
origin: {
|
|
1402
|
-
signalId?: `sig_${string}` | undefined;
|
|
1403
|
-
operator?: string | undefined;
|
|
1404
|
-
};
|
|
1405
1405
|
work: {
|
|
1406
1406
|
title: string;
|
|
1407
1407
|
input: JsonValue;
|
|
@@ -1468,6 +1468,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1468
1468
|
parentTaskId?: `task_${string}`;
|
|
1469
1469
|
}) | ({
|
|
1470
1470
|
id: `task_${string}`;
|
|
1471
|
+
origin: {
|
|
1472
|
+
signalId?: `sig_${string}` | undefined;
|
|
1473
|
+
operator?: string | undefined;
|
|
1474
|
+
};
|
|
1471
1475
|
schemaVersion: 1;
|
|
1472
1476
|
replyTo: {
|
|
1473
1477
|
channel: string;
|
|
@@ -1481,10 +1485,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1481
1485
|
model?: string | undefined;
|
|
1482
1486
|
area?: string | undefined;
|
|
1483
1487
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1484
|
-
origin: {
|
|
1485
|
-
signalId?: `sig_${string}` | undefined;
|
|
1486
|
-
operator?: string | undefined;
|
|
1487
|
-
};
|
|
1488
1488
|
work: {
|
|
1489
1489
|
title: string;
|
|
1490
1490
|
input: JsonValue;
|
|
@@ -1551,6 +1551,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1551
1551
|
parentTaskId: `task_${string}`;
|
|
1552
1552
|
}) | ({
|
|
1553
1553
|
id: `task_${string}`;
|
|
1554
|
+
origin: {
|
|
1555
|
+
signalId?: `sig_${string}` | undefined;
|
|
1556
|
+
operator?: string | undefined;
|
|
1557
|
+
};
|
|
1554
1558
|
schemaVersion: 1;
|
|
1555
1559
|
replyTo: {
|
|
1556
1560
|
channel: string;
|
|
@@ -1564,10 +1568,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1564
1568
|
model?: string | undefined;
|
|
1565
1569
|
area?: string | undefined;
|
|
1566
1570
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1567
|
-
origin: {
|
|
1568
|
-
signalId?: `sig_${string}` | undefined;
|
|
1569
|
-
operator?: string | undefined;
|
|
1570
|
-
};
|
|
1571
1571
|
work: {
|
|
1572
1572
|
title: string;
|
|
1573
1573
|
input: JsonValue;
|
|
@@ -1706,6 +1706,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1706
1706
|
reportRef?: string | undefined;
|
|
1707
1707
|
}, z.core.$ZodTypeInternals<({
|
|
1708
1708
|
id: `task_${string}`;
|
|
1709
|
+
origin: {
|
|
1710
|
+
signalId?: `sig_${string}` | undefined;
|
|
1711
|
+
operator?: string | undefined;
|
|
1712
|
+
};
|
|
1709
1713
|
schemaVersion: 1;
|
|
1710
1714
|
replyTo: {
|
|
1711
1715
|
channel: string;
|
|
@@ -1719,10 +1723,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1719
1723
|
model?: string | undefined;
|
|
1720
1724
|
area?: string | undefined;
|
|
1721
1725
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1722
|
-
origin: {
|
|
1723
|
-
signalId?: `sig_${string}` | undefined;
|
|
1724
|
-
operator?: string | undefined;
|
|
1725
|
-
};
|
|
1726
1726
|
work: {
|
|
1727
1727
|
title: string;
|
|
1728
1728
|
input: JsonValue;
|
|
@@ -1783,6 +1783,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1783
1783
|
parentTaskId?: `task_${string}`;
|
|
1784
1784
|
}) | ({
|
|
1785
1785
|
id: `task_${string}`;
|
|
1786
|
+
origin: {
|
|
1787
|
+
signalId?: `sig_${string}` | undefined;
|
|
1788
|
+
operator?: string | undefined;
|
|
1789
|
+
};
|
|
1786
1790
|
schemaVersion: 1;
|
|
1787
1791
|
replyTo: {
|
|
1788
1792
|
channel: string;
|
|
@@ -1796,10 +1800,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1796
1800
|
model?: string | undefined;
|
|
1797
1801
|
area?: string | undefined;
|
|
1798
1802
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1799
|
-
origin: {
|
|
1800
|
-
signalId?: `sig_${string}` | undefined;
|
|
1801
|
-
operator?: string | undefined;
|
|
1802
|
-
};
|
|
1803
1803
|
work: {
|
|
1804
1804
|
title: string;
|
|
1805
1805
|
input: JsonValue;
|
|
@@ -1866,6 +1866,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1866
1866
|
parentTaskId?: `task_${string}`;
|
|
1867
1867
|
}) | ({
|
|
1868
1868
|
id: `task_${string}`;
|
|
1869
|
+
origin: {
|
|
1870
|
+
signalId?: `sig_${string}` | undefined;
|
|
1871
|
+
operator?: string | undefined;
|
|
1872
|
+
};
|
|
1869
1873
|
schemaVersion: 1;
|
|
1870
1874
|
replyTo: {
|
|
1871
1875
|
channel: string;
|
|
@@ -1879,10 +1883,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1879
1883
|
model?: string | undefined;
|
|
1880
1884
|
area?: string | undefined;
|
|
1881
1885
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1882
|
-
origin: {
|
|
1883
|
-
signalId?: `sig_${string}` | undefined;
|
|
1884
|
-
operator?: string | undefined;
|
|
1885
|
-
};
|
|
1886
1886
|
work: {
|
|
1887
1887
|
title: string;
|
|
1888
1888
|
input: JsonValue;
|
|
@@ -1949,6 +1949,10 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1949
1949
|
parentTaskId: `task_${string}`;
|
|
1950
1950
|
}) | ({
|
|
1951
1951
|
id: `task_${string}`;
|
|
1952
|
+
origin: {
|
|
1953
|
+
signalId?: `sig_${string}` | undefined;
|
|
1954
|
+
operator?: string | undefined;
|
|
1955
|
+
};
|
|
1952
1956
|
schemaVersion: 1;
|
|
1953
1957
|
replyTo: {
|
|
1954
1958
|
channel: string;
|
|
@@ -1962,10 +1966,6 @@ declare const taskGraphNodeSchema: z.ZodObject<{
|
|
|
1962
1966
|
model?: string | undefined;
|
|
1963
1967
|
area?: string | undefined;
|
|
1964
1968
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
1965
|
-
origin: {
|
|
1966
|
-
signalId?: `sig_${string}` | undefined;
|
|
1967
|
-
operator?: string | undefined;
|
|
1968
|
-
};
|
|
1969
1969
|
work: {
|
|
1970
1970
|
title: string;
|
|
1971
1971
|
input: JsonValue;
|
|
@@ -2366,6 +2366,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2366
2366
|
reportRef?: string | undefined;
|
|
2367
2367
|
}>> & z.ZodType<({
|
|
2368
2368
|
id: `task_${string}`;
|
|
2369
|
+
origin: {
|
|
2370
|
+
signalId?: `sig_${string}` | undefined;
|
|
2371
|
+
operator?: string | undefined;
|
|
2372
|
+
};
|
|
2369
2373
|
schemaVersion: 1;
|
|
2370
2374
|
replyTo: {
|
|
2371
2375
|
channel: string;
|
|
@@ -2379,10 +2383,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2379
2383
|
model?: string | undefined;
|
|
2380
2384
|
area?: string | undefined;
|
|
2381
2385
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
2382
|
-
origin: {
|
|
2383
|
-
signalId?: `sig_${string}` | undefined;
|
|
2384
|
-
operator?: string | undefined;
|
|
2385
|
-
};
|
|
2386
2386
|
work: {
|
|
2387
2387
|
title: string;
|
|
2388
2388
|
input: JsonValue;
|
|
@@ -2443,6 +2443,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2443
2443
|
parentTaskId?: `task_${string}`;
|
|
2444
2444
|
}) | ({
|
|
2445
2445
|
id: `task_${string}`;
|
|
2446
|
+
origin: {
|
|
2447
|
+
signalId?: `sig_${string}` | undefined;
|
|
2448
|
+
operator?: string | undefined;
|
|
2449
|
+
};
|
|
2446
2450
|
schemaVersion: 1;
|
|
2447
2451
|
replyTo: {
|
|
2448
2452
|
channel: string;
|
|
@@ -2456,10 +2460,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2456
2460
|
model?: string | undefined;
|
|
2457
2461
|
area?: string | undefined;
|
|
2458
2462
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
2459
|
-
origin: {
|
|
2460
|
-
signalId?: `sig_${string}` | undefined;
|
|
2461
|
-
operator?: string | undefined;
|
|
2462
|
-
};
|
|
2463
2463
|
work: {
|
|
2464
2464
|
title: string;
|
|
2465
2465
|
input: JsonValue;
|
|
@@ -2526,6 +2526,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2526
2526
|
parentTaskId?: `task_${string}`;
|
|
2527
2527
|
}) | ({
|
|
2528
2528
|
id: `task_${string}`;
|
|
2529
|
+
origin: {
|
|
2530
|
+
signalId?: `sig_${string}` | undefined;
|
|
2531
|
+
operator?: string | undefined;
|
|
2532
|
+
};
|
|
2529
2533
|
schemaVersion: 1;
|
|
2530
2534
|
replyTo: {
|
|
2531
2535
|
channel: string;
|
|
@@ -2539,10 +2543,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2539
2543
|
model?: string | undefined;
|
|
2540
2544
|
area?: string | undefined;
|
|
2541
2545
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
2542
|
-
origin: {
|
|
2543
|
-
signalId?: `sig_${string}` | undefined;
|
|
2544
|
-
operator?: string | undefined;
|
|
2545
|
-
};
|
|
2546
2546
|
work: {
|
|
2547
2547
|
title: string;
|
|
2548
2548
|
input: JsonValue;
|
|
@@ -2609,6 +2609,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2609
2609
|
parentTaskId: `task_${string}`;
|
|
2610
2610
|
}) | ({
|
|
2611
2611
|
id: `task_${string}`;
|
|
2612
|
+
origin: {
|
|
2613
|
+
signalId?: `sig_${string}` | undefined;
|
|
2614
|
+
operator?: string | undefined;
|
|
2615
|
+
};
|
|
2612
2616
|
schemaVersion: 1;
|
|
2613
2617
|
replyTo: {
|
|
2614
2618
|
channel: string;
|
|
@@ -2622,10 +2626,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2622
2626
|
model?: string | undefined;
|
|
2623
2627
|
area?: string | undefined;
|
|
2624
2628
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
2625
|
-
origin: {
|
|
2626
|
-
signalId?: `sig_${string}` | undefined;
|
|
2627
|
-
operator?: string | undefined;
|
|
2628
|
-
};
|
|
2629
2629
|
work: {
|
|
2630
2630
|
title: string;
|
|
2631
2631
|
input: JsonValue;
|
|
@@ -2764,6 +2764,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2764
2764
|
reportRef?: string | undefined;
|
|
2765
2765
|
}, z.core.$ZodTypeInternals<({
|
|
2766
2766
|
id: `task_${string}`;
|
|
2767
|
+
origin: {
|
|
2768
|
+
signalId?: `sig_${string}` | undefined;
|
|
2769
|
+
operator?: string | undefined;
|
|
2770
|
+
};
|
|
2767
2771
|
schemaVersion: 1;
|
|
2768
2772
|
replyTo: {
|
|
2769
2773
|
channel: string;
|
|
@@ -2777,10 +2781,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2777
2781
|
model?: string | undefined;
|
|
2778
2782
|
area?: string | undefined;
|
|
2779
2783
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
2780
|
-
origin: {
|
|
2781
|
-
signalId?: `sig_${string}` | undefined;
|
|
2782
|
-
operator?: string | undefined;
|
|
2783
|
-
};
|
|
2784
2784
|
work: {
|
|
2785
2785
|
title: string;
|
|
2786
2786
|
input: JsonValue;
|
|
@@ -2841,6 +2841,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2841
2841
|
parentTaskId?: `task_${string}`;
|
|
2842
2842
|
}) | ({
|
|
2843
2843
|
id: `task_${string}`;
|
|
2844
|
+
origin: {
|
|
2845
|
+
signalId?: `sig_${string}` | undefined;
|
|
2846
|
+
operator?: string | undefined;
|
|
2847
|
+
};
|
|
2844
2848
|
schemaVersion: 1;
|
|
2845
2849
|
replyTo: {
|
|
2846
2850
|
channel: string;
|
|
@@ -2854,10 +2858,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2854
2858
|
model?: string | undefined;
|
|
2855
2859
|
area?: string | undefined;
|
|
2856
2860
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
2857
|
-
origin: {
|
|
2858
|
-
signalId?: `sig_${string}` | undefined;
|
|
2859
|
-
operator?: string | undefined;
|
|
2860
|
-
};
|
|
2861
2861
|
work: {
|
|
2862
2862
|
title: string;
|
|
2863
2863
|
input: JsonValue;
|
|
@@ -2924,6 +2924,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2924
2924
|
parentTaskId?: `task_${string}`;
|
|
2925
2925
|
}) | ({
|
|
2926
2926
|
id: `task_${string}`;
|
|
2927
|
+
origin: {
|
|
2928
|
+
signalId?: `sig_${string}` | undefined;
|
|
2929
|
+
operator?: string | undefined;
|
|
2930
|
+
};
|
|
2927
2931
|
schemaVersion: 1;
|
|
2928
2932
|
replyTo: {
|
|
2929
2933
|
channel: string;
|
|
@@ -2937,10 +2941,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
2937
2941
|
model?: string | undefined;
|
|
2938
2942
|
area?: string | undefined;
|
|
2939
2943
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
2940
|
-
origin: {
|
|
2941
|
-
signalId?: `sig_${string}` | undefined;
|
|
2942
|
-
operator?: string | undefined;
|
|
2943
|
-
};
|
|
2944
2944
|
work: {
|
|
2945
2945
|
title: string;
|
|
2946
2946
|
input: JsonValue;
|
|
@@ -3007,6 +3007,10 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
3007
3007
|
parentTaskId: `task_${string}`;
|
|
3008
3008
|
}) | ({
|
|
3009
3009
|
id: `task_${string}`;
|
|
3010
|
+
origin: {
|
|
3011
|
+
signalId?: `sig_${string}` | undefined;
|
|
3012
|
+
operator?: string | undefined;
|
|
3013
|
+
};
|
|
3010
3014
|
schemaVersion: 1;
|
|
3011
3015
|
replyTo: {
|
|
3012
3016
|
channel: string;
|
|
@@ -3020,10 +3024,6 @@ declare const taskGraphSchema: z.ZodObject<{
|
|
|
3020
3024
|
model?: string | undefined;
|
|
3021
3025
|
area?: string | undefined;
|
|
3022
3026
|
approval?: "required" | "granted" | "denied" | undefined;
|
|
3023
|
-
origin: {
|
|
3024
|
-
signalId?: `sig_${string}` | undefined;
|
|
3025
|
-
operator?: string | undefined;
|
|
3026
|
-
};
|
|
3027
3027
|
work: {
|
|
3028
3028
|
title: string;
|
|
3029
3029
|
input: JsonValue;
|
|
@@ -24,9 +24,9 @@ declare const toolCallSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
24
24
|
running: "running";
|
|
25
25
|
failed: "failed";
|
|
26
26
|
cancelled: "cancelled";
|
|
27
|
-
rejected: "rejected";
|
|
28
27
|
"input-streaming": "input-streaming";
|
|
29
28
|
completed: "completed";
|
|
29
|
+
rejected: "rejected";
|
|
30
30
|
}>;
|
|
31
31
|
}, z.core.$strip>>;
|
|
32
32
|
/** Validates a rendered transcript block with payloads correlated to its kind. */
|
|
@@ -81,9 +81,9 @@ declare const transcriptBlockSchema: z.ZodDiscriminatedUnion<[z.ZodReadonly<z.Zo
|
|
|
81
81
|
running: "running";
|
|
82
82
|
failed: "failed";
|
|
83
83
|
cancelled: "cancelled";
|
|
84
|
-
rejected: "rejected";
|
|
85
84
|
"input-streaming": "input-streaming";
|
|
86
85
|
completed: "completed";
|
|
86
|
+
rejected: "rejected";
|
|
87
87
|
}>;
|
|
88
88
|
}, z.core.$strip>>;
|
|
89
89
|
attachments: z.ZodOptional<z.ZodNever>;
|
|
@@ -149,9 +149,9 @@ declare const transcriptSnapshotSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
149
149
|
running: "running";
|
|
150
150
|
failed: "failed";
|
|
151
151
|
cancelled: "cancelled";
|
|
152
|
-
rejected: "rejected";
|
|
153
152
|
"input-streaming": "input-streaming";
|
|
154
153
|
completed: "completed";
|
|
154
|
+
rejected: "rejected";
|
|
155
155
|
}>;
|
|
156
156
|
}, z.core.$strip>>;
|
|
157
157
|
attachments: z.ZodOptional<z.ZodNever>;
|
|
@@ -255,9 +255,9 @@ declare const transcriptPageSchema: z.ZodObject<{
|
|
|
255
255
|
running: "running";
|
|
256
256
|
failed: "failed";
|
|
257
257
|
cancelled: "cancelled";
|
|
258
|
-
rejected: "rejected";
|
|
259
258
|
"input-streaming": "input-streaming";
|
|
260
259
|
completed: "completed";
|
|
260
|
+
rejected: "rejected";
|
|
261
261
|
}>;
|
|
262
262
|
}, z.core.$strip>>;
|
|
263
263
|
attachments: z.ZodOptional<z.ZodNever>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Run repository-defined scripts on events
|
|
2
|
+
|
|
3
|
+
Use repository scripts for small, bounded jobs such as classifying a newly opened issue, commenting
|
|
4
|
+
with the result, and adding a label. Scripts run as workflow-owned Factory Tasks, so admission,
|
|
5
|
+
retries, usage, and completion remain inspectable without starting an agent.
|
|
6
|
+
|
|
7
|
+
In a factory created by `@vercel/factory-cli`, install the included issue-classification preset with
|
|
8
|
+
`factory add script --template issue-classifier`. To define a different policy, create a subfolder
|
|
9
|
+
and register it as shown below.
|
|
10
|
+
|
|
11
|
+
Create a subfolder such as `factory/scripts/issue-classifier/` and export an exact script definition:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { defineRepositoryScript } from "@vercel/factory/repository-scripts";
|
|
15
|
+
|
|
16
|
+
export default defineRepositoryScript({
|
|
17
|
+
id: "issue-classifier",
|
|
18
|
+
version: 1,
|
|
19
|
+
on: ["github.issues.opened"],
|
|
20
|
+
repositories: ["acme/web"],
|
|
21
|
+
permissions: ["ai:classify", "github:issues:comment", "github:issues:label"],
|
|
22
|
+
async run({ event, classify }) {
|
|
23
|
+
const result = await classify({
|
|
24
|
+
instruction: "Classify the issue by its primary intent.",
|
|
25
|
+
subject: `${event.issue.title}\n\n${event.issue.body ?? ""}`,
|
|
26
|
+
choices: ["bug", "question", "feature"],
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
actions: [
|
|
30
|
+
{
|
|
31
|
+
type: "github.issue.comment",
|
|
32
|
+
body: `Classified as **${result.choice}**. ${result.reason}`,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "github.issue.addLabel",
|
|
36
|
+
label: {
|
|
37
|
+
name: result.choice,
|
|
38
|
+
color: "1D76DB",
|
|
39
|
+
description: "Issue classification produced by Factory",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Import the definition in `factory/scripts/index.ts`:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { defineRepositoryScripts } from "@vercel/factory/repository-scripts";
|
|
52
|
+
import issueClassifier from "./issue-classifier/script";
|
|
53
|
+
|
|
54
|
+
export const repositoryScripts = defineRepositoryScripts([issueClassifier]);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The event's repository must still appear in `factory.config.ts`. Permissions are deny-by-default:
|
|
58
|
+
calling `classify` or returning an action without its declared permission fails the Task. A matching
|
|
59
|
+
script handles the Signal instead of sending it to Foreman.
|
|
60
|
+
|
|
61
|
+
When behavior changes, register a new active version and retain the previous definition with
|
|
62
|
+
`active: false` until no stored Task can reference it. Script results are persisted before GitHub
|
|
63
|
+
effects, so a retry reuses the same classification and action plan. Comment actions are reconciled
|
|
64
|
+
by a hidden stable marker, and label additions are idempotent.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/factory",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "Schema, state machines, and kernel primitives for Agent Factory.",
|
|
5
5
|
"homepage": "https://github.com/vercel-labs/agent-factory/tree/main/packages/factory",
|
|
6
6
|
"bugs": "https://github.com/vercel-labs/agent-factory/issues",
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./dist/workflows.d.mts",
|
|
33
33
|
"import": "./dist/workflows.mjs"
|
|
34
34
|
},
|
|
35
|
+
"./repository-scripts": {
|
|
36
|
+
"types": "./dist/repository-scripts.d.mts",
|
|
37
|
+
"import": "./dist/repository-scripts.mjs"
|
|
38
|
+
},
|
|
35
39
|
"./execution": {
|
|
36
40
|
"types": "./dist/execution-public.d.mts",
|
|
37
41
|
"import": "./dist/execution-public.mjs"
|
|
@@ -141,9 +145,9 @@
|
|
|
141
145
|
"diff": "8.0.2"
|
|
142
146
|
},
|
|
143
147
|
"devDependencies": {
|
|
144
|
-
"@ai-sdk/harness": "1.0.
|
|
145
|
-
"@ai-sdk/harness-claude-code": "1.0.
|
|
146
|
-
"@ai-sdk/sandbox-vercel": "1.0.
|
|
148
|
+
"@ai-sdk/harness": "1.0.115",
|
|
149
|
+
"@ai-sdk/harness-claude-code": "1.0.119",
|
|
150
|
+
"@ai-sdk/sandbox-vercel": "1.0.115",
|
|
147
151
|
"@electric-sql/pglite": "^0.5.7",
|
|
148
152
|
"@types/pg": "^8.23.1",
|
|
149
153
|
"@vercel/blob": "^2.8.0",
|