@eigenpal/sdk 1.0.0-rc.5 → 1.0.0-rc.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.
@@ -1,2 +1,2 @@
1
1
  /** The types of the public SDK surface. */
2
- export type { ApiCallOptions, ApiErrorEnvelope, ApiErrorIssue, AutomationDetail, AutomationKind, AutomationList, AutomationSummary, AutomationTriggerState, AutomationsGetOptions, AutomationsListOptions, CreatedProjectRelease, DatasetReviewCreateItemNote, DatasetReviewDetail, DatasetReviewEvent, DatasetReviewExpectedFile, DatasetReviewFieldDecision, DatasetReviewFileDecision, DatasetReviewFocusField, DatasetReviewInboxItem, DatasetReviewInboxList, DatasetReviewItem, DatasetReviewItemFieldNote, DatasetReviewProgress, DatasetsReviewsCreateOptions, DatasetsReviewsListOptions, DeleteEmailServerResponse, DeleteFileResponse, DeletePromotionRouteResponse, DeleteTemplateResponse, DeletedVariable, EmailServer, EmailServerList, EmailServersDeleteOptions, EmailServersGetOptions, EmailServersListOptions, EmailServersTestOptions, EvalResult, ExecutionObservability, Experiment, ExperimentDetail, ExperimentList, ExperimentRef, ExperimentsListOptions, File, FileUploadNegotiation, FilesDeleteOptions, FilesDownloadOptions, FilesGetOptions, HttpChunkedFileUploadSession, ModelList, ModelsListOptions, MultipartFileUploadFallback, PresignedFileUploadSession, PresignedMultipartFileUploadSession, Project, ProjectList, ProjectOperationError, ProjectOperationStep, ProjectPromotion, ProjectPromotionRecord, ProjectRelease, ProjectReleaseDetail, ProjectReleaseList, ProjectReleaseRequest, ProjectRollback, ProjectStatus, ProjectsCreateOptions, ProjectsListOptions, PromotionOperation, PromotionRoute, PromotionRouteCheck, PromotionRouteEnvironment, PromotionRouteList, PromotionRoutePlan, PublicModel, PublicModelCost, PublicModelLimits, PublicResendEmailServer, PublicSmtpEmailServer, ReleaseOperation, ReleasesGetOptions, ReleasesListOptions, ReleasesRestoreOptions, ReleasesWithdrawOptions, ReviewList, ReviewTaskDetail, ReviewsApproveOptions, ReviewsDownloadOptions, ReviewsGetOptions, ReviewsListOptions, ReviewsRejectOptions, ReviewsSetOptions, RoutesDeleteOptions, RoutesGetOptions, RoutesListOptions, RoutesSetOptions, Run, RunAccepted, RunArtifact, RunArtifactsResponse, RunBuild, RunCancelResponse, RunChildRun, RunComparison, RunDebug, RunError, RunEval, RunEvent, RunEventsResponse, RunFile, RunHumanReviewSummary, RunInput, RunList, RunListItem, RunRetry, RunReview, RunReviewCorrection, RunReviewSummary, RunStep, RunStepWait, RunTiming, RunTrigger, RunUsage, RunsCancelOptions, RunsGetOptions, RunsListOptions, RunsRerunOptions, StatusOptions, Template, TemplateList, TemplateRevision, TemplatesDeleteOptions, TemplatesDownloadOptions, TemplatesGetOptions, TemplatesListOptions, TestEmailServerResponse, Variable, VariableList, VariableSetResponse, VariablesDeleteOptions, VariablesListOptions, VariablesSetOptions, } from './types.gen.js';
2
+ export type { ApiCallOptions, ApiErrorEnvelope, ApiErrorIssue, AutomationDetail, AutomationKind, AutomationList, AutomationSummary, AutomationTriggerState, AutomationsGetOptions, AutomationsListOptions, CreatedProjectRelease, DatasetReviewCreateItemNote, DatasetReviewDetail, DatasetReviewEvent, DatasetReviewExpectedFile, DatasetReviewFieldDecision, DatasetReviewFileDecision, DatasetReviewFocusField, DatasetReviewInboxItem, DatasetReviewInboxList, DatasetReviewItem, DatasetReviewItemFieldNote, DatasetReviewProgress, DatasetsReviewsCreateOptions, DatasetsReviewsListOptions, DeleteEmailServerResponse, DeleteFileResponse, DeletePromotionRouteResponse, DeleteTemplateResponse, DeletedVariable, EmailServer, EmailServerList, EmailServersDeleteOptions, EmailServersGetOptions, EmailServersListOptions, EmailServersTestOptions, EvalResult, ExecutionObservability, Experiment, ExperimentDetail, ExperimentList, ExperimentRef, ExperimentsListOptions, File, FileUploadNegotiation, FilesDeleteOptions, FilesDownloadOptions, FilesGetOptions, HttpChunkedFileUploadSession, ModelList, ModelsListOptions, MultipartFileUploadFallback, PresignedFileUploadSession, PresignedMultipartFileUploadSession, Project, ProjectList, ProjectOperationError, ProjectOperationStep, ProjectPromotion, ProjectPromotionRecord, ProjectRelease, ProjectReleaseDetail, ProjectReleaseList, ProjectReleaseRequest, ProjectRollback, ProjectStatus, ProjectsCreateOptions, ProjectsListOptions, PromotionOperation, PromotionRoute, PromotionRouteCheck, PromotionRouteEnvironment, PromotionRouteList, PromotionRoutePlan, PublicModel, PublicModelCost, PublicModelLimits, PublicResendEmailServer, PublicSmtpEmailServer, ReleaseOperation, ReleasesGetOptions, ReleasesListOptions, ReleasesRestoreOptions, ReleasesWithdrawOptions, ReviewList, ReviewTaskDetail, ReviewsApproveOptions, ReviewsDownloadOptions, ReviewsGetOptions, ReviewsListOptions, ReviewsRejectOptions, ReviewsSetOptions, RoutesDeleteOptions, RoutesGetOptions, RoutesListOptions, RoutesSetOptions, Run, RunAccepted, RunArtifact, RunArtifactsResponse, RunBuild, RunCancelResponse, RunChildRun, RunComparison, RunDebug, RunError, RunEval, RunEvent, RunEventsResponse, RunFile, RunHumanReviewSummary, RunHumanReviewTrailEntry, RunInput, RunList, RunListItem, RunRetry, RunReview, RunReviewCorrection, RunReviewSummary, RunStep, RunStepWait, RunTiming, RunTrigger, RunUsage, RunsCancelOptions, RunsGetOptions, RunsListOptions, RunsRerunOptions, StatusOptions, Template, TemplateList, TemplateRevision, TemplatesDeleteOptions, TemplatesDownloadOptions, TemplatesGetOptions, TemplatesListOptions, TestEmailServerResponse, Variable, VariableList, VariableSetResponse, VariablesDeleteOptions, VariablesListOptions, VariablesSetOptions, } from './types.gen.js';
@@ -196,7 +196,7 @@ export declare class ReviewsResource {
196
196
  protected readonly core: Core;
197
197
  constructor(core: Core, impls: ResourceImpls);
198
198
  /**
199
- * Runs that wait for a person to review them, oldest first.
199
+ * Review tasks waiting for a person, oldest first, or decided ones by status, newest first.
200
200
  *
201
201
  * CLI: `eigenpal reviews list` · Route: `GET /v1/reviews`
202
202
  *
@@ -219,6 +219,21 @@ export declare class ReviewsResource {
219
219
  version: number;
220
220
  createdAt: string;
221
221
  updatedAt: string;
222
+ /** What the task is about, to tell tasks apart in a queue: its input file names. Null when it has none. Never a reviewed value. */
223
+ subject?: string | null;
224
+ /** The run the task belongs to, to tell tasks of one automation apart and to keep draft runs apart from live ones. Never a reviewed value. */
225
+ run?: {
226
+ /** What the run ran: the live release, a draft (`eigenpal run` or the editor) or a branch or pull request preview. */
227
+ source: 'live' | 'draft' | 'preview';
228
+ /** How the run started (`api`, `cli`, `manual`, `email`, `schedule`, ...). */
229
+ trigger: string | null;
230
+ /** When the run was started. */
231
+ startedAt: string;
232
+ } | null;
233
+ /** When the task was approved, rejected or cancelled. Null while pending. */
234
+ completedAt?: string | null;
235
+ /** Name (or email) of the person who approved or rejected the task. */
236
+ completedByName?: string | null;
222
237
  }, ReviewList>;
