@eigenpal/sdk 0.5.11 → 0.5.12

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/sdk",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -168,6 +168,7 @@ export type {
168
168
  RunWorkflowBody,
169
169
  RunWorkflowResponse,
170
170
  UpdateAgentExecutionFeedbackBody,
171
+ WorkflowDetail,
171
172
  WorkflowExecutionStatusResponse,
172
173
  WorkflowSummary,
173
174
  WorkflowVersion,
@@ -514,7 +514,7 @@ export const workflowsExecutionsList = <ThrowOnError extends boolean = false>(
514
514
  /**
515
515
  * Get a workflow by id
516
516
  *
517
- * Returns the workflow with its current version (definition + YAML content).
517
+ * Returns the workflow summary plus the current version YAML. Use `versions list` for historical YAML.
518
518
  */
519
519
  export const workflowsGet = <ThrowOnError extends boolean = false>(
520
520
  options: Options<WorkflowsGetData, ThrowOnError>
@@ -308,6 +308,10 @@ export type ExecutionSummary = {
308
308
  createdAt: string;
309
309
  startedAt?: string | null;
310
310
  completedAt?: string | null;
311
+ /**
312
+ * Total wall-clock duration in milliseconds. Only set after the execution reaches a terminal status.
313
+ */
314
+ durationMs?: number | null;
311
315
  /**
312
316
  * Owning workflow (null when the workflow has been deleted)
313
317
  */
@@ -317,7 +321,7 @@ export type ExecutionSummary = {
317
321
  } | null;
318
322
  };
319
323
 
320
- export type WorkflowSummary = {
324
+ export type WorkflowDetail = {
321
325
  /**
322
326
  * Workflow id (e.g. wf_abc123).
323
327
  */
@@ -332,6 +336,10 @@ export type WorkflowSummary = {
332
336
  version?: string | null;
333
337
  createdAt: string;
334
338
  updatedAt?: string;
339
+ /**
340
+ * YAML for the current version. Null until a version is published. Heavy; only returned on single-workflow GET, not on list.
341
+ */
342
+ yamlContent?: string | null;
335
343
  };
336
344
 
337
345
  export type RunWorkflowResponse = {
@@ -421,6 +429,23 @@ export type ListWorkflowsResponse = {
421
429
  offset: number;
422
430
  };
423
431
 
432
+ export type WorkflowSummary = {
433
+ /**
434
+ * Workflow id (e.g. wf_abc123).
435
+ */
436
+ id: string;
437
+ /**
438
+ * Human-readable workflow name from the YAML (e.g. "extract-invoice"). Null when no version is published yet.
439
+ */
440
+ name?: string | null;
441
+ /**
442
+ * Current release tag (e.g. "1.2.4"). Null until a version is published.
443
+ */
444
+ version?: string | null;
445
+ createdAt: string;
446
+ updatedAt?: string;
447
+ };
448
+
424
449
  export type AgentsExecutionsListData = {
425
450
  body?: never;
426
451
  path: {
@@ -1702,9 +1727,9 @@ export type WorkflowsGetError = WorkflowsGetErrors[keyof WorkflowsGetErrors];
1702
1727
 
1703
1728
  export type WorkflowsGetResponses = {
1704
1729
  /**
1705
- * Workflow with current version
1730
+ * Workflow summary with current YAML content
1706
1731
  */
1707
- 200: WorkflowSummary;
1732
+ 200: WorkflowDetail;
1708
1733
  };
1709
1734
 
1710
1735
  export type WorkflowsGetResponse = WorkflowsGetResponses[keyof WorkflowsGetResponses];
package/src/index.ts CHANGED
@@ -75,6 +75,7 @@ export type {
75
75
  RunAgentResponse,
76
76
  RunWorkflowBody,
77
77
  RunWorkflowResponse,
78
+ WorkflowDetail,
78
79
  WorkflowExecutionStatusResponse,
79
80
  WorkflowSummary,
80
81
  WorkflowVersion,
@@ -10,7 +10,7 @@ import type {
10
10
  ListVersionsResponse,
11
11
  ListWorkflowsResponse,
12
12
  RunWorkflowResponse,
13
- WorkflowSummary,
13
+ WorkflowDetail,
14
14
  } from '../generated/types.gen';
15
15
  import { buildMultipart, hasFileInput } from '../lib/files';
16
16
  import { WorkflowExecutionsResource } from './executions';
@@ -135,8 +135,8 @@ export class WorkflowsResource {
135
135
  return this.dispatch(() => workflowsList({ client: this.client, query, signal }));
136
136
  }
137
137
 
138
- /** Get a single workflow by id. */
139
- async get(workflowId: string, options: { signal?: AbortSignal } = {}): Promise<WorkflowSummary> {
138
+ /** Get a single workflow by id. Includes the current version's YAML. */
139
+ async get(workflowId: string, options: { signal?: AbortSignal } = {}): Promise<WorkflowDetail> {
140
140
  return this.dispatch(() =>
141
141
  workflowsGet({ client: this.client, path: { id: workflowId }, signal: options.signal })
142
142
  );
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.5.11';
22
+ export const SDK_VERSION = '0.5.12';
23
23
 
24
24
  function detectRuntime(): string {
25
25
  const g = globalThis as unknown as {