trigger.dev 0.0.0-re2-20250204143529 → 0.0.0-re2-20250312163355

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 (101) hide show
  1. package/README.md +31 -0
  2. package/dist/esm/apiClient.d.ts +32 -340
  3. package/dist/esm/apiClient.js +69 -27
  4. package/dist/esm/apiClient.js.map +1 -1
  5. package/dist/esm/build/buildWorker.d.ts +7 -7
  6. package/dist/esm/build/bundle.js +22 -4
  7. package/dist/esm/build/bundle.js.map +1 -1
  8. package/dist/esm/build/entryPoints.d.ts +2 -0
  9. package/dist/esm/build/entryPoints.js +27 -7
  10. package/dist/esm/build/entryPoints.js.map +1 -1
  11. package/dist/esm/build/packageModules.d.ts +0 -5
  12. package/dist/esm/build/packageModules.js +0 -45
  13. package/dist/esm/build/packageModules.js.map +1 -1
  14. package/dist/esm/cli/common.d.ts +2 -2
  15. package/dist/esm/cli/index.js +2 -0
  16. package/dist/esm/cli/index.js.map +1 -1
  17. package/dist/esm/commands/deploy.js +52 -10
  18. package/dist/esm/commands/deploy.js.map +1 -1
  19. package/dist/esm/commands/dev.d.ts +11 -2
  20. package/dist/esm/commands/dev.js +7 -1
  21. package/dist/esm/commands/dev.js.map +1 -1
  22. package/dist/esm/commands/list-profiles.d.ts +2 -2
  23. package/dist/esm/commands/login.d.ts +2 -2
  24. package/dist/esm/commands/logout.d.ts +2 -2
  25. package/dist/esm/commands/promote.d.ts +3 -0
  26. package/dist/esm/commands/promote.js +75 -0
  27. package/dist/esm/commands/promote.js.map +1 -0
  28. package/dist/esm/commands/switch.d.ts +2 -2
  29. package/dist/esm/commands/trigger.d.ts +4 -4
  30. package/dist/esm/commands/update.d.ts +2 -2
  31. package/dist/esm/commands/whoami.d.ts +2 -2
  32. package/dist/esm/config.js +15 -3
  33. package/dist/esm/config.js.map +1 -1
  34. package/dist/esm/deploy/buildImage.d.ts +3 -1
  35. package/dist/esm/deploy/buildImage.js +10 -5
  36. package/dist/esm/deploy/buildImage.js.map +1 -1
  37. package/dist/esm/dev/backgroundWorker.d.ts +2 -240
  38. package/dist/esm/dev/backgroundWorker.js +8 -304
  39. package/dist/esm/dev/backgroundWorker.js.map +1 -1
  40. package/dist/esm/dev/devOutput.js +11 -2
  41. package/dist/esm/dev/devOutput.js.map +1 -1
  42. package/dist/esm/dev/devSession.js +14 -4
  43. package/dist/esm/dev/devSession.js.map +1 -1
  44. package/dist/esm/dev/devSupervisor.js +266 -40
  45. package/dist/esm/dev/devSupervisor.js.map +1 -1
  46. package/dist/esm/dev/mcpServer.d.ts +10 -0
  47. package/dist/esm/dev/mcpServer.js +201 -0
  48. package/dist/esm/dev/mcpServer.js.map +1 -0
  49. package/dist/esm/dev/workerRuntime.d.ts +0 -1
  50. package/dist/esm/dev/workerRuntime.js +1 -270
  51. package/dist/esm/dev/workerRuntime.js.map +1 -1
  52. package/dist/esm/entryPoints/dev-run-controller.d.ts +19 -9
  53. package/dist/esm/entryPoints/dev-run-controller.js +148 -101
  54. package/dist/esm/entryPoints/dev-run-controller.js.map +1 -1
  55. package/dist/esm/entryPoints/dev-run-worker.js +39 -20
  56. package/dist/esm/entryPoints/dev-run-worker.js.map +1 -1
  57. package/dist/esm/entryPoints/managed-run-controller.js +15 -31
  58. package/dist/esm/entryPoints/managed-run-controller.js.map +1 -1
  59. package/dist/esm/entryPoints/managed-run-worker.js +16 -8
  60. package/dist/esm/entryPoints/managed-run-worker.js.map +1 -1
  61. package/dist/esm/executions/taskRunProcess.d.ts +1 -69
  62. package/dist/esm/executions/taskRunProcess.js +7 -10
  63. package/dist/esm/executions/taskRunProcess.js.map +1 -1
  64. package/dist/esm/indexing/indexWorkerManifest.d.ts +9 -6
  65. package/dist/esm/indexing/registerTasks.js +3 -0
  66. package/dist/esm/indexing/registerTasks.js.map +1 -1
  67. package/dist/esm/utilities/eventBus.d.ts +8 -5
  68. package/dist/esm/utilities/eventBus.js.map +1 -1
  69. package/dist/esm/utilities/githubActions.d.ts +4 -0
  70. package/dist/esm/utilities/githubActions.js +18 -0
  71. package/dist/esm/utilities/githubActions.js.map +1 -0
  72. package/dist/esm/utilities/logger.d.ts +1 -1
  73. package/dist/esm/version.js +1 -1
  74. package/package.json +10 -6
  75. package/dist/esm/dev/backgroundWorkerEngine2.d.ts +0 -21
  76. package/dist/esm/dev/backgroundWorkerEngine2.js +0 -68
  77. package/dist/esm/dev/backgroundWorkerEngine2.js.map +0 -1
  78. package/dist/esm/entryPoints/deploy-index-controller.d.ts +0 -1
  79. package/dist/esm/entryPoints/deploy-index-controller.js +0 -86
  80. package/dist/esm/entryPoints/deploy-index-controller.js.map +0 -1
  81. package/dist/esm/entryPoints/deploy-index-worker.d.ts +0 -1
  82. package/dist/esm/entryPoints/deploy-index-worker.js +0 -142
  83. package/dist/esm/entryPoints/deploy-index-worker.js.map +0 -1
  84. package/dist/esm/entryPoints/deploy-run-controller.d.ts +0 -1
  85. package/dist/esm/entryPoints/deploy-run-controller.js +0 -1102
  86. package/dist/esm/entryPoints/deploy-run-controller.js.map +0 -1
  87. package/dist/esm/entryPoints/deploy-run-worker.d.ts +0 -1
  88. package/dist/esm/entryPoints/deploy-run-worker.js +0 -367
  89. package/dist/esm/entryPoints/deploy-run-worker.js.map +0 -1
  90. package/dist/esm/entryPoints/unmanaged-index-controller.d.ts +0 -1
  91. package/dist/esm/entryPoints/unmanaged-index-controller.js +0 -86
  92. package/dist/esm/entryPoints/unmanaged-index-controller.js.map +0 -1
  93. package/dist/esm/entryPoints/unmanaged-index-worker.d.ts +0 -1
  94. package/dist/esm/entryPoints/unmanaged-index-worker.js +0 -128
  95. package/dist/esm/entryPoints/unmanaged-index-worker.js.map +0 -1
  96. package/dist/esm/entryPoints/unmanaged-run-controller.d.ts +0 -1
  97. package/dist/esm/entryPoints/unmanaged-run-controller.js +0 -147
  98. package/dist/esm/entryPoints/unmanaged-run-controller.js.map +0 -1
  99. package/dist/esm/entryPoints/unmanaged-run-worker.d.ts +0 -1
  100. package/dist/esm/entryPoints/unmanaged-run-worker.js +0 -360
  101. package/dist/esm/entryPoints/unmanaged-run-worker.js.map +0 -1
