@trigger.dev/core 0.0.0-prerelease-20251113180638 → 0.0.0-prerelease-20251121193208

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 (175) hide show
  1. package/dist/commonjs/v3/apiClient/index.d.ts +27 -8
  2. package/dist/commonjs/v3/apiClient/index.js +48 -4
  3. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  4. package/dist/commonjs/v3/apiClient/runStream.d.ts +28 -14
  5. package/dist/commonjs/v3/apiClient/runStream.js +175 -58
  6. package/dist/commonjs/v3/apiClient/runStream.js.map +1 -1
  7. package/dist/commonjs/v3/apiClientManager/index.d.ts +1 -1
  8. package/dist/commonjs/v3/apiClientManager/index.js +11 -4
  9. package/dist/commonjs/v3/apiClientManager/index.js.map +1 -1
  10. package/dist/commonjs/v3/apiClientManager/types.d.ts +2 -1
  11. package/dist/commonjs/v3/index.d.ts +1 -0
  12. package/dist/commonjs/v3/index.js +1 -0
  13. package/dist/commonjs/v3/index.js.map +1 -1
  14. package/dist/commonjs/v3/lifecycle-hooks-api.d.ts +1 -1
  15. package/dist/commonjs/v3/lifecycleHooks/index.d.ts +5 -1
  16. package/dist/commonjs/v3/lifecycleHooks/index.js +12 -0
  17. package/dist/commonjs/v3/lifecycleHooks/index.js.map +1 -1
  18. package/dist/commonjs/v3/lifecycleHooks/manager.d.ts +11 -1
  19. package/dist/commonjs/v3/lifecycleHooks/manager.js +36 -0
  20. package/dist/commonjs/v3/lifecycleHooks/manager.js.map +1 -1
  21. package/dist/commonjs/v3/lifecycleHooks/types.d.ts +12 -0
  22. package/dist/commonjs/v3/realtime-streams-api.d.ts +3 -0
  23. package/dist/commonjs/v3/realtime-streams-api.js +23 -0
  24. package/dist/commonjs/v3/realtime-streams-api.js.map +1 -0
  25. package/dist/commonjs/v3/realtimeStreams/index.d.ts +10 -0
  26. package/dist/commonjs/v3/realtimeStreams/index.js +31 -0
  27. package/dist/commonjs/v3/realtimeStreams/index.js.map +1 -0
  28. package/dist/commonjs/v3/realtimeStreams/manager.d.ts +14 -0
  29. package/dist/commonjs/v3/realtimeStreams/manager.js +128 -0
  30. package/dist/commonjs/v3/realtimeStreams/manager.js.map +1 -0
  31. package/dist/commonjs/v3/realtimeStreams/noopManager.d.ts +5 -0
  32. package/dist/commonjs/v3/realtimeStreams/noopManager.js +17 -0
  33. package/dist/commonjs/v3/realtimeStreams/noopManager.js.map +1 -0
  34. package/dist/commonjs/v3/realtimeStreams/streamInstance.d.ts +23 -0
  35. package/dist/commonjs/v3/realtimeStreams/streamInstance.js +106 -0
  36. package/dist/commonjs/v3/realtimeStreams/streamInstance.js.map +1 -0
  37. package/dist/commonjs/v3/realtimeStreams/streamsWriterV1.d.ts +49 -0
  38. package/dist/commonjs/v3/realtimeStreams/streamsWriterV1.js +382 -0
  39. package/dist/commonjs/v3/realtimeStreams/streamsWriterV1.js.map +1 -0
  40. package/dist/commonjs/v3/realtimeStreams/streamsWriterV2.d.ts +60 -0
  41. package/dist/commonjs/v3/realtimeStreams/streamsWriterV2.js +179 -0
  42. package/dist/commonjs/v3/realtimeStreams/streamsWriterV2.js.map +1 -0
  43. package/dist/commonjs/v3/realtimeStreams/types.d.ts +119 -0
  44. package/dist/commonjs/v3/realtimeStreams/types.js +3 -0
  45. package/dist/commonjs/v3/realtimeStreams/types.js.map +1 -0
  46. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +1 -0
  47. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +7 -0
  48. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +1 -0
  49. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +7 -0
  50. package/dist/commonjs/v3/runMetadata/manager.d.ts +3 -8
  51. package/dist/commonjs/v3/runMetadata/manager.js +14 -79
  52. package/dist/commonjs/v3/runMetadata/manager.js.map +1 -1
  53. package/dist/commonjs/v3/schemas/api.d.ts +252 -37
  54. package/dist/commonjs/v3/schemas/api.js +72 -8
  55. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  56. package/dist/commonjs/v3/schemas/common.d.ts +5 -0
  57. package/dist/commonjs/v3/schemas/common.js +1 -0
  58. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  59. package/dist/commonjs/v3/schemas/messages.d.ts +35 -0
  60. package/dist/commonjs/v3/schemas/runEngine.d.ts +7 -0
  61. package/dist/commonjs/v3/schemas/schemas.d.ts +7 -0
  62. package/dist/commonjs/v3/semanticInternalAttributes.d.ts +1 -0
  63. package/dist/commonjs/v3/semanticInternalAttributes.js +1 -0
  64. package/dist/commonjs/v3/semanticInternalAttributes.js.map +1 -1
  65. package/dist/commonjs/v3/streams/asyncIterableStream.d.ts +2 -0
  66. package/dist/commonjs/v3/streams/asyncIterableStream.js +47 -0
  67. package/dist/commonjs/v3/streams/asyncIterableStream.js.map +1 -1
  68. package/dist/commonjs/v3/types/tasks.d.ts +17 -2
  69. package/dist/commonjs/v3/types/tasks.js.map +1 -1
  70. package/dist/commonjs/v3/utils/globals.d.ts +2 -0
  71. package/dist/commonjs/v3/utils/globals.js.map +1 -1
  72. package/dist/commonjs/v3/waitUntil/index.d.ts +1 -1
  73. package/dist/commonjs/v3/waitUntil/index.js +3 -3
  74. package/dist/commonjs/v3/waitUntil/index.js.map +1 -1
  75. package/dist/commonjs/v3/waitUntil/manager.d.ts +3 -1
  76. package/dist/commonjs/v3/waitUntil/manager.js +7 -3
  77. package/dist/commonjs/v3/waitUntil/manager.js.map +1 -1
  78. package/dist/commonjs/v3/waitUntil/types.d.ts +2 -2
  79. package/dist/commonjs/v3/workers/index.d.ts +1 -0
  80. package/dist/commonjs/v3/workers/index.js +3 -1
  81. package/dist/commonjs/v3/workers/index.js.map +1 -1
  82. package/dist/commonjs/v3/workers/taskExecutor.js +50 -25
  83. package/dist/commonjs/v3/workers/taskExecutor.js.map +1 -1
  84. package/dist/commonjs/version.js +1 -1
  85. package/dist/esm/v3/apiClient/index.d.ts +27 -8
  86. package/dist/esm/v3/apiClient/index.js +49 -6
  87. package/dist/esm/v3/apiClient/index.js.map +1 -1
  88. package/dist/esm/v3/apiClient/runStream.d.ts +28 -14
  89. package/dist/esm/v3/apiClient/runStream.js +176 -58
  90. package/dist/esm/v3/apiClient/runStream.js.map +1 -1
  91. package/dist/esm/v3/apiClientManager/index.d.ts +1 -1
  92. package/dist/esm/v3/apiClientManager/index.js +11 -4
  93. package/dist/esm/v3/apiClientManager/index.js.map +1 -1
  94. package/dist/esm/v3/apiClientManager/types.d.ts +2 -1
  95. package/dist/esm/v3/index.d.ts +1 -0
  96. package/dist/esm/v3/index.js +1 -0
  97. package/dist/esm/v3/index.js.map +1 -1
  98. package/dist/esm/v3/lifecycle-hooks-api.d.ts +1 -1
  99. package/dist/esm/v3/lifecycleHooks/index.d.ts +5 -1
  100. package/dist/esm/v3/lifecycleHooks/index.js +12 -0
  101. package/dist/esm/v3/lifecycleHooks/index.js.map +1 -1
  102. package/dist/esm/v3/lifecycleHooks/manager.d.ts +11 -1
  103. package/dist/esm/v3/lifecycleHooks/manager.js +36 -0
  104. package/dist/esm/v3/lifecycleHooks/manager.js.map +1 -1
  105. package/dist/esm/v3/lifecycleHooks/types.d.ts +12 -0
  106. package/dist/esm/v3/realtime-streams-api.d.ts +3 -0
  107. package/dist/esm/v3/realtime-streams-api.js +6 -0
  108. package/dist/esm/v3/realtime-streams-api.js.map +1 -0
  109. package/dist/esm/v3/realtimeStreams/index.d.ts +10 -0
  110. package/dist/esm/v3/realtimeStreams/index.js +27 -0
  111. package/dist/esm/v3/realtimeStreams/index.js.map +1 -0
  112. package/dist/esm/v3/realtimeStreams/manager.d.ts +14 -0
  113. package/dist/esm/v3/realtimeStreams/manager.js +124 -0
  114. package/dist/esm/v3/realtimeStreams/manager.js.map +1 -0
  115. package/dist/esm/v3/realtimeStreams/noopManager.d.ts +5 -0
  116. package/dist/esm/v3/realtimeStreams/noopManager.js +13 -0
  117. package/dist/esm/v3/realtimeStreams/noopManager.js.map +1 -0
  118. package/dist/esm/v3/realtimeStreams/streamInstance.d.ts +23 -0
  119. package/dist/esm/v3/realtimeStreams/streamInstance.js +102 -0
  120. package/dist/esm/v3/realtimeStreams/streamInstance.js.map +1 -0
  121. package/dist/esm/v3/realtimeStreams/streamsWriterV1.d.ts +49 -0
  122. package/dist/esm/v3/realtimeStreams/streamsWriterV1.js +378 -0
  123. package/dist/esm/v3/realtimeStreams/streamsWriterV1.js.map +1 -0
  124. package/dist/esm/v3/realtimeStreams/streamsWriterV2.d.ts +60 -0
  125. package/dist/esm/v3/realtimeStreams/streamsWriterV2.js +175 -0
  126. package/dist/esm/v3/realtimeStreams/streamsWriterV2.js.map +1 -0
  127. package/dist/esm/v3/realtimeStreams/types.d.ts +119 -0
  128. package/dist/esm/v3/realtimeStreams/types.js +2 -0
  129. package/dist/esm/v3/realtimeStreams/types.js.map +1 -0
  130. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +1 -0
  131. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +7 -0
  132. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +1 -0
  133. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +7 -0
  134. package/dist/esm/v3/runMetadata/manager.d.ts +3 -8
  135. package/dist/esm/v3/runMetadata/manager.js +14 -79
  136. package/dist/esm/v3/runMetadata/manager.js.map +1 -1
  137. package/dist/esm/v3/schemas/api.d.ts +252 -37
  138. package/dist/esm/v3/schemas/api.js +69 -5
  139. package/dist/esm/v3/schemas/api.js.map +1 -1
  140. package/dist/esm/v3/schemas/common.d.ts +5 -0
  141. package/dist/esm/v3/schemas/common.js +1 -0
  142. package/dist/esm/v3/schemas/common.js.map +1 -1
  143. package/dist/esm/v3/schemas/messages.d.ts +35 -0
  144. package/dist/esm/v3/schemas/runEngine.d.ts +7 -0
  145. package/dist/esm/v3/schemas/schemas.d.ts +7 -0
  146. package/dist/esm/v3/semanticInternalAttributes.d.ts +1 -0
  147. package/dist/esm/v3/semanticInternalAttributes.js +1 -0
  148. package/dist/esm/v3/semanticInternalAttributes.js.map +1 -1
  149. package/dist/esm/v3/streams/asyncIterableStream.d.ts +2 -0
  150. package/dist/esm/v3/streams/asyncIterableStream.js +45 -0
  151. package/dist/esm/v3/streams/asyncIterableStream.js.map +1 -1
  152. package/dist/esm/v3/types/tasks.d.ts +17 -2
  153. package/dist/esm/v3/types/tasks.js.map +1 -1
  154. package/dist/esm/v3/utils/globals.d.ts +2 -0
  155. package/dist/esm/v3/utils/globals.js.map +1 -1
  156. package/dist/esm/v3/waitUntil/index.d.ts +1 -1
  157. package/dist/esm/v3/waitUntil/index.js +3 -3
  158. package/dist/esm/v3/waitUntil/index.js.map +1 -1
  159. package/dist/esm/v3/waitUntil/manager.d.ts +3 -1
  160. package/dist/esm/v3/waitUntil/manager.js +7 -3
  161. package/dist/esm/v3/waitUntil/manager.js.map +1 -1
  162. package/dist/esm/v3/waitUntil/types.d.ts +2 -2
  163. package/dist/esm/v3/workers/index.d.ts +1 -0
  164. package/dist/esm/v3/workers/index.js +1 -0
  165. package/dist/esm/v3/workers/index.js.map +1 -1
  166. package/dist/esm/v3/workers/taskExecutor.js +50 -25
  167. package/dist/esm/v3/workers/taskExecutor.js.map +1 -1
  168. package/dist/esm/version.js +1 -1
  169. package/package.json +2 -1
  170. package/dist/commonjs/v3/runMetadata/metadataStream.d.ts +0 -28
  171. package/dist/commonjs/v3/runMetadata/metadataStream.js +0 -155
  172. package/dist/commonjs/v3/runMetadata/metadataStream.js.map +0 -1
  173. package/dist/esm/v3/runMetadata/metadataStream.d.ts +0 -28
  174. package/dist/esm/v3/runMetadata/metadataStream.js +0 -151
  175. package/dist/esm/v3/runMetadata/metadataStream.js.map +0 -1
