@macro-inc/sdk 0.0.1 → 0.2.2

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.
Files changed (165) hide show
  1. package/README.md +628 -21
  2. package/dist/{chunk-5HAKQN23.js → chunk-7LVVPVNT.js} +70 -57
  3. package/dist/{chunk-JXIQT5TH.js → chunk-7YJ6Y7HJ.js} +234 -16
  4. package/dist/chunk-LMJW65ML.js +836 -0
  5. package/dist/{chunk-SGAHIERJ.js → chunk-OGE7WXJE.js} +16 -0
  6. package/dist/chunk-PRUFPW3B.js +943 -0
  7. package/dist/{chunk-CTKR64MY.js → chunk-QVBNNMQS.js} +242 -367
  8. package/dist/{chunk-QNUS5BC5.js → chunk-SUINKDXF.js} +30 -84
  9. package/dist/{chunk-77EI4LSQ.js → chunk-ZQXOHNDB.js} +1518 -386
  10. package/dist/generated/agent-harness/index.d.ts +1 -1
  11. package/dist/generated/agent-harness/index.js +1 -1
  12. package/dist/generated/agent-harness/sdk.gen.d.ts +174 -4
  13. package/dist/generated/agent-harness/types.gen.d.ts +2511 -189
  14. package/dist/generated/auth/index.d.ts +1 -1
  15. package/dist/generated/auth/index.js +1 -1
  16. package/dist/generated/auth/sdk.gen.d.ts +106 -8
  17. package/dist/generated/auth/types.gen.d.ts +1473 -116
  18. package/dist/generated/calendar/client/client.gen.d.ts +2 -0
  19. package/dist/generated/calendar/client/index.d.ts +10 -0
  20. package/dist/generated/calendar/client/types.gen.d.ts +120 -0
  21. package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
  22. package/dist/generated/calendar/client.gen.d.ts +12 -0
  23. package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
  24. package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
  25. package/dist/generated/calendar/core/params.gen.d.ts +43 -0
  26. package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
  27. package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
  28. package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
  29. package/dist/generated/calendar/core/types.gen.d.ts +83 -0
  30. package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
  31. package/dist/generated/calendar/index.d.ts +2 -0
  32. package/dist/generated/calendar/index.js +6 -0
  33. package/dist/generated/calendar/sdk.gen.d.ts +95 -0
  34. package/dist/generated/calendar/types.gen.d.ts +1091 -0
  35. package/dist/generated/cognition/index.d.ts +1 -1
  36. package/dist/generated/cognition/index.js +1 -1
  37. package/dist/generated/cognition/sdk.gen.d.ts +6 -1
  38. package/dist/generated/cognition/types.gen.d.ts +304 -36
  39. package/dist/generated/connection/types.gen.d.ts +1 -1
  40. package/dist/generated/email/index.d.ts +1 -1
  41. package/dist/generated/email/index.js +1 -1
  42. package/dist/generated/email/sdk.gen.d.ts +32 -27
  43. package/dist/generated/email/types.gen.d.ts +586 -409
  44. package/dist/generated/notification/index.d.ts +1 -1
  45. package/dist/generated/notification/types.gen.d.ts +384 -19
  46. package/dist/generated/properties/types.gen.d.ts +8 -5
  47. package/dist/generated/scheduled-action/index.d.ts +1 -1
  48. package/dist/generated/scheduled-action/index.js +3 -842
  49. package/dist/generated/scheduled-action/sdk.gen.d.ts +3 -1
  50. package/dist/generated/scheduled-action/types.gen.d.ts +277 -41
  51. package/dist/generated/search/index.d.ts +1 -1
  52. package/dist/generated/search/types.gen.d.ts +262 -43
  53. package/dist/generated/storage/index.d.ts +1 -1
  54. package/dist/generated/storage/index.js +1 -1
  55. package/dist/generated/storage/sdk.gen.d.ts +678 -107
  56. package/dist/generated/storage/types.gen.d.ts +14827 -5995
  57. package/dist/generated/unfurl/index.d.ts +1 -1
  58. package/dist/generated/unfurl/index.js +3 -832
  59. package/dist/generated/unfurl/types.gen.d.ts +20 -0
  60. package/dist/src/config.d.ts +33 -13
  61. package/dist/src/entities/agent-sessions/agent-session.d.ts +150 -6
  62. package/dist/src/entities/agent-sessions/code-execution.d.ts +43 -0
  63. package/dist/src/entities/agent-sessions/conversation.d.ts +54 -0
  64. package/dist/src/entities/agent-sessions/namespace.d.ts +23 -5
  65. package/dist/src/entities/agent-sessions/queued-action.d.ts +46 -0
  66. package/dist/src/entities/agent-sessions/review.d.ts +107 -0
  67. package/dist/src/entities/agent-sessions/tool-approval.d.ts +21 -0
  68. package/dist/src/entities/agents/agent.d.ts +47 -0
  69. package/dist/src/entities/agents/namespace.d.ts +13 -0
  70. package/dist/src/entities/ai/namespace.d.ts +24 -0
  71. package/dist/src/entities/api-keys/api-key.d.ts +17 -0
  72. package/dist/src/entities/api-keys/namespace.d.ts +18 -0
  73. package/dist/src/entities/calendar/calendar.d.ts +35 -0
  74. package/dist/src/entities/calendar/event.d.ts +123 -0
  75. package/dist/src/entities/calendar/event.test.d.ts +1 -0
  76. package/dist/src/entities/calendar/namespace.d.ts +111 -0
  77. package/dist/src/entities/calendar/replacement.d.ts +15 -0
  78. package/dist/src/entities/calls/call-record.d.ts +62 -6
  79. package/dist/src/entities/calls/message.d.ts +33 -0
  80. package/dist/src/entities/channels/activity.d.ts +24 -0
  81. package/dist/src/entities/channels/channel.d.ts +44 -3
  82. package/dist/src/entities/channels/labels.d.ts +39 -0
  83. package/dist/src/entities/channels/message.d.ts +9 -17
  84. package/dist/src/entities/channels/namespace.d.ts +6 -0
  85. package/dist/src/entities/channels/picture.d.ts +11 -0
  86. package/dist/src/entities/channels/post.d.ts +1 -1
  87. package/dist/src/entities/channels/thread.d.ts +5 -0
  88. package/dist/src/entities/chats/chat.d.ts +11 -1
  89. package/dist/src/entities/chats/generation.d.ts +46 -0
  90. package/dist/src/entities/crm/comment.d.ts +55 -34
  91. package/dist/src/entities/crm/company.d.ts +42 -10
  92. package/dist/src/entities/crm/contact.d.ts +42 -10
  93. package/dist/src/entities/crm/namespace.d.ts +18 -1
  94. package/dist/src/entities/crm/pipeline.d.ts +122 -0
  95. package/dist/src/entities/crm/pipelines.d.ts +14 -0
  96. package/dist/src/entities/databases/column.d.ts +75 -0
  97. package/dist/src/entities/databases/database.d.ts +272 -0
  98. package/dist/src/entities/databases/namespace.d.ts +21 -0
  99. package/dist/src/entities/databases/query.d.ts +86 -0
  100. package/dist/src/entities/databases/row.d.ts +27 -0
  101. package/dist/src/entities/databases/table.d.ts +61 -0
  102. package/dist/src/entities/databases/view.d.ts +40 -0
  103. package/dist/src/entities/databases/webhook.d.ts +32 -0
  104. package/dist/src/entities/documents/anchor.d.ts +29 -0
  105. package/dist/src/entities/documents/comment.d.ts +25 -22
  106. package/dist/src/entities/documents/document.d.ts +60 -12
  107. package/dist/src/entities/documents/namespace.d.ts +30 -0
  108. package/dist/src/entities/documents/version.d.ts +22 -0
  109. package/dist/src/entities/email/draft.d.ts +79 -0
  110. package/dist/src/entities/email/filter.d.ts +34 -0
  111. package/dist/src/entities/email/link.d.ts +6 -4
  112. package/dist/src/entities/email/message.d.ts +12 -1
  113. package/dist/src/entities/email/namespace.d.ts +34 -1
  114. package/dist/src/entities/email/thread.d.ts +23 -1
  115. package/dist/src/entities/entity-mentions/mention.d.ts +16 -0
  116. package/dist/src/entities/entity-mentions/namespace.d.ts +12 -0
  117. package/dist/src/entities/entity.d.ts +7 -0
  118. package/dist/src/entities/favorites/namespace.d.ts +14 -2
  119. package/dist/src/entities/foreign/foreign-entity.d.ts +2 -0
  120. package/dist/src/entities/foreign/namespace.d.ts +40 -0
  121. package/dist/src/entities/forms/form.d.ts +227 -0
  122. package/dist/src/entities/forms/namespace.d.ts +18 -0
  123. package/dist/src/entities/forms/question.d.ts +37 -0
  124. package/dist/src/entities/forms/response.d.ts +32 -0
  125. package/dist/src/entities/forms/section.d.ts +19 -0
  126. package/dist/src/entities/github-pull-requests/namespace.d.ts +12 -0
  127. package/dist/src/entities/github-pull-requests/pull-request.d.ts +52 -0
  128. package/dist/src/entities/harnesses/harness.d.ts +19 -0
  129. package/dist/src/entities/harnesses/namespace.d.ts +33 -0
  130. package/dist/src/entities/harnesses/pairing.d.ts +39 -0
  131. package/dist/src/entities/initiatives/initiative.d.ts +50 -0
  132. package/dist/src/entities/initiatives/namespace.d.ts +13 -0
  133. package/dist/src/entities/meetings/meeting.d.ts +38 -0
  134. package/dist/src/entities/meetings/namespace.d.ts +18 -0
  135. package/dist/src/entities/messages/thread.d.ts +101 -0
  136. package/dist/src/entities/notifications/notification.d.ts +6 -3
  137. package/dist/src/entities/notifications/notification.test.d.ts +1 -0
  138. package/dist/src/entities/projects/project.d.ts +7 -0
  139. package/dist/src/entities/reference.d.ts +82 -0
  140. package/dist/src/entities/routines/namespace.d.ts +15 -0
  141. package/dist/src/entities/routines/routine.d.ts +115 -0
  142. package/dist/src/entities/sharing/access.d.ts +65 -0
  143. package/dist/src/entities/sharing/permissions.d.ts +13 -0
  144. package/dist/src/entities/tasks/namespace.d.ts +4 -0
  145. package/dist/src/entities/tasks/task.d.ts +6 -0
  146. package/dist/src/entities/unfurls/namespace.d.ts +10 -0
  147. package/dist/src/entities/webhooks/webhook.d.ts +3 -1
  148. package/dist/src/entities/workspace/items.d.ts +7 -0
  149. package/dist/src/entities/workspace/namespace.d.ts +83 -0
  150. package/dist/src/entities/workspace/query.d.ts +12 -0
  151. package/dist/src/entities/workspace/types.d.ts +96 -0
  152. package/dist/src/events/hydrate/agentSession.d.ts +192 -0
  153. package/dist/src/events/hydrate/channel.d.ts +2 -39
  154. package/dist/src/events/hydrate/message.d.ts +70 -0
  155. package/dist/src/events/receiver.d.ts +57 -19
  156. package/dist/src/events/types.d.ts +3 -1
  157. package/dist/src/macro.d.ts +80 -3
  158. package/dist/src/macro.js +8832 -2784
  159. package/dist/src/utils/activity.d.ts +11 -0
  160. package/dist/src/utils/activity.test.d.ts +1 -0
  161. package/dist/src/utils/client.d.ts +10 -1
  162. package/dist/src/utils/concurrency.d.ts +5 -0
  163. package/dist/src/utils/index.d.ts +1 -0
  164. package/dist/src/utils/pagination.d.ts +9 -4
  165. package/package.json +11 -3
