@eigenpal/sdk 0.4.10 → 0.4.12

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.
@@ -4,6 +4,33 @@ export type ClientOptions = {
4
4
  baseUrl: 'https://app.eigenpal.com' | (string & {});
5
5
  };
6
6
 
7
+ export type PatchAgentBody = {
8
+ name?: string;
9
+ description?: string;
10
+ config?: {
11
+ [key: string]: unknown;
12
+ };
13
+ };
14
+
15
+ export type RunAgentBody = {
16
+ input?: {
17
+ [key: string]: unknown;
18
+ };
19
+ _metadata?: {
20
+ [key: string]: unknown;
21
+ };
22
+ [key: string]: unknown;
23
+ };
24
+
25
+ export type CreateAgentBody = {
26
+ name: string;
27
+ slug: string;
28
+ description?: string;
29
+ config?: {
30
+ [key: string]: unknown;
31
+ };
32
+ };
33
+
7
34
  export type RunWorkflowBody = {
8
35
  /**
9
36
  * Workflow inputs keyed by input name
@@ -27,16 +54,26 @@ export type RunWorkflowBody = {
27
54
  trigger?: 'api' | 'cli';
28
55
  };
29
56
 
30
- export type CancelExecutionResponse = {
31
- executionId: string;
32
- /**
33
- * Outcome. `cancelled` (transitioned), `cancellation-requested` (worker will observe), or `already-terminal` (no-op).
34
- */
35
- status: 'cancelled' | 'cancellation-requested' | 'already-terminal';
36
- /**
37
- * Status at the moment of the cancel request
38
- */
39
- wasStatus: ExecutionStatus;
57
+ export type ListAgentExecutionsResponse = {
58
+ executions: Array<AgentExecutionSummary>;
59
+ total: number;
60
+ limit: number;
61
+ offset: number;
62
+ };
63
+
64
+ export type AgentExecutionSummary = {
65
+ id: string;
66
+ status: ExecutionStatus;
67
+ model?: string | null;
68
+ output?: unknown | null;
69
+ schemaValid?: boolean | null;
70
+ error?: string | null;
71
+ exampleId?: string | null;
72
+ batchId?: string | null;
73
+ createdAt: string;
74
+ startedAt?: string | null;
75
+ completedAt?: string | null;
76
+ [key: string]: unknown;
40
77
  };
41
78
 
42
79
  export type ExecutionStatus =
@@ -85,38 +122,94 @@ export type ApiErrorIssue = {
85
122
  severity: 'error' | 'warning';
86
123
  };
87
124
 
88
- export type ExecutionStatusResponse = {
125
+ export type GetAgentResponse = {
126
+ agent: AgentSummary;
127
+ };
128
+
129
+ export type AgentSummary = {
130
+ id: string;
131
+ slug: string;
132
+ name: string;
133
+ description?: string | null;
134
+ config?: {
135
+ [key: string]: unknown;
136
+ };
137
+ createdAt: string;
138
+ updatedAt?: string;
139
+ stats?: {
140
+ exampleCount?: number;
141
+ totalExecutions?: number;
142
+ lastExecutionAt?: string | null;
143
+ avgDurationMs?: number | null;
144
+ avgCredits?: number | null;
145
+ [key: string]: unknown;
146
+ };
147
+ [key: string]: unknown;
148
+ };
149
+
150
+ export type PatchAgentResponse = {
151
+ agent: AgentSummary;
152
+ };
153
+
154
+ export type RunAgentResponse = {
89
155
  executionId: string;
156
+ status?: ExecutionStatus | 'timeout';
157
+ output?: unknown;
158
+ schemaValid?: boolean | null;
159
+ error?: string | null;
160
+ cost?: {
161
+ [key: string]: unknown;
162
+ };
163
+ };
164
+
165
+ export type CancelAgentExecutionResponse = {
166
+ execution: AgentExecutionSummary;
167
+ };
168
+
169
+ export type AgentExecutionResponse = {
170
+ execution: AgentExecutionSummary;
171
+ };
172
+
173
+ export type ListAgentsResponse = {
174
+ data: Array<AgentSummary>;
175
+ total: number;
176
+ limit: number;
177
+ offset: number;
178
+ };
179
+
180
+ export type CreateAgentResponse = {
181
+ agent: AgentSummary;
182
+ };
183
+
184
+ export type ListWorkflowExecutionsResponse = {
185
+ data: Array<ExecutionSummary>;
186
+ total: number;
187
+ limit: number;
188
+ offset: number;
189
+ };
190
+
191
+ export type ExecutionSummary = {
192
+ id: string;
193
+ workflowId: string;
90
194
  status: ExecutionStatus;
91
195
  /**
92
- * ISO-8601 creation timestamp
196
+ * "api" | "scheduled" | "manual" | …
93
197
  */
94
- createdAt: string;
198
+ triggerType?: string | null;
95
199
  /**
96
- * ISO-8601 completion timestamp; only set in terminal states
200
+ * Original input map. Useful for replay.
97
201
  */
98
- completedAt?: string | null;
202
+ triggerInput?: unknown | null;
99
203
  /**
100
- * Workflow output (status=completed)
204
+ * Workflow output (status=completed).
101
205
  */
102
206
  result?: unknown | null;
103
207
  /**
104
- * Error message (status=failed)
208
+ * Error message (status=failed).
105
209
  */
106
210
  error?: string | null;
107
- };
108
-
109
- export type ExecutionSummary = {
110
- id: string;
111
- tenantId: string;
112
- workflowId: string;
113
- versionId?: string | null;
114
- status: ExecutionStatus;
115
- triggerType?: string;
116
- triggerInput?: unknown | null;
117
- result?: unknown | null;
118
- error?: string | null;
119
211
  createdAt: string;
212
+ startedAt?: string | null;
120
213
  completedAt?: string | null;
121
214
  /**
122
215
  * Owning workflow (null when the workflow has been deleted)
@@ -125,32 +218,23 @@ export type ExecutionSummary = {
125
218
  id: string;
126
219
  name: string;
127
220
  } | null;
128
- [key: string]: unknown;
129
- };
130
-
131
- export type ListExecutionsResponse = {
132
- data: Array<ExecutionSummary>;
133
- total: number;
134
- limit: number;
135
- offset: number;
136
221
  };
137
222
 
138
223
  export type WorkflowSummary = {
224
+ /**
225
+ * Workflow id (e.g. wf_abc123).
226
+ */
139
227
  id: string;
140
- tenantId: string;
141
- isBlock?: boolean;
228
+ /**
229
+ * Human-readable workflow name from the YAML (e.g. "extract-invoice"). Null when no version is published yet.
230
+ */
231
+ name?: string | null;
232
+ /**
233
+ * Current release tag (e.g. "1.2.4"). Null until a version is published.
234
+ */
235
+ version?: string | null;
142
236
  createdAt: string;
143
237
  updatedAt?: string;
144
- currentVersion?: {
145
- id?: string;
146
- version?: string | null;
147
- yamlContent?: string;
148
- definition?: unknown;
149
- message?: string | null;
150
- createdAt?: string;
151
- [key: string]: unknown;
152
- } | null;
153
- [key: string]: unknown;
154
238
  };
155
239
 
156
240
  export type RunWorkflowResponse = {
@@ -180,15 +264,57 @@ export type ListVersionsResponse = {
180
264
  };
181
265
 
182
266
  export type WorkflowVersion = {
267
+ /**
268
+ * Version id (e.g. wfh_xyz). Stable for SDK pinning.
269
+ */
183
270
  id: string;
184
271
  workflowId: string;
272
+ /**
273
+ * Release tag for this version.
274
+ */
185
275
  version?: string | null;
276
+ /**
277
+ * Workflow YAML at this version.
278
+ */
186
279
  yamlContent?: string;
187
- definition?: unknown;
188
- message?: string | null;
280
+ /**
281
+ * True when this is the workflow’s currently published version.
282
+ */
283
+ isCurrent?: boolean;
189
284
  createdAt?: string;
190
- isCurrentVersion?: boolean;
191
- [key: string]: unknown;
285
+ };
286
+
287
+ export type CancelWorkflowExecutionResponse = {
288
+ executionId: string;
289
+ /**
290
+ * Outcome. `cancelled` (transitioned), `cancellation-requested` (worker will observe), or `already-terminal` (no-op).
291
+ */
292
+ status: 'cancelled' | 'cancellation-requested' | 'already-terminal';
293
+ /**
294
+ * Status at the moment of the cancel request
295
+ */
296
+ wasStatus: ExecutionStatus;
297
+ };
298
+
299
+ export type WorkflowExecutionStatusResponse = {
300
+ executionId: string;
301
+ status: ExecutionStatus;
302
+ /**
303
+ * ISO-8601 creation timestamp
304
+ */
305
+ createdAt: string;
306
+ /**
307
+ * ISO-8601 completion timestamp; only set in terminal states
308
+ */
309
+ completedAt?: string | null;
310
+ /**
311
+ * Workflow output (status=completed)
312
+ */
313
+ result?: unknown | null;
314
+ /**
315
+ * Error message (status=failed)
316
+ */
317
+ error?: string | null;
192
318
  };
193
319
 
194
320
  export type ListWorkflowsResponse = {
@@ -198,19 +324,242 @@ export type ListWorkflowsResponse = {
198
324
  offset: number;
199
325
  };
200
326
 
201
- export type ExecutionsCancelData = {
327
+ export type AgentsExecutionsListData = {
202
328
  body?: never;
203
329
  path: {
204
330
  /**
205
- * Execution id to cancel
331
+ * Agent id or slug
332
+ */
333
+ agentId: string;
334
+ };
335
+ query?: {
336
+ /**
337
+ * Execution status filter
338
+ */
339
+ status?: string;
340
+ /**
341
+ * Experiment batch id filter
342
+ */
343
+ batchId?: string;
344
+ limit?: number;
345
+ offset?: number;
346
+ };
347
+ url: '/api/v1/agents/{agentId}/executions';
348
+ };
349
+
350
+ export type AgentsExecutionsListErrors = {
351
+ /**
352
+ * Validation error. Request shape did not match the spec.
353
+ */
354
+ 400: ApiErrorEnvelope;
355
+ /**
356
+ * Missing or invalid API key
357
+ */
358
+ 401: ApiErrorEnvelope;
359
+ /**
360
+ * API key lacks required scope
361
+ */
362
+ 403: ApiErrorEnvelope;
363
+ /**
364
+ * Resource not found
365
+ */
366
+ 404: ApiErrorEnvelope;
367
+ /**
368
+ * Rate limit exceeded
369
+ */
370
+ 429: ApiErrorEnvelope;
371
+ /**
372
+ * Internal server error
373
+ */
374
+ 500: ApiErrorEnvelope;
375
+ };
376
+
377
+ export type AgentsExecutionsListError =
378
+ AgentsExecutionsListErrors[keyof AgentsExecutionsListErrors];
379
+
380
+ export type AgentsExecutionsListResponses = {
381
+ /**
382
+ * List of agent executions
383
+ */
384
+ 200: ListAgentExecutionsResponse;
385
+ };
386
+
387
+ export type AgentsExecutionsListResponse =
388
+ AgentsExecutionsListResponses[keyof AgentsExecutionsListResponses];
389
+
390
+ export type AgentsGetData = {
391
+ body?: never;
392
+ path: {
393
+ /**
394
+ * Agent id or slug
395
+ */
396
+ agentId: string;
397
+ };
398
+ query?: {
399
+ /**
400
+ * Comma-separated optional sections, e.g. files,dataset
401
+ */
402
+ include?: string;
403
+ };
404
+ url: '/api/v1/agents/{agentId}';
405
+ };
406
+
407
+ export type AgentsGetErrors = {
408
+ /**
409
+ * Validation error. Request shape did not match the spec.
410
+ */
411
+ 400: ApiErrorEnvelope;
412
+ /**
413
+ * Missing or invalid API key
414
+ */
415
+ 401: ApiErrorEnvelope;
416
+ /**
417
+ * API key lacks required scope
418
+ */
419
+ 403: ApiErrorEnvelope;
420
+ /**
421
+ * Resource not found
422
+ */
423
+ 404: ApiErrorEnvelope;
424
+ /**
425
+ * Rate limit exceeded
426
+ */
427
+ 429: ApiErrorEnvelope;
428
+ /**
429
+ * Internal server error
430
+ */
431
+ 500: ApiErrorEnvelope;
432
+ };
433
+
434
+ export type AgentsGetError = AgentsGetErrors[keyof AgentsGetErrors];
435
+
436
+ export type AgentsGetResponses = {
437
+ /**
438
+ * Agent
439
+ */
440
+ 200: GetAgentResponse;
441
+ };
442
+
443
+ export type AgentsGetResponse = AgentsGetResponses[keyof AgentsGetResponses];
444
+
445
+ export type AgentsUpdateData = {
446
+ body: PatchAgentBody;
447
+ path: {
448
+ /**
449
+ * Agent id or slug
450
+ */
451
+ agentId: string;
452
+ };
453
+ query?: never;
454
+ url: '/api/v1/agents/{agentId}';
455
+ };
456
+
457
+ export type AgentsUpdateErrors = {
458
+ /**
459
+ * Validation error. Request shape did not match the spec.
460
+ */
461
+ 400: ApiErrorEnvelope;
462
+ /**
463
+ * Missing or invalid API key
464
+ */
465
+ 401: ApiErrorEnvelope;
466
+ /**
467
+ * API key lacks required scope
468
+ */
469
+ 403: ApiErrorEnvelope;
470
+ /**
471
+ * Resource not found
472
+ */
473
+ 404: ApiErrorEnvelope;
474
+ /**
475
+ * Rate limit exceeded
476
+ */
477
+ 429: ApiErrorEnvelope;
478
+ /**
479
+ * Internal server error
480
+ */
481
+ 500: ApiErrorEnvelope;
482
+ };
483
+
484
+ export type AgentsUpdateError = AgentsUpdateErrors[keyof AgentsUpdateErrors];
485
+
486
+ export type AgentsUpdateResponses = {
487
+ /**
488
+ * Updated agent
489
+ */
490
+ 200: PatchAgentResponse;
491
+ };
492
+
493
+ export type AgentsUpdateResponse = AgentsUpdateResponses[keyof AgentsUpdateResponses];
494
+
495
+ export type AgentsRunData = {
496
+ body: RunAgentBody;
497
+ path: {
498
+ /**
499
+ * Agent id or slug
500
+ */
501
+ agentId: string;
502
+ };
503
+ query?: {
504
+ /**
505
+ * Seconds to hold the connection waiting for completion (max 600). Omit for async.
506
+ */
507
+ wait_for_completion?: number;
508
+ };
509
+ url: '/api/v1/agents/{agentId}/run';
510
+ };
511
+
512
+ export type AgentsRunErrors = {
513
+ /**
514
+ * Validation error. Request shape did not match the spec.
515
+ */
516
+ 400: ApiErrorEnvelope;
517
+ /**
518
+ * Missing or invalid API key
519
+ */
520
+ 401: ApiErrorEnvelope;
521
+ /**
522
+ * API key lacks required scope
523
+ */
524
+ 403: ApiErrorEnvelope;
525
+ /**
526
+ * Resource not found
527
+ */
528
+ 404: ApiErrorEnvelope;
529
+ /**
530
+ * Rate limit exceeded
531
+ */
532
+ 429: ApiErrorEnvelope;
533
+ /**
534
+ * Internal server error
535
+ */
536
+ 500: ApiErrorEnvelope;
537
+ };
538
+
539
+ export type AgentsRunError = AgentsRunErrors[keyof AgentsRunErrors];
540
+
541
+ export type AgentsRunResponses = {
542
+ /**
543
+ * Execution accepted
544
+ */
545
+ 202: RunAgentResponse;
546
+ };
547
+
548
+ export type AgentsRunResponse = AgentsRunResponses[keyof AgentsRunResponses];
549
+
550
+ export type AgentsExecutionsCancelData = {
551
+ body?: never;
552
+ path: {
553
+ /**
554
+ * Execution id
206
555
  */
207
556
  executionId: string;
208
557
  };
209
558
  query?: never;
210
- url: '/v1/executions/{executionId}/cancel';
559
+ url: '/api/v1/agents/executions/{executionId}/cancel';
211
560
  };
212
561
 
213
- export type ExecutionsCancelErrors = {
562
+ export type AgentsExecutionsCancelErrors = {
214
563
  /**
215
564
  * Validation error. Request shape did not match the spec.
216
565
  */
@@ -237,35 +586,37 @@ export type ExecutionsCancelErrors = {
237
586
  500: ApiErrorEnvelope;
238
587
  };
239
588
 
240
- export type ExecutionsCancelError = ExecutionsCancelErrors[keyof ExecutionsCancelErrors];
589
+ export type AgentsExecutionsCancelError =
590
+ AgentsExecutionsCancelErrors[keyof AgentsExecutionsCancelErrors];
241
591
 
242
- export type ExecutionsCancelResponses = {
592
+ export type AgentsExecutionsCancelResponses = {
243
593
  /**
244
- * Cancellation outcome
594
+ * Cancelled agent execution
245
595
  */
246
- 200: CancelExecutionResponse;
596
+ 200: CancelAgentExecutionResponse;
247
597
  };
248
598
 
249
- export type ExecutionsCancelResponse = ExecutionsCancelResponses[keyof ExecutionsCancelResponses];
599
+ export type AgentsExecutionsCancelResponse =
600
+ AgentsExecutionsCancelResponses[keyof AgentsExecutionsCancelResponses];
250
601
 
251
- export type ExecutionsGetData = {
602
+ export type AgentsExecutionsGetData = {
252
603
  body?: never;
253
604
  path: {
254
605
  /**
255
- * Execution id (e.g. exec_xyz)
606
+ * Execution id
256
607
  */
257
608
  executionId: string;
258
609
  };
259
610
  query?: {
260
611
  /**
261
- * When "true", returns the full per-step execution payload instead of the summary
612
+ * Comma-separated optional sections, e.g. files
262
613
  */
263
- includeSteps?: 'true' | 'false';
614
+ include?: string;
264
615
  };
265
- url: '/v1/executions/{executionId}';
616
+ url: '/api/v1/agents/executions/{executionId}';
266
617
  };
267
618
 
268
- export type ExecutionsGetErrors = {
619
+ export type AgentsExecutionsGetErrors = {
269
620
  /**
270
621
  * Validation error. Request shape did not match the spec.
271
622
  */
@@ -292,25 +643,124 @@ export type ExecutionsGetErrors = {
292
643
  500: ApiErrorEnvelope;
293
644
  };
294
645
 
295
- export type ExecutionsGetError = ExecutionsGetErrors[keyof ExecutionsGetErrors];
646
+ export type AgentsExecutionsGetError = AgentsExecutionsGetErrors[keyof AgentsExecutionsGetErrors];
296
647
 
297
- export type ExecutionsGetResponses = {
648
+ export type AgentsExecutionsGetResponses = {
298
649
  /**
299
- * Execution status (or full per-step payload when includeSteps=true)
650
+ * Agent execution
300
651
  */
301
- 200: ExecutionStatusResponse | ExecutionSummary;
652
+ 200: AgentExecutionResponse;
302
653
  };
303
654
 
304
- export type ExecutionsGetResponse = ExecutionsGetResponses[keyof ExecutionsGetResponses];
655
+ export type AgentsExecutionsGetResponse =
656
+ AgentsExecutionsGetResponses[keyof AgentsExecutionsGetResponses];
305
657
 
306
- export type ExecutionsListData = {
658
+ export type AgentsListData = {
307
659
  body?: never;
308
660
  path?: never;
309
661
  query?: {
310
662
  /**
311
- * Comma-separated list of workflow ids to filter by
663
+ * Substring match against agent fields
312
664
  */
313
- workflowId?: string;
665
+ search?: string;
666
+ limit?: number;
667
+ offset?: number;
668
+ };
669
+ url: '/api/v1/agents';
670
+ };
671
+
672
+ export type AgentsListErrors = {
673
+ /**
674
+ * Validation error. Request shape did not match the spec.
675
+ */
676
+ 400: ApiErrorEnvelope;
677
+ /**
678
+ * Missing or invalid API key
679
+ */
680
+ 401: ApiErrorEnvelope;
681
+ /**
682
+ * API key lacks required scope
683
+ */
684
+ 403: ApiErrorEnvelope;
685
+ /**
686
+ * Resource not found
687
+ */
688
+ 404: ApiErrorEnvelope;
689
+ /**
690
+ * Rate limit exceeded
691
+ */
692
+ 429: ApiErrorEnvelope;
693
+ /**
694
+ * Internal server error
695
+ */
696
+ 500: ApiErrorEnvelope;
697
+ };
698
+
699
+ export type AgentsListError = AgentsListErrors[keyof AgentsListErrors];
700
+
701
+ export type AgentsListResponses = {
702
+ /**
703
+ * Paginated list of agents
704
+ */
705
+ 200: ListAgentsResponse;
706
+ };
707
+
708
+ export type AgentsListResponse = AgentsListResponses[keyof AgentsListResponses];
709
+
710
+ export type AgentsCreateData = {
711
+ body: CreateAgentBody;
712
+ path?: never;
713
+ query?: never;
714
+ url: '/api/v1/agents';
715
+ };
716
+
717
+ export type AgentsCreateErrors = {
718
+ /**
719
+ * Validation error. Request shape did not match the spec.
720
+ */
721
+ 400: ApiErrorEnvelope;
722
+ /**
723
+ * Missing or invalid API key
724
+ */
725
+ 401: ApiErrorEnvelope;
726
+ /**
727
+ * API key lacks required scope
728
+ */
729
+ 403: ApiErrorEnvelope;
730
+ /**
731
+ * Resource not found
732
+ */
733
+ 404: ApiErrorEnvelope;
734
+ /**
735
+ * Rate limit exceeded
736
+ */
737
+ 429: ApiErrorEnvelope;
738
+ /**
739
+ * Internal server error
740
+ */
741
+ 500: ApiErrorEnvelope;
742
+ };
743
+
744
+ export type AgentsCreateError = AgentsCreateErrors[keyof AgentsCreateErrors];
745
+
746
+ export type AgentsCreateResponses = {
747
+ /**
748
+ * Created agent
749
+ */
750
+ 201: CreateAgentResponse;
751
+ };
752
+
753
+ export type AgentsCreateResponse = AgentsCreateResponses[keyof AgentsCreateResponses];
754
+
755
+ export type WorkflowsExecutionsListData = {
756
+ body?: never;
757
+ path: {
758
+ /**
759
+ * Workflow id (e.g. wf_abc123)
760
+ */
761
+ id: string;
762
+ };
763
+ query?: {
314
764
  /**
315
765
  * Comma-separated list of execution statuses to filter by
316
766
  */
@@ -330,10 +780,10 @@ export type ExecutionsListData = {
330
780
  limit?: number;
331
781
  offset?: number;
332
782
  };
333
- url: '/v1/executions';
783
+ url: '/api/v1/workflows/{id}/executions';
334
784
  };
335
785
 
336
- export type ExecutionsListErrors = {
786
+ export type WorkflowsExecutionsListErrors = {
337
787
  /**
338
788
  * Validation error. Request shape did not match the spec.
339
789
  */
@@ -360,16 +810,18 @@ export type ExecutionsListErrors = {
360
810
  500: ApiErrorEnvelope;
361
811
  };
362
812
 
363
- export type ExecutionsListError = ExecutionsListErrors[keyof ExecutionsListErrors];
813
+ export type WorkflowsExecutionsListError =
814
+ WorkflowsExecutionsListErrors[keyof WorkflowsExecutionsListErrors];
364
815
 
365
- export type ExecutionsListResponses = {
816
+ export type WorkflowsExecutionsListResponses = {
366
817
  /**
367
- * Paginated list of executions
818
+ * Paginated list of workflow executions
368
819
  */
369
- 200: ListExecutionsResponse;
820
+ 200: ListWorkflowExecutionsResponse;
370
821
  };
371
822
 
372
- export type ExecutionsListResponse = ExecutionsListResponses[keyof ExecutionsListResponses];
823
+ export type WorkflowsExecutionsListResponse =
824
+ WorkflowsExecutionsListResponses[keyof WorkflowsExecutionsListResponses];
373
825
 
374
826
  export type WorkflowsGetData = {
375
827
  body?: never;
@@ -380,7 +832,7 @@ export type WorkflowsGetData = {
380
832
  id: string;
381
833
  };
382
834
  query?: never;
383
- url: '/v1/workflows/{id}';
835
+ url: '/api/v1/workflows/{id}';
384
836
  };
385
837
 
386
838
  export type WorkflowsGetErrors = {
@@ -439,7 +891,7 @@ export type WorkflowsRunData = {
439
891
  */
440
892
  wait_for_completion?: number;
441
893
  };
442
- url: '/v1/workflows/{id}/run';
894
+ url: '/api/v1/workflows/{id}/run';
443
895
  };
444
896
 
445
897
  export type WorkflowsRunErrors = {
@@ -473,7 +925,7 @@ export type WorkflowsRunError = WorkflowsRunErrors[keyof WorkflowsRunErrors];
473
925
 
474
926
  export type WorkflowsRunResponses = {
475
927
  /**
476
- * Execution accepted. Body always includes `executionId`. When `wait_for_completion` is set and the run completes within the window, `status`/`result`/`error` are also returned; otherwise poll `/v1/executions/{executionId}` for status.
928
+ * Execution accepted. Body always includes `executionId`. When `wait_for_completion` is set and the execution completes within the window, `status`/`result`/`error` are also returned; otherwise poll `/api/v1/workflows/executions/{executionId}` for status.
477
929
  */
478
930
  201: RunWorkflowResponse;
479
931
  };
@@ -498,7 +950,7 @@ export type WorkflowsVersionsListData = {
498
950
  */
499
951
  offset?: number;
500
952
  };
501
- url: '/v1/workflows/{id}/versions';
953
+ url: '/api/v1/workflows/{id}/versions';
502
954
  };
503
955
 
504
956
  export type WorkflowsVersionsListErrors = {
@@ -541,6 +993,115 @@ export type WorkflowsVersionsListResponses = {
541
993
  export type WorkflowsVersionsListResponse =
542
994
  WorkflowsVersionsListResponses[keyof WorkflowsVersionsListResponses];
543
995
 
996
+ export type WorkflowsExecutionsCancelData = {
997
+ body?: never;
998
+ path: {
999
+ /**
1000
+ * Execution id to cancel
1001
+ */
1002
+ executionId: string;
1003
+ };
1004
+ query?: never;
1005
+ url: '/api/v1/workflows/executions/{executionId}/cancel';
1006
+ };
1007
+
1008
+ export type WorkflowsExecutionsCancelErrors = {
1009
+ /**
1010
+ * Validation error. Request shape did not match the spec.
1011
+ */
1012
+ 400: ApiErrorEnvelope;
1013
+ /**
1014
+ * Missing or invalid API key
1015
+ */
1016
+ 401: ApiErrorEnvelope;
1017
+ /**
1018
+ * API key lacks required scope
1019
+ */
1020
+ 403: ApiErrorEnvelope;
1021
+ /**
1022
+ * Resource not found
1023
+ */
1024
+ 404: ApiErrorEnvelope;
1025
+ /**
1026
+ * Rate limit exceeded
1027
+ */
1028
+ 429: ApiErrorEnvelope;
1029
+ /**
1030
+ * Internal server error
1031
+ */
1032
+ 500: ApiErrorEnvelope;
1033
+ };
1034
+
1035
+ export type WorkflowsExecutionsCancelError =
1036
+ WorkflowsExecutionsCancelErrors[keyof WorkflowsExecutionsCancelErrors];
1037
+
1038
+ export type WorkflowsExecutionsCancelResponses = {
1039
+ /**
1040
+ * Cancellation outcome
1041
+ */
1042
+ 200: CancelWorkflowExecutionResponse;
1043
+ };
1044
+
1045
+ export type WorkflowsExecutionsCancelResponse =
1046
+ WorkflowsExecutionsCancelResponses[keyof WorkflowsExecutionsCancelResponses];
1047
+
1048
+ export type WorkflowsExecutionsGetData = {
1049
+ body?: never;
1050
+ path: {
1051
+ /**
1052
+ * Execution id (e.g. exec_xyz)
1053
+ */
1054
+ executionId: string;
1055
+ };
1056
+ query?: {
1057
+ /**
1058
+ * When "true", returns the full per-step execution payload instead of the summary
1059
+ */
1060
+ includeSteps?: 'true' | 'false';
1061
+ };
1062
+ url: '/api/v1/workflows/executions/{executionId}';
1063
+ };
1064
+
1065
+ export type WorkflowsExecutionsGetErrors = {
1066
+ /**
1067
+ * Validation error. Request shape did not match the spec.
1068
+ */
1069
+ 400: ApiErrorEnvelope;
1070
+ /**
1071
+ * Missing or invalid API key
1072
+ */
1073
+ 401: ApiErrorEnvelope;
1074
+ /**
1075
+ * API key lacks required scope
1076
+ */
1077
+ 403: ApiErrorEnvelope;
1078
+ /**
1079
+ * Resource not found
1080
+ */
1081
+ 404: ApiErrorEnvelope;
1082
+ /**
1083
+ * Rate limit exceeded
1084
+ */
1085
+ 429: ApiErrorEnvelope;
1086
+ /**
1087
+ * Internal server error
1088
+ */
1089
+ 500: ApiErrorEnvelope;
1090
+ };
1091
+
1092
+ export type WorkflowsExecutionsGetError =
1093
+ WorkflowsExecutionsGetErrors[keyof WorkflowsExecutionsGetErrors];
1094
+
1095
+ export type WorkflowsExecutionsGetResponses = {
1096
+ /**
1097
+ * Workflow execution status or full per-step payload
1098
+ */
1099
+ 200: WorkflowExecutionStatusResponse | ExecutionSummary;
1100
+ };
1101
+
1102
+ export type WorkflowsExecutionsGetResponse =
1103
+ WorkflowsExecutionsGetResponses[keyof WorkflowsExecutionsGetResponses];
1104
+
544
1105
  export type WorkflowsListData = {
545
1106
  body?: never;
546
1107
  path?: never;
@@ -566,7 +1127,7 @@ export type WorkflowsListData = {
566
1127
  */
567
1128
  offset?: number;
568
1129
  };
569
- url: '/v1/workflows';
1130
+ url: '/api/v1/workflows';
570
1131
  };
571
1132
 
572
1133
  export type WorkflowsListErrors = {