@trigger.dev/core 4.0.0-v4-beta.12 → 4.0.0-v4-beta.14

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 (86) hide show
  1. package/dist/commonjs/v3/apiClient/index.d.ts +3 -2
  2. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  3. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +60 -0
  4. package/dist/commonjs/v3/runEngineWorker/supervisor/http.js +9 -0
  5. package/dist/commonjs/v3/runEngineWorker/supervisor/http.js.map +1 -1
  6. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +434 -3
  7. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.js +16 -7
  8. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.js.map +1 -1
  9. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +59 -0
  10. package/dist/commonjs/v3/runEngineWorker/workload/http.js +8 -0
  11. package/dist/commonjs/v3/runEngineWorker/workload/http.js.map +1 -1
  12. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +410 -3
  13. package/dist/commonjs/v3/runEngineWorker/workload/schemas.js +2 -1
  14. package/dist/commonjs/v3/runEngineWorker/workload/schemas.js.map +1 -1
  15. package/dist/commonjs/v3/runtime/{managedRuntimeManager.d.ts → sharedRuntimeManager.d.ts} +13 -6
  16. package/dist/commonjs/v3/runtime/sharedRuntimeManager.js +276 -0
  17. package/dist/commonjs/v3/runtime/sharedRuntimeManager.js.map +1 -0
  18. package/dist/commonjs/v3/schemas/api.d.ts +22 -0
  19. package/dist/commonjs/v3/schemas/api.js +3 -0
  20. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  21. package/dist/commonjs/v3/schemas/checkpoints.d.ts +9 -4
  22. package/dist/commonjs/v3/schemas/messages.d.ts +228 -3814
  23. package/dist/commonjs/v3/schemas/messages.js +9 -54
  24. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  25. package/dist/commonjs/v3/schemas/runEngine.d.ts +30 -0
  26. package/dist/commonjs/v3/schemas/runEngine.js +1 -0
  27. package/dist/commonjs/v3/schemas/runEngine.js.map +1 -1
  28. package/dist/commonjs/v3/schemas/schemas.d.ts +0 -23
  29. package/dist/commonjs/v3/schemas/schemas.js +1 -12
  30. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  31. package/dist/commonjs/v3/serverOnly/httpServer.d.ts +1 -0
  32. package/dist/commonjs/v3/serverOnly/httpServer.js +12 -2
  33. package/dist/commonjs/v3/serverOnly/httpServer.js.map +1 -1
  34. package/dist/commonjs/v3/utils/interval.d.ts +3 -1
  35. package/dist/commonjs/v3/utils/interval.js +5 -1
  36. package/dist/commonjs/v3/utils/interval.js.map +1 -1
  37. package/dist/commonjs/v3/workers/index.d.ts +1 -1
  38. package/dist/commonjs/v3/workers/index.js +3 -3
  39. package/dist/commonjs/v3/workers/index.js.map +1 -1
  40. package/dist/commonjs/version.js +1 -1
  41. package/dist/esm/v3/apiClient/index.d.ts +3 -2
  42. package/dist/esm/v3/apiClient/index.js +1 -1
  43. package/dist/esm/v3/apiClient/index.js.map +1 -1
  44. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +60 -0
  45. package/dist/esm/v3/runEngineWorker/supervisor/http.js +10 -1
  46. package/dist/esm/v3/runEngineWorker/supervisor/http.js.map +1 -1
  47. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +434 -3
  48. package/dist/esm/v3/runEngineWorker/supervisor/schemas.js +15 -6
  49. package/dist/esm/v3/runEngineWorker/supervisor/schemas.js.map +1 -1
  50. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +59 -0
  51. package/dist/esm/v3/runEngineWorker/workload/http.js +9 -1
  52. package/dist/esm/v3/runEngineWorker/workload/http.js.map +1 -1
  53. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +410 -3
  54. package/dist/esm/v3/runEngineWorker/workload/schemas.js +2 -1
  55. package/dist/esm/v3/runEngineWorker/workload/schemas.js.map +1 -1
  56. package/dist/esm/v3/runtime/{managedRuntimeManager.d.ts → sharedRuntimeManager.d.ts} +13 -6
  57. package/dist/esm/v3/runtime/sharedRuntimeManager.js +272 -0
  58. package/dist/esm/v3/runtime/sharedRuntimeManager.js.map +1 -0
  59. package/dist/esm/v3/schemas/api.d.ts +22 -0
  60. package/dist/esm/v3/schemas/api.js +3 -0
  61. package/dist/esm/v3/schemas/api.js.map +1 -1
  62. package/dist/esm/v3/schemas/checkpoints.d.ts +9 -4
  63. package/dist/esm/v3/schemas/messages.d.ts +228 -3814
  64. package/dist/esm/v3/schemas/messages.js +10 -55
  65. package/dist/esm/v3/schemas/messages.js.map +1 -1
  66. package/dist/esm/v3/schemas/runEngine.d.ts +30 -0
  67. package/dist/esm/v3/schemas/runEngine.js +1 -0
  68. package/dist/esm/v3/schemas/runEngine.js.map +1 -1
  69. package/dist/esm/v3/schemas/schemas.d.ts +0 -23
  70. package/dist/esm/v3/schemas/schemas.js +0 -11
  71. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  72. package/dist/esm/v3/serverOnly/httpServer.d.ts +1 -0
  73. package/dist/esm/v3/serverOnly/httpServer.js +12 -2
  74. package/dist/esm/v3/serverOnly/httpServer.js.map +1 -1
  75. package/dist/esm/v3/utils/interval.d.ts +3 -1
  76. package/dist/esm/v3/utils/interval.js +5 -1
  77. package/dist/esm/v3/utils/interval.js.map +1 -1
  78. package/dist/esm/v3/workers/index.d.ts +1 -1
  79. package/dist/esm/v3/workers/index.js +1 -1
  80. package/dist/esm/v3/workers/index.js.map +1 -1
  81. package/dist/esm/version.js +1 -1
  82. package/package.json +1 -1
  83. package/dist/commonjs/v3/runtime/managedRuntimeManager.js +0 -189
  84. package/dist/commonjs/v3/runtime/managedRuntimeManager.js.map +0 -1
  85. package/dist/esm/v3/runtime/managedRuntimeManager.js +0 -185
  86. package/dist/esm/v3/runtime/managedRuntimeManager.js.map +0 -1
