@eigenpal/sdk 1.0.0-rc.4 → 1.0.0-rc.6

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,12 @@ 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
+ /** When the task was approved, rejected or cancelled. Null while pending. */
225
+ completedAt?: string | null;
226
+ /** Name (or email) of the person who approved or rejected the task. */
227
+ completedByName?: string | null;
222
228
  }, ReviewList>;
223
229
  /**
224
230
  * A review task: what it asks, its fields and its files.
@@ -105,6 +105,7 @@ export class RunsResource {
105
105
  limit: options.limit,
106
106
  ids: options.ids,
107
107
  experiments: options.experiments,
108
+ parent: options.parent,
108
109
  reviewStatus: options.reviewStatus,
109
110
  reviewVerdict: options.reviewVerdict,
110
111
  hasReview: options.hasReview,
@@ -297,7 +298,7 @@ export class ReviewsResource {
297
298
  void impls;
298
299
  }
299
300
  /**
300
- * Runs that wait for a person to review them, oldest first.
301
+ * Review tasks waiting for a person, oldest first, or decided ones by status, newest first.
301
302
  *
302
303
  * CLI: `eigenpal reviews list` · Route: `GET /v1/reviews`
303
304
  *
@@ -307,6 +308,7 @@ export class ReviewsResource {
307
308
  return this.core.page('humanReviews.list', {
308
309
  query: {
309
310
  automationId: options.automationId,
311
+ status: options.status,
310
312
  waitingBefore: options.waitingBefore,
311
313
  limit: options.limit,
312
314
  cursor: options.cursor,
@@ -161,6 +161,8 @@ export type CreatedProjectRelease = {
161
161
  kind: 'workflow' | 'agent';
162
162
  /** New or changed against the newest release before it (true in the first release). */
163
163
  changed: boolean;
164
+ /** In the release before it but not in this one: the release takes it out (also changed). */
165
+ removed?: boolean;
164
166
  }> | null;
165
167
  release?: ProjectRelease;
166
168
  /** False when the commit was numbered already: that release is answered and no second number is made (a dry run says so up front). A bump word, or the same number again, on a commit that has a release always answers it. */
