@agentuity/core 2.0.1 → 2.0.3
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/AGENTS.md +15 -0
- package/dist/deprecation.d.ts +1 -1
- package/dist/deprecation.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/auth/index.d.ts +1 -1
- package/dist/services/auth/index.d.ts.map +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/services/queue/destinations.d.ts +60 -4
- package/dist/services/queue/destinations.d.ts.map +1 -1
- package/dist/services/queue/destinations.js.map +1 -1
- package/dist/services/queue/types.d.ts +121 -37
- package/dist/services/queue/types.d.ts.map +1 -1
- package/dist/services/queue/types.js +66 -7
- package/dist/services/queue/types.js.map +1 -1
- package/dist/services/webhook/types.d.ts +1 -0
- package/dist/services/webhook/types.d.ts.map +1 -1
- package/dist/services/webhook/types.js +1 -0
- package/dist/services/webhook/types.js.map +1 -1
- package/dist/services/workflow/api-reference.d.ts +4 -0
- package/dist/services/workflow/api-reference.d.ts.map +1 -0
- package/dist/services/workflow/api-reference.js +337 -0
- package/dist/services/workflow/api-reference.js.map +1 -0
- package/dist/services/workflow/index.d.ts +3 -0
- package/dist/services/workflow/index.d.ts.map +1 -0
- package/dist/services/workflow/index.js +3 -0
- package/dist/services/workflow/index.js.map +1 -0
- package/dist/services/workflow/service.d.ts +235 -0
- package/dist/services/workflow/service.d.ts.map +1 -0
- package/dist/services/workflow/service.js +555 -0
- package/dist/services/workflow/service.js.map +1 -0
- package/dist/services/workflow/types.d.ts +270 -0
- package/dist/services/workflow/types.d.ts.map +1 -0
- package/dist/services/workflow/types.js +174 -0
- package/dist/services/workflow/types.js.map +1 -0
- package/package.json +2 -2
- package/src/deprecation.ts +1 -1
- package/src/index.ts +1 -1
- package/src/services/auth/index.ts +1 -1
- package/src/services/index.ts +1 -0
- package/src/services/queue/destinations.ts +1 -1
- package/src/services/queue/types.ts +72 -9
- package/src/services/webhook/types.ts +1 -0
- package/src/services/workflow/api-reference.ts +352 -0
- package/src/services/workflow/index.ts +2 -0
- package/src/services/workflow/service.ts +633 -0
- package/src/services/workflow/types.ts +233 -0
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
import { buildUrl, toServiceException } from "../_util.js";
|
|
2
|
+
import { StructuredError } from "../../error.js";
|
|
3
|
+
/**
|
|
4
|
+
* Thrown when the API returns a success HTTP status but the response body indicates failure.
|
|
5
|
+
*/
|
|
6
|
+
const WorkflowResponseError = StructuredError('WorkflowResponseError')();
|
|
7
|
+
/**
|
|
8
|
+
* Creates an {@link AbortSignal} that will abort after the specified timeout.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Falls back to a manual `AbortController` + `setTimeout` if `AbortSignal.timeout`
|
|
12
|
+
* is not available in the runtime.
|
|
13
|
+
*
|
|
14
|
+
* @param ms - Timeout in milliseconds
|
|
15
|
+
* @returns An abort signal that triggers after `ms` milliseconds
|
|
16
|
+
*
|
|
17
|
+
* @default 30000
|
|
18
|
+
*/
|
|
19
|
+
function createTimeoutSignal(ms = 30_000) {
|
|
20
|
+
if (typeof AbortSignal.timeout === 'function') {
|
|
21
|
+
return AbortSignal.timeout(ms);
|
|
22
|
+
}
|
|
23
|
+
const controller = new AbortController();
|
|
24
|
+
const timer = setTimeout(() => controller.abort(), ms);
|
|
25
|
+
controller.signal.addEventListener('abort', () => clearTimeout(timer), { once: true });
|
|
26
|
+
return controller.signal;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Client for the Agentuity Workflow service.
|
|
30
|
+
*
|
|
31
|
+
* Provides methods for creating and managing workflows that route events from
|
|
32
|
+
* sources (email, queue, webhook, schedule) to configured destinations. The
|
|
33
|
+
* service supports:
|
|
34
|
+
*
|
|
35
|
+
* - **Workflows**: Named routing configurations with a source and graph
|
|
36
|
+
* - **Executions**: Records of workflow runs with step-level detail
|
|
37
|
+
* - **Deliveries**: Records of destination delivery attempts
|
|
38
|
+
* - **Testing**: Send test payloads through a workflow
|
|
39
|
+
*
|
|
40
|
+
* All methods are instrumented with OpenTelemetry spans for observability.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const workflows = new WorkflowService(baseUrl, adapter);
|
|
45
|
+
*
|
|
46
|
+
* // Create a workflow
|
|
47
|
+
* const { workflow } = await workflows.create({
|
|
48
|
+
* name: 'GitHub to Slack',
|
|
49
|
+
* source_type: 'webhook',
|
|
50
|
+
* source_ref_id: 'wh_abc123',
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* // List active workflows
|
|
54
|
+
* const { workflows: list } = await workflows.list({ status: 'enabled' });
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export class WorkflowService {
|
|
58
|
+
#baseUrl;
|
|
59
|
+
#adapter;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new WorkflowService instance.
|
|
62
|
+
*
|
|
63
|
+
* @param baseUrl - The base URL of the workflow API
|
|
64
|
+
* @param adapter - The HTTP fetch adapter used for making API requests
|
|
65
|
+
*/
|
|
66
|
+
constructor(baseUrl, adapter) {
|
|
67
|
+
this.#baseUrl = baseUrl;
|
|
68
|
+
this.#adapter = adapter;
|
|
69
|
+
}
|
|
70
|
+
#createUrl(path) {
|
|
71
|
+
const url = buildUrl(this.#baseUrl, path);
|
|
72
|
+
return url;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Lists all workflows for the authenticated organization.
|
|
76
|
+
*
|
|
77
|
+
* @param params - Optional filter and pagination parameters
|
|
78
|
+
* @returns A promise resolving to the paginated list of workflows
|
|
79
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
80
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const result = await service.list({ status: 'enabled', limit: 10 });
|
|
85
|
+
* console.log(`Found ${result.total} workflows`);
|
|
86
|
+
* for (const wf of result.workflows) {
|
|
87
|
+
* console.log(`${wf.name} (${wf.source_type})`);
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
async list(params) {
|
|
92
|
+
const url = this.#createUrl('/workflow/list');
|
|
93
|
+
const signal = createTimeoutSignal();
|
|
94
|
+
const queryParams = {};
|
|
95
|
+
if (params?.limit !== undefined)
|
|
96
|
+
queryParams['limit'] = String(params.limit);
|
|
97
|
+
if (params?.offset !== undefined)
|
|
98
|
+
queryParams['offset'] = String(params.offset);
|
|
99
|
+
if (params?.status)
|
|
100
|
+
queryParams['status'] = params.status;
|
|
101
|
+
if (params?.source_type)
|
|
102
|
+
queryParams['source_type'] = params.source_type;
|
|
103
|
+
if (params?.filter)
|
|
104
|
+
queryParams['filter'] = params.filter;
|
|
105
|
+
const qs = new URLSearchParams(queryParams);
|
|
106
|
+
const qsStr = qs.toString();
|
|
107
|
+
const finalUrl = qsStr ? `${url}?${qsStr}` : url;
|
|
108
|
+
const res = await this.#adapter.invoke(finalUrl, {
|
|
109
|
+
method: 'GET',
|
|
110
|
+
signal,
|
|
111
|
+
contentType: 'application/json',
|
|
112
|
+
telemetry: {
|
|
113
|
+
name: 'agentuity.workflow.list',
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
if (res.ok) {
|
|
117
|
+
if (res.data.success) {
|
|
118
|
+
return res.data.data;
|
|
119
|
+
}
|
|
120
|
+
throw new WorkflowResponseError({
|
|
121
|
+
status: res.response.status,
|
|
122
|
+
message: res.data.message || 'Failed to list workflows',
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
throw await toServiceException('GET', url, res.response);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Gets a single workflow by its ID.
|
|
129
|
+
*
|
|
130
|
+
* @param workflowId - The unique workflow identifier (prefixed with wf_)
|
|
131
|
+
* @returns A promise resolving to the workflow details
|
|
132
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
133
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* const result = await service.get('wf_abc123');
|
|
138
|
+
* console.log(result.workflow.name);
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
async get(workflowId) {
|
|
142
|
+
const url = this.#createUrl(`/workflow/${encodeURIComponent(workflowId)}`);
|
|
143
|
+
const signal = createTimeoutSignal();
|
|
144
|
+
const res = await this.#adapter.invoke(url, {
|
|
145
|
+
method: 'GET',
|
|
146
|
+
signal,
|
|
147
|
+
contentType: 'application/json',
|
|
148
|
+
telemetry: {
|
|
149
|
+
name: 'agentuity.workflow.get',
|
|
150
|
+
attributes: {
|
|
151
|
+
workflowId,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
if (res.ok) {
|
|
156
|
+
if (res.data.success) {
|
|
157
|
+
return res.data.data;
|
|
158
|
+
}
|
|
159
|
+
throw new WorkflowResponseError({
|
|
160
|
+
status: res.response.status,
|
|
161
|
+
message: res.data.message || 'Failed to get workflow',
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
throw await toServiceException('GET', url, res.response);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Creates a new workflow.
|
|
168
|
+
*
|
|
169
|
+
* @param params - The workflow creation parameters including name, source type, and source reference
|
|
170
|
+
* @returns A promise resolving to the newly created workflow
|
|
171
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
172
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```typescript
|
|
176
|
+
* const result = await service.create({
|
|
177
|
+
* name: 'Email to Slack',
|
|
178
|
+
* source_type: 'email',
|
|
179
|
+
* source_ref_id: 'user@example.com',
|
|
180
|
+
* });
|
|
181
|
+
* console.log('Created:', result.workflow.id);
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
async create(params) {
|
|
185
|
+
const url = this.#createUrl('/workflow/create');
|
|
186
|
+
const signal = createTimeoutSignal();
|
|
187
|
+
const res = await this.#adapter.invoke(url, {
|
|
188
|
+
method: 'POST',
|
|
189
|
+
signal,
|
|
190
|
+
body: JSON.stringify(params),
|
|
191
|
+
contentType: 'application/json',
|
|
192
|
+
telemetry: {
|
|
193
|
+
name: 'agentuity.workflow.create',
|
|
194
|
+
attributes: {
|
|
195
|
+
name: params.name,
|
|
196
|
+
source_type: params.source_type,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
if (res.ok) {
|
|
201
|
+
if (res.data.success) {
|
|
202
|
+
return res.data.data;
|
|
203
|
+
}
|
|
204
|
+
throw new WorkflowResponseError({
|
|
205
|
+
status: res.response.status,
|
|
206
|
+
message: res.data.message || 'Failed to create workflow',
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
throw await toServiceException('POST', url, res.response);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Updates an existing workflow's name, description, or status.
|
|
213
|
+
*
|
|
214
|
+
* @param workflowId - The unique workflow identifier
|
|
215
|
+
* @param params - Fields to update; only provided fields are changed
|
|
216
|
+
* @returns A promise resolving to the updated workflow
|
|
217
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
218
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```typescript
|
|
222
|
+
* const result = await service.update('wf_abc123', {
|
|
223
|
+
* name: 'Updated Workflow Name',
|
|
224
|
+
* status: 'disabled',
|
|
225
|
+
* });
|
|
226
|
+
* console.log('Updated:', result.workflow.name);
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
async update(workflowId, params) {
|
|
230
|
+
const url = this.#createUrl(`/workflow/${encodeURIComponent(workflowId)}`);
|
|
231
|
+
const signal = createTimeoutSignal();
|
|
232
|
+
const res = await this.#adapter.invoke(url, {
|
|
233
|
+
method: 'PATCH',
|
|
234
|
+
signal,
|
|
235
|
+
body: JSON.stringify(params),
|
|
236
|
+
contentType: 'application/json',
|
|
237
|
+
telemetry: {
|
|
238
|
+
name: 'agentuity.workflow.update',
|
|
239
|
+
attributes: {
|
|
240
|
+
workflowId,
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
if (res.ok) {
|
|
245
|
+
if (res.data.success) {
|
|
246
|
+
return res.data.data;
|
|
247
|
+
}
|
|
248
|
+
throw new WorkflowResponseError({
|
|
249
|
+
status: res.response.status,
|
|
250
|
+
message: res.data.message || 'Failed to update workflow',
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
throw await toServiceException('PATCH', url, res.response);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Updates the workflow graph (nodes and edges) for a workflow.
|
|
257
|
+
*
|
|
258
|
+
* @param workflowId - The unique workflow identifier
|
|
259
|
+
* @param params - The new graph definition with nodes and edges
|
|
260
|
+
* @returns A promise resolving to the updated workflow
|
|
261
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
262
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
263
|
+
*
|
|
264
|
+
* @example
|
|
265
|
+
* ```typescript
|
|
266
|
+
* const result = await service.updateGraph('wf_abc123', {
|
|
267
|
+
* nodes: [{ id: 'n1', type: 'filter', data: { expr: '...' } }],
|
|
268
|
+
* edges: [{ id: 'e1', source: 'n1', target: 'n2' }],
|
|
269
|
+
* });
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
async updateGraph(workflowId, params) {
|
|
273
|
+
const url = this.#createUrl(`/workflow/graph/${encodeURIComponent(workflowId)}`);
|
|
274
|
+
const signal = createTimeoutSignal();
|
|
275
|
+
const res = await this.#adapter.invoke(url, {
|
|
276
|
+
method: 'PUT',
|
|
277
|
+
signal,
|
|
278
|
+
body: JSON.stringify({ graph_json: params }),
|
|
279
|
+
contentType: 'application/json',
|
|
280
|
+
telemetry: {
|
|
281
|
+
name: 'agentuity.workflow.updateGraph',
|
|
282
|
+
attributes: {
|
|
283
|
+
workflowId,
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
});
|
|
287
|
+
if (res.ok) {
|
|
288
|
+
if (res.data.success) {
|
|
289
|
+
return res.data.data;
|
|
290
|
+
}
|
|
291
|
+
throw new WorkflowResponseError({
|
|
292
|
+
status: res.response.status,
|
|
293
|
+
message: res.data.message || 'Failed to update workflow graph',
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
throw await toServiceException('PUT', url, res.response);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Deletes a workflow and all associated data.
|
|
300
|
+
*
|
|
301
|
+
* @param workflowId - The unique workflow identifier
|
|
302
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
303
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
* await service.delete('wf_abc123');
|
|
308
|
+
* console.log('Workflow deleted');
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
async delete(workflowId) {
|
|
312
|
+
const url = this.#createUrl(`/workflow/${encodeURIComponent(workflowId)}`);
|
|
313
|
+
const signal = createTimeoutSignal();
|
|
314
|
+
const res = await this.#adapter.invoke(url, {
|
|
315
|
+
method: 'DELETE',
|
|
316
|
+
signal,
|
|
317
|
+
contentType: 'application/json',
|
|
318
|
+
telemetry: {
|
|
319
|
+
name: 'agentuity.workflow.delete',
|
|
320
|
+
attributes: {
|
|
321
|
+
workflowId,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
if (res.ok) {
|
|
326
|
+
// Handle 204 No Content or responses without a body
|
|
327
|
+
if (res.response.status === 204 || res.data === undefined) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (res.data.success) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
throw new WorkflowResponseError({
|
|
334
|
+
status: res.response.status,
|
|
335
|
+
message: res.data.message || 'Failed to delete workflow',
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
throw await toServiceException('DELETE', url, res.response);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Tests a workflow with a sample payload.
|
|
342
|
+
*
|
|
343
|
+
* Sends the provided payload through the workflow and returns the execution
|
|
344
|
+
* result including individual step outcomes.
|
|
345
|
+
*
|
|
346
|
+
* @param workflowId - The unique workflow identifier
|
|
347
|
+
* @param params - The test parameters including the payload to send
|
|
348
|
+
* @returns A promise resolving to the test execution result
|
|
349
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
350
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* ```typescript
|
|
354
|
+
* const result = await service.test('wf_abc123', {
|
|
355
|
+
* payload: { event: 'push', repo: 'my-repo' },
|
|
356
|
+
* });
|
|
357
|
+
* console.log('Test status:', result.status);
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
async test(workflowId, params) {
|
|
361
|
+
const url = this.#createUrl(`/workflow/test/${encodeURIComponent(workflowId)}`);
|
|
362
|
+
const signal = createTimeoutSignal();
|
|
363
|
+
const res = await this.#adapter.invoke(url, {
|
|
364
|
+
method: 'POST',
|
|
365
|
+
signal,
|
|
366
|
+
body: JSON.stringify(params),
|
|
367
|
+
contentType: 'application/json',
|
|
368
|
+
telemetry: {
|
|
369
|
+
name: 'agentuity.workflow.test',
|
|
370
|
+
attributes: {
|
|
371
|
+
workflowId,
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
});
|
|
375
|
+
if (res.ok) {
|
|
376
|
+
if (res.data.success) {
|
|
377
|
+
return res.data.data;
|
|
378
|
+
}
|
|
379
|
+
throw new WorkflowResponseError({
|
|
380
|
+
status: res.response.status,
|
|
381
|
+
message: res.data.message || 'Failed to test workflow',
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
throw await toServiceException('POST', url, res.response);
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Gets workflow activity statistics for the authenticated organization.
|
|
388
|
+
*
|
|
389
|
+
* Returns aggregate counts of workflows, executions, and their statuses.
|
|
390
|
+
*
|
|
391
|
+
* @param days - Optional number of days to look back for activity (default: server-side default)
|
|
392
|
+
* @returns A promise resolving to the activity statistics
|
|
393
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
394
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* ```typescript
|
|
398
|
+
* const activity = await service.activity(7);
|
|
399
|
+
* console.log(`${activity.total_workflows} workflows, ${activity.total_executions} executions`);
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
402
|
+
async activity(days) {
|
|
403
|
+
const url = this.#createUrl('/workflow/activity');
|
|
404
|
+
const signal = createTimeoutSignal();
|
|
405
|
+
const queryParams = {};
|
|
406
|
+
if (days !== undefined)
|
|
407
|
+
queryParams['days'] = String(days);
|
|
408
|
+
const qs = new URLSearchParams(queryParams);
|
|
409
|
+
const qsStr = qs.toString();
|
|
410
|
+
const finalUrl = qsStr ? `${url}?${qsStr}` : url;
|
|
411
|
+
const res = await this.#adapter.invoke(finalUrl, {
|
|
412
|
+
method: 'GET',
|
|
413
|
+
signal,
|
|
414
|
+
contentType: 'application/json',
|
|
415
|
+
telemetry: {
|
|
416
|
+
name: 'agentuity.workflow.activity',
|
|
417
|
+
},
|
|
418
|
+
});
|
|
419
|
+
if (res.ok) {
|
|
420
|
+
if (res.data.success) {
|
|
421
|
+
return res.data.data;
|
|
422
|
+
}
|
|
423
|
+
throw new WorkflowResponseError({
|
|
424
|
+
status: res.response.status,
|
|
425
|
+
message: res.data.message || 'Failed to get workflow activity',
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
throw await toServiceException('GET', url, res.response);
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Lists execution records for a specific workflow.
|
|
432
|
+
*
|
|
433
|
+
* @param workflowId - The unique workflow identifier
|
|
434
|
+
* @returns A promise resolving to the list of executions
|
|
435
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
436
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
* ```typescript
|
|
440
|
+
* const executions = await service.listExecutions('wf_abc123');
|
|
441
|
+
* for (const exec of executions) {
|
|
442
|
+
* console.log(`${exec.id}: ${exec.status}`);
|
|
443
|
+
* }
|
|
444
|
+
* ```
|
|
445
|
+
*/
|
|
446
|
+
async listExecutions(workflowId) {
|
|
447
|
+
const url = this.#createUrl(`/workflow/executions/${encodeURIComponent(workflowId)}`);
|
|
448
|
+
const signal = createTimeoutSignal();
|
|
449
|
+
const res = await this.#adapter.invoke(url, {
|
|
450
|
+
method: 'GET',
|
|
451
|
+
signal,
|
|
452
|
+
contentType: 'application/json',
|
|
453
|
+
telemetry: {
|
|
454
|
+
name: 'agentuity.workflow.listExecutions',
|
|
455
|
+
attributes: {
|
|
456
|
+
workflowId,
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
});
|
|
460
|
+
if (res.ok) {
|
|
461
|
+
if (res.data.success) {
|
|
462
|
+
return res.data.data;
|
|
463
|
+
}
|
|
464
|
+
throw new WorkflowResponseError({
|
|
465
|
+
status: res.response.status,
|
|
466
|
+
message: res.data.message || 'Failed to list workflow executions',
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
throw await toServiceException('GET', url, res.response);
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Lists delivery records for a specific workflow execution.
|
|
473
|
+
*
|
|
474
|
+
* @param executionId - The unique execution identifier
|
|
475
|
+
* @returns A promise resolving to the list of deliveries
|
|
476
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
477
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* ```typescript
|
|
481
|
+
* const deliveries = await service.listDeliveries('exec_abc123');
|
|
482
|
+
* for (const d of deliveries) {
|
|
483
|
+
* console.log(`${d.destination_type}: ${d.status}`);
|
|
484
|
+
* }
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
async listDeliveries(executionId) {
|
|
488
|
+
const url = this.#createUrl(`/workflow/deliveries/${encodeURIComponent(executionId)}`);
|
|
489
|
+
const signal = createTimeoutSignal();
|
|
490
|
+
const res = await this.#adapter.invoke(url, {
|
|
491
|
+
method: 'GET',
|
|
492
|
+
signal,
|
|
493
|
+
contentType: 'application/json',
|
|
494
|
+
telemetry: {
|
|
495
|
+
name: 'agentuity.workflow.listDeliveries',
|
|
496
|
+
attributes: {
|
|
497
|
+
executionId,
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
});
|
|
501
|
+
if (res.ok) {
|
|
502
|
+
if (res.data.success) {
|
|
503
|
+
return res.data.data;
|
|
504
|
+
}
|
|
505
|
+
throw new WorkflowResponseError({
|
|
506
|
+
status: res.response.status,
|
|
507
|
+
message: res.data.message || 'Failed to list workflow deliveries',
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
throw await toServiceException('GET', url, res.response);
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Gets the most recent payload received by a workflow.
|
|
514
|
+
*
|
|
515
|
+
* Useful for inspecting the last event that triggered the workflow, e.g.
|
|
516
|
+
* when building or debugging workflow graphs.
|
|
517
|
+
*
|
|
518
|
+
* @param workflowId - The unique workflow identifier
|
|
519
|
+
* @returns A promise resolving to the recent payload data
|
|
520
|
+
* @throws {@link WorkflowResponseError} If the API returns a failure response body
|
|
521
|
+
* @throws {@link ServiceException} If the HTTP request fails
|
|
522
|
+
*
|
|
523
|
+
* @example
|
|
524
|
+
* ```typescript
|
|
525
|
+
* const payload = await service.getRecentPayload('wf_abc123');
|
|
526
|
+
* console.log('Last payload:', JSON.stringify(payload, null, 2));
|
|
527
|
+
* ```
|
|
528
|
+
*/
|
|
529
|
+
async getRecentPayload(workflowId) {
|
|
530
|
+
const url = this.#createUrl(`/workflow/recent-payload/${encodeURIComponent(workflowId)}`);
|
|
531
|
+
const signal = createTimeoutSignal();
|
|
532
|
+
const res = await this.#adapter.invoke(url, {
|
|
533
|
+
method: 'GET',
|
|
534
|
+
signal,
|
|
535
|
+
contentType: 'application/json',
|
|
536
|
+
telemetry: {
|
|
537
|
+
name: 'agentuity.workflow.getRecentPayload',
|
|
538
|
+
attributes: {
|
|
539
|
+
workflowId,
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
});
|
|
543
|
+
if (res.ok) {
|
|
544
|
+
if (res.data.success) {
|
|
545
|
+
return res.data.data;
|
|
546
|
+
}
|
|
547
|
+
throw new WorkflowResponseError({
|
|
548
|
+
status: res.response.status,
|
|
549
|
+
message: res.data.message || 'Failed to get recent payload',
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
throw await toServiceException('GET', url, res.response);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/services/workflow/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAkBjD;;GAEG;AACH,MAAM,qBAAqB,GAAG,eAAe,CAAC,uBAAuB,CAAC,EAElE,CAAC;AAEL;;;;;;;;;;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