package/README.md CHANGED
@@ -19,6 +19,37 @@ Trigger.dev is an open source platform that makes it easy to create event-driven
19
19
  | [list-profiles](https://trigger.dev/docs/cli-list-profiles-commands) | List all of your CLI profiles. |
20
20
  | [update](https://trigger.dev/docs/cli-update-commands) | Updates all `@trigger.dev/*` packages to match the CLI version. |
21
21
 
22
+ ## MCP Server
23
+
24
+ The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open protocol that allows you to provide custom tools
25
+ to agentic LLM clients, like [Claude for Desktop](https://docs.anthropic.com/en/docs/claude-for-desktop/overview), [Cursor](https://www.cursor.com/), [Windsurf](https://windsurf.com/), etc...
26
+
27
+ The Trigger.dev CLI can expose an MCP server and enable you interact with Trigger.dev in agentic LLM workflows. For example, you can use
28
+ it to trigger tasks via natural language, view task runs, view logs, debug issues with task runs, etc...
29
+
30
+ ### Starting the Trigger.dev MCP Server
31
+
32
+ To start the Trigger.dev MCP server, simply pass the `--mcp` flag to the `dev` command:
33
+
34
+ ```bash
35
+ trigger dev --mcp
36
+ ```
37
+
38
+ By default it runs on port `3333`. You can change this by passing the `--mcp-port` flag:
39
+
40
+ ```bash
41
+ trigger dev --mcp --mcp-port 3334
42
+ ```
43
+
44
+ ### Configuring your MCP client
45
+
46
+ This depends on what tool you are using. For Cursor, the configuration is in the [.cursor/mcp.json](../../.cursor/mcp.json) file
47
+ and should be good to go as long as you use the default MCP server port.
48
+
49
+ Check out [Cursor's docs](https://docs.cursor.com/context/model-context-protocol) for further details.
50
+
51
+ Tip: try out [Cursor's YOLO mode](https://docs.cursor.com/context/model-context-protocol#yolo-mode) for a seamless experience :D
52
+
22
53
  ## Support
23
54
 
24
55
  If you have any questions, please reach out to us on [Discord](https://trigger.dev/discord) and we'll be happy to help.
@@ -1,6 +1,7 @@
1
+ import { z } from "zod";
1
2
  import { EventSource } from "eventsource";
2
- import { CreateBackgroundWorkerRequestBody, InitializeDeploymentRequestBody, StartDeploymentIndexingRequestBody, ImportEnvironmentVariablesRequestBody, FailDeploymentRequestBody, FinalizeDeploymentRequestBody, WorkersCreateRequestBody, TriggerTaskRequestBody, DevDequeueRequestBody } from "@trigger.dev/core/v3";
3
- import { WorkloadDebugLogRequestBody, WorkloadHeartbeatRequestBody, WorkloadRunAttemptCompleteRequestBody, WorkloadWaitForDurationRequestBody } from "@trigger.dev/core/v3/workers";
3
+ import { CreateBackgroundWorkerRequestBody, InitializeDeploymentRequestBody, StartDeploymentIndexingRequestBody, ImportEnvironmentVariablesRequestBody, TaskRunExecution, FailDeploymentRequestBody, FailDeploymentResponseBody, FinalizeDeploymentRequestBody, WorkersCreateRequestBody, TriggerTaskRequestBody, DevConfigResponseBody, DevDequeueRequestBody, DevDequeueResponseBody } from "@trigger.dev/core/v3";
4
+ import { WorkloadDebugLogRequestBody, WorkloadHeartbeatRequestBody, WorkloadHeartbeatResponseBody, WorkloadRunAttemptCompleteRequestBody, WorkloadRunAttemptCompleteResponseBody, WorkloadRunAttemptStartResponseBody, WorkloadRunLatestSnapshotResponseBody } from "@trigger.dev/core/v3/workers";
4
5
  export declare class CliApiClient {
5
6
  readonly apiURL: string;
6
7
  readonly accessToken?: string | undefined;
@@ -16,108 +17,45 @@ export declare class CliApiClient {
16
17
  } | null;
17
18
  }>>;
18
19
  whoAmI(): Promise<ApiResult<{
20
+ dashboardUrl: string;
19
21
  userId: string;
20
22
  email: string;
21
- dashboardUrl: string;
22
23
  }>>;
23
24
  retrieveExternals(): Promise<ApiResult<{
24
25
  externals: string[];
25
26
  }>>;
26
27
  getProject(projectRef: string): Promise<ApiResult<{
27
- id: string;
28
- externalRef: string;
29
28
  name: string;
30
- slug: string;
29
+ id: string;
31
30
  createdAt: Date;
31
+ slug: string;
32
32
  organization: {
33
33
  id: string;
34
- slug: string;
35
34
  createdAt: Date;
35
+ slug: string;
36
36
  title: string;
37
37
  };
38
+ externalRef: string;
38
39
  }>>;
39
40
  getProjects(): Promise<ApiResult<{
40
- id: string;
41
- externalRef: string;
42
41
  name: string;
43
- slug: string;
42
+ id: string;
44
43
  createdAt: Date;
44
+ slug: string;
45
45
  organization: {
46
46
  id: string;
47
- slug: string;
48
47
  createdAt: Date;
48
+ slug: string;
49
49
  title: string;
50
50
  };
51
+ externalRef: string;
51
52
  }[]>>;
52
53
  createBackgroundWorker(projectRef: string, body: CreateBackgroundWorkerRequestBody): Promise<ApiResult<{
53
54
  id: string;
54
55
  version: string;
55
56
  contentHash: string;
56
57
  }>>;
57
- createTaskRunAttempt(runFriendlyId: string): Promise<ApiResult<{
58
- organization: {
59
- id: string;
60
- name: string;
61
- slug: string;
62
- };
63
- queue: {
64
- id: string;
65
- name: string;
66
- };
67
- task: {
68
- id: string;
69
- filePath: string;
70
- exportName: string;
71
- };
72
- attempt: {
73
- number: number;
74
- status: string;
75
- id: string;
76
- startedAt: Date;
77
- backgroundWorkerId: string;
78
- backgroundWorkerTaskId: string;
79
- };
80
- run: {
81
- id: string;
82
- createdAt: Date;
83
- startedAt: Date;
84
- payload: string;
85
- payloadType: string;
86
- tags: string[];
87
- isTest: boolean;
88
- durationMs: number;
89
- costInCents: number;
90
- baseCostInCents: number;
91
- version?: string | undefined;
92
- maxAttempts?: number | undefined;
93
- maxDuration?: number | undefined;
94
- metadata?: Record<string, import("@trigger.dev/core/schemas").DeserializedJson> | undefined;
95
- idempotencyKey?: string | undefined;
96
- context?: any;
97
- } & {
98
- traceContext?: Record<string, unknown> | undefined;
99
- };
100
- environment: {
101
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
102
- id: string;
103
- slug: string;
104
- };
105
- project: {
106
- id: string;
107
- name: string;
108
- slug: string;
109
- ref: string;
110
- };
111
- machine?: {
112
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
113
- cpu: number;
114
- memory: number;
115
- centsPerMs: number;
116
- } | undefined;
117
- batch?: {
118
- id: string;
119
- } | undefined;
120
- }>>;
58
+ createTaskRunAttempt(runFriendlyId: string): Promise<ApiResult<z.infer<typeof TaskRunExecution>>>;
121
59
  getProjectEnv({ projectRef, env }: {
122
60
  projectRef: string;
123
61
  env: string;
@@ -136,8 +74,8 @@ export declare class CliApiClient {
136
74
  initializeDeployment(body: InitializeDeploymentRequestBody): Promise<ApiResult<{
137
75
  id: string;
138
76
  version: string;
139
- contentHash: string;
140
77
  shortCode: string;
78
+ contentHash: string;
141
79
  imageTag: string;
142
80
  externalBuildData?: {
143
81
  projectId: string;
@@ -154,19 +92,22 @@ export declare class CliApiClient {
154
92
  failDeployment(id: string, body: FailDeploymentRequestBody): Promise<ApiResult<{
155
93
  id: string;
156
94
  }>>;
157
- finalizeDeployment(id: string, body: FinalizeDeploymentRequestBody): Promise<ApiResult<{
95
+ finalizeDeployment(id: string, body: FinalizeDeploymentRequestBody, onLog?: (message: string) => void): Promise<ApiResult<FailDeploymentResponseBody>>;
96
+ promoteDeployment(version: string): Promise<ApiResult<{
158
97
  id: string;
98
+ version: string;
99
+ shortCode: string;
159
100
  }>>;
160
101
  startDeploymentIndexing(deploymentId: string, body: StartDeploymentIndexingRequestBody): Promise<ApiResult<{
161
102
  id: string;
162
103
  contentHash: string;
163
104
  }>>;
164
105
  getDeployment(deploymentId: string): Promise<ApiResult<{
165
- status: "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
106
+ status: "PENDING" | "CANCELED" | "TIMED_OUT" | "FAILED" | "BUILDING" | "DEPLOYING" | "DEPLOYED";
166
107
  id: string;
167
108
  version: string;
168
- contentHash: string;
169
109
  shortCode: string;
110
+ contentHash: string;
170
111
  imageReference?: string | null | undefined;
171
112
  errorData?: {
172
113
  message: string;
@@ -179,9 +120,9 @@ export declare class CliApiClient {
179
120
  version: string;
180
121
  tasks: {
181
122
  id: string;
182
- slug: string;
183
123
  filePath: string;
184
124
  exportName: string;
125
+ slug: string;
185
126
  }[];
186
127
  } | undefined;
187
128
  }>>;
@@ -190,269 +131,21 @@ export declare class CliApiClient {
190
131
  isCached?: boolean | undefined;
191
132
  }>>;
192
133
  get dev(): {
193
- config: () => Promise<ApiResult<{
194
- environmentId: string;
195
- dequeueIntervalWithRun: number;
196
- dequeueIntervalWithoutRun: number;
197
- }>>;
198
- presenceConnection: () => Promise<EventSource>;
199
- dequeue: (body: DevDequeueRequestBody) => Promise<ApiResult<{
200
- dequeuedMessages: {
201
- organization: {
202
- id: string;
203
- };
204
- version: "1";
205
- run: {
206
- id: string;
207
- machine: {
208
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
209
- cpu: number;
210
- memory: number;
211
- centsPerMs: number;
212
- };
213
- isTest: boolean;
214
- traceContext: Record<string, unknown>;
215
- friendlyId: string;
216
- attemptNumber: number;
217
- masterQueue: string;
218
- };
219
- environment: {
220
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
221
- id: string;
222
- };
223
- project: {
224
- id: string;
225
- };
226
- snapshot: {
227
- id: string;
228
- description: string;
229
- friendlyId: string;
230
- executionStatus: import("@trigger.dev/core/v3").TaskRunExecutionStatus;
231
- };
232
- completedWaitpoints: {
233
- type: import("@trigger.dev/core/v3").WaitpointType;
234
- id: string;
235
- friendlyId: string;
236
- completedAt: Date;
237
- outputIsError: boolean;
238
- idempotencyKey?: string | undefined;
239
- output?: string | undefined;
240
- outputType?: string | undefined;
241
- index?: number | undefined;
242
- completedByTaskRun?: {
243
- id: string;
244
- friendlyId: string;
245
- batch?: {
246
- id: string;
247
- friendlyId: string;
248
- } | undefined;
249
- } | undefined;
250
- completedAfter?: Date | undefined;
251
- completedByBatch?: {
252
- id: string;
253
- friendlyId: string;
254
- } | undefined;
255
- }[];
256
- backgroundWorker: {
257
- id: string;
258
- version: string;
259
- friendlyId: string;
260
- };
261
- deployment: {
262
- id?: string | undefined;
263
- friendlyId?: string | undefined;
264
- };
265
- image?: string | undefined;
266
- checkpoint?: {
267
- type: string;
268
- id: string;
269
- location: string;
270
- reason?: string | null | undefined;
271
- } | undefined;
272
- }[];
273
- }>>;
274
- sendDebugLog: (runId: string, body: WorkloadDebugLogRequestBody) => Promise<ApiResult<unknown>>;
275
- getRunExecutionData: (runId: string) => Promise<ApiResult<{
276
- execution: {
277
- version: "1";
278
- run: {
279
- status: import("@trigger.dev/core/v3").TaskRunStatus;
280
- id: string;
281
- friendlyId: string;
282
- attemptNumber?: number | null | undefined;
283
- };
284
- snapshot: {
285
- id: string;
286
- description: string;
287
- friendlyId: string;
288
- executionStatus: import("@trigger.dev/core/v3").TaskRunExecutionStatus;
289
- };
290
- completedWaitpoints: {
291
- type: import("@trigger.dev/core/v3").WaitpointType;
292
- id: string;
293
- friendlyId: string;
294
- completedAt: Date;
295
- outputIsError: boolean;
296
- idempotencyKey?: string | undefined;
297
- output?: string | undefined;
298
- outputType?: string | undefined;
299
- index?: number | undefined;
300
- completedByTaskRun?: {
301
- id: string;
302
- friendlyId: string;
303
- batch?: {
304
- id: string;
305
- friendlyId: string;
306
- } | undefined;
307
- } | undefined;
308
- completedAfter?: Date | undefined;
309
- completedByBatch?: {
310
- id: string;
311
- friendlyId: string;
312
- } | undefined;
313
- }[];
314
- batch?: {
315
- id: string;
316
- friendlyId: string;
317
- } | undefined;
318
- checkpoint?: {
319
- type: import("@trigger.dev/core/v3").CheckpointTypeEnum;
320
- id: string;
321
- friendlyId: string;
322
- location: string;
323
- imageRef: string;
324
- reason?: string | null | undefined;
325
- } | undefined;
326
- };
327
- }>>;
328
- heartbeatRun: (runId: string, snapshotId: string, body: WorkloadHeartbeatRequestBody) => Promise<ApiResult<{
329
- ok: true;
330
- }>>;
331
- startRunAttempt: (runId: string, snapshotId: string) => Promise<ApiResult<{
332
- run: {
333
- status: import("@trigger.dev/core/v3").TaskRunStatus;
334
- id: string;
335
- friendlyId: string;
336
- attemptNumber?: number | null | undefined;
337
- };
338
- snapshot: {
339
- id: string;
340
- description: string;
341
- friendlyId: string;
342
- executionStatus: import("@trigger.dev/core/v3").TaskRunExecutionStatus;
343
- };
344
- } & {
345
- execution: {
346
- organization: {
347
- id: string;
348
- name: string;
349
- slug: string;
350
- };
351
- queue: {
352
- id: string;
353
- name: string;
354
- };
355
- task: {
356
- id: string;
357
- filePath: string;
358
- exportName: string;
359
- };
360
- attempt: {
361
- number: number;
362
- status: string;
363
- id: string;
364
- startedAt: Date;
365
- backgroundWorkerId: string;
366
- backgroundWorkerTaskId: string;
367
- };
368
- run: {
369
- id: string;
370
- createdAt: Date;
371
- startedAt: Date;
372
- payload: string;
373
- payloadType: string;
374
- tags: string[];
375
- isTest: boolean;
376
- durationMs: number;
377
- costInCents: number;
378
- baseCostInCents: number;
379
- version?: string | undefined;
380
- maxAttempts?: number | undefined;
381
- maxDuration?: number | undefined;
382
- metadata?: Record<string, import("@trigger.dev/core/schemas").DeserializedJson> | undefined;
383
- idempotencyKey?: string | undefined;
384
- context?: any;
385
- } & {
386
- traceContext?: Record<string, unknown> | undefined;
387
- };
388
- environment: {
389
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
390
- id: string;
391
- slug: string;
392
- };
393
- project: {
394
- id: string;
395
- name: string;
396
- slug: string;
397
- ref: string;
398
- };
399
- machine?: {
400
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
401
- cpu: number;
402
- memory: number;
403
- centsPerMs: number;
404
- } | undefined;
405
- batch?: {
406
- id: string;
407
- } | undefined;
408
- };
409
- } & {
410
- envVars: Record<string, string>;
411
- }>>;
412
- completeRunAttempt: (runId: string, snapshotId: string, body: WorkloadRunAttemptCompleteRequestBody) => Promise<ApiResult<{
413
- result: {
414
- attemptStatus: "RUN_FINISHED" | "RUN_PENDING_CANCEL" | "RETRY_QUEUED" | "RETRY_IMMEDIATELY";
415
- } & {
416
- run: {
417
- status: import("@trigger.dev/core/v3").TaskRunStatus;
418
- id: string;
419
- friendlyId: string;
420
- attemptNumber?: number | null | undefined;
421
- };
422
- snapshot: {
423
- id: string;
424
- description: string;
425
- friendlyId: string;
426
- executionStatus: import("@trigger.dev/core/v3").TaskRunExecutionStatus;
427
- };
428
- };
429
- }>>;
430
- waitForDuration: (runId: string, snapshotId: string, body: WorkloadWaitForDurationRequestBody) => Promise<ApiResult<{
431
- waitUntil: Date;
432
- waitpoint: {
433
- id: string;
434
- };
435
- } & {
436
- run: {
437
- status: import("@trigger.dev/core/v3").TaskRunStatus;
438
- id: string;
439
- friendlyId: string;
440
- attemptNumber?: number | null | undefined;
441
- };
442
- snapshot: {
443
- id: string;
444
- description: string;
445
- friendlyId: string;
446
- executionStatus: import("@trigger.dev/core/v3").TaskRunExecutionStatus;
447
- };
448
- }>>;
134
+ readonly config: () => Promise<ApiResult<DevConfigResponseBody>>;
135
+ readonly presenceConnection: () => Promise<EventSource>;
136
+ readonly dequeue: (body: DevDequeueRequestBody) => Promise<ApiResult<DevDequeueResponseBody>>;
137
+ readonly sendDebugLog: (runId: string, body: WorkloadDebugLogRequestBody) => Promise<ApiResult<unknown>>;
138
+ readonly getRunExecutionData: (runId: string) => Promise<ApiResult<WorkloadRunLatestSnapshotResponseBody>>;
139
+ readonly heartbeatRun: (runId: string, snapshotId: string, body: WorkloadHeartbeatRequestBody) => Promise<ApiResult<WorkloadHeartbeatResponseBody>>;
140
+ readonly startRunAttempt: (runId: string, snapshotId: string) => Promise<ApiResult<WorkloadRunAttemptStartResponseBody>>;
141
+ readonly completeRunAttempt: (runId: string, snapshotId: string, body: WorkloadRunAttemptCompleteRequestBody) => Promise<ApiResult<WorkloadRunAttemptCompleteResponseBody>>;
449
142
  };
450
143
  get workers(): {
451
144
  list: () => Promise<ApiResult<{
452
145
  type: string;
453
146
  name: string;
454
- isDefault: boolean;
455
147
  updatedAt: Date;
148
+ isDefault: boolean;
456
149
  description?: string | null | undefined;
457
150
  latestVersion?: string | null | undefined;
458
151
  lastHeartbeatAt?: string | null | undefined;
@@ -470,11 +163,11 @@ export declare class CliApiClient {
470
163
  get deployments(): {
471
164
  unmanaged: {
472
165
  latest: () => Promise<ApiResult<{
473
- status: "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
166
+ status: "PENDING" | "CANCELED" | "TIMED_OUT" | "FAILED" | "BUILDING" | "DEPLOYING" | "DEPLOYED";
474
167
  id: string;
475
168
  version: string;
476
- contentHash: string;
477
169
  shortCode: string;
170
+ contentHash: string;
478
171
  imageReference?: string | null | undefined;
479
172
  errorData?: {
480
173
  message: string;
@@ -496,7 +189,6 @@ export declare class CliApiClient {
496
189
  private devHeartbeatRun;
497
190
  private devStartRunAttempt;
498
191
  private devCompleteRunAttempt;
499
- private devWaitForDuration;
500
192
  }
501
193
  type ApiResult<TSuccessResult> = {
502
194
  success: true;