@@ -1,9 +1,9 @@
1
- // generated/auth/core/bodySerializer.gen.ts
1
+ // generated/agent-harness/core/bodySerializer.gen.ts
2
2
  var jsonBodySerializer = {
3
3
  bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
4
4
  };
5
5
 
6
- // generated/auth/core/serverSentEvents.gen.ts
6
+ // generated/agent-harness/core/serverSentEvents.gen.ts
7
7
  function createSseClient({
8
8
  onRequest,
9
9
  onSseError,
@@ -130,7 +130,7 @@ function createSseClient({
130
130
  return { stream };
131
131
  }
132
132
 
133
- // generated/auth/core/pathSerializer.gen.ts
133
+ // generated/agent-harness/core/pathSerializer.gen.ts
134
134
  var separatorArrayExplode = (style) => {
135
135
  switch (style) {
136
136
  case "label":
@@ -254,7 +254,7 @@ var serializeObjectParam = ({
254
254
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
255
255
  };
256
256
 
257
- // generated/auth/core/utils.gen.ts
257
+ // generated/agent-harness/core/utils.gen.ts
258
258
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
259
259
  var defaultPathSerializer = ({ path, url: _url }) => {
260
260
  let url = _url;
@@ -351,7 +351,7 @@ function getValidRequestBody(options) {
351
351
  return void 0;
352
352
  }
353
353
 
354
- // generated/auth/core/auth.gen.ts
354
+ // generated/agent-harness/core/auth.gen.ts
355
355
  var getAuthToken = async (auth, callback) => {
356
356
  const token = typeof callback === "function" ? await callback(auth) : callback;
357
357
  if (!token) {
@@ -366,7 +366,7 @@ var getAuthToken = async (auth, callback) => {
366
366
  return token;
367
367
  };
368
368
 
369
- // generated/auth/client/utils.gen.ts
369
+ // generated/agent-harness/client/utils.gen.ts
370
370
  var createQuerySerializer = ({
371
371
  parameters = {},
372
372
  ...args
@@ -579,7 +579,7 @@ var createConfig = (override = {}) => ({
579
579
  ...override
580
580
  });
581
581
 
582
- // generated/auth/client/client.gen.ts
582
+ // generated/agent-harness/client/client.gen.ts
583
583
  var createClient = (config = {}) => {
584
584
  let _config = mergeConfigs(createConfig(), config);
585
585
  const getConfig = () => ({ ..._config });
@@ -774,10 +774,10 @@ var createClient = (config = {}) => {
774
774
  };
775
775
  };
776
776
 
777
- // generated/auth/client.gen.ts
777
+ // generated/agent-harness/client.gen.ts
778
778
  var client = createClient(createConfig());
779
779
 
780
- // generated/auth/sdk.gen.ts
780
+ // generated/agent-harness/sdk.gen.ts
781
781
  var HeyApiClient = class {
782
782
  client;
783
783
  constructor(args) {
@@ -805,38 +805,31 @@ var Sdk = class _Sdk extends HeyApiClient {
805
805
  _Sdk.__registry.set(this, args?.key);
806
806
  }
807
807
  /**
808
- * Forgets the caller's Cursor API key.
809
- *
810
- * This does **not** revoke the key at Cursor — it keeps working everywhere
811
- * else it is used, and only Cursor can revoke it. Any UI offering this has to
812
- * say so rather than implying otherwise.
813
- *
814
- * Deleting when there is nothing to delete succeeds: the caller's intent is
815
- * "I should have no key registered", and that is already true.
808
+ * Probe one provider's ACP session configuration without persisting a session.
816
809
  */
817
- deleteCursorApiKey(options) {
818
- return (options?.client ?? this.client).delete({ url: "/cursor-api-key", ...options });
810
+ discoverAgentCapabilitiesHandler(options) {
811
+ return (options.client ?? this.client).post({
812
+ security: [{ scheme: "bearer", type: "http" }],
813
+ url: "/agent-capabilities/discover",
814
+ ...options,
815
+ headers: {
816
+ "Content-Type": "application/json",
817
+ ...options.headers
818
+ }
819
+ });
819
820
  }
820
821
  /**
821
- * Whether the caller has a Cursor API key registered.
822
- *
823
- * Never returns the key, or any part of it. There is no screen that needs one,
824
- * and a masked key still leaks its length and alphabet.
822
+ * Read what the caller's new coding sessions are told to do beyond their assignment.
825
823
  */
826
- getCursorApiKey(options) {
827
- return (options?.client ?? this.client).get({ url: "/cursor-api-key", ...options });
824
+ getAgentCodingPreferences(options) {
825
+ return (options?.client ?? this.client).get({ url: "/agent-coding-preferences", ...options });
828
826
  }
829
827
  /**
830
- * Registers or replaces the caller's Cursor API key.
831
- *
832
- * The key is validated on shape alone — this cannot distinguish a live key
833
- * from forty random characters behind the right prefix. Confirming it against
834
- * Cursor's `GET /v1/me` is the obvious improvement, and is what would let this
835
- * report the connected account rather than only that a key exists.
828
+ * Replace the caller's coding preferences.
836
829
  */
837
- putCursorApiKey(options) {
830
+ putAgentCodingPreferences(options) {
838
831
  return (options.client ?? this.client).put({
839
- url: "/cursor-api-key",
832
+ url: "/agent-coding-preferences",
840
833
  ...options,
841
834
  headers: {
842
835
  "Content-Type": "application/json",
@@ -845,17 +838,23 @@ var Sdk = class _Sdk extends HeyApiClient {
845
838
  });
846
839
  }
847
840
  /**
848
- * Verifies the user's primary email for FusionAuth
841
+ * The agent conversations in a channel the caller may see. Ordinary channels
842
+ * and other people's conversations list none.
849
843
  */
850
- verifyFusionauthUserEmail(options) {
851
- return (options.client ?? this.client).get({ url: "/email/fusionauth/verify/{verification_id}", ...options });
844
+ listAgentConversations(options) {
845
+ return (options.client ?? this.client).get({
846
+ security: [{ scheme: "bearer", type: "http" }],
847
+ url: "/agent-conversations/{channel_id}",
848
+ ...options
849
+ });
852
850
  }
853
851
  /**
854
- * Resend the user's primary email verification for FusionAuth
852
+ * Start a fresh agent context, retaining the channel transcript.
855
853
  */
856
- resendFusionauthVerifyUserEmail(options) {
854
+ startFreshAgentConversation(options) {
857
855
  return (options.client ?? this.client).post({
858
- url: "/email/fusionauth_resend",
856
+ security: [{ scheme: "bearer", type: "http" }],
857
+ url: "/agent-conversations/{channel_id}/{bot_id}/start-fresh",
859
858
  ...options,
860
859
  headers: {
861
860
  "Content-Type": "application/json",
@@ -864,11 +863,12 @@ var Sdk = class _Sdk extends HeyApiClient {
864
863
  });
865
864
  }
866
865
  /**
867
- * Generates an email link for the user to verify their email address.
866
+ * Explicitly retry a failed message in the conversation's current session.
868
867
  */
869
- generateEmailLink(options) {
868
+ retryAgentConversationTurn(options) {
870
869
  return (options.client ?? this.client).post({
871
- url: "/email/generate/link",
870
+ security: [{ scheme: "bearer", type: "http" }],
871
+ url: "/agent-conversations/{channel_id}/{bot_id}/turns/{source}/retry",
872
872
  ...options,
873
873
  headers: {
874
874
  "Content-Type": "application/json",
@@ -877,17 +877,12 @@ var Sdk = class _Sdk extends HeyApiClient {
877
877
  });
878
878
  }
879
879
  /**
880
- * Verifies the user's email for a user profile
881
- */
882
- verifyEmailLink(options) {
883
- return (options.client ?? this.client).get({ url: "/email/verify/{verification_id}", ...options });
884
- }
885
- /**
886
- * Enriches GitHub pull request references with live GitHub data for the authenticated user.
880
+ * Probe one provider's model catalog without creating an agent session.
887
881
  */
888
- enrichGithubPullRequests(options) {
882
+ loadAgentModelsHandler(options) {
889
883
  return (options.client ?? this.client).post({
890
- url: "/github_pull_requests/enrich",
884
+ security: [{ scheme: "bearer", type: "http" }],
885
+ url: "/agent-models/load",
891
886
  ...options,
892
887
  headers: {
893
888
  "Content-Type": "application/json",
@@ -896,80 +891,56 @@ var Sdk = class _Sdk extends HeyApiClient {
896
891
  });
897
892
  }
898
893
  /**
899
- * Health check
900
- */
901
- healthHandler(options) {
902
- return (options?.client ?? this.client).get({ url: "/health", ...options });
903
- }
904
- /**
905
- * Generates a macro-api-token using the user's macro-access-token
906
- * You can either have your access token in the cookies or in the request
907
- * headers
908
- * Authorization: Bearer <access_token>
909
- * This returns a new macro-api-token
910
- */
911
- macroApiToken(options) {
912
- return (options.client ?? this.client).get({ url: "/jwt/macro_api_token", ...options });
913
- }
914
- /**
915
- * Refreshes a JWT token
916
- * You can either have your access token and refresh token in the cookies or in the request
917
- * headers
918
- * Authorization: Bearer <access_token>
919
- * x-macro-refresh-token: <refresh_token>
920
- * This returns the cookies with the new access and refresh token
921
- */
922
- refresh(options) {
923
- return (options?.client ?? this.client).post({ url: "/jwt/refresh", ...options });
924
- }
925
- /**
926
- * Initiates a link for a user
894
+ * List the GitHub repositories the caller can select for a coding session.
927
895
  */
928
- createInProgressLink(options) {
929
- return (options?.client ?? this.client).post({ url: "/link", ...options });
930
- }
931
- /**
932
- * Deletes a github link for a user
933
- */
934
- deleteGithubLink(options) {
935
- return (options?.client ?? this.client).delete({ url: "/link/github", ...options });
936
- }
937
- /**
938
- * Initiates a link for a user
939
- */
940
- initGithubLink(options) {
941
- return (options.client ?? this.client).post({ url: "/link/github", ...options });
942
- }
943
- /**
944
- * Checks whether the authenticated user's GitHub link token is valid.
945
- */
946
- checkGithubLinkStatus(options) {
947
- return (options?.client ?? this.client).get({ url: "/link/github/status", ...options });
896
+ listAgentRepositories(options) {
897
+ return (options?.client ?? this.client).get({
898
+ security: [{ scheme: "bearer", type: "http" }],
899
+ url: "/agent-repositories",
900
+ ...options
901
+ });
948
902
  }
949
903
  /**
950
- * Initiates a Gmail link for a user
904
+ * List the branches on one repository the caller can start a session from.
951
905
  */
952
- initGmailLink(options) {
953
- return (options.client ?? this.client).post({ url: "/link/gmail", ...options });
906
+ listAgentRepositoryBranches(options) {
907
+ return (options.client ?? this.client).get({
908
+ security: [{ scheme: "bearer", type: "http" }],
909
+ url: "/agent-repositories/branches",
910
+ ...options
911
+ });
954
912
  }
955
913
  /**
956
- * Checks whether the authenticated user's gmail link is valid.
914
+ * Read the caller's default sandbox size for new `@coder` sessions.
957
915
  */
958
- checkGmailLinkStatus(options) {
959
- return (options?.client ?? this.client).get({ url: "/link/gmail/status", ...options });
916
+ getAgentSandboxSize(options) {
917
+ return (options?.client ?? this.client).get({ url: "/agent-sandbox-size", ...options });
960
918
  }
961
919
  /**
962
- * Initiates a Microsoft Outlook account link for an authenticated user.
920
+ * Set the caller's default sandbox size for the next `@coder` mention.
963
921
  */
964
- initOutlookLink(options) {
965
- return (options?.client ?? this.client).post({ url: "/link/outlook", ...options });
922
+ putAgentSandboxSize(options) {
923
+ return (options.client ?? this.client).put({
924
+ url: "/agent-sandbox-size",
925
+ ...options,
926
+ headers: {
927
+ "Content-Type": "application/json",
928
+ ...options.headers
929
+ }
930
+ });
966
931
  }
967
932
  /**
968
- * Completes the apple login flow
933
+ * Open an agent session served by an external runtime.
934
+ *
935
+ * Nothing here tells the runtime where to dial: one connection per bot
936
+ * carries every session it runs, so a runtime that has already dialed serves
937
+ * this session too, and one that has not dials the gateway its own
938
+ * configuration names. The triggering mention reaches the session as its
939
+ * first prompt through the control endpoint.
969
940
  */
970
- appleLogin(options) {
941
+ createAgentSession(options) {
971
942
  return (options.client ?? this.client).post({
972
- url: "/login/apple",
943
+ url: "/agent-sessions",
973
944
  ...options,
974
945
  headers: {
975
946
  "Content-Type": "application/json",
@@ -978,11 +949,11 @@ var Sdk = class _Sdk extends HeyApiClient {
978
949
  });
979
950
  }
980
951
  /**
981
- * Performs a password login
952
+ * List the sessions associated with a pull request that the caller can view.
982
953
  */
983
- passwordLogin(options) {
954
+ agentSessionsForPullRequest(options) {
984
955
  return (options.client ?? this.client).post({
985
- url: "/login/password",
956
+ url: "/agent-sessions/by-pull-request",
986
957
  ...options,
987
958
  headers: {
988
959
  "Content-Type": "application/json",
@@ -991,11 +962,12 @@ var Sdk = class _Sdk extends HeyApiClient {
991
962
  });
992
963
  }
993
964
  /**
994
- * Initiates a passwordless login
965
+ * List the sessions associated with each of up to 100 pull requests that the caller can view,
966
+ * with the thread each session was started from.
995
967
  */
996
- passwordlessLogin(options) {
968
+ agentSessionsForPullRequests(options) {
997
969
  return (options.client ?? this.client).post({
998
- url: "/login/passwordless",
970
+ url: "/agent-sessions/by-pull-requests",
999
971
  ...options,
1000
972
  headers: {
1001
973
  "Content-Type": "application/json",
@@ -1004,26 +976,16 @@ var Sdk = class _Sdk extends HeyApiClient {
1004
976
  });
1005
977
  }
1006
978
  /**
1007
- * Initiates an SSO login
1008
- */
1009
- ssoLogin(options) {
1010
- return (options.client ?? this.client).get({ url: "/login/sso", ...options });
1011
- }
1012
- /**
1013
- * Initiates a passwordless login
1014
- */
1015
- logout(options) {
1016
- return (options?.client ?? this.client).post({ url: "/logout", ...options });
1017
- }
1018
- /**
1019
- * Creates a merge request used to verify the user's email address in order to merge their
1020
- * accounts.
1021
- * This is different than generate_email_link which is used to verify a new email address to add a
1022
- * new profile to a user's account.
979
+ * Preview a batch of agent sessions for rendering chips.
980
+ *
981
+ * No per-id access extractor: a chip has to render for a session the caller
982
+ * cannot open, so access is answered per id in the body rather than
983
+ * enforced on the request. The caller learns the fields a chip shows for
984
+ * sessions they may view, and only existence for the rest.
1023
985
  */
1024
- createMergeRequest(options) {
986
+ previewAgentSessions(options) {
1025
987
  return (options.client ?? this.client).post({
1026
- url: "/merge",
988
+ url: "/agent-sessions/preview",
1027
989
  ...options,
1028
990
  headers: {
1029
991
  "Content-Type": "application/json",
@@ -1032,19 +994,11 @@ var Sdk = class _Sdk extends HeyApiClient {
1032
994
  });
1033
995
  }
1034
996
  /**
1035
- * Verifies the merge request
1036
- */
1037
- verifyMergeRequest(options) {
1038
- return (options.client ?? this.client).get({ url: "/merge/verify/{code}", ...options });
1039
- }
1040
- /**
1041
- * Enrolls a mobile lead in the Loops nurture sequence, which sends the welcome
1042
- * email inviting them to register on desktop. No-ops if the address was already
1043
- * enrolled, and rejects blocked addresses.
997
+ * Prepare MCP connections without sending a prompt or creating a visible list row.
1044
998
  */
1045
- sendMobileWelcomeEmail(options) {
999
+ warmAgentSessionHandler(options) {
1046
1000
  return (options.client ?? this.client).post({
1047
- url: "/mobile-welcome-email",
1001
+ url: "/agent-sessions/warm",
1048
1002
  ...options,
1049
1003
  headers: {
1050
1004
  "Content-Type": "application/json",
@@ -1053,51 +1007,28 @@ var Sdk = class _Sdk extends HeyApiClient {
1053
1007
  });
1054
1008
  }
1055
1009
  /**
1056
- * Handles oauth redirect
1010
+ * Delete an agent session and its live resources.
1057
1011
  */
1058
- passwordlessCallback(options) {
1059
- return (options.client ?? this.client).get({ url: "/oauth/passwordless/{code}", ...options });
1012
+ deleteAgentSession(options) {
1013
+ return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}", ...options });
1060
1014
  }
1061
1015
  /**
1062
- * Handles oauth redirect
1063
- */
1064
- oauthRedirect(options) {
1065
- return (options?.client ?? this.client).get({ url: "/oauth/redirect", ...options });
1066
- }
1067
- /**
1068
- * Custom OAuth2 callback
1069
- */
1070
- oauth2Callback(options) {
1071
- return (options.client ?? this.client).get({ url: "/oauth2/{provider}/callback", ...options });
1072
- }
1073
- /**
1074
- * Gets all permissions
1075
- */
1076
- getPermissions(options) {
1077
- return (options?.client ?? this.client).get({ url: "/permissions", ...options });
1078
- }
1079
- /**
1080
- * Gets a list of the users permissions
1081
- */
1082
- getUserPermissions(options) {
1083
- return (options?.client ?? this.client).get({ url: "/permissions/me", ...options });
1084
- }
1085
- /**
1086
- * Handler for `GET /referral-code`.
1016
+ * Get an agent session by id.
1087
1017
  *
1088
- * Returns the authenticated user's referral code.
1018
+ * A caller holding no grant is answered 401; an id with no session behind it
1019
+ * at all is answered 404. They used to be the same answer, which left a
1020
+ * client that read a session before its create had landed unable to tell a
1021
+ * race it should retry from a refusal it should not.
1089
1022
  */
1090
- getReferralCode(options) {
1091
- return (options?.client ?? this.client).get({ url: "/referral/code", ...options });
1023
+ getAgentSession(options) {
1024
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}", ...options });
1092
1025
  }
1093
1026
  /**
1094
- * Handler for `POST /referral/send`.
1095
- *
1096
- * Sends a referral code via email to a user
1027
+ * Archive or unarchive an agent session.
1097
1028
  */
1098
- sendReferralCode(options) {
1099
- return (options.client ?? this.client).post({
1100
- url: "/referral/send",
1029
+ setAgentSessionArchived(options) {
1030
+ return (options.client ?? this.client).put({
1031
+ url: "/agent-sessions/{session_id}/archived",
1101
1032
  ...options,
1102
1033
  headers: {
1103
1034
  "Content-Type": "application/json",
@@ -1106,50 +1037,50 @@ var Sdk = class _Sdk extends HeyApiClient {
1106
1037
  });
1107
1038
  }
1108
1039
  /**
1109
- * Refreshes a JWT token
1040
+ * The latest captured changes of an agent session: the changed files with
1041
+ * statuses and line counts, and how the latest capture attempt went.
1110
1042
  */
1111
- sessionCreation(options) {
1112
- return (options?.client ?? this.client).post({ url: "/session", ...options });
1043
+ getAgentSessionChanges(options) {
1044
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/changes", ...options });
1113
1045
  }
1114
1046
  /**
1115
- * Performs a login via session code
1047
+ * The unified diff behind the session's latest changeset.
1116
1048
  */
1117
- sessionLogin(options) {
1118
- return (options.client ?? this.client).get({ url: "/session/login/{session_code}", ...options });
1049
+ getAgentSessionChangesPatch(options) {
1050
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/changes/patch", ...options });
1119
1051
  }
1120
1052
  /**
1121
- * Deletes a team.
1122
- * This will update all team members roles and cancel your subscription for the team.
1123
- * This action is **irreversible** and you will not be able to recover the team afterwards.
1053
+ * Capture the session's changes again now. Answers at once with the state
1054
+ * as it stands; the capture runs on and viewers are told when it lands.
1124
1055
  */
1125
- deleteTeam(options) {
1126
- return (options?.client ?? this.client).delete({ url: "/team", ...options });
1056
+ refreshAgentSessionChanges(options) {
1057
+ return (options.client ?? this.client).post({ url: "/agent-sessions/{session_id}/changes/refresh", ...options });
1127
1058
  }
1128
1059
  /**
1129
- * Gets a team by ID.
1060
+ * Fetch one execution only after the caller has obtained view access to its session.
1130
1061
  */
1131
- getTeam(options) {
1132
- return (options?.client ?? this.client).get({ url: "/team", ...options });
1062
+ getCodeExecution(options) {
1063
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}", ...options });
1133
1064
  }
1134
1065
  /**
1135
- * Updates a team.
1066
+ * List blocks created during an execution, including interrupted executions.
1136
1067
  */
1137
- patchTeam(options) {
1138
- return (options.client ?? this.client).patch({
1139
- url: "/team",
1140
- ...options,
1141
- headers: {
1142
- "Content-Type": "application/json",
1143
- ...options.headers
1144
- }
1145
- });
1068
+ listExecutionReviews(options) {
1069
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/code-executions/{execution_id}/reviews", ...options });
1146
1070
  }
1147
1071
  /**
1148
- * Creates a new team.
1072
+ * Perform a control operation on a live agent session.
1073
+ *
1074
+ * Edit access suffices: whoever can prompt the bot through its thread can
1075
+ * prompt it here.
1076
+ *
1077
+ * A caller may name the action with `actionId`; the response echoes it.
1078
+ * Re-posting an id the session still holds queued or in flight reports that
1079
+ * action's status rather than accepting a duplicate.
1149
1080
  */
1150
- createTeam(options) {
1081
+ controlAgentSession(options) {
1151
1082
  return (options.client ?? this.client).post({
1152
- url: "/team",
1083
+ url: "/agent-sessions/{session_id}/control",
1153
1084
  ...options,
1154
1085
  headers: {
1155
1086
  "Content-Type": "application/json",
@@ -1158,30 +1089,24 @@ var Sdk = class _Sdk extends HeyApiClient {
1158
1089
  });
1159
1090
  }
1160
1091
  /**
1161
- * Toggles automatic domain joining for the team. When the team has no
1162
- * auto-join domain, sets it to the team owner's email domain — rejected
1163
- * with a 400 when that domain is a generic email provider domain (e.g.
1164
- * gmail.com). When one is already set, removes it. New users whose email
1165
- * domain matches a team's auto-join domain are added to that team on
1166
- * signup. Requires the caller to be an Admin or Owner of the team.
1092
+ * The raw protocol log of one agent session.
1093
+ *
1094
+ * Served unfolded from the latest successful load initialization, or the
1095
+ * beginning when no load succeeded. Consumers stage load attempts so failed
1096
+ * or interrupted replay does not become visible conversation content.
1097
+ *
1098
+ * An unknown session is an error: the response has to name the session's
1099
+ * agent, and a session that never existed has none to name.
1167
1100
  */
1168
- toggleTeamAutoJoinDomain(options) {
1169
- return (options?.client ?? this.client).post({ url: "/team/auto-join-domain/toggle", ...options });
1101
+ getAgentSessionLog(options) {
1102
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/log", ...options });
1170
1103
  }
1171
1104
  /**
1172
- * Enables or disables CRM for the team. On enable with `backfill`
1173
- * (the default), kicks off a best-effort backfill that enqueues a
1174
- * `PopulateCrmForUser` message per team member (no-op if CRM is
1175
- * already enabled); without `backfill` the CRM starts empty and fills
1176
- * from new activity only. On disable,
1177
- * flips the flag and purges the team's CRM data (cascading through
1178
- * `crm_companies` → `crm_domains` / `crm_contacts` /
1179
- * `crm_contact_sources`). Requires the caller to be an Admin or
1180
- * Owner of the team.
1105
+ * Rename an agent session.
1181
1106
  */
1182
- patchTeamCrmSettings(options) {
1183
- return (options.client ?? this.client).patch({
1184
- url: "/team/crm",
1107
+ renameAgentSession(options) {
1108
+ return (options.client ?? this.client).put({
1109
+ url: "/agent-sessions/{session_id}/name",
1185
1110
  ...options,
1186
1111
  headers: {
1187
1112
  "Content-Type": "application/json",
@@ -1190,11 +1115,17 @@ var Sdk = class _Sdk extends HeyApiClient {
1190
1115
  });
1191
1116
  }
1192
1117
  /**
1193
- * Invites a user to a team.
1118
+ * Read sharing settings for a session the caller can view.
1194
1119
  */
1195
- inviteToTeam(options) {
1196
- return (options.client ?? this.client).post({
1197
- url: "/team/invite",
1120
+ getAgentSessionPermissions(options) {
1121
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/permissions", ...options });
1122
+ }
1123
+ /**
1124
+ * Update link, channel, or team sharing after owner authorization.
1125
+ */
1126
+ updateAgentSessionPermissions(options) {
1127
+ return (options.client ?? this.client).patch({
1128
+ url: "/agent-sessions/{session_id}/permissions",
1198
1129
  ...options,
1199
1130
  headers: {
1200
1131
  "Content-Type": "application/json",
@@ -1203,62 +1134,50 @@ var Sdk = class _Sdk extends HeyApiClient {
1203
1134
  });
1204
1135
  }
1205
1136
  /**
1206
- * Deletes a team invite from a team.
1207
- */
1208
- deleteTeamInviteHandler(options) {
1209
- return (options.client ?? this.client).delete({ url: "/team/invite/{team_invite_id}", ...options });
1210
- }
1211
- /**
1212
- * Gets all invites for a team.
1213
- */
1214
- getTeamInvites(options) {
1215
- return (options?.client ?? this.client).get({ url: "/team/invites", ...options });
1216
- }
1217
- /**
1218
- * Rejects an invitation to join a team.
1219
- */
1220
- rejectInvitation(options) {
1221
- return (options.client ?? this.client).delete({ url: "/team/join/{team_invite_id}", ...options });
1222
- }
1223
- /**
1224
- * Joins a team by accepting an invite.
1137
+ * Unlink a pull request a person linked to a session the caller can edit. The pull request
1138
+ * the session's agent opened stays linked.
1225
1139
  */
1226
- joinTeam(options) {
1227
- return (options.client ?? this.client).get({ url: "/team/join/{team_invite_id}", ...options });
1140
+ unlinkAgentSessionPullRequest(options) {
1141
+ return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}/pull-requests", ...options });
1228
1142
  }
1229
1143
  /**
1230
- * Toggles whether non-admin members may invite users to the team. Teams
1231
- * start with this on (any member can invite); turning it off restricts
1232
- * inviting to team admins and owners. Requires the caller to be an Admin
1233
- * or Owner of the team.
1144
+ * List the pull requests associated with a session the caller can view.
1234
1145
  */
1235
- toggleTeamNonAdminInvites(options) {
1236
- return (options?.client ?? this.client).post({ url: "/team/non-admin-invites/toggle", ...options });
1146
+ listAgentSessionPullRequests(options) {
1147
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/pull-requests", ...options });
1237
1148
  }
1238
1149
  /**
1239
- * Removes a user from a team.
1150
+ * Link a pull request to a session the caller can edit.
1240
1151
  */
1241
- removeUserFromTeam(options) {
1242
- return (options.client ?? this.client).delete({ url: "/team/remove/{remove_user_id}", ...options });
1152
+ linkAgentSessionPullRequest(options) {
1153
+ return (options.client ?? this.client).put({
1154
+ url: "/agent-sessions/{session_id}/pull-requests",
1155
+ ...options,
1156
+ headers: {
1157
+ "Content-Type": "application/json",
1158
+ ...options.headers
1159
+ }
1160
+ });
1243
1161
  }
1244
1162
  /**
1245
- * Gets all teams for the authenticated user.
1163
+ * The actions waiting to dispatch in this session, oldest first.
1246
1164
  */
1247
- getUserTeams(options) {
1248
- return (options?.client ?? this.client).get({ url: "/team/user", ...options });
1165
+ getAgentSessionQueue(options) {
1166
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/queue", ...options });
1249
1167
  }
1250
1168
  /**
1251
- * Gets all of a user's invitations.
1169
+ * Remove a queued action before it dispatches. There is no un-sending: an
1170
+ * action that already went out answers 404.
1252
1171
  */
1253
- getUserInvites(options) {
1254
- return (options?.client ?? this.client).get({ url: "/team/user/invites", ...options });
1172
+ removeQueuedAction(options) {
1173
+ return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}/queue/{action_id}", ...options });
1255
1174
  }
1256
1175
  /**
1257
- * Creates a new user.
1176
+ * Replace a queued prompt's text before it dispatches.
1258
1177
  */
1259
- createUser(options) {
1260
- return (options.client ?? this.client).post({
1261
- url: "/user",
1178
+ editQueuedAction(options) {
1179
+ return (options.client ?? this.client).put({
1180
+ url: "/agent-sessions/{session_id}/queue/{action_id}",
1262
1181
  ...options,
1263
1182
  headers: {
1264
1183
  "Content-Type": "application/json",
@@ -1267,11 +1186,18 @@ var Sdk = class _Sdk extends HeyApiClient {
1267
1186
  });
1268
1187
  }
1269
1188
  /**
1270
- * Retrieves user names in bulk
1189
+ * Run a queued action next. Moves it ahead of the rest of the queue and
1190
+ * cancels the turn in flight, so this entry dispatches when that turn ends.
1271
1191
  */
1272
- getUserNames(options) {
1192
+ steerQueuedAction(options) {
1193
+ return (options.client ?? this.client).post({ url: "/agent-sessions/{session_id}/queue/{action_id}/steer", ...options });
1194
+ }
1195
+ /**
1196
+ * Persist a review without keeping the agent turn blocked.
1197
+ */
1198
+ createSessionReview(options) {
1273
1199
  return (options.client ?? this.client).post({
1274
- url: "/user/get_names",
1200
+ url: "/agent-sessions/{session_id}/reviews",
1275
1201
  ...options,
1276
1202
  headers: {
1277
1203
  "Content-Type": "application/json",
@@ -1280,11 +1206,17 @@ var Sdk = class _Sdk extends HeyApiClient {
1280
1206
  });
1281
1207
  }
1282
1208
  /**
1283
- * Gets names for passed user profile ids, falling back to the requesting user's email contact names
1209
+ * Read a persisted interactive block.
1284
1210
  */
1285
- getUserNamesWithEmail(options) {
1211
+ getSessionReview(options) {
1212
+ return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/reviews/{review_id}", ...options });
1213
+ }
1214
+ /**
1215
+ * Save edits or atomically claim the exact draft revision the user submitted.
1216
+ */
1217
+ decideSessionReview(options) {
1286
1218
  return (options.client ?? this.client).post({
1287
- url: "/user/get_names_with_email",
1219
+ url: "/agent-sessions/{session_id}/reviews/{review_id}",
1288
1220
  ...options,
1289
1221
  headers: {
1290
1222
  "Content-Type": "application/json",
@@ -1293,11 +1225,11 @@ var Sdk = class _Sdk extends HeyApiClient {
1293
1225
  });
1294
1226
  }
1295
1227
  /**
1296
- * Updates the user's group.
1228
+ * Resize this session's sandbox and remember the size as the owner's default.
1297
1229
  */
1298
- patchUserGroup(options) {
1299
- return (options.client ?? this.client).patch({
1300
- url: "/user/group",
1230
+ putAgentSessionSandboxSize(options) {
1231
+ return (options.client ?? this.client).put({
1232
+ url: "/agent-sessions/{session_id}/sandbox-size",
1301
1233
  ...options,
1302
1234
  headers: {
1303
1235
  "Content-Type": "application/json",
@@ -1306,50 +1238,13 @@ var Sdk = class _Sdk extends HeyApiClient {
1306
1238
  });
1307
1239
  }
1308
1240
  /**
1309
- * Gets the calling user's info which matches what was given in the **deprecated**
1310
- * getUserPermissions query in our graphql api.
1311
- * This will eventually be removed and optimized to use smaller calls that grab
1312
- * what is needed for various parts of the UI.
1241
+ * Answer a tool call the agent made in a turn somebody other than the
1242
+ * session's owner prompted. Approve and deny are the owner's; cancel is
1243
+ * anyone's with edit access.
1313
1244
  */
1314
- getLegacyUserPermissions(options) {
1315
- return (options?.client ?? this.client).get({ url: "/user/legacy_user_permissions", ...options });
1316
- }
1317
- /**
1318
- * Returns whether or not a given idp link exists for a user
1319
- */
1320
- getUserLinkExists(options) {
1321
- return (options.client ?? this.client).get({ url: "/user/link_exists", ...options });
1322
- }
1323
- /**
1324
- * Deletes the user who calls this endpoint
1325
- */
1326
- deleteUser(options) {
1327
- return (options?.client ?? this.client).delete({ url: "/user/me", ...options });
1328
- }
1329
- /**
1330
- * Gets the calling user's info
1331
- */
1332
- getUserInfo(options) {
1333
- return (options?.client ?? this.client).get({ url: "/user/me", ...options });
1334
- }
1335
- /**
1336
- * Retrieves the name of a particular user.
1337
- */
1338
- getUserName(options) {
1339
- return (options?.client ?? this.client).get({ url: "/user/name", ...options });
1340
- }
1341
- /**
1342
- * Sets the name of a particular user
1343
- */
1344
- putUserName(options) {
1345
- return (options?.client ?? this.client).put({ url: "/user/name", ...options });
1346
- }
1347
- /**
1348
- * Updates the user's onboarding.
1349
- */
1350
- patchUserOnboarding(options) {
1351
- return (options.client ?? this.client).patch({
1352
- url: "/user/onboarding",
1245
+ answerAgentSessionToolApproval(options) {
1246
+ return (options.client ?? this.client).post({
1247
+ url: "/agent-sessions/{session_id}/tool-approvals/{approval_id}",
1353
1248
  ...options,
1354
1249
  headers: {
1355
1250
  "Content-Type": "application/json",
@@ -1358,24 +1253,12 @@ var Sdk = class _Sdk extends HeyApiClient {
1358
1253
  });
1359
1254
  }
1360
1255
  /**
1361
- * Retrieves the users organization if present.
1362
- * Returns NO_CONTENT if the user is a not part of an organization.
1256
+ * Forget only the authenticated user's grant and cancel pending consent.
1363
1257
  */
1364
- getUserOrganization(options) {
1365
- return (options?.client ?? this.client).get({ url: "/user/organization", ...options });
1366
- }
1367
- /**
1368
- * Sets the profile picture URL for a particular user
1369
- */
1370
- putProfilePicture(options) {
1371
- return (options.client ?? this.client).put({ url: "/user/profile_picture", ...options });
1372
- }
1373
- /**
1374
- * Retrieves profile picture URLs for a list of users
1375
- */
1376
- postProfilePictures(options) {
1377
- return (options.client ?? this.client).post({
1378
- url: "/user/profile_pictures",
1258
+ disconnect(options) {
1259
+ return (options.client ?? this.client).delete({
1260
+ security: [{ scheme: "bearer", type: "http" }],
1261
+ url: "/claude-auth",
1379
1262
  ...options,
1380
1263
  headers: {
1381
1264
  "Content-Type": "application/json",
@@ -1384,31 +1267,22 @@ var Sdk = class _Sdk extends HeyApiClient {
1384
1267
  });
1385
1268
  }
1386
1269
  /**
1387
- * Retrieves the users quota.
1388
- * Returns NO_CONTENT if the user is a premium user with no quota.
1389
- */
1390
- getUserQuota(options) {
1391
- return (options?.client ?? this.client).get({ url: "/user/quota", ...options });
1392
- }
1393
- /**
1394
- * Creates a Stripe checkout session for the user to subscribe.
1270
+ * Read connection status for the authenticated user only.
1395
1271
  */
1396
- createCheckoutSessionV2(options) {
1397
- return (options.client ?? this.client).post({
1398
- url: "/user/stripe/checkoutv2",
1399
- ...options,
1400
- headers: {
1401
- "Content-Type": "application/json",
1402
- ...options.headers
1403
- }
1272
+ status(options) {
1273
+ return (options?.client ?? this.client).get({
1274
+ security: [{ scheme: "bearer", type: "http" }],
1275
+ url: "/claude-auth",
1276
+ ...options
1404
1277
  });
1405
1278
  }
1406
1279
  /**
1407
- * Creates a Stripe billing portal session.
1280
+ * Exchange one code; never return access or refresh tokens.
1408
1281
  */
1409
- createPortalSession(options) {
1282
+ complete(options) {
1410
1283
  return (options.client ?? this.client).post({
1411
- url: "/user/stripe/portal",
1284
+ security: [{ scheme: "bearer", type: "http" }],
1285
+ url: "/claude-auth/complete",
1412
1286
  ...options,
1413
1287
  headers: {
1414
1288
  "Content-Type": "application/json",
@@ -1417,11 +1291,12 @@ var Sdk = class _Sdk extends HeyApiClient {
1417
1291
  });
1418
1292
  }
1419
1293
  /**
1420
- * Updates the user's tutorialComplete flag.
1294
+ * Create an expiring PKCE challenge for the authenticated user.
1421
1295
  */
1422
- patchUserTutorial(options) {
1423
- return (options.client ?? this.client).patch({
1424
- url: "/user/tutorial",
1296
+ start(options) {
1297
+ return (options.client ?? this.client).post({
1298
+ security: [{ scheme: "bearer", type: "http" }],
1299
+ url: "/claude-auth/start",
1425
1300
  ...options,
1426
1301
  headers: {
1427
1302
  "Content-Type": "application/json",