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

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.
@@ -182,6 +182,10 @@ export declare const OPERATIONS: {
182
182
  readonly method: "GET";
183
183
  readonly path: "/v1/projects/{id}/builds";
184
184
  };
185
+ readonly 'projects.create': {
186
+ readonly method: "POST";
187
+ readonly path: "/v1/projects";
188
+ };
185
189
  readonly 'projects.get': {
186
190
  readonly method: "GET";
187
191
  readonly path: "/v1/projects/{id}";
@@ -86,6 +86,7 @@ export const OPERATIONS = {
86
86
  'humanReviews.reject': { method: 'POST', path: '/v1/reviews/{taskId}/reject' },
87
87
  'models.list': { method: 'GET', path: '/v1/models' },
88
88
  'projects.builds.list': { method: 'GET', path: '/v1/projects/{id}/builds' },
89
+ 'projects.create': { method: 'POST', path: '/v1/projects' },
89
90
  'projects.get': { method: 'GET', path: '/v1/projects/{id}' },
90
91
  'projects.list': { method: 'GET', path: '/v1/projects' },
91
92
  'projects.operations.get': { method: 'GET', path: '/v1/projects/{id}/operations/{operationId}' },
@@ -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, 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, 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, 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';
@@ -1,7 +1,7 @@
1
1
  import type { Core } from '../core.js';
2
2
  import type { PagePromise } from '../page.js';
3
3
  import type { DatasetsReviews, EmailServers, Experiments, Files, Runs, Templates } from '../resources.js';
4
- import type { ApiCallOptions, AutomationDetail, AutomationList, AutomationsGetOptions, AutomationsListOptions, AutomationSummary, DatasetReviewDetail, DatasetReviewInboxItem, DatasetReviewInboxList, DatasetsReviewsCreateOptions, DatasetsReviewsListOptions, DeletedVariable, DeleteEmailServerResponse, DeleteFileResponse, DeletePromotionRouteResponse, DeleteTemplateResponse, EmailServer, EmailServerList, EmailServersDeleteOptions, EmailServersGetOptions, EmailServersListOptions, EmailServersTestOptions, Experiment, ExperimentList, ExperimentsListOptions, File, FilesDeleteOptions, FilesDownloadOptions, FilesGetOptions, ModelList, ModelsListOptions, Project, ProjectList, ProjectRelease, ProjectReleaseDetail, ProjectReleaseList, ProjectsListOptions, ProjectStatus, PromotionRoute, PromotionRouteList, PromotionRoutePlan, PublicModel, ReleasesGetOptions, ReleasesListOptions, ReleasesRestoreOptions, ReleasesWithdrawOptions, ReviewList, ReviewsApproveOptions, ReviewsDownloadOptions, ReviewsGetOptions, ReviewsListOptions, ReviewsRejectOptions, ReviewsSetOptions, ReviewTaskDetail, RoutesDeleteOptions, RoutesGetOptions, RoutesListOptions, RoutesSetOptions, Run, RunAccepted, RunCancelResponse, RunList, RunListItem, RunsCancelOptions, RunsGetOptions, RunsListOptions, RunsRerunOptions, StatusOptions, Template, TemplateList, TemplatesDeleteOptions, TemplatesDownloadOptions, TemplatesGetOptions, TemplatesListOptions, TestEmailServerResponse, Variable, VariableList, VariablesDeleteOptions, VariableSetResponse, VariablesListOptions, VariablesSetOptions } from './types.gen.js';
4
+ import type { ApiCallOptions, AutomationDetail, AutomationList, AutomationsGetOptions, AutomationsListOptions, AutomationSummary, DatasetReviewDetail, DatasetReviewInboxItem, DatasetReviewInboxList, DatasetsReviewsCreateOptions, DatasetsReviewsListOptions, DeletedVariable, DeleteEmailServerResponse, DeleteFileResponse, DeletePromotionRouteResponse, DeleteTemplateResponse, EmailServer, EmailServerList, EmailServersDeleteOptions, EmailServersGetOptions, EmailServersListOptions, EmailServersTestOptions, Experiment, ExperimentList, ExperimentsListOptions, File, FilesDeleteOptions, FilesDownloadOptions, FilesGetOptions, ModelList, ModelsListOptions, Project, ProjectList, ProjectRelease, ProjectReleaseDetail, ProjectReleaseList, ProjectsCreateOptions, ProjectsListOptions, ProjectStatus, PromotionRoute, PromotionRouteList, PromotionRoutePlan, PublicModel, ReleasesGetOptions, ReleasesListOptions, ReleasesRestoreOptions, ReleasesWithdrawOptions, ReviewList, ReviewsApproveOptions, ReviewsDownloadOptions, ReviewsGetOptions, ReviewsListOptions, ReviewsRejectOptions, ReviewsSetOptions, ReviewTaskDetail, RoutesDeleteOptions, RoutesGetOptions, RoutesListOptions, RoutesSetOptions, Run, RunAccepted, RunCancelResponse, RunList, RunListItem, RunsCancelOptions, RunsGetOptions, RunsListOptions, RunsRerunOptions, StatusOptions, Template, TemplateList, TemplatesDeleteOptions, TemplatesDownloadOptions, TemplatesGetOptions, TemplatesListOptions, TestEmailServerResponse, Variable, VariableList, VariablesDeleteOptions, VariableSetResponse, VariablesListOptions, VariablesSetOptions } from './types.gen.js';
5
5
  /** The hand-written classes that fill the custom methods. */
6
6
  export interface ResourceImpls {
7
7
  RunsResource: new (core: Core, impls: ResourceImpls) => Runs;
@@ -11,6 +11,24 @@ export interface ResourceImpls {
11
11
  EmailServersResource: new (core: Core, impls: ResourceImpls) => EmailServers;
12
12
  FilesResource: new (core: Core, impls: ResourceImpls) => Files;
13
13
  }
14
+ export declare class ProjectsResource {
15
+ protected readonly core: Core;
16
+ constructor(core: Core, impls: ResourceImpls);
17
+ /**
18
+ * Create a project from a GitHub or GitLab repository (in a clone, link the clone too).
19
+ *
20
+ * CLI: `eigenpal projects create [name]` · Route: `POST /v1/projects`
21
+ */
22
+ create(options: ProjectsCreateOptions): Promise<Project>;
23
+ /**
24
+ * The projects you can open.
25
+ *
26
+ * CLI: `eigenpal projects list` · Route: `GET /v1/projects`
27
+ *
28
+ * Answers a page; iterate it (`for await`) for every item.
29
+ */
30
+ list(options?: ProjectsListOptions): PagePromise<Project, ProjectList>;
31
+ }
14
32
  export declare class AutomationsResource {
15
33
  protected readonly core: Core;
16
34
  constructor(core: Core, impls: ResourceImpls);
@@ -257,18 +275,6 @@ export declare class VariablesResource {
257
275
  */
258
276
  delete(name: string, options?: VariablesDeleteOptions): Promise<DeletedVariable>;
259
277
  }
260
- export declare class ProjectsResource {
261
- protected readonly core: Core;
262
- constructor(core: Core, impls: ResourceImpls);
263
- /**
264
- * The projects you can open.
265
- *
266
- * CLI: `eigenpal projects list` · Route: `GET /v1/projects`
267
- *
268
- * Answers a page; iterate it (`for await`) for every item.
269
- */
270
- list(options?: ProjectsListOptions): PagePromise<Project, ProjectList>;
271
- }
272
278
  export declare class ModelsResource {
273
279
  protected readonly core: Core;
274
280
  constructor(core: Core, impls: ResourceImpls);
@@ -421,6 +427,7 @@ export declare abstract class FilesResource {
421
427
  }
422
428
  export declare abstract class EigenPalClientBase {
423
429
  protected readonly core: Core;
430
+ readonly projects: ProjectsResource;
424
431
  readonly automations: AutomationsResource;
425
432
  readonly runs: Runs;
426
433
  readonly experiments: Experiments;
@@ -428,7 +435,6 @@ export declare abstract class EigenPalClientBase {
428
435
  readonly datasets: DatasetsResource;
429
436
  readonly reviews: ReviewsResource;
430
437
  readonly variables: VariablesResource;
431
- readonly projects: ProjectsResource;
432
438
  readonly models: ModelsResource;
433
439
  readonly templates: Templates;
434
440
  readonly emailServers: EmailServers;
@@ -444,7 +450,7 @@ export declare abstract class EigenPalClientBase {
444
450
  /**
445
451
  * Run an automation and wait for the result. In a project folder the local source runs as a draft; nothing live changes.
446
452
  *
447
- * CLI: `eigenpal run [<project>/]<automation>[@<version|range|live>] [file]` · Route: `POST /v1/runs`
453
+ * CLI: `eigenpal run [<project>/]<automation>[@<version|range|live|branch|commit>] [file]` · Route: `POST /v1/runs`
448
454
  *
449
455
  * Waits by default (`timeoutMs`, default 30 minutes).
450
456
  */
@@ -452,7 +458,7 @@ export declare abstract class EigenPalClientBase {
452
458
  /**
453
459
  * Run the dataset as an experiment; report what failed. Nothing live changes.
454
460
  *
455
- * CLI: `eigenpal eval <automation>[@<version|range|live>]` · Route: `POST /v1/automations/{id}/experiments`
461
+ * CLI: `eigenpal eval <automation>[@<version|range|live|branch|commit>]` · Route: `POST /v1/automations/{id}/experiments`
456
462
  *
457
463
  * Waits by default (`timeoutMs`, default 30 minutes).
458
464
  */
@@ -1,4 +1,40 @@
1
1
  // Generated by scripts/sdk-gen from openapi.json and the CLI command table. Do not edit.
2
+ export class ProjectsResource {
3
+ core;
4
+ constructor(core, impls) {
5
+ this.core = core;
6
+ void impls;
7
+ }
8
+ /**
9
+ * Create a project from a GitHub or GitLab repository (in a clone, link the clone too).
10
+ *
11
+ * CLI: `eigenpal projects create [name]` · Route: `POST /v1/projects`
12
+ */
13
+ create(options) {
14
+ return this.core.request('projects.create', {
15
+ body: {
16
+ slug: options.slug,
17
+ connectionId: options.connectionId,
18
+ repository: options.repo,
19
+ rootDirectory: options.dir,
20
+ trackedBranch: options.branch,
21
+ previews: options.previews,
22
+ provider: options.provider,
23
+ },
24
+ signal: options.signal,
25
+ });
26
+ }
27
+ /**
28
+ * The projects you can open.
29
+ *
30
+ * CLI: `eigenpal projects list` · Route: `GET /v1/projects`
31
+ *
32
+ * Answers a page; iterate it (`for await`) for every item.
33
+ */
34
+ list(options = {}) {
35
+ return this.core.page('projects.list', { query: { archived: options.archived }, signal: options.signal }, { list: { key: 'data', paging: 'none' } });
36
+ }
37
+ }
2
38
  export class AutomationsResource {
3
39
  core;
4
40
  constructor(core, impls) {
@@ -285,10 +321,7 @@ export class ReviewsResource {
285
321
  * CLI: `eigenpal reviews get <task>` · Route: `GET /v1/reviews/{taskId}`
286
322
  */
287
323
  get(task, options = {}) {
288
- return this.core.request('humanReviews.get', {
289
- path: { taskId: task },
290
- signal: options.signal,
291
- });
324
+ return this.core.request('humanReviews.get', { path: { taskId: task }, project: options.project, signal: options.signal }, { project: 'query' });
292
325
  }
293
326
  /**
294
327
  * Set one field of a review task. Does not approve it.
@@ -388,23 +421,6 @@ export class VariablesResource {
388
421
  return this.core.request('variables.delete', { path: { name: name }, project: options.project, signal: options.signal }, { project: 'query' });
389
422
  }
390
423
  }
391
- export class ProjectsResource {
392
- core;
393
- constructor(core, impls) {
394
- this.core = core;
395
- void impls;
396
- }
397
- /**
398
- * The projects you can open.
399
- *
400
- * CLI: `eigenpal projects list` · Route: `GET /v1/projects`
401
- *
402
- * Answers a page; iterate it (`for await`) for every item.
403
- */
404
- list(options = {}) {
405
- return this.core.page('projects.list', { query: { archived: options.archived }, signal: options.signal }, { list: { key: 'data', paging: 'none' } });
406
- }
407
- }
408
424
  export class ModelsResource {
409
425
  core;
410
426
  constructor(core, impls) {
@@ -615,6 +631,7 @@ export class FilesResource {
615
631
  }
616
632
  export class EigenPalClientBase {
617
633
  core;
634
+ projects;
618
635
  automations;
619
636
  runs;
620
637
  experiments;
@@ -622,7 +639,6 @@ export class EigenPalClientBase {
622
639
  datasets;
623
640
  reviews;
624
641
  variables;
625
- projects;
626
642
  models;
627
643
  templates;
628
644
  emailServers;
@@ -630,6 +646,7 @@ export class EigenPalClientBase {
630
646
  files;
631
647
  constructor(core, impls) {
632
648
  this.core = core;
649
+ this.projects = new ProjectsResource(core, impls);
633
650
  this.automations = new AutomationsResource(core, impls);
634
651
  this.runs = new impls.RunsResource(core, impls);
635
652
  this.experiments = new impls.ExperimentsResource(core, impls);
@@ -637,7 +654,6 @@ export class EigenPalClientBase {
637
654
  this.datasets = new DatasetsResource(core, impls);
638
655
  this.reviews = new ReviewsResource(core, impls);
639
656
  this.variables = new VariablesResource(core, impls);
640
- this.projects = new ProjectsResource(core, impls);
641
657
  this.models = new ModelsResource(core, impls);
642
658
  this.templates = new impls.TemplatesResource(core, impls);
643
659
  this.emailServers = new impls.EmailServersResource(core, impls);
@@ -29,6 +29,7 @@ export type AgentEvaluation = {
29
29
  kind: 'llm_judge';
30
30
  prompt: string;
31
31
  model?: string;
32
+ judgedOnly?: string[];
32
33
  }>;
33
34
  pass: {
34
35
  kind: 'callback';
@@ -90,6 +91,11 @@ export type AuthCheckResponse = {
90
91
  id: string;
91
92
  slug: string;
92
93
  } | null;
94
+ /** Whether new projects can be hosted on EigenPal Git on this server. When not, `message` says why and what to do instead (connect a GitHub or GitLab repository). */
95
+ eigenpalGit: {
96
+ available: boolean;
97
+ message: string | null;
98
+ };
93
99
  };
94
100
  export type AutomationDetail = {
95
101
  /** Implementation id for the automation. Workflow automations use workflow ids; agent automations use agent workflow ids. */
@@ -157,8 +163,10 @@ export type CreatedProjectRelease = {
157
163
  changed: boolean;
158
164
  }> | null;
159
165
  release?: ProjectRelease;
160
- /** Branch releases: false when the build was numbered already (that release is answered). */
166
+ /** 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. */
161
167
  changed?: boolean;
168
+ /** Branch dry run with the approval step: the branch rule that leaves merging to a person (a ruleset, a protected branch, the token access), so a real call would stop at approval_required. */
169
+ approvalReason?: string | null;
162
170
  /** Branch releases: the branch and where it stands against the tracked branch. */
163
171
  branch?: {
164
172
  name: string;
@@ -192,6 +200,20 @@ export type CreatedProjectRelease = {
192
200
  /** GitHub and GitLab branch releases: the pull or merge request that lands the branch. */
193
201
  request?: ProjectReleaseRequest | null;
194
202
  };
203
+ export type CreateEigenpalProject = {
204
+ slug: string;
205
+ provider: 'eigenpal';
206
+ };
207
+ export type CreateProject = {
208
+ slug: string;
209
+ /** The Git provider connection to import through. Absent: the organization's connection that reaches the repository. */
210
+ connectionId?: string;
211
+ repository: string;
212
+ rootDirectory?: string;
213
+ trackedBranch?: string;
214
+ /** Preview builds for other branches; default true */
215
+ previews?: boolean;
216
+ };
195
217
  export type DatasetDraftBody = {
196
218
  /** The version the experiment will run, as `version` of the experiment request (informational). */
197
219
  version?: string;
@@ -643,7 +665,9 @@ export type Experiment = {
643
665
  /** Automation this experiment belongs to. */
644
666
  automationId: string;
645
667
  kind: AutomationKind;
646
- /** Where the experiment stands, in the words runs use: queued, running, waiting (every unfinished run waits for a person), succeeded (finished; failed examples are counted in `failedCount`), failed (every run failed), cancelled. */
668
+ /** Workflow experiments: what the runs ran. `live`: the automation itself (a release or a build); `draft`: a person's `eigenpal run` or `eigenpal eval` draft; `preview`: a branch or pull request preview. Drafts and previews are listed with their automation. */
669
+ source?: 'live' | 'draft' | 'preview';
670
+ /** Where the experiment stands, in the words runs use: queued, running, waiting (every unfinished run waits for a person), succeeded (finished; failed examples are counted in `failedCount` and `erroredCount`), failed (every run errored, so no example was graded), cancelled. */
647
671
  state: 'queued' | 'running' | 'waiting' | 'succeeded' | 'failed' | 'cancelled';
648
672
  /** Total runs in the experiment. */
649
673
  runCount: number;
@@ -653,6 +677,8 @@ export type Experiment = {
653
677
  passedCount: number;
654
678
  /** Runs whose evaluator scores failed. */
655
679
  failedCount: number;
680
+ /** Runs that failed without their example expecting it: they have no output to grade, so no evaluator ran. */
681
+ erroredCount?: number;
656
682
  /** Average automated evaluator score. */
657
683
  avgScore: number | null;
658
684
  createdAt: string;
@@ -688,7 +714,9 @@ export type ExperimentDetail = {
688
714
  /** Automation this experiment belongs to. */
689
715
  automationId: string;
690
716
  kind: AutomationKind;
691
- /** Where the experiment stands, in the words runs use: queued, running, waiting (every unfinished run waits for a person), succeeded (finished; failed examples are counted in `failedCount`), failed (every run failed), cancelled. */
717
+ /** Workflow experiments: what the runs ran. `live`: the automation itself (a release or a build); `draft`: a person's `eigenpal run` or `eigenpal eval` draft; `preview`: a branch or pull request preview. Drafts and previews are listed with their automation. */
718
+ source?: 'live' | 'draft' | 'preview';
719
+ /** Where the experiment stands, in the words runs use: queued, running, waiting (every unfinished run waits for a person), succeeded (finished; failed examples are counted in `failedCount` and `erroredCount`), failed (every run errored, so no example was graded), cancelled. */
692
720
  state: 'queued' | 'running' | 'waiting' | 'succeeded' | 'failed' | 'cancelled';
693
721
  /** Total runs in the experiment. */
694
722
  runCount: number;
@@ -698,6 +726,8 @@ export type ExperimentDetail = {
698
726
  passedCount: number;
699
727
  /** Runs whose evaluator scores failed. */
700
728
  failedCount: number;
729
+ /** Runs that failed without their example expecting it: they have no output to grade, so no evaluator ran. */
730
+ erroredCount?: number;
701
731
  /** Average automated evaluator score. */
702
732
  avgScore: number | null;
703
733
  createdAt: string;
@@ -719,6 +749,8 @@ export type ExperimentDetail = {
719
749
  evalScore: number | null;
720
750
  /** Persisted aggregate evaluator verdict. */
721
751
  evalPassed: boolean | null;
752
+ /** Why the run failed, for an errored run; null otherwise. */
753
+ error?: string | null;
722
754
  createdAt: string;
723
755
  completedAt: string | null;
724
756
  }>;
@@ -975,6 +1007,8 @@ export type ProjectRelease = {
975
1007
  notes: string | null;
976
1008
  createdAt: string;
977
1009
  createdBy: string | null;
1010
+ /** The name (or email) of whoever made the release; listing only, null for releases from Git or a promotion. */
1011
+ createdByName?: string | null;
978
1012
  /** Set while withdrawn: version ranges skip the release, its exact number still resolves. */
979
1013
  withdrawn: {
980
1014
  at: string;
@@ -1009,6 +1043,8 @@ export type ProjectReleaseDetail = {
1009
1043
  notes: string | null;
1010
1044
  createdAt: string;
1011
1045
  createdBy: string | null;
1046
+ /** The name (or email) of whoever made the release; listing only, null for releases from Git or a promotion. */
1047
+ createdByName?: string | null;
1012
1048
  /** Set while withdrawn: version ranges skip the release, its exact number still resolves. */
1013
1049
  withdrawn: {
1014
1050
  at: string;
@@ -1077,6 +1113,7 @@ export type ProjectRollbackBody = {
1077
1113
  /** Answer what would happen (`planned`) and change nothing. */
1078
1114
  dryRun?: boolean;
1079
1115
  };
1116
+ export type ProjectsCreateBody = CreateProject | CreateEigenpalProject;
1080
1117
  export type ProjectsOperationsGetResponse = ReleaseOperation | PromotionOperation;
1081
1118
  export type ProjectsPromoteResponse = ProjectPromotion | PromotionOperation;
1082
1119
  export type ProjectsReleasesCreateResponse = CreatedProjectRelease | ReleaseOperation;
@@ -1195,6 +1232,8 @@ export type ProjectStatus = {
1195
1232
  id: string;
1196
1233
  name: string;
1197
1234
  }>;
1235
+ /** The agents of the branch's previewed build the caller can open, by name. Each runs at the build's commit (`<agent>@<branch>`), also before it has ever been live. */
1236
+ agents: string[];
1198
1237
  }>;
1199
1238
  previewLimit: number;
1200
1239
  checks: Array<{
@@ -1273,6 +1312,18 @@ export type ProjectStatus = {
1273
1312
  } | null;
1274
1313
  problem: string | null;
1275
1314
  }>;
1315
+ /** GitHub projects: the permissions EigenPal's GitHub App needs on the repository and lacks (Contents and Pull requests write for releases, Checks write for the pull request check). Null when none is missing or it is unknown. */
1316
+ repositoryAccess: {
1317
+ repository: string;
1318
+ missing: Array<{
1319
+ /** GitHub's name of the permission: `contents`. */
1320
+ key: string;
1321
+ level: 'read' | 'write';
1322
+ }>;
1323
+ message: string;
1324
+ /** How to grant the missing permissions. */
1325
+ hint: string;
1326
+ } | null;
1276
1327
  };
1277
1328
  export type PromotionOperation = {
1278
1329
  /** Operation id (opaque). */
@@ -1557,6 +1608,8 @@ export type Run = {
1557
1608
  project: string | null;
1558
1609
  /** Name of the automation that ran. */
1559
1610
  automation: string | null;
1611
+ /** What ran: `live` (a build of the branch the project tracks), `draft` (a CLI draft or its eval) or `preview` (a branch or pull request preview, its PR check included). An agent or sub-workflow a run invoked takes the source of that run. */
1612
+ source: 'live' | 'draft' | 'preview';
1560
1613
  /** Release number that ran. When the source that ran is no release (a draft, a branch or a build made live without one), an agent run carries the version it asked for and a workflow run null. `commit` then says what ran. */
1561
1614
  version: string | null;
1562
1615
  /** Source commit that ran; null when none is recorded. */
@@ -1797,6 +1850,8 @@ export type RunListItem = {
1797
1850
  project: string | null;
1798
1851
  /** Name of the automation that ran. */
1799
1852
  automation: string | null;
1853
+ /** What ran: `live` (a build of the branch the project tracks), `draft` (a CLI draft or its eval) or `preview` (a branch or pull request preview, its PR check included). An agent or sub-workflow a run invoked takes the source of that run. */
1854
+ source: 'live' | 'draft' | 'preview';
1800
1855
  /** Release number that ran. When the source that ran is no release (a draft, a branch or a build made live without one), an agent run carries the version it asked for and a workflow run null. `commit` then says what ran. */
1801
1856
  version: string | null;
1802
1857
  /** Source commit that ran; null when none is recorded. */
@@ -1947,6 +2002,8 @@ export type RunStep = {
1947
2002
  error: string | null;
1948
2003
  errorTruncated: boolean;
1949
2004
  skippedReason: string | null;
2005
+ /** While the step waits: what it waits for (a person on a review, another run it started, a timer, a retry or a free sandbox). Null otherwise. */
2006
+ waitingOn: RunStepWait | null;
1950
2007
  };
1951
2008
  export type RunStepDetail = {
1952
2009
  /** Step id: read it in full at GET /runs/{id}/steps/{stepId}. */
@@ -1968,6 +2025,8 @@ export type RunStepDetail = {
1968
2025
  error: string | null;
1969
2026
  errorTruncated: boolean;
1970
2027
  skippedReason: string | null;
2028
+ /** While the step waits: what it waits for (a person on a review, another run it started, a timer, a retry or a free sandbox). Null otherwise. */
2029
+ waitingOn: RunStepWait | null;
1971
2030
  /** The step's resolved input. */
1972
2031
  input: unknown;
1973
2032
  /** The step's output (the workflow's own shape). */
@@ -1984,6 +2043,23 @@ export type RunStepDetail = {
1984
2043
  provider: string | null;
1985
2044
  }>;
1986
2045
  };
2046
+ export type RunStepWait = {
2047
+ kind: 'review';
2048
+ /** The review task a person must answer. */
2049
+ reviewTaskId: string | null;
2050
+ } | {
2051
+ kind: 'run';
2052
+ /** The run this step started and waits for (an agent or a workflow). */
2053
+ runId: string;
2054
+ } | {
2055
+ kind: 'timer';
2056
+ /** When the wait ends. */
2057
+ until: string | null;
2058
+ } | {
2059
+ kind: 'retry';
2060
+ } | {
2061
+ kind: 'sandbox';
2062
+ };
1987
2063
  export type RunTiming = {
1988
2064
  createdAt: string;
1989
2065
  startedAt: string | null;
@@ -2171,6 +2247,18 @@ export type WorkflowEvaluatorConfigResponse = {
2171
2247
  evaluation?: AgentEvaluation | null;
2172
2248
  config: WorkflowEvaluatorConfig;
2173
2249
  };
2250
+ export interface ProjectsCreateOptions {
2251
+ slug: string | string;
2252
+ /** The Git provider connection to import through. Absent: the organization's connection that reaches the repository. */
2253
+ connectionId?: string;
2254
+ repo?: string;
2255
+ dir?: string;
2256
+ branch?: string;
2257
+ /** Preview builds for other branches; default true */
2258
+ previews?: boolean;
2259
+ provider?: 'eigenpal';
2260
+ signal?: AbortSignal;
2261
+ }
2174
2262
  export interface StatusOptions {
2175
2263
  /** false skips the environments (no Git host calls). Default true. */
2176
2264
  environments?: boolean;
@@ -2333,6 +2421,8 @@ export interface ReviewsListOptions {
2333
2421
  signal?: AbortSignal;
2334
2422
  }
2335
2423
  export interface ReviewsGetOptions {
2424
+ /** Project slug or id; defaults to the client project. */
2425
+ project?: string;
2336
2426
  signal?: AbortSignal;
2337
2427
  }
2338
2428
  export interface ReviewsSetOptions {
@@ -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.2";
19
+ export declare const SDK_VERSION = "1.0.0-rc.4";
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.2';
21
+ export const SDK_VERSION = '1.0.0-rc.4';
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.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "engines": {