@ellipsis-dev/sdk 0.30.0 → 0.32.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.js CHANGED
@@ -29,58 +29,67 @@ var Page = class {
29
29
  };
30
30
 
31
31
  // src/core/sessionHandle.ts
32
- var TERMINAL_STATUSES = /* @__PURE__ */ new Set([
33
- "closed",
34
- "idle",
32
+ var FINAL_TURN_STATUSES = /* @__PURE__ */ new Set([
33
+ "completed",
35
34
  "failed",
36
- "cancelled",
37
- "stopped"
35
+ "stopped",
36
+ "cancelled"
38
37
  ]);
39
- var DEFAULT_POLL_INTERVAL_MS = 3e3;
40
- function isSettled(session) {
41
- return session.lifecycle.conversation === "closed" || TERMINAL_STATUSES.has(session.lifecycle.status);
38
+ function isTurnFinal(status) {
39
+ return FINAL_TURN_STATUSES.has(status);
42
40
  }
41
+ var DEFAULT_POLL_INTERVAL_MS = 3e3;
43
42
  var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
44
43
  var SessionHandle = class {
45
44
  constructor(sessions, session) {
46
45
  this.sessions = sessions;
47
46
  this.id = session.id;
48
47
  this.session = session;
48
+ this.turnId = session.turn?.id ?? null;
49
49
  }
50
50
  sessions;
51
51
  id;
52
52
  // The latest session snapshot this handle saw.
53
53
  session;
54
+ // The turn `wait()` waits on: the session's turn after `run()`, then the
55
+ // turn each `send()` creates. Null until the session has a message.
56
+ turnId;
54
57
  async refresh() {
55
58
  this.session = (await this.sessions.get(this.id)).session;
56
59
  return this.session;
57
60
  }
58
- // Poll until the session settles (terminal status, or a parked
59
- // conversation: state idle/closed).
61
+ // Poll until the awaited turn reaches a final status (completed, failed,
62
+ // stopped, cancelled) or the conversation closes, and return that turn.
63
+ // Returns null at once when the session has no turn to wait on.
60
64
  async wait(options = {}) {
61
65
  const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
62
66
  const deadline = options.timeoutMs == null ? null : Date.now() + options.timeoutMs;
63
67
  for (; ; ) {
64
68
  const session = await this.refresh();
65
- if (isSettled(session)) return session;
69
+ const turnId = this.turnId;
70
+ if (turnId == null) return null;
71
+ const turn = session.turn?.id === turnId ? session.turn : (await this.sessions.turns.get(this.id, turnId)).turn;
72
+ if (isTurnFinal(turn.status) || session.conversation.state === "closed")
73
+ return turn;
66
74
  if (deadline != null && Date.now() >= deadline) {
67
75
  throw new Error(
68
- `session ${this.id} not terminal after ${options.timeoutMs}ms`
76
+ `turn ${turnId} of session ${this.id} not final after ${options.timeoutMs}ms`
69
77
  );
70
78
  }
71
79
  await sleep(pollIntervalMs);
72
80
  }
73
81
  }
74
- // Post into the session's inbox (delivered at the next turn boundary;
75
- // wakes a parked session). `images` ride the message as content blocks the
76
- // model sees on that turn — a paste into Claude Code.
82
+ // Post a message into the session. The returned turn is the one that will
83
+ // answer it, and the one `wait()` waits on from now. `images` ride the
84
+ // message as content blocks the model sees on that turn.
77
85
  async send(message, options = {}) {
78
86
  const response = await this.sessions.sendMessage(this.id, {
79
87
  message,
80
88
  images: options.images,
81
89
  idempotency_key: options.idempotencyKey
82
90
  });
83
- return response.message;
91
+ this.turnId = response.turn.id;
92
+ return response;
84
93
  }
85
94
  async stop() {
86
95
  this.session = (await this.sessions.stop(this.id)).session;
@@ -259,7 +268,7 @@ var EllipsisAccountApiKeys = class {
259
268
  * Required permissions: write:tokens.
260
269
  * API key: Requires a CLI user token belonging to an account administrator.
261
270
  * CLI user token: Requires an account administrator.
262
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
271
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
263
272
  * Higher permission levels include lower levels: read < write < delete.
264
273
  */
265
274
  async create(options) {
@@ -273,7 +282,7 @@ var EllipsisAccountApiKeys = class {
273
282
  * Required permissions: read:tokens.
274
283
  * API key: Supported.
275
284
  * CLI user token: Supported.
276
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
285
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
277
286
  * Higher permission levels include lower levels: read < write < delete.
278
287
  */
279
288
  async list() {
@@ -288,7 +297,7 @@ var EllipsisAccountApiKeys = class {
288
297
  * Required permissions: delete:tokens.
289
298
  * API key: Requires a CLI user token belonging to an account administrator.
290
299
  * CLI user token: Requires an account administrator.
291
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
300
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
292
301
  * Higher permission levels include lower levels: read < write < delete.
293
302
  */
294
303
  async revoke(api_key_id) {
@@ -312,7 +321,7 @@ var EllipsisAccountBillingAutoRecharge = class {
312
321
  * Required permissions: read:account.
313
322
  * API key: Supported.
314
323
  * CLI user token: Supported.
315
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
324
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
316
325
  * Higher permission levels include lower levels: read < write < delete.
317
326
  */
318
327
  async get() {
@@ -324,7 +333,7 @@ var EllipsisAccountBillingAutoRecharge = class {
324
333
  *
325
334
  * Set your automatic credit recharge policy.
326
335
  *
327
- * Requires a human account administrator; API keys and sandbox tokens
336
+ * Requires a human account administrator; API keys and session tokens
328
337
  * cannot change this policy. Supply enabled explicitly. Saving amounts
329
338
  * with enabled=false keeps recharge off; enabling requires a saved card.
330
339
  * A recharge buys amount_cents of credit and charges the platform fee
@@ -333,7 +342,7 @@ var EllipsisAccountBillingAutoRecharge = class {
333
342
  * Required permissions: write:account.
334
343
  * API key: Requires a CLI user token belonging to an account administrator.
335
344
  * CLI user token: Requires an account administrator.
336
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
345
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
337
346
  * Higher permission levels include lower levels: read < write < delete.
338
347
  */
339
348
  async set(options) {
@@ -361,7 +370,7 @@ var EllipsisAccountBilling = class {
361
370
  * Required permissions: write:account.
362
371
  * API key: Requires a CLI user token belonging to an account administrator.
363
372
  * CLI user token: Requires an account administrator.
364
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
373
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
365
374
  * Higher permission levels include lower levels: read < write < delete.
366
375
  */
367
376
  async cardSetup() {
@@ -381,7 +390,7 @@ var EllipsisAccountBilling = class {
381
390
  * Required permissions: write:account.
382
391
  * API key: Requires a CLI user token belonging to an account administrator.
383
392
  * CLI user token: Requires an account administrator.
384
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
393
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
385
394
  * Higher permission levels include lower levels: read < write < delete.
386
395
  */
387
396
  async checkout(options) {
@@ -400,7 +409,7 @@ var EllipsisAccountBilling = class {
400
409
  * Required permissions: write:account.
401
410
  * API key: Supported.
402
411
  * CLI user token: Supported.
403
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
412
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
404
413
  * Higher permission levels include lower levels: read < write < delete.
405
414
  */
406
415
  async claimSignupCredit() {
@@ -415,7 +424,7 @@ var EllipsisAccountBilling = class {
415
424
  * Required permissions: read:account.
416
425
  * API key: Supported.
417
426
  * CLI user token: Supported.
418
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
427
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
419
428
  * Higher permission levels include lower levels: read < write < delete.
420
429
  */
421
430
  async feeSchedule() {
@@ -433,7 +442,7 @@ var EllipsisAccountBilling = class {
433
442
  * Required permissions: read:account.
434
443
  * API key: Supported.
435
444
  * CLI user token: Supported.
436
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
445
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
437
446
  * Higher permission levels include lower levels: read < write < delete.
438
447
  */
439
448
  async grants() {
@@ -451,7 +460,7 @@ var EllipsisAccountBilling = class {
451
460
  * Required permissions: read:account.
452
461
  * API key: Supported.
453
462
  * CLI user token: Supported.
454
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
463
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
455
464
  * Higher permission levels include lower levels: read < write < delete.
456
465
  */
457
466
  async purchase(checkout_id) {
@@ -469,7 +478,7 @@ var EllipsisAccountBilling = class {
469
478
  * Required permissions: read:account.
470
479
  * API key: Supported.
471
480
  * CLI user token: Supported.
472
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
481
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
473
482
  * Higher permission levels include lower levels: read < write < delete.
474
483
  */
475
484
  async purchaseOptions() {
@@ -482,13 +491,13 @@ var EllipsisAccountBilling = class {
482
491
  * Explain whether your account can start sessions.
483
492
  *
484
493
  * Uses the same account gate as session admission, including credit,
485
- * contact email, and personal Claude subscription eligibility. Scoped
494
+ * contact email, and personal subscription eligibility. Scoped
486
495
  * spend limits are reported separately by /v1/account/budget.
487
496
  *
488
497
  * Required permissions: read:account.
489
498
  * API key: Supported.
490
499
  * CLI user token: Supported.
491
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
500
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
492
501
  * Higher permission levels include lower levels: read < write < delete.
493
502
  */
494
503
  async status() {
@@ -507,18 +516,16 @@ var EllipsisAccountModels = class {
507
516
  * List selectable agent models.
508
517
  *
509
518
  * Grouped by manufacturer and model family, newest versions first
510
- * within each family, with the organization's default model
511
- * flagged (`is_default_agent_model`: the `default_model` of
512
- * `GET /v1/account/settings`).
519
+ * within each family.
513
520
  *
514
521
  * Reads the same registry as the dashboard's rate table, so a
515
522
  * client's model picker can never drift from what's offered. The
516
- * selectable set is global; only the flag is account-scoped.
523
+ * selectable set is global.
517
524
  *
518
525
  * Required permissions: read:templates.
519
526
  * API key: Supported.
520
527
  * CLI user token: Supported.
521
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
528
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
522
529
  * Higher permission levels include lower levels: read < write < delete.
523
530
  */
524
531
  async list() {
@@ -541,7 +548,7 @@ var EllipsisAccountNotifications = class {
541
548
  * Required permissions: write:account.
542
549
  * API key: Supported.
543
550
  * CLI user token: Supported.
544
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
551
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
545
552
  * Higher permission levels include lower levels: read < write < delete.
546
553
  */
547
554
  async testEmail(options) {
@@ -563,7 +570,7 @@ var EllipsisAccountOnboarding = class {
563
570
  * Required permissions: read:account.
564
571
  * API key: Supported.
565
572
  * CLI user token: Supported.
566
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
573
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
567
574
  * Higher permission levels include lower levels: read < write < delete.
568
575
  */
569
576
  async get() {
@@ -579,150 +586,22 @@ var EllipsisAccountOnboarding = class {
579
586
  * Saving use cases requires a valid organization work email and at
580
587
  * least one choice. When Other is the only choice, describe it.
581
588
  * Personal accounts save a null work email. This does not change the
582
- * billing contact email. Sandbox credentials cannot update answers.
589
+ * billing contact email. Session tokens cannot update answers.
583
590
  * Supplying an organization work email requires a human user and sends
584
591
  * a Slack Connect invitation. Slack failures do not undo saved answers.
585
592
  *
586
593
  * Required permissions: write:account.
587
594
  * API key: Supported.
588
595
  * CLI user token: Supported.
589
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
596
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
590
597
  * Higher permission levels include lower levels: read < write < delete.
591
598
  */
592
599
  async update(options = {}) {
593
600
  const path = "/v1/account/onboarding";
594
- const body = buildBody({ other_use_case: options.other_use_case, use_cases: options.use_cases, work_email: options.work_email });
601
+ const body = buildBody({ finished: options.finished, other_use_case: options.other_use_case, use_cases: options.use_cases, work_email: options.work_email });
595
602
  return await this.transport.request("PATCH", path, { body });
596
603
  }
597
604
  };
598
- var EllipsisAccountProvidersAnthropic = class {
599
- constructor(transport) {
600
- this.transport = transport;
601
- }
602
- transport;
603
- /**
604
- * Delete Anthropic Config
605
- *
606
- * Required permissions: delete:account.
607
- * API key: Supported.
608
- * CLI user token: Supported.
609
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
610
- * Higher permission levels include lower levels: read < write < delete.
611
- */
612
- async delete() {
613
- const path = "/v1/account/providers/anthropic";
614
- await this.transport.request("DELETE", path);
615
- }
616
- /**
617
- * Get Anthropic Config
618
- *
619
- * Required permissions: read:account.
620
- * API key: Supported.
621
- * CLI user token: Supported.
622
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
623
- * Higher permission levels include lower levels: read < write < delete.
624
- */
625
- async get() {
626
- const path = "/v1/account/providers/anthropic";
627
- return await this.transport.request("GET", path);
628
- }
629
- /**
630
- * Put Anthropic Config
631
- *
632
- * Required permissions: write:account.
633
- * API key: Supported.
634
- * CLI user token: Supported.
635
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
636
- * Higher permission levels include lower levels: read < write < delete.
637
- */
638
- async set(options) {
639
- const path = "/v1/account/providers/anthropic";
640
- const body = buildBody({ api_key: options.api_key });
641
- return await this.transport.request("PUT", path, { body });
642
- }
643
- /**
644
- * Validate Anthropic Config
645
- *
646
- * Required permissions: write:account.
647
- * API key: Supported.
648
- * CLI user token: Supported.
649
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
650
- * Higher permission levels include lower levels: read < write < delete.
651
- */
652
- async validate() {
653
- const path = "/v1/account/providers/anthropic/validate";
654
- return await this.transport.request("POST", path);
655
- }
656
- };
657
- var EllipsisAccountProvidersBedrock = class {
658
- constructor(transport) {
659
- this.transport = transport;
660
- }
661
- transport;
662
- /**
663
- * Delete Bedrock Config
664
- *
665
- * Required permissions: delete:account.
666
- * API key: Supported.
667
- * CLI user token: Supported.
668
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
669
- * Higher permission levels include lower levels: read < write < delete.
670
- */
671
- async delete() {
672
- const path = "/v1/account/providers/bedrock";
673
- await this.transport.request("DELETE", path);
674
- }
675
- /**
676
- * Get Bedrock Config
677
- *
678
- * Required permissions: read:account.
679
- * API key: Supported.
680
- * CLI user token: Supported.
681
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
682
- * Higher permission levels include lower levels: read < write < delete.
683
- */
684
- async get() {
685
- const path = "/v1/account/providers/bedrock";
686
- return await this.transport.request("GET", path);
687
- }
688
- /**
689
- * Put Bedrock Config
690
- *
691
- * Required permissions: write:account.
692
- * API key: Supported.
693
- * CLI user token: Supported.
694
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
695
- * Higher permission levels include lower levels: read < write < delete.
696
- */
697
- async set(options) {
698
- const path = "/v1/account/providers/bedrock";
699
- const body = buildBody({ model_map: options.model_map, region: options.region, role_arn: options.role_arn });
700
- return await this.transport.request("PUT", path, { body });
701
- }
702
- /**
703
- * Validate Bedrock Config
704
- *
705
- * Required permissions: write:account.
706
- * API key: Supported.
707
- * CLI user token: Supported.
708
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
709
- * Higher permission levels include lower levels: read < write < delete.
710
- */
711
- async validate() {
712
- const path = "/v1/account/providers/bedrock/validate";
713
- return await this.transport.request("POST", path);
714
- }
715
- };
716
- var EllipsisAccountProviders = class {
717
- constructor(transport) {
718
- this.transport = transport;
719
- this.anthropic = new EllipsisAccountProvidersAnthropic(transport);
720
- this.bedrock = new EllipsisAccountProvidersBedrock(transport);
721
- }
722
- transport;
723
- anthropic;
724
- bedrock;
725
- };
726
605
  var EllipsisAccountSettings = class {
727
606
  constructor(transport) {
728
607
  this.transport = transport;
@@ -733,14 +612,14 @@ var EllipsisAccountSettings = class {
733
612
  *
734
613
  * Get the organization settings.
735
614
  *
736
- * Session model and budget defaults, code review and mention behavior,
737
- * analytics, retention, and notification contacts. PATCH replaces
738
- * supplied sections; PUT preserves its model-and-budget-only behavior.
615
+ * Session budget ceiling, mention behavior, analytics,
616
+ * retention, and notification contacts. PATCH replaces
617
+ * supplied sections; PUT sets the budget ceiling only.
739
618
  *
740
619
  * Required permissions: read:defaults.
741
620
  * API key: Supported.
742
621
  * CLI user token: Supported.
743
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
622
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
744
623
  * Higher permission levels include lower levels: read < write < delete.
745
624
  */
746
625
  async get() {
@@ -752,23 +631,20 @@ var EllipsisAccountSettings = class {
752
631
  *
753
632
  * Set the organization settings.
754
633
  *
755
- * Replaces both: `default_model` accepts an alias or canonical id
756
- * and is stored canonical, and cannot be cleared (it is the only
757
- * default a session's model resolves against);
758
634
  * `budget_ceiling.session` is in US dollars, at most the platform
759
635
  * ceiling, and null clears it.
760
- * Refused for sandbox tokens (potentially prompt-injected code must
761
- * not repoint the organization's defaults).
636
+ * Refused for session tokens (potentially prompt-injected code must
637
+ * not raise the organization's ceiling).
762
638
  *
763
639
  * Required permissions: write:defaults.
764
640
  * API key: Requires a CLI user token belonging to an account administrator.
765
641
  * CLI user token: Requires an account administrator.
766
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
642
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
767
643
  * Higher permission levels include lower levels: read < write < delete.
768
644
  */
769
- async set(options) {
645
+ async set(options = {}) {
770
646
  const path = "/v1/account/settings";
771
- const body = buildBody({ budget_ceiling: options.budget_ceiling, default_model: options.default_model });
647
+ const body = buildBody({ budget_ceiling: options.budget_ceiling });
772
648
  return await this.transport.request("PUT", path, { body });
773
649
  }
774
650
  /**
@@ -776,17 +652,17 @@ var EllipsisAccountSettings = class {
776
652
  *
777
653
  * Replace supplied settings sections without changing omitted sections.
778
654
  *
779
- * Changes to model or budget defaults require a GitHub administrator.
655
+ * Changes to the budget ceiling require a GitHub administrator.
780
656
  *
781
657
  * Required permissions: write:defaults.
782
- * API key: Cannot set budget_ceiling, default_model to a non-null value; those changes require a CLI user token belonging to an account administrator.
783
- * CLI user token: Requires an account administrator when setting budget_ceiling, default_model to a non-null value.
784
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
658
+ * API key: Cannot set budget_ceiling to a non-null value; those changes require a CLI user token belonging to an account administrator.
659
+ * CLI user token: Requires an account administrator when setting budget_ceiling to a non-null value.
660
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
785
661
  * Higher permission levels include lower levels: read < write < delete.
786
662
  */
787
663
  async update(options = {}) {
788
664
  const path = "/v1/account/settings";
789
- const body = buildBody({ analytics: options.analytics, budget_ceiling: options.budget_ceiling, code_review: options.code_review, data_retention: options.data_retention, default_model: options.default_model, notifications: options.notifications });
665
+ const body = buildBody({ analytics: options.analytics, budget_ceiling: options.budget_ceiling, data_retention: options.data_retention, notifications: options.notifications });
790
666
  return await this.transport.request("PATCH", path, { body });
791
667
  }
792
668
  };
@@ -798,7 +674,6 @@ var EllipsisAccount = class {
798
674
  this.models = new EllipsisAccountModels(transport);
799
675
  this.notifications = new EllipsisAccountNotifications(transport);
800
676
  this.onboarding = new EllipsisAccountOnboarding(transport);
801
- this.providers = new EllipsisAccountProviders(transport);
802
677
  this.settings = new EllipsisAccountSettings(transport);
803
678
  }
804
679
  transport;
@@ -807,7 +682,6 @@ var EllipsisAccount = class {
807
682
  models;
808
683
  notifications;
809
684
  onboarding;
810
- providers;
811
685
  settings;
812
686
  /**
813
687
  * Get Customer Activity
@@ -819,7 +693,7 @@ var EllipsisAccount = class {
819
693
  * Required permissions: read:account.
820
694
  * API key: Supported.
821
695
  * CLI user token: Supported.
822
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
696
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
823
697
  * Higher permission levels include lower levels: read < write < delete.
824
698
  */
825
699
  async activity() {
@@ -832,7 +706,7 @@ var EllipsisAccount = class {
832
706
  * Required permissions: read:account.
833
707
  * API key: Supported.
834
708
  * CLI user token: Supported.
835
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
709
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
836
710
  * Higher permission levels include lower levels: read < write < delete.
837
711
  */
838
712
  async auditLog() {
@@ -853,7 +727,7 @@ var EllipsisAccount = class {
853
727
  * Required permissions: read:account.
854
728
  * API key: Supported.
855
729
  * CLI user token: Supported.
856
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
730
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
857
731
  * Higher permission levels include lower levels: read < write < delete.
858
732
  */
859
733
  async budget() {
@@ -866,12 +740,12 @@ var EllipsisAccount = class {
866
740
  * Required permissions: write:account.
867
741
  * API key: Supported.
868
742
  * CLI user token: Supported.
869
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
743
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
870
744
  * Higher permission levels include lower levels: read < write < delete.
871
745
  */
872
746
  async update(options = {}) {
873
747
  const path = "/v1/account";
874
- const body = buildBody({ can_start_job_runs: options.can_start_job_runs, contact_email: options.contact_email });
748
+ const body = buildBody({ can_start_sessions: options.can_start_sessions, contact_email: options.contact_email });
875
749
  return await this.transport.request("PATCH", path, { body });
876
750
  }
877
751
  /**
@@ -883,14 +757,14 @@ var EllipsisAccount = class {
883
757
  * preserved. Set policy.developer_defaults to null to disable developer
884
758
  * limits. Null override windows inherit their default. API keys use
885
759
  * their stable ID, not their secret. Changes apply to the next paid
886
- * request, including sessions already running. API keys and sandbox
887
- * credentials cannot edit budgets. The session ceiling remains at
760
+ * request, including sessions already running. API keys and session
761
+ * tokens cannot edit budgets. The session ceiling remains at
888
762
  * /account/settings; purchasing credits is separate from budget policy.
889
763
  *
890
764
  * Required permissions: write:defaults.
891
765
  * API key: Requires a CLI user token belonging to an account administrator.
892
766
  * CLI user token: Requires an account administrator.
893
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
767
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
894
768
  * Higher permission levels include lower levels: read < write < delete.
895
769
  */
896
770
  async updateBudget(options = {}) {
@@ -905,14 +779,14 @@ var EllipsisAccount = class {
905
779
  *
906
780
  * Omit period_start for the current UTC month; select a period returned
907
781
  * in billing_periods to view history. Credit debits are distinct from
908
- * rated token usage through BYOK, customer Bedrock, or a developer's
909
- * Claude subscription. Rated usage estimates are not provider invoices.
782
+ * rated token usage through a developer's Claude or Codex
783
+ * subscription. Rated usage estimates are not provider invoices.
910
784
  * Pending and unresolved requests identify missing measurements.
911
785
  *
912
786
  * Required permissions: read:account.
913
787
  * API key: Supported.
914
788
  * CLI user token: Supported.
915
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
789
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
916
790
  * Higher permission levels include lower levels: read < write < delete.
917
791
  */
918
792
  async usage(options = {}) {
@@ -938,7 +812,7 @@ var EllipsisAgents = class {
938
812
  * Required permissions: write:configs.
939
813
  * API key: Supported.
940
814
  * CLI user token: Supported.
941
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
815
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
942
816
  * Higher permission levels include lower levels: read < write < delete.
943
817
  * Grant match patterns can further restrict access to individual resources.
944
818
  */
@@ -959,7 +833,7 @@ var EllipsisAgents = class {
959
833
  * Required permissions: write:configs.
960
834
  * API key: Supported.
961
835
  * CLI user token: Supported.
962
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
836
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
963
837
  * Higher permission levels include lower levels: read < write < delete.
964
838
  * Grant match patterns can further restrict access to individual resources.
965
839
  */
@@ -975,7 +849,7 @@ var EllipsisAgents = class {
975
849
  * Required permissions: read:configs.
976
850
  * API key: Supported.
977
851
  * CLI user token: Supported.
978
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
852
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
979
853
  * Higher permission levels include lower levels: read < write < delete.
980
854
  * Grant match patterns can further restrict access to individual resources.
981
855
  */
@@ -996,7 +870,7 @@ var EllipsisAgents = class {
996
870
  * Required permissions: write:configs.
997
871
  * API key: Supported.
998
872
  * CLI user token: Supported.
999
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
873
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1000
874
  * Higher permission levels include lower levels: read < write < delete.
1001
875
  * Grant match patterns can further restrict access to individual resources.
1002
876
  */
@@ -1013,7 +887,7 @@ var EllipsisAgents = class {
1013
887
  * Required permissions: read:configs.
1014
888
  * API key: Supported.
1015
889
  * CLI user token: Supported.
1016
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
890
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1017
891
  * Higher permission levels include lower levels: read < write < delete.
1018
892
  * Grant match patterns can further restrict access to individual resources.
1019
893
  */
@@ -1035,7 +909,7 @@ var EllipsisAgents = class {
1035
909
  * Required permissions: read:configs.
1036
910
  * API key: Supported.
1037
911
  * CLI user token: Supported.
1038
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
912
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1039
913
  * Higher permission levels include lower levels: read < write < delete.
1040
914
  * Grant match patterns can further restrict access to individual resources.
1041
915
  */
@@ -1046,28 +920,30 @@ var EllipsisAgents = class {
1046
920
  /**
1047
921
  * Start Agent Session
1048
922
  *
1049
- * Invoke an agent.
923
+ * Start an agent session.
1050
924
  *
1051
- * Runs a certified agent with its configured instructions, model,
1052
- * environment, permissions, skills, and budget, and returns
1053
- * the session it started. The session runs once and does not accept
1054
- * follow-up messages. If the agent declares input.json_schema,
1055
- * send only `input` for its initial message. Otherwise send a non-empty
1056
- * `prompt`, which becomes the initial message verbatim. Both fields
1057
- * together, neither field, and input that renders an empty message are
1058
- * rejected with 422. An optional `budget` lowers the session cap;
1059
- * `metadata` tags the session. Codex invocations are not supported.
925
+ * Starts a session from the agent's saved `session` settings and
926
+ * returns it. The body takes the fields of POST /v1/sessions, all
927
+ * optional: each field you send replaces the agent's value for that
928
+ * field, and each field you leave out keeps it. `metadata` is merged
929
+ * into the agent's key by key, and a `null` value removes a key.
930
+ * Other lists and maps, and `environment`, are replaced whole;
931
+ * naming the other harness replaces the agent's. An empty body starts
932
+ * the agent as written. If the agent declares input.json_schema, send
933
+ * `input`; its rendered message is added after the prompt. A run-once
934
+ * session needs a prompt or `input` from the agent or the request, or
935
+ * the call is a 400.
1060
936
  *
1061
937
  * Required permissions: write:sessions.
1062
938
  * API key: Supported.
1063
939
  * CLI user token: Supported.
1064
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
940
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1065
941
  * Higher permission levels include lower levels: read < write < delete.
1066
942
  * Grant match patterns can further restrict access to individual resources.
1067
943
  */
1068
- async run(agent_id, options = {}) {
944
+ async start(agent_id, options = {}) {
1069
945
  const path = `/v1/agents/${enc(agent_id)}/sessions`;
1070
- const body = buildBody({ budget: options.budget, input: options.input, metadata: options.metadata, prompt: options.prompt });
946
+ const body = buildBody({ budget: options.budget, claude_code: options.claude_code, codex: options.codex, conversation: options.conversation, environment: options.environment, force_rebuild: options.force_rebuild, images: options.images, input: options.input, metadata: options.metadata, output: options.output, permissions: options.permissions, skills: options.skills });
1071
947
  return await this.transport.request("POST", path, { body });
1072
948
  }
1073
949
  /**
@@ -1076,7 +952,7 @@ var EllipsisAgents = class {
1076
952
  * Required permissions: read:configs.
1077
953
  * API key: Supported.
1078
954
  * CLI user token: Supported.
1079
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
955
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1080
956
  * Higher permission levels include lower levels: read < write < delete.
1081
957
  * Grant match patterns can further restrict access to individual resources.
1082
958
  */
@@ -1096,7 +972,7 @@ var EllipsisAgents = class {
1096
972
  * Required permissions: write:configs.
1097
973
  * API key: Supported.
1098
974
  * CLI user token: Supported.
1099
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
975
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1100
976
  * Higher permission levels include lower levels: read < write < delete.
1101
977
  * Grant match patterns can further restrict access to individual resources.
1102
978
  */
@@ -1117,7 +993,7 @@ var EllipsisAgents = class {
1117
993
  * Required permissions: write:configs.
1118
994
  * API key: Supported.
1119
995
  * CLI user token: Supported.
1120
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
996
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1121
997
  * Higher permission levels include lower levels: read < write < delete.
1122
998
  * Grant match patterns can further restrict access to individual resources.
1123
999
  */
@@ -1142,7 +1018,7 @@ var EllipsisAlerts = class {
1142
1018
  * Required permissions: write:alerts.
1143
1019
  * API key: Supported.
1144
1020
  * CLI user token: Supported.
1145
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1021
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1146
1022
  * Higher permission levels include lower levels: read < write < delete.
1147
1023
  */
1148
1024
  async dismiss(alert_id) {
@@ -1159,7 +1035,7 @@ var EllipsisAlerts = class {
1159
1035
  * Required permissions: read:alerts.
1160
1036
  * API key: Supported.
1161
1037
  * CLI user token: Supported.
1162
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1038
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1163
1039
  * Higher permission levels include lower levels: read < write < delete.
1164
1040
  */
1165
1041
  async get(alert_id) {
@@ -1179,7 +1055,7 @@ var EllipsisAlerts = class {
1179
1055
  * Required permissions: read:alerts.
1180
1056
  * API key: Supported.
1181
1057
  * CLI user token: Supported.
1182
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1058
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1183
1059
  * Higher permission levels include lower levels: read < write < delete.
1184
1060
  */
1185
1061
  async list(options = {}) {
@@ -1214,7 +1090,7 @@ var EllipsisAnalytics = class {
1214
1090
  * Required permissions: read:account.
1215
1091
  * API key: Supported.
1216
1092
  * CLI user token: Supported.
1217
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1093
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1218
1094
  * Higher permission levels include lower levels: read < write < delete.
1219
1095
  */
1220
1096
  async metrics(options = {}) {
@@ -1233,7 +1109,7 @@ var EllipsisAnalytics = class {
1233
1109
  * Required permissions: read:account.
1234
1110
  * API key: Supported.
1235
1111
  * CLI user token: Supported.
1236
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1112
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1237
1113
  * Higher permission levels include lower levels: read < write < delete.
1238
1114
  */
1239
1115
  async pullRequests(options = {}) {
@@ -1244,7 +1120,7 @@ var EllipsisAnalytics = class {
1244
1120
  /**
1245
1121
  * Get Analytics Reviews
1246
1122
  *
1247
- * Return code-review analytics.
1123
+ * Return pull request review analytics.
1248
1124
  *
1249
1125
  * account_type scopes reviewers (bot|user|all) — e.g. "what apps
1250
1126
  * review the most PRs?" is the reviewer facets here with
@@ -1254,7 +1130,7 @@ var EllipsisAnalytics = class {
1254
1130
  * Required permissions: read:account.
1255
1131
  * API key: Supported.
1256
1132
  * CLI user token: Supported.
1257
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1133
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1258
1134
  * Higher permission levels include lower levels: read < write < delete.
1259
1135
  */
1260
1136
  async reviews(options = {}) {
@@ -1323,7 +1199,7 @@ var EllipsisEnvironments = class {
1323
1199
  * Required permissions: write:environments.
1324
1200
  * API key: Supported.
1325
1201
  * CLI user token: Supported.
1326
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1202
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1327
1203
  * Higher permission levels include lower levels: read < write < delete.
1328
1204
  */
1329
1205
  async create(options) {
@@ -1345,7 +1221,7 @@ var EllipsisEnvironments = class {
1345
1221
  * Required permissions: delete:environments.
1346
1222
  * API key: Supported.
1347
1223
  * CLI user token: Supported.
1348
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1224
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1349
1225
  * Higher permission levels include lower levels: read < write < delete.
1350
1226
  */
1351
1227
  async delete(environment_id) {
@@ -1360,7 +1236,7 @@ var EllipsisEnvironments = class {
1360
1236
  * Required permissions: read:environments.
1361
1237
  * API key: Supported.
1362
1238
  * CLI user token: Supported.
1363
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1239
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1364
1240
  * Higher permission levels include lower levels: read < write < delete.
1365
1241
  */
1366
1242
  async get(environment_id) {
@@ -1375,7 +1251,7 @@ var EllipsisEnvironments = class {
1375
1251
  * Required permissions: read:environments.
1376
1252
  * API key: Supported.
1377
1253
  * CLI user token: Supported.
1378
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1254
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1379
1255
  * Higher permission levels include lower levels: read < write < delete.
1380
1256
  */
1381
1257
  async list() {
@@ -1395,7 +1271,7 @@ var EllipsisEnvironments = class {
1395
1271
  * Required permissions: write:environments.
1396
1272
  * API key: Supported.
1397
1273
  * CLI user token: Supported.
1398
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1274
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1399
1275
  * Higher permission levels include lower levels: read < write < delete.
1400
1276
  */
1401
1277
  async update(environment_id, options) {
@@ -1404,113 +1280,6 @@ var EllipsisEnvironments = class {
1404
1280
  return await this.transport.request("PUT", path, { body });
1405
1281
  }
1406
1282
  };
1407
- var EllipsisFiles = class {
1408
- constructor(transport) {
1409
- this.transport = transport;
1410
- }
1411
- transport;
1412
- /**
1413
- * Create File
1414
- *
1415
- * Upload a file that outlives the sandbox.
1416
- *
1417
- * v1: PNG images only, base64 in the JSON body, 10 MiB cap. The
1418
- * primary caller is the in-sandbox `agent file upload` CLI (an
1419
- * agent persisting a screenshot to link on a PR), but all
1420
- * credential types work. Returns the org-membership-gated
1421
- * dashboard URL so callers never hard-code URL shapes.
1422
- *
1423
- * Required permissions: write:files.
1424
- * API key: Supported.
1425
- * CLI user token: Supported.
1426
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1427
- * Higher permission levels include lower levels: read < write < delete.
1428
- * Grant match patterns can further restrict access to individual resources.
1429
- */
1430
- async create(options) {
1431
- const path = "/v1/files";
1432
- const body = buildBody({ content_type: options.content_type, data_b64: options.data_b64, filename: options.filename });
1433
- return await this.transport.request("POST", path, { body });
1434
- }
1435
- /**
1436
- * Delete File
1437
- *
1438
- * Delete a file.
1439
- *
1440
- * A foreign, missing, or already-deleted id is an
1441
- * indistinguishable 404, so ids can't be enumerated. Sandbox
1442
- * tokens get a 403 (a sandbox token sits next to
1443
- * potentially-untrusted code and must not be able to destroy the
1444
- * account's files — uploading is fine, destruction is not); API
1445
- * keys and user tokens may delete.
1446
- *
1447
- * Required permissions: delete:files.
1448
- * API key: Supported.
1449
- * CLI user token: Supported.
1450
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1451
- * Higher permission levels include lower levels: read < write < delete.
1452
- * Grant match patterns can further restrict access to individual resources.
1453
- */
1454
- async delete(file_id) {
1455
- const path = `/v1/files/${enc(file_id)}`;
1456
- await this.transport.request("DELETE", path);
1457
- }
1458
- /**
1459
- * Get File
1460
- *
1461
- * Return one file's metadata and download link.
1462
- *
1463
- * Includes the gated dashboard URL and a short-lived presigned
1464
- * `download_url`, plus the owning account's GitHub login.
1465
- *
1466
- * Signed-in dashboard users are checked against the file's owning
1467
- * account, regardless of their selected organization. API keys,
1468
- * CLI user tokens, and sandbox tokens remain restricted to their
1469
- * own account. Missing, deleted, and inaccessible files return 404.
1470
- *
1471
- * To fetch the bytes locally, call this and then GET download_url
1472
- * immediately — the JSON API never carries the file. The CLI's
1473
- * `agent file get` wraps exactly that two-step.
1474
- *
1475
- * Required permissions: read:files.
1476
- * API key: Supported.
1477
- * CLI user token: Supported.
1478
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1479
- * Higher permission levels include lower levels: read < write < delete.
1480
- * Grant match patterns can further restrict access to individual resources.
1481
- */
1482
- async get(file_id) {
1483
- const path = `/v1/files/${enc(file_id)}`;
1484
- return await this.transport.request("GET", path);
1485
- }
1486
- /**
1487
- * List Files
1488
- *
1489
- * List uploaded files, newest first.
1490
- *
1491
- * Metadata only by default. Set include_download_urls=true to get
1492
- * a download_urls map keyed by file id for thumbnails or batch
1493
- * downloads. URLs expire within about a minute. session_id scopes
1494
- * the list to one session's uploads.
1495
- *
1496
- * Required permissions: read:files.
1497
- * API key: Supported.
1498
- * CLI user token: Supported.
1499
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1500
- * Higher permission levels include lower levels: read < write < delete.
1501
- * Grant match patterns can further restrict access to individual resources.
1502
- */
1503
- async list(options = {}) {
1504
- const path = "/v1/files";
1505
- const query = buildQuery({ session_id: options.session_id, limit: options.limit, cursor: options.cursor, include_download_urls: options.include_download_urls });
1506
- const response = await this.transport.request("GET", path, { query });
1507
- return new Page(
1508
- response,
1509
- "files",
1510
- (cursor) => this.list({ ...options, cursor })
1511
- );
1512
- }
1513
- };
1514
1283
  var EllipsisHandlers = class {
1515
1284
  constructor(transport) {
1516
1285
  this.transport = transport;
@@ -1527,12 +1296,12 @@ var EllipsisHandlers = class {
1527
1296
  * state without fetching GitHub or triggering synchronization.
1528
1297
  *
1529
1298
  * Requires configs:read; scoped grants match handlers/{service}.
1530
- * Sandbox credentials with that grant may read handlers.
1299
+ * Session tokens with that grant may read handlers.
1531
1300
  *
1532
1301
  * Required permissions: read:configs.
1533
1302
  * API key: Supported.
1534
1303
  * CLI user token: Supported.
1535
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1304
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1536
1305
  * Higher permission levels include lower levels: read < write < delete.
1537
1306
  * Grant match patterns can further restrict access to individual resources.
1538
1307
  */
@@ -1546,8 +1315,8 @@ var EllipsisHandlers = class {
1546
1315
  * Return session counts and accumulated spend for a saved handler.
1547
1316
  *
1548
1317
  * Filters only by session creation time. Omitted bounds include all
1549
- * history. Counts use the current conversation outcome, so an idle
1550
- * session remains active. Spend includes the selected sessions' full
1318
+ * history. Counts use the current turn and conversation state, so an open
1319
+ * conversation awaiting another message remains active. Spend includes the selected sessions' full
1551
1320
  * accumulated cost, including activity after the creation-time window.
1552
1321
  * Only sessions carrying this exact saved handler id are counted;
1553
1322
  * legacy sessions without handler provenance are excluded.
@@ -1557,12 +1326,12 @@ var EllipsisHandlers = class {
1557
1326
  * Those windows use usage timestamps and are independent of start/end.
1558
1327
  *
1559
1328
  * Requires configs:read matching handlers/{service} and unrestricted
1560
- * sessions:read. Sandbox tokens with both grants may read metrics.
1329
+ * sessions:read. Session tokens with both grants may read metrics.
1561
1330
  *
1562
1331
  * Required permissions: read:sessions, read:configs.
1563
1332
  * API key: Supported.
1564
1333
  * CLI user token: Supported.
1565
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1334
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1566
1335
  * Higher permission levels include lower levels: read < write < delete.
1567
1336
  * Grant match patterns can further restrict access to individual resources.
1568
1337
  */
@@ -1591,7 +1360,7 @@ var EllipsisIntegrationsGithub = class {
1591
1360
  * Required permissions: read:integrations.
1592
1361
  * API key: Supported.
1593
1362
  * CLI user token: Supported.
1594
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1363
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1595
1364
  * Higher permission levels include lower levels: read < write < delete.
1596
1365
  */
1597
1366
  async members() {
@@ -1606,7 +1375,7 @@ var EllipsisIntegrationsGithub = class {
1606
1375
  * Required permissions: read:integrations.
1607
1376
  * API key: Supported.
1608
1377
  * CLI user token: Supported.
1609
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1378
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1610
1379
  * Higher permission levels include lower levels: read < write < delete.
1611
1380
  */
1612
1381
  async repos() {
@@ -1619,7 +1388,7 @@ var EllipsisIntegrationsGithub = class {
1619
1388
  * Required permissions: write:integrations.
1620
1389
  * API key: Supported.
1621
1390
  * CLI user token: Supported.
1622
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1391
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1623
1392
  * Higher permission levels include lower levels: read < write < delete.
1624
1393
  */
1625
1394
  async uninstall(options) {
@@ -1639,7 +1408,7 @@ var EllipsisIntegrationsLinear = class {
1639
1408
  * Required permissions: delete:integrations.
1640
1409
  * API key: Supported.
1641
1410
  * CLI user token: Supported.
1642
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1411
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1643
1412
  * Higher permission levels include lower levels: read < write < delete.
1644
1413
  */
1645
1414
  async delete() {
@@ -1654,7 +1423,7 @@ var EllipsisIntegrationsLinear = class {
1654
1423
  * Required permissions: read:integrations.
1655
1424
  * API key: Supported.
1656
1425
  * CLI user token: Supported.
1657
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1426
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1658
1427
  * Higher permission levels include lower levels: read < write < delete.
1659
1428
  */
1660
1429
  async teams() {
@@ -1667,12 +1436,12 @@ var EllipsisIntegrationsLinear = class {
1667
1436
  * Required permissions: write:integrations.
1668
1437
  * API key: Supported.
1669
1438
  * CLI user token: Supported.
1670
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1439
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1671
1440
  * Higher permission levels include lower levels: read < write < delete.
1672
1441
  */
1673
1442
  async updateSettings(options) {
1674
1443
  const path = "/v1/integrations/linear/settings";
1675
- const body = buildBody({ mcp_inclusion: options.mcp_inclusion, teams: options.teams });
1444
+ const body = buildBody({ teams: options.teams });
1676
1445
  return await this.transport.request("PUT", path, { body });
1677
1446
  }
1678
1447
  };
@@ -1687,7 +1456,7 @@ var EllipsisIntegrationsSentry = class {
1687
1456
  * Required permissions: delete:integrations.
1688
1457
  * API key: Supported.
1689
1458
  * CLI user token: Supported.
1690
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1459
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1691
1460
  * Higher permission levels include lower levels: read < write < delete.
1692
1461
  */
1693
1462
  async delete(integration_id) {
@@ -1702,7 +1471,7 @@ var EllipsisIntegrationsSentry = class {
1702
1471
  * Required permissions: read:integrations.
1703
1472
  * API key: Supported.
1704
1473
  * CLI user token: Supported.
1705
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1474
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1706
1475
  * Higher permission levels include lower levels: read < write < delete.
1707
1476
  */
1708
1477
  async organizations() {
@@ -1724,7 +1493,7 @@ var EllipsisIntegrationsSlack = class {
1724
1493
  * Required permissions: read:integrations.
1725
1494
  * API key: Supported.
1726
1495
  * CLI user token: Supported.
1727
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1496
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1728
1497
  * Higher permission levels include lower levels: read < write < delete.
1729
1498
  */
1730
1499
  async channels() {
@@ -1737,7 +1506,7 @@ var EllipsisIntegrationsSlack = class {
1737
1506
  * Required permissions: write:integrations.
1738
1507
  * API key: Supported.
1739
1508
  * CLI user token: Supported.
1740
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1509
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1741
1510
  * Higher permission levels include lower levels: read < write < delete.
1742
1511
  */
1743
1512
  async createOperationsChannel() {
@@ -1750,7 +1519,7 @@ var EllipsisIntegrationsSlack = class {
1750
1519
  * Required permissions: delete:integrations.
1751
1520
  * API key: Supported.
1752
1521
  * CLI user token: Supported.
1753
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1522
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
1754
1523
  * Higher permission levels include lower levels: read < write < delete.
1755
1524
  */
1756
1525
  async delete() {
@@ -1766,27 +1535,13 @@ var EllipsisIntegrationsSlack = class {
1766
1535
  * Required permissions: read:integrations.
1767
1536
  * API key: Supported.
1768
1537
  * CLI user token: Supported.
1769
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1538
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1770
1539
  * Higher permission levels include lower levels: read < write < delete.
1771
1540
  */
1772
1541
  async members() {
1773
1542
  const path = "/v1/integrations/slack/members";
1774
1543
  return await this.transport.request("GET", path);
1775
1544
  }
1776
- /**
1777
- * Update Slack Settings
1778
- *
1779
- * Required permissions: write:integrations.
1780
- * API key: Supported.
1781
- * CLI user token: Supported.
1782
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1783
- * Higher permission levels include lower levels: read < write < delete.
1784
- */
1785
- async updateSettings(options) {
1786
- const path = "/v1/integrations/slack/settings";
1787
- const body = buildBody({ mcp_inclusion: options.mcp_inclusion });
1788
- return await this.transport.request("PUT", path, { body });
1789
- }
1790
1545
  };
1791
1546
  var EllipsisIntegrations = class {
1792
1547
  constructor(transport) {
@@ -1810,13 +1565,13 @@ var EllipsisIntegrations = class {
1810
1565
  * config can learn which repositories, channels, teams, and
1811
1566
  * organizations it may name before POST /agents.
1812
1567
  *
1813
- * Available to all credential types including sandbox tokens: the
1568
+ * Available to all credential types including session tokens: the
1814
1569
  * responses never include OAuth tokens or any other secret.
1815
1570
  *
1816
1571
  * Required permissions: read:integrations.
1817
1572
  * API key: Supported.
1818
1573
  * CLI user token: Supported.
1819
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1574
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1820
1575
  * Higher permission levels include lower levels: read < write < delete.
1821
1576
  */
1822
1577
  async list() {
@@ -1824,183 +1579,43 @@ var EllipsisIntegrations = class {
1824
1579
  return await this.transport.request("GET", path);
1825
1580
  }
1826
1581
  };
1827
- var EllipsisMemories = class {
1582
+ var EllipsisReviewsConfigs = class {
1828
1583
  constructor(transport) {
1829
1584
  this.transport = transport;
1830
1585
  }
1831
1586
  transport;
1832
1587
  /**
1833
- * Create Memory
1834
- *
1835
- * Save a memory for future agent sessions.
1836
- *
1837
- * Memories are durable lessons shared across the whole
1838
- * organization — conventions, past decisions, known gotchas that an
1839
- * agent cannot derive from the repository itself. One concise fact
1840
- * per memory; the description is what a reader sees in the index.
1841
- *
1842
- * Creating never overwrites: a path that already exists is a 409, so
1843
- * correcting an existing memory is an explicit edit.
1844
- *
1845
- * Required permissions: write:memories.
1846
- * API key: Supported.
1847
- * CLI user token: Supported.
1848
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1849
- * Higher permission levels include lower levels: read < write < delete.
1850
- * Grant match patterns can further restrict access to individual resources.
1851
- */
1852
- async create(options) {
1853
- const path = "/v1/memories";
1854
- const body = buildBody({ content: options.content, description: options.description, path: options.path });
1855
- return await this.transport.request("POST", path, { body });
1856
- }
1857
- /**
1858
- * Delete Memory
1859
- *
1860
- * Delete a memory that is no longer true.
1861
- *
1862
- * Available to every credential type, agents included — a wrong
1863
- * memory is worse than a missing one. The deleted content is kept in
1864
- * the memory's history for forensics, not for an undo API.
1865
- *
1866
- * Required permissions: delete:memories.
1867
- * API key: Supported.
1868
- * CLI user token: Supported.
1869
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1870
- * Higher permission levels include lower levels: read < write < delete.
1871
- * Grant match patterns can further restrict access to individual resources.
1872
- */
1873
- async delete(memory_id, options = {}) {
1874
- const path = `/v1/memories/${enc(memory_id)}`;
1875
- const query = buildQuery({ if_sha256: options.if_sha256 });
1876
- await this.transport.request("DELETE", path, { query });
1877
- }
1878
- /**
1879
- * Edit Memory
1880
- *
1881
- * Correct an existing memory in place.
1882
- *
1883
- * Pass description, content, or both. This never creates a memory (an
1884
- * unknown id is a 404) and never moves one — the path is immutable, so
1885
- * relocating a memory is a delete plus a create.
1886
- *
1887
- * Pass `if_sha256` (from a previous read) to make a concurrent write
1888
- * a 409 instead of silently overwriting it.
1889
- *
1890
- * Required permissions: write:memories.
1891
- * API key: Supported.
1892
- * CLI user token: Supported.
1893
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1894
- * Higher permission levels include lower levels: read < write < delete.
1895
- * Grant match patterns can further restrict access to individual resources.
1896
- */
1897
- async edit(memory_id, options = {}) {
1898
- const path = `/v1/memories/${enc(memory_id)}`;
1899
- const body = buildBody({ content: options.content, description: options.description, if_sha256: options.if_sha256 });
1900
- return await this.transport.request("PUT", path, { body });
1901
- }
1902
- /**
1903
- * Get Memory
1904
- *
1905
- * Read one memory's full content.
1588
+ * List Review Configs
1906
1589
  *
1907
- * The id comes from the index returned by listing memories.
1590
+ * List code review configs: every kind: code_review file synced from a repository, newest first.
1908
1591
  *
1909
- * Required permissions: read:memories.
1592
+ * Required permissions: read:reviews.
1910
1593
  * API key: Supported.
1911
1594
  * CLI user token: Supported.
1912
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1595
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1913
1596
  * Higher permission levels include lower levels: read < write < delete.
1914
- * Grant match patterns can further restrict access to individual resources.
1915
1597
  */
1916
- async get(memory_id) {
1917
- const path = `/v1/memories/${enc(memory_id)}`;
1598
+ async list() {
1599
+ const path = "/v1/reviews/configs";
1918
1600
  return await this.transport.request("GET", path);
1919
1601
  }
1920
- /**
1921
- * List Memories
1922
- *
1923
- * List the organization's memories as a readable index.
1924
- *
1925
- * Returns the memories rendered as a markdown index (one line per
1926
- * memory, carrying its id, path, and description) plus the same
1927
- * entries structured, each with every field except `content`. Read
1928
- * the index, then fetch the ids whose content you want.
1929
- *
1930
- * Required permissions: read:memories.
1931
- * API key: Supported.
1932
- * CLI user token: Supported.
1933
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1934
- * Higher permission levels include lower levels: read < write < delete.
1935
- * Grant match patterns can further restrict access to individual resources.
1936
- */
1937
- async list(options = {}) {
1938
- const path = "/v1/memories";
1939
- const query = buildQuery({ prefix: options.prefix });
1940
- return await this.transport.request("GET", path, { query });
1941
- }
1942
1602
  };
1943
1603
  var EllipsisReviews = class {
1944
1604
  constructor(transport) {
1945
1605
  this.transport = transport;
1606
+ this.configs = new EllipsisReviewsConfigs(transport);
1946
1607
  }
1947
1608
  transport;
1948
- /**
1949
- * List Review Configs
1950
- *
1951
- * Required permissions: read:reviews.
1952
- * API key: Supported.
1953
- * CLI user token: Supported.
1954
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1955
- * Higher permission levels include lower levels: read < write < delete.
1956
- */
1957
- async configs() {
1958
- const path = "/v1/reviews/configs";
1959
- return await this.transport.request("GET", path);
1960
- }
1961
- /**
1962
- * Create Review
1963
- *
1964
- * Run a code review on demand.
1965
- *
1966
- * Reviews an open pull request. Which pipeline runs is not a
1967
- * parameter: it resolves from the repository's files exactly as
1968
- * it does for a push, so an on-demand review never disagrees with
1969
- * the automatic one.
1970
- *
1971
- * A review is one pipeline run over one commit range, with one
1972
- * agent session per stage: `review.id` is the run id, and
1973
- * `stages[].session_id` is where a client streams
1974
- * (/sessions/{id}/stream on a stage session), since the review
1975
- * itself is a pipeline rather than one process.
1976
- *
1977
- * Required permissions: write:reviews.
1978
- * API key: Supported.
1979
- * CLI user token: Supported.
1980
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1981
- * Higher permission levels include lower levels: read < write < delete.
1982
- */
1983
- async create(options) {
1984
- const path = "/v1/reviews";
1985
- const body = buildBody({ owner: options.owner, post: options.post, pull_request_number: options.pull_request_number, repo: options.repo, scope: options.scope });
1986
- return await this.transport.request("POST", path, { body });
1987
- }
1609
+ configs;
1988
1610
  /**
1989
1611
  * Get Review
1990
1612
  *
1991
- * Return one review with findings and outcome.
1992
- *
1993
- * Includes its scope, the per-stage sessions, the parsed findings,
1994
- * the finding counters, and the posting outcome.
1995
- *
1996
- * Findings only exist after a stage session finalizes — a running
1997
- * review honestly reports [] / null, which is why a client
1998
- * streams a stage session and then re-fetches the review.
1613
+ * Get a code review: its reviewers and every comment they returned, posted or held back.
1999
1614
  *
2000
1615
  * Required permissions: read:reviews.
2001
1616
  * API key: Supported.
2002
1617
  * CLI user token: Supported.
2003
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1618
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2004
1619
  * Higher permission levels include lower levels: read < write < delete.
2005
1620
  */
2006
1621
  async get(review_id) {
@@ -2012,18 +1627,10 @@ var EllipsisReviews = class {
2012
1627
  *
2013
1628
  * List code reviews, newest first.
2014
1629
  *
2015
- * `findings` and `configuration` are omitted (counters only). Each
2016
- * filter is a set: repeat `repository`, `pull_request_number`, or
2017
- * `status` to match any of several values. `start` and `end` bound
2018
- * the review's creation time.
2019
- *
2020
- * Webhook-created reviews appear here too, so this answers "show
2021
- * me every review on this PR".
2022
- *
2023
1630
  * Required permissions: read:reviews.
2024
1631
  * API key: Supported.
2025
1632
  * CLI user token: Supported.
2026
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1633
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2027
1634
  * Higher permission levels include lower levels: read < write < delete.
2028
1635
  */
2029
1636
  async list(options = {}) {
@@ -2047,13 +1654,13 @@ var EllipsisSecrets = class {
2047
1654
  *
2048
1655
  * Delete a secret by name.
2049
1656
  *
2050
- * Refused for sandbox tokens; mutations require an API key or
1657
+ * Refused for session tokens; mutations require an API key or
2051
1658
  * user token.
2052
1659
  *
2053
1660
  * Required permissions: delete:secrets.
2054
1661
  * API key: Supported.
2055
1662
  * CLI user token: Supported.
2056
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1663
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2057
1664
  * Higher permission levels include lower levels: read < write < delete.
2058
1665
  * Grant match patterns can further restrict access to individual resources.
2059
1666
  */
@@ -2072,7 +1679,7 @@ var EllipsisSecrets = class {
2072
1679
  * Required permissions: read:secrets.
2073
1680
  * API key: Supported.
2074
1681
  * CLI user token: Supported.
2075
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1682
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2076
1683
  * Higher permission levels include lower levels: read < write < delete.
2077
1684
  * Grant match patterns can further restrict access to individual resources.
2078
1685
  */
@@ -2086,14 +1693,14 @@ var EllipsisSecrets = class {
2086
1693
  * Upsert secrets.
2087
1694
  *
2088
1695
  * Returns only the secrets this call wrote, names and timestamps
2089
- * only — values are write-only. Refused for sandbox tokens (held by
2090
- * potentially-untrusted in-sandbox code); mutations require an
2091
- * API key or user token.
1696
+ * only — values are write-only. Refused for session tokens (held by
1697
+ * potentially-untrusted code running inside a session); mutations
1698
+ * require an API key or user token.
2092
1699
  *
2093
1700
  * Required permissions: write:secrets.
2094
1701
  * API key: Supported.
2095
1702
  * CLI user token: Supported.
2096
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
1703
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2097
1704
  * Higher permission levels include lower levels: read < write < delete.
2098
1705
  * Grant match patterns can further restrict access to individual resources.
2099
1706
  */
@@ -2103,11 +1710,58 @@ var EllipsisSecrets = class {
2103
1710
  return await this.transport.request("PUT", path, { body });
2104
1711
  }
2105
1712
  };
1713
+ var EllipsisSessionsTurns = class {
1714
+ constructor(transport) {
1715
+ this.transport = transport;
1716
+ }
1717
+ transport;
1718
+ /**
1719
+ * Get Session Turn
1720
+ *
1721
+ * Return one turn.
1722
+ *
1723
+ * Poll this after sending a message: the message is answered when
1724
+ * the turn's status is completed, failed, stopped, or cancelled.
1725
+ *
1726
+ * Required permissions: read:sessions.
1727
+ * API key: Supported.
1728
+ * CLI user token: Supported.
1729
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1730
+ * Higher permission levels include lower levels: read < write < delete.
1731
+ * Grant match patterns can further restrict access to individual resources.
1732
+ */
1733
+ async get(session_id, turn_id) {
1734
+ const path = `/v1/sessions/${enc(session_id)}/turns/${enc(turn_id)}`;
1735
+ return await this.transport.request("GET", path);
1736
+ }
1737
+ /**
1738
+ * Get Session Turns
1739
+ *
1740
+ * Return the session's turns and messages, oldest first.
1741
+ *
1742
+ * One turn per message: pending until the agent starts on it,
1743
+ * running while it works, then completed, failed, stopped, or
1744
+ * cancelled.
1745
+ *
1746
+ * Required permissions: read:sessions.
1747
+ * API key: Supported.
1748
+ * CLI user token: Supported.
1749
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1750
+ * Higher permission levels include lower levels: read < write < delete.
1751
+ * Grant match patterns can further restrict access to individual resources.
1752
+ */
1753
+ async list(session_id) {
1754
+ const path = `/v1/sessions/${enc(session_id)}/turns`;
1755
+ return await this.transport.request("GET", path);
1756
+ }
1757
+ };
2106
1758
  var EllipsisSessions = class {
2107
1759
  constructor(transport) {
2108
1760
  this.transport = transport;
1761
+ this.turns = new EllipsisSessionsTurns(transport);
2109
1762
  }
2110
1763
  transport;
1764
+ turns;
2111
1765
  /**
2112
1766
  * Get Session Analytics
2113
1767
  *
@@ -2115,16 +1769,16 @@ var EllipsisSessions = class {
2115
1769
  *
2116
1770
  * Token lanes use the request's saved rates. Content attribution
2117
1771
  * apportions input/cache spend by text size, counting carried context
2118
- * on every request. It is an estimate, not a tool execution fee.
1772
+ * on every request. It is an estimate, not a tool call fee.
2119
1773
  * Only the latest 200 retained request bodies are inspected; missing
2120
1774
  * or unsupported context remains explicitly unattributed. No raw
2121
- * prompts or tool results are returned. Sandbox tokens may read only
1775
+ * prompts or tool results are returned. Session tokens may read only
2122
1776
  * their own session's analytics.
2123
1777
  *
2124
1778
  * Required permissions: read:sessions.
2125
1779
  * API key: Supported.
2126
1780
  * CLI user token: Supported.
2127
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
1781
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2128
1782
  * Higher permission levels include lower levels: read < write < delete.
2129
1783
  * Grant match patterns can further restrict access to individual resources.
2130
1784
  */
@@ -2138,15 +1792,15 @@ var EllipsisSessions = class {
2138
1792
  * Return the session's uncommitted changes as a patch.
2139
1793
  *
2140
1794
  * One unified-diff section per changed file, captured from the
2141
- * sandbox's working tree when the session ended. The per-file
1795
+ * environment's working tree when the session ended. The per-file
2142
1796
  * counts ride on the session itself (`git.repos[].files`); this
2143
1797
  * is the text behind them. Empty when the tree was clean. A
2144
- * sandbox token may read only its own session's diff.
1798
+ * session token may read only its own session's diff.
2145
1799
  *
2146
1800
  * Required permissions: read:sessions.
2147
1801
  * API key: Supported.
2148
1802
  * CLI user token: Supported.
2149
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
1803
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2150
1804
  * Higher permission levels include lower levels: read < write < delete.
2151
1805
  * Grant match patterns can further restrict access to individual resources.
2152
1806
  */
@@ -2160,7 +1814,7 @@ var EllipsisSessions = class {
2160
1814
  * Download the complete session history.
2161
1815
  *
2162
1816
  * The complete, ordered history of the session (agent output, tool calls, thinking,
2163
- * lifecycle events, sandbox output, message events) as an ordered
1817
+ * lifecycle events, environment output, message events) as an ordered
2164
1818
  * manifest of presigned segment URLs.
2165
1819
  *
2166
1820
  * Segments are gzip members: download in order and concatenate
@@ -2171,7 +1825,7 @@ var EllipsisSessions = class {
2171
1825
  * Required permissions: read:sessions.
2172
1826
  * API key: Supported.
2173
1827
  * CLI user token: Supported.
2174
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1828
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2175
1829
  * Higher permission levels include lower levels: read < write < delete.
2176
1830
  * Grant match patterns can further restrict access to individual resources.
2177
1831
  */
@@ -2179,35 +1833,14 @@ var EllipsisSessions = class {
2179
1833
  const path = `/v1/sessions/${enc(session_id)}/download`;
2180
1834
  return await this.transport.request("GET", path);
2181
1835
  }
2182
- /**
2183
- * List Session Executions
2184
- *
2185
- * Return the session's execution attempts, oldest first.
2186
- *
2187
- * Includes the selected harness, model, resolved instructions, initial
2188
- * query, and common result summary. Complete native outputs remain in
2189
- * the session's records. Internal launch options and checkpoint storage
2190
- * references are excluded.
2191
- *
2192
- * Required permissions: read:sessions.
2193
- * API key: Supported.
2194
- * CLI user token: Supported.
2195
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2196
- * Higher permission levels include lower levels: read < write < delete.
2197
- * Grant match patterns can further restrict access to individual resources.
2198
- */
2199
- async executions(session_id) {
2200
- const path = `/v1/sessions/${enc(session_id)}/executions`;
2201
- return await this.transport.request("GET", path);
2202
- }
2203
1836
  /**
2204
1837
  * Get Session
2205
1838
  *
2206
1839
  * Return one session.
2207
1840
  *
2208
- * The public wire shape — the same shape the stream's session
2209
- * frames carry, with attribution, stop, and archive actors resolved
2210
- * at read time.
1841
+ * The public wire shape, the same shape the stream's session frames
1842
+ * carry, with attribution, stop, and archive actors resolved at read
1843
+ * time. `turn` is the turn in progress or the latest one.
2211
1844
  *
2212
1845
  * The heavy near-static blobs (config snapshot, input/output)
2213
1846
  * live on the detail endpoints, not here.
@@ -2215,7 +1848,7 @@ var EllipsisSessions = class {
2215
1848
  * Required permissions: read:sessions.
2216
1849
  * API key: Supported.
2217
1850
  * CLI user token: Supported.
2218
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1851
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2219
1852
  * Higher permission levels include lower levels: read < write < delete.
2220
1853
  * Grant match patterns can further restrict access to individual resources.
2221
1854
  */
@@ -2234,7 +1867,7 @@ var EllipsisSessions = class {
2234
1867
  * Required permissions: read:sessions.
2235
1868
  * API key: Supported.
2236
1869
  * CLI user token: Supported.
2237
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1870
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2238
1871
  * Higher permission levels include lower levels: read < write < delete.
2239
1872
  * Grant match patterns can further restrict access to individual resources.
2240
1873
  */
@@ -2247,15 +1880,16 @@ var EllipsisSessions = class {
2247
1880
  *
2248
1881
  * Append transcript lines to a session's record.
2249
1882
  *
2250
- * The in-sandbox tailer for interactive sessions.
1883
+ * The transcript tailer running inside the session's environment, for
1884
+ * interactive sessions.
2251
1885
  *
2252
- * A sandbox token may only push its own session's transcript.
2253
- * Idempotent by transcript line uuid; tolerant of malformed lines.
1886
+ * A session token may only push its own session's transcript.
1887
+ * Idempotent by transcript line uuid; tolerant of malformed lines.
2254
1888
  *
2255
1889
  * Required permissions: write:sessions.
2256
1890
  * API key: Supported.
2257
1891
  * CLI user token: Supported.
2258
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
1892
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2259
1893
  * Higher permission levels include lower levels: read < write < delete.
2260
1894
  * Grant match patterns can further restrict access to individual resources.
2261
1895
  */
@@ -2276,13 +1910,13 @@ var EllipsisSessions = class {
2276
1910
  * Required permissions: read:sessions.
2277
1911
  * API key: Supported.
2278
1912
  * CLI user token: Supported.
2279
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1913
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2280
1914
  * Higher permission levels include lower levels: read < write < delete.
2281
1915
  * Grant match patterns can further restrict access to individual resources.
2282
1916
  */
2283
1917
  async list(options = {}) {
2284
1918
  const path = "/v1/sessions";
2285
- const query = buildQuery({ agent: options.agent, source: options.source, service: options.service, handler: options.handler, days: options.days, start: options.start, end: options.end, limit: options.limit, cursor: options.cursor, author_id: options.author_id, repo: options.repo, unfinished: options.unfinished, exclude_code_review: options.exclude_code_review });
1919
+ const query = buildQuery({ agent: options.agent, source: options.source, service: options.service, handler: options.handler, days: options.days, start: options.start, end: options.end, limit: options.limit, cursor: options.cursor, author_id: options.author_id, repo: options.repo, unfinished: options.unfinished });
2286
1920
  const response = await this.transport.request("GET", path, { query });
2287
1921
  return new Page(
2288
1922
  response,
@@ -2291,25 +1925,22 @@ var EllipsisSessions = class {
2291
1925
  );
2292
1926
  }
2293
1927
  /**
2294
- * Get Session Output
1928
+ * Get Session Metrics
2295
1929
  *
2296
- * Return the session's typed output.
1930
+ * List the CPU, memory, swap, and disk readings of every VM the
1931
+ * session ran on, oldest first.
2297
1932
  *
2298
- * The payload the agent submitted through its config-declared
2299
- * output.json_schema, as the raw JSON body with no envelope. 404
2300
- * while the session is still running (poll GET /v1/sessions/{id}),
2301
- * when the agent declares no output block, or when no execution
2302
- * produced output.
1933
+ * A reading is taken every 5 seconds while the session runs.
2303
1934
  *
2304
1935
  * Required permissions: read:sessions.
2305
1936
  * API key: Supported.
2306
1937
  * CLI user token: Supported.
2307
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1938
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own session.
2308
1939
  * Higher permission levels include lower levels: read < write < delete.
2309
1940
  * Grant match patterns can further restrict access to individual resources.
2310
1941
  */
2311
- async output(session_id) {
2312
- const path = `/v1/sessions/${enc(session_id)}/output`;
1942
+ async metrics(session_id) {
1943
+ const path = `/v1/sessions/${enc(session_id)}/metrics`;
2313
1944
  return await this.transport.request("GET", path);
2314
1945
  }
2315
1946
  /**
@@ -2318,7 +1949,7 @@ var EllipsisSessions = class {
2318
1949
  * Return the session's stored transcript records, oldest first.
2319
1950
  *
2320
1951
  * Pagination is opt-in (cursor/limit); a bare call returns the
2321
- * full retained transcript. Available to sandbox tokens too: an
1952
+ * full retained transcript. Available to session tokens too: an
2322
1953
  * agent answering "did X look into Y?" needs to read the sessions
2323
1954
  * it finds, and any org member sees the same transcript in the
2324
1955
  * dashboard.
@@ -2326,7 +1957,7 @@ var EllipsisSessions = class {
2326
1957
  * Required permissions: read:sessions.
2327
1958
  * API key: Supported.
2328
1959
  * CLI user token: Supported.
2329
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1960
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2330
1961
  * Higher permission levels include lower levels: read < write < delete.
2331
1962
  * Grant match patterns can further restrict access to individual resources.
2332
1963
  */
@@ -2346,7 +1977,7 @@ var EllipsisSessions = class {
2346
1977
  * Required permissions: read:sessions.
2347
1978
  * API key: Supported.
2348
1979
  * CLI user token: Supported.
2349
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
1980
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2350
1981
  * Higher permission levels include lower levels: read < write < delete.
2351
1982
  * Grant match patterns can further restrict access to individual resources.
2352
1983
  */
@@ -2360,15 +1991,14 @@ var EllipsisSessions = class {
2360
1991
  *
2361
1992
  * Send a message to a session.
2362
1993
  *
2363
- * 409 for react/cron, non-interactive, and closed sessions.
2364
- * Returns the created message so the caller can track it by id; a
2365
- * retried send with the same idempotency_key returns the original
2366
- * message.
1994
+ * 409 for mention, non-interactive, closed, and out-of-budget
1995
+ * sessions. Returns the created message and its turn; a retried send
1996
+ * with the same idempotency_key returns the original ones.
2367
1997
  *
2368
1998
  * Required permissions: write:sessions.
2369
1999
  * API key: Supported.
2370
2000
  * CLI user token: Supported.
2371
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2001
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2372
2002
  * Higher permission levels include lower levels: read < write < delete.
2373
2003
  * Grant match patterns can further restrict access to individual resources.
2374
2004
  */
@@ -2383,7 +2013,7 @@ var EllipsisSessions = class {
2383
2013
  * Required permissions: read:sessions.
2384
2014
  * API key: Supported.
2385
2015
  * CLI user token: Supported.
2386
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2016
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2387
2017
  * Higher permission levels include lower levels: read < write < delete.
2388
2018
  * Grant match patterns can further restrict access to individual resources.
2389
2019
  */
@@ -2397,41 +2027,43 @@ var EllipsisSessions = class {
2397
2027
  * Start a cloud agent session.
2398
2028
  *
2399
2029
  * The daily driver: a prompt, optionally where to run it
2400
- * (`environment`) and the run's own settings, in the AgentConfig
2030
+ * (`environment`) and the session's own settings, in the AgentConfig
2401
2031
  * vocabulary. What you send is what runs: omit `environment` and the
2402
- * session runs in the built-in basic sandbox. A missing model or
2032
+ * session runs in the built-in basic environment. A missing model or
2403
2033
  * budget comes from the organization's settings, so
2404
2034
  * `{"claude_code": {"prompt": "..."}}` is a complete request.
2405
2035
  * Set exactly one of `claude_code` or `codex`. Its `prompt` is the
2406
- * first message; omit the prompt and the session starts idle, waiting for
2407
- * one. 400 when `lifecycle.interactive` is false and there is no prompt, or
2408
- * when `budget` exceeds the organization's per-session ceiling. To
2409
- * run a saved agent, use POST /v1/agents/{agent_id}/sessions.
2036
+ * first message; omit the prompt and the session starts with no
2037
+ * turn, waiting for one. 400 when `conversation.interactive` is false
2038
+ * and there is no prompt, or when `budget.session` exceeds the
2039
+ * organization's per-session ceiling. To start a session from a saved
2040
+ * agent, use POST /v1/agents/{agent_id}/sessions.
2410
2041
  *
2411
2042
  * Required permissions: write:sessions.
2412
2043
  * API key: Supported.
2413
2044
  * CLI user token: Supported.
2414
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2045
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2415
2046
  * Higher permission levels include lower levels: read < write < delete.
2416
2047
  * Grant match patterns can further restrict access to individual resources.
2417
2048
  */
2418
2049
  async start(options = {}) {
2419
2050
  const path = "/v1/sessions";
2420
- const body = buildBody({ budget: options.budget, claude_code: options.claude_code, codex: options.codex, environment: options.environment, force_rebuild: options.force_rebuild, images: options.images, lifecycle: options.lifecycle, metadata: options.metadata, output: options.output, permissions: options.permissions, repositories: options.repositories, skills: options.skills });
2051
+ const body = buildBody({ budget: options.budget, claude_code: options.claude_code, codex: options.codex, conversation: options.conversation, environment: options.environment, force_rebuild: options.force_rebuild, images: options.images, metadata: options.metadata, output: options.output, permissions: options.permissions, skills: options.skills });
2421
2052
  return await this.transport.request("POST", path, { body });
2422
2053
  }
2423
2054
  /**
2424
2055
  * Stop Session
2425
2056
  *
2426
- * Stop an in-flight session and return it.
2057
+ * Stop the turn in progress and return the session.
2427
2058
  *
2428
- * stopped_by is recorded only when the caller's credential maps
2429
- * to a GitHub account.
2059
+ * The turn ends `stopped`; the conversation stays open. 409 when no
2060
+ * turn is pending or running. The stopping user is recorded only
2061
+ * when the caller's credential maps to a GitHub account.
2430
2062
  *
2431
2063
  * Required permissions: write:sessions.
2432
2064
  * API key: Supported.
2433
2065
  * CLI user token: Supported.
2434
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2066
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2435
2067
  * Higher permission levels include lower levels: read < write < delete.
2436
2068
  * Grant match patterns can further restrict access to individual resources.
2437
2069
  */
@@ -2445,7 +2077,7 @@ var EllipsisSessions = class {
2445
2077
  * Required permissions: read:sessions.
2446
2078
  * API key: Supported.
2447
2079
  * CLI user token: Supported.
2448
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2080
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2449
2081
  * Higher permission levels include lower levels: read < write < delete.
2450
2082
  * Grant match patterns can further restrict access to individual resources.
2451
2083
  */
@@ -2469,7 +2101,7 @@ var EllipsisSessions = class {
2469
2101
  * Required permissions: write:sessions.
2470
2102
  * API key: Supported.
2471
2103
  * CLI user token: Supported.
2472
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2104
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2473
2105
  * Higher permission levels include lower levels: read < write < delete.
2474
2106
  * Grant match patterns can further restrict access to individual resources.
2475
2107
  */
@@ -2501,7 +2133,7 @@ var EllipsisSupportSlack = class {
2501
2133
  * Required permissions: write:account.
2502
2134
  * API key: Requires a CLI user token.
2503
2135
  * CLI user token: Supported.
2504
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2136
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2505
2137
  * Higher permission levels include lower levels: read < write < delete.
2506
2138
  */
2507
2139
  async create(options) {
@@ -2515,7 +2147,7 @@ var EllipsisSupportSlack = class {
2515
2147
  * Required permissions: read:account.
2516
2148
  * API key: Supported.
2517
2149
  * CLI user token: Supported.
2518
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2150
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2519
2151
  * Higher permission levels include lower levels: read < write < delete.
2520
2152
  */
2521
2153
  async get() {
@@ -2528,7 +2160,7 @@ var EllipsisSupportSlack = class {
2528
2160
  * Required permissions: write:account.
2529
2161
  * API key: Requires a CLI user token.
2530
2162
  * CLI user token: Supported.
2531
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2163
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2532
2164
  * Higher permission levels include lower levels: read < write < delete.
2533
2165
  */
2534
2166
  async invite(options) {
@@ -2558,7 +2190,7 @@ var EllipsisTemplates = class {
2558
2190
  * Required permissions: read:templates.
2559
2191
  * API key: Supported.
2560
2192
  * CLI user token: Supported.
2561
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2193
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2562
2194
  * Higher permission levels include lower levels: read < write < delete.
2563
2195
  */
2564
2196
  async get(template_id) {
@@ -2576,7 +2208,7 @@ var EllipsisTemplates = class {
2576
2208
  * Required permissions: read:templates.
2577
2209
  * API key: Supported.
2578
2210
  * CLI user token: Supported.
2579
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2211
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2580
2212
  * Higher permission levels include lower levels: read < write < delete.
2581
2213
  */
2582
2214
  async list() {
@@ -2600,7 +2232,7 @@ var EllipsisUserSubscriptionTokens = class {
2600
2232
  * Required permissions: delete:user.
2601
2233
  * API key: Requires a CLI user token.
2602
2234
  * CLI user token: Supported.
2603
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2235
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2604
2236
  * Higher permission levels include lower levels: read < write < delete.
2605
2237
  */
2606
2238
  async delete(provider) {
@@ -2618,7 +2250,7 @@ var EllipsisUserSubscriptionTokens = class {
2618
2250
  * Required permissions: read:user.
2619
2251
  * API key: Requires a CLI user token.
2620
2252
  * CLI user token: Supported.
2621
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2253
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2622
2254
  * Higher permission levels include lower levels: read < write < delete.
2623
2255
  */
2624
2256
  async get(provider) {
@@ -2637,7 +2269,7 @@ var EllipsisUserSubscriptionTokens = class {
2637
2269
  * Required permissions: read:user.
2638
2270
  * API key: Requires a CLI user token.
2639
2271
  * CLI user token: Supported.
2640
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2272
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2641
2273
  * Higher permission levels include lower levels: read < write < delete.
2642
2274
  */
2643
2275
  async list() {
@@ -2658,7 +2290,7 @@ var EllipsisUserSubscriptionTokens = class {
2658
2290
  * Required permissions: write:user.
2659
2291
  * API key: Requires a CLI user token.
2660
2292
  * CLI user token: Supported.
2661
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2293
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2662
2294
  * Higher permission levels include lower levels: read < write < delete.
2663
2295
  */
2664
2296
  async set(provider, options) {
@@ -2680,7 +2312,7 @@ var EllipsisUserSubscriptionTokens = class {
2680
2312
  * Required permissions: read:user.
2681
2313
  * API key: Requires a CLI user token.
2682
2314
  * CLI user token: Supported.
2683
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2315
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2684
2316
  * Higher permission levels include lower levels: read < write < delete.
2685
2317
  */
2686
2318
  async usage(provider) {
@@ -2702,7 +2334,7 @@ var EllipsisUserSubscriptionTokens = class {
2702
2334
  * Required permissions: write:user.
2703
2335
  * API key: Requires a CLI user token.
2704
2336
  * CLI user token: Supported.
2705
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2337
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2706
2338
  * Higher permission levels include lower levels: read < write < delete.
2707
2339
  */
2708
2340
  async verify(provider) {
@@ -2721,7 +2353,7 @@ var EllipsisUserTokens = class {
2721
2353
  * Required permissions: read:user.
2722
2354
  * API key: Requires a CLI user token.
2723
2355
  * CLI user token: Supported.
2724
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2356
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2725
2357
  * Higher permission levels include lower levels: read < write < delete.
2726
2358
  */
2727
2359
  async list() {
@@ -2734,7 +2366,7 @@ var EllipsisUserTokens = class {
2734
2366
  * Required permissions: delete:user.
2735
2367
  * API key: Requires a CLI user token.
2736
2368
  * CLI user token: Supported.
2737
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2369
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2738
2370
  * Higher permission levels include lower levels: read < write < delete.
2739
2371
  */
2740
2372
  async revoke(token_id) {
@@ -2763,7 +2395,7 @@ var EllipsisVmExecutions = class {
2763
2395
  * Required permissions: read:environments.
2764
2396
  * API key: Supported.
2765
2397
  * CLI user token: Supported.
2766
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
2398
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
2767
2399
  * Higher permission levels include lower levels: read < write < delete.
2768
2400
  */
2769
2401
  async get(vm_execution_id) {
@@ -2776,7 +2408,7 @@ var EllipsisVmExecutions = class {
2776
2408
  * Required permissions: read:environments.
2777
2409
  * API key: Supported.
2778
2410
  * CLI user token: Supported.
2779
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
2411
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
2780
2412
  * Higher permission levels include lower levels: read < write < delete.
2781
2413
  */
2782
2414
  async list() {
@@ -2789,7 +2421,7 @@ var EllipsisVmExecutions = class {
2789
2421
  * Required permissions: read:environments.
2790
2422
  * API key: Supported.
2791
2423
  * CLI user token: Supported.
2792
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
2424
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own sandbox.
2793
2425
  * Higher permission levels include lower levels: read < write < delete.
2794
2426
  */
2795
2427
  async streamTicket(vm_execution_id) {
@@ -2810,7 +2442,7 @@ var EllipsisVmImages = class {
2810
2442
  * Required permissions: read:environments.
2811
2443
  * API key: Supported.
2812
2444
  * CLI user token: Supported.
2813
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2445
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2814
2446
  * Higher permission levels include lower levels: read < write < delete.
2815
2447
  */
2816
2448
  async get(image_id) {
@@ -2827,7 +2459,7 @@ var EllipsisVmImages = class {
2827
2459
  * Required permissions: read:environments.
2828
2460
  * API key: Supported.
2829
2461
  * CLI user token: Supported.
2830
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2462
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2831
2463
  * Higher permission levels include lower levels: read < write < delete.
2832
2464
  */
2833
2465
  async list(options = {}) {
@@ -2849,7 +2481,7 @@ var EllipsisVms = class {
2849
2481
  * Required permissions: read:environments.
2850
2482
  * API key: Supported.
2851
2483
  * CLI user token: Supported.
2852
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
2484
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
2853
2485
  * Higher permission levels include lower levels: read < write < delete.
2854
2486
  */
2855
2487
  async get(vm_id) {
@@ -2866,7 +2498,7 @@ var EllipsisVms = class {
2866
2498
  * Required permissions: read:environments.
2867
2499
  * API key: Supported.
2868
2500
  * CLI user token: Supported.
2869
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
2501
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
2870
2502
  * Higher permission levels include lower levels: read < write < delete.
2871
2503
  */
2872
2504
  async list(options = {}) {
@@ -2874,6 +2506,24 @@ var EllipsisVms = class {
2874
2506
  const query = buildQuery({ limit: options.limit, offset: options.offset });
2875
2507
  return await this.transport.request("GET", path, { query });
2876
2508
  }
2509
+ /**
2510
+ * List Vm Metrics
2511
+ *
2512
+ * List a VM's CPU, memory, swap, and disk readings, oldest first.
2513
+ *
2514
+ * A reading is taken every 5 seconds while a session runs on the VM.
2515
+ *
2516
+ * Required permissions: read:environments.
2517
+ * API key: Supported.
2518
+ * CLI user token: Supported.
2519
+ * Session token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration. Only the token's own VM.
2520
+ * Higher permission levels include lower levels: read < write < delete.
2521
+ */
2522
+ async metrics(vm_id, options = {}) {
2523
+ const path = `/v1/vms/${enc(vm_id)}/metrics`;
2524
+ const query = buildQuery({ start: options.start, end: options.end });
2525
+ return await this.transport.request("GET", path, { query });
2526
+ }
2877
2527
  };
2878
2528
  var EllipsisWebhooksDeliveries = class {
2879
2529
  constructor(transport) {
@@ -2891,7 +2541,7 @@ var EllipsisWebhooksDeliveries = class {
2891
2541
  * Required permissions: read:webhooks.
2892
2542
  * API key: Supported.
2893
2543
  * CLI user token: Supported.
2894
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2544
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2895
2545
  * Higher permission levels include lower levels: read < write < delete.
2896
2546
  */
2897
2547
  async get(delivery_id) {
@@ -2909,7 +2559,7 @@ var EllipsisWebhooksDeliveries = class {
2909
2559
  * Required permissions: read:webhooks.
2910
2560
  * API key: Supported.
2911
2561
  * CLI user token: Supported.
2912
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2562
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2913
2563
  * Higher permission levels include lower levels: read < write < delete.
2914
2564
  */
2915
2565
  async list(options = {}) {
@@ -2943,7 +2593,7 @@ var EllipsisWebhooks = class {
2943
2593
  * Required permissions: write:webhooks.
2944
2594
  * API key: Supported.
2945
2595
  * CLI user token: Supported.
2946
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2596
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2947
2597
  * Higher permission levels include lower levels: read < write < delete.
2948
2598
  */
2949
2599
  async create(options) {
@@ -2962,7 +2612,7 @@ var EllipsisWebhooks = class {
2962
2612
  * Required permissions: delete:webhooks.
2963
2613
  * API key: Supported.
2964
2614
  * CLI user token: Supported.
2965
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2615
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2966
2616
  * Higher permission levels include lower levels: read < write < delete.
2967
2617
  */
2968
2618
  async delete(webhook_id) {
@@ -2977,7 +2627,7 @@ var EllipsisWebhooks = class {
2977
2627
  * Required permissions: read:webhooks.
2978
2628
  * API key: Supported.
2979
2629
  * CLI user token: Supported.
2980
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2630
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2981
2631
  * Higher permission levels include lower levels: read < write < delete.
2982
2632
  */
2983
2633
  async get(webhook_id) {
@@ -2992,7 +2642,7 @@ var EllipsisWebhooks = class {
2992
2642
  * Required permissions: read:webhooks.
2993
2643
  * API key: Supported.
2994
2644
  * CLI user token: Supported.
2995
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2645
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
2996
2646
  * Higher permission levels include lower levels: read < write < delete.
2997
2647
  */
2998
2648
  async list() {
@@ -3012,7 +2662,7 @@ var EllipsisWebhooks = class {
3012
2662
  * Required permissions: write:webhooks.
3013
2663
  * API key: Supported.
3014
2664
  * CLI user token: Supported.
3015
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2665
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3016
2666
  * Higher permission levels include lower levels: read < write < delete.
3017
2667
  */
3018
2668
  async ping(webhook_id) {
@@ -3031,7 +2681,7 @@ var EllipsisWebhooks = class {
3031
2681
  * Required permissions: write:webhooks.
3032
2682
  * API key: Supported.
3033
2683
  * CLI user token: Supported.
3034
- * Sandbox token: Not supported by sandbox tokens, even with permissions.ellipsis enabled.
2684
+ * Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
3035
2685
  * Higher permission levels include lower levels: read < write < delete.
3036
2686
  */
3037
2687
  async update(webhook_id, options) {
@@ -3048,10 +2698,8 @@ var Ellipsis = class {
3048
2698
  analytics;
3049
2699
  auth;
3050
2700
  environments;
3051
- files;
3052
2701
  handlers;
3053
2702
  integrations;
3054
- memories;
3055
2703
  reviews;
3056
2704
  secrets;
3057
2705
  sessions;
@@ -3070,10 +2718,8 @@ var Ellipsis = class {
3070
2718
  this.analytics = new EllipsisAnalytics(this.transport);
3071
2719
  this.auth = new EllipsisAuth(this.transport);
3072
2720
  this.environments = new EllipsisEnvironments(this.transport);
3073
- this.files = new EllipsisFiles(this.transport);
3074
2721
  this.handlers = new EllipsisHandlers(this.transport);
3075
2722
  this.integrations = new EllipsisIntegrations(this.transport);
3076
- this.memories = new EllipsisMemories(this.transport);
3077
2723
  this.reviews = new EllipsisReviews(this.transport);
3078
2724
  this.secrets = new EllipsisSecrets(this.transport);
3079
2725
  this.sessions = new EllipsisSessions(this.transport);
@@ -3090,10 +2736,12 @@ var Ellipsis = class {
3090
2736
  *
3091
2737
  * Return the identity behind the caller's credential.
3092
2738
  *
3093
- * Required permissions: read:account.
2739
+ * Any valid credential may call this; no permission grant is needed.
2740
+ *
2741
+ * Required permissions: none; any valid credential.
3094
2742
  * API key: Supported.
3095
2743
  * CLI user token: Supported.
3096
- * Sandbox token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.
2744
+ * Session token: Requires the ellipsis:api scope; no permissions.ellipsis grant is needed.
3097
2745
  * Higher permission levels include lower levels: read < write < delete.
3098
2746
  */
3099
2747
  async identity() {
@@ -3114,9 +2762,8 @@ export {
3114
2762
  RateLimitError,
3115
2763
  ServerError,
3116
2764
  SessionHandle,
3117
- TERMINAL_STATUSES,
3118
2765
  Transport,
3119
2766
  TransportError,
3120
2767
  UnprocessableError,
3121
- isSettled
2768
+ isTurnFinal
3122
2769
  };