223
238
  /**
224
239
  * A review task: what it asks, its fields and its files.
@@ -105,6 +105,8 @@ export class RunsResource {
105
105
  limit: options.limit,
106
106
  ids: options.ids,
107
107
  experiments: options.experiments,
108
+ includeMerged: options.includeMerged,
109
+ parent: options.parent,
108
110
  reviewStatus: options.reviewStatus,
109
111
  reviewVerdict: options.reviewVerdict,
110
112
  hasReview: options.hasReview,
@@ -194,6 +196,7 @@ export class ExperimentsResource {
194
196
  createdAfter: options.createdAfter,
195
197
  createdBefore: options.createdBefore,
196
198
  tag: options.tag,
199
+ includeMerged: options.includeMerged,
197
200
  cursor: options.cursor,
198
201
  },
199
202
  signal: options.signal,
@@ -297,7 +300,7 @@ export class ReviewsResource {
297
300
  void impls;
298
301
  }
299
302
  /**
300
- * Runs that wait for a person to review them, oldest first.
303
+ * Review tasks waiting for a person, oldest first, or decided ones by status, newest first.
301
304
  *
302
305
  * CLI: `eigenpal reviews list` · Route: `GET /v1/reviews`
303
306
  *
@@ -307,6 +310,7 @@ export class ReviewsResource {
307
310
  return this.core.page('humanReviews.list', {
308
311
  query: {
309
312
  automationId: options.automationId,
313
+ status: options.status,
310
314
  waitingBefore: options.waitingBefore,
311
315
  limit: options.limit,
312
316
  cursor: options.cursor,
@@ -681,6 +681,8 @@ export type Experiment = {
681
681
  failedCount: number;
682
682
  /** Runs that failed without their example expecting it: they have no output to grade, so no evaluator ran. */
