@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.
- package/README.md +628 -21
- package/dist/{chunk-5HAKQN23.js → chunk-7LVVPVNT.js} +70 -57
- package/dist/{chunk-JXIQT5TH.js → chunk-7YJ6Y7HJ.js} +234 -16
- package/dist/chunk-LMJW65ML.js +836 -0
- package/dist/{chunk-SGAHIERJ.js → chunk-OGE7WXJE.js} +16 -0
- package/dist/chunk-PRUFPW3B.js +943 -0
- package/dist/{chunk-CTKR64MY.js → chunk-QVBNNMQS.js} +242 -367
- package/dist/{chunk-QNUS5BC5.js → chunk-SUINKDXF.js} +30 -84
- package/dist/{chunk-77EI4LSQ.js → chunk-ZQXOHNDB.js} +1518 -386
- package/dist/generated/agent-harness/index.d.ts +1 -1
- package/dist/generated/agent-harness/index.js +1 -1
- package/dist/generated/agent-harness/sdk.gen.d.ts +174 -4
- package/dist/generated/agent-harness/types.gen.d.ts +2511 -189
- package/dist/generated/auth/index.d.ts +1 -1
- package/dist/generated/auth/index.js +1 -1
- package/dist/generated/auth/sdk.gen.d.ts +106 -8
- package/dist/generated/auth/types.gen.d.ts +1473 -116
- package/dist/generated/calendar/client/client.gen.d.ts +2 -0
- package/dist/generated/calendar/client/index.d.ts +10 -0
- package/dist/generated/calendar/client/types.gen.d.ts +120 -0
- package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
- package/dist/generated/calendar/client.gen.d.ts +12 -0
- package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
- package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/calendar/core/params.gen.d.ts +43 -0
- package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/calendar/core/types.gen.d.ts +83 -0
- package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
- package/dist/generated/calendar/index.d.ts +2 -0
- package/dist/generated/calendar/index.js +6 -0
- package/dist/generated/calendar/sdk.gen.d.ts +95 -0
- package/dist/generated/calendar/types.gen.d.ts +1091 -0
- package/dist/generated/cognition/index.d.ts +1 -1
- package/dist/generated/cognition/index.js +1 -1
- package/dist/generated/cognition/sdk.gen.d.ts +6 -1
- package/dist/generated/cognition/types.gen.d.ts +304 -36
- package/dist/generated/connection/types.gen.d.ts +1 -1
- package/dist/generated/email/index.d.ts +1 -1
- package/dist/generated/email/index.js +1 -1
- package/dist/generated/email/sdk.gen.d.ts +32 -27
- package/dist/generated/email/types.gen.d.ts +586 -409
- package/dist/generated/notification/index.d.ts +1 -1
- package/dist/generated/notification/types.gen.d.ts +384 -19
- package/dist/generated/properties/types.gen.d.ts +8 -5
- package/dist/generated/scheduled-action/index.d.ts +1 -1
- package/dist/generated/scheduled-action/index.js +3 -842
- package/dist/generated/scheduled-action/sdk.gen.d.ts +3 -1
- package/dist/generated/scheduled-action/types.gen.d.ts +277 -41
- package/dist/generated/search/index.d.ts +1 -1
- package/dist/generated/search/types.gen.d.ts +262 -43
- package/dist/generated/storage/index.d.ts +1 -1
- package/dist/generated/storage/index.js +1 -1
- package/dist/generated/storage/sdk.gen.d.ts +678 -107
- package/dist/generated/storage/types.gen.d.ts +14827 -5995
- package/dist/generated/unfurl/index.d.ts +1 -1
- package/dist/generated/unfurl/index.js +3 -832
- package/dist/generated/unfurl/types.gen.d.ts +20 -0
- package/dist/src/config.d.ts +33 -13
- package/dist/src/entities/agent-sessions/agent-session.d.ts +150 -6
- package/dist/src/entities/agent-sessions/code-execution.d.ts +43 -0
- package/dist/src/entities/agent-sessions/conversation.d.ts +54 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +23 -5
- package/dist/src/entities/agent-sessions/queued-action.d.ts +46 -0
- package/dist/src/entities/agent-sessions/review.d.ts +107 -0
- package/dist/src/entities/agent-sessions/tool-approval.d.ts +21 -0
- package/dist/src/entities/agents/agent.d.ts +47 -0
- package/dist/src/entities/agents/namespace.d.ts +13 -0
- package/dist/src/entities/ai/namespace.d.ts +24 -0
- package/dist/src/entities/api-keys/api-key.d.ts +17 -0
- package/dist/src/entities/api-keys/namespace.d.ts +18 -0
- package/dist/src/entities/calendar/calendar.d.ts +35 -0
- package/dist/src/entities/calendar/event.d.ts +123 -0
- package/dist/src/entities/calendar/event.test.d.ts +1 -0
- package/dist/src/entities/calendar/namespace.d.ts +111 -0
- package/dist/src/entities/calendar/replacement.d.ts +15 -0
- package/dist/src/entities/calls/call-record.d.ts +62 -6
- package/dist/src/entities/calls/message.d.ts +33 -0
- package/dist/src/entities/channels/activity.d.ts +24 -0
- package/dist/src/entities/channels/channel.d.ts +44 -3
- package/dist/src/entities/channels/labels.d.ts +39 -0
- package/dist/src/entities/channels/message.d.ts +9 -17
- package/dist/src/entities/channels/namespace.d.ts +6 -0
- package/dist/src/entities/channels/picture.d.ts +11 -0
- package/dist/src/entities/channels/post.d.ts +1 -1
- package/dist/src/entities/channels/thread.d.ts +5 -0
- package/dist/src/entities/chats/chat.d.ts +11 -1
- package/dist/src/entities/chats/generation.d.ts +46 -0
- package/dist/src/entities/crm/comment.d.ts +55 -34
- package/dist/src/entities/crm/company.d.ts +42 -10
- package/dist/src/entities/crm/contact.d.ts +42 -10
- package/dist/src/entities/crm/namespace.d.ts +18 -1
- package/dist/src/entities/crm/pipeline.d.ts +122 -0
- package/dist/src/entities/crm/pipelines.d.ts +14 -0
- package/dist/src/entities/databases/column.d.ts +75 -0
- package/dist/src/entities/databases/database.d.ts +272 -0
- package/dist/src/entities/databases/namespace.d.ts +21 -0
- package/dist/src/entities/databases/query.d.ts +86 -0
- package/dist/src/entities/databases/row.d.ts +27 -0
- package/dist/src/entities/databases/table.d.ts +61 -0
- package/dist/src/entities/databases/view.d.ts +40 -0
- package/dist/src/entities/databases/webhook.d.ts +32 -0
- package/dist/src/entities/documents/anchor.d.ts +29 -0
- package/dist/src/entities/documents/comment.d.ts +25 -22
- package/dist/src/entities/documents/document.d.ts +60 -12
- package/dist/src/entities/documents/namespace.d.ts +30 -0
- package/dist/src/entities/documents/version.d.ts +22 -0
- package/dist/src/entities/email/draft.d.ts +79 -0
- package/dist/src/entities/email/filter.d.ts +34 -0
- package/dist/src/entities/email/link.d.ts +6 -4
- package/dist/src/entities/email/message.d.ts +12 -1
- package/dist/src/entities/email/namespace.d.ts +34 -1
- package/dist/src/entities/email/thread.d.ts +23 -1
- package/dist/src/entities/entity-mentions/mention.d.ts +16 -0
- package/dist/src/entities/entity-mentions/namespace.d.ts +12 -0
- package/dist/src/entities/entity.d.ts +7 -0
- package/dist/src/entities/favorites/namespace.d.ts +14 -2
- package/dist/src/entities/foreign/foreign-entity.d.ts +2 -0
- package/dist/src/entities/foreign/namespace.d.ts +40 -0
- package/dist/src/entities/forms/form.d.ts +227 -0
- package/dist/src/entities/forms/namespace.d.ts +18 -0
- package/dist/src/entities/forms/question.d.ts +37 -0
- package/dist/src/entities/forms/response.d.ts +32 -0
- package/dist/src/entities/forms/section.d.ts +19 -0
- package/dist/src/entities/github-pull-requests/namespace.d.ts +12 -0
- package/dist/src/entities/github-pull-requests/pull-request.d.ts +52 -0
- package/dist/src/entities/harnesses/harness.d.ts +19 -0
- package/dist/src/entities/harnesses/namespace.d.ts +33 -0
- package/dist/src/entities/harnesses/pairing.d.ts +39 -0
- package/dist/src/entities/initiatives/initiative.d.ts +50 -0
- package/dist/src/entities/initiatives/namespace.d.ts +13 -0
- package/dist/src/entities/meetings/meeting.d.ts +38 -0
- package/dist/src/entities/meetings/namespace.d.ts +18 -0
- package/dist/src/entities/messages/thread.d.ts +101 -0
- package/dist/src/entities/notifications/notification.d.ts +6 -3
- package/dist/src/entities/notifications/notification.test.d.ts +1 -0
- package/dist/src/entities/projects/project.d.ts +7 -0
- package/dist/src/entities/reference.d.ts +82 -0
- package/dist/src/entities/routines/namespace.d.ts +15 -0
- package/dist/src/entities/routines/routine.d.ts +115 -0
- package/dist/src/entities/sharing/access.d.ts +65 -0
- package/dist/src/entities/sharing/permissions.d.ts +13 -0
- package/dist/src/entities/tasks/namespace.d.ts +4 -0
- package/dist/src/entities/tasks/task.d.ts +6 -0
- package/dist/src/entities/unfurls/namespace.d.ts +10 -0
- package/dist/src/entities/webhooks/webhook.d.ts +3 -1
- package/dist/src/entities/workspace/items.d.ts +7 -0
- package/dist/src/entities/workspace/namespace.d.ts +83 -0
- package/dist/src/entities/workspace/query.d.ts +12 -0
- package/dist/src/entities/workspace/types.d.ts +96 -0
- package/dist/src/events/hydrate/agentSession.d.ts +192 -0
- package/dist/src/events/hydrate/channel.d.ts +2 -39
- package/dist/src/events/hydrate/message.d.ts +70 -0
- package/dist/src/events/receiver.d.ts +57 -19
- package/dist/src/events/types.d.ts +3 -1
- package/dist/src/macro.d.ts +80 -3
- package/dist/src/macro.js +8832 -2784
- package/dist/src/utils/activity.d.ts +11 -0
- package/dist/src/utils/activity.test.d.ts +1 -0
- package/dist/src/utils/client.d.ts +10 -1
- package/dist/src/utils/concurrency.d.ts +5 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/pagination.d.ts +9 -4
- package/package.json +11 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// generated/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
777
|
+
// generated/agent-harness/client.gen.ts
|
|
778
778
|
var client = createClient(createConfig());
|
|
779
779
|
|
|
780
|
-
// generated/
|
|
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
|
-
*
|
|
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
|
-
|
|
818
|
-
return (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
|
-
*
|
|
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
|
-
|
|
827
|
-
return (options?.client ?? this.client).get({ url: "/
|
|
824
|
+
getAgentCodingPreferences(options) {
|
|
825
|
+
return (options?.client ?? this.client).get({ url: "/agent-coding-preferences", ...options });
|
|
828
826
|
}
|
|
829
827
|
/**
|
|
830
|
-
*
|
|
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
|
-
|
|
830
|
+
putAgentCodingPreferences(options) {
|
|
838
831
|
return (options.client ?? this.client).put({
|
|
839
|
-
url: "/
|
|
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
|
-
*
|
|
841
|
+
* The agent conversations in a channel the caller may see. Ordinary channels
|
|
842
|
+
* and other people's conversations list none.
|
|
849
843
|
*/
|
|
850
|
-
|
|
851
|
-
return (options.client ?? this.client).get({
|
|
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
|
-
*
|
|
852
|
+
* Start a fresh agent context, retaining the channel transcript.
|
|
855
853
|
*/
|
|
856
|
-
|
|
854
|
+
startFreshAgentConversation(options) {
|
|
857
855
|
return (options.client ?? this.client).post({
|
|
858
|
-
|
|
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
|
-
*
|
|
866
|
+
* Explicitly retry a failed message in the conversation's current session.
|
|
868
867
|
*/
|
|
869
|
-
|
|
868
|
+
retryAgentConversationTurn(options) {
|
|
870
869
|
return (options.client ?? this.client).post({
|
|
871
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
882
|
+
loadAgentModelsHandler(options) {
|
|
889
883
|
return (options.client ?? this.client).post({
|
|
890
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
929
|
-
return (options?.client ?? this.client).
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
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
|
-
*
|
|
904
|
+
* List the branches on one repository the caller can start a session from.
|
|
951
905
|
*/
|
|
952
|
-
|
|
953
|
-
return (options.client ?? this.client).
|
|
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
|
-
*
|
|
914
|
+
* Read the caller's default sandbox size for new `@coder` sessions.
|
|
957
915
|
*/
|
|
958
|
-
|
|
959
|
-
return (options?.client ?? this.client).get({ url: "/
|
|
916
|
+
getAgentSandboxSize(options) {
|
|
917
|
+
return (options?.client ?? this.client).get({ url: "/agent-sandbox-size", ...options });
|
|
960
918
|
}
|
|
961
919
|
/**
|
|
962
|
-
*
|
|
920
|
+
* Set the caller's default sandbox size for the next `@coder` mention.
|
|
963
921
|
*/
|
|
964
|
-
|
|
965
|
-
return (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
|
-
*
|
|
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
|
-
|
|
941
|
+
createAgentSession(options) {
|
|
971
942
|
return (options.client ?? this.client).post({
|
|
972
|
-
url: "/
|
|
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
|
-
*
|
|
952
|
+
* List the sessions associated with a pull request that the caller can view.
|
|
982
953
|
*/
|
|
983
|
-
|
|
954
|
+
agentSessionsForPullRequest(options) {
|
|
984
955
|
return (options.client ?? this.client).post({
|
|
985
|
-
url: "/
|
|
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
|
-
*
|
|
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
|
-
|
|
968
|
+
agentSessionsForPullRequests(options) {
|
|
997
969
|
return (options.client ?? this.client).post({
|
|
998
|
-
url: "/
|
|
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
|
-
*
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
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
|
-
|
|
986
|
+
previewAgentSessions(options) {
|
|
1025
987
|
return (options.client ?? this.client).post({
|
|
1026
|
-
url: "/
|
|
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
|
-
*
|
|
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
|
-
|
|
999
|
+
warmAgentSessionHandler(options) {
|
|
1046
1000
|
return (options.client ?? this.client).post({
|
|
1047
|
-
url: "/
|
|
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
|
-
*
|
|
1010
|
+
* Delete an agent session and its live resources.
|
|
1057
1011
|
*/
|
|
1058
|
-
|
|
1059
|
-
return (options.client ?? this.client).
|
|
1012
|
+
deleteAgentSession(options) {
|
|
1013
|
+
return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}", ...options });
|
|
1060
1014
|
}
|
|
1061
1015
|
/**
|
|
1062
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
1091
|
-
return (options
|
|
1023
|
+
getAgentSession(options) {
|
|
1024
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}", ...options });
|
|
1092
1025
|
}
|
|
1093
1026
|
/**
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1096
|
-
* Sends a referral code via email to a user
|
|
1027
|
+
* Archive or unarchive an agent session.
|
|
1097
1028
|
*/
|
|
1098
|
-
|
|
1099
|
-
return (options.client ?? this.client).
|
|
1100
|
-
url: "/
|
|
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
|
-
*
|
|
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
|
-
|
|
1112
|
-
return (options
|
|
1043
|
+
getAgentSessionChanges(options) {
|
|
1044
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/changes", ...options });
|
|
1113
1045
|
}
|
|
1114
1046
|
/**
|
|
1115
|
-
*
|
|
1047
|
+
* The unified diff behind the session's latest changeset.
|
|
1116
1048
|
*/
|
|
1117
|
-
|
|
1118
|
-
return (options.client ?? this.client).get({ url: "/
|
|
1049
|
+
getAgentSessionChangesPatch(options) {
|
|
1050
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/changes/patch", ...options });
|
|
1119
1051
|
}
|
|
1120
1052
|
/**
|
|
1121
|
-
*
|
|
1122
|
-
*
|
|
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
|
-
|
|
1126
|
-
return (options
|
|
1056
|
+
refreshAgentSessionChanges(options) {
|
|
1057
|
+
return (options.client ?? this.client).post({ url: "/agent-sessions/{session_id}/changes/refresh", ...options });
|
|
1127
1058
|
}
|
|
1128
1059
|
/**
|
|
1129
|
-
*
|
|
1060
|
+
* Fetch one execution only after the caller has obtained view access to its session.
|
|
1130
1061
|
*/
|
|
1131
|
-
|
|
1132
|
-
return (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
|
-
*
|
|
1066
|
+
* List blocks created during an execution, including interrupted executions.
|
|
1136
1067
|
*/
|
|
1137
|
-
|
|
1138
|
-
return (options.client ?? this.client).
|
|
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
|
-
*
|
|
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
|
-
|
|
1081
|
+
controlAgentSession(options) {
|
|
1151
1082
|
return (options.client ?? this.client).post({
|
|
1152
|
-
url: "/
|
|
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
|
-
*
|
|
1162
|
-
*
|
|
1163
|
-
*
|
|
1164
|
-
*
|
|
1165
|
-
*
|
|
1166
|
-
*
|
|
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
|
-
|
|
1169
|
-
return (options
|
|
1101
|
+
getAgentSessionLog(options) {
|
|
1102
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/log", ...options });
|
|
1170
1103
|
}
|
|
1171
1104
|
/**
|
|
1172
|
-
*
|
|
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
|
-
|
|
1183
|
-
return (options.client ?? this.client).
|
|
1184
|
-
url: "/
|
|
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
|
-
*
|
|
1118
|
+
* Read sharing settings for a session the caller can view.
|
|
1194
1119
|
*/
|
|
1195
|
-
|
|
1196
|
-
return (options.client ?? this.client).
|
|
1197
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
1227
|
-
return (options.client ?? this.client).
|
|
1140
|
+
unlinkAgentSessionPullRequest(options) {
|
|
1141
|
+
return (options.client ?? this.client).delete({ url: "/agent-sessions/{session_id}/pull-requests", ...options });
|
|
1228
1142
|
}
|
|
1229
1143
|
/**
|
|
1230
|
-
*
|
|
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
|
-
|
|
1236
|
-
return (options
|
|
1146
|
+
listAgentSessionPullRequests(options) {
|
|
1147
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/pull-requests", ...options });
|
|
1237
1148
|
}
|
|
1238
1149
|
/**
|
|
1239
|
-
*
|
|
1150
|
+
* Link a pull request to a session the caller can edit.
|
|
1240
1151
|
*/
|
|
1241
|
-
|
|
1242
|
-
return (options.client ?? this.client).
|
|
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
|
-
*
|
|
1163
|
+
* The actions waiting to dispatch in this session, oldest first.
|
|
1246
1164
|
*/
|
|
1247
|
-
|
|
1248
|
-
return (options
|
|
1165
|
+
getAgentSessionQueue(options) {
|
|
1166
|
+
return (options.client ?? this.client).get({ url: "/agent-sessions/{session_id}/queue", ...options });
|
|
1249
1167
|
}
|
|
1250
1168
|
/**
|
|
1251
|
-
*
|
|
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
|
-
|
|
1254
|
-
return (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
|
-
*
|
|
1176
|
+
* Replace a queued prompt's text before it dispatches.
|
|
1258
1177
|
*/
|
|
1259
|
-
|
|
1260
|
-
return (options.client ?? this.client).
|
|
1261
|
-
url: "/
|
|
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
|
-
*
|
|
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
|
-
|
|
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: "/
|
|
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
|
-
*
|
|
1209
|
+
* Read a persisted interactive block.
|
|
1284
1210
|
*/
|
|
1285
|
-
|
|
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: "/
|
|
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
|
-
*
|
|
1228
|
+
* Resize this session's sandbox and remember the size as the owner's default.
|
|
1297
1229
|
*/
|
|
1298
|
-
|
|
1299
|
-
return (options.client ?? this.client).
|
|
1300
|
-
url: "/
|
|
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
|
-
*
|
|
1310
|
-
*
|
|
1311
|
-
*
|
|
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
|
-
|
|
1315
|
-
return (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
|
-
*
|
|
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
|
-
|
|
1365
|
-
return (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
|
-
*
|
|
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
|
-
|
|
1397
|
-
return (options
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
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
|
-
*
|
|
1280
|
+
* Exchange one code; never return access or refresh tokens.
|
|
1408
1281
|
*/
|
|
1409
|
-
|
|
1282
|
+
complete(options) {
|
|
1410
1283
|
return (options.client ?? this.client).post({
|
|
1411
|
-
|
|
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
|
-
*
|
|
1294
|
+
* Create an expiring PKCE challenge for the authenticated user.
|
|
1421
1295
|
*/
|
|
1422
|
-
|
|
1423
|
-
return (options.client ?? this.client).
|
|
1424
|
-
|
|
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",
|