@ellipsis-dev/sdk 0.21.0 → 0.25.0

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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as components } from './types-DXHI6EPF.js';
2
- export { A as AgentConfigSource, a as AttributionType, B as BudgetSource, C as ClaudeSessionRecord, b as CodexEvent, d as CodexItem, e as CodexSessionRecord, f as CreateReviewRequest, D as DeltaFrame, g as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, h as GithubAccountType, H as Harness, i as HeartbeatFrame, L as LifecycleSessionRecord, P as ParentKind, j as PromptBlockedReason, R as RecordsAppendFrame, k as ResolvedReviewScope, l as Review, m as ReviewConfiguration, n as ReviewCounters, o as ReviewFinding, p as ReviewRequester, q as ReviewScope, r as ReviewScopeKind, s as ReviewStage, t as ReviewedCommit, u as ReviewsListResponse, S as SdkAssistantRecord, v as SdkContentBlock, w as SdkRateLimitRecord, x as SdkRecord, y as SdkResultRecord, z as SdkSystemRecord, I as SdkUserRecord, J as SendSessionMessageRequest, K as Session, M as SessionExitStatus, N as SessionFrame, O as SessionGit, Q as SessionLiveness, T as SessionMessage, U as SessionMessageResponse, V as SessionMessageStatus, W as SessionPrompting, X as SessionRecord, Y as SessionRecordsListResponse, Z as SessionResponse, _ as SessionSource, $ as SessionState, a0 as SessionStatus, a1 as SessionStreamFrame, a2 as SessionSurface, a3 as SessionsListResponse, a4 as SnapshotFrame, a5 as StreamFrame, a6 as TokensInfo, a7 as paths } from './types-DXHI6EPF.js';
1
+ import { c as components } from './types-DJzmFABi.js';
2
+ export { A as AttributionType, B as BudgetSource, C as ClaudeSessionRecord, a as CodexEvent, b as CodexItem, d as CodexSessionRecord, e as CreateReviewRequest, D as DeltaFrame, f as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, g as GithubAccountType, H as Harness, h as HeartbeatFrame, L as LifecycleSessionRecord, P as ParentKind, i as PromptBlockedReason, R as RecordsAppendFrame, j as ResolvedReviewScope, k as Review, l as ReviewConfiguration, m as ReviewCounters, n as ReviewFinding, o as ReviewRequester, p as ReviewScope, q as ReviewScopeKind, r as ReviewStage, s as ReviewedCommit, t as ReviewsListResponse, S as SdkAssistantRecord, u as SdkContentBlock, v as SdkRateLimitRecord, w as SdkRecord, x as SdkResultRecord, y as SdkSystemRecord, z as SdkUserRecord, I as SendSessionMessageRequest, J as Session, K as SessionExitStatus, M as SessionFrame, N as SessionGit, O as SessionLiveness, Q as SessionMessage, T as SessionMessageResponse, U as SessionMessageStatus, V as SessionPrompting, W as SessionRecord, X as SessionRecordsListResponse, Y as SessionResponse, Z as SessionSource, _ as SessionState, $ as SessionStatus, a0 as SessionStreamFrame, a1 as SessionSurface, a2 as SessionsListResponse, a3 as SnapshotFrame, a4 as StreamFrame, a5 as TokensInfo, a6 as paths } from './types-DJzmFABi.js';
3
3
 