@@ -41,13 +41,16 @@ export declare const WorkloadContinueRunExecutionResponseBody: z.ZodObject<{
41
41
  friendlyId: z.ZodString;
42
42
  executionStatus: z.ZodEnum<[import("../../index.js").TaskRunExecutionStatus]>;
43
43
  description: z.ZodString;
44
+ createdAt: z.ZodDate;
44
45
  }, "strip", z.ZodTypeAny, {
45
46
  id: string;
47
+ createdAt: Date;
46
48
  description: string;
47
49
  friendlyId: string;
48
50
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
49
51
  }, {
50
52
  id: string;
53
+ createdAt: Date;
51
54
  description: string;
52
55
  friendlyId: string;
53
56
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -77,6 +80,7 @@ export declare const WorkloadContinueRunExecutionResponseBody: z.ZodObject<{
77
80
  };
78
81
  snapshot: {
79
82
  id: string;
83
+ createdAt: Date;
80
84
  description: string;
81
85
  friendlyId: string;
82
86
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -90,6 +94,7 @@ export declare const WorkloadContinueRunExecutionResponseBody: z.ZodObject<{
90
94
  };
91
95
  snapshot: {
92
96
  id: string;
97
+ createdAt: Date;
93
98
  description: string;
94
99
  friendlyId: string;
95
100
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1628,13 +1633,16 @@ export declare const WorkloadRunAttemptCompleteResponseBody: z.ZodObject<{
1628
1633
  friendlyId: z.ZodString;
1629
1634
  executionStatus: z.ZodEnum<[import("../../index.js").TaskRunExecutionStatus]>;
1630
1635
  description: z.ZodString;
1636
+ createdAt: z.ZodDate;
1631
1637
  }, "strip", z.ZodTypeAny, {
1632
1638
  id: string;
1639
+ createdAt: Date;
1633
1640
  description: string;
1634
1641
  friendlyId: string;
1635
1642
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
1636
1643
  }, {
1637
1644
  id: string;
1645
+ createdAt: Date;
1638
1646
  description: string;
1639
1647
  friendlyId: string;
1640
1648
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1664,6 +1672,7 @@ export declare const WorkloadRunAttemptCompleteResponseBody: z.ZodObject<{
1664
1672
  };
1665
1673
  snapshot: {
1666
1674
  id: string;
1675
+ createdAt: Date;
1667
1676
  description: string;
1668
1677
  friendlyId: string;
1669
1678
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1677,6 +1686,7 @@ export declare const WorkloadRunAttemptCompleteResponseBody: z.ZodObject<{
1677
1686
  };
1678
1687
  snapshot: {
1679
1688
  id: string;
1689
+ createdAt: Date;
1680
1690
  description: string;
1681
1691
  friendlyId: string;
1682
1692
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1694,6 +1704,7 @@ export declare const WorkloadRunAttemptCompleteResponseBody: z.ZodObject<{
1694
1704
  };
1695
1705
  snapshot: {
1696
1706
  id: string;
1707
+ createdAt: Date;
1697
1708
  description: string;
1698
1709
  friendlyId: string;
1699
1710
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1711,6 +1722,7 @@ export declare const WorkloadRunAttemptCompleteResponseBody: z.ZodObject<{
1711
1722
  };
1712
1723
  snapshot: {
1713
1724
  id: string;
1725
+ createdAt: Date;
1714
1726
  description: string;
1715
1727
  friendlyId: string;
1716
1728
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1732,13 +1744,16 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
1732
1744
  friendlyId: z.ZodString;
1733
1745
  executionStatus: z.ZodEnum<[import("../../index.js").TaskRunExecutionStatus]>;
1734
1746
  description: z.ZodString;
1747
+ createdAt: z.ZodDate;
1735
1748
  }, "strip", z.ZodTypeAny, {
1736
1749
  id: string;
1750
+ createdAt: Date;
1737
1751
  description: string;
1738
1752
  friendlyId: string;
1739
1753
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
1740
1754
  }, {
1741
1755
  id: string;
1756
+ createdAt: Date;
1742
1757
  description: string;
1743
1758
  friendlyId: string;
1744
1759
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1768,6 +1783,7 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
1768
1783
  };
1769
1784
  snapshot: {
1770
1785
  id: string;
1786
+ createdAt: Date;
1771
1787
  description: string;
1772
1788
  friendlyId: string;
1773
1789
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -1781,6 +1797,7 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
1781
1797
  };
1782
1798
  snapshot: {
1783
1799
  id: string;
1800
+ createdAt: Date;
1784
1801
  description: string;
1785
1802
  friendlyId: string;
1786
1803
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2235,13 +2252,16 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2235
2252
  friendlyId: z.ZodString;
2236
2253
  executionStatus: z.ZodEnum<[import("../../index.js").TaskRunExecutionStatus]>;
2237
2254
  description: z.ZodString;
2255
+ createdAt: z.ZodDate;
2238
2256
  }, "strip", z.ZodTypeAny, {
2239
2257
  id: string;
2258
+ createdAt: Date;
2240
2259
  description: string;
2241
2260
  friendlyId: string;
2242
2261
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
2243
2262
  }, {
2244
2263
  id: string;
2264
+ createdAt: Date;
2245
2265
  description: string;
2246
2266
  friendlyId: string;
2247
2267
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2401,6 +2421,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2401
2421
  };
2402
2422
  snapshot: {
2403
2423
  id: string;
2424
+ createdAt: Date;
2404
2425
  description: string;
2405
2426
  friendlyId: string;
2406
2427
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2451,6 +2472,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2451
2472
  };
2452
2473
  snapshot: {
2453
2474
  id: string;
2475
+ createdAt: Date;
2454
2476
  description: string;
2455
2477
  friendlyId: string;
2456
2478
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2503,6 +2525,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2503
2525
  };
2504
2526
  snapshot: {
2505
2527
  id: string;
2528
+ createdAt: Date;
2506
2529
  description: string;
2507
2530
  friendlyId: string;
2508
2531
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2555,6 +2578,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2555
2578
  };
2556
2579
  snapshot: {
2557
2580
  id: string;
2581
+ createdAt: Date;
2558
2582
  description: string;
2559
2583
  friendlyId: string;
2560
2584
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2601,15 +2625,15 @@ export type WorkloadRunLatestSnapshotResponseBody = z.infer<typeof WorkloadRunLa
2601
2625
  export declare const WorkloadDebugLogRequestBody: z.ZodObject<{
2602
2626
  time: z.ZodDate;
2603
2627
  message: z.ZodString;
2604
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodNullable<z.ZodString>, "many">, z.ZodArray<z.ZodNullable<z.ZodNumber>, "many">, z.ZodArray<z.ZodNullable<z.ZodBoolean>, "many">]>>>>;
2628
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodOptional<z.ZodNullable<z.ZodString>>, "many">, z.ZodArray<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, "many">, z.ZodArray<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, "many">]>>>>;
2605
2629
  }, "strip", z.ZodTypeAny, {
2606
2630
  message: string;
2607
2631
  time: Date;
2608
- properties?: Record<string, string | number | boolean | (string | null)[] | (number | null)[] | (boolean | null)[] | undefined> | undefined;
2632
+ properties?: Record<string, string | number | boolean | (string | null | undefined)[] | (number | null | undefined)[] | (boolean | null | undefined)[] | undefined> | undefined;
2609
2633
  }, {
2610
2634
  message: string;
2611
2635
  time: Date;
2612
- properties?: Record<string, string | number | boolean | (string | null)[] | (number | null)[] | (boolean | null)[] | undefined> | undefined;
2636
+ properties?: Record<string, string | number | boolean | (string | null | undefined)[] | (number | null | undefined)[] | (boolean | null | undefined)[] | undefined> | undefined;
2613
2637
  }>;
2614
2638
  export type WorkloadDebugLogRequestBody = z.infer<typeof WorkloadDebugLogRequestBody>;
2615
2639
  export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObject<{
@@ -2619,13 +2643,16 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
2619
2643
  friendlyId: z.ZodString;
2620
2644
  executionStatus: z.ZodEnum<[import("../../index.js").TaskRunExecutionStatus]>;
2621
2645
  description: z.ZodString;
2646
+ createdAt: z.ZodDate;
2622
2647
  }, "strip", z.ZodTypeAny, {
2623
2648
  id: string;
2649
+ createdAt: Date;
2624
2650
  description: string;
2625
2651
  friendlyId: string;
2626
2652
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
2627
2653
  }, {
2628
2654
  id: string;
2655
+ createdAt: Date;
2629
2656
  description: string;
2630
2657
  friendlyId: string;
2631
2658
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2872,6 +2899,7 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
2872
2899
  };
2873
2900
  snapshot: {
2874
2901
  id: string;
2902
+ createdAt: Date;
2875
2903
  description: string;
2876
2904
  friendlyId: string;
2877
2905
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2946,6 +2974,7 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
2946
2974
  };
2947
2975
  snapshot: {
2948
2976
  id: string;
2977
+ createdAt: Date;
2949
2978
  description: string;
2950
2979
  friendlyId: string;
2951
2980
  executionStatus: import("../../index.js").TaskRunExecutionStatus;
@@ -2994,3 +3023,381 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
2994
3023
  image?: string | undefined;
2995
3024
  }>, "many">;
2996
3025
  export type WorkloadDequeueFromVersionResponseBody = z.infer<typeof WorkloadDequeueFromVersionResponseBody>;
3026
+ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3027
+ snapshots: z.ZodArray<z.ZodObject<{
3028
+ version: z.ZodLiteral<"1">;
3029
+ snapshot: z.ZodObject<{
3030
+ id: z.ZodString;
3031
+ friendlyId: z.ZodString;
3032
+ executionStatus: z.ZodEnum<[import("../../index.js").TaskRunExecutionStatus]>;
3033
+ description: z.ZodString;
3034
+ createdAt: z.ZodDate;
3035
+ }, "strip", z.ZodTypeAny, {
3036
+ id: string;
3037
+ createdAt: Date;
3038
+ description: string;
3039
+ friendlyId: string;
3040
+ executionStatus: import("../../index.js").TaskRunExecutionStatus;
3041
+ }, {
3042
+ id: string;
3043
+ createdAt: Date;
3044
+ description: string;
3045
+ friendlyId: string;
3046
+ executionStatus: import("../../index.js").TaskRunExecutionStatus;
3047
+ }>;
3048
+ run: z.ZodObject<{
3049
+ id: z.ZodString;
3050
+ friendlyId: z.ZodString;
3051
+ status: z.ZodEnum<[import("../../index.js").TaskRunStatus]>;
3052
+ attemptNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3053
+ }, "strip", z.ZodTypeAny, {
3054
+ status: import("../../index.js").TaskRunStatus;
3055
+ id: string;
3056
+ friendlyId: string;
3057
+ attemptNumber?: number | null | undefined;
3058
+ }, {
3059
+ status: import("../../index.js").TaskRunStatus;
3060
+ id: string;
3061
+ friendlyId: string;
3062
+ attemptNumber?: number | null | undefined;
3063
+ }>;
3064
+ batch: z.ZodOptional<z.ZodObject<{
3065
+ id: z.ZodString;
3066
+ friendlyId: z.ZodString;
3067
+ }, "strip", z.ZodTypeAny, {
3068
+ id: string;
3069
+ friendlyId: string;
3070
+ }, {
3071
+ id: string;
3072
+ friendlyId: string;
3073
+ }>>;
3074
+ checkpoint: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
3075
+ type: z.ZodEnum<[import("../../index.js").CheckpointTypeEnum]>;
3076
+ location: z.ZodString;
3077
+ imageRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3078
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3079
+ }, {
3080
+ id: z.ZodString;
3081
+ friendlyId: z.ZodString;
3082
+ }>, "strip", z.ZodTypeAny, {
3083
+ type: import("../../index.js").CheckpointTypeEnum;
3084
+ id: string;
3085
+ friendlyId: string;
3086
+ location: string;
3087
+ imageRef?: string | null | undefined;
3088
+ reason?: string | null | undefined;
3089
+ }, {
3090
+ type: import("../../index.js").CheckpointTypeEnum;
3091
+ id: string;
3092
+ friendlyId: string;
3093
+ location: string;
3094
+ imageRef?: string | null | undefined;
3095
+ reason?: string | null | undefined;
3096
+ }>>;
3097
+ completedWaitpoints: z.ZodArray<z.ZodObject<{
3098
+ id: z.ZodString;
3099
+ index: z.ZodOptional<z.ZodNumber>;
3100
+ friendlyId: z.ZodString;
3101
+ type: z.ZodEnum<[import("../../index.js").WaitpointType]>;
3102
+ completedAt: z.ZodDate;
3103
+ idempotencyKey: z.ZodOptional<z.ZodString>;
3104
+ completedByTaskRun: z.ZodOptional<z.ZodObject<{
3105
+ id: z.ZodString;
3106
+ friendlyId: z.ZodString;
3107
+ batch: z.ZodOptional<z.ZodObject<{
3108
+ id: z.ZodString;
3109
+ friendlyId: z.ZodString;
3110
+ }, "strip", z.ZodTypeAny, {
3111
+ id: string;
3112
+ friendlyId: string;
3113
+ }, {
3114
+ id: string;
3115
+ friendlyId: string;
3116
+ }>>;
3117
+ }, "strip", z.ZodTypeAny, {
3118
+ id: string;
3119
+ friendlyId: string;
3120
+ batch?: {
3121
+ id: string;
3122
+ friendlyId: string;
3123
+ } | undefined;
3124
+ }, {
3125
+ id: string;
3126
+ friendlyId: string;
3127
+ batch?: {
3128
+ id: string;
3129
+ friendlyId: string;
3130
+ } | undefined;
3131
+ }>>;
3132
+ completedAfter: z.ZodOptional<z.ZodDate>;
3133
+ completedByBatch: z.ZodOptional<z.ZodObject<{
3134
+ id: z.ZodString;
3135
+ friendlyId: z.ZodString;
3136
+ }, "strip", z.ZodTypeAny, {
3137
+ id: string;
3138
+ friendlyId: string;
3139
+ }, {
3140
+ id: string;
3141
+ friendlyId: string;
3142
+ }>>;
3143
+ output: z.ZodOptional<z.ZodString>;
3144
+ outputType: z.ZodOptional<z.ZodString>;
3145
+ outputIsError: z.ZodBoolean;
3146
+ }, "strip", z.ZodTypeAny, {
3147
+ type: import("../../index.js").WaitpointType;
3148
+ id: string;
3149
+ completedAt: Date;
3150
+ friendlyId: string;
3151
+ outputIsError: boolean;
3152
+ idempotencyKey?: string | undefined;
3153
+ output?: string | undefined;
3154
+ outputType?: string | undefined;
3155
+ index?: number | undefined;
3156
+ completedByTaskRun?: {
3157
+ id: string;
3158
+ friendlyId: string;
3159
+ batch?: {
3160
+ id: string;
3161
+ friendlyId: string;
3162
+ } | undefined;
3163
+ } | undefined;
3164
+ completedAfter?: Date | undefined;
3165
+ completedByBatch?: {
3166
+ id: string;
3167
+ friendlyId: string;
3168
+ } | undefined;
3169
+ }, {
3170
+ type: import("../../index.js").WaitpointType;
3171
+ id: string;
3172
+ completedAt: Date;
3173
+ friendlyId: string;
3174
+ outputIsError: boolean;
3175
+ idempotencyKey?: string | undefined;
3176
+ output?: string | undefined;
3177
+ outputType?: string | undefined;
3178
+ index?: number | undefined;
3179
+ completedByTaskRun?: {
3180
+ id: string;
3181
+ friendlyId: string;
3182
+ batch?: {
3183
+ id: string;
3184
+ friendlyId: string;
3185
+ } | undefined;
3186
+ } | undefined;
3187
+ completedAfter?: Date | undefined;
3188
+ completedByBatch?: {
3189
+ id: string;
3190
+ friendlyId: string;
3191
+ } | undefined;
3192
+ }>, "many">;
3193
+ }, "strip", z.ZodTypeAny, {
3194
+ version: "1";
3195
+ run: {
3196
+ status: import("../../index.js").TaskRunStatus;
3197
+ id: string;
3198
+ friendlyId: string;
3199
+ attemptNumber?: number | null | undefined;
3200
+ };
3201
+ snapshot: {
3202
+ id: string;
3203
+ createdAt: Date;
3204
+ description: string;
3205
+ friendlyId: string;
3206
+ executionStatus: import("../../index.js").TaskRunExecutionStatus;
3207
+ };
3208
+ completedWaitpoints: {
3209
+ type: import("../../index.js").WaitpointType;
3210
+ id: string;
3211
+ completedAt: Date;
3212
+ friendlyId: string;
3213
+ outputIsError: boolean;
3214
+ idempotencyKey?: string | undefined;
3215
+ output?: string | undefined;
3216
+ outputType?: string | undefined;
3217
+ index?: number | undefined;
3218
+ completedByTaskRun?: {
3219
+ id: string;
3220
+ friendlyId: string;
3221
+ batch?: {
3222
+ id: string;
3223
+ friendlyId: string;
3224
+ } | undefined;
3225
+ } | undefined;
3226
+ completedAfter?: Date | undefined;
3227
+ completedByBatch?: {
3228
+ id: string;
3229
+ friendlyId: string;
3230
+ } | undefined;
3231
+ }[];
3232
+ batch?: {
3233
+ id: string;
3234
+ friendlyId: string;
3235
+ } | undefined;
3236
+ checkpoint?: {
3237
+ type: import("../../index.js").CheckpointTypeEnum;
3238
+ id: string;
3239
+ friendlyId: string;
3240
+ location: string;
3241
+ imageRef?: string | null | undefined;
3242
+ reason?: string | null | undefined;
3243
+ } | undefined;
3244
+ }, {
3245
+ version: "1";
3246
+ run: {
3247
+ status: import("../../index.js").TaskRunStatus;
3248
+ id: string;
3249
+ friendlyId: string;
3250
+ attemptNumber?: number | null | undefined;
3251
+ };
3252
+ snapshot: {
3253
+ id: string;
3254
+ createdAt: Date;
3255
+ description: string;
3256
+ friendlyId: string;
3257
+ executionStatus: import("../../index.js").TaskRunExecutionStatus;
3258
+ };
3259
+ completedWaitpoints: {
3260
+ type: import("../../index.js").WaitpointType;
3261
+ id: string;
3262
+ completedAt: Date;
3263
+ friendlyId: string;
3264
+ outputIsError: boolean;
3265
+ idempotencyKey?: string | undefined;
3266
+ output?: string | undefined;
3267
+ outputType?: string | undefined;
3268
+ index?: number | undefined;
3269
+ completedByTaskRun?: {
3270
+ id: string;
3271
+ friendlyId: string;
3272
+ batch?: {
3273
+ id: string;
3274
+ friendlyId: string;
3275
+ } | undefined;
3276
+ } | undefined;
3277
+ completedAfter?: Date | undefined;
3278
+ completedByBatch?: {
3279
+ id: string;
3280
+ friendlyId: string;
3281
+ } | undefined;
3282
+ }[];
3283
+ batch?: {
3284
+ id: string;
3285
+ friendlyId: string;
3286
+ } | undefined;
3287
+ checkpoint?: {
3288
+ type: import("../../index.js").CheckpointTypeEnum;
3289
+ id: string;
3290
+ friendlyId: string;
3291
+ location: string;
3292
+ imageRef?: string | null | undefined;
3293
+ reason?: string | null | undefined;
3294
+ } | undefined;
3295
+ }>, "many">;
3296
+ }, "strip", z.ZodTypeAny, {
3297
+ snapshots: {
3298
+ version: "1";
3299
+ run: {
3300
+ status: import("../../index.js").TaskRunStatus;
3301
+ id: string;
3302
+ friendlyId: string;
3303
+ attemptNumber?: number | null | undefined;
3304
+ };
3305
+ snapshot: {
3306
+ id: string;
3307
+ createdAt: Date;
3308
+ description: string;
3309
+ friendlyId: string;
3310
+ executionStatus: import("../../index.js").TaskRunExecutionStatus;
3311
+ };
3312
+ completedWaitpoints: {
3313
+ type: import("../../index.js").WaitpointType;
3314
+ id: string;
3315
+ completedAt: Date;
3316
+ friendlyId: string;
3317
+ outputIsError: boolean;
3318
+ idempotencyKey?: string | undefined;
3319
+ output?: string | undefined;
3320
+ outputType?: string | undefined;
3321
+ index?: number | undefined;
3322
+ completedByTaskRun?: {
3323
+ id: string;
3324
+ friendlyId: string;
3325
+ batch?: {
3326
+ id: string;
3327
+ friendlyId: string;
3328
+ } | undefined;
3329
+ } | undefined;
3330
+ completedAfter?: Date | undefined;
3331
+ completedByBatch?: {
3332
+ id: string;
3333
+ friendlyId: string;
3334
+ } | undefined;
3335
+ }[];
3336
+ batch?: {
3337
+ id: string;
3338
+ friendlyId: string;
3339
+ } | undefined;
3340
+ checkpoint?: {
3341
+ type: import("../../index.js").CheckpointTypeEnum;
3342
+ id: string;
3343
+ friendlyId: string;
3344
+ location: string;
3345
+ imageRef?: string | null | undefined;
3346
+ reason?: string | null | undefined;
3347
+ } | undefined;
3348
+ }[];
3349
+ }, {
3350
+ snapshots: {
3351
+ version: "1";
3352
+ run: {
3353
+ status: import("../../index.js").TaskRunStatus;
3354
+ id: string;
3355
+ friendlyId: string;
3356
+ attemptNumber?: number | null | undefined;
3357
+ };
3358
+ snapshot: {
3359
+ id: string;
3360
+ createdAt: Date;
3361
+ description: string;
3362
+ friendlyId: string;
3363
+ executionStatus: import("../../index.js").TaskRunExecutionStatus;
3364
+ };
3365
+ completedWaitpoints: {
3366
+ type: import("../../index.js").WaitpointType;
3367
+ id: string;
3368
+ completedAt: Date;
3369
+ friendlyId: string;
3370
+ outputIsError: boolean;
3371
+ idempotencyKey?: string | undefined;
3372
+ output?: string | undefined;
3373
+ outputType?: string | undefined;
3374
+ index?: number | undefined;
3375
+ completedByTaskRun?: {
3376
+ id: string;
3377
+ friendlyId: string;
3378
+ batch?: {
3379
+ id: string;
3380
+ friendlyId: string;
3381
+ } | undefined;
3382
+ } | undefined;
3383
+ completedAfter?: Date | undefined;
3384
+ completedByBatch?: {
3385
+ id: string;
3386
+ friendlyId: string;
3387
+ } | undefined;
3388
+ }[];
3389
+ batch?: {
3390
+ id: string;
3391
+ friendlyId: string;
3392
+ } | undefined;
3393
+ checkpoint?: {
3394
+ type: import("../../index.js").CheckpointTypeEnum;
3395
+ id: string;
3396
+ friendlyId: string;
3397
+ location: string;
3398
+ imageRef?: string | null | undefined;
3399
+ reason?: string | null | undefined;
3400
+ } | undefined;
3401
+ }[];
3402
+ }>;
3403
+ export type WorkloadRunSnapshotsSinceResponseBody = z.infer<typeof WorkloadRunSnapshotsSinceResponseBody>;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { WorkerApiRunHeartbeatRequestBody, WorkerApiHeartbeatResponseBody, WorkerApiRunAttemptCompleteRequestBody, WorkerApiRunAttemptCompleteResponseBody, WorkerApiRunAttemptStartRequestBody, WorkerApiRunAttemptStartResponseBody, WorkerApiRunLatestSnapshotResponseBody, WorkerApiDequeueFromVersionResponseBody, WorkerApiContinueRunExecutionRequestBody, WorkerApiDebugLogBody, } from "../supervisor/schemas.js";
2
+ import { WorkerApiRunHeartbeatRequestBody, WorkerApiHeartbeatResponseBody, WorkerApiRunAttemptCompleteRequestBody, WorkerApiRunAttemptCompleteResponseBody, WorkerApiRunAttemptStartRequestBody, WorkerApiRunAttemptStartResponseBody, WorkerApiRunLatestSnapshotResponseBody, WorkerApiDequeueFromVersionResponseBody, WorkerApiContinueRunExecutionRequestBody, WorkerApiDebugLogBody, WorkerApiRunSnapshotsSinceResponseBody, } from "../supervisor/schemas.js";
3
3
  export const WorkloadHeartbeatRequestBody = WorkerApiRunHeartbeatRequestBody;
4
4
  export const WorkloadHeartbeatResponseBody = WorkerApiHeartbeatResponseBody;
5
5
  export const WorkloadSuspendRunResponseBody = z.discriminatedUnion("ok", [
@@ -19,4 +19,5 @@ export const WorkloadRunAttemptStartResponseBody = WorkerApiRunAttemptStartRespo
19
19
  export const WorkloadRunLatestSnapshotResponseBody = WorkerApiRunLatestSnapshotResponseBody;
20
20
  export const WorkloadDebugLogRequestBody = WorkerApiDebugLogBody;
21
21
  export const WorkloadDequeueFromVersionResponseBody = WorkerApiDequeueFromVersionResponseBody;
22
+ export const WorkloadRunSnapshotsSinceResponseBody = WorkerApiRunSnapshotsSinceResponseBody;
22
23
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/v3/runEngineWorker/workload/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,sCAAsC,EACtC,uCAAuC,EACvC,mCAAmC,EACnC,oCAAoC,EACpC,sCAAsC,EACtC,uCAAuC,EACvC,wCAAwC,EACxC,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,4BAA4B,GAAG,gCAAgC,CAAC;AAG7E,MAAM,CAAC,MAAM,6BAA6B,GAAG,8BAA8B,CAAC;AAG5E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE;IACvE,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;KACpB,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KAClB,CAAC;CACH,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wCAAwC,GAAG,wCAAwC,CAAC;AAKjG,MAAM,CAAC,MAAM,qCAAqC,GAAG,sCAAsC,CAAC;AAK5F,MAAM,CAAC,MAAM,sCAAsC,GAAG,uCAAuC,CAAC;AAK9F,MAAM,CAAC,MAAM,kCAAkC,GAAG,mCAAmC,CAAC;AAGtF,MAAM,CAAC,MAAM,mCAAmC,GAAG,oCAAoC,CAAC;AAKxF,MAAM,CAAC,MAAM,qCAAqC,GAAG,sCAAsC,CAAC;AAK5F,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AAGjE,MAAM,CAAC,MAAM,sCAAsC,GAAG,uCAAuC,CAAC"}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../src/v3/runEngineWorker/workload/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,sCAAsC,EACtC,uCAAuC,EACvC,mCAAmC,EACnC,oCAAoC,EACpC,sCAAsC,EACtC,uCAAuC,EACvC,wCAAwC,EACxC,qBAAqB,EACrB,sCAAsC,GACvC,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,4BAA4B,GAAG,gCAAgC,CAAC;AAG7E,MAAM,CAAC,MAAM,6BAA6B,GAAG,8BAA8B,CAAC;AAG5E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE;IACvE,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;KACpB,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KAClB,CAAC;CACH,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wCAAwC,GAAG,wCAAwC,CAAC;AAKjG,MAAM,CAAC,MAAM,qCAAqC,GAAG,sCAAsC,CAAC;AAK5F,MAAM,CAAC,MAAM,sCAAsC,GAAG,uCAAuC,CAAC;AAK9F,MAAM,CAAC,MAAM,kCAAkC,GAAG,mCAAmC,CAAC;AAGtF,MAAM,CAAC,MAAM,mCAAmC,GAAG,oCAAoC,CAAC;AAKxF,MAAM,CAAC,MAAM,qCAAqC,GAAG,sCAAsC,CAAC;AAK5F,MAAM,CAAC,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AAGjE,MAAM,CAAC,MAAM,sCAAsC,GAAG,uCAAuC,CAAC;AAK9F,MAAM,CAAC,MAAM,qCAAqC,GAAG,sCAAsC,CAAC"}
@@ -1,11 +1,13 @@
1
1
  import { BatchTaskRunExecutionResult, CompletedWaitpoint, TaskRunContext, TaskRunExecutionResult, WaitpointTokenResult } from "../schemas/index.js";
2
2
  import { ExecutorToWorkerProcessConnection } from "../zodIpc.js";
3
3
  import { RuntimeManager } from "./manager.js";
4
- export declare class ManagedRuntimeManager implements RuntimeManager {
4
+ export declare class SharedRuntimeManager implements RuntimeManager {
5
5
  private ipc;
6
6
  private showLogs;
7
- private readonly resolversByWaitId;
8
- private readonly resolversByWaitpoint;
7
+ /** Maps a resolver ID to a resolver function */
8
+ private readonly resolversById;
9
+ /** Stores waitpoints that arrive before their resolvers have been created */
10
+ private readonly waitpointsByResolverId;
9
11
  private _preventMultipleWaits;
10
12
  constructor(ipc: ExecutorToWorkerProcessConnection, showLogs: boolean);
11
13
  disable(): void;
@@ -22,10 +24,15 @@ export declare class ManagedRuntimeManager implements RuntimeManager {
22
24
  waitpointFriendlyId: string;
23
25
  finishDate?: Date;
24
26
  }): Promise<WaitpointTokenResult>;
25
- associateWaitWithWaitpoint(waitId: string, waitpointId: string): void;
26
- completeWaitpoints(waitpoints: CompletedWaitpoint[]): Promise<void>;
27
- private completeWaitpoint;
27
+ resolveWaitpoints(waitpoints: CompletedWaitpoint[]): Promise<void>;
28
+ private resolverIdFromWaitpoint;
29
+ private resolveWaitpoint;
30
+ private resolvePendingWaitpoints;
31
+ private setSuspendable;
32
+ private suspendable;
28
33
  private waitpointToTaskRunExecutionResult;
34
+ private waitpointForDebugLog;
35
+ private debugLog;
29
36
  private log;
30
37
  private get status();
31
38
  }