@ellipsis-dev/sdk 0.10.0 → 0.12.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
@@ -249,37 +249,97 @@ var EllipsisAgentsConfigs = class {
249
249
  /**
250
250
  * Create Agent Config
251
251
  *
252
- * Create an agent config via pull request.
252
+ * Create an agent config.
253
253
  *
254
- * The PR adds the config file to agents/ on the target
255
- * repository; the agent goes live when it merges.
254
+ * Name a repository and Ellipsis opens a pull request adding the
255
+ * config file to agents/ there; the agent goes live when it
256
+ * merges. Omit it and the agent is created here, with no file,
257
+ * live immediately — and every file reference in it must name the
258
+ * repository it lives in.
256
259
  *
257
260
  * Accepts an inline config or a gallery template slug. 409 when
258
261
  * another live agent already holds the name.
259
262
  */
260
- async create(options) {
261
- const path = "/agents/configs";
263
+ async create(options = {}) {
264
+ const path = "/v1/agents/configs";
262
265
  const body = buildBody({ config: options.config, path: options.path, repository: options.repository, template_id: options.template_id });
263
266
  return await this.transport.request("POST", path, { body });
264
267
  }
268
+ /**
269
+ * Delete Agent Config
270
+ *
271
+ * Delete an agent, by id or by the agent's name.
272
+ *
273
+ * The agent stops running and its name is freed immediately; its
274
+ * past sessions remain readable. Only for agents managed through
275
+ * this API — delete the file to remove one defined by a
276
+ * repository.
277
+ */
278
+ async delete(config_id) {
279
+ const path = `/v1/agents/configs/${enc(config_id)}`;
280
+ await this.transport.request("DELETE", path);
281
+ }
265
282
  /**
266
283
  * Get Agent Config
267
284
  *
268
285
  * Return one saved agent config, by id or by the agent's name.
269
286
  */
270
287
  async get(config_id) {
271
- const path = `/agents/configs/${enc(config_id)}`;
288
+ const path = `/v1/agents/configs/${enc(config_id)}`;
272
289
  return await this.transport.request("GET", path);
273
290
  }
291
+ /**
292
+ * Link Agent Config
293
+ *
294
+ * Move an agent into a repository, by id or by the agent's name.
295
+ *
296
+ * Opens a pull request adding the agent's config file. The agent
297
+ * keeps running unchanged meanwhile; merging hands it over to the
298
+ * file, after which the file is what changes it. Nothing happens
299
+ * if the pull request is never merged.
300
+ */
301
+ async link(config_id, options) {
302
+ const path = `/v1/agents/configs/${enc(config_id)}/link`;
303
+ const body = buildBody({ path: options.path, repository: options.repository });
304
+ return await this.transport.request("POST", path, { body });
305
+ }
274
306
  /**
275
307
  * List Agent Configs
276
308
  *
277
309
  * List saved agent configs.
278
310
  */
279
311
  async list() {
280
- const path = "/agents/configs";
312
+ const path = "/v1/agents/configs";
281
313
  return await this.transport.request("GET", path);
282
314
  }
315
+ /**
316
+ * Unlink Agent Config
317
+ *
318
+ * Take over an agent from its file, by id or by the agent's name.
319
+ *
320
+ * The file stops governing the agent immediately and further
321
+ * changes go through this API. The file is left in place, inert —
322
+ * delete it whenever you like.
323
+ */
324
+ async unlink(config_id) {
325
+ const path = `/v1/agents/configs/${enc(config_id)}/unlink`;
326
+ return await this.transport.request("POST", path);
327
+ }
328
+ /**
329
+ * Update Agent Config
330
+ *
331
+ * Replace an agent's definition, by id or by the agent's name.
332
+ *
333
+ * The whole definition is replaced, and the change is live at
334
+ * once. Only for agents managed through this API: one defined by a
335
+ * repository file is a 409, since the next push to that file would
336
+ * revert the change — unlink it first to take ownership.
337
+ */
338
+ async update(config_id, options) {
339
+ const path = `/v1/agents/configs/${enc(config_id)}`;
340
+ const body = buildBody({ config: options.config });
341
+ return await this.transport.request("PUT", path, { body });
342
+ }
283
343
  };
284
344
  var EllipsisAgentsDefaults = class {
285
345
  constructor(transport) {
@@ -297,7 +357,7 @@ var EllipsisAgentsDefaults = class {
297
357
  * Refused for sandbox tokens.
298
358
  */
299
359
  async delete(options = {}) {
300
- const path = "/agents/defaults";
360
+ const path = "/v1/agents/defaults";
301
361
  const query = buildQuery({ repository: options.repository });
302
362
  await this.transport.request("DELETE", path, { query });
303
363
  }
@@ -312,7 +372,7 @@ var EllipsisAgentsDefaults = class {
312
372
  * omitted, a repo rung is "owner/name" — never by row id.
313
373
  */
314
374
  async list() {
315
- const path = "/agents/defaults";
375
+ const path = "/v1/agents/defaults";
316
376
  return await this.transport.request("GET", path);
317
377
  }
318
378
  /**
@@ -329,7 +389,7 @@ var EllipsisAgentsDefaults = class {
329
389
  * foreign repository is a 404.
330
390
  */
331
391
  async set(options) {
332
- const path = "/agents/defaults";
392
+ const path = "/v1/agents/defaults";
333
393
  const body = buildBody({ config_id: options.config_id, repository: options.repository });
334
394
  return await this.transport.request("PUT", path, { body });
335
395
  }
@@ -345,7 +405,7 @@ var EllipsisAgentsTemplates = class {
345
405
  * Return one built-in agent template by slug.
346
406
  */
347
407
  async get(template_id) {
348
- const path = `/agents/templates/${enc(template_id)}`;
408
+ const path = `/v1/agents/templates/${enc(template_id)}`;
349
409
  return await this.transport.request("GET", path);
350
410
  }
351
411
  /**
@@ -357,7 +417,7 @@ var EllipsisAgentsTemplates = class {
357
417
  * product content shared by the dashboard, landing site, and CLI.
358
418
  */
359
419
  async list() {
360
- const path = "/agents/templates";
420
+ const path = "/v1/agents/templates";
361
421
  return await this.transport.request("GET", path);
362
422
  }
363
423
  };
@@ -386,7 +446,7 @@ var EllipsisAlerts = class {
386
446
  * 409 when the alert is not open; 404 when it doesn't exist.
387
447
  */
388
448
  async dismiss(alert_id) {
389
- const path = `/alerts/${enc(alert_id)}/dismiss`;
449
+ const path = `/v1/alerts/${enc(alert_id)}/dismiss`;
390
450
  return await this.transport.request("POST", path);
391
451
  }
392
452
  /**
@@ -397,7 +457,7 @@ var EllipsisAlerts = class {
397
457
  * 404 if it doesn't exist or belongs to another organization.
398
458
  */
399
459
  async get(alert_id) {
400
- const path = `/alerts/${enc(alert_id)}`;
460
+ const path = `/v1/alerts/${enc(alert_id)}`;
401
461
  return await this.transport.request("GET", path);
402
462
  }
403
463
  /**
@@ -411,7 +471,7 @@ var EllipsisAlerts = class {
411
471
  * this org near budget?" mid-task.
412
472
  */
413
473
  async list(options = {}) {
414
- const path = "/alerts";
474
+ const path = "/v1/alerts";
415
475
  const query = buildQuery({ status: options.status, source: options.source, limit: options.limit, cursor: options.cursor });
416
476
  const response = await this.transport.request("GET", path, { query });
417
477
  return new Page(
@@ -440,7 +500,7 @@ var EllipsisAnalytics = class {
440
500
  * no secrets.
441
501
  */
442
502
  async metrics(options = {}) {
443
- const path = "/analytics/metrics";
503
+ const path = "/v1/analytics/metrics";
444
504
  const query = buildQuery({ days: options.days, start: options.start, end: options.end, repo: options.repo, author: options.author, account_type: options.account_type, status: options.status });
445
505
  return await this.transport.request("GET", path, { query });
446
506
  }
@@ -453,7 +513,7 @@ var EllipsisAnalytics = class {
453
513
  * 30 days).
454
514
  */
455
515
  async pullRequests(options = {}) {
456
- const path = "/analytics/pull-requests";
516
+ const path = "/v1/analytics/pull-requests";
457
517
  const query = buildQuery({ days: options.days, start: options.start, end: options.end, account_type: options.account_type, repository_id: options.repository_id, author_id: options.author_id, status: options.status });
458
518
  return await this.transport.request("GET", path, { query });
459
519
  }
@@ -468,7 +528,7 @@ var EllipsisAnalytics = class {
468
528
  * (default: the last 30 days).
469
529
  */
470
530
  async reviews(options = {}) {
471
- const path = "/analytics/reviews";
531
+ const path = "/v1/analytics/reviews";
472
532
  const query = buildQuery({ days: options.days, start: options.start, end: options.end, repo: options.repo, author: options.author, account_type: options.account_type, review_state: options.review_state });
473
533
  return await this.transport.request("GET", path, { query });
474
534
  }
@@ -486,7 +546,7 @@ var EllipsisAuthCli = class {
486
546
  * Unauthenticated; the device code identifies the flow.
487
547
  */
488
548
  async poll(options) {
489
- const path = "/auth/cli/poll";
549
+ const path = "/v1/auth/cli/poll";
490
550
  const body = buildBody({ device_code: options.device_code });
491
551
  return await this.transport.request("POST", path, { body });
492
552
  }
@@ -500,7 +560,7 @@ var EllipsisAuthCli = class {
500
560
  * dashboard.
501
561
  */
502
562
  async start() {
503
- const path = "/auth/cli/start";
563
+ const path = "/v1/auth/cli/start";
504
564
  return await this.transport.request("POST", path);
505
565
  }
506
566
  };
@@ -529,7 +589,7 @@ var EllipsisFiles = class {
529
589
  * dashboard URL so callers never hard-code URL shapes.
530
590
  */
531
591
  async create(options) {
532
- const path = "/files";
592
+ const path = "/v1/files";
533
593
  const body = buildBody({ content_type: options.content_type, data_b64: options.data_b64, filename: options.filename });
534
594
  return await this.transport.request("POST", path, { body });
535
595
  }
@@ -546,7 +606,7 @@ var EllipsisFiles = class {
546
606
  * keys and user tokens may delete.
547
607
  */
548
608
  async delete(file_id) {
549
- const path = `/files/${enc(file_id)}`;
609
+ const path = `/v1/files/${enc(file_id)}`;
550
610
  await this.transport.request("DELETE", path);
551
611
  }
552
612
  /**
@@ -562,7 +622,7 @@ var EllipsisFiles = class {
562
622
  * `agent file get` wraps exactly that two-step.
563
623
  */
564
624
  async get(file_id) {
565
- const path = `/files/${enc(file_id)}`;
625
+ const path = `/v1/files/${enc(file_id)}`;
566
626
  return await this.transport.request("GET", path);
567
627
  }
568
628
  /**
@@ -574,7 +634,7 @@ var EllipsisFiles = class {
574
634
  * per row. session_id scopes the list to one run's uploads.
575
635
  */
576
636
  async list(options = {}) {
577
- const path = "/files";
637
+ const path = "/v1/files";
578
638
  const query = buildQuery({ session_id: options.session_id, limit: options.limit, cursor: options.cursor });
579
639
  const response = await this.transport.request("GET", path, { query });
580
640
  return new Page(
@@ -601,7 +661,7 @@ var EllipsisIntegrationsGithub = class {
601
661
  * link exists, and /slack/members carries the reverse link.
602
662
  */
603
663
  async members() {
604
- const path = "/integrations/github/members";
664
+ const path = "/v1/integrations/github/members";
605
665
  return await this.transport.request("GET", path);
606
666
  }
607
667
  /**
@@ -610,7 +670,7 @@ var EllipsisIntegrationsGithub = class {
610
670
  * List GitHub repositories connected to the installation.
611
671
  */
612
672
  async repos() {
613
- const path = "/integrations/github/repos";
673
+ const path = "/v1/integrations/github/repos";
614
674
  return await this.transport.request("GET", path);
615
675
  }
616
676
  };
@@ -625,7 +685,7 @@ var EllipsisIntegrationsLinear = class {
625
685
  * List the teams of the connected Linear workspace.
626
686
  */
627
687
  async teams() {
628
- const path = "/integrations/linear/teams";
688
+ const path = "/v1/integrations/linear/teams";
629
689
  return await this.transport.request("GET", path);
630
690
  }
631
691
  };
@@ -640,7 +700,7 @@ var EllipsisIntegrationsSentry = class {
640
700
  * List the connected Sentry organizations.
641
701
  */
642
702
  async organizations() {
643
- const path = "/integrations/sentry/organizations";
703
+ const path = "/v1/integrations/sentry/organizations";
644
704
  return await this.transport.request("GET", path);
645
705
  }
646
706
  };
@@ -656,7 +716,7 @@ var EllipsisIntegrationsSlack = class {
656
716
  * live from the Slack API.
657
717
  */
658
718
  async channels() {
659
- const path = "/integrations/slack/channels";
719
+ const path = "/v1/integrations/slack/channels";
660
720
  return await this.transport.request("GET", path);
661
721
  }
662
722
  /**
@@ -666,7 +726,7 @@ var EllipsisIntegrationsSlack = class {
666
726
  * live from the Slack API.
667
727
  */
668
728
  async members() {
669
- const path = "/integrations/slack/members";
729
+ const path = "/v1/integrations/slack/members";
670
730
  return await this.transport.request("GET", path);
671
731
  }
672
732
  };
@@ -696,7 +756,7 @@ var EllipsisIntegrations = class {
696
756
  * responses never include OAuth tokens or any other secret.
697
757
  */
698
758
  async list() {
699
- const path = "/integrations";
759
+ const path = "/v1/integrations";
700
760
  return await this.transport.request("GET", path);
701
761
  }
702
762
  };
@@ -719,7 +779,7 @@ var EllipsisMemories = class {
719
779
  * correcting an existing memory is an explicit edit.
720
780
  */
721
781
  async create(options) {
722
- const path = "/memories";
782
+ const path = "/v1/memories";
723
783
  const body = buildBody({ content: options.content, description: options.description, path: options.path });
724
784
  return await this.transport.request("POST", path, { body });
725
785
  }
@@ -733,7 +793,7 @@ var EllipsisMemories = class {
733
793
  * the memory's history for forensics, not for an undo API.
734
794
  */
735
795
  async delete(memory_id, options = {}) {
736
- const path = `/memories/${enc(memory_id)}`;
796
+ const path = `/v1/memories/${enc(memory_id)}`;
737
797
  const query = buildQuery({ if_sha256: options.if_sha256 });
738
798
  await this.transport.request("DELETE", path, { query });
739
799
  }
@@ -750,7 +810,7 @@ var EllipsisMemories = class {
750
810
  * a 409 instead of silently overwriting it.
751
811
  */
752
812
  async edit(memory_id, options = {}) {
753
- const path = `/memories/${enc(memory_id)}`;
813
+ const path = `/v1/memories/${enc(memory_id)}`;
754
814
  const body = buildBody({ content: options.content, description: options.description, if_sha256: options.if_sha256 });
755
815
  return await this.transport.request("PUT", path, { body });
756
816
  }
@@ -762,7 +822,7 @@ var EllipsisMemories = class {
762
822
  * The id comes from the index returned by listing memories.
763
823
  */
764
824
  async get(memory_id) {
765
- const path = `/memories/${enc(memory_id)}`;
825
+ const path = `/v1/memories/${enc(memory_id)}`;
766
826
  return await this.transport.request("GET", path);
767
827
  }
768
828
  /**
@@ -776,7 +836,7 @@ var EllipsisMemories = class {
776
836
  * the index, then fetch the ids whose content you want.
777
837
  */
778
838
  async list(options = {}) {
779
- const path = "/memories";
839
+ const path = "/v1/memories";
780
840
  const query = buildQuery({ prefix: options.prefix });
781
841
  return await this.transport.request("GET", path, { query });
782
842
  }
@@ -799,7 +859,7 @@ var EllipsisModels = class {
799
859
  * global.
800
860
  */
801
861
  async list() {
802
- const path = "/models";
862
+ const path = "/v1/models";
803
863
  return await this.transport.request("GET", path);
804
864
  }
805
865
  };
@@ -824,7 +884,7 @@ var EllipsisReviews = class {
824
884
  * itself is a pipeline rather than one process.
825
885
  */
826
886
  async create(options) {
827
- const path = "/reviews";
887
+ const path = "/v1/reviews";
828
888
  const body = buildBody({ owner: options.owner, post: options.post, pull_request_number: options.pull_request_number, repo: options.repo, scope: options.scope });
829
889
  return await this.transport.request("POST", path, { body });
830
890
  }
@@ -841,7 +901,7 @@ var EllipsisReviews = class {
841
901
  * streams a stage session and then re-fetches the review.
842
902
  */
843
903
  async get(review_id) {
844
- const path = `/reviews/${enc(review_id)}`;
904
+ const path = `/v1/reviews/${enc(review_id)}`;
845
905
  return await this.transport.request("GET", path);
846
906
  }
847
907
  /**
@@ -855,7 +915,7 @@ var EllipsisReviews = class {
855
915
  * me every review on this PR".
856
916
  */
857
917
  async list(options = {}) {
858
- const path = "/reviews";
918
+ const path = "/v1/reviews";
859
919
  const query = buildQuery({ owner: options.owner, repo: options.repo, pull_request_number: options.pull_request_number, status: options.status, limit: options.limit, cursor: options.cursor });
860
920
  const response = await this.transport.request("GET", path, { query });
861
921
  return new Page(
@@ -879,7 +939,7 @@ var EllipsisSecrets = class {
879
939
  * user token.
880
940
  */
881
941
  async delete(name) {
882
- const path = `/secrets/${enc(name)}`;
942
+ const path = `/v1/secrets/${enc(name)}`;
883
943
  await this.transport.request("DELETE", path);
884
944
  }
885
945
  /**
@@ -891,7 +951,7 @@ var EllipsisSecrets = class {
891
951
  * timestamps, never the stored value.
892
952
  */
893
953
  async list() {
894
- const path = "/secrets";
954
+ const path = "/v1/secrets";
895
955
  return await this.transport.request("GET", path);
896
956
  }
897
957
  /**
@@ -905,7 +965,7 @@ var EllipsisSecrets = class {
905
965
  * API key or user token.
906
966
  */
907
967
  async set(options) {
908
- const path = "/secrets";
968
+ const path = "/v1/secrets";
909
969
  const body = buildBody({ secrets: options.secrets });
910
970
  return await this.transport.request("PUT", path, { body });
911
971
  }
@@ -929,7 +989,7 @@ var EllipsisSessions = class {
929
989
  * it).
930
990
  */
931
991
  async executions(session_id) {
932
- const path = `/sessions/${enc(session_id)}/executions`;
992
+ const path = `/v1/sessions/${enc(session_id)}/executions`;
933
993
  return await this.transport.request("GET", path);
934
994
  }
935
995
  /**
@@ -947,7 +1007,7 @@ var EllipsisSessions = class {
947
1007
  * same data.
948
1008
  */
949
1009
  async export(session_id) {
950
- const path = `/sessions/${enc(session_id)}/export`;
1010
+ const path = `/v1/sessions/${enc(session_id)}/export`;
951
1011
  return await this.transport.request("GET", path);
952
1012
  }
953
1013
  /**
@@ -963,24 +1023,7 @@ var EllipsisSessions = class {
963
1023
  * live on the detail endpoints, not here.
964
1024
  */
965
1025
  async get(session_id) {
966
- const path = `/sessions/${enc(session_id)}`;
967
- return await this.transport.request("GET", path);
968
- }
969
- /**
970
- * Get Agent Session Ide
971
- *
972
- * Return the IDE link for the session's sandbox.
973
- *
974
- * The membership-gated dashboard page, which performs the sandbox
975
- * proxy handoff itself.
976
- *
977
- * No credential is minted here — the URL grants nothing by
978
- * possession. 409 when the sandbox isn't running (send the
979
- * session a message to wake it first). Backs the `agent session
980
- * ide` CLI verb.
981
- */
982
- async ide(session_id) {
983
- const path = `/sessions/${enc(session_id)}/ide`;
1026
+ const path = `/v1/sessions/${enc(session_id)}`;
984
1027
  return await this.transport.request("GET", path);
985
1028
  }
986
1029
  /**
@@ -994,7 +1037,7 @@ var EllipsisSessions = class {
994
1037
  * Idempotent by transcript line uuid; tolerant of malformed lines.
995
1038
  */
996
1039
  async ingestTranscript(session_id, options) {
997
- const path = `/sessions/${enc(session_id)}/transcript`;
1040
+ const path = `/v1/sessions/${enc(session_id)}/transcript`;
998
1041
  const body = buildBody({ lines: options.lines, offset: options.offset });
999
1042
  return await this.transport.request("POST", path, { body });
1000
1043
  }
@@ -1008,7 +1051,7 @@ var EllipsisSessions = class {
1008
1051
  * still going.
1009
1052
  */
1010
1053
  async list(options = {}) {
1011
- const path = "/sessions";
1054
+ const path = "/v1/sessions";
1012
1055
  const query = buildQuery({ config_id: options.config_id, source: options.source, 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 });
1013
1056
  const response = await this.transport.request("GET", path, { query });
1014
1057
  return new Page(
@@ -1024,28 +1067,14 @@ var EllipsisSessions = class {
1024
1067
  *
1025
1068
  * The payload the agent submitted through its config-declared
1026
1069
  * output.json_schema, as the raw JSON body with no envelope. 404
1027
- * while the session is still running (poll GET /sessions/{id}),
1070
+ * while the session is still running (poll GET /v1/sessions/{id}),
1028
1071
  * when the agent declares no output block, or when no execution
1029
1072
  * produced output.
1030
1073
  */
1031
1074
  async output(session_id) {
1032
- const path = `/sessions/${enc(session_id)}/output`;
1075
+ const path = `/v1/sessions/${enc(session_id)}/output`;
1033
1076
  await this.transport.request("GET", path);
1034
1077
  }
1035
- /**
1036
- * Get Agent Session Port
1037
- *
1038
- * Return a preview link for a sandbox port.
1039
- *
1040
- * For a dev server running in the session's live sandbox: the
1041
- * same dashboard page as the IDE, deep-linked to the port.
1042
- *
1043
- * Backs `agent session port`.
1044
- */
1045
- async port(session_id, port) {
1046
- const path = `/sessions/${enc(session_id)}/ports/${enc(String(port))}`;
1047
- return await this.transport.request("GET", path);
1048
- }
1049
1078
  /**
1050
1079
  * Get Agent Session Records
1051
1080
  *
@@ -1059,7 +1088,7 @@ var EllipsisSessions = class {
1059
1088
  * client-side before they are ever uploaded).
1060
1089
  */
1061
1090
  async records(session_id, options = {}) {
1062
- const path = `/sessions/${enc(session_id)}/records`;
1091
+ const path = `/v1/sessions/${enc(session_id)}/records`;
1063
1092
  const query = buildQuery({ cursor: options.cursor, limit: options.limit });
1064
1093
  const response = await this.transport.request("GET", path, { query });
1065
1094
  return new Page(
@@ -1079,7 +1108,7 @@ var EllipsisSessions = class {
1079
1108
  * different model.
1080
1109
  */
1081
1110
  async replay(session_id, options = {}) {
1082
- const path = `/sessions/${enc(session_id)}/replay`;
1111
+ const path = `/v1/sessions/${enc(session_id)}/replay`;
1083
1112
  const body = buildBody({ config_id: options.config_id, config_override: options.config_override, config_override_yaml: options.config_override_yaml, prompt: options.prompt });
1084
1113
  return await this.transport.request("POST", path, { body });
1085
1114
  }
@@ -1097,7 +1126,7 @@ var EllipsisSessions = class {
1097
1126
  * (transcript).
1098
1127
  */
1099
1128
  async search(options = {}) {
1100
- const path = "/sessions/search";
1129
+ const path = "/v1/sessions/search";
1101
1130
  const query = buildQuery({ q: options.q, scope: options.scope, source: options.source, author_id: options.author_id, config_id: options.config_id, session_ids: options.session_ids, repo: options.repo, status: options.status, start: options.start, end: options.end, limit: options.limit });
1102
1131
  return await this.transport.request("GET", path, { query });
1103
1132
  }
@@ -1112,7 +1141,7 @@ var EllipsisSessions = class {
1112
1141
  * message.
1113
1142
  */
1114
1143
  async sendMessage(session_id, options) {
1115
- const path = `/sessions/${enc(session_id)}/messages`;
1144
+ const path = `/v1/sessions/${enc(session_id)}/messages`;
1116
1145
  const body = buildBody({ idempotency_key: options.idempotency_key, message: options.message });
1117
1146
  return await this.transport.request("POST", path, { body });
1118
1147
  }
@@ -1130,7 +1159,7 @@ var EllipsisSessions = class {
1130
1159
  * input schema and the request's input is absent or invalid.
1131
1160
  */
1132
1161
  async start(options = {}) {
1133
- const path = "/sessions";
1162
+ const path = "/v1/sessions";
1134
1163
  const body = buildBody({ config: options.config, config_id: options.config_id, config_override: options.config_override, config_override_yaml: options.config_override_yaml, force_rebuild: options.force_rebuild, handoff: options.handoff, idle_start: options.idle_start, input: options.input, metadata: options.metadata, prompt: options.prompt, repository: options.repository, template_id: options.template_id });
1135
1164
  return await this.transport.request("POST", path, { body });
1136
1165
  }
@@ -1143,7 +1172,7 @@ var EllipsisSessions = class {
1143
1172
  * to a GitHub account.
1144
1173
  */
1145
1174
  async stop(session_id) {
1146
- const path = `/sessions/${enc(session_id)}/stop`;
1175
+ const path = `/v1/sessions/${enc(session_id)}/stop`;
1147
1176
  return await this.transport.request("POST", path);
1148
1177
  }
1149
1178
  /**
@@ -1156,7 +1185,7 @@ var EllipsisSessions = class {
1156
1185
  * tokens are rejected with a 403 rather than silently attributed.
1157
1186
  */
1158
1187
  async sync(options) {
1159
- const path = "/sessions/sync";
1188
+ const path = "/v1/sessions/sync";
1160
1189
  const body = buildBody({ cc_session_id: options.cc_session_id, cwd: options.cwd, git_branch: options.git_branch, reason: options.reason, repo: options.repo, transcript_gzip_b64: options.transcript_gzip_b64 });
1161
1190
  return await this.transport.request("POST", path, { body });
1162
1191
  }
@@ -1205,7 +1234,7 @@ var Ellipsis = class {
1205
1234
  * Return the caller's current budget summary.
1206
1235
  */
1207
1236
  async budget() {
1208
- const path = "/budget";
1237
+ const path = "/v1/budget";
1209
1238
  return await this.transport.request("GET", path);
1210
1239
  }
1211
1240
  /**
@@ -1214,7 +1243,7 @@ var Ellipsis = class {
1214
1243
  * Return the identity behind the caller's credential.
1215
1244
  */
1216
1245
  async me() {
1217
- const path = "/me";
1246
+ const path = "/v1/me";
1218
1247
  return await this.transport.request("GET", path);
1219
1248
  }
1220
1249
  /**
@@ -1223,7 +1252,7 @@ var Ellipsis = class {
1223
1252
  * Return the caller's usage dashboard data.
1224
1253
  */
1225
1254
  async usage() {
1226
- const path = "/usage";
1255
+ const path = "/v1/usage";
1227
1256
  return await this.transport.request("GET", path);
1228
1257
  }
1229
1258
  };
@@ -1,4 +1,4 @@
1
- import { K as SessionRecord, r as Session, x as SessionMessage, X as StreamFrame } from '../types-BME-7Lbt.js';
1
+ import { K as SessionRecord, r as Session, x as SessionMessage, X as StreamFrame } from '../types-BN5YExTm.js';
2
2
 
3
3
  interface ChatToolNode {
4
4
  key: string;
@@ -1,4 +1,4 @@
1
- import { X as StreamFrame, r as Session } from '../types-BME-7Lbt.js';
1
+ import { X as StreamFrame, r as Session } from '../types-BN5YExTm.js';
2
2
 
3
3
  declare const SESSION_STREAM_PROTOCOL_VERSION = 3;
4
4
  declare const WS_CLOSE_NORMAL = 1000;