@@ -2059,6 +2059,37 @@ export declare const UpsertBranchResponseBody: z.ZodObject<{
2059
2059
  id: string;
2060
2060
  }>;
2061
2061
  export type UpsertBranchResponseBody = z.infer<typeof UpsertBranchResponseBody>;
2062
+ export declare const CreateArtifactRequestBody: z.ZodObject<{
2063
+ type: z.ZodDefault<z.ZodEnum<["deployment_context"]>>;
2064
+ contentType: z.ZodDefault<z.ZodString>;
2065
+ contentLength: z.ZodOptional<z.ZodNumber>;
2066
+ }, "strip", z.ZodTypeAny, {
2067
+ type: "deployment_context";
2068
+ contentType: string;
2069
+ contentLength?: number | undefined;
2070
+ }, {
2071
+ type?: "deployment_context" | undefined;
2072
+ contentType?: string | undefined;
2073
+ contentLength?: number | undefined;
2074
+ }>;
2075
+ export type CreateArtifactRequestBody = z.infer<typeof CreateArtifactRequestBody>;
2076
+ export declare const CreateArtifactResponseBody: z.ZodObject<{
2077
+ artifactKey: z.ZodString;
2078
+ uploadUrl: z.ZodString;
2079
+ uploadFields: z.ZodRecord<z.ZodString, z.ZodString>;
2080
+ expiresAt: z.ZodString;
2081
+ }, "strip", z.ZodTypeAny, {
2082
+ artifactKey: string;
2083
+ uploadUrl: string;
2084
+ uploadFields: Record<string, string>;
2085
+ expiresAt: string;
2086
+ }, {
2087
+ artifactKey: string;
2088
+ uploadUrl: string;
2089
+ uploadFields: Record<string, string>;
2090
+ expiresAt: string;
2091
+ }>;
2092
+ export type CreateArtifactResponseBody = z.infer<typeof CreateArtifactResponseBody>;
2062
2093
  export declare const InitializeDeploymentResponseBody: z.ZodObject<{
2063
2094
  id: z.ZodString;
2064
2095
  contentHash: z.ZodString;
@@ -2079,6 +2110,33 @@ export declare const InitializeDeploymentResponseBody: z.ZodObject<{
2079
2110
  buildId: string;
2080
2111
  buildToken: string;
2081
2112
  }>>>;
2113
+ eventStream: z.ZodOptional<z.ZodObject<{
2114
+ s2: z.ZodObject<{
2115
+ basin: z.ZodString;
2116
+ stream: z.ZodString;
2117
+ accessToken: z.ZodString;
2118
+ }, "strip", z.ZodTypeAny, {
2119
+ basin: string;
2120
+ stream: string;
2121
+ accessToken: string;
2122
+ }, {
2123
+ basin: string;
2124
+ stream: string;
2125
+ accessToken: string;
2126
+ }>;
2127
+ }, "strip", z.ZodTypeAny, {
2128
+ s2: {
2129
+ basin: string;
2130
+ stream: string;
2131
+ accessToken: string;
2132
+ };
2133
+ }, {
2134
+ s2: {
2135
+ basin: string;
2136
+ stream: string;
2137
+ accessToken: string;
2138
+ };
2139
+ }>>;
2082
2140
  }, "strip", z.ZodTypeAny, {
2083
2141
  id: string;
2084
2142
  version: string;
@@ -2091,6 +2149,13 @@ export declare const InitializeDeploymentResponseBody: z.ZodObject<{
2091
2149
  buildId: string;
2092
2150
  buildToken: string;
2093
2151
  } | null | undefined;
2152
+ eventStream?: {
2153
+ s2: {
2154
+ basin: string;
2155
+ stream: string;
2156
+ accessToken: string;
2157
+ };
2158
+ } | undefined;
2094
2159
  }, {
2095
2160
  id: string;
2096
2161
  version: string;
@@ -2103,9 +2168,16 @@ export declare const InitializeDeploymentResponseBody: z.ZodObject<{
2103
2168
  buildId: string;
2104
2169
  buildToken: string;
2105
2170
  } | null | undefined;
2171
+ eventStream?: {
2172
+ s2: {
2173
+ basin: string;
2174
+ stream: string;
2175
+ accessToken: string;
2176
+ };
2177
+ } | undefined;
2106
2178
  }>;
