@eigenpal/sdk 0.7.0 → 0.7.2
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 +12 -0
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +20 -18
- package/src/generated/types.gen.ts +49 -3
- package/src/telemetry.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eigenpal/sdk
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c5a709c: Public workflow list/detail responses include `apiEnabled` and `triggers`; run definition docs note workflow-only scope.
|
|
8
|
+
|
|
9
|
+
## 0.7.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 9db3f01: Expose `apiEnabled` and `triggers` on `AgentSummary` for runtime trigger projection.
|
|
14
|
+
|
|
3
15
|
## 0.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
21
21
|
/**
|
|
22
22
|
* List or download agent source files
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* List or read agent source files from Git.
|
|
25
25
|
*/
|
|
26
26
|
export const agentsFilesListOrGet = <ThrowOnError extends boolean = false>(options: Options<AgentsFilesListOrGetData, ThrowOnError>) => (options.client ?? client).get<AgentsFilesListOrGetResponses, AgentsFilesListOrGetErrors, ThrowOnError>({
|
|
27
27
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -155,7 +155,7 @@ export const agentsTriggersEmailCreateAlias = <ThrowOnError extends boolean = fa
|
|
|
155
155
|
/**
|
|
156
156
|
* List agent Git versions
|
|
157
157
|
*
|
|
158
|
-
*
|
|
158
|
+
* List Git release versions for an agent.
|
|
159
159
|
*/
|
|
160
160
|
export const agentsVersionsList = <ThrowOnError extends boolean = false>(options: Options<AgentsVersionsListData, ThrowOnError>) => (options.client ?? client).get<AgentsVersionsListResponses, AgentsVersionsListErrors, ThrowOnError>({
|
|
161
161
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -166,7 +166,7 @@ export const agentsVersionsList = <ThrowOnError extends boolean = false>(options
|
|
|
166
166
|
/**
|
|
167
167
|
* List agents
|
|
168
168
|
*
|
|
169
|
-
*
|
|
169
|
+
* List agents with pagination.
|
|
170
170
|
*/
|
|
171
171
|
export const agentsList = <ThrowOnError extends boolean = false>(options?: Options<AgentsListData, ThrowOnError>) => (options?.client ?? client).get<AgentsListResponses, AgentsListErrors, ThrowOnError>({
|
|
172
172
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -177,7 +177,7 @@ export const agentsList = <ThrowOnError extends boolean = false>(options?: Optio
|
|
|
177
177
|
/**
|
|
178
178
|
* Create an agent
|
|
179
179
|
*
|
|
180
|
-
*
|
|
180
|
+
* Create an agent and scaffold its Git source package.
|
|
181
181
|
*/
|
|
182
182
|
export const agentsCreate = <ThrowOnError extends boolean = false>(options: Options<AgentsCreateData, ThrowOnError>) => (options.client ?? client).post<AgentsCreateResponses, AgentsCreateErrors, ThrowOnError>({
|
|
183
183
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -214,7 +214,7 @@ export const automationsSync = <ThrowOnError extends boolean = false>(options: O
|
|
|
214
214
|
/**
|
|
215
215
|
* List runs
|
|
216
216
|
*
|
|
217
|
-
*
|
|
217
|
+
* List workflow and agent runs with cursor pagination.
|
|
218
218
|
*/
|
|
219
219
|
export const runsList = <ThrowOnError extends boolean = false>(options?: Options<RunsListData, ThrowOnError>) => (options?.client ?? client).get<RunsListResponses, RunsListErrors, ThrowOnError>({
|
|
220
220
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -223,9 +223,9 @@ export const runsList = <ThrowOnError extends boolean = false>(options?: Options
|
|
|
223
223
|
});
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
|
-
* Start a
|
|
226
|
+
* Start a run
|
|
227
227
|
*
|
|
228
|
-
*
|
|
228
|
+
* Start a run. Send JSON or multipart/form-data.
|
|
229
229
|
*/
|
|
230
230
|
export const runsStart = <ThrowOnError extends boolean = false>(options: Options<RunsStartData, ThrowOnError>) => (options.client ?? client).post<RunsStartResponses, RunsStartErrors, ThrowOnError>({
|
|
231
231
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -240,7 +240,7 @@ export const runsStart = <ThrowOnError extends boolean = false>(options: Options
|
|
|
240
240
|
/**
|
|
241
241
|
* Download run artifact
|
|
242
242
|
*
|
|
243
|
-
* Download
|
|
243
|
+
* Download one artifact by path.
|
|
244
244
|
*/
|
|
245
245
|
export const runsArtifactsGet = <ThrowOnError extends boolean = false>(options: Options<RunsArtifactsGetData, ThrowOnError>) => (options.client ?? client).get<RunsArtifactsGetResponses, RunsArtifactsGetErrors, ThrowOnError>({
|
|
246
246
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -251,7 +251,7 @@ export const runsArtifactsGet = <ThrowOnError extends boolean = false>(options:
|
|
|
251
251
|
/**
|
|
252
252
|
* List run artifacts
|
|
253
253
|
*
|
|
254
|
-
*
|
|
254
|
+
* List downloadable artifact paths for a run.
|
|
255
255
|
*/
|
|
256
256
|
export const runsArtifactsList = <ThrowOnError extends boolean = false>(options: Options<RunsArtifactsListData, ThrowOnError>) => (options.client ?? client).get<RunsArtifactsListResponses, RunsArtifactsListErrors, ThrowOnError>({
|
|
257
257
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -262,7 +262,7 @@ export const runsArtifactsList = <ThrowOnError extends boolean = false>(options:
|
|
|
262
262
|
/**
|
|
263
263
|
* Cancel run
|
|
264
264
|
*
|
|
265
|
-
*
|
|
265
|
+
* Cancel a queued run or request cancellation of an in-flight run.
|
|
266
266
|
*/
|
|
267
267
|
export const runsCancel = <ThrowOnError extends boolean = false>(options: Options<RunsCancelData, ThrowOnError>) => (options.client ?? client).post<RunsCancelResponses, RunsCancelErrors, ThrowOnError>({
|
|
268
268
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -291,7 +291,7 @@ export const runsConnect = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
291
291
|
/**
|
|
292
292
|
* Get run definition snapshot
|
|
293
293
|
*
|
|
294
|
-
*
|
|
294
|
+
* Workflow definition snapshot captured when the run was created. Workflow runs only; agent runs return not_found.
|
|
295
295
|
*/
|
|
296
296
|
export const runsDefinitionGet = <ThrowOnError extends boolean = false>(options: Options<RunsDefinitionGetData, ThrowOnError>) => (options.client ?? client).get<RunsDefinitionGetResponses, RunsDefinitionGetErrors, ThrowOnError>({
|
|
297
297
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -386,7 +386,7 @@ export const runsFeedbackUpdate = <ThrowOnError extends boolean = false>(options
|
|
|
386
386
|
/**
|
|
387
387
|
* Download run output files zip
|
|
388
388
|
*
|
|
389
|
-
* Download agent run output
|
|
389
|
+
* Download agent run output files as a zip.
|
|
390
390
|
*/
|
|
391
391
|
export const runsFilesZipGet = <ThrowOnError extends boolean = false>(options: Options<RunsFilesZipGetData, ThrowOnError>) => (options.client ?? client).get<RunsFilesZipGetResponses, RunsFilesZipGetErrors, ThrowOnError>({
|
|
392
392
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -406,7 +406,7 @@ export const runsFilesDelete = <ThrowOnError extends boolean = false>(options: O
|
|
|
406
406
|
/**
|
|
407
407
|
* List run files
|
|
408
408
|
*
|
|
409
|
-
* List
|
|
409
|
+
* List workflow run input and output file rows.
|
|
410
410
|
*/
|
|
411
411
|
export const runsFilesList = <ThrowOnError extends boolean = false>(options: Options<RunsFilesListData, ThrowOnError>) => (options.client ?? client).get<RunsFilesListResponses, RunsFilesListErrors, ThrowOnError>({
|
|
412
412
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -417,7 +417,7 @@ export const runsFilesList = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
417
417
|
/**
|
|
418
418
|
* Upload run input file
|
|
419
419
|
*
|
|
420
|
-
* Upload a
|
|
420
|
+
* Upload a workflow run input file before execution starts.
|
|
421
421
|
*/
|
|
422
422
|
export const runsFilesUpload = <ThrowOnError extends boolean = false>(options: Options<RunsFilesUploadData, ThrowOnError>) => (options.client ?? client).post<RunsFilesUploadResponses, RunsFilesUploadErrors, ThrowOnError>({
|
|
423
423
|
...formDataBodySerializer,
|
|
@@ -432,6 +432,8 @@ export const runsFilesUpload = <ThrowOnError extends boolean = false>(options: O
|
|
|
432
432
|
|
|
433
433
|
/**
|
|
434
434
|
* Rerun run
|
|
435
|
+
*
|
|
436
|
+
* Start a new run from an existing run id.
|
|
435
437
|
*/
|
|
436
438
|
export const runsRerun = <ThrowOnError extends boolean = false>(options: Options<RunsRerunData, ThrowOnError>) => (options.client ?? client).post<RunsRerunResponses, RunsRerunErrors, ThrowOnError>({
|
|
437
439
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -442,7 +444,7 @@ export const runsRerun = <ThrowOnError extends boolean = false>(options: Options
|
|
|
442
444
|
/**
|
|
443
445
|
* Get run
|
|
444
446
|
*
|
|
445
|
-
*
|
|
447
|
+
* Fetch one run by id. Use `expand` for input, usage, execution, and debug detail.
|
|
446
448
|
*/
|
|
447
449
|
export const runsGet = <ThrowOnError extends boolean = false>(options: Options<RunsGetData, ThrowOnError>) => (options.client ?? client).get<RunsGetResponses, RunsGetErrors, ThrowOnError>({
|
|
448
450
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -536,7 +538,7 @@ export const sourceSecretsEncrypt = <ThrowOnError extends boolean = false>(optio
|
|
|
536
538
|
/**
|
|
537
539
|
* Get a workflow by id
|
|
538
540
|
*
|
|
539
|
-
*
|
|
541
|
+
* Get a workflow by id, including current YAML.
|
|
540
542
|
*/
|
|
541
543
|
export const workflowsGet = <ThrowOnError extends boolean = false>(options: Options<WorkflowsGetData, ThrowOnError>) => (options.client ?? client).get<WorkflowsGetResponses, WorkflowsGetErrors, ThrowOnError>({
|
|
542
544
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -547,7 +549,7 @@ export const workflowsGet = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
547
549
|
/**
|
|
548
550
|
* List tagged versions for a workflow
|
|
549
551
|
*
|
|
550
|
-
*
|
|
552
|
+
* List published workflow versions.
|
|
551
553
|
*/
|
|
552
554
|
export const workflowsVersionsList = <ThrowOnError extends boolean = false>(options: Options<WorkflowsVersionsListData, ThrowOnError>) => (options.client ?? client).get<WorkflowsVersionsListResponses, WorkflowsVersionsListErrors, ThrowOnError>({
|
|
553
555
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -558,7 +560,7 @@ export const workflowsVersionsList = <ThrowOnError extends boolean = false>(opti
|
|
|
558
560
|
/**
|
|
559
561
|
* List workflows
|
|
560
562
|
*
|
|
561
|
-
*
|
|
563
|
+
* List workflows with pagination.
|
|
562
564
|
*/
|
|
563
565
|
export const workflowsList = <ThrowOnError extends boolean = false>(options?: Options<WorkflowsListData, ThrowOnError>) => (options?.client ?? client).get<WorkflowsListResponses, WorkflowsListErrors, ThrowOnError>({
|
|
564
566
|
security: [{ scheme: 'bearer', type: 'http' }],
|
|
@@ -21,6 +21,9 @@ export type CreateAgentBody = {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Run envelope. Declare provenance with the `X-Eigenpal-Trigger` header (`api` or `cli`). Legacy 0.5.12 body shapes remain accepted.
|
|
26
|
+
*/
|
|
24
27
|
export type RunStartBody = {
|
|
25
28
|
/**
|
|
26
29
|
* Automation target without a version suffix, e.g. workflows.invoice or agents.support.
|
|
@@ -147,7 +150,7 @@ export type ApiErrorIssue = {
|
|
|
147
150
|
*/
|
|
148
151
|
message: string;
|
|
149
152
|
/**
|
|
150
|
-
* Machine-readable error code (e.g. invalid_value, not_found)
|
|
153
|
+
* Machine-readable error code (e.g. invalid_value, not_found, api_trigger_disabled, manual_trigger_disabled)
|
|
151
154
|
*/
|
|
152
155
|
code: string;
|
|
153
156
|
/**
|
|
@@ -165,6 +168,19 @@ export type AgentSummary = {
|
|
|
165
168
|
slug: string;
|
|
166
169
|
name: string;
|
|
167
170
|
description?: string | null;
|
|
171
|
+
/**
|
|
172
|
+
* Whether API trigger is enabled (runtime projection)
|
|
173
|
+
*/
|
|
174
|
+
apiEnabled?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Runtime trigger projection by type.
|
|
177
|
+
*/
|
|
178
|
+
triggers?: {
|
|
179
|
+
api: boolean;
|
|
180
|
+
email: boolean;
|
|
181
|
+
manual: boolean;
|
|
182
|
+
cron: boolean;
|
|
183
|
+
};
|
|
168
184
|
sourceIntegrity?: 'healthy' | 'source_missing' | 'unregistered';
|
|
169
185
|
latestVersion?: string | null;
|
|
170
186
|
latestCommit?: string | null;
|
|
@@ -689,6 +705,19 @@ export type WorkflowDetail = {
|
|
|
689
705
|
* Current release tag (e.g. "1.2.4"). Null until a version is published.
|
|
690
706
|
*/
|
|
691
707
|
version?: string | null;
|
|
708
|
+
/**
|
|
709
|
+
* Whether API trigger is enabled (runtime projection)
|
|
710
|
+
*/
|
|
711
|
+
apiEnabled?: boolean;
|
|
712
|
+
/**
|
|
713
|
+
* Runtime trigger projection by type.
|
|
714
|
+
*/
|
|
715
|
+
triggers?: {
|
|
716
|
+
api: boolean;
|
|
717
|
+
email: boolean;
|
|
718
|
+
manual: boolean;
|
|
719
|
+
cron: boolean;
|
|
720
|
+
};
|
|
692
721
|
createdAt: string;
|
|
693
722
|
updatedAt?: string;
|
|
694
723
|
/**
|
|
@@ -745,6 +774,19 @@ export type WorkflowSummary = {
|
|
|
745
774
|
* Current release tag (e.g. "1.2.4"). Null until a version is published.
|
|
746
775
|
*/
|
|
747
776
|
version?: string | null;
|
|
777
|
+
/**
|
|
778
|
+
* Whether API trigger is enabled (runtime projection)
|
|
779
|
+
*/
|
|
780
|
+
apiEnabled?: boolean;
|
|
781
|
+
/**
|
|
782
|
+
* Runtime trigger projection by type.
|
|
783
|
+
*/
|
|
784
|
+
triggers?: {
|
|
785
|
+
api: boolean;
|
|
786
|
+
email: boolean;
|
|
787
|
+
manual: boolean;
|
|
788
|
+
cron: boolean;
|
|
789
|
+
};
|
|
748
790
|
createdAt: string;
|
|
749
791
|
updatedAt?: string;
|
|
750
792
|
};
|
|
@@ -1651,7 +1693,7 @@ export type RunsStartErrors = {
|
|
|
1651
1693
|
*/
|
|
1652
1694
|
401: ApiErrorEnvelope;
|
|
1653
1695
|
/**
|
|
1654
|
-
* API
|
|
1696
|
+
* Trigger disabled or insufficient scope. Run start may return api_trigger_disabled when the API trigger is off, or manual_trigger_disabled for dashboard runs on API-only workflows.
|
|
1655
1697
|
*/
|
|
1656
1698
|
403: ApiErrorEnvelope;
|
|
1657
1699
|
/**
|
|
@@ -2637,7 +2679,7 @@ export type RunsGetData = {
|
|
|
2637
2679
|
};
|
|
2638
2680
|
query?: {
|
|
2639
2681
|
/**
|
|
2640
|
-
*
|
|
2682
|
+
* Optional sections: `input`, `usage`, `execution`, `debug`. Terminal runs always include top-level output, files, and error.
|
|
2641
2683
|
*/
|
|
2642
2684
|
expand?: string;
|
|
2643
2685
|
};
|
|
@@ -3134,6 +3176,10 @@ export type WorkflowsListData = {
|
|
|
3134
3176
|
* Filter by workflow kind
|
|
3135
3177
|
*/
|
|
3136
3178
|
kind?: 'workflow' | 'block';
|
|
3179
|
+
/**
|
|
3180
|
+
* Filter by folder: omit for all workflows, 'null' for root/unfiled only, or a folder id
|
|
3181
|
+
*/
|
|
3182
|
+
folderId?: string | null;
|
|
3137
3183
|
/**
|
|
3138
3184
|
* Page size (max 100, default 50)
|
|
3139
3185
|
*/
|
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.7.
|
|
22
|
+
export const SDK_VERSION = '0.7.2';
|
|
23
23
|
|
|
24
24
|
function detectRuntime(): string {
|
|
25
25
|
const g = globalThis as unknown as {
|