@@ -679,7 +681,9 @@ export type Experiment = {
679
681
  failedCount: number;
680
682
  /** Runs that failed without their example expecting it: they have no output to grade, so no evaluator ran. */
681
683
  erroredCount?: number;
682
- /** Average automated evaluator score. */
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;
686
+ /** Average automated evaluator score over the examples, an errored example counting as 0 (agent experiments: over the scored runs). */
683
687
  avgScore: number | null;
684
688
  createdAt: string;
685
689
  completedAt: string | null;
@@ -728,7 +732,9 @@ export type ExperimentDetail = {
728
732
  failedCount: number;
729
733
  /** Runs that failed without their example expecting it: they have no output to grade, so no evaluator ran. */
730
734
  erroredCount?: number;
731
- /** Average automated evaluator score. */
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;
737
+ /** Average automated evaluator score over the examples, an errored example counting as 0 (agent experiments: over the scored runs). */
732
738
  avgScore: number | null;
733
739
  createdAt: string;
734
740
  completedAt: string | null;
@@ -739,8 +745,8 @@ export type ExperimentDetail = {
739
745
  id: string;
740
746
  /** Where the run stands. */
741
747
  state: 'queued' | 'running' | 'waiting' | 'succeeded' | 'failed' | 'cancelled';
742
- /** Where the run stands, including grading. `pending` covers queued, running and finished runs still waiting for evaluators; `ungraded` means no evaluator verdict will arrive. */
743
- 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';
744
750
  /** Dataset example id for the run. */
745
751
  exampleId: string | null;
746
752
  /** Dataset example name for the run. */
@@ -751,6 +757,8 @@ export type ExperimentDetail = {
751
757
  evalPassed: boolean | null;
752
758
  /** Why the run failed, for an errored run; null otherwise. */
753
759
  error?: string | null;
760
+ /** True when the evaluation completed a review step of this run without a person: evaluations never wait for a review, they answer it with the edits in the example's meta.json, or unchanged. */
761
+ simulatedReview?: boolean;
754
762
  createdAt: string;
755
763
  completedAt: string | null;
756
764
  }>;
@@ -765,6 +773,8 @@ export type ExperimentList = {
765
773
  export type ExperimentRef = {
766
774
  id: string;
767
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;
768
778
  };
769
779
  export type File = {
770
780
  id: string;
@@ -1007,7 +1017,7 @@ export type ProjectRelease = {
1007
1017
  notes: string | null;
1008
1018
  createdAt: string;
1009
1019
  createdBy: string | null;
1010
- /** The name (or email) of whoever made the release; listing only, null for releases from Git or a promotion. */
1020
+ /** The name (or email) of whoever made the release; null for releases from Git or a promotion. */
1011
1021
  createdByName?: string | null;
1012
1022
  /** Set while withdrawn: version ranges skip the release, its exact number still resolves. */
1013
1023
  withdrawn: {
@@ -1043,7 +1053,7 @@ export type ProjectReleaseDetail = {
1043
1053
  notes: string | null;
1044
1054
  createdAt: string;
1045
1055
  createdBy: string | null;
1046
- /** The name (or email) of whoever made the release; listing only, null for releases from Git or a promotion. */
1056
+ /** The name (or email) of whoever made the release; null for releases from Git or a promotion. */
1047
1057
  createdByName?: string | null;
1048
1058
  /** Set while withdrawn: version ranges skip the release, its exact number still resolves. */
1049
1059
  withdrawn: {
@@ -1052,12 +1062,14 @@ export type ProjectReleaseDetail = {
1052
1062
  } | null;
1053
1063
  /** Its build is what is live here now. */
1054
1064
  live: boolean;
1055
- /** Every workflow and agent of the release's build. */
1065
+ /** Every workflow and agent of the release's build, then those it removed (removed). */
1056
1066
  automations: Array<{
1057
1067
  name: string;
1058
1068
  kind: 'workflow' | 'agent';
1059
1069
  /** New or changed since the release numbered before it; true in the first release. */
1060
1070
  changed: boolean;
1071
+ /** In the release before it but not in this one: the release takes it out (also changed). */
1072
+ removed?: boolean;
1061
1073
  }>;
1062
1074
  };
1063
1075
  export type ProjectReleaseList = {
@@ -1521,6 +1533,12 @@ export type ReviewList = {
1521
1533
  version: number;
1522
1534
  createdAt: string;
1523
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
+ /** When the task was approved, rejected or cancelled. Null while pending. */
1539
+ completedAt?: string | null;
1540
+ /** Name (or email) of the person who approved or rejected the task. */
1541
+ completedByName?: string | null;
1524
1542
  }>;
1525
1543
  /** Pass it as `cursor` to read the next page. Null on the last page. */
1526
1544
  nextCursor: string | null;
@@ -1547,6 +1565,11 @@ export type ReviewTaskDetail = {
1547
1565
  version: number;
1548
1566
  createdAt: string;
1549
1567
  updatedAt: string;
1568
+ /** 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. */
1569
+ subject?: string | null;
1570
+ completedAt: string | null;
1571
+ /** Name (or email) of the person who approved or rejected the task. */
1572
+ completedByName?: string | null;
1550
1573
  files: Array<{
1551
1574
  fileId: string;
1552
1575
  filename: string;
@@ -1594,7 +1617,6 @@ export type ReviewTaskDetail = {
1594
1617
  }>;
1595
1618
  instructions: string | null;
1596
1619
  completedBy: string | null;
1597
- completedAt: string | null;
1598
1620
  outcomeReason: string | null;
1599
1621
  /** Optional lineage@1 document resolved from the extract sidecar. Omitted when missing or unreadable. Validate with @openparser/lineage. */
1600
1622
  lineage?: Record<string, unknown>;
@@ -1638,6 +1660,8 @@ export type Run = {
1638
1660
  review?: RunReviewSummary | RunReview | null;
1639
1661
  /** Pending in-flight human review when the run is waiting on a reviewer. */
1640
1662
  humanReview?: RunHumanReviewSummary | null;
1663
+ /** 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. */
1664
+ humanReviews?: RunHumanReviewTrailEntry[];
1641
1665
  /** 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. */
1642
1666
  error?: RunError | null;
1643
1667
  /** Succeeded runs only. Per-automation business result, not a generic schema. Absent until then. */
@@ -1831,6 +1855,21 @@ export type RunHumanReviewSummary = {
1831
1855
  confirmedCount: number;
1832
1856
  version: number;
1833
1857
  };
1858
+ export type RunHumanReviewTrailEntry = {
1859
+ /** The review task (`GET /api/v1/reviews/{taskId}`). */
1860
+ taskId: string;
1861
+ /** The review step (or agent tool) that asked. */
1862
+ step: string;
1863
+ sourceKind: 'workflow_step' | 'agent_tool';
1864
+ status: 'pending' | 'approved' | 'rejected' | 'cancelled';
1865
+ /** Name (or email) of the person who approved or rejected it. Null while pending. */
1866
+ reviewer: string | null;
1867
+ /** When it was decided. Null while pending. */
1868
+ decidedAt: string | null;
1869
+ /** The reason given for a rejection, or why the review was cancelled. */
1870
+ reason: string | null;
1871
+ createdAt: string;
1872
+ };
1834
1873
  export type RunInput = {
1835
1874
  /** Input arguments the run was started with. */
1836
1875
  args: unknown;
@@ -1880,6 +1919,8 @@ export type RunListItem = {
1880
1919
  review?: RunReviewSummary | RunReview | null;
1881
1920
  /** Pending in-flight human review when the run is waiting on a reviewer. */
1882
1921
  humanReview?: RunHumanReviewSummary | null;
1922
+ /** 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. */
1923
+ humanReviews?: RunHumanReviewTrailEntry[];
1883
1924
  /** 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. */
1884
1925
  error?: RunError | null;
1885
1926
  };
@@ -2069,6 +2110,10 @@ export type RunTiming = {
2069
2110
  sandboxWaitMs: number;
2070
2111
  /** True while the run is back in the queue for a code sandbox; its status stays `running`. */
2071
2112
  waitingForSandbox: boolean;
2113
+ /** 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. */
2114
+ reviewWaitMs: number;
2115
+ /** While a person holds the run at a review: since when (its oldest open review). Null otherwise. */
2116
+ reviewWaitSince: string | null;
2072
2117
  /** When the user requested cancel; status may still be `running` until the worker stops. */
2073
2118
  cancelRequestedAt: string | null;
2074
2119
  };
@@ -2309,6 +2354,8 @@ export interface RunsListOptions {
2309
2354
  ids?: string[];
2310
2355
  /** false leaves out the runs of experiments. Default true. */
2311
2356
  experiments?: boolean;
2357
+ /** `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. */
2358
+ parent?: string;
2312
2359
  reviewStatus?: Array<'open' | 'closed' | 'wont_fix'>;
2313
2360
  /** `nit`: reviewed without a verdict. */
2314
2361
  reviewVerdict?: Array<'correct' | 'incorrect' | 'nit'>;
@@ -2412,6 +2459,8 @@ export interface DatasetsReviewsListOptions {
2412
2459
  }
2413
2460
  export interface ReviewsListOptions {
2414
2461
  automationId?: string;
2462
+ /** 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. */
2463
+ status?: 'pending' | 'approved' | 'rejected' | 'cancelled' | 'all';
2415
2464
  waitingBefore?: string;
2416
2465
  limit?: number;
2417
2466
  /** 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.4";
19
+ export declare const SDK_VERSION = "1.0.0-rc.6";
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.4';
21
+ export const SDK_VERSION = '1.0.0-rc.6';
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.4",
3
+ "version": "1.0.0-rc.6",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "engines": {