4
4
  interface CursorResponse {
5
5
  has_more: boolean;
@@ -209,7 +209,7 @@ declare class EllipsisAutomations {
209
209
  * 409 when another live automation already holds the name.
210
210
  */
211
211
  create(options: {
212
- automation: S['AgentConfig'];
212
+ automation: S['AutomationConfig'];
213
213
  }): Promise<S['AutomationResponse']>;
214
214
  /**
215
215
  * Delete Automation
@@ -247,6 +247,18 @@ declare class EllipsisAutomations {
247
247
  * List automations.
248
248
  */
249
249
  list(): Promise<S['AutomationsListResponse']>;
250
+ /**
251
+ * Get Automation Metrics
252
+ *
253
+ * Return an automation's session distribution and trailing spend,
254
+ * by id or by name.
255
+ *
256
+ * `samples` carries one entry per finished session (duration, cost,
257
+ * tokens) for distributions; `spend_windows` carries what the
258
+ * automation's sessions cost over the last 1, 7, and 28 days against
259
+ * its budget for each window.
260
+ */
261
+ metrics(automation_id: string): Promise<S['AutomationMetricsResponse']>;
250
262
  /**
251
263
  * Start Automation Session
252
264
  *
@@ -285,7 +297,7 @@ declare class EllipsisAutomations {
285
297
  * would revert the change — unlink it first to take ownership.
286
298
  */
287
299
  update(automation_id: string, options: {
288
- automation: S['AgentConfig'];
300
+ automation: S['AutomationConfig'];
289
301
  }): Promise<S['AutomationResponse']>;
290
302
  }
291
303
  declare class EllipsisEnvironments {
@@ -301,7 +313,7 @@ declare class EllipsisEnvironments {
301
313
  * 409 when another live environment already holds the name.
302
314
  */
303
315
  create(options: {
304
- environment: S['EnvironmentConfig'];
316
+ environment: S['EnvironmentDocument'];
305
317
  }): Promise<S['EnvironmentResponse']>;
306
318
  /**
307
319
  * Delete Environment
@@ -338,7 +350,7 @@ declare class EllipsisEnvironments {
338
350
  * defined by a repository file is a 409.
339
351
  */
340
352
  update(environment_id: string, options: {
341
- environment: S['EnvironmentConfig'];
353
+ environment: S['EnvironmentDocument'];
342
354
  }): Promise<S['EnvironmentResponse']>;
343
355
  }
344
356
  declare class EllipsisFiles {
@@ -553,6 +565,23 @@ declare class EllipsisMemories {
553
565
  prefix?: string | null;
554
566
  }): Promise<S['MemoriesListResponse']>;
555
567
  }
568
+ declare class EllipsisModels {
569
+ private readonly transport;
570
+ constructor(transport: Transport);
571
+ /**
572
+ * List Supported Models
573
+ *
574
+ * List selectable agent models.
575
+ *
576
+ * Most expensive first, with the platform default flagged.
577
+ *
578
+ * Reads the same registry as the dashboard's rate table, so a
579
+ * client's model picker can never drift from what's offered.
580
+ * Behind auth but not account-scoped — the selectable set is
581
+ * global.
582
+ */
583
+ list(): Promise<S['ModelsListResponse']>;
584
+ }
556
585
  declare class EllipsisReviews {
557
586
  private readonly transport;
558
587
  constructor(transport: Transport);
@@ -561,9 +590,10 @@ declare class EllipsisReviews {
561
590
  *
562
591
  * Run a code review on demand.
563
592
  *
564
- * Reviews an existing PR or a pushed branch (for a branch, the
565
- * platform finds or creates a draft PR for it, since a code
566
- * review is structurally about a PR).
593
+ * Reviews an open pull request. Which pipeline runs is not a
594
+ * parameter: it resolves from the repository's files exactly as
595
+ * it does for a push, so an on-demand review never disagrees with
596
+ * the automatic one.
567
597
  *
568
598
  * A review is one pipeline run over one commit range, with one
569
599
  * agent session per stage: `review.id` is the run id, and
@@ -596,16 +626,17 @@ declare class EllipsisReviews {
596
626
  *
597
627
  * List code reviews, newest first.
598
628
  *
599
- * `findings` is omitted (counters only).
629
+ * `findings` and `configuration` are omitted (counters only). Each
630
+ * filter is a set: repeat `repository`, `pull_request_number`, or
631
+ * `status` to match any of several values.
600
632
  *
601
633
  * Webhook-created reviews appear here too, so this answers "show
602
634
  * me every review on this PR".
603
635
  */
604
636
  list(options?: {
605
- owner?: string | null;
606
- repo?: string | null;
607
- pull_request_number?: number | null;
608
- status?: S['CodeReviewRunStatus'] | null;
637
+ repository?: (string)[];
638
+ pull_request_number?: (number)[];
639
+ status?: (S['CodeReviewRunStatus'])[];
609
640
  limit?: number;
610
641
  cursor?: string | null;
611
642
  }): Promise<Page<S['Review'], S['ReviewsListResponse']>>;
@@ -648,6 +679,18 @@ declare class EllipsisSecrets {
648
679
  declare class EllipsisSessions {
649
680
  private readonly transport;
650
681
  constructor(transport: Transport);
682
+ /**
683
+ * Get Agent Session Diff
684
+ *
685
+ * Return the session's uncommitted changes as a patch.
686
+ *
687
+ * One unified-diff section per changed file, captured from the
688
+ * sandbox's working tree when the session ended. The per-file
689
+ * counts ride on the session itself (`git.repos[].files`); this
690
+ * is the text behind them. Empty when the tree was clean. A
691
+ * sandbox token may read only its own session's diff.
692
+ */
693
+ diff(session_id: string): Promise<S['SessionDiffResponse']>;
651
694
  /**
652
695
  * Export Agent Session
653
696
  *
@@ -758,7 +801,7 @@ declare class EllipsisSessions {
758
801
  * Start a cloud agent session.
759
802
  *
760
803
  * The daily driver: a prompt, optionally where to run it
761
- * (`environment`) and the run's own settings, in the AgentConfig
804
+ * (`environment`) and the run's own settings, in the AutomationConfig
762
805
  * vocabulary. Anything omitted comes from the organization's
763
806
  * settings — default model, default environment, budget — so
764
807
  * `{"prompt": "..."}` alone is a complete request. `prompt` is the
@@ -769,16 +812,17 @@ declare class EllipsisSessions {
769
812
  */
770
813
  start(options?: {
771
814
  budget?: number | null;
772
- claude?: S['AgentConfigClaude'] | null;
773
- codex?: S['AgentConfigCodex'] | null;
774
- environment?: string | S['AgentConfigEnvironment'] | null;
815
+ claude?: S['ClaudeConfig'] | null;
816
+ codex?: S['CodexConfig'] | null;
817
+ environment?: string | S['EnvironmentConfig'] | null;
775
818
  force_rebuild?: boolean;
776
819
  interactive?: boolean;
777
820
  metadata?: Record<string, string>;
778
- output?: S['AgentConfigOutput'] | null;
779
- permissions?: S['AgentConfigPermissions'] | null;
821
+ output?: S['OutputConfig'] | null;
822
+ permissions?: S['PermissionsConfig'] | null;
780
823
  prompt?: string | null;
781
- skills?: (S['AgentConfigSkill'])[] | null;
824
+ repositories?: (string)[] | null;
825
+ skills?: (S['SkillRef'])[] | null;
782
826
  }): Promise<S['SessionResponse']>;
783
827
  /**
784
828
  * Stop Agent Session
@@ -859,6 +903,7 @@ declare class Ellipsis {
859
903
  readonly files: EllipsisFiles;
860
904
  readonly integrations: EllipsisIntegrations;
861
905
  readonly memories: EllipsisMemories;
906
+ readonly models: EllipsisModels;
862
907
  readonly reviews: EllipsisReviews;
863
908
  readonly secrets: EllipsisSecrets;
864
909
  readonly sessions: EllipsisSessions;
package/dist/index.js CHANGED
@@ -445,6 +445,21 @@ var EllipsisAutomations = class {
445
445
  const path = "/v1/automations";
446
446
  return await this.transport.request("GET", path);
447
447
  }
448
+ /**
449
+ * Get Automation Metrics
450
+ *
451
+ * Return an automation's session distribution and trailing spend,
452
+ * by id or by name.
453
+ *
454
+ * `samples` carries one entry per finished session (duration, cost,
455
+ * tokens) for distributions; `spend_windows` carries what the
456
+ * automation's sessions cost over the last 1, 7, and 28 days against
457
+ * its budget for each window.
458
+ */
459
+ async metrics(automation_id) {
460
+ const path = `/v1/automations/${enc(automation_id)}/metrics`;
461
+ return await this.transport.request("GET", path);
462
+ }
448
463
  /**
449
464
  * Start Automation Session
450
465
  *
@@ -828,6 +843,28 @@ var EllipsisMemories = class {
828
843
  return await this.transport.request("GET", path, { query });
829
844
  }
830
845
  };
846
+ var EllipsisModels = class {
847
+ constructor(transport) {
848
+ this.transport = transport;
849
+ }
850
+ transport;
851
+ /**
852
+ * List Supported Models
853
+ *
854
+ * List selectable agent models.
855
+ *
856
+ * Most expensive first, with the platform default flagged.
857
+ *
858
+ * Reads the same registry as the dashboard's rate table, so a
859
+ * client's model picker can never drift from what's offered.
860
+ * Behind auth but not account-scoped — the selectable set is
861
+ * global.
862
+ */
863
+ async list() {
864
+ const path = "/v1/models";
865
+ return await this.transport.request("GET", path);
866
+ }
867
+ };
831
868
  var EllipsisReviews = class {
832
869
  constructor(transport) {
833
870
  this.transport = transport;
@@ -838,9 +875,10 @@ var EllipsisReviews = class {
838
875
  *
839
876
  * Run a code review on demand.
840
877
  *
841
- * Reviews an existing PR or a pushed branch (for a branch, the
842
- * platform finds or creates a draft PR for it, since a code
843
- * review is structurally about a PR).
878
+ * Reviews an open pull request. Which pipeline runs is not a
879
+ * parameter: it resolves from the repository's files exactly as
880
+ * it does for a push, so an on-demand review never disagrees with
881
+ * the automatic one.
844
882
  *
845
883
  * A review is one pipeline run over one commit range, with one
846
884
  * agent session per stage: `review.id` is the run id, and
@@ -874,14 +912,16 @@ var EllipsisReviews = class {
874
912
  *
875
913
  * List code reviews, newest first.
876
914
  *
877
- * `findings` is omitted (counters only).
915
+ * `findings` and `configuration` are omitted (counters only). Each
916
+ * filter is a set: repeat `repository`, `pull_request_number`, or
917
+ * `status` to match any of several values.
878
918
  *
879
919
  * Webhook-created reviews appear here too, so this answers "show
880
920
  * me every review on this PR".
881
921
  */
882
922
  async list(options = {}) {
883
923
  const path = "/v1/reviews";
884
- const query = buildQuery({ owner: options.owner, repo: options.repo, pull_request_number: options.pull_request_number, status: options.status, limit: options.limit, cursor: options.cursor });
924
+ const query = buildQuery({ repository: options.repository, pull_request_number: options.pull_request_number, status: options.status, limit: options.limit, cursor: options.cursor });
885
925
  const response = await this.transport.request("GET", path, { query });
886
926
  return new Page(
887
927
  response,
@@ -940,6 +980,21 @@ var EllipsisSessions = class {
940
980
  this.transport = transport;
941
981
  }
942
982
  transport;
983
+ /**
984
+ * Get Agent Session Diff
985
+ *
986
+ * Return the session's uncommitted changes as a patch.
987
+ *
988
+ * One unified-diff section per changed file, captured from the
989
+ * sandbox's working tree when the session ended. The per-file
990
+ * counts ride on the session itself (`git.repos[].files`); this
991
+ * is the text behind them. Empty when the tree was clean. A
992
+ * sandbox token may read only its own session's diff.
993
+ */
994
+ async diff(session_id) {
995
+ const path = `/v1/sessions/${enc(session_id)}/diff`;
996
+ return await this.transport.request("GET", path);
997
+ }
943
998
  /**
944
999
  * Export Agent Session
945
1000
  *
@@ -1065,7 +1120,7 @@ var EllipsisSessions = class {
1065
1120
  * Start a cloud agent session.
1066
1121
  *
1067
1122
  * The daily driver: a prompt, optionally where to run it
1068
- * (`environment`) and the run's own settings, in the AgentConfig
1123
+ * (`environment`) and the run's own settings, in the AutomationConfig
1069
1124
  * vocabulary. Anything omitted comes from the organization's
1070
1125
  * settings — default model, default environment, budget — so
1071
1126
  * `{"prompt": "..."}` alone is a complete request. `prompt` is the
@@ -1076,7 +1131,7 @@ var EllipsisSessions = class {
1076
1131
  */
1077
1132
  async start(options = {}) {
1078
1133
  const path = "/v1/sessions";
1079
- const body = buildBody({ budget: options.budget, claude: options.claude, codex: options.codex, environment: options.environment, force_rebuild: options.force_rebuild, interactive: options.interactive, metadata: options.metadata, output: options.output, permissions: options.permissions, prompt: options.prompt, skills: options.skills });
1134
+ const body = buildBody({ budget: options.budget, claude: options.claude, codex: options.codex, environment: options.environment, force_rebuild: options.force_rebuild, interactive: options.interactive, metadata: options.metadata, output: options.output, permissions: options.permissions, prompt: options.prompt, repositories: options.repositories, skills: options.skills });
1080
1135
  return await this.transport.request("POST", path, { body });
1081
1136
  }
1082
1137
  /**
@@ -1184,6 +1239,7 @@ var Ellipsis = class {
1184
1239
  files;
1185
1240
  integrations;
1186
1241
  memories;
1242
+ models;
1187
1243
  reviews;
1188
1244
  secrets;
1189
1245
  sessions;
@@ -1199,6 +1255,7 @@ var Ellipsis = class {
1199
1255
  this.files = new EllipsisFiles(this.transport);
1200
1256
  this.integrations = new EllipsisIntegrations(this.transport);
1201
1257
  this.memories = new EllipsisMemories(this.transport);
1258
+ this.models = new EllipsisModels(this.transport);
1202
1259
  this.reviews = new EllipsisReviews(this.transport);
1203
1260
  this.secrets = new EllipsisSecrets(this.transport);
1204
1261
  this.sessions = new EllipsisSessions(this.transport);
@@ -1,4 +1,4 @@
1
- import { X as SessionRecord, a8 as CodexFileChangeItem, b as CodexEvent, a9 as CodexMcpToolCallItem, x as SdkRecord, K as Session, T as SessionMessage, a5 as StreamFrame } from '../types-DXHI6EPF.js';
1
+ import { W as SessionRecord, a7 as CodexFileChangeItem, a as CodexEvent, a8 as CodexMcpToolCallItem, w as SdkRecord, J as Session, Q as SessionMessage, a4 as StreamFrame } from '../types-DJzmFABi.js';
2
2
 
3
3
  interface ChatToolNode {
4
4
  key: string;
@@ -1,4 +1,4 @@
1
- import { a5 as StreamFrame, K as Session } from '../types-DXHI6EPF.js';
1
+ import { a4 as StreamFrame, J as Session } from '../types-DJzmFABi.js';
2
2
 
3
3
  declare const SESSION_STREAM_PROTOCOL_VERSION = 3;
4
4
  declare const WS_CLOSE_NORMAL = 1000;