683
683
  erroredCount?: number;
684
+ /** Runs stopped before they finished (a release merged the pull request mid-eval, or someone cancelled them): not scored, not errors, and left out of the pass rate. */
685
+ cancelledCount?: number;
684
686
  /** Average automated evaluator score over the examples, an errored example counting as 0 (agent experiments: over the scored runs). */
685
687
  avgScore: number | null;
686
688
  createdAt: string;
@@ -730,6 +732,8 @@ export type ExperimentDetail = {
730
732
  failedCount: number;
731
733
  /** Runs that failed without their example expecting it: they have no output to grade, so no evaluator ran. */
732
734
  erroredCount?: number;
735
+ /** Runs stopped before they finished (a release merged the pull request mid-eval, or someone cancelled them): not scored, not errors, and left out of the pass rate. */
736
+ cancelledCount?: number;
733
737
  /** Average automated evaluator score over the examples, an errored example counting as 0 (agent experiments: over the scored runs). */
734
738
  avgScore: number | null;
735
739
  createdAt: string;
@@ -741,8 +745,8 @@ export type ExperimentDetail = {
741
745
  id: string;
742
746
  /** Where the run stands. */
743
747
  state: 'queued' | 'running' | 'waiting' | 'succeeded' | 'failed' | 'cancelled';
744
- /** Where the run stands, including grading. `pending` covers queued, running and finished runs still waiting for evaluators; `ungraded` means no evaluator verdict will arrive. */
745
- outcome: 'pending' | 'passed' | 'failed' | 'errored' | 'ungraded';
748
+ /** Where the run stands, including grading. `pending` covers queued, running and finished runs still waiting for evaluators; `ungraded` means no evaluator verdict will arrive; `cancelled` means the run stopped before it finished (a release merged its pull request mid-eval, or someone cancelled it), so it is not scored and not counted as a failure. */
749
+ outcome: 'pending' | 'passed' | 'failed' | 'errored' | 'ungraded' | 'cancelled';
746
750
  /** Dataset example id for the run. */
747
751
  exampleId: string | null;
748
752
  /** Dataset example name for the run. */
@@ -769,6 +773,8 @@ export type ExperimentList = {
769
773
  export type ExperimentRef = {
770
774
  id: string;
771
775
  automationId: string;
776
+ /** The automation by its name (its folder), as `eigenpal eval` takes it; null when unknown. A draft of a workflow that was never live is named too, never by its id. */
777
+ automation: string | null;
772
778
  };
773
779
  export type File = {
774
780
  id: string;
@@ -1527,6 +1533,21 @@ export type ReviewList = {
1527
1533
  version: number;
1528
1534
  createdAt: string;
1529
1535
  updatedAt: string;
1536
+ /** What the task is about, to tell tasks apart in a queue: its input file names. Null when it has none. Never a reviewed value. */
1537
+ subject?: string | null;
1538
+ /** The run the task belongs to, to tell tasks of one automation apart and to keep draft runs apart from live ones. Never a reviewed value. */
1539
+ run?: {
1540
+ /** What the run ran: the live release, a draft (`eigenpal run` or the editor) or a branch or pull request preview. */
1541
+ source: 'live' | 'draft' | 'preview';
1542
+ /** How the run started (`api`, `cli`, `manual`, `email`, `schedule`, ...). */
1543
+ trigger: string | null;
1544
+ /** When the run was started. */
1545
+ startedAt: string;
1546
+ } | null;
1547
+ /** When the task was approved, rejected or cancelled. Null while pending. */
1548
+ completedAt?: string | null;
1549
+ /** Name (or email) of the person who approved or rejected the task. */
1550
+ completedByName?: string | null;
1530
1551
  }>;
1531
1552
  /** Pass it as `cursor` to read the next page. Null on the last page. */
1532
1553
  nextCursor: string | null;
@@ -1553,6 +1574,20 @@ export type ReviewTaskDetail = {
1553
1574
  version: number;
1554
1575
  createdAt: string;
1555
1576
  updatedAt: string;
1577
+ /** What the task is about, to tell tasks apart in a queue: its input file names. Null when it has none. Never a reviewed value. */
1578
+ subject?: string | null;
1579
+ /** The run the task belongs to, to tell tasks of one automation apart and to keep draft runs apart from live ones. Never a reviewed value. */
1580
+ run?: {
1581
+ /** What the run ran: the live release, a draft (`eigenpal run` or the editor) or a branch or pull request preview. */
1582
+ source: 'live' | 'draft' | 'preview';
1583
+ /** How the run started (`api`, `cli`, `manual`, `email`, `schedule`, ...). */
1584
+ trigger: string | null;
1585
+ /** When the run was started. */
1586
+ startedAt: string;
1587
+ } | null;
1588
+ completedAt: string | null;
1589
+ /** Name (or email) of the person who approved or rejected the task. */
1590
+ completedByName?: string | null;
1556
1591
  files: Array<{
1557
1592
  fileId: string;
1558
1593
  filename: string;
@@ -1600,9 +1635,6 @@ export type ReviewTaskDetail = {
1600
1635
  }>;
1601
1636
  instructions: string | null;
1602
1637
  completedBy: string | null;
1603
- /** Name (or email) of the person who approved or rejected the task. */
1604
- completedByName?: string | null;
1605
- completedAt: string | null;
1606
1638
  outcomeReason: string | null;
1607
1639
  /** Optional lineage@1 document resolved from the extract sidecar. Omitted when missing or unreadable. Validate with @openparser/lineage. */
1608
1640
  lineage?: Record<string, unknown>;
@@ -1646,6 +1678,8 @@ export type Run = {
1646
1678
  review?: RunReviewSummary | RunReview | null;
1647
1679
  /** Pending in-flight human review when the run is waiting on a reviewer. */
1648
1680
  humanReview?: RunHumanReviewSummary | null;
1681
+ /** On a run read (`GET /runs/{id}`): every human review of the run, oldest first, with its decision, reviewer and time. The approval trail stays after the run ends. Omitted on list rows. */
1682
+ humanReviews?: RunHumanReviewTrailEntry[];
1649
1683
  /** Structured processing failure, independent of the HTTP response status. Includes control.fail statusCode and step when known. Present on ended runs; null when no error is recorded. Absent while in flight. */
1650
1684
  error?: RunError | null;
1651
1685
  /** Succeeded runs only. Per-automation business result, not a generic schema. Absent until then. */
@@ -1839,6 +1873,21 @@ export type RunHumanReviewSummary = {
1839
1873
  confirmedCount: number;
1840
1874
  version: number;
1841
1875
  };
1876
+ export type RunHumanReviewTrailEntry = {
1877
+ /** The review task (`GET /api/v1/reviews/{taskId}`). */
1878
+ taskId: string;
1879
+ /** The review step (or agent tool) that asked. */
1880
+ step: string;
1881
+ sourceKind: 'workflow_step' | 'agent_tool';
1882
+ status: 'pending' | 'approved' | 'rejected' | 'cancelled';
1883
+ /** Name (or email) of the person who approved or rejected it. Null while pending. */
1884
+ reviewer: string | null;
1885
+ /** When it was decided. Null while pending. */
1886
+ decidedAt: string | null;
1887
+ /** The reason given for a rejection, or why the review was cancelled. */
1888
+ reason: string | null;
1889
+ createdAt: string;
1890
+ };
1842
1891
  export type RunInput = {
1843
1892
  /** Input arguments the run was started with. */
1844
1893
  args: unknown;
@@ -1888,6 +1937,8 @@ export type RunListItem = {
1888
1937
  review?: RunReviewSummary | RunReview | null;
1889
1938
  /** Pending in-flight human review when the run is waiting on a reviewer. */
1890
1939
  humanReview?: RunHumanReviewSummary | null;
1940
+ /** On a run read (`GET /runs/{id}`): every human review of the run, oldest first, with its decision, reviewer and time. The approval trail stays after the run ends. Omitted on list rows. */
1941
+ humanReviews?: RunHumanReviewTrailEntry[];
1891
1942
  /** Structured processing failure, independent of the HTTP response status. Includes control.fail statusCode and step when known. Present on ended runs; null when no error is recorded. Absent while in flight. */
1892
1943
  error?: RunError | null;
1893
1944
  };
@@ -2077,6 +2128,10 @@ export type RunTiming = {
2077
2128
  sandboxWaitMs: number;
2078
2129
  /** True while the run is back in the queue for a code sandbox; its status stays `running`. */
2079
2130
  waitingForSandbox: boolean;
2131
+ /** Of the time since `startedAt`, how long people held the run at a review (the open review included). Part of `durationMs`; 0 when no review held it. */
2132
+ reviewWaitMs: number;
2133
+ /** While a person holds the run at a review: since when (its oldest open review). Null otherwise. */
2134
+ reviewWaitSince: string | null;
2080
2135
  /** When the user requested cancel; status may still be `running` until the worker stops. */
2081
2136
  cancelRequestedAt: string | null;
2082
2137
  };
@@ -2104,7 +2159,7 @@ export type RunTraceResponse = {
2104
2159
  nextCursor: string | null;
2105
2160
  };
2106
2161
  export type RunTrigger = {
2107
- type: 'api' | 'cli' | 'manual' | 'webhook' | 'email' | 'eval' | null;
2162
+ type: 'api' | 'cli' | 'manual' | 'webhook' | 'email' | 'eval' | 'workflow' | null;
2108
2163
  by: {
2109
2164
  id: string;
2110
2165
  name: string | null;
@@ -2300,7 +2355,7 @@ export interface RunsListOptions {
2300
2355
  /** Only runs that stand in one of these states. */
2301
2356
  state?: Array<'queued' | 'running' | 'waiting' | 'succeeded' | 'failed' | 'cancelled'>;
2302
2357
  /** Only runs started by one of these triggers. */
2303
- trigger?: Array<'api' | 'cli' | 'manual' | 'webhook' | 'email' | 'eval'>;
2358
+ trigger?: Array<'api' | 'cli' | 'manual' | 'webhook' | 'email' | 'eval' | 'workflow'>;
2304
2359
  /** Only runs these users started (user ids), or `__system__` for runs no user started. */
2305
2360
  triggeredBy?: string[];
2306
2361
  batchId?: string;
@@ -2317,6 +2372,10 @@ export interface RunsListOptions {
2317
2372
  ids?: string[];
2318
2373
  /** false leaves out the runs of experiments. Default true. */
2319
2374
  experiments?: boolean;
2375
+ /** true also lists, with `hasExample` or `exampleId`, the runs of pull request check evals that stopped because the request merged. Default false (the release scores the same content). Asking for the `cancelled` state or one `batchId` lists them too. */
2376
+ includeMerged?: boolean;
2377
+ /** `none`: only runs nothing else started (no agent or sub-workflow runs a workflow step started). Run ids (comma separated, at most 100): only the runs those runs started. */
2378
+ parent?: string;
2320
2379
  reviewStatus?: Array<'open' | 'closed' | 'wont_fix'>;
2321
2380
  /** `nit`: reviewed without a verdict. */
2322
2381
  reviewVerdict?: Array<'correct' | 'incorrect' | 'nit'>;
@@ -2370,6 +2429,8 @@ export interface ExperimentsListOptions {
2370
2429
  createdBefore?: string;
2371
2430
  /** Only experiments whose runs carry this tag (workflow experiments). */
2372
2431
  tag?: string;
2432
+ /** true also lists the pull request check evals that stopped because the request merged. Default false: the release scores the same content. */
2433
+ includeMerged?: 'true' | 'false';
2373
2434
  /** The `nextCursor` of the page before. */
2374
2435
  cursor?: string;
2375
2436
  signal?: AbortSignal;
@@ -2420,6 +2481,8 @@ export interface DatasetsReviewsListOptions {
2420
2481
  }
2421
2482
  export interface ReviewsListOptions {
2422
2483
  automationId?: string;
2484
+ /** Which tasks: `pending` (the queue of runs waiting for a person, oldest first; the default), `approved`, `rejected`, `cancelled`, or `all`. Decided and `all` lists are newest first and name the reviewer. */
2485
+ status?: 'pending' | 'approved' | 'rejected' | 'cancelled' | 'all';
2423
2486
  waitingBefore?: string;
2424
2487
  limit?: number;
2425
2488
  /** The `nextCursor` of the page before. */
@@ -16,5 +16,5 @@
16
16
  * for log lines and proxies that don't surface custom headers.
17
17
  */
18
18
  export declare const SDK_LANGUAGE = "typescript";
19
- export declare const SDK_VERSION = "1.0.0-rc.5";
19
+ export declare const SDK_VERSION = "1.0.0-rc.7";
20
20
  export declare function buildTelemetryHeaders(): Record<string, string>;
package/dist/telemetry.js CHANGED
@@ -18,7 +18,7 @@
18
18
  export const SDK_LANGUAGE = 'typescript';
19
19
  // Rewritten at publish time by scripts/release/platform/render-sdk-versions.sh.
20
20
  // Keep this string literal exactly stable — sed matches on it.
21
- export const SDK_VERSION = '1.0.0-rc.5';
21
+ export const SDK_VERSION = '1.0.0-rc.7';
22
22
  function detectRuntime() {
23
23
  const g = globalThis;
24
24
  if (g.Bun?.version)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/sdk",
3
- "version": "1.0.0-rc.5",
3
+ "version": "1.0.0-rc.7",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "engines": {