@eigenpal/sdk 0.7.2 → 0.8.0

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,66 @@
1
1
  # @eigenpal/sdk
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d620a00: Expose the clean public automation API around automations, runs, files/artifacts, datasets, evaluators, experiments, evaluation results, and run promotion. This intentionally breaks the pre-v1 SDK/CLI surface that exposed workflow- and agent-specific top-level resources outside the explicit legacy compatibility routes.
8
+
9
+ > [!WARNING]
10
+ > **Breaking change (pre-v1).** The workflow- and agent-specific top-level
11
+ > resources have been removed in favor of a single automation-centric surface.
12
+ > These packages are still 0.x, so this breaking redesign ships as a `minor`
13
+ > bump. Update your integration before upgrading.
14
+
15
+ #### Removed
16
+ - Top-level workflow resources, e.g. `client.workflows.*`, including
17
+ `client.workflows.executions.runAndWait(...)` and the rest of the
18
+ `client.workflows.executions.*` tree.
19
+ - Top-level agent resources, e.g. `client.agents.*` (runs, feedback, traces,
20
+ files, expected artifacts).
21
+ - Top-level source/git resources, e.g. `client.sources.*`.
22
+
23
+ #### New equivalents
24
+ - **Start a run:** use `client.run('workflows.<slug>', input, options)` (and
25
+ `client.run('agents.<slug>', ...)`). In the TypeScript SDK, `run-and-wait`
26
+ is `client.run(target, input, { waitForCompletion })`; in the Python SDK use
27
+ `client.run_and_wait(target, input=...)`.
28
+ - **Browse automations** (workflows + agents): `client.automations.list()`,
29
+ `client.automations.get(id)`, `client.automations.versions(id)`,
30
+ `client.automations.triggers(id)`, plus
31
+ `client.automations.dataset|examples|evaluators|experiments.*`.
32
+ - **Inspect & control runs:** `client.runs.list()`, `client.runs.get(id)`,
33
+ `client.runs.cancel(id)`, `client.runs.rerun(id)`, `client.runs.promote(id)`,
34
+ `client.runs.usage(id)`, `client.runs.steps(id)`, `client.runs.events(id)`,
35
+ and `client.runs.artifacts|eval_results|feedback|trace.*`.
36
+ - **Manage reusable files:** `client.files.upload(...)`, `client.files.get(id)`,
37
+ `client.files.download(id)`, `client.files.delete(id)`.
38
+
39
+ #### Migration
40
+ - `client.workflows.executions.runAndWait('<slug>', input)` →
41
+ `client.run('workflows.<slug>', input, { waitForCompletion })` (TS) /
42
+ `client.run_and_wait('workflows.<slug>', input=...)` (Python).
43
+ - `client.workflows.executions.create('<slug>', input)` →
44
+ `client.run('workflows.<slug>', input)`.
45
+ - `client.agents.runs.create('<slug>', input)` →
46
+ `client.run('agents.<slug>', input)`.
47
+ - `client.workflows.get('<slug>')` / `client.agents.get('<slug>')` →
48
+ `client.automations.get('workflows.<slug>')` /
49
+ `client.automations.get('agents.<slug>')`.
50
+ - Listing/inspecting executions previously under
51
+ `client.workflows.executions.*` / `client.agents.runs.*` →
52
+ `client.runs.*` (e.g. `client.runs.list()`, `client.runs.get(id)`).
53
+ - `eigenpal runs promote` now accepts only `--name` (optional). Use
54
+ `eigenpal runs feedback update` to set expected JSON before promoting.
55
+ Feedback and expected commands work for both workflow and agent runs.
56
+
57
+ #### DX fixes
58
+ - `client.runs.*` read methods are now typed against the generated OpenAPI
59
+ models; use `isRunFinished()` to narrow `run()` / `rerun()` responses before
60
+ accessing `output`.
61
+ - `eigenpal agents dataset push --file` accepts a `.zip` archive (matching
62
+ `pull` output) as well as a directory.
63
+
3
64
  ## 0.7.2
4
65
 
5
66
  ### Minor Changes
@@ -96,7 +157,7 @@
96
157
  string callers actually want, replacing the internal `currentHistoryId`.
97
158
 
98
159
  Heads-up: workflow `name` is no longer surfaced as a top-level field
99
- (it was previously leaked via `currentVersion.definition.name`). It's
160
+ (it was previously leaked via `currentVersion.definition.name`). It is
100
161
  authoritative inside the YAML, so fetch it via
101
162
  `client.workflows.versions(id)[0].yamlContent` and parse, or treat the
102
163
  workflow `id` as the canonical identifier.
@@ -120,8 +181,8 @@
120
181
  v1 paths resolve, the trimmed public shape is enforced on the wire,
121
182
  and the HTML-host guard fires.
122
183
 
123
- `defineRoute` rejects paths that don't start with `/api/` so the
124
- mismatch can't reappear by accident.
184
+ `defineRoute` rejects paths that do not start with `/api/` so the
185
+ mismatch cannot reappear by accident.
125
186
 
126
187
  ## Unreleased
127
188
 
package/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # @eigenpal/sdk
2
2
 
