@eigenpal/sdk 0.6.5 → 0.6.7
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/package.json +1 -1
- package/src/generated/index.ts +8 -0
- package/src/generated/sdk.gen.ts +25 -0
- package/src/generated/types.gen.ts +78 -1
- package/src/resources/agents.ts +15 -1
- package/src/telemetry.ts +1 -1
package/package.json
CHANGED
package/src/generated/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ export {
|
|
|
28
28
|
agentsTriggersEmailUpdate,
|
|
29
29
|
agentsTriggersEmailUpdateAlias,
|
|
30
30
|
agentsUpdate,
|
|
31
|
+
agentsVersionsList,
|
|
31
32
|
automationsSync,
|
|
32
33
|
sourceLockfilePreview,
|
|
33
34
|
sourceRaw,
|
|
@@ -179,6 +180,11 @@ export type {
|
|
|
179
180
|
AgentsUpdateErrors,
|
|
180
181
|
AgentsUpdateResponse,
|
|
181
182
|
AgentsUpdateResponses,
|
|
183
|
+
AgentsVersionsListData,
|
|
184
|
+
AgentsVersionsListError,
|
|
185
|
+
AgentsVersionsListErrors,
|
|
186
|
+
AgentsVersionsListResponse,
|
|
187
|
+
AgentsVersionsListResponses,
|
|
182
188
|
ApiErrorEnvelope,
|
|
183
189
|
ApiErrorIssue,
|
|
184
190
|
AutomationSyncResponse,
|
|
@@ -197,6 +203,7 @@ export type {
|
|
|
197
203
|
ExecutionSummary,
|
|
198
204
|
GetAgentResponse,
|
|
199
205
|
ListAgentRunsResponse,
|
|
206
|
+
ListAgentVersionsResponse,
|
|
200
207
|
ListAgentsResponse,
|
|
201
208
|
ListVersionsResponse,
|
|
202
209
|
ListWorkflowExecutionsResponse,
|
|
@@ -206,6 +213,7 @@ export type {
|
|
|
206
213
|
RawSourceResponse,
|
|
207
214
|
RenameExpectedFileBody,
|
|
208
215
|
RenameExpectedFileResponse,
|
|
216
|
+
RerunAgentRunBody,
|
|
209
217
|
RerunAgentRunResponse,
|
|
210
218
|
RunAgentBody,
|
|
211
219
|
RunAgentResponse,
|
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -82,6 +82,9 @@ import type {
|
|
|
82
82
|
AgentsUpdateData,
|
|
83
83
|
AgentsUpdateErrors,
|
|
84
84
|
AgentsUpdateResponses,
|
|
85
|
+
AgentsVersionsListData,
|
|
86
|
+
AgentsVersionsListErrors,
|
|
87
|
+
AgentsVersionsListResponses,
|
|
85
88
|
AutomationsSyncData,
|
|
86
89
|
AutomationsSyncErrors,
|
|
87
90
|
AutomationsSyncResponses,
|
|
@@ -364,6 +367,24 @@ export const agentsTriggersEmailCreateAlias = <ThrowOnError extends boolean = fa
|
|
|
364
367
|
},
|
|
365
368
|
});
|
|
366
369
|
|
|
370
|
+
/**
|
|
371
|
+
* List agent Git versions
|
|
372
|
+
*
|
|
373
|
+
* Lists Git-backed release versions for an agent. Release notes are included when a matching legacy published-version message exists.
|
|
374
|
+
*/
|
|
375
|
+
export const agentsVersionsList = <ThrowOnError extends boolean = false>(
|
|
376
|
+
options: Options<AgentsVersionsListData, ThrowOnError>
|
|
377
|
+
) =>
|
|
378
|
+
(options.client ?? client).get<
|
|
379
|
+
AgentsVersionsListResponses,
|
|
380
|
+
AgentsVersionsListErrors,
|
|
381
|
+
ThrowOnError
|
|
382
|
+
>({
|
|
383
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
384
|
+
url: '/api/v1/agents/{agentId}/versions',
|
|
385
|
+
...options,
|
|
386
|
+
});
|
|
387
|
+
|
|
367
388
|
/**
|
|
368
389
|
* List agents
|
|
369
390
|
*
|
|
@@ -596,6 +617,10 @@ export const agentsRunsRerun = <ThrowOnError extends boolean = false>(
|
|
|
596
617
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
597
618
|
url: '/api/v1/agents/runs/{runId}/rerun',
|
|
598
619
|
...options,
|
|
620
|
+
headers: {
|
|
621
|
+
'Content-Type': 'application/json',
|
|
622
|
+
...options.headers,
|
|
623
|
+
},
|
|
599
624
|
});
|
|
600
625
|
|
|
601
626
|
/**
|
|
@@ -54,6 +54,13 @@ export type UpdateAgentExecutionFeedbackBody = {
|
|
|
54
54
|
expected?: unknown | null;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
export type RerunAgentRunBody = {
|
|
58
|
+
/**
|
|
59
|
+
* Git source ref to use for the rerun. Defaults to latest. Pass the source run version to reproduce the previous version.
|
|
60
|
+
*/
|
|
61
|
+
sourceRef?: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
57
64
|
export type SourceSecretsDecryptBody = {
|
|
58
65
|
organizationId?: string;
|
|
59
66
|
executionId?: string;
|
|
@@ -262,6 +269,21 @@ export type AgentExecutionSummary = {
|
|
|
262
269
|
[key: string]: unknown;
|
|
263
270
|
};
|
|
264
271
|
|
|
272
|
+
export type ListAgentVersionsResponse = {
|
|
273
|
+
agentId: string;
|
|
274
|
+
slug: string;
|
|
275
|
+
packagePath: string;
|
|
276
|
+
versions: Array<{
|
|
277
|
+
version: string;
|
|
278
|
+
sourceRef: string;
|
|
279
|
+
tag: string;
|
|
280
|
+
commit: string;
|
|
281
|
+
notes: string | null;
|
|
282
|
+
createdAt: string | null;
|
|
283
|
+
latest: boolean;
|
|
284
|
+
}>;
|
|
285
|
+
};
|
|
286
|
+
|
|
265
287
|
export type ListAgentsResponse = {
|
|
266
288
|
data: Array<AgentSummary>;
|
|
267
289
|
total: number;
|
|
@@ -317,6 +339,10 @@ export type RerunAgentRunResponse = {
|
|
|
317
339
|
runId: string;
|
|
318
340
|
sourceRunId: string;
|
|
319
341
|
status: ExecutionStatus;
|
|
342
|
+
requestedSourceRef?: string | null;
|
|
343
|
+
resolvedGitRef?: string | null;
|
|
344
|
+
resolvedGitTag?: string | null;
|
|
345
|
+
resolvedCommitSha?: string | null;
|
|
320
346
|
};
|
|
321
347
|
|
|
322
348
|
export type AgentRunResponse = {
|
|
@@ -1314,6 +1340,57 @@ export type AgentsTriggersEmailCreateAliasResponses = {
|
|
|
1314
1340
|
export type AgentsTriggersEmailCreateAliasResponse =
|
|
1315
1341
|
AgentsTriggersEmailCreateAliasResponses[keyof AgentsTriggersEmailCreateAliasResponses];
|
|
1316
1342
|
|
|
1343
|
+
export type AgentsVersionsListData = {
|
|
1344
|
+
body?: never;
|
|
1345
|
+
path: {
|
|
1346
|
+
/**
|
|
1347
|
+
* Agent id or slug
|
|
1348
|
+
*/
|
|
1349
|
+
agentId: string;
|
|
1350
|
+
};
|
|
1351
|
+
query?: never;
|
|
1352
|
+
url: '/api/v1/agents/{agentId}/versions';
|
|
1353
|
+
};
|
|
1354
|
+
|
|
1355
|
+
export type AgentsVersionsListErrors = {
|
|
1356
|
+
/**
|
|
1357
|
+
* Validation error. Request shape did not match the spec.
|
|
1358
|
+
*/
|
|
1359
|
+
400: ApiErrorEnvelope;
|
|
1360
|
+
/**
|
|
1361
|
+
* Missing or invalid API key
|
|
1362
|
+
*/
|
|
1363
|
+
401: ApiErrorEnvelope;
|
|
1364
|
+
/**
|
|
1365
|
+
* API key lacks required scope
|
|
1366
|
+
*/
|
|
1367
|
+
403: ApiErrorEnvelope;
|
|
1368
|
+
/**
|
|
1369
|
+
* Resource not found
|
|
1370
|
+
*/
|
|
1371
|
+
404: ApiErrorEnvelope;
|
|
1372
|
+
/**
|
|
1373
|
+
* Rate limit exceeded
|
|
1374
|
+
*/
|
|
1375
|
+
429: ApiErrorEnvelope;
|
|
1376
|
+
/**
|
|
1377
|
+
* Internal server error
|
|
1378
|
+
*/
|
|
1379
|
+
500: ApiErrorEnvelope;
|
|
1380
|
+
};
|
|
1381
|
+
|
|
1382
|
+
export type AgentsVersionsListError = AgentsVersionsListErrors[keyof AgentsVersionsListErrors];
|
|
1383
|
+
|
|
1384
|
+
export type AgentsVersionsListResponses = {
|
|
1385
|
+
/**
|
|
1386
|
+
* Agent versions
|
|
1387
|
+
*/
|
|
1388
|
+
200: ListAgentVersionsResponse;
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1391
|
+
export type AgentsVersionsListResponse =
|
|
1392
|
+
AgentsVersionsListResponses[keyof AgentsVersionsListResponses];
|
|
1393
|
+
|
|
1317
1394
|
export type AgentsListData = {
|
|
1318
1395
|
body?: never;
|
|
1319
1396
|
path?: never;
|
|
@@ -1941,7 +2018,7 @@ export type AgentsRunsFilesDownloadResponses = {
|
|
|
1941
2018
|
};
|
|
1942
2019
|
|
|
1943
2020
|
export type AgentsRunsRerunData = {
|
|
1944
|
-
body
|
|
2021
|
+
body: RerunAgentRunBody;
|
|
1945
2022
|
path: {
|
|
1946
2023
|
/**
|
|
1947
2024
|
* Source run id
|
package/src/resources/agents.ts
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
agentsTriggersEmailUpdate,
|
|
29
29
|
agentsTriggersEmailUpdateAlias,
|
|
30
30
|
agentsUpdate,
|
|
31
|
+
agentsVersionsList,
|
|
31
32
|
} from '../generated/sdk.gen';
|
|
32
33
|
import type {
|
|
33
34
|
AgentExecutionExpectedArtifacts,
|
|
@@ -48,6 +49,7 @@ import type {
|
|
|
48
49
|
CreateAgentResponse,
|
|
49
50
|
GetAgentResponse,
|
|
50
51
|
ListAgentRunsResponse,
|
|
52
|
+
ListAgentVersionsResponse,
|
|
51
53
|
ListAgentsResponse,
|
|
52
54
|
PatchAgentBody,
|
|
53
55
|
PatchAgentResponse,
|
|
@@ -240,12 +242,15 @@ export class AgentRunsResource {
|
|
|
240
242
|
|
|
241
243
|
async rerun(
|
|
242
244
|
runId: string,
|
|
243
|
-
options: { signal?: AbortSignal } = {}
|
|
245
|
+
options: { sourceRef?: string; signal?: AbortSignal } = {}
|
|
244
246
|
): Promise<RerunAgentRunResponse> {
|
|
245
247
|
return this.dispatch(() =>
|
|
246
248
|
agentsRunsRerun({
|
|
247
249
|
client: this.client,
|
|
248
250
|
path: { runId },
|
|
251
|
+
body: {
|
|
252
|
+
...(options.sourceRef !== undefined ? { sourceRef: options.sourceRef } : {}),
|
|
253
|
+
},
|
|
249
254
|
signal: options.signal,
|
|
250
255
|
})
|
|
251
256
|
);
|
|
@@ -496,6 +501,15 @@ export class AgentsResource {
|
|
|
496
501
|
);
|
|
497
502
|
}
|
|
498
503
|
|
|
504
|
+
async versions(
|
|
505
|
+
agentId: string,
|
|
506
|
+
options: { signal?: AbortSignal } = {}
|
|
507
|
+
): Promise<ListAgentVersionsResponse> {
|
|
508
|
+
return this.dispatch(() =>
|
|
509
|
+
agentsVersionsList({ client: this.client, path: { agentId }, signal: options.signal })
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
|
|
499
513
|
async create(
|
|
500
514
|
body: CreateAgentBody,
|
|
501
515
|
options: { signal?: AbortSignal } = {}
|
package/src/telemetry.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
export const SDK_LANGUAGE = 'typescript';
|
|
20
20
|
// Rewritten at publish time by scripts/render-sdk-versions.sh.
|
|
21
21
|
// Keep this string literal exactly stable — sed matches on it.
|
|
22
|
-
export const SDK_VERSION = '0.6.
|
|
22
|
+
export const SDK_VERSION = '0.6.7';
|
|
23
23
|
|
|
24
24
|
function detectRuntime(): string {
|
|
25
25
|
const g = globalThis as unknown as {
|