2107
2179
  export type InitializeDeploymentResponseBody = z.infer<typeof InitializeDeploymentResponseBody>;
2108
- export declare const InitializeDeploymentRequestBody: z.ZodObject<{
2180
+ export declare const InitializeDeploymentRequestBody: z.ZodIntersection<z.ZodObject<{
2109
2181
  contentHash: z.ZodString;
2110
2182
  userId: z.ZodOptional<z.ZodString>;
2111
2183
  /** @deprecated This is now determined by the webapp. This is only used to warn users with old CLI versions. */
@@ -2200,7 +2272,35 @@ export declare const InitializeDeploymentRequestBody: z.ZodObject<{
2200
2272
  pullRequestState?: "open" | "closed" | "merged" | undefined;
2201
2273
  } | undefined;
2202
2274
  initialStatus?: "PENDING" | "BUILDING" | undefined;
2203
- }>;
2275
+ }>, z.ZodEffects<z.ZodDiscriminatedUnion<"isNativeBuild", [z.ZodObject<{
2276
+ isNativeBuild: z.ZodLiteral<true>;
2277
+ skipPromotion: z.ZodBoolean;
2278
+ artifactKey: z.ZodString;
2279
+ configFilePath: z.ZodOptional<z.ZodString>;
2280
+ }, "strip", z.ZodTypeAny, {
2281
+ skipPromotion: boolean;
2282
+ artifactKey: string;
2283
+ isNativeBuild: true;
2284
+ configFilePath?: string | undefined;
2285
+ }, {
2286
+ skipPromotion: boolean;
2287
+ artifactKey: string;
2288
+ isNativeBuild: true;
2289
+ configFilePath?: string | undefined;
2290
+ }>, z.ZodObject<{
2291
+ isNativeBuild: z.ZodLiteral<false>;
2292
+ }, "strip", z.ZodTypeAny, {
2293
+ isNativeBuild: false;
2294
+ }, {
2295
+ isNativeBuild: false;
2296
+ }>]>, {
2297
+ skipPromotion: boolean;
2298
+ artifactKey: string;
2299
+ isNativeBuild: true;
2300
+ configFilePath?: string | undefined;
2301
+ } | {
2302
+ isNativeBuild: false;
2303
+ }, unknown>>;
2204
2304
  export type InitializeDeploymentRequestBody = z.infer<typeof InitializeDeploymentRequestBody>;
