sarvam-agents-client 0.1.2 → 0.2.1
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 +15 -0
- package/dist/apis/AgentConversationsApi.d.ts +44 -1
- package/dist/apis/AgentConversationsApi.js +104 -1
- package/dist/apis/AgentsApi.d.ts +77 -5
- package/dist/apis/AgentsApi.js +163 -5
- package/dist/apis/AppsApi.d.ts +43 -1
- package/dist/apis/AppsApi.js +108 -0
- package/dist/apis/ArtifactsApi.d.ts +31 -1
- package/dist/apis/ArtifactsApi.js +82 -0
- package/dist/apis/CustomAPIsApi.d.ts +124 -0
- package/dist/apis/CustomAPIsApi.js +305 -0
- package/dist/apis/ModelsApi.d.ts +26 -0
- package/dist/apis/ModelsApi.js +52 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/compose/agent.d.ts +44 -0
- package/dist/compose/agent.js +222 -0
- package/dist/compose/builtins.d.ts +4 -0
- package/dist/compose/builtins.js +22 -0
- package/dist/compose/deploy.d.ts +30 -0
- package/dist/compose/deploy.js +146 -0
- package/dist/compose/errors.d.ts +48 -0
- package/dist/compose/errors.js +68 -0
- package/dist/compose/events.d.ts +63 -0
- package/dist/compose/events.js +100 -0
- package/dist/compose/fingerprint.d.ts +6 -0
- package/dist/compose/fingerprint.js +83 -0
- package/dist/compose/index.d.ts +13 -0
- package/dist/compose/index.js +33 -0
- package/dist/compose/run.d.ts +100 -0
- package/dist/compose/run.js +536 -0
- package/dist/compose/runState.d.ts +26 -0
- package/dist/compose/runState.js +79 -0
- package/dist/compose/settingsTransport.d.ts +24 -0
- package/dist/compose/settingsTransport.js +280 -0
- package/dist/compose/tools.d.ts +17 -0
- package/dist/compose/tools.js +44 -0
- package/dist/compose/transport.d.ts +34 -0
- package/dist/compose/transport.js +2 -0
- package/dist/esm/apis/AgentConversationsApi.d.ts +44 -1
- package/dist/esm/apis/AgentConversationsApi.js +104 -1
- package/dist/esm/apis/AgentsApi.d.ts +77 -5
- package/dist/esm/apis/AgentsApi.js +163 -5
- package/dist/esm/apis/AppsApi.d.ts +43 -1
- package/dist/esm/apis/AppsApi.js +109 -1
- package/dist/esm/apis/ArtifactsApi.d.ts +31 -1
- package/dist/esm/apis/ArtifactsApi.js +83 -1
- package/dist/esm/apis/CustomAPIsApi.d.ts +124 -0
- package/dist/esm/apis/CustomAPIsApi.js +301 -0
- package/dist/esm/apis/ModelsApi.d.ts +26 -0
- package/dist/esm/apis/ModelsApi.js +48 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/compose/agent.d.ts +44 -0
- package/dist/esm/compose/agent.js +218 -0
- package/dist/esm/compose/builtins.d.ts +4 -0
- package/dist/esm/compose/builtins.js +18 -0
- package/dist/esm/compose/deploy.d.ts +30 -0
- package/dist/esm/compose/deploy.js +137 -0
- package/dist/esm/compose/errors.d.ts +48 -0
- package/dist/esm/compose/errors.js +53 -0
- package/dist/esm/compose/events.d.ts +63 -0
- package/dist/esm/compose/events.js +97 -0
- package/dist/esm/compose/fingerprint.d.ts +6 -0
- package/dist/esm/compose/fingerprint.js +78 -0
- package/dist/esm/compose/index.d.ts +13 -0
- package/dist/esm/compose/index.js +8 -0
- package/dist/esm/compose/run.d.ts +100 -0
- package/dist/esm/compose/run.js +530 -0
- package/dist/esm/compose/runState.d.ts +26 -0
- package/dist/esm/compose/runState.js +75 -0
- package/dist/esm/compose/settingsTransport.d.ts +24 -0
- package/dist/esm/compose/settingsTransport.js +276 -0
- package/dist/esm/compose/tools.d.ts +17 -0
- package/dist/esm/compose/tools.js +34 -0
- package/dist/esm/compose/transport.d.ts +34 -0
- package/dist/esm/compose/transport.js +1 -0
- package/dist/esm/models/AgentChannelRef.d.ts +1 -0
- package/dist/esm/models/AgentChannelRef.js +2 -1
- package/dist/esm/models/AgentConversationDetail.d.ts +15 -2
- package/dist/esm/models/AgentConversationDetail.js +6 -4
- package/dist/esm/models/AgentConversationView.d.ts +11 -5
- package/dist/esm/models/AgentConversationView.js +4 -4
- package/dist/esm/models/AgentCreate.d.ts +8 -0
- package/dist/esm/models/AgentCreate.js +2 -0
- package/dist/esm/models/AgentCustomApiList.d.ts +33 -0
- package/dist/esm/models/AgentCustomApiList.js +44 -0
- package/dist/esm/models/AgentResource.d.ts +14 -0
- package/dist/esm/models/AgentResource.js +4 -0
- package/dist/esm/models/AgentSettingsResponse.d.ts +53 -0
- package/dist/esm/models/AgentSettingsResponse.js +52 -0
- package/dist/esm/models/AgentUpdate.d.ts +8 -0
- package/dist/esm/models/AgentUpdate.js +2 -0
- package/dist/esm/models/AppAccountView.d.ts +88 -0
- package/dist/esm/models/AppAccountView.js +79 -0
- package/dist/esm/models/AppAccountsView.d.ts +66 -0
- package/dist/esm/models/AppAccountsView.js +60 -0
- package/dist/esm/models/AppResource.d.ts +36 -0
- package/dist/esm/models/AppResource.js +12 -0
- package/dist/esm/models/AppResourceCheckView.d.ts +74 -0
- package/dist/esm/models/AppResourceCheckView.js +63 -0
- package/dist/esm/models/AppResourceView.d.ts +68 -0
- package/dist/esm/models/AppResourceView.js +67 -0
- package/dist/esm/models/AppResourcesView.d.ts +54 -0
- package/dist/esm/models/AppResourcesView.js +56 -0
- package/dist/esm/models/AppToolsResponse.d.ts +14 -0
- package/dist/esm/models/AppToolsResponse.js +4 -0
- package/dist/esm/models/AppView.d.ts +42 -0
- package/dist/esm/models/AppView.js +14 -0
- package/dist/esm/models/ArtifactVersionResponse.d.ts +94 -0
- package/dist/esm/models/ArtifactVersionResponse.js +80 -0
- package/dist/esm/models/AttachedAgent.d.ts +44 -0
- package/dist/esm/models/AttachedAgent.js +49 -0
- package/dist/esm/models/Auth.d.ts +30 -0
- package/dist/esm/models/Auth.js +52 -0
- package/dist/esm/models/BindCustomApiBody.d.ts +32 -0
- package/dist/esm/models/BindCustomApiBody.js +43 -0
- package/dist/esm/models/ConversationArtifact.d.ts +14 -0
- package/dist/esm/models/ConversationArtifact.js +9 -0
- package/dist/esm/models/CustomApi.d.ts +102 -0
- package/dist/esm/models/CustomApi.js +90 -0
- package/dist/esm/models/CustomApiBasicAuth.d.ts +51 -0
- package/dist/esm/models/CustomApiBasicAuth.js +57 -0
- package/dist/esm/models/CustomApiBearerAuth.d.ts +45 -0
- package/dist/esm/models/CustomApiBearerAuth.js +53 -0
- package/dist/esm/models/CustomApiCreate.d.ts +57 -0
- package/dist/esm/models/CustomApiCreate.js +56 -0
- package/dist/esm/models/CustomApiHeader.d.ts +44 -0
- package/dist/esm/models/CustomApiHeader.js +47 -0
- package/dist/esm/models/CustomApiHeadersAuth.d.ts +46 -0
- package/dist/esm/models/CustomApiHeadersAuth.js +54 -0
- package/dist/esm/models/CustomApiList.d.ts +64 -0
- package/dist/esm/models/CustomApiList.js +64 -0
- package/dist/esm/models/CustomApiName.d.ts +44 -0
- package/dist/esm/models/CustomApiName.js +49 -0
- package/dist/esm/models/CustomApiUpdate.d.ts +58 -0
- package/dist/esm/models/CustomApiUpdate.js +50 -0
- package/dist/esm/models/CustomApiUpdateAuth.d.ts +30 -0
- package/dist/esm/models/CustomApiUpdateAuth.js +52 -0
- package/dist/esm/models/ErrorDetailItem.d.ts +5 -0
- package/dist/esm/models/ListModels403Response.d.ts +23 -0
- package/dist/esm/models/ListModels403Response.js +45 -0
- package/dist/esm/models/ModelEndpointView.d.ts +38 -0
- package/dist/esm/models/ModelEndpointView.js +45 -0
- package/dist/esm/models/ModelView.d.ts +69 -0
- package/dist/esm/models/ModelView.js +56 -0
- package/dist/esm/models/ModelsResponse.d.ts +33 -0
- package/dist/esm/models/ModelsResponse.js +44 -0
- package/dist/esm/models/SettingsIssueView.d.ts +44 -0
- package/dist/esm/models/SettingsIssueView.js +51 -0
- package/dist/esm/models/VersionCommitBody.d.ts +44 -0
- package/dist/esm/models/VersionCommitBody.js +51 -0
- package/dist/esm/models/VersionUploadUrlBody.d.ts +32 -0
- package/dist/esm/models/VersionUploadUrlBody.js +43 -0
- package/dist/esm/models/index.d.ts +28 -0
- package/dist/esm/models/index.js +28 -0
- package/dist/models/AgentChannelRef.d.ts +1 -0
- package/dist/models/AgentChannelRef.js +2 -1
- package/dist/models/AgentConversationDetail.d.ts +15 -2
- package/dist/models/AgentConversationDetail.js +6 -4
- package/dist/models/AgentConversationView.d.ts +11 -5
- package/dist/models/AgentConversationView.js +4 -4
- package/dist/models/AgentCreate.d.ts +8 -0
- package/dist/models/AgentCreate.js +2 -0
- package/dist/models/AgentCustomApiList.d.ts +33 -0
- package/dist/models/AgentCustomApiList.js +51 -0
- package/dist/models/AgentResource.d.ts +14 -0
- package/dist/models/AgentResource.js +4 -0
- package/dist/models/AgentSettingsResponse.d.ts +53 -0
- package/dist/models/AgentSettingsResponse.js +59 -0
- package/dist/models/AgentUpdate.d.ts +8 -0
- package/dist/models/AgentUpdate.js +2 -0
- package/dist/models/AppAccountView.d.ts +88 -0
- package/dist/models/AppAccountView.js +87 -0
- package/dist/models/AppAccountsView.d.ts +66 -0
- package/dist/models/AppAccountsView.js +68 -0
- package/dist/models/AppResource.d.ts +36 -0
- package/dist/models/AppResource.js +12 -0
- package/dist/models/AppResourceCheckView.d.ts +74 -0
- package/dist/models/AppResourceCheckView.js +71 -0
- package/dist/models/AppResourceView.d.ts +68 -0
- package/dist/models/AppResourceView.js +74 -0
- package/dist/models/AppResourcesView.d.ts +54 -0
- package/dist/models/AppResourcesView.js +64 -0
- package/dist/models/AppToolsResponse.d.ts +14 -0
- package/dist/models/AppToolsResponse.js +4 -0
- package/dist/models/AppView.d.ts +42 -0
- package/dist/models/AppView.js +14 -0
- package/dist/models/ArtifactVersionResponse.d.ts +94 -0
- package/dist/models/ArtifactVersionResponse.js +88 -0
- package/dist/models/AttachedAgent.d.ts +44 -0
- package/dist/models/AttachedAgent.js +56 -0
- package/dist/models/Auth.d.ts +30 -0
- package/dist/models/Auth.js +58 -0
- package/dist/models/BindCustomApiBody.d.ts +32 -0
- package/dist/models/BindCustomApiBody.js +50 -0
- package/dist/models/ConversationArtifact.d.ts +14 -0
- package/dist/models/ConversationArtifact.js +10 -0
- package/dist/models/CustomApi.d.ts +102 -0
- package/dist/models/CustomApi.js +98 -0
- package/dist/models/CustomApiBasicAuth.d.ts +51 -0
- package/dist/models/CustomApiBasicAuth.js +65 -0
- package/dist/models/CustomApiBearerAuth.d.ts +45 -0
- package/dist/models/CustomApiBearerAuth.js +61 -0
- package/dist/models/CustomApiCreate.d.ts +57 -0
- package/dist/models/CustomApiCreate.js +63 -0
- package/dist/models/CustomApiHeader.d.ts +44 -0
- package/dist/models/CustomApiHeader.js +54 -0
- package/dist/models/CustomApiHeadersAuth.d.ts +46 -0
- package/dist/models/CustomApiHeadersAuth.js +62 -0
- package/dist/models/CustomApiList.d.ts +64 -0
- package/dist/models/CustomApiList.js +71 -0
- package/dist/models/CustomApiName.d.ts +44 -0
- package/dist/models/CustomApiName.js +56 -0
- package/dist/models/CustomApiUpdate.d.ts +58 -0
- package/dist/models/CustomApiUpdate.js +57 -0
- package/dist/models/CustomApiUpdateAuth.d.ts +30 -0
- package/dist/models/CustomApiUpdateAuth.js +58 -0
- package/dist/models/ErrorDetailItem.d.ts +5 -0
- package/dist/models/ListModels403Response.d.ts +23 -0
- package/dist/models/ListModels403Response.js +51 -0
- package/dist/models/ModelEndpointView.d.ts +38 -0
- package/dist/models/ModelEndpointView.js +52 -0
- package/dist/models/ModelView.d.ts +69 -0
- package/dist/models/ModelView.js +63 -0
- package/dist/models/ModelsResponse.d.ts +33 -0
- package/dist/models/ModelsResponse.js +51 -0
- package/dist/models/SettingsIssueView.d.ts +44 -0
- package/dist/models/SettingsIssueView.js +58 -0
- package/dist/models/VersionCommitBody.d.ts +44 -0
- package/dist/models/VersionCommitBody.js +58 -0
- package/dist/models/VersionUploadUrlBody.d.ts +32 -0
- package/dist/models/VersionUploadUrlBody.js +50 -0
- package/dist/models/index.d.ts +28 -0
- package/dist/models/index.js +28 -0
- package/package.json +15 -2
- package/src/apis/AgentConversationsApi.ts +172 -3
- package/src/apis/AgentsApi.ts +242 -7
- package/src/apis/AppsApi.ts +174 -3
- package/src/apis/ArtifactsApi.ts +144 -0
- package/src/apis/ClarifyApi.ts +3 -3
- package/src/apis/CollectionsApi.ts +3 -3
- package/src/apis/ConversationsApi.ts +3 -3
- package/src/apis/CronsApi.ts +3 -3
- package/src/apis/CustomAPIsApi.ts +471 -0
- package/src/apis/MessagesApi.ts +3 -3
- package/src/apis/ModelsApi.ts +70 -0
- package/src/apis/QueueApi.ts +3 -3
- package/src/apis/ResponsesApi.ts +3 -3
- package/src/apis/SkillsApi.ts +3 -3
- package/src/apis/index.ts +2 -0
- package/src/compose/agent.ts +254 -0
- package/src/compose/builtins.ts +19 -0
- package/src/compose/deploy.ts +168 -0
- package/src/compose/errors.ts +66 -0
- package/src/compose/events.ts +122 -0
- package/src/compose/fingerprint.ts +74 -0
- package/src/compose/index.ts +13 -0
- package/src/compose/run.ts +601 -0
- package/src/compose/runState.ts +95 -0
- package/src/compose/settingsTransport.ts +299 -0
- package/src/compose/tools.ts +42 -0
- package/src/compose/transport.ts +48 -0
- package/src/models/AgentChannelRef.ts +2 -1
- package/src/models/AgentConversationDetail.ts +21 -5
- package/src/models/AgentConversationView.ts +15 -8
- package/src/models/AgentCreate.ts +8 -0
- package/src/models/AgentCustomApiList.ts +74 -0
- package/src/models/AgentResource.ts +16 -0
- package/src/models/AgentSettingsResponse.ts +99 -0
- package/src/models/AgentUpdate.ts +8 -0
- package/src/models/AppAccountView.ts +143 -0
- package/src/models/AppAccountsView.ts +118 -0
- package/src/models/AppResource.ts +48 -0
- package/src/models/AppResourceCheckView.ts +117 -0
- package/src/models/AppResourceView.ts +120 -0
- package/src/models/AppResourcesView.ts +102 -0
- package/src/models/AppToolsResponse.ts +16 -0
- package/src/models/AppView.ts +56 -0
- package/src/models/ArtifactVersionResponse.ts +155 -0
- package/src/models/AttachedAgent.ts +83 -0
- package/src/models/Auth.ts +84 -0
- package/src/models/BindCustomApiBody.ts +66 -0
- package/src/models/ConversationArtifact.ts +19 -0
- package/src/models/CustomApi.ts +175 -0
- package/src/models/CustomApiBasicAuth.ts +94 -0
- package/src/models/CustomApiBearerAuth.ts +85 -0
- package/src/models/CustomApiCreate.ts +108 -0
- package/src/models/CustomApiHeader.ts +82 -0
- package/src/models/CustomApiHeadersAuth.ts +93 -0
- package/src/models/CustomApiList.ts +120 -0
- package/src/models/CustomApiName.ts +83 -0
- package/src/models/CustomApiUpdate.ts +106 -0
- package/src/models/CustomApiUpdateAuth.ts +84 -0
- package/src/models/ErrorDetailItem.ts +5 -0
- package/src/models/ListModels403Response.ts +73 -0
- package/src/models/ModelEndpointView.ts +74 -0
- package/src/models/ModelView.ts +122 -0
- package/src/models/ModelsResponse.ts +74 -0
- package/src/models/SettingsIssueView.ts +84 -0
- package/src/models/VersionCommitBody.ts +84 -0
- package/src/models/VersionUploadUrlBody.ts +66 -0
- package/src/models/index.ts +28 -0
|
@@ -12,11 +12,56 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import * as runtime from '../runtime.js';
|
|
15
|
-
import { AgentConversationDetailFromJSON, PageAgentConversationViewFromJSON, } from '../models/index.js';
|
|
15
|
+
import { AgentConversationDetailFromJSON, DownloadUrlResponseFromJSON, MessagesResponseFromJSON, PageAgentConversationViewFromJSON, } from '../models/index.js';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
19
|
export class AgentConversationsApi extends runtime.BaseAPI {
|
|
20
|
+
/**
|
|
21
|
+
* Presign one file of a session from the log, signed on each click. The file belongs to the session\'s user, not to the caller, so the in-app presign (scoped to the caller) would 404. Instead: 1. List the session\'s artifacts as its owner and require ``artifact_id`` among them. Without this check, an agent owner could presign any file of that user by guessing an id, not just this session\'s. 2. Presign through the owner-identity route the share links use. The gateway still checks the ids against the artifact\'s real owner.
|
|
22
|
+
* Agent Conversation Artifact Download Url Route
|
|
23
|
+
*/
|
|
24
|
+
async agentConversationArtifactDownloadUrlRaw(requestParameters, initOverrides) {
|
|
25
|
+
if (requestParameters['agentId'] == null) {
|
|
26
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling agentConversationArtifactDownloadUrl().');
|
|
27
|
+
}
|
|
28
|
+
if (requestParameters['conversationId'] == null) {
|
|
29
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling agentConversationArtifactDownloadUrl().');
|
|
30
|
+
}
|
|
31
|
+
if (requestParameters['artifactId'] == null) {
|
|
32
|
+
throw new runtime.RequiredError('artifactId', 'Required parameter "artifactId" was null or undefined when calling agentConversationArtifactDownloadUrl().');
|
|
33
|
+
}
|
|
34
|
+
const queryParameters = {};
|
|
35
|
+
if (requestParameters['expires'] != null) {
|
|
36
|
+
queryParameters['expires'] = requestParameters['expires'];
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['disposition'] != null) {
|
|
39
|
+
queryParameters['disposition'] = requestParameters['disposition'];
|
|
40
|
+
}
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43
|
+
const token = this.configuration.accessToken;
|
|
44
|
+
const tokenString = await token("bearerAuth", []);
|
|
45
|
+
if (tokenString) {
|
|
46
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const response = await this.request({
|
|
50
|
+
path: `/v1/agents/{agentId}/conversations/{conversationId}/artifacts/{artifactId}/download-url`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])).replace(`{${"conversationId"}}`, runtime.encodePathParam('conversationId', requestParameters['conversationId'])).replace(`{${"artifactId"}}`, runtime.encodePathParam('artifactId', requestParameters['artifactId'])),
|
|
51
|
+
method: 'GET',
|
|
52
|
+
headers: headerParameters,
|
|
53
|
+
query: queryParameters,
|
|
54
|
+
}, initOverrides);
|
|
55
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DownloadUrlResponseFromJSON(jsonValue));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Presign one file of a session from the log, signed on each click. The file belongs to the session\'s user, not to the caller, so the in-app presign (scoped to the caller) would 404. Instead: 1. List the session\'s artifacts as its owner and require ``artifact_id`` among them. Without this check, an agent owner could presign any file of that user by guessing an id, not just this session\'s. 2. Presign through the owner-identity route the share links use. The gateway still checks the ids against the artifact\'s real owner.
|
|
59
|
+
* Agent Conversation Artifact Download Url Route
|
|
60
|
+
*/
|
|
61
|
+
async agentConversationArtifactDownloadUrl(requestParameters, initOverrides) {
|
|
62
|
+
const response = await this.agentConversationArtifactDownloadUrlRaw(requestParameters, initOverrides);
|
|
63
|
+
return await response.value();
|
|
64
|
+
}
|
|
20
65
|
/**
|
|
21
66
|
* One session from the log, with its projected history and tool calls. Read-only: unlike the self route this never marks the row read, because ``last_read_at`` is the owning user\'s unread state, not the agent owner\'s.
|
|
22
67
|
* Get Agent Conversation Route
|
|
@@ -53,6 +98,51 @@ export class AgentConversationsApi extends runtime.BaseAPI {
|
|
|
53
98
|
const response = await this.getAgentConversationRaw(requestParameters, initOverrides);
|
|
54
99
|
return await response.value();
|
|
55
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Older history of one session from the log: the backward page of the self route ``GET /v1/conversations/{id}/messages?before=``. Only the backward path is offered, because the detail already returns the newest window and there is no live stream to catch up with.
|
|
103
|
+
* List Agent Conversation Messages Route
|
|
104
|
+
*/
|
|
105
|
+
async listAgentConversationMessagesRaw(requestParameters, initOverrides) {
|
|
106
|
+
if (requestParameters['agentId'] == null) {
|
|
107
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling listAgentConversationMessages().');
|
|
108
|
+
}
|
|
109
|
+
if (requestParameters['conversationId'] == null) {
|
|
110
|
+
throw new runtime.RequiredError('conversationId', 'Required parameter "conversationId" was null or undefined when calling listAgentConversationMessages().');
|
|
111
|
+
}
|
|
112
|
+
if (requestParameters['before'] == null) {
|
|
113
|
+
throw new runtime.RequiredError('before', 'Required parameter "before" was null or undefined when calling listAgentConversationMessages().');
|
|
114
|
+
}
|
|
115
|
+
const queryParameters = {};
|
|
116
|
+
if (requestParameters['before'] != null) {
|
|
117
|
+
queryParameters['before'] = requestParameters['before'];
|
|
118
|
+
}
|
|
119
|
+
if (requestParameters['turnLimit'] != null) {
|
|
120
|
+
queryParameters['turnLimit'] = requestParameters['turnLimit'];
|
|
121
|
+
}
|
|
122
|
+
const headerParameters = {};
|
|
123
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
124
|
+
const token = this.configuration.accessToken;
|
|
125
|
+
const tokenString = await token("bearerAuth", []);
|
|
126
|
+
if (tokenString) {
|
|
127
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const response = await this.request({
|
|
131
|
+
path: `/v1/agents/{agentId}/conversations/{conversationId}/messages`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])).replace(`{${"conversationId"}}`, runtime.encodePathParam('conversationId', requestParameters['conversationId'])),
|
|
132
|
+
method: 'GET',
|
|
133
|
+
headers: headerParameters,
|
|
134
|
+
query: queryParameters,
|
|
135
|
+
}, initOverrides);
|
|
136
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MessagesResponseFromJSON(jsonValue));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Older history of one session from the log: the backward page of the self route ``GET /v1/conversations/{id}/messages?before=``. Only the backward path is offered, because the detail already returns the newest window and there is no live stream to catch up with.
|
|
140
|
+
* List Agent Conversation Messages Route
|
|
141
|
+
*/
|
|
142
|
+
async listAgentConversationMessages(requestParameters, initOverrides) {
|
|
143
|
+
const response = await this.listAgentConversationMessagesRaw(requestParameters, initOverrides);
|
|
144
|
+
return await response.value();
|
|
145
|
+
}
|
|
56
146
|
/**
|
|
57
147
|
* The agent owner\'s session log: conversations every user in the tenant has had with this agent on the selected surface, newest-active first.
|
|
58
148
|
* List Agent Conversations Route
|
|
@@ -71,6 +161,12 @@ export class AgentConversationsApi extends runtime.BaseAPI {
|
|
|
71
161
|
if (requestParameters['sessionType'] != null) {
|
|
72
162
|
queryParameters['sessionType'] = requestParameters['sessionType'];
|
|
73
163
|
}
|
|
164
|
+
if (requestParameters['workspaceId'] != null) {
|
|
165
|
+
queryParameters['workspaceId'] = requestParameters['workspaceId'];
|
|
166
|
+
}
|
|
167
|
+
if (requestParameters['mine'] != null) {
|
|
168
|
+
queryParameters['mine'] = requestParameters['mine'];
|
|
169
|
+
}
|
|
74
170
|
const headerParameters = {};
|
|
75
171
|
if (this.configuration && this.configuration.accessToken) {
|
|
76
172
|
const token = this.configuration.accessToken;
|
|
@@ -96,6 +192,13 @@ export class AgentConversationsApi extends runtime.BaseAPI {
|
|
|
96
192
|
return await response.value();
|
|
97
193
|
}
|
|
98
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* @export
|
|
197
|
+
*/
|
|
198
|
+
export const AgentConversationArtifactDownloadUrlDispositionEnum = {
|
|
199
|
+
Inline: 'inline',
|
|
200
|
+
Attachment: 'attachment'
|
|
201
|
+
};
|
|
99
202
|
/**
|
|
100
203
|
* @export
|
|
101
204
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { AgentCreate, AgentResource, AgentSearchChannel, AgentTemplateResource, AgentUpdate, EntityCategory, EntityListAgentResource, EntityListAgentTemplateResource, FileNodeView, FileWriteBody, InstructionsBody, InstructionsResponse, PageFileNodeView, PublishRequest, Scope } from '../models/index.js';
|
|
13
|
+
import type { AgentCreate, AgentResource, AgentSearchChannel, AgentSettingsResponse, AgentTemplateResource, AgentUpdate, EntityCategory, EntityListAgentResource, EntityListAgentTemplateResource, FileNodeView, FileWriteBody, InstructionsBody, InstructionsResponse, PageFileNodeView, PublishRequest, Scope } from '../models/index.js';
|
|
14
14
|
export interface CloneAgentRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
origin?: CloneAgentOriginEnum;
|
|
@@ -29,11 +29,19 @@ export interface DeployAgentRequest {
|
|
|
29
29
|
}
|
|
30
30
|
export interface GetAgentRequest {
|
|
31
31
|
agentId: string;
|
|
32
|
+
origin?: GetAgentOriginEnum;
|
|
33
|
+
xPanjaOrigin?: GetAgentXPanjaOriginEnum;
|
|
32
34
|
}
|
|
33
35
|
export interface GetAgentFileRequest {
|
|
34
36
|
agentId: string;
|
|
35
37
|
filePath: string;
|
|
36
38
|
}
|
|
39
|
+
export interface GetAgentSettingsRequest {
|
|
40
|
+
agentId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface GetAgentSettingsSchemaRequest {
|
|
43
|
+
agentId: string;
|
|
44
|
+
}
|
|
37
45
|
export interface GetAgentTemplateRequest {
|
|
38
46
|
templateId: string;
|
|
39
47
|
}
|
|
@@ -68,6 +76,10 @@ export interface ListAgentsRequest {
|
|
|
68
76
|
origin?: ListAgentsOriginEnum;
|
|
69
77
|
xPanjaOrigin?: ListAgentsXPanjaOriginEnum;
|
|
70
78
|
}
|
|
79
|
+
export interface PatchAgentSettingsRequest {
|
|
80
|
+
agentId: string;
|
|
81
|
+
body: object;
|
|
82
|
+
}
|
|
71
83
|
export interface PublishAgentRequest {
|
|
72
84
|
agentId: string;
|
|
73
85
|
publishRequest?: PublishRequest;
|
|
@@ -77,6 +89,10 @@ export interface PutAgentFileRequest {
|
|
|
77
89
|
filePath: string;
|
|
78
90
|
fileWriteBody: FileWriteBody;
|
|
79
91
|
}
|
|
92
|
+
export interface PutAgentSettingsRequest {
|
|
93
|
+
agentId: string;
|
|
94
|
+
body: object;
|
|
95
|
+
}
|
|
80
96
|
export interface PutInstructionsRequest {
|
|
81
97
|
agentId: string;
|
|
82
98
|
instructionsBody: InstructionsBody;
|
|
@@ -137,12 +153,12 @@ export declare class AgentsApi extends runtime.BaseAPI {
|
|
|
137
153
|
*/
|
|
138
154
|
deployAgent(requestParameters: DeployAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentResource>;
|
|
139
155
|
/**
|
|
140
|
-
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable).
|
|
156
|
+
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable). ``origin=managed_agents`` is owner-only, matching the managed list: a teammate\'s published agent is a 404 here (not a 403, so the Managed Agents surface never confirms it exists).
|
|
141
157
|
* Get Agent
|
|
142
158
|
*/
|
|
143
159
|
getAgentRaw(requestParameters: GetAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentResource>>;
|
|
144
160
|
/**
|
|
145
|
-
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable).
|
|
161
|
+
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable). ``origin=managed_agents`` is owner-only, matching the managed list: a teammate\'s published agent is a 404 here (not a 403, so the Managed Agents surface never confirms it exists).
|
|
146
162
|
* Get Agent
|
|
147
163
|
*/
|
|
148
164
|
getAgent(requestParameters: GetAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentResource>;
|
|
@@ -154,6 +170,28 @@ export declare class AgentsApi extends runtime.BaseAPI {
|
|
|
154
170
|
* Get Agent File Route
|
|
155
171
|
*/
|
|
156
172
|
getAgentFile(requestParameters: GetAgentFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileNodeView>;
|
|
173
|
+
/**
|
|
174
|
+
* Get Agent Settings
|
|
175
|
+
*/
|
|
176
|
+
getAgentSettingsRaw(requestParameters: GetAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentSettingsResponse>>;
|
|
177
|
+
/**
|
|
178
|
+
* Get Agent Settings
|
|
179
|
+
*/
|
|
180
|
+
getAgentSettings(requestParameters: GetAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentSettingsResponse>;
|
|
181
|
+
/**
|
|
182
|
+
* JSON Schema of the settings file, with model/endpoint enums from the caller\'s tenant catalog (plain strings when the catalog is empty).
|
|
183
|
+
* Get Agent Settings Schema
|
|
184
|
+
*/
|
|
185
|
+
getAgentSettingsSchemaRaw(requestParameters: GetAgentSettingsSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
186
|
+
[key: string]: any;
|
|
187
|
+
}>>;
|
|
188
|
+
/**
|
|
189
|
+
* JSON Schema of the settings file, with model/endpoint enums from the caller\'s tenant catalog (plain strings when the catalog is empty).
|
|
190
|
+
* Get Agent Settings Schema
|
|
191
|
+
*/
|
|
192
|
+
getAgentSettingsSchema(requestParameters: GetAgentSettingsSchemaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
193
|
+
[key: string]: any;
|
|
194
|
+
}>;
|
|
157
195
|
/**
|
|
158
196
|
* One template\'s detail card — the same shape the list returns. 404s for an ordinary agent id: the gateway\'s template route enforces ``is_template=true``, so the gallery detail view can never surface a non-template agent.
|
|
159
197
|
* Get Agent Template
|
|
@@ -199,15 +237,25 @@ export declare class AgentsApi extends runtime.BaseAPI {
|
|
|
199
237
|
*/
|
|
200
238
|
listAgentTemplates(requestParameters?: ListAgentTemplatesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EntityListAgentTemplateResource>;
|
|
201
239
|
/**
|
|
202
|
-
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
240
|
+
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents the caller owns (:func:`is_owner`). A teammate\'s published managed agent is visible to the caller but its sessions are owner-only, so listing it would only lead to a 403 on the session log. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
203
241
|
* List Agents
|
|
204
242
|
*/
|
|
205
243
|
listAgentsRaw(requestParameters: ListAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EntityListAgentResource>>;
|
|
206
244
|
/**
|
|
207
|
-
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
245
|
+
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents the caller owns (:func:`is_owner`). A teammate\'s published managed agent is visible to the caller but its sessions are owner-only, so listing it would only lead to a 403 on the session log. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
208
246
|
* List Agents
|
|
209
247
|
*/
|
|
210
248
|
listAgents(requestParameters?: ListAgentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EntityListAgentResource>;
|
|
249
|
+
/**
|
|
250
|
+
* JSON Merge Patch (RFC 7396) onto the latest settings; ``null`` removes a key.
|
|
251
|
+
* Patch Agent Settings
|
|
252
|
+
*/
|
|
253
|
+
patchAgentSettingsRaw(requestParameters: PatchAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentSettingsResponse>>;
|
|
254
|
+
/**
|
|
255
|
+
* JSON Merge Patch (RFC 7396) onto the latest settings; ``null`` removes a key.
|
|
256
|
+
* Patch Agent Settings
|
|
257
|
+
*/
|
|
258
|
+
patchAgentSettings(requestParameters: PatchAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentSettingsResponse>;
|
|
211
259
|
/**
|
|
212
260
|
* Set the agent\'s audience, cascading owned dependencies gateway-side. Two shapes, one route. With no ``targetScope`` the agent widens exactly one step (user → workspace → organisation) — the original behaviour, kept so existing callers are untouched. With ``targetScope`` it lands on that audience directly, in either direction. Owner-only (checked here for a clean 403 before the gateway call). Gateway 409s (a dependency the caller can\'t widen) surface as ``CHAT_CONFLICT`` with the blocker message. ``targetScope: \"user\"`` is routed to the gateway\'s *unpublish*, not publish: narrowing to private is a different gateway operation (it also heals a legacy null owner), and publish has no ``user`` target at all. Folding it in here rather than making the FE pick an endpoint keeps the share picker a single call for all three options.
|
|
213
261
|
* Publish Agent
|
|
@@ -226,6 +274,16 @@ export declare class AgentsApi extends runtime.BaseAPI {
|
|
|
226
274
|
* Put Agent File Route
|
|
227
275
|
*/
|
|
228
276
|
putAgentFile(requestParameters: PutAgentFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileNodeView>;
|
|
277
|
+
/**
|
|
278
|
+
* Replace the whole settings object. Body is the settings object itself.
|
|
279
|
+
* Put Agent Settings
|
|
280
|
+
*/
|
|
281
|
+
putAgentSettingsRaw(requestParameters: PutAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AgentSettingsResponse>>;
|
|
282
|
+
/**
|
|
283
|
+
* Replace the whole settings object. Body is the settings object itself.
|
|
284
|
+
* Put Agent Settings
|
|
285
|
+
*/
|
|
286
|
+
putAgentSettings(requestParameters: PutAgentSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AgentSettingsResponse>;
|
|
229
287
|
/**
|
|
230
288
|
* Put Instructions
|
|
231
289
|
*/
|
|
@@ -293,6 +351,20 @@ export declare const CreateAgentXPanjaOriginEnum: {
|
|
|
293
351
|
readonly ManagedAgents: "managed_agents";
|
|
294
352
|
};
|
|
295
353
|
export type CreateAgentXPanjaOriginEnum = typeof CreateAgentXPanjaOriginEnum[keyof typeof CreateAgentXPanjaOriginEnum];
|
|
354
|
+
/**
|
|
355
|
+
* @export
|
|
356
|
+
*/
|
|
357
|
+
export declare const GetAgentOriginEnum: {
|
|
358
|
+
readonly ManagedAgents: "managed_agents";
|
|
359
|
+
};
|
|
360
|
+
export type GetAgentOriginEnum = typeof GetAgentOriginEnum[keyof typeof GetAgentOriginEnum];
|
|
361
|
+
/**
|
|
362
|
+
* @export
|
|
363
|
+
*/
|
|
364
|
+
export declare const GetAgentXPanjaOriginEnum: {
|
|
365
|
+
readonly ManagedAgents: "managed_agents";
|
|
366
|
+
};
|
|
367
|
+
export type GetAgentXPanjaOriginEnum = typeof GetAgentXPanjaOriginEnum[keyof typeof GetAgentXPanjaOriginEnum];
|
|
296
368
|
/**
|
|
297
369
|
* @export
|
|
298
370
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import * as runtime from '../runtime.js';
|
|
15
|
-
import { AgentCreateToJSON, AgentResourceFromJSON, AgentTemplateResourceFromJSON, AgentUpdateToJSON, EntityListAgentResourceFromJSON, EntityListAgentTemplateResourceFromJSON, FileNodeViewFromJSON, FileWriteBodyToJSON, InstructionsBodyToJSON, InstructionsResponseFromJSON, PageFileNodeViewFromJSON, PublishRequestToJSON, } from '../models/index.js';
|
|
15
|
+
import { AgentCreateToJSON, AgentResourceFromJSON, AgentSettingsResponseFromJSON, AgentTemplateResourceFromJSON, AgentUpdateToJSON, EntityListAgentResourceFromJSON, EntityListAgentTemplateResourceFromJSON, FileNodeViewFromJSON, FileWriteBodyToJSON, InstructionsBodyToJSON, InstructionsResponseFromJSON, PageFileNodeViewFromJSON, PublishRequestToJSON, } from '../models/index.js';
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
@@ -163,7 +163,7 @@ export class AgentsApi extends runtime.BaseAPI {
|
|
|
163
163
|
return await response.value();
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable).
|
|
166
|
+
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable). ``origin=managed_agents`` is owner-only, matching the managed list: a teammate\'s published agent is a 404 here (not a 403, so the Managed Agents surface never confirms it exists).
|
|
167
167
|
* Get Agent
|
|
168
168
|
*/
|
|
169
169
|
async getAgentRaw(requestParameters, initOverrides) {
|
|
@@ -171,7 +171,13 @@ export class AgentsApi extends runtime.BaseAPI {
|
|
|
171
171
|
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgent().');
|
|
172
172
|
}
|
|
173
173
|
const queryParameters = {};
|
|
174
|
+
if (requestParameters['origin'] != null) {
|
|
175
|
+
queryParameters['origin'] = requestParameters['origin'];
|
|
176
|
+
}
|
|
174
177
|
const headerParameters = {};
|
|
178
|
+
if (requestParameters['xPanjaOrigin'] != null) {
|
|
179
|
+
headerParameters['X-Panja-Origin'] = String(requestParameters['xPanjaOrigin']);
|
|
180
|
+
}
|
|
175
181
|
if (this.configuration && this.configuration.accessToken) {
|
|
176
182
|
const token = this.configuration.accessToken;
|
|
177
183
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -188,7 +194,7 @@ export class AgentsApi extends runtime.BaseAPI {
|
|
|
188
194
|
return new runtime.JSONApiResponse(response, (jsonValue) => AgentResourceFromJSON(jsonValue));
|
|
189
195
|
}
|
|
190
196
|
/**
|
|
191
|
-
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable).
|
|
197
|
+
* One agent the caller can see, or 404 (missing and non-visible are indistinguishable). ``origin=managed_agents`` is owner-only, matching the managed list: a teammate\'s published agent is a 404 here (not a 403, so the Managed Agents surface never confirms it exists).
|
|
192
198
|
* Get Agent
|
|
193
199
|
*/
|
|
194
200
|
async getAgent(requestParameters, initOverrides) {
|
|
@@ -229,6 +235,70 @@ export class AgentsApi extends runtime.BaseAPI {
|
|
|
229
235
|
const response = await this.getAgentFileRaw(requestParameters, initOverrides);
|
|
230
236
|
return await response.value();
|
|
231
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Get Agent Settings
|
|
240
|
+
*/
|
|
241
|
+
async getAgentSettingsRaw(requestParameters, initOverrides) {
|
|
242
|
+
if (requestParameters['agentId'] == null) {
|
|
243
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentSettings().');
|
|
244
|
+
}
|
|
245
|
+
const queryParameters = {};
|
|
246
|
+
const headerParameters = {};
|
|
247
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
248
|
+
const token = this.configuration.accessToken;
|
|
249
|
+
const tokenString = await token("bearerAuth", []);
|
|
250
|
+
if (tokenString) {
|
|
251
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
const response = await this.request({
|
|
255
|
+
path: `/v1/agents/{agentId}/settings`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
|
|
256
|
+
method: 'GET',
|
|
257
|
+
headers: headerParameters,
|
|
258
|
+
query: queryParameters,
|
|
259
|
+
}, initOverrides);
|
|
260
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AgentSettingsResponseFromJSON(jsonValue));
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Get Agent Settings
|
|
264
|
+
*/
|
|
265
|
+
async getAgentSettings(requestParameters, initOverrides) {
|
|
266
|
+
const response = await this.getAgentSettingsRaw(requestParameters, initOverrides);
|
|
267
|
+
return await response.value();
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* JSON Schema of the settings file, with model/endpoint enums from the caller\'s tenant catalog (plain strings when the catalog is empty).
|
|
271
|
+
* Get Agent Settings Schema
|
|
272
|
+
*/
|
|
273
|
+
async getAgentSettingsSchemaRaw(requestParameters, initOverrides) {
|
|
274
|
+
if (requestParameters['agentId'] == null) {
|
|
275
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling getAgentSettingsSchema().');
|
|
276
|
+
}
|
|
277
|
+
const queryParameters = {};
|
|
278
|
+
const headerParameters = {};
|
|
279
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
280
|
+
const token = this.configuration.accessToken;
|
|
281
|
+
const tokenString = await token("bearerAuth", []);
|
|
282
|
+
if (tokenString) {
|
|
283
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const response = await this.request({
|
|
287
|
+
path: `/v1/agents/{agentId}/settings/schema`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
|
|
288
|
+
method: 'GET',
|
|
289
|
+
headers: headerParameters,
|
|
290
|
+
query: queryParameters,
|
|
291
|
+
}, initOverrides);
|
|
292
|
+
return new runtime.JSONApiResponse(response);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* JSON Schema of the settings file, with model/endpoint enums from the caller\'s tenant catalog (plain strings when the catalog is empty).
|
|
296
|
+
* Get Agent Settings Schema
|
|
297
|
+
*/
|
|
298
|
+
async getAgentSettingsSchema(requestParameters, initOverrides) {
|
|
299
|
+
const response = await this.getAgentSettingsSchemaRaw(requestParameters, initOverrides);
|
|
300
|
+
return await response.value();
|
|
301
|
+
}
|
|
232
302
|
/**
|
|
233
303
|
* One template\'s detail card — the same shape the list returns. 404s for an ordinary agent id: the gateway\'s template route enforces ``is_template=true``, so the gallery detail view can never surface a non-template agent.
|
|
234
304
|
* Get Agent Template
|
|
@@ -404,7 +474,7 @@ export class AgentsApi extends runtime.BaseAPI {
|
|
|
404
474
|
return await response.value();
|
|
405
475
|
}
|
|
406
476
|
/**
|
|
407
|
-
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
477
|
+
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents the caller owns (:func:`is_owner`). A teammate\'s published managed agent is visible to the caller but its sessions are owner-only, so listing it would only lead to a 403 on the session log. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
408
478
|
* List Agents
|
|
409
479
|
*/
|
|
410
480
|
async listAgentsRaw(requestParameters, initOverrides) {
|
|
@@ -462,13 +532,51 @@ export class AgentsApi extends runtime.BaseAPI {
|
|
|
462
532
|
return new runtime.JSONApiResponse(response, (jsonValue) => EntityListAgentResourceFromJSON(jsonValue));
|
|
463
533
|
}
|
|
464
534
|
/**
|
|
465
|
-
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
535
|
+
* Flat, scope-filterable agent catalog (contract replaces v1\'s grouped ``GET /v1/agents``; the FE re-groups client-side from each row\'s ``scope``). One gateway call returns the caller\'s full visible set (the triple powers the gateway\'s ``visibility_scope`` clause). We then drop the operator-seeded editor agents, re-apply the visibility predicate (defence in depth — the gateway is identity-agnostic), and apply the ``?scope=``/``q`` filters before counting, so ``total`` is authoritative for the returned set. ``origin=managed_agents`` keeps only managed agents the caller owns (:func:`is_owner`). A teammate\'s published managed agent is visible to the caller but its sessions are owner-only, so listing it would only lead to a 403 on the session log. It always takes the fetch-all path below: the SQL catalog pages at the gateway, which knows nothing about ``managed_agents``, so filtering its page here would return short pages and a wrong ``total``. Catalog-only filters are therefore a 400 with ``origin`` rather than silently ignored.
|
|
466
536
|
* List Agents
|
|
467
537
|
*/
|
|
468
538
|
async listAgents(requestParameters = {}, initOverrides) {
|
|
469
539
|
const response = await this.listAgentsRaw(requestParameters, initOverrides);
|
|
470
540
|
return await response.value();
|
|
471
541
|
}
|
|
542
|
+
/**
|
|
543
|
+
* JSON Merge Patch (RFC 7396) onto the latest settings; ``null`` removes a key.
|
|
544
|
+
* Patch Agent Settings
|
|
545
|
+
*/
|
|
546
|
+
async patchAgentSettingsRaw(requestParameters, initOverrides) {
|
|
547
|
+
if (requestParameters['agentId'] == null) {
|
|
548
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling patchAgentSettings().');
|
|
549
|
+
}
|
|
550
|
+
if (requestParameters['body'] == null) {
|
|
551
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling patchAgentSettings().');
|
|
552
|
+
}
|
|
553
|
+
const queryParameters = {};
|
|
554
|
+
const headerParameters = {};
|
|
555
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
556
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
557
|
+
const token = this.configuration.accessToken;
|
|
558
|
+
const tokenString = await token("bearerAuth", []);
|
|
559
|
+
if (tokenString) {
|
|
560
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
const response = await this.request({
|
|
564
|
+
path: `/v1/agents/{agentId}/settings`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
|
|
565
|
+
method: 'PATCH',
|
|
566
|
+
headers: headerParameters,
|
|
567
|
+
query: queryParameters,
|
|
568
|
+
body: requestParameters['body'],
|
|
569
|
+
}, initOverrides);
|
|
570
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AgentSettingsResponseFromJSON(jsonValue));
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* JSON Merge Patch (RFC 7396) onto the latest settings; ``null`` removes a key.
|
|
574
|
+
* Patch Agent Settings
|
|
575
|
+
*/
|
|
576
|
+
async patchAgentSettings(requestParameters, initOverrides) {
|
|
577
|
+
const response = await this.patchAgentSettingsRaw(requestParameters, initOverrides);
|
|
578
|
+
return await response.value();
|
|
579
|
+
}
|
|
472
580
|
/**
|
|
473
581
|
* Set the agent\'s audience, cascading owned dependencies gateway-side. Two shapes, one route. With no ``targetScope`` the agent widens exactly one step (user → workspace → organisation) — the original behaviour, kept so existing callers are untouched. With ``targetScope`` it lands on that audience directly, in either direction. Owner-only (checked here for a clean 403 before the gateway call). Gateway 409s (a dependency the caller can\'t widen) surface as ``CHAT_CONFLICT`` with the blocker message. ``targetScope: \"user\"`` is routed to the gateway\'s *unpublish*, not publish: narrowing to private is a different gateway operation (it also heals a legacy null owner), and publish has no ``user`` target at all. Folding it in here rather than making the FE pick an endpoint keeps the share picker a single call for all three options.
|
|
474
582
|
* Publish Agent
|
|
@@ -543,6 +651,44 @@ export class AgentsApi extends runtime.BaseAPI {
|
|
|
543
651
|
const response = await this.putAgentFileRaw(requestParameters, initOverrides);
|
|
544
652
|
return await response.value();
|
|
545
653
|
}
|
|
654
|
+
/**
|
|
655
|
+
* Replace the whole settings object. Body is the settings object itself.
|
|
656
|
+
* Put Agent Settings
|
|
657
|
+
*/
|
|
658
|
+
async putAgentSettingsRaw(requestParameters, initOverrides) {
|
|
659
|
+
if (requestParameters['agentId'] == null) {
|
|
660
|
+
throw new runtime.RequiredError('agentId', 'Required parameter "agentId" was null or undefined when calling putAgentSettings().');
|
|
661
|
+
}
|
|
662
|
+
if (requestParameters['body'] == null) {
|
|
663
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling putAgentSettings().');
|
|
664
|
+
}
|
|
665
|
+
const queryParameters = {};
|
|
666
|
+
const headerParameters = {};
|
|
667
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
668
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
669
|
+
const token = this.configuration.accessToken;
|
|
670
|
+
const tokenString = await token("bearerAuth", []);
|
|
671
|
+
if (tokenString) {
|
|
672
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
const response = await this.request({
|
|
676
|
+
path: `/v1/agents/{agentId}/settings`.replace(`{${"agentId"}}`, runtime.encodePathParam('agentId', requestParameters['agentId'])),
|
|
677
|
+
method: 'PUT',
|
|
678
|
+
headers: headerParameters,
|
|
679
|
+
query: queryParameters,
|
|
680
|
+
body: requestParameters['body'],
|
|
681
|
+
}, initOverrides);
|
|
682
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AgentSettingsResponseFromJSON(jsonValue));
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Replace the whole settings object. Body is the settings object itself.
|
|
686
|
+
* Put Agent Settings
|
|
687
|
+
*/
|
|
688
|
+
async putAgentSettings(requestParameters, initOverrides) {
|
|
689
|
+
const response = await this.putAgentSettingsRaw(requestParameters, initOverrides);
|
|
690
|
+
return await response.value();
|
|
691
|
+
}
|
|
546
692
|
/**
|
|
547
693
|
* Put Instructions
|
|
548
694
|
*/
|
|
@@ -710,6 +856,18 @@ export const CreateAgentOriginEnum = {
|
|
|
710
856
|
export const CreateAgentXPanjaOriginEnum = {
|
|
711
857
|
ManagedAgents: 'managed_agents'
|
|
712
858
|
};
|
|
859
|
+
/**
|
|
860
|
+
* @export
|
|
861
|
+
*/
|
|
862
|
+
export const GetAgentOriginEnum = {
|
|
863
|
+
ManagedAgents: 'managed_agents'
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* @export
|
|
867
|
+
*/
|
|
868
|
+
export const GetAgentXPanjaOriginEnum = {
|
|
869
|
+
ManagedAgents: 'managed_agents'
|
|
870
|
+
};
|
|
713
871
|
/**
|
|
714
872
|
* @export
|
|
715
873
|
*/
|
|
@@ -10,11 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { ApiKeyBody, AppCategory, AppConnectResponse, AppToolsResponse, ConnectBody, EntityListAppResource, PageAppView, Scope } from '../models/index.js';
|
|
13
|
+
import type { ApiKeyBody, AppAccountsView, AppCategory, AppConnectResponse, AppResourceCheckView, AppResourcesView, AppToolsResponse, ConnectBody, EntityListAppResource, PageAppView, Scope } from '../models/index.js';
|
|
14
14
|
export interface BindAppRequest {
|
|
15
15
|
agentId: string;
|
|
16
16
|
mcpId: string;
|
|
17
17
|
}
|
|
18
|
+
export interface CheckAppResourceRequest {
|
|
19
|
+
integrationId: string;
|
|
20
|
+
namespace: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
18
23
|
export interface ConnectAppRequest {
|
|
19
24
|
integrationId: string;
|
|
20
25
|
connectBody?: ConnectBody;
|
|
@@ -26,9 +31,16 @@ export interface ConnectAppApikeyRequest {
|
|
|
26
31
|
export interface DisconnectAppRequest {
|
|
27
32
|
integrationId: string;
|
|
28
33
|
}
|
|
34
|
+
export interface GetAppAccountsRequest {
|
|
35
|
+
integrationId: string;
|
|
36
|
+
}
|
|
29
37
|
export interface ListAgentAppsRequest {
|
|
30
38
|
agentId: string;
|
|
31
39
|
}
|
|
40
|
+
export interface ListAppResourcesRequest {
|
|
41
|
+
integrationId: string;
|
|
42
|
+
q?: string | null;
|
|
43
|
+
}
|
|
32
44
|
export interface ListAppToolsRequest {
|
|
33
45
|
integrationId: string;
|
|
34
46
|
}
|
|
@@ -56,6 +68,16 @@ export declare class AppsApi extends runtime.BaseAPI {
|
|
|
56
68
|
* Bind App
|
|
57
69
|
*/
|
|
58
70
|
bindApp(requestParameters: BindAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
73
|
+
* Check App Resource
|
|
74
|
+
*/
|
|
75
|
+
checkAppResourceRaw(requestParameters: CheckAppResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResourceCheckView>>;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the connector can work in ``namespace/name`` for the caller. ``actionUrl`` is the provider page that fixes it: the owner\'s account (select the resource, or send the org an access request) or a new account with the owner preselected. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, not a managed connector, or an invalid namespace/name - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
78
|
+
* Check App Resource
|
|
79
|
+
*/
|
|
80
|
+
checkAppResource(requestParameters: CheckAppResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResourceCheckView>;
|
|
59
81
|
/**
|
|
60
82
|
* Start the OAuth connect flow for a connector. ``integration_id`` accepts either the human slug (``github``, ``composio-notion``) or the MCP ULID (``01MCPGH…``) — the database id. Resolution matches on both (see :func:`_resolve_mcp`). The ULID is the preferred identifier: it is what ``GET /v1/apps`` returns as ``mcpId`` and what ``GET /v2/apps`` returns as ``id``, so a caller that already holds the connector row never needs to resolve a slug.
|
|
61
83
|
* Connect App
|
|
@@ -86,6 +108,16 @@ export declare class AppsApi extends runtime.BaseAPI {
|
|
|
86
108
|
* Disconnect App
|
|
87
109
|
*/
|
|
88
110
|
disconnectApp(requestParameters: DisconnectAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
113
|
+
* Get App Accounts
|
|
114
|
+
*/
|
|
115
|
+
getAppAccountsRaw(requestParameters: GetAppAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppAccountsView>>;
|
|
116
|
+
/**
|
|
117
|
+
* The connected identity and linked accounts for a managed-connector card. Accounts are the ones this connector has that the caller can reach with their own connection. ``addAccountUrl`` adds another account; each account\'s ``manageUrl`` opens the provider page for choosing resources (or, for an org member, requesting access). Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
118
|
+
* Get App Accounts
|
|
119
|
+
*/
|
|
120
|
+
getAppAccounts(requestParameters: GetAppAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppAccountsView>;
|
|
89
121
|
/**
|
|
90
122
|
* List Agent Apps
|
|
91
123
|
*/
|
|
@@ -94,6 +126,16 @@ export declare class AppsApi extends runtime.BaseAPI {
|
|
|
94
126
|
* List Agent Apps
|
|
95
127
|
*/
|
|
96
128
|
listAgentApps(requestParameters: ListAgentAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PageAppView>;
|
|
129
|
+
/**
|
|
130
|
+
* Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
131
|
+
* List App Resources
|
|
132
|
+
*/
|
|
133
|
+
listAppResourcesRaw(requestParameters: ListAppResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppResourcesView>>;
|
|
134
|
+
/**
|
|
135
|
+
* Resources in the caller\'s linked accounts, filtered by ``q``. Only resources an account covers and the caller can access are listed. Raises: ChatServiceError: - CHAT_VALIDATION: unknown integration, or not a managed connector - CHAT_UPSTREAM: gateway / mcp-gateway / provider failure
|
|
136
|
+
* List App Resources
|
|
137
|
+
*/
|
|
138
|
+
listAppResources(requestParameters: ListAppResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppResourcesView>;
|
|
97
139
|
/**
|
|
98
140
|
* List the MCP tools for one connector. ``integration_id`` accepts the same slug-or-ULID forms as :func:`connect_app`. The FE holds ``AppResource.id`` (the MCP ULID) from ``GET /v2/apps`` and passes it here. Visibility is the catalog list — unknown or out-of-scope ids are a validation error, not a gateway 404, so a caller cannot probe ids they cannot see. Raises: ChatServiceError: - CHAT_VALIDATION: unknown or out-of-scope integration - CHAT_UPSTREAM: gateway / mcp-gateway failure
|
|
99
141
|
* List App Tools
|