@eigenpal/sdk 0.6.8 → 0.6.10

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eigenpal/sdk
2
2
 
3
+ ## 0.6.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 99ca1b4: Unify agent and workflow run commands and SDK helpers on the shared `/api/v1/runs` API, including the public `client.runs` facade and regenerated SDK reference docs.
8
+
9
+ ## 0.6.9
10
+
11
+ ### Minor Changes
12
+
13
+ - 5e7c051: Add `observability` (phase timeline + structured failure) to workflow execution and agent run status API responses.
14
+
3
15
  ## 0.6.4
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -106,18 +106,32 @@ await client.workflows.run('extract-invoice', {
106
106
  ## Execution polling
107
107
 
108
108
  ```ts
109
- const status = await client.workflows.executions.get(executionId);
109
+ const runs = await client.runs.list({
110
+ type: 'workflow',
111
+ source: 'extract-invoice',
112
+ status: 'failed,cancelled',
113
+ });
114
+
115
+ const run = await client.runs.get(executionId, { include: 'detail' });
116
+ await client.runs.cancel(executionId);
117
+
118
+ const status = await client.runs.get(executionId);
110
119
  // { executionId, status, result?, error?, createdAt, completedAt? }
111
120
 
112
- const list = await client.workflows.executions.list('extract-invoice', {
121
+ const list = await client.runs.list({
122
+ type: 'workflow',
123
+ source: 'extract-invoice',
113
124
  status: ['failed', 'cancelled'],
114
- fromDate: 'now()-7d',
125
+ from: 'now()-7d',
115
126
  limit: 50,
116
127
  });
117
128
 
118
- await client.workflows.executions.cancel(executionId);
129
+ await client.runs.cancel(executionId);
119
130
  ```
120
131
 
132
+ `/api/v1/runs` is the shared run API for workflow, agent, and eval runs. Use `type=workflow|agent`
133
+ and `source=<workflowId-or-agentId>` to scope list calls.
134
+
121
135
  ## Workflows
122
136
 
123
137
  ```ts
@@ -136,10 +150,13 @@ const { executionId } = await client.agents.run('invoice-agent', {
136
150
  invoice: file,
137
151
  });
138
152
 
139
- await client.agents.runs.get(runId);
140
- await client.agents.runs.cancel(runId);
153
+ await client.runs.get(executionId);
154
+ await client.runs.cancel(executionId);
141
155
  ```
142
156
 
157
+ Agent run listing uses the same shared runs API with `type: 'agent'` and the agent id or slug as
158
+ `source`.
159
+
143
160
  ## Errors
144
161
 
145
162
  Every non-2xx response throws a typed subclass of `EigenpalError`:
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@eigenpal/sdk",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
7
7
  "types": "./src/index.ts",
8
8
  "exports": {
9
- ".": "./src/index.ts"
9
+ ".": "./src/index.ts",
10
+ "./generated": "./src/generated/index.ts"
10
11
  },
11
12
  "files": [
12
13
  "src",
package/src/client.ts CHANGED
@@ -3,6 +3,7 @@ import { createClient, createConfig, type Client, type Config } from './generate
3
3
  import type { ApiErrorEnvelope } from './generated/types.gen';
4
4
  import { AgentsResource } from './resources/agents';
5
5
  import { AutomationsResource } from './resources/automations';
6
+ import { RunsResource } from './resources/runs';
6
7
  import { SourceResource } from './resources/source';
7
8
  import { WorkflowsResource } from './resources/workflows';
8
9
  import { buildTelemetryHeaders } from './telemetry';
@@ -80,6 +81,8 @@ export class EigenpalClient {
80
81
  public readonly source: SourceResource;
81
82
  /** Automation operations: sync public automation metadata from source. */
82
83
  public readonly automations: AutomationsResource;
84
+ /** Tenant-wide run operations across workflow, agent, manual, and eval runs. */
85
+ public readonly runs: RunsResource;
83
86
 
84
87
  /** Underlying hey-api client. Use `getRawClient()` for advanced cases. */
85
88
  private readonly client: Client;
@@ -124,6 +127,7 @@ export class EigenpalClient {
124
127
  this.agents = new AgentsResource(this.client, this._request.bind(this));
125
128
  this.source = new SourceResource(this.client, this._request.bind(this));
126
129
  this.automations = new AutomationsResource(this.client, this._request.bind(this));
130
+ this.runs = new RunsResource(this.client, this._request.bind(this));
127
131
  }
128
132
 
129
133
  /** Expose the underlying hey-api client for advanced use (custom interceptors, etc.). */
@@ -8,19 +8,6 @@ export {
8
8
  agentsGet,
9
9
  agentsList,
10
10
  agentsRun,
11
- agentsRunsCancel,
12
- agentsRunsExpectedCreate,
13
- agentsRunsExpectedDelete,
14
- agentsRunsExpectedDownload,
15
- agentsRunsExpectedList,
16
- agentsRunsExpectedRename,
17
- agentsRunsFeedbackDelete,
18
- agentsRunsFeedbackGet,
19
- agentsRunsFeedbackUpdate,
20
- agentsRunsFilesDownload,
21
- agentsRunsGet,
22
- agentsRunsList,
23
- agentsRunsRerun,
24
11
  agentsTriggersEmailCreateAlias,
25
12
  agentsTriggersEmailDeleteAlias,
26
13
  agentsTriggersEmailGet,
@@ -30,15 +17,33 @@ export {
30
17
  agentsUpdate,
31
18
  agentsVersionsList,
32
19
  automationsSync,
20
+ runsArtifactGet,
21
+ runsCancel,
22
+ runsComparisonGet,
23
+ runsConnect,
24
+ runsExpectedCreate,
25
+ runsExpectedFileDelete,
26
+ runsExpectedFileGet,
27
+ runsExpectedFileUpdate,
28
+ runsExpectedGet,
29
+ runsFeedbackClear,
30
+ runsFeedbackGet,
31
+ runsFeedbackUpdate,
32
+ runsFilesDelete,
33
+ runsFilesList,
34
+ runsFilesUpload,
35
+ runsFilesZipGet,
36
+ runsGet,
37
+ runsList,
38
+ runsRerun,
39
+ runsResume,
40
+ runsTraceGet,
33
41
  sourceLockfilePreview,
34
42
  sourceRaw,
35
43
  sourceReleases,
36
44
  sourceRepository,
37
45
  sourceSecretsDecrypt,
38
46
  sourceSecretsEncrypt,
39
- workflowsExecutionsCancel,
40
- workflowsExecutionsGet,
41
- workflowsExecutionsList,
42
47
  workflowsGet,
43
48
  workflowsList,
44
49
  workflowsRun,
@@ -46,11 +51,6 @@ export {
46
51
  type Options,
47
52
  } from './sdk.gen';
48
53
  export type {
49
- AgentExecutionExpectedArtifacts,
50
- AgentExecutionFeedback,
51
- AgentExecutionFeedbackDetail,
52
- AgentExecutionSummary,
53
- AgentRunResponse,
54
54
  AgentSummary,
55
55
  AgentsCreateData,
56
56
  AgentsCreateError,
@@ -82,69 +82,6 @@ export type {
82
82
  AgentsRunErrors,
83
83
  AgentsRunResponse,
84
84
  AgentsRunResponses,
85
- AgentsRunsCancelData,
86
- AgentsRunsCancelError,
87
- AgentsRunsCancelErrors,
88
- AgentsRunsCancelResponse,
89
- AgentsRunsCancelResponses,
90
- AgentsRunsExpectedCreateData,
91
- AgentsRunsExpectedCreateError,
92
- AgentsRunsExpectedCreateErrors,
93
- AgentsRunsExpectedCreateResponse,
94
- AgentsRunsExpectedCreateResponses,
95
- AgentsRunsExpectedDeleteData,
96
- AgentsRunsExpectedDeleteError,
97
- AgentsRunsExpectedDeleteErrors,
98
- AgentsRunsExpectedDeleteResponse,
99
- AgentsRunsExpectedDeleteResponses,
100
- AgentsRunsExpectedDownloadData,
101
- AgentsRunsExpectedDownloadError,
102
- AgentsRunsExpectedDownloadErrors,
103
- AgentsRunsExpectedDownloadResponses,
104
- AgentsRunsExpectedListData,
105
- AgentsRunsExpectedListError,
106
- AgentsRunsExpectedListErrors,
107
- AgentsRunsExpectedListResponse,
108
- AgentsRunsExpectedListResponses,
109
- AgentsRunsExpectedRenameData,
110
- AgentsRunsExpectedRenameError,
111
- AgentsRunsExpectedRenameErrors,
112
- AgentsRunsExpectedRenameResponse,
113
- AgentsRunsExpectedRenameResponses,
114
- AgentsRunsFeedbackDeleteData,
115
- AgentsRunsFeedbackDeleteError,
116
- AgentsRunsFeedbackDeleteErrors,
117
- AgentsRunsFeedbackDeleteResponse,
118
- AgentsRunsFeedbackDeleteResponses,
119
- AgentsRunsFeedbackGetData,
120
- AgentsRunsFeedbackGetError,
121
- AgentsRunsFeedbackGetErrors,
122
- AgentsRunsFeedbackGetResponse,
123
- AgentsRunsFeedbackGetResponses,
124
- AgentsRunsFeedbackUpdateData,
125
- AgentsRunsFeedbackUpdateError,
126
- AgentsRunsFeedbackUpdateErrors,
127
- AgentsRunsFeedbackUpdateResponse,
128
- AgentsRunsFeedbackUpdateResponses,
129
- AgentsRunsFilesDownloadData,
130
- AgentsRunsFilesDownloadError,
131
- AgentsRunsFilesDownloadErrors,
132
- AgentsRunsFilesDownloadResponses,
133
- AgentsRunsGetData,
134
- AgentsRunsGetError,
135
- AgentsRunsGetErrors,
136
- AgentsRunsGetResponse,
137
- AgentsRunsGetResponses,
138
- AgentsRunsListData,
139
- AgentsRunsListError,
140
- AgentsRunsListErrors,
141
- AgentsRunsListResponse,
142
- AgentsRunsListResponses,
143
- AgentsRunsRerunData,
144
- AgentsRunsRerunError,
145
- AgentsRunsRerunErrors,
146
- AgentsRunsRerunResponse,
147
- AgentsRunsRerunResponses,
148
85
  AgentsTriggersEmailCreateAliasData,
149
86
  AgentsTriggersEmailCreateAliasError,
150
87
  AgentsTriggersEmailCreateAliasErrors,
@@ -193,32 +130,133 @@ export type {
193
130
  AutomationsSyncErrors,
194
131
  AutomationsSyncResponse,
195
132
  AutomationsSyncResponses,
196
- CancelAgentExecutionResponse,
197
- CancelWorkflowExecutionResponse,
198
133
  ClientOptions,
199
- CopyAgentExecutionOutputToExpectedBody,
200
134
  CreateAgentBody,
201
135
  CreateAgentResponse,
202
136
  ExecutionStatus,
203
- ExecutionSummary,
204
137
  GetAgentResponse,
205
- ListAgentRunsResponse,
206
138
  ListAgentVersionsResponse,
207
139
  ListAgentsResponse,
208
140
  ListVersionsResponse,
209
- ListWorkflowExecutionsResponse,
210
141
  ListWorkflowsResponse,
211
142
  PatchAgentBody,
212
143
  PatchAgentResponse,
213
144
  RawSourceResponse,
214
- RenameExpectedFileBody,
215
- RenameExpectedFileResponse,
216
- RerunAgentRunBody,
217
- RerunAgentRunResponse,
218
145
  RunAgentBody,
219
146
  RunAgentResponse,
147
+ RunEnvelope,
148
+ RunFeedbackRequest,
149
+ RunFilesResponse,
150
+ RunRerunRequest,
151
+ RunRerunResponse,
152
+ RunResumeResponse,
153
+ RunSummary,
220
154
  RunWorkflowBody,
221
155
  RunWorkflowResponse,
156
+ RunsArtifactGetData,
157
+ RunsArtifactGetError,
158
+ RunsArtifactGetErrors,
159
+ RunsArtifactGetResponses,
160
+ RunsCancelData,
161
+ RunsCancelError,
162
+ RunsCancelErrors,
163
+ RunsCancelResponse,
164
+ RunsCancelResponses,
165
+ RunsComparisonGetData,
166
+ RunsComparisonGetError,
167
+ RunsComparisonGetErrors,
168
+ RunsComparisonGetResponse,
169
+ RunsComparisonGetResponses,
170
+ RunsConnectData,
171
+ RunsConnectError,
172
+ RunsConnectErrors,
173
+ RunsConnectResponse,
174
+ RunsConnectResponses,
175
+ RunsExpectedCreateData,
176
+ RunsExpectedCreateError,
177
+ RunsExpectedCreateErrors,
178
+ RunsExpectedCreateResponse,
179
+ RunsExpectedCreateResponses,
180
+ RunsExpectedFileDeleteData,
181
+ RunsExpectedFileDeleteError,
182
+ RunsExpectedFileDeleteErrors,
183
+ RunsExpectedFileDeleteResponse,
184
+ RunsExpectedFileDeleteResponses,
185
+ RunsExpectedFileGetData,
186
+ RunsExpectedFileGetError,
187
+ RunsExpectedFileGetErrors,
188
+ RunsExpectedFileGetResponses,
189
+ RunsExpectedFileUpdateData,
190
+ RunsExpectedFileUpdateError,
191
+ RunsExpectedFileUpdateErrors,
192
+ RunsExpectedFileUpdateResponse,
193
+ RunsExpectedFileUpdateResponses,
194
+ RunsExpectedGetData,
195
+ RunsExpectedGetError,
196
+ RunsExpectedGetErrors,
197
+ RunsExpectedGetResponse,
198
+ RunsExpectedGetResponses,
199
+ RunsFeedbackClearData,
200
+ RunsFeedbackClearError,
201
+ RunsFeedbackClearErrors,
202
+ RunsFeedbackClearResponse,
203
+ RunsFeedbackClearResponses,
204
+ RunsFeedbackGetData,
205
+ RunsFeedbackGetError,
206
+ RunsFeedbackGetErrors,
207
+ RunsFeedbackGetResponse,
208
+ RunsFeedbackGetResponses,
209
+ RunsFeedbackUpdateData,
210
+ RunsFeedbackUpdateError,
211
+ RunsFeedbackUpdateErrors,
212
+ RunsFeedbackUpdateResponse,
213
+ RunsFeedbackUpdateResponses,
214
+ RunsFilesDeleteData,
215
+ RunsFilesDeleteError,
216
+ RunsFilesDeleteErrors,
217
+ RunsFilesDeleteResponse,
218
+ RunsFilesDeleteResponses,
219
+ RunsFilesListData,
220
+ RunsFilesListError,
221
+ RunsFilesListErrors,
222
+ RunsFilesListResponse,
223
+ RunsFilesListResponses,
224
+ RunsFilesUploadBody,
225
+ RunsFilesUploadData,
226
+ RunsFilesUploadError,
227
+ RunsFilesUploadErrors,
228
+ RunsFilesUploadResponse,
229
+ RunsFilesUploadResponses,
230
+ RunsFilesZipGetData,
231
+ RunsFilesZipGetError,
232
+ RunsFilesZipGetErrors,
233
+ RunsFilesZipGetResponses,
234
+ RunsGetData,
235
+ RunsGetError,
236
+ RunsGetErrors,
237
+ RunsGetResponse,
238
+ RunsGetResponses,
239
+ RunsListData,
240
+ RunsListError,
241
+ RunsListErrors,
242
+ RunsListResponse,
243
+ RunsListResponse2,
244
+ RunsListResponses,
245
+ RunsRerunData,
246
+ RunsRerunError,
247
+ RunsRerunErrors,
248
+ RunsRerunResponse,
249
+ RunsRerunResponses,
250
+ RunsResumeData,
251
+ RunsResumeError,
252
+ RunsResumeErrors,
253
+ RunsResumeResponse,
254
+ RunsResumeResponses,
255
+ RunsTraceGetData,
256
+ RunsTraceGetError,
257
+ RunsTraceGetErrors,
258
+ RunsTraceGetResponse,
259
+ RunsTraceGetResponses,
222
260
  Schema0,
223
261
  SourceLockfilePreviewData,
224
262
  SourceLockfilePreviewError,
@@ -257,26 +295,9 @@ export type {
257
295
  SourceSecretsEncryptResponse,
258
296
  SourceSecretsEncryptResponse2,
259
297
  SourceSecretsEncryptResponses,
260
- UpdateAgentExecutionFeedbackBody,
261
298
  WorkflowDetail,
262
- WorkflowExecutionStatusResponse,
263
299
  WorkflowSummary,
264
300
  WorkflowVersion,
265
- WorkflowsExecutionsCancelData,
266
- WorkflowsExecutionsCancelError,
267
- WorkflowsExecutionsCancelErrors,
268
- WorkflowsExecutionsCancelResponse,
269
- WorkflowsExecutionsCancelResponses,
270
- WorkflowsExecutionsGetData,
271
- WorkflowsExecutionsGetError,
272
- WorkflowsExecutionsGetErrors,
273
- WorkflowsExecutionsGetResponse,
274
- WorkflowsExecutionsGetResponses,
275
- WorkflowsExecutionsListData,
276
- WorkflowsExecutionsListError,
277
- WorkflowsExecutionsListErrors,
278
- WorkflowsExecutionsListResponse,
279
- WorkflowsExecutionsListResponses,
280
301
  WorkflowsGetData,
281
302
  WorkflowsGetError,
282
303
  WorkflowsGetErrors,