3
- Trigger EigenPal workflows from TypeScript.
3
+ Trigger and inspect Eigenpal automations from TypeScript.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@eigenpal/sdk?color=3B5BDB&labelColor=555&label=npm)](https://www.npmjs.com/package/@eigenpal/sdk)
6
6
  [![downloads](https://img.shields.io/npm/dm/@eigenpal/sdk?color=3B5BDB&labelColor=555&label=downloads)](https://www.npmjs.com/package/@eigenpal/sdk)
7
7
  [![license](https://img.shields.io/badge/license-Apache--2.0-3B5BDB?labelColor=555)](https://github.com/eigenpal/sdk-typescript/blob/main/LICENSE)
8
- [![docs](https://img.shields.io/badge/docs-eigenpal%2Fsdk-3B5BDB?labelColor=555)](https://github.com/eigenpal/sdk-typescript)
9
8
 
10
9
  ## Install
11
10
 
@@ -13,202 +12,107 @@ Trigger EigenPal workflows from TypeScript.
13
12
  npm i @eigenpal/sdk
14
13
  ```
15
14
 
16
- Requires a TypeScript-aware runtime: Bun, Deno, Node 22+ (native TS), `tsx`, Next.js, Vite, or any modern bundler. Plain `node script.js` won't work see [Configuration](./docs/configuration.md#typescript-runtime).
15
+ Requires a TypeScript-aware runtime: Bun, Deno, Node 22+ (native TS), `tsx`, Next.js, Vite, or any modern bundler. Plain `node script.js` will not work; see [Configuration](./docs/configuration.md#typescript-runtime).
17
16
 
18
- Get an API key at **studio.eigenpal.com Settings API Keys**.
17
+ Get an API key at **studio.eigenpal.com -> Settings -> API Keys**.
19
18
 
20
- ## Quick start
19
+ ## Quick Start
21
20
 
22
21
  ```ts
23
- import { EigenpalClient, EigenpalValidationError } from '@eigenpal/sdk';
22
+ import { EigenpalClient } from '@eigenpal/sdk';
24
23
 
25
24
  const client = new EigenpalClient({ apiKey: process.env.EIGENPAL_API_KEY });
26
25
 
27
- // Pass a File / Blob / { content, filename, mimeType }. The SDK uploads
28
- // the request as multipart/form-data, no base64 needed.
29
- const result = await client.workflows.executions.runAndWait('extract-invoice', {
30
- contract_document: file,
31
- });
32
- console.log(result.finished, result.output);
33
- ```
34
-
35
- ## Authentication
36
-
37
- Generate an API key from the dashboard under **Settings → API Keys**, then pass it explicitly:
26
+ const result = await client.run(
27
+ 'workflows.extract-invoice',
28
+ { contract_document: file },
29
+ { waitForCompletion: 60 }
30
+ );
38
31
 
39
- ```ts
40
- const client = new EigenpalClient({ apiKey: process.env.EIGENPAL_API_KEY });
32
+ if (result.finished) {
33
+ console.log(result.output);
34
+ }
41
35
  ```
42
36
 
43
- The `apiKey` constructor option always wins. If you omit it, the SDK falls back to `process.env.EIGENPAL_API_KEY` for convenience, handy in scripts where you'd be writing exactly the line above.
37
+ `target` is always typed: `workflows.<slug>` or `agents.<slug>`. That keeps workflow and agent slugs unambiguous.
44
38
 
45
- ## Self-hosted
39
+ ## Automations
46
40
 
47
- Point the SDK at your own deployment via `baseUrl`:
41
+ Workflows and agents are exposed as automations.
48
42
 
49
43
  ```ts
50
- const client = new EigenpalClient({
51
- apiKey: process.env.EIGENPAL_API_KEY,
52
- baseUrl: process.env.EIGENPAL_BASE_URL ?? 'https://eigenpal.acme.internal',
53
- });
44
+ const { data } = await client.automations.list({ search: 'invoice' });
45
+ const automation = await client.automations.get('workflows.extract-invoice');
46
+ const versions = await client.automations.versions('workflows.extract-invoice');
47
+ const triggers = await client.automations.triggers('workflows.extract-invoice');
54
48
  ```
55
49
 
56
- `baseUrl` likewise wins over the `EIGENPAL_BASE_URL` env fallback. Defaults to `https://studio.eigenpal.com` (the hosted cloud).
57
-
58
- ## Starting runs
59
-
60
- `client.run(target, input?, options?)` starts a workflow or agent run. Targets can be strings such as `workflows.extract-invoice` / `agents.invoice-agent` or structured objects like `{ type: 'workflow', slug: 'extract-invoice' }`.
50
+ ## Runs
61
51
 
62
52
  ```ts
63
- // Async: returns immediately with { id }.
64
- const { id: runId } = await client.run('workflows.extract-invoice', {
65
- contract_document: file,
66
- });
67
-
68
- // Sync: server holds the connection up to 60 seconds.
69
- const result = await client.run(
70
- { type: 'workflow', slug: 'extract-invoice', version: 'latest' },
71
- { contract_document: file },
72
- { waitForCompletion: 60 }
73
- );
74
- console.log(result.finished, result.output);
75
-
76
- // Long-running: client-side polling, default 5min cap.
77
- const final = await client.workflows.executions.runAndWait('extract-invoice', {
78
- contract_document: file,
79
- });
80
- ```
53
+ const { id } = await client.run('agents.invoice-agent', { invoice: file });
81
54
 
82
- The second argument is the input map keyed by input name. Pass `undefined` for inputs-less runs. `options` carries `waitForCompletion` and workflow `overrides`; put the workflow version or agent source ref in the target.
55
+ const run = await client.runs.get(id, { expand: ['usage', 'execution'] });
56
+ const usage = await client.runs.usage(id);
57
+ const steps = await client.runs.steps(id);
58
+ const events = await client.runs.events(id);
59
+ const trace = await client.runs.trace.get(id);
83
60
 
84
- ## File inputs
85
-
86
- When a workflow input is a file, pass a `File`, `Blob`, or explicit `{ content, filename, mimeType }` descriptor. The SDK auto-detects them and uploads the request as `multipart/form-data` (the same shape as `curl -F`, no base64 round-trip):
87
-
88
- ```ts
89
- // Browser: File from <input type="file">
90
- await client.run('workflows.extract-invoice', { contract_document: file });
91
-
92
- // Node: Buffer from fs
93
- import { readFile } from 'node:fs/promises';
94
- const buffer = await readFile('contract.pdf');
95
- await client.run('workflows.extract-invoice', {
96
- contract_document: {
97
- content: buffer,
98
- filename: 'contract.pdf',
99
- mimeType: 'application/pdf',
100
- },
101
- });
61
+ await client.runs.cancel(id);
62
+ await client.rerun(id, { waitForCompletion: 60 });
102
63
  ```
103
64
 
104
- > **Don't** base64-encode files yourself. The SDK is multipart-first; base64 doubles the payload size and skips the optimised upload path.
105
-
106
- ## Execution polling
65
+ List calls use the same run API for workflows, agents, manual runs, and eval runs:
107
66
 
108
67
  ```ts
109
- const runs = await client.runs.list({
68
+ const recentFailures = await client.runs.list({
110
69
  type: 'workflow',
111
- source: 'extract-invoice',
112
70
  status: 'failed,cancelled',
113
- });
114
-
115
- const run = await client.runs.get(runId);
116
- // { id, type, finished, output, files, error, timing, ... }
117
-
118
- // Add heavier optional sections with `expand`.
119
- const withUsage = await client.runs.get(runId, { expand: ['usage', 'execution'] });
120
- console.log(
121
- withUsage.output,
122
- withUsage.files,
123
- withUsage.error,
124
- withUsage.usage,
125
- withUsage.execution
126
- );
127
-
128
- const list = await client.runs.list({
129
- type: 'workflow',
130
- source: 'extract-invoice',
131
- status: ['failed', 'cancelled'],
132
- from: 'now()-7d',
133
71
  limit: 50,
134
72
  });
135
-
136
- await client.runs.cancel(runId);
137
73
  ```
138
74
 
139
- `/api/v1/runs` is the shared run API for workflow, agent, and eval runs. Use `type=workflow|agent`
140
- and `source=<workflowId-or-agentId>` to scope list calls.
75
+ ## Files And Artifacts
141
76
 
142
- ## Workflows
77
+ Use `client.files` for reusable upload-first blobs. When referenced by a run input, Eigenpal snapshots the file into run-scoped artifacts.
143
78
 
144
79
  ```ts
145
- await client.workflows.list({ search: 'invoice', limit: 20 });
146
- await client.workflows.get('extract-invoice');
147
- await client.workflows.versions('extract-invoice');
148
- ```
80
+ const uploaded = await client.files.upload(file);
149
81
 
150
- ## Agents
151
-
152
- ```ts
153
- await client.agents.list({ search: 'invoice' });
154
- await client.agents.get('invoice-agent');
155
-
156
- const { id: agentRunId } = await client.run('agents.invoice-agent', {
157
- invoice: file,
82
+ const started = await client.run('workflows.extract-invoice', {
83
+ contract_document: { fileId: uploaded.id },
158
84
  });
159
85
 
160
- await client.runs.get(agentRunId);
161
- await client.runs.cancel(agentRunId);
86
+ const artifacts = await client.runs.artifacts.list(started.id);
87
+ const pdf = await client.runs.artifacts.download(started.id, artifacts.artifacts[0].path);
162
88
  ```
163
89
 
164
- Agent run listing uses the same shared runs API with `type: 'agent'` and the agent id or slug as
165
- `source`.
90
+ You can also pass a `File`, `Blob`, or `{ content, filename, mimeType }` directly to `client.run`; the SDK sends multipart form data automatically.
166
91
 
167
92
  ## Errors
168
93
 
169
94
  Every non-2xx response throws a typed subclass of `EigenpalError`:
170
95
 
171
- | HTTP | Class | Notes |
172
- | --------------- | ------------------------- | ---------------------------------------------------- |
173
- | 400 | `EigenpalValidationError` | `.issues` carries the per-field problems |
174
- | 401 | `EigenpalAuthError` | Bad / missing API key |
175
- | 403 | `EigenpalForbiddenError` | API trigger disabled, scope mismatch |
176
- | 404 | `EigenpalNotFoundError` | Workflow / execution doesn't exist |
177
- | 429 | `EigenpalRateLimitError` | `.retryAfter` is the server-suggested wait (seconds) |
178
- | 5xx | `EigenpalServerError` | Auto-retried up to `maxRetries` |
179
- | timeout / abort | `EigenpalTimeoutError` | |
180
-
181
- ```ts
182
- import { EigenpalClient, EigenpalValidationError } from '@eigenpal/sdk';
183
-
184
- const client = new EigenpalClient({ apiKey: process.env.EIGENPAL_API_KEY });
185
-
186
- try {
187
- // First arg accepts the workflow slug ('extract-invoice') or id ('wf_abc123').
188
- const result = await client.workflows.executions.runAndWait('extract-invoice', {
189
- language: 'en',
190
- });
191
- console.log(result.finished, result.output);
192
- } catch (err) {
193
- if (err instanceof EigenpalValidationError) {
194
- for (const issue of err.issues) console.error(`${issue.field}: ${issue.message}`);
195
- }
196
- throw err;
197
- }
198
- ```
199
-
200
- For file inputs, see [docs/files.md](./docs/files.md).
96
+ | HTTP | Class |
97
+ | --------------- | ------------------------- |
98
+ | 400 | `EigenpalValidationError` |
99
+ | 401 | `EigenpalAuthError` |
100
+ | 403 | `EigenpalForbiddenError` |
101
+ | 404 | `EigenpalNotFoundError` |
102
+ | 429 | `EigenpalRateLimitError` |
103
+ | 5xx | `EigenpalServerError` |
104
+ | timeout / abort | `EigenpalTimeoutError` |
201
105
 
202
106
  ## Reference
203
107
 
204
- | Topic | What's in it |
205
- | ----------------------------------------- | -------------------------------------------------- |
206
- | [Workflows](./docs/workflows.md) | List, get, trigger runs, pin versions. |
207
- | [Executions](./docs/executions.md) | Status, polling, cancel, run-and-wait. |
208
- | [File inputs](./docs/files.md) | Multipart upload from File, Blob, Buffer, or path. |
209
- | [Errors](./docs/errors.md) | Typed exceptions, retries, request ids. |
210
- | [Configuration](./docs/configuration.md) | API key, baseUrl, timeouts, headers. |
211
- | [Full API reference](./docs/reference.md) | Every method, generated from the OpenAPI spec. |
108
+ | Topic | What is in it |
109
+ | ----------------------------------------- | ------------------------------------------------------------------- |
110
+ | [Automations](./docs/workflows.md) | List, inspect, versions, triggers. |
111
+ | [Runs](./docs/executions.md) | Start, poll, cancel, rerun, usage, steps, events, traces, feedback. |
112
+ | [File inputs](./docs/files.md) | Multipart upload from File, Blob, Buffer, or path. |
113
+ | [Errors](./docs/errors.md) | Typed exceptions, retries, request ids. |
114
+ | [Configuration](./docs/configuration.md) | API key, baseUrl, timeouts, headers. |
115
+ | [Full API reference](./docs/reference.md) | Every method, generated from OpenAPI. |
212
116
 
213
117
  ## License
214
118
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/sdk",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/client.ts CHANGED
@@ -3,13 +3,13 @@ import { createClient, createConfig, type Client, type Config } from './generate
3
3
  import type {
4
4
  ApiErrorEnvelope,
5
5
  RunStartResponse as GeneratedRunStartResponse,
6
+ Run,
6
7
  } from './generated/types.gen';
7
8
  import { buildRunJsonBody, buildRunMultipart, hasFileInput } from './lib/files';
8
- import { AgentsResource } from './resources/agents';
9
+ import { AuthResource } from './resources/auth';
9
10
  import { AutomationsResource } from './resources/automations';
11
+ import { FilesResource } from './resources/files';
10
12
  import { RunsResource } from './resources/runs';
11
- import { SourceResource } from './resources/source';
12
- import { WorkflowsResource } from './resources/workflows';
13
13
  import { buildTelemetryHeaders } from './telemetry';
14
14
 
15
15
  export interface EigenpalOptions {
@@ -70,6 +70,7 @@ export type RunInput = Record<string, unknown>;
70
70
  export interface RunCallOptions {
71
71
  waitForCompletion?: number;
72
72
  overrides?: { steps?: Record<string, Record<string, unknown>> };
73
+ metadata?: Record<string, unknown>;
73
74
  signal?: AbortSignal;
74
75
  }
75
76
 
@@ -88,6 +89,11 @@ export interface RerunOptions {
88
89
  */
89
90
  export type RunStartResponse = GeneratedRunStartResponse;
90
91
 
92
+ /** Narrow `RunStartResponse` to a terminal run with `output` and related fields. */
93
+ export function isRunFinished(run: RunStartResponse): run is Run {
94
+ return run.finished === true;
95
+ }
96
+
91
97
  /**
92
98
  * The EigenPal SDK client.
93
99
  *
@@ -107,21 +113,19 @@ export type RunStartResponse = GeneratedRunStartResponse;
107
113
  * { waitForCompletion: 60 }
108
114
  * );
109
115
  *
110
- * // Client-side polling for long-running executions (default 5min cap).
111
- * const final = await client.workflows.executions.runAndWait('wf_abc', { language: 'en' });
116
+ * // Inspect the final run later.
117
+ * const final = await client.runs.get(id);
112
118
  * ```
113
119
  */
114
120
  export class EigenpalClient {
115
- /** Workflow definition operations: `list`, `get`, `versions`. Start runs with `client.run(...)`. */
116
- public readonly workflows: WorkflowsResource;
117
- /** Agent operations: `list`, `get`, `create`, `executions`. Start runs with `client.run(...)`. */
118
- public readonly agents: AgentsResource;
119
- /** Source repository operations: repository metadata, raw files, releases, lockfiles, and secret decrypt. */
120
- public readonly source: SourceResource;
121
- /** Automation operations: sync public automation metadata from source. */
121
+ /** API key identity and current tenant context. */
122
+ public readonly auth: AuthResource;
123
+ /** Automation metadata across workflows and agents. Start runs with `client.run(...)`. */
122
124
  public readonly automations: AutomationsResource;
123
125
  /** Tenant-wide run operations across workflow, agent, manual, and eval runs. */
124
126
  public readonly runs: RunsResource;
127
+ /** Reusable uploaded files that can be referenced by later runs. */
128
+ public readonly files: FilesResource;
125
129
 
126
130
  /** Underlying hey-api client. Use `getRawClient()` for advanced cases. */
127
131
  private readonly client: Client;
@@ -162,11 +166,10 @@ export class EigenpalClient {
162
166
  }
163
167
  this.installTimeoutInterceptor();
164
168
 
165
- this.workflows = new WorkflowsResource(this.client, this._request.bind(this));
166
- this.agents = new AgentsResource(this.client, this._request.bind(this));
167
- this.source = new SourceResource(this.client, this._request.bind(this));
169
+ this.auth = new AuthResource(this.client, this._request.bind(this));
168
170
  this.automations = new AutomationsResource(this.client, this._request.bind(this));
169
171
  this.runs = new RunsResource(this.client, this._request.bind(this));
172
+ this.files = new FilesResource(this.client, this._request.bind(this));
170
173
  }
171
174
 
172
175
  /** Expose the underlying hey-api client for advanced use (custom interceptors, etc.). */
@@ -193,6 +196,7 @@ export class EigenpalClient {
193
196
  target: pathTarget,
194
197
  input,
195
198
  overrides: options.overrides,
199
+ metadata: options.metadata,
196
200
  });
197
201
  return this._request<RunStartResponse>(
198
202
  () =>
@@ -207,7 +211,7 @@ export class EigenpalClient {
207
211
  );
208
212
  }
209
213
 
210
- const body = buildRunJsonBody(pathTarget, input, options.overrides);
214
+ const body = buildRunJsonBody(pathTarget, input, options.overrides, options.metadata);
211
215
  return this._request<RunStartResponse>(
212
216
  () =>
213
217
  this.client.post({
@@ -363,7 +367,13 @@ function assertJsonResponse(response: Response): void {
363
367
  const contentType = response.headers.get('content-type')?.toLowerCase() ?? '';
364
368
  // Match `application/json`, `application/problem+json`, etc. Empty
365
369
  // Content-Type is tolerated since some proxies strip it on small bodies.
366
- if (contentType === '' || contentType.includes('json')) return;
370
+ if (
371
+ contentType === '' ||
372
+ contentType.includes('json') ||
373
+ contentType.includes('octet-stream') ||
374
+ contentType.includes('zip')
375
+ )
376
+ return;
367
377
  throw new EigenpalError(
368
378
  `Expected a JSON response from the API but got Content-Type "${contentType}". ` +
369
379
  `This usually means \`baseUrl\` points at a non-API host (e.g. the marketing site or ` +
@@ -385,9 +395,14 @@ function assertRunTarget(target: RunTarget): void {
385
395
 
386
396
  function assertInputNotOptionsBag(input: RunInput | undefined): void {
387
397
  if (!input || typeof input !== 'object') return;
388
- if ('waitForCompletion' in input || 'overrides' in input || 'signal' in input) {
398
+ if (
399
+ 'waitForCompletion' in input ||
400
+ 'overrides' in input ||
401
+ 'metadata' in input ||
402
+ 'signal' in input
403
+ ) {
389
404
  throw new EigenpalError(
390
- 'Pass workflow/agent input as the second argument and { waitForCompletion, overrides, signal } as the third.',
405
+ 'Pass workflow/agent input as the second argument and { waitForCompletion, overrides, metadata, signal } as the third.',
391
406
  { status: 0 }
392
407
  );
393
408
  }
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- export { agentsCreate, agentsFilesListOrGet, agentsFilesPut, agentsFilesUploadBatch, agentsGet, agentsList, agentsTriggersEmailCreateAlias, agentsTriggersEmailDeleteAlias, agentsTriggersEmailGet, agentsTriggersEmailList, agentsTriggersEmailUpdate, agentsTriggersEmailUpdateAlias, agentsUpdate, agentsVersionsList, automationsSync, type Options, runsArtifactsGet, runsArtifactsList, runsCancel, runsComparisonGet, runsConnect, runsDefinitionGet, runsExpectedCreate, runsExpectedFileDelete, runsExpectedFileGet, runsExpectedFileUpdate, runsExpectedGet, runsFeedbackClear, runsFeedbackGet, runsFeedbackUpdate, runsFilesDelete, runsFilesList, runsFilesUpload, runsFilesZipGet, runsGet, runsList, runsRerun, runsStart, runsTraceGet, sourceLockfilePreview, sourceRaw, sourceReleases, sourceRepository, sourceSecretsDecrypt, sourceSecretsEncrypt, workflowsGet, workflowsList, workflowsVersionsList } from './sdk.gen';
4
- export type { AgentRunExecution, AgentsCreateData, AgentsCreateError, AgentsCreateErrors, AgentsCreateResponse, AgentsCreateResponses, AgentsFilesListOrGetData, AgentsFilesListOrGetError, AgentsFilesListOrGetErrors, AgentsFilesListOrGetResponses, AgentsFilesPutData, AgentsFilesPutError, AgentsFilesPutErrors, AgentsFilesUploadBatchData, AgentsFilesUploadBatchError, AgentsFilesUploadBatchErrors, AgentsGetData, AgentsGetError, AgentsGetErrors, AgentsGetResponse, AgentsGetResponses, AgentsListData, AgentsListError, AgentsListErrors, AgentsListResponse, AgentsListResponses, AgentsTriggersEmailCreateAliasData, AgentsTriggersEmailCreateAliasError, AgentsTriggersEmailCreateAliasErrors, AgentsTriggersEmailCreateAliasResponse, AgentsTriggersEmailCreateAliasResponses, AgentsTriggersEmailDeleteAliasData, AgentsTriggersEmailDeleteAliasError, AgentsTriggersEmailDeleteAliasErrors, AgentsTriggersEmailDeleteAliasResponse, AgentsTriggersEmailDeleteAliasResponses, AgentsTriggersEmailGetData, AgentsTriggersEmailGetError, AgentsTriggersEmailGetErrors, AgentsTriggersEmailGetResponse, AgentsTriggersEmailGetResponses, AgentsTriggersEmailListData, AgentsTriggersEmailListError, AgentsTriggersEmailListErrors, AgentsTriggersEmailListResponse, AgentsTriggersEmailListResponses, AgentsTriggersEmailUpdateAliasData, AgentsTriggersEmailUpdateAliasError, AgentsTriggersEmailUpdateAliasErrors, AgentsTriggersEmailUpdateAliasResponse, AgentsTriggersEmailUpdateAliasResponses, AgentsTriggersEmailUpdateData, AgentsTriggersEmailUpdateError, AgentsTriggersEmailUpdateErrors, AgentsTriggersEmailUpdateResponse, AgentsTriggersEmailUpdateResponses, AgentSummary, AgentsUpdateData, AgentsUpdateError, AgentsUpdateErrors, AgentsUpdateResponse, AgentsUpdateResponses, AgentsVersionsListData, AgentsVersionsListError, AgentsVersionsListErrors, AgentsVersionsListResponse, AgentsVersionsListResponses, ApiErrorEnvelope, ApiErrorIssue, AutomationsSyncData, AutomationsSyncError, AutomationsSyncErrors, AutomationsSyncResponse, AutomationsSyncResponses, AutomationSyncResponse, ClientOptions, CreateAgentBody, CreateAgentResponse, ExecutionStatus, GetAgentResponse, ListAgentsResponse, ListAgentVersionsResponse, ListVersionsResponse, ListWorkflowsResponse, PatchAgentBody, PatchAgentResponse, RawSourceResponse, Run, RunAccepted, RunArtifact, RunArtifactsResponse, RunCancelResponse, RunDebug, RunDefinitionResponse, RunError, RunEval, RunExecution, RunExecutionMeta, RunExecutionRetry, RunFeedback, RunFeedbackRequest, RunFile, RunFilesResponse, RunInput, RunListItem, RunRerunResponse, RunsArtifactsGetData, RunsArtifactsGetError, RunsArtifactsGetErrors, RunsArtifactsGetResponses, RunsArtifactsListData, RunsArtifactsListError, RunsArtifactsListErrors, RunsArtifactsListResponse, RunsArtifactsListResponses, RunsCancelData, RunsCancelError, RunsCancelErrors, RunsCancelResponse, RunsCancelResponses, RunsComparisonGetData, RunsComparisonGetError, RunsComparisonGetErrors, RunsComparisonGetResponse, RunsComparisonGetResponses, RunsConnectData, RunsConnectError, RunsConnectErrors, RunsConnectResponse, RunsConnectResponses, RunsDefinitionGetData, RunsDefinitionGetError, RunsDefinitionGetErrors, RunsDefinitionGetResponse, RunsDefinitionGetResponses, RunsExpectedCreateData, RunsExpectedCreateError, RunsExpectedCreateErrors, RunsExpectedCreateResponse, RunsExpectedCreateResponses, RunsExpectedFileDeleteData, RunsExpectedFileDeleteError, RunsExpectedFileDeleteErrors, RunsExpectedFileDeleteResponse, RunsExpectedFileDeleteResponses, RunsExpectedFileGetData, RunsExpectedFileGetError, RunsExpectedFileGetErrors, RunsExpectedFileGetResponses, RunsExpectedFileUpdateData, RunsExpectedFileUpdateError, RunsExpectedFileUpdateErrors, RunsExpectedFileUpdateResponse, RunsExpectedFileUpdateResponses, RunsExpectedGetData, RunsExpectedGetError, RunsExpectedGetErrors, RunsExpectedGetResponse, RunsExpectedGetResponses, RunsFeedbackClearData, RunsFeedbackClearError, RunsFeedbackClearErrors, RunsFeedbackClearResponse, RunsFeedbackClearResponses, RunsFeedbackGetData, RunsFeedbackGetError, RunsFeedbackGetErrors, RunsFeedbackGetResponse, RunsFeedbackGetResponses, RunsFeedbackUpdateData, RunsFeedbackUpdateError, RunsFeedbackUpdateErrors, RunsFeedbackUpdateResponse, RunsFeedbackUpdateResponses, RunsFilesDeleteData, RunsFilesDeleteError, RunsFilesDeleteErrors, RunsFilesDeleteResponse, RunsFilesDeleteResponses, RunsFilesListData, RunsFilesListError, RunsFilesListErrors, RunsFilesListResponse, RunsFilesListResponses, RunsFilesUploadBody, RunsFilesUploadData, RunsFilesUploadError, RunsFilesUploadErrors, RunsFilesUploadResponse, RunsFilesUploadResponses, RunsFilesZipGetData, RunsFilesZipGetError, RunsFilesZipGetErrors, RunsFilesZipGetResponses, RunsGetData, RunsGetError, RunsGetErrors, RunsGetResponse, RunsGetResponses, RunsListData, RunsListError, RunsListErrors, RunsListResponse, RunsListResponse2, RunsListResponses, RunSource, RunSourceGit, RunsRerunData, RunsRerunError, RunsRerunErrors, RunsRerunResponse, RunsRerunResponses, RunsStartData, RunsStartError, RunsStartErrors, RunsStartResponse, RunsStartResponses, RunStartBody, RunStartResponse, RunsTraceGetData, RunsTraceGetError, RunsTraceGetErrors, RunsTraceGetResponse, RunsTraceGetResponses, RunTiming, RunTrigger, RunUsage, Schema0, SourceLockfilePreviewData, SourceLockfilePreviewError, SourceLockfilePreviewErrors, SourceLockfilePreviewResponse, SourceLockfilePreviewResponses, SourceLockfileResponse, SourceRawData, SourceRawError, SourceRawErrors, SourceRawResponse, SourceRawResponses, SourceReleasesData, SourceReleasesError, SourceReleasesErrors, SourceReleasesResponse, SourceReleasesResponse2, SourceReleasesResponses, SourceRepositoryData, SourceRepositoryError, SourceRepositoryErrors, SourceRepositoryResponse, SourceRepositoryResponse2, SourceRepositoryResponses, SourceSecretsDecryptBody, SourceSecretsDecryptData, SourceSecretsDecryptError, SourceSecretsDecryptErrors, SourceSecretsDecryptResponse, SourceSecretsDecryptResponse2, SourceSecretsDecryptResponses, SourceSecretsEncryptBody, SourceSecretsEncryptData, SourceSecretsEncryptError, SourceSecretsEncryptErrors, SourceSecretsEncryptResponse, SourceSecretsEncryptResponse2, SourceSecretsEncryptResponses, WorkflowDetail, WorkflowRunExecution, WorkflowsGetData, WorkflowsGetError, WorkflowsGetErrors, WorkflowsGetResponse, WorkflowsGetResponses, WorkflowsListData, WorkflowsListError, WorkflowsListErrors, WorkflowsListResponse, WorkflowsListResponses, WorkflowSummary, WorkflowsVersionsListData, WorkflowsVersionsListError, WorkflowsVersionsListErrors, WorkflowsVersionsListResponse, WorkflowsVersionsListResponses, WorkflowVersion } from './types.gen';
3
+ export { authCheck, automationsDatasetExport, automationsDatasetImport, automationsEvaluatorsGet, automationsEvaluatorsUpdate, automationsExamplesCreate, automationsExamplesDelete, automationsExamplesGet, automationsExamplesList, automationsExamplesRun, automationsExamplesUpdate, automationsExperimentsCancel, automationsExperimentsCreate, automationsExperimentsGet, automationsExperimentsList, automationsGet, automationsList, automationsTriggersGet, automationsVersionsList, filesContentGet, filesCreate, filesDelete, filesGet, type Options, runsArtifactsGet, runsArtifactsList, runsCancel, runsEvalResultsList, runsEventsList, runsFeedbackClear, runsFeedbackGet, runsFeedbackUpdate, runsGet, runsList, runsPromote, runsRerun, runsStart, runsStepsList, runsTraceGet, runsUsageGet } from './sdk.gen';
4
+ export type { AgentRunExecution, ApiErrorEnvelope, ApiErrorIssue, AuthCheckData, AuthCheckError, AuthCheckErrors, AuthCheckResponse, AuthCheckResponse2, AuthCheckResponses, AutomationDatasetImportMultipartRequest, AutomationDetail, AutomationsDatasetExportData, AutomationsDatasetExportError, AutomationsDatasetExportErrors, AutomationsDatasetExportResponse, AutomationsDatasetExportResponses, AutomationsDatasetImportData, AutomationsDatasetImportError, AutomationsDatasetImportErrors, AutomationsDatasetImportResponse, AutomationsDatasetImportResponses, AutomationsEvaluatorsGetData, AutomationsEvaluatorsGetError, AutomationsEvaluatorsGetErrors, AutomationsEvaluatorsGetResponse, AutomationsEvaluatorsGetResponses, AutomationsEvaluatorsUpdateData, AutomationsEvaluatorsUpdateError, AutomationsEvaluatorsUpdateErrors, AutomationsEvaluatorsUpdateResponse, AutomationsEvaluatorsUpdateResponses, AutomationsExamplesCreateData, AutomationsExamplesCreateError, AutomationsExamplesCreateErrors, AutomationsExamplesCreateResponse, AutomationsExamplesCreateResponses, AutomationsExamplesDeleteData, AutomationsExamplesDeleteError, AutomationsExamplesDeleteErrors, AutomationsExamplesDeleteResponse, AutomationsExamplesDeleteResponses, AutomationsExamplesGetData, AutomationsExamplesGetError, AutomationsExamplesGetErrors, AutomationsExamplesGetResponse, AutomationsExamplesGetResponses, AutomationsExamplesListData, AutomationsExamplesListError, AutomationsExamplesListErrors, AutomationsExamplesListResponse, AutomationsExamplesListResponses, AutomationsExamplesRunData, AutomationsExamplesRunError, AutomationsExamplesRunErrors, AutomationsExamplesRunResponse, AutomationsExamplesRunResponses, AutomationsExamplesUpdateData, AutomationsExamplesUpdateError, AutomationsExamplesUpdateErrors, AutomationsExamplesUpdateResponse, AutomationsExamplesUpdateResponses, AutomationsExperimentsCancelData, AutomationsExperimentsCancelError, AutomationsExperimentsCancelErrors, AutomationsExperimentsCancelResponse, AutomationsExperimentsCancelResponses, AutomationsExperimentsCreateData, AutomationsExperimentsCreateError, AutomationsExperimentsCreateErrors, AutomationsExperimentsCreateResponse, AutomationsExperimentsCreateResponses, AutomationsExperimentsGetData, AutomationsExperimentsGetError, AutomationsExperimentsGetErrors, AutomationsExperimentsGetResponse, AutomationsExperimentsGetResponses, AutomationsExperimentsListData, AutomationsExperimentsListError, AutomationsExperimentsListErrors, AutomationsExperimentsListResponse, AutomationsExperimentsListResponses, AutomationsGetData, AutomationsGetError, AutomationsGetErrors, AutomationsGetResponse, AutomationsGetResponses, AutomationsListData, AutomationsListError, AutomationsListErrors, AutomationsListResponse, AutomationsListResponses, AutomationsTriggersGetData, AutomationsTriggersGetError, AutomationsTriggersGetErrors, AutomationsTriggersGetResponse, AutomationsTriggersGetResponses, AutomationSummary, AutomationsVersionsListData, AutomationsVersionsListError, AutomationsVersionsListErrors, AutomationsVersionsListResponse, AutomationsVersionsListResponses, AutomationTriggersResponse, AutomationTriggerState, AutomationType, AutomationVersion, ClientOptions, CreateFileMultipartRequest, DatasetExample, DatasetExampleList, DatasetExampleMutation, DatasetExampleUpdate, DatasetImportResponse, DeleteFileResponse, EvalResult, EvalResultsResponse, EvaluatorConfigResponse, EvaluatorConfigUpdate, ExampleRunResponse, ExecutionStatus, Experiment, ExperimentCreate, ExperimentCreateResponse, ExperimentDetail, File, FilesContentGetData, FilesContentGetError, FilesContentGetErrors, FilesContentGetResponses, FilesCreateData, FilesCreateError, FilesCreateErrors, FilesCreateResponse, FilesCreateResponses, FilesDeleteData, FilesDeleteError, FilesDeleteErrors, FilesDeleteResponse, FilesDeleteResponses, FilesGetData, FilesGetError, FilesGetErrors, FilesGetResponse, FilesGetResponses, ListAutomationsResponse, ListAutomationVersionsResponse, PromoteRunRequest, PromoteRunResponse, Run, RunAccepted, RunArtifact, RunArtifactsResponse, RunCancelResponse, RunDebug, RunError, RunEval, RunEvent, RunEventsResponse, RunExecution, RunExecutionMeta, RunExecutionRetry, RunFeedback, RunFeedbackDetail, RunFeedbackRequest, RunFile, RunInput, RunListItem, RunRerunResponse, RunsArtifactsGetData, RunsArtifactsGetError, RunsArtifactsGetErrors, RunsArtifactsGetResponses, RunsArtifactsListData, RunsArtifactsListError, RunsArtifactsListErrors, RunsArtifactsListResponse, RunsArtifactsListResponses, RunsCancelData, RunsCancelError, RunsCancelErrors, RunsCancelResponse, RunsCancelResponses, RunsEvalResultsListData, RunsEvalResultsListError, RunsEvalResultsListErrors, RunsEvalResultsListResponse, RunsEvalResultsListResponses, RunsEventsListData, RunsEventsListError, RunsEventsListErrors, RunsEventsListResponse, RunsEventsListResponses, RunsFeedbackClearData, RunsFeedbackClearError, RunsFeedbackClearErrors, RunsFeedbackClearResponse, RunsFeedbackClearResponses, RunsFeedbackGetData, RunsFeedbackGetError, RunsFeedbackGetErrors, RunsFeedbackGetResponse, RunsFeedbackGetResponses, RunsFeedbackUpdateData, RunsFeedbackUpdateError, RunsFeedbackUpdateErrors, RunsFeedbackUpdateResponse, RunsFeedbackUpdateResponses, RunsGetData, RunsGetError, RunsGetErrors, RunsGetResponse, RunsGetResponses, RunsListData, RunsListError, RunsListErrors, RunsListResponse, RunsListResponse2, RunsListResponses, RunSource, RunSourceGit, RunsPromoteData, RunsPromoteError, RunsPromoteErrors, RunsPromoteResponse, RunsPromoteResponses, RunsRerunData, RunsRerunError, RunsRerunErrors, RunsRerunResponse, RunsRerunResponses, RunsStartData, RunsStartError, RunsStartErrors, RunsStartResponse, RunsStartResponses, RunsStepsListData, RunsStepsListError, RunsStepsListErrors, RunsStepsListResponse, RunsStepsListResponses, RunStartBody, RunStartMultipartRequest, RunStartResponse, RunStepsResponse, RunsTraceGetData, RunsTraceGetError, RunsTraceGetErrors, RunsTraceGetResponse, RunsTraceGetResponses, RunsUsageGetData, RunsUsageGetError, RunsUsageGetErrors, RunsUsageGetResponse, RunsUsageGetResponses, RunTiming, RunTrigger, RunUsage, RunUsageResponse, WorkflowRunExecution } from './types.gen';