2205
2305
  export declare const RemoteBuildProviderStatusResponseBody: z.ZodObject<{
2206
2306
  status: z.ZodEnum<["operational", "degraded", "unknown"]>;
@@ -2219,14 +2319,14 @@ export declare const GenerateRegistryCredentialsResponseBody: z.ZodObject<{
2219
2319
  expiresAt: z.ZodString;
2220
2320
  repositoryUri: z.ZodString;
2221
2321
  }, "strip", z.ZodTypeAny, {
2322
+ expiresAt: string;
2222
2323
  username: string;
2223
2324
  password: string;
2224
- expiresAt: string;
2225
2325
  repositoryUri: string;
2226
2326
  }, {
2327
+ expiresAt: string;
2227
2328
  username: string;
2228
2329
  password: string;
2229
- expiresAt: string;
2230
2330
  repositoryUri: string;
2231
2331
  }>;
2232
2332
  export type GenerateRegistryCredentialsResponseBody = z.infer<typeof GenerateRegistryCredentialsResponseBody>;
@@ -2552,6 +2652,108 @@ export declare const GetLatestDeploymentResponseBody: z.ZodObject<Omit<{
2552
2652
  } | null | undefined;
2553
2653
  }>;
2554
2654
  export type GetLatestDeploymentResponseBody = z.infer<typeof GetLatestDeploymentResponseBody>;
