@eigenpal/sdk 0.20.19 → 0.20.21

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,11 @@
1
1
  # @eigenpal/sdk
2
2
 
3
+ ## 0.20.21
4
+
5
+ ### Minor Changes
6
+
7
+ - 7e2ebe0: Pass execution tags when starting workflow or agent runs with the TypeScript and Python SDKs, including runs with file inputs. Filter run history by tag using the runs client.
8
+
3
9
  ## 0.20.9
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/sdk",
3
- "version": "0.20.19",
3
+ "version": "0.20.21",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -19,7 +19,6 @@
19
19
  "codegen": "openapi-ts -f openapi-ts.config.ts && bun run scripts/postprocess-generated.ts",
20
20
  "codegen:check": "bun run codegen && git diff --exit-code src/generated/",
21
21
  "build": "tsc",
22
- "lint": "eslint src/",
23
22
  "typecheck": "tsc --noEmit",
24
23
  "test": "bun test"
25
24
  },
package/src/client.ts CHANGED
@@ -98,6 +98,7 @@ export type RunInput = Record<string, unknown>;
98
98
 
99
99
  /** Third argument to `client.run()` — transport knobs, not workflow/agent input. */
100
100
  export interface RunCallOptions {
101
+ tags?: string | string[];
101
102
  waitForCompletion?: number;
102
103
  overrides?: { steps?: Record<string, Record<string, unknown>> };
103
104
  metadata?: Record<string, unknown>;
@@ -254,6 +255,7 @@ export class EigenpalClient {
254
255
  input: preparedInput,
255
256
  overrides: options.overrides,
256
257
  metadata: options.metadata,
258
+ tags: options.tags,
257
259
  });
258
260
  return this._request<RunStartResponse>(
259
261
  () =>
@@ -268,7 +270,10 @@ export class EigenpalClient {
268
270
  );
269
271
  }
270
272
 
271
- const body = buildRunJsonBody(pathTarget, preparedInput, options.overrides, options.metadata);
273
+ const body = {
274
+ ...buildRunJsonBody(pathTarget, preparedInput, options.overrides, options.metadata),
275
+ ...(options.tags !== undefined ? { tags: options.tags } : {}),
276
+ };
272
277
  return this._request<RunStartResponse>(
273
278
  () =>
274
279
  this.client.post({
@@ -393,6 +393,7 @@ export type UpdateFolderRequest = {
393
393
  * Run envelope. Declare provenance with the `X-Eigenpal-Trigger` header (`api` or `cli`). Legacy 0.5.12 body shapes remain accepted.
394
394
  */
395
395
  export type RunStartBody = {
396
+ tags?: string | Array<string>;
396
397
  /**
397
398
  * Automation target without a version suffix, e.g. workflows.invoice or agents.support.
398
399
  */
@@ -468,6 +469,10 @@ export type RunStartBody = {
468
469
  };
469
470
 
470
471
  export type RunStartMultipartRequest = {
472
+ /**
473
+ * JSON string or string array of exact execution tags
474
+ */
475
+ tags?: string;
471
476
  /**
472
477
  * Automation target, e.g. `workflows.invoice`.
473
478
  */
@@ -1760,6 +1765,7 @@ export type RunsListResponse = {
1760
1765
  };
1761
1766
 
1762
1767
  export type RunListItem = {
1768
+ tags: Array<string>;
1763
1769
  id: string;
1764
1770
  type: 'workflow' | 'agent';
1765
1771
  /**
@@ -1942,6 +1948,7 @@ export type RunHumanReviewSummary = {
1942
1948
  };
1943
1949
 
1944
1950
  export type Run = {
1951
+ tags: Array<string>;
1945
1952
  id: string;
1946
1953
  type: 'workflow' | 'agent';
1947
1954
  /**
@@ -7239,6 +7246,10 @@ export type RunsListData = {
7239
7246
  body?: never;
7240
7247
  path?: never;
7241
7248
  query?: {
7249
+ /**
7250
+ * Exact, case-sensitive execution tag
7251
+ */
7252
+ tag?: string;
7242
7253
  type?: string;
7243
7254
  source?: string;
7244
7255
  status?: string;
package/src/lib/files.ts CHANGED
@@ -369,12 +369,14 @@ export function buildRunJsonBody(
369
369
  */
370
370
  export async function buildRunMultipart(args: {
371
371
  target: string;
372
+ tags?: string | string[];
372
373
  input?: Record<string, unknown>;
373
374
  overrides?: { steps?: Record<string, Record<string, unknown>> };
374
375
  metadata?: Record<string, unknown>;
375
376
  }): Promise<MultipartParts> {
376
377
  const fd = new FormData();
377
378
  fd.append('target', args.target);
379
+ if (args.tags !== undefined) fd.append('tags', JSON.stringify(args.tags));
378
380
  const { scalars, fileCount } = await appendFiles(fd, args.input);
379
381
  fd.append('input', JSON.stringify(scalars));
380
382
  if (args.overrides) {
package/src/telemetry.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  export const SDK_LANGUAGE = 'typescript';
20
20
  // Rewritten at publish time by scripts/release/platform/render-sdk-versions.sh.
21
21
  // Keep this string literal exactly stable — sed matches on it.
22
- export const SDK_VERSION = '0.20.19';
22
+ export const SDK_VERSION = '0.20.21';
23
23
 
24
24
  function detectRuntime(): string {
25
25
  const g = globalThis as unknown as {