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

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 +39 -354
  3. package/dist/esm/apiClient.js +69 -64
  4. package/dist/esm/apiClient.js.map +1 -1
  5. package/dist/esm/build/buildWorker.d.ts +10 -10
  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 +223 -175
  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 +12 -9
  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,8 @@
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 { ApiResult } from "@trigger.dev/core/v3/zodfetch";
5
+ import { WorkloadDebugLogRequestBody, WorkloadHeartbeatRequestBody, WorkloadHeartbeatResponseBody, WorkloadRunAttemptCompleteRequestBody, WorkloadRunAttemptCompleteResponseBody, WorkloadRunAttemptStartResponseBody, WorkloadRunLatestSnapshotResponseBody } from "@trigger.dev/core/v3/workers";
4
6
  export declare class CliApiClient {
5
7
  readonly apiURL: string;
6
8
  readonly accessToken?: string | undefined;
@@ -24,100 +26,37 @@ export declare class CliApiClient {
24
26
  externals: string[];
25
27
  }>>;
26
28
  getProject(projectRef: string): Promise<ApiResult<{
27
- id: string;
28
- externalRef: string;
29
29
  name: string;
30
- slug: string;
31
- createdAt: Date;
30
+ id: string;
32
31
  organization: {
33
32
  id: string;
34
- slug: string;
35
33
  createdAt: Date;
34
+ slug: string;
36
35
  title: string;
37
36
  };
37
+ createdAt: Date;
38
+ slug: string;
39
+ externalRef: string;
38
40
  }>>;
39
41
  getProjects(): Promise<ApiResult<{
40
- id: string;
41
- externalRef: string;
42
42
  name: string;
43
- slug: string;
44
- createdAt: Date;
43
+ id: string;
45
44
  organization: {
46
45
  id: string;
47
- slug: string;
48
46
  createdAt: Date;
47
+ slug: string;
49
48
  title: string;
50
49
  };
50
+ createdAt: Date;
51
+ slug: string;
52
+ externalRef: string;
51
53
  }[]>>;
52
54
  createBackgroundWorker(projectRef: string, body: CreateBackgroundWorkerRequestBody): Promise<ApiResult<{
53
- id: string;
54
55
  version: string;
56
+ id: string;
55
57
  contentHash: string;
56
58
  }>>;
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
- }>>;
59
+ createTaskRunAttempt(runFriendlyId: string): Promise<ApiResult<z.infer<typeof TaskRunExecution>>>;
121
60
  getProjectEnv({ projectRef, env }: {
122
61
  projectRef: string;
123
62
  env: string;
@@ -134,8 +73,8 @@ export declare class CliApiClient {
134
73
  success: boolean;
135
74
  }>>;
136
75
  initializeDeployment(body: InitializeDeploymentRequestBody): Promise<ApiResult<{
137
- id: string;
138
76
  version: string;
77
+ id: string;
139
78
  contentHash: string;
140
79
  shortCode: string;
141
80
  imageTag: string;
@@ -147,24 +86,27 @@ export declare class CliApiClient {
147
86
  registryHost?: string | undefined;
148
87
  }>>;
149
88
  createDeploymentBackgroundWorker(deploymentId: string, body: CreateBackgroundWorkerRequestBody): Promise<ApiResult<{
150
- id: string;
151
89
  version: string;
90
+ id: string;
152
91
  contentHash: string;
153
92
  }>>;
154
93
  failDeployment(id: string, body: FailDeploymentRequestBody): Promise<ApiResult<{
155
94
  id: string;
156
95
  }>>;
157
- finalizeDeployment(id: string, body: FinalizeDeploymentRequestBody): Promise<ApiResult<{
96
+ finalizeDeployment(id: string, body: FinalizeDeploymentRequestBody, onLog?: (message: string) => void): Promise<ApiResult<FailDeploymentResponseBody>>;
97
+ promoteDeployment(version: string): Promise<ApiResult<{
98
+ version: string;
158
99
  id: string;
100
+ shortCode: string;
159
101
  }>>;
160
102
  startDeploymentIndexing(deploymentId: string, body: StartDeploymentIndexingRequestBody): Promise<ApiResult<{
161
103
  id: string;
162
104
  contentHash: string;
163
105
  }>>;
164
106
  getDeployment(deploymentId: string): Promise<ApiResult<{
165
- status: "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
166
- id: string;
107
+ status: "PENDING" | "CANCELED" | "TIMED_OUT" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED";
167
108
  version: string;
109
+ id: string;
168
110
  contentHash: string;
169
111
  shortCode: string;
170
112
  imageReference?: string | null | undefined;
@@ -175,13 +117,13 @@ export declare class CliApiClient {
175
117
  stderr?: string | undefined;
176
118
  } | null | undefined;
177
119
  worker?: {
178
- id: string;
179
120
  version: string;
121
+ id: string;
180
122
  tasks: {
181
123
  id: string;
182
- slug: string;
183
124
  filePath: string;
184
125
  exportName: string;
126
+ slug: string;
185
127
  }[];
186
128
  } | undefined;
187
129
  }>>;
@@ -190,262 +132,14 @@ export declare class CliApiClient {
190
132
  isCached?: boolean | undefined;
191
133
  }>>;
192
134
  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
- }>>;
135
+ readonly config: () => Promise<ApiResult<DevConfigResponseBody>>;
136
+ readonly presenceConnection: () => Promise<EventSource>;
137
+ readonly dequeue: (body: DevDequeueRequestBody) => Promise<ApiResult<DevDequeueResponseBody>>;
138
+ readonly sendDebugLog: (runId: string, body: WorkloadDebugLogRequestBody) => Promise<ApiResult<unknown>>;
139
+ readonly getRunExecutionData: (runId: string) => Promise<ApiResult<WorkloadRunLatestSnapshotResponseBody>>;
140
+ readonly heartbeatRun: (runId: string, snapshotId: string, body: WorkloadHeartbeatRequestBody) => Promise<ApiResult<WorkloadHeartbeatResponseBody>>;
141
+ readonly startRunAttempt: (runId: string, snapshotId: string) => Promise<ApiResult<WorkloadRunAttemptStartResponseBody>>;
142
+ readonly completeRunAttempt: (runId: string, snapshotId: string, body: WorkloadRunAttemptCompleteRequestBody) => Promise<ApiResult<WorkloadRunAttemptCompleteResponseBody>>;
449
143
  };
450
144
  get workers(): {
451
145
  list: () => Promise<ApiResult<{
@@ -458,21 +152,21 @@ export declare class CliApiClient {
458
152
  lastHeartbeatAt?: string | null | undefined;
459
153
  }[]>>;
460
154
  create: (options: WorkersCreateRequestBody) => Promise<ApiResult<{
461
- token: {
462
- plaintext: string;
463
- };
464
155
  workerGroup: {
465
156
  name: string;
466
157
  description?: string | null | undefined;
467
158
  };
159
+ token: {
160
+ plaintext: string;
161
+ };
468
162
  }>>;
469
163
  };
470
164
  get deployments(): {
471
165
  unmanaged: {
472
166
  latest: () => Promise<ApiResult<{
473
- status: "PENDING" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "CANCELED" | "TIMED_OUT";
474
- id: string;
167
+ status: "PENDING" | "CANCELED" | "TIMED_OUT" | "BUILDING" | "DEPLOYING" | "DEPLOYED" | "FAILED";
475
168
  version: string;
169
+ id: string;
476
170
  contentHash: string;
477
171
  shortCode: string;
478
172
  imageReference?: string | null | undefined;
@@ -496,13 +190,4 @@ export declare class CliApiClient {
496
190
  private devHeartbeatRun;
497
191
  private devStartRunAttempt;
498
192
  private devCompleteRunAttempt;
499
- private devWaitForDuration;
500
193
  }
501
- type ApiResult<TSuccessResult> = {
502
- success: true;
503
- data: TSuccessResult;
504
- } | {
505
- success: false;
506
- error: string;
507
- };
508
- export {};