2655
+ export declare const DeploymentLogEvent: z.ZodObject<{
2656
+ type: z.ZodLiteral<"log">;
2657
+ data: z.ZodObject<{
2658
+ level: z.ZodDefault<z.ZodOptional<z.ZodEnum<["debug", "info", "warn", "error"]>>>;
2659
+ message: z.ZodString;
2660
+ }, "strip", z.ZodTypeAny, {
2661
+ message: string;
2662
+ level: "error" | "warn" | "info" | "debug";
2663
+ }, {
2664
+ message: string;
2665
+ level?: "error" | "warn" | "info" | "debug" | undefined;
2666
+ }>;
2667
+ }, "strip", z.ZodTypeAny, {
2668
+ type: "log";
2669
+ data: {
2670
+ message: string;
2671
+ level: "error" | "warn" | "info" | "debug";
2672
+ };
2673
+ }, {
2674
+ type: "log";
2675
+ data: {
2676
+ message: string;
2677
+ level?: "error" | "warn" | "info" | "debug" | undefined;
2678
+ };
2679
+ }>;
2680
+ export declare const DeploymentFinalizedEvent: z.ZodObject<{
2681
+ type: z.ZodLiteral<"finalized">;
2682
+ data: z.ZodObject<{
2683
+ result: z.ZodUnion<[z.ZodEnum<["succeeded", "failed", "timed_out", "canceled"]>, z.ZodType<string & {}, z.ZodTypeDef, string & {}>]>;
2684
+ message: z.ZodOptional<z.ZodString>;
2685
+ }, "strip", z.ZodTypeAny, {
2686
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2687
+ message?: string | undefined;
2688
+ }, {
2689
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2690
+ message?: string | undefined;
2691
+ }>;
2692
+ }, "strip", z.ZodTypeAny, {
2693
+ type: "finalized";
2694
+ data: {
2695
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2696
+ message?: string | undefined;
2697
+ };
2698
+ }, {
2699
+ type: "finalized";
2700
+ data: {
2701
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2702
+ message?: string | undefined;
2703
+ };
2704
+ }>;
2705
+ export declare const DeploymentEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2706
+ type: z.ZodLiteral<"log">;
2707
+ data: z.ZodObject<{
2708
+ level: z.ZodDefault<z.ZodOptional<z.ZodEnum<["debug", "info", "warn", "error"]>>>;
2709
+ message: z.ZodString;
2710
+ }, "strip", z.ZodTypeAny, {
2711
+ message: string;
2712
+ level: "error" | "warn" | "info" | "debug";
2713
+ }, {
2714
+ message: string;
2715
+ level?: "error" | "warn" | "info" | "debug" | undefined;
2716
+ }>;
2717
+ }, "strip", z.ZodTypeAny, {
2718
+ type: "log";
2719
+ data: {
2720
+ message: string;
2721
+ level: "error" | "warn" | "info" | "debug";
2722
+ };
2723
+ }, {
2724
+ type: "log";
2725
+ data: {
2726
+ message: string;
2727
+ level?: "error" | "warn" | "info" | "debug" | undefined;
2728
+ };
2729
+ }>, z.ZodObject<{
2730
+ type: z.ZodLiteral<"finalized">;
2731
+ data: z.ZodObject<{
2732
+ result: z.ZodUnion<[z.ZodEnum<["succeeded", "failed", "timed_out", "canceled"]>, z.ZodType<string & {}, z.ZodTypeDef, string & {}>]>;
2733
+ message: z.ZodOptional<z.ZodString>;
2734
+ }, "strip", z.ZodTypeAny, {
2735
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2736
+ message?: string | undefined;
2737
+ }, {
2738
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2739
+ message?: string | undefined;
2740
+ }>;
2741
+ }, "strip", z.ZodTypeAny, {
2742
+ type: "finalized";
2743
+ data: {
2744
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2745
+ message?: string | undefined;
2746
+ };
2747
+ }, {
2748
+ type: "finalized";
2749
+ data: {
2750
+ result: (string & {}) | "succeeded" | "failed" | "timed_out" | "canceled";
2751
+ message?: string | undefined;
2752
+ };
2753
+ }>]>;
2754
+ export type DeploymentEvent = z.infer<typeof DeploymentEvent>;
2755
+ export type DeploymentLogEvent = z.infer<typeof DeploymentLogEvent>;
2756
+ export type DeploymentFinalizedEvent = z.infer<typeof DeploymentFinalizedEvent>;
2555
2757
  export declare const CreateUploadPayloadUrlResponseBody: z.ZodObject<{
2556
2758
  presignedUrl: z.ZodString;
2557
2759
  }, "strip", z.ZodTypeAny, {
@@ -5471,6 +5673,7 @@ export declare const SubscribeRunRawShape: z.ZodObject<{
5471
5673
  message?: string | undefined;
5472
5674
  stackTrace?: string | undefined;
5473
5675
  }>]>>>;
5676
+ realtimeStreams: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
5474
5677
  }, "strip", z.ZodTypeAny, {
5475
5678
  number: number;
5476
5679
  status: string;
@@ -5484,6 +5687,7 @@ export declare const SubscribeRunRawShape: z.ZodObject<{
5484
5687
  friendlyId: string;
5485
5688
  usageDurationMs: number;
5486
5689
  runTags: string[] | null;
5690
+ realtimeStreams: string[] | null;
5487
5691
  payload?: string | null | undefined;
5488
5692
  error?: {
5489
5693
  message: string;
@@ -5557,6 +5761,7 @@ export declare const SubscribeRunRawShape: z.ZodObject<{
5557
5761
  queuedAt?: string | null | undefined;
5558
5762
  usageDurationMs?: number | undefined;
5559
5763
  runTags?: string[] | null | undefined;
5764
+ realtimeStreams?: string[] | null | undefined;
5560
5765
  }>;
5561
5766
  export type SubscribeRunRawShape = z.infer<typeof SubscribeRunRawShape>;
5562
5767
  export declare const BatchStatus: z.ZodEnum<["PENDING", "COMPLETED"]>;
@@ -6057,9 +6262,9 @@ export type ApiBranchListResponseBody = z.infer<typeof ApiBranchListResponseBody
6057
6262
  export declare const RetrieveRunTraceSpanSchema: z.ZodObject<{
6058
6263
  id: z.ZodString;
6059
6264
  parentId: z.ZodOptional<z.ZodString>;
6060
- message: z.ZodString;
6265
+ runId: z.ZodString;
6061
6266
  data: z.ZodObject<{
6062
- runId: z.ZodString;
6267
+ message: z.ZodString;
6063
6268
  taskSlug: z.ZodOptional<z.ZodString>;
6064
6269
  taskPath: z.ZodOptional<z.ZodString>;
6065
6270
  events: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
@@ -6069,21 +6274,19 @@ export declare const RetrieveRunTraceSpanSchema: z.ZodObject<{
6069
6274
  isPartial: z.ZodBoolean;
6070
6275
  isCancelled: z.ZodBoolean;
6071
6276
  level: z.ZodString;
6072
- environmentType: z.ZodString;
6073
6277
  workerVersion: z.ZodOptional<z.ZodString>;
6074
6278
  queueName: z.ZodOptional<z.ZodString>;
6075
6279
  machinePreset: z.ZodOptional<z.ZodString>;
6076
6280
  properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6077
6281
  output: z.ZodOptional<z.ZodUnknown>;
6078
6282
  }, "strip", z.ZodTypeAny, {
6283
+ message: string;
6079
6284
  duration: number;
6080
6285
  isCancelled: boolean;
6081
- runId: string;
6286
+ level: string;
6082
6287
  startTime: Date;
6083
6288
  isError: boolean;
6084
6289
  isPartial: boolean;
6085
- level: string;
6086
- environmentType: string;
6087
6290
  output?: unknown;
6088
6291
  properties?: Record<string, any> | undefined;
6089
6292
  taskSlug?: string | undefined;
@@ -6093,14 +6296,13 @@ export declare const RetrieveRunTraceSpanSchema: z.ZodObject<{
6093
6296
  queueName?: string | undefined;
6094
6297
  machinePreset?: string | undefined;
6095
6298
  }, {
6299
+ message: string;
6096
6300
  duration: number;
6097
6301
  isCancelled: boolean;
6098
- runId: string;
6302
+ level: string;
6099
6303
  startTime: Date;
6100
6304
  isError: boolean;
6101
6305
  isPartial: boolean;
6102
- level: string;
6103
- environmentType: string;
6104
6306
  output?: unknown;
6105
6307
  properties?: Record<string, any> | undefined;
6106
6308
  taskSlug?: string | undefined;
@@ -6111,17 +6313,15 @@ export declare const RetrieveRunTraceSpanSchema: z.ZodObject<{
6111
6313
  machinePreset?: string | undefined;
6112
6314
  }>;
6113
6315
  }, "strip", z.ZodTypeAny, {
6114
- message: string;
6115
6316
  id: string;
6116
6317
  data: {
6318
+ message: string;
6117
6319
  duration: number;
6118
6320
  isCancelled: boolean;
6119
- runId: string;
6321
+ level: string;
6120
6322
  startTime: Date;
6121
6323
  isError: boolean;
6122
6324
  isPartial: boolean;
6123
- level: string;
6124
- environmentType: string;
6125
6325
  output?: unknown;
6126
6326
  properties?: Record<string, any> | undefined;
6127
6327
  taskSlug?: string | undefined;
@@ -6131,19 +6331,18 @@ export declare const RetrieveRunTraceSpanSchema: z.ZodObject<{
6131
6331
  queueName?: string | undefined;
6132
6332
  machinePreset?: string | undefined;
6133
6333
  };
6334
+ runId: string;
6134
6335
  parentId?: string | undefined;
6135
6336
  }, {
6136
- message: string;
6137
6337
  id: string;
6138
6338
  data: {
6339
+ message: string;
6139
6340
  duration: number;
6140
6341
  isCancelled: boolean;
6141
- runId: string;
6342
+ level: string;
6142
6343
  startTime: Date;
6143
6344
  isError: boolean;
6144
6345
  isPartial: boolean;
6145
- level: string;
6146
- environmentType: string;
6147
6346
  output?: unknown;
6148
6347
  properties?: Record<string, any> | undefined;
6149
6348
  taskSlug?: string | undefined;
@@ -6153,6 +6352,7 @@ export declare const RetrieveRunTraceSpanSchema: z.ZodObject<{
6153
6352
  queueName?: string | undefined;
6154
6353
  machinePreset?: string | undefined;
6155
6354
  };
6355
+ runId: string;
6156
6356
  parentId?: string | undefined;
6157
6357
  }>;
6158
6358
  export type RetrieveRunTraceSpan = z.infer<typeof RetrieveRunTraceSpanSchema> & {
@@ -6166,17 +6366,15 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6166
6366
  }, "strip", z.ZodTypeAny, {
6167
6367
  traceId: string;
6168
6368
  rootSpan: {
6169
- message: string;
6170
6369
  id: string;
6171
6370
  data: {
6371
+ message: string;
6172
6372
  duration: number;
6173
6373
  isCancelled: boolean;
6174
- runId: string;
6374
+ level: string;
6175
6375
  startTime: Date;
6176
6376
  isError: boolean;
6177
6377
  isPartial: boolean;
6178
- level: string;
6179
- environmentType: string;
6180
6378
  output?: unknown;
6181
6379
  properties?: Record<string, any> | undefined;
6182
6380
  taskSlug?: string | undefined;
@@ -6186,6 +6384,7 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6186
6384
  queueName?: string | undefined;
6187
6385
  machinePreset?: string | undefined;
6188
6386
  };
6387
+ runId: string;
6189
6388
  parentId?: string | undefined;
6190
6389
  } & {
6191
6390
  children: Array<RetrieveRunTraceSpan>;
@@ -6193,17 +6392,15 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6193
6392
  }, {
6194
6393
  traceId: string;
6195
6394
  rootSpan: {
6196
- message: string;
6197
6395
  id: string;
6198
6396
  data: {
6397
+ message: string;
6199
6398
  duration: number;
6200
6399
  isCancelled: boolean;
6201
- runId: string;
6400
+ level: string;
6202
6401
  startTime: Date;
6203
6402
  isError: boolean;
6204
6403
  isPartial: boolean;
6205
- level: string;
6206
- environmentType: string;
6207
6404
  output?: unknown;
6208
6405
  properties?: Record<string, any> | undefined;
6209
6406
  taskSlug?: string | undefined;
@@ -6213,6 +6410,7 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6213
6410
  queueName?: string | undefined;
6214
6411
  machinePreset?: string | undefined;
6215
6412
  };
6413
+ runId: string;
6216
6414
  parentId?: string | undefined;
6217
6415
  } & {
6218
6416
  children: Array<RetrieveRunTraceSpan>;
@@ -6222,17 +6420,15 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6222
6420
  trace: {
6223
6421
  traceId: string;
6224
6422
  rootSpan: {
6225
- message: string;
6226
6423
  id: string;
6227
6424
  data: {
6425
+ message: string;
6228
6426
  duration: number;
6229
6427
  isCancelled: boolean;
6230
- runId: string;
6428
+ level: string;
6231
6429
  startTime: Date;
6232
6430
  isError: boolean;
6233
6431
  isPartial: boolean;
6234
- level: string;
6235
- environmentType: string;
6236
6432
  output?: unknown;
6237
6433
  properties?: Record<string, any> | undefined;
6238
6434
  taskSlug?: string | undefined;
@@ -6242,6 +6438,7 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6242
6438
  queueName?: string | undefined;
6243
6439
  machinePreset?: string | undefined;
6244
6440
  };
6441
+ runId: string;
6245
6442
  parentId?: string | undefined;
6246
6443
  } & {
6247
6444
  children: Array<RetrieveRunTraceSpan>;
@@ -6251,17 +6448,15 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6251
6448
  trace: {
6252
6449
  traceId: string;
6253
6450
  rootSpan: {
6254
- message: string;
6255
6451
  id: string;
6256
6452
  data: {
6453
+ message: string;
6257
6454
  duration: number;
6258
6455
  isCancelled: boolean;
6259
- runId: string;
6456
+ level: string;
6260
6457
  startTime: Date;
6261
6458
  isError: boolean;
6262
6459
  isPartial: boolean;
6263
- level: string;
6264
- environmentType: string;
6265
6460
  output?: unknown;
6266
6461
  properties?: Record<string, any> | undefined;
6267
6462
  taskSlug?: string | undefined;
@@ -6271,6 +6466,7 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6271
6466
  queueName?: string | undefined;
6272
6467
  machinePreset?: string | undefined;
6273
6468
  };
6469
+ runId: string;
6274
6470
  parentId?: string | undefined;
6275
6471
  } & {
6276
6472
  children: Array<RetrieveRunTraceSpan>;
@@ -6278,3 +6474,22 @@ export declare const RetrieveRunTraceResponseBody: z.ZodObject<{
6278
6474
  };
6279
6475
  }>;
6280
6476
  export type RetrieveRunTraceResponseBody = z.infer<typeof RetrieveRunTraceResponseBody>;
6477
+ export declare const CreateStreamResponseBody: z.ZodObject<{
6478
+ version: z.ZodString;
6479
+ }, "strip", z.ZodTypeAny, {
6480
+ version: string;
6481
+ }, {
6482
+ version: string;
6483
+ }>;
6484
+ export type CreateStreamResponseBody = z.infer<typeof CreateStreamResponseBody>;
6485
+ export declare const AppendToStreamResponseBody: z.ZodObject<{
6486
+ ok: z.ZodBoolean;
6487
+ message: z.ZodOptional<z.ZodString>;
6488
+ }, "strip", z.ZodTypeAny, {
6489
+ ok: boolean;
6490
+ message?: string | undefined;
6491
+ }, {
6492
+ ok: boolean;
6493
+ message?: string | undefined;
6494
+ }>;
6495
+ export type AppendToStreamResponseBody = z.infer<typeof AppendToStreamResponseBody>;
@@ -293,6 +293,17 @@ export const UpsertBranchRequestBody = z.object({
293
293
  export const UpsertBranchResponseBody = z.object({
294
294
  id: z.string(),
295
295
  });
296
+ export const CreateArtifactRequestBody = z.object({
297
+ type: z.enum(["deployment_context"]).default("deployment_context"),
298
+ contentType: z.string().default("application/gzip"),
299
+ contentLength: z.number().optional(),
300
+ });
301
+ export const CreateArtifactResponseBody = z.object({
302
+ artifactKey: z.string(),
303
+ uploadUrl: z.string(),
304
+ uploadFields: z.record(z.string()),
305
+ expiresAt: z.string().datetime(),
306
+ });
296
307
  export const InitializeDeploymentResponseBody = z.object({
297
308
  id: z.string(),
298
309
  contentHash: z.string(),
@@ -301,8 +312,18 @@ export const InitializeDeploymentResponseBody = z.object({
301
312
  imageTag: z.string(),
302
313
  imagePlatform: z.string(),
303
314
  externalBuildData: ExternalBuildData.optional().nullable(),
315
+ eventStream: z
316
+ .object({
317
+ s2: z.object({
318
+ basin: z.string(),
319
+ stream: z.string(),
320
+ accessToken: z.string(),
321
+ }),
322
+ })
323
+ .optional(),
304
324
  });
305
- export const InitializeDeploymentRequestBody = z.object({
325
+ export const InitializeDeploymentRequestBody = z
326
+ .object({
306
327
  contentHash: z.string(),
307
328
  userId: z.string().optional(),
308
329
  /** @deprecated This is now determined by the webapp. This is only used to warn users with old CLI versions. */
@@ -311,7 +332,24 @@ export const InitializeDeploymentRequestBody = z.object({
311
332
  type: z.enum(["MANAGED", "UNMANAGED", "V1"]).optional(),
312
333
  runtime: z.string().optional(),
313
334
  initialStatus: z.enum(["PENDING", "BUILDING"]).optional(),
314
- });
335
+ })
336
+ .and(z.preprocess((val) => {
337
+ const obj = val;
338
+ if (!obj || !obj.isNativeBuild) {
339
+ return { ...obj, isNativeBuild: false };
340
+ }
341
+ return obj;
342
+ }, z.discriminatedUnion("isNativeBuild", [
343
+ z.object({
344
+ isNativeBuild: z.literal(true),
345
+ skipPromotion: z.boolean(),
346
+ artifactKey: z.string(),
347
+ configFilePath: z.string().optional(),
348
+ }),
349
+ z.object({
350
+ isNativeBuild: z.literal(false),
351
+ }),
352
+ ])));
315
353
  export const RemoteBuildProviderStatusResponseBody = z.object({
316
354
  status: z.enum(["operational", "degraded", "unknown"]),
317
355
  message: z.string(),
@@ -374,6 +412,25 @@ export const GetDeploymentResponseBody = z.object({
374
412
  export const GetLatestDeploymentResponseBody = GetDeploymentResponseBody.omit({
375
413
  worker: true,
376
414
  });
415
+ export const DeploymentLogEvent = z.object({
416
+ type: z.literal("log"),
417
+ data: z.object({
418
+ level: z.enum(["debug", "info", "warn", "error"]).optional().default("info"),
419
+ message: z.string(),
420
+ }),
421
+ });
422
+ const anyString = z.custom((v) => typeof v === "string");
423
+ export const DeploymentFinalizedEvent = z.object({
424
+ type: z.literal("finalized"),
425
+ data: z.object({
426
+ result: z.enum(["succeeded", "failed", "timed_out", "canceled"]).or(anyString),
427
+ message: z.string().optional(),
428
+ }),
429
+ });
430
+ export const DeploymentEvent = z.discriminatedUnion("type", [
431
+ DeploymentLogEvent,
432
+ DeploymentFinalizedEvent,
433
+ ]);
377
434
  export const CreateUploadPayloadUrlResponseBody = z.object({
378
435
  presignedUrl: z.string(),
379
436
  });
@@ -728,6 +785,7 @@ export const SubscribeRunRawShape = z.object({
728
785
  outputType: z.string().nullish(),
729
786
  runTags: z.array(z.string()).nullish().default([]),
730
787
  error: TaskRunError.nullish(),
788
+ realtimeStreams: z.array(z.string()).nullish().default([]),
731
789
  });
732
790
  export const BatchStatus = z.enum(["PENDING", "COMPLETED"]);
733
791
  export const RetrieveBatchResponse = z.object({
@@ -935,9 +993,9 @@ export const ApiBranchListResponseBody = z.object({
935
993
  export const RetrieveRunTraceSpanSchema = z.object({
936
994
  id: z.string(),
937
995
  parentId: z.string().optional(),
938
- message: z.string(),
996
+ runId: z.string(),
939
997
  data: z.object({
940
- runId: z.string(),
998
+ message: z.string(),
941
999
  taskSlug: z.string().optional(),
942
1000
  taskPath: z.string().optional(),
943
1001
  events: z.array(z.any()).optional(),
@@ -947,7 +1005,6 @@ export const RetrieveRunTraceSpanSchema = z.object({
947
1005
  isPartial: z.boolean(),
948
1006
  isCancelled: z.boolean(),
949
1007
  level: z.string(),
950
- environmentType: z.string(),
951
1008
  workerVersion: z.string().optional(),
952
1009
  queueName: z.string().optional(),
953
1010
  machinePreset: z.string().optional(),
@@ -964,4 +1021,11 @@ export const RetrieveRunTraceResponseBody = z.object({
964
1021
  rootSpan: RetrieveRunTraceSpan,
965
1022
  }),
966
1023
  });
1024
+ export const CreateStreamResponseBody = z.object({
1025
+ version: z.string(),
1026
+ });
1027
+ export const AppendToStreamResponseBody = z.object({
1028
+ ok: z.boolean(),
1029
+ message: z.string().optional(),
1030
+ });
967
1031
  //# sourceMappingURL=api.js.map