sarvam-agents-client 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/README.md +15 -0
  2. package/dist/apis/AgentConversationsApi.d.ts +44 -1
  3. package/dist/apis/AgentConversationsApi.js +104 -1
  4. package/dist/apis/AgentsApi.d.ts +77 -5
  5. package/dist/apis/AgentsApi.js +163 -5
  6. package/dist/apis/AppsApi.d.ts +43 -1
  7. package/dist/apis/AppsApi.js +108 -0
  8. package/dist/apis/ArtifactsApi.d.ts +31 -1
  9. package/dist/apis/ArtifactsApi.js +82 -0
  10. package/dist/apis/CustomAPIsApi.d.ts +124 -0
  11. package/dist/apis/CustomAPIsApi.js +305 -0
  12. package/dist/apis/ModelsApi.d.ts +26 -0
  13. package/dist/apis/ModelsApi.js +52 -0
  14. package/dist/apis/index.d.ts +2 -0
  15. package/dist/apis/index.js +2 -0
  16. package/dist/compose/agent.d.ts +40 -0
  17. package/dist/compose/agent.js +191 -0
  18. package/dist/compose/deploy.d.ts +30 -0
  19. package/dist/compose/deploy.js +146 -0
  20. package/dist/compose/errors.d.ts +48 -0
  21. package/dist/compose/errors.js +68 -0
  22. package/dist/compose/events.d.ts +63 -0
  23. package/dist/compose/events.js +100 -0
  24. package/dist/compose/fingerprint.d.ts +6 -0
  25. package/dist/compose/fingerprint.js +83 -0
  26. package/dist/compose/index.d.ts +13 -0
  27. package/dist/compose/index.js +33 -0
  28. package/dist/compose/run.d.ts +100 -0
  29. package/dist/compose/run.js +536 -0
  30. package/dist/compose/runState.d.ts +26 -0
  31. package/dist/compose/runState.js +79 -0
  32. package/dist/compose/settingsTransport.d.ts +24 -0
  33. package/dist/compose/settingsTransport.js +280 -0
  34. package/dist/compose/tools.d.ts +17 -0
  35. package/dist/compose/tools.js +29 -0
  36. package/dist/compose/transport.d.ts +34 -0
  37. package/dist/compose/transport.js +2 -0
  38. package/dist/esm/apis/AgentConversationsApi.d.ts +44 -1
  39. package/dist/esm/apis/AgentConversationsApi.js +104 -1
  40. package/dist/esm/apis/AgentsApi.d.ts +77 -5
  41. package/dist/esm/apis/AgentsApi.js +163 -5
  42. package/dist/esm/apis/AppsApi.d.ts +43 -1
  43. package/dist/esm/apis/AppsApi.js +109 -1
  44. package/dist/esm/apis/ArtifactsApi.d.ts +31 -1
  45. package/dist/esm/apis/ArtifactsApi.js +83 -1
  46. package/dist/esm/apis/CustomAPIsApi.d.ts +124 -0
  47. package/dist/esm/apis/CustomAPIsApi.js +301 -0
  48. package/dist/esm/apis/ModelsApi.d.ts +26 -0
  49. package/dist/esm/apis/ModelsApi.js +48 -0
  50. package/dist/esm/apis/index.d.ts +2 -0
  51. package/dist/esm/apis/index.js +2 -0
  52. package/dist/esm/compose/agent.d.ts +40 -0
  53. package/dist/esm/compose/agent.js +187 -0
  54. package/dist/esm/compose/deploy.d.ts +30 -0
  55. package/dist/esm/compose/deploy.js +137 -0
  56. package/dist/esm/compose/errors.d.ts +48 -0
  57. package/dist/esm/compose/errors.js +53 -0
  58. package/dist/esm/compose/events.d.ts +63 -0
  59. package/dist/esm/compose/events.js +97 -0
  60. package/dist/esm/compose/fingerprint.d.ts +6 -0
  61. package/dist/esm/compose/fingerprint.js +78 -0
  62. package/dist/esm/compose/index.d.ts +13 -0
  63. package/dist/esm/compose/index.js +8 -0
  64. package/dist/esm/compose/run.d.ts +100 -0
  65. package/dist/esm/compose/run.js +530 -0
  66. package/dist/esm/compose/runState.d.ts +26 -0
  67. package/dist/esm/compose/runState.js +75 -0
  68. package/dist/esm/compose/settingsTransport.d.ts +24 -0
  69. package/dist/esm/compose/settingsTransport.js +276 -0
  70. package/dist/esm/compose/tools.d.ts +17 -0
  71. package/dist/esm/compose/tools.js +19 -0
  72. package/dist/esm/compose/transport.d.ts +34 -0
  73. package/dist/esm/compose/transport.js +1 -0
  74. package/dist/esm/models/AgentChannelRef.d.ts +1 -0
  75. package/dist/esm/models/AgentChannelRef.js +2 -1
  76. package/dist/esm/models/AgentConversationDetail.d.ts +15 -2
  77. package/dist/esm/models/AgentConversationDetail.js +6 -4
  78. package/dist/esm/models/AgentConversationView.d.ts +11 -5
  79. package/dist/esm/models/AgentConversationView.js +4 -4
  80. package/dist/esm/models/AgentCreate.d.ts +8 -0
  81. package/dist/esm/models/AgentCreate.js +2 -0
  82. package/dist/esm/models/AgentCustomApiList.d.ts +33 -0
  83. package/dist/esm/models/AgentCustomApiList.js +44 -0
  84. package/dist/esm/models/AgentResource.d.ts +14 -0
  85. package/dist/esm/models/AgentResource.js +4 -0
  86. package/dist/esm/models/AgentSettingsResponse.d.ts +53 -0
  87. package/dist/esm/models/AgentSettingsResponse.js +52 -0
  88. package/dist/esm/models/AgentUpdate.d.ts +8 -0
  89. package/dist/esm/models/AgentUpdate.js +2 -0
  90. package/dist/esm/models/AppAccountView.d.ts +88 -0
  91. package/dist/esm/models/AppAccountView.js +79 -0
  92. package/dist/esm/models/AppAccountsView.d.ts +66 -0
  93. package/dist/esm/models/AppAccountsView.js +60 -0
  94. package/dist/esm/models/AppResource.d.ts +36 -0
  95. package/dist/esm/models/AppResource.js +12 -0
  96. package/dist/esm/models/AppResourceCheckView.d.ts +74 -0
  97. package/dist/esm/models/AppResourceCheckView.js +63 -0
  98. package/dist/esm/models/AppResourceView.d.ts +68 -0
  99. package/dist/esm/models/AppResourceView.js +67 -0
  100. package/dist/esm/models/AppResourcesView.d.ts +54 -0
  101. package/dist/esm/models/AppResourcesView.js +56 -0
  102. package/dist/esm/models/AppToolsResponse.d.ts +14 -0
  103. package/dist/esm/models/AppToolsResponse.js +4 -0
  104. package/dist/esm/models/AppView.d.ts +42 -0
  105. package/dist/esm/models/AppView.js +14 -0
  106. package/dist/esm/models/ArtifactVersionResponse.d.ts +94 -0
  107. package/dist/esm/models/ArtifactVersionResponse.js +80 -0
  108. package/dist/esm/models/AttachedAgent.d.ts +44 -0
  109. package/dist/esm/models/AttachedAgent.js +49 -0
  110. package/dist/esm/models/Auth.d.ts +30 -0
  111. package/dist/esm/models/Auth.js +52 -0
  112. package/dist/esm/models/BindCustomApiBody.d.ts +32 -0
  113. package/dist/esm/models/BindCustomApiBody.js +43 -0
  114. package/dist/esm/models/ConversationArtifact.d.ts +14 -0
  115. package/dist/esm/models/ConversationArtifact.js +9 -0
  116. package/dist/esm/models/CustomApi.d.ts +102 -0
  117. package/dist/esm/models/CustomApi.js +90 -0
  118. package/dist/esm/models/CustomApiBasicAuth.d.ts +51 -0
  119. package/dist/esm/models/CustomApiBasicAuth.js +57 -0
  120. package/dist/esm/models/CustomApiBearerAuth.d.ts +45 -0
  121. package/dist/esm/models/CustomApiBearerAuth.js +53 -0
  122. package/dist/esm/models/CustomApiCreate.d.ts +57 -0
  123. package/dist/esm/models/CustomApiCreate.js +56 -0
  124. package/dist/esm/models/CustomApiHeader.d.ts +44 -0
  125. package/dist/esm/models/CustomApiHeader.js +47 -0
  126. package/dist/esm/models/CustomApiHeadersAuth.d.ts +46 -0
  127. package/dist/esm/models/CustomApiHeadersAuth.js +54 -0
  128. package/dist/esm/models/CustomApiList.d.ts +64 -0
  129. package/dist/esm/models/CustomApiList.js +64 -0
  130. package/dist/esm/models/CustomApiName.d.ts +44 -0
  131. package/dist/esm/models/CustomApiName.js +49 -0
  132. package/dist/esm/models/CustomApiUpdate.d.ts +58 -0
  133. package/dist/esm/models/CustomApiUpdate.js +50 -0
  134. package/dist/esm/models/CustomApiUpdateAuth.d.ts +30 -0
  135. package/dist/esm/models/CustomApiUpdateAuth.js +52 -0
  136. package/dist/esm/models/ErrorDetailItem.d.ts +5 -0
  137. package/dist/esm/models/ListModels403Response.d.ts +23 -0
  138. package/dist/esm/models/ListModels403Response.js +45 -0
  139. package/dist/esm/models/ModelEndpointView.d.ts +38 -0
  140. package/dist/esm/models/ModelEndpointView.js +45 -0
  141. package/dist/esm/models/ModelView.d.ts +69 -0
  142. package/dist/esm/models/ModelView.js +56 -0
  143. package/dist/esm/models/ModelsResponse.d.ts +33 -0
  144. package/dist/esm/models/ModelsResponse.js +44 -0
  145. package/dist/esm/models/SettingsIssueView.d.ts +44 -0
  146. package/dist/esm/models/SettingsIssueView.js +51 -0
  147. package/dist/esm/models/VersionCommitBody.d.ts +44 -0
  148. package/dist/esm/models/VersionCommitBody.js +51 -0
  149. package/dist/esm/models/VersionUploadUrlBody.d.ts +32 -0
  150. package/dist/esm/models/VersionUploadUrlBody.js +43 -0
  151. package/dist/esm/models/index.d.ts +28 -0
  152. package/dist/esm/models/index.js +28 -0
  153. package/dist/models/AgentChannelRef.d.ts +1 -0
  154. package/dist/models/AgentChannelRef.js +2 -1
  155. package/dist/models/AgentConversationDetail.d.ts +15 -2
  156. package/dist/models/AgentConversationDetail.js +6 -4
  157. package/dist/models/AgentConversationView.d.ts +11 -5
  158. package/dist/models/AgentConversationView.js +4 -4
  159. package/dist/models/AgentCreate.d.ts +8 -0
  160. package/dist/models/AgentCreate.js +2 -0
  161. package/dist/models/AgentCustomApiList.d.ts +33 -0
  162. package/dist/models/AgentCustomApiList.js +51 -0
  163. package/dist/models/AgentResource.d.ts +14 -0
  164. package/dist/models/AgentResource.js +4 -0
  165. package/dist/models/AgentSettingsResponse.d.ts +53 -0
  166. package/dist/models/AgentSettingsResponse.js +59 -0
  167. package/dist/models/AgentUpdate.d.ts +8 -0
  168. package/dist/models/AgentUpdate.js +2 -0
  169. package/dist/models/AppAccountView.d.ts +88 -0
  170. package/dist/models/AppAccountView.js +87 -0
  171. package/dist/models/AppAccountsView.d.ts +66 -0
  172. package/dist/models/AppAccountsView.js +68 -0
  173. package/dist/models/AppResource.d.ts +36 -0
  174. package/dist/models/AppResource.js +12 -0
  175. package/dist/models/AppResourceCheckView.d.ts +74 -0
  176. package/dist/models/AppResourceCheckView.js +71 -0
  177. package/dist/models/AppResourceView.d.ts +68 -0
  178. package/dist/models/AppResourceView.js +74 -0
  179. package/dist/models/AppResourcesView.d.ts +54 -0
  180. package/dist/models/AppResourcesView.js +64 -0
  181. package/dist/models/AppToolsResponse.d.ts +14 -0
  182. package/dist/models/AppToolsResponse.js +4 -0
  183. package/dist/models/AppView.d.ts +42 -0
  184. package/dist/models/AppView.js +14 -0
  185. package/dist/models/ArtifactVersionResponse.d.ts +94 -0
  186. package/dist/models/ArtifactVersionResponse.js +88 -0
  187. package/dist/models/AttachedAgent.d.ts +44 -0
  188. package/dist/models/AttachedAgent.js +56 -0
  189. package/dist/models/Auth.d.ts +30 -0
  190. package/dist/models/Auth.js +58 -0
  191. package/dist/models/BindCustomApiBody.d.ts +32 -0
  192. package/dist/models/BindCustomApiBody.js +50 -0
  193. package/dist/models/ConversationArtifact.d.ts +14 -0
  194. package/dist/models/ConversationArtifact.js +10 -0
  195. package/dist/models/CustomApi.d.ts +102 -0
  196. package/dist/models/CustomApi.js +98 -0
  197. package/dist/models/CustomApiBasicAuth.d.ts +51 -0
  198. package/dist/models/CustomApiBasicAuth.js +65 -0
  199. package/dist/models/CustomApiBearerAuth.d.ts +45 -0
  200. package/dist/models/CustomApiBearerAuth.js +61 -0
  201. package/dist/models/CustomApiCreate.d.ts +57 -0
  202. package/dist/models/CustomApiCreate.js +63 -0
  203. package/dist/models/CustomApiHeader.d.ts +44 -0
  204. package/dist/models/CustomApiHeader.js +54 -0
  205. package/dist/models/CustomApiHeadersAuth.d.ts +46 -0
  206. package/dist/models/CustomApiHeadersAuth.js +62 -0
  207. package/dist/models/CustomApiList.d.ts +64 -0
  208. package/dist/models/CustomApiList.js +71 -0
  209. package/dist/models/CustomApiName.d.ts +44 -0
  210. package/dist/models/CustomApiName.js +56 -0
  211. package/dist/models/CustomApiUpdate.d.ts +58 -0
  212. package/dist/models/CustomApiUpdate.js +57 -0
  213. package/dist/models/CustomApiUpdateAuth.d.ts +30 -0
  214. package/dist/models/CustomApiUpdateAuth.js +58 -0
  215. package/dist/models/ErrorDetailItem.d.ts +5 -0
  216. package/dist/models/ListModels403Response.d.ts +23 -0
  217. package/dist/models/ListModels403Response.js +51 -0
  218. package/dist/models/ModelEndpointView.d.ts +38 -0
  219. package/dist/models/ModelEndpointView.js +52 -0
  220. package/dist/models/ModelView.d.ts +69 -0
  221. package/dist/models/ModelView.js +63 -0
  222. package/dist/models/ModelsResponse.d.ts +33 -0
  223. package/dist/models/ModelsResponse.js +51 -0
  224. package/dist/models/SettingsIssueView.d.ts +44 -0
  225. package/dist/models/SettingsIssueView.js +58 -0
  226. package/dist/models/VersionCommitBody.d.ts +44 -0
  227. package/dist/models/VersionCommitBody.js +58 -0
  228. package/dist/models/VersionUploadUrlBody.d.ts +32 -0
  229. package/dist/models/VersionUploadUrlBody.js +50 -0
  230. package/dist/models/index.d.ts +28 -0
  231. package/dist/models/index.js +28 -0
  232. package/package.json +15 -2
  233. package/src/apis/AgentConversationsApi.ts +172 -3
  234. package/src/apis/AgentsApi.ts +242 -7
  235. package/src/apis/AppsApi.ts +174 -3
  236. package/src/apis/ArtifactsApi.ts +144 -0
  237. package/src/apis/ClarifyApi.ts +3 -3
  238. package/src/apis/CollectionsApi.ts +3 -3
  239. package/src/apis/ConversationsApi.ts +3 -3
  240. package/src/apis/CronsApi.ts +3 -3
  241. package/src/apis/CustomAPIsApi.ts +471 -0
  242. package/src/apis/MessagesApi.ts +3 -3
  243. package/src/apis/ModelsApi.ts +70 -0
  244. package/src/apis/QueueApi.ts +3 -3
  245. package/src/apis/ResponsesApi.ts +3 -3
  246. package/src/apis/SkillsApi.ts +3 -3
  247. package/src/apis/index.ts +2 -0
  248. package/src/compose/agent.ts +223 -0
  249. package/src/compose/deploy.ts +168 -0
  250. package/src/compose/errors.ts +66 -0
  251. package/src/compose/events.ts +122 -0
  252. package/src/compose/fingerprint.ts +74 -0
  253. package/src/compose/index.ts +13 -0
  254. package/src/compose/run.ts +601 -0
  255. package/src/compose/runState.ts +95 -0
  256. package/src/compose/settingsTransport.ts +299 -0
  257. package/src/compose/tools.ts +27 -0
  258. package/src/compose/transport.ts +48 -0
  259. package/src/models/AgentChannelRef.ts +2 -1
  260. package/src/models/AgentConversationDetail.ts +21 -5
  261. package/src/models/AgentConversationView.ts +15 -8
  262. package/src/models/AgentCreate.ts +8 -0
  263. package/src/models/AgentCustomApiList.ts +74 -0
  264. package/src/models/AgentResource.ts +16 -0
  265. package/src/models/AgentSettingsResponse.ts +99 -0
  266. package/src/models/AgentUpdate.ts +8 -0
  267. package/src/models/AppAccountView.ts +143 -0
  268. package/src/models/AppAccountsView.ts +118 -0
  269. package/src/models/AppResource.ts +48 -0
  270. package/src/models/AppResourceCheckView.ts +117 -0
  271. package/src/models/AppResourceView.ts +120 -0
  272. package/src/models/AppResourcesView.ts +102 -0
  273. package/src/models/AppToolsResponse.ts +16 -0
  274. package/src/models/AppView.ts +56 -0
  275. package/src/models/ArtifactVersionResponse.ts +155 -0
  276. package/src/models/AttachedAgent.ts +83 -0
  277. package/src/models/Auth.ts +84 -0
  278. package/src/models/BindCustomApiBody.ts +66 -0
  279. package/src/models/ConversationArtifact.ts +19 -0
  280. package/src/models/CustomApi.ts +175 -0
  281. package/src/models/CustomApiBasicAuth.ts +94 -0
  282. package/src/models/CustomApiBearerAuth.ts +85 -0
  283. package/src/models/CustomApiCreate.ts +108 -0
  284. package/src/models/CustomApiHeader.ts +82 -0
  285. package/src/models/CustomApiHeadersAuth.ts +93 -0
  286. package/src/models/CustomApiList.ts +120 -0
  287. package/src/models/CustomApiName.ts +83 -0
  288. package/src/models/CustomApiUpdate.ts +106 -0
  289. package/src/models/CustomApiUpdateAuth.ts +84 -0
  290. package/src/models/ErrorDetailItem.ts +5 -0
  291. package/src/models/ListModels403Response.ts +73 -0
  292. package/src/models/ModelEndpointView.ts +74 -0
  293. package/src/models/ModelView.ts +122 -0
  294. package/src/models/ModelsResponse.ts +74 -0
  295. package/src/models/SettingsIssueView.ts +84 -0
  296. package/src/models/VersionCommitBody.ts +84 -0
  297. package/src/models/VersionUploadUrlBody.ts +66 -0
  298. package/src/models/index.ts +28 -0
@@ -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
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
- import { ApiKeyBodyToJSON, AppConnectResponseFromJSON, AppToolsResponseFromJSON, ConnectBodyToJSON, EntityListAppResourceFromJSON, PageAppViewFromJSON, } from '../models/index.js';
15
+ import { ApiKeyBodyToJSON, AppAccountsViewFromJSON, AppConnectResponseFromJSON, AppResourceCheckViewFromJSON, AppResourcesViewFromJSON, AppToolsResponseFromJSON, ConnectBodyToJSON, EntityListAppResourceFromJSON, PageAppViewFromJSON, } from '../models/index.js';
16
16
  /**
17
17
  *
18
18
  */
@@ -50,6 +50,45 @@ export class AppsApi extends runtime.BaseAPI {
50
50
  async bindApp(requestParameters, initOverrides) {
51
51
  await this.bindAppRaw(requestParameters, initOverrides);
52
52
  }
53
+ /**
54
+ * 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
55
+ * Check App Resource
56
+ */
57
+ async checkAppResourceRaw(requestParameters, initOverrides) {
58
+ if (requestParameters['integrationId'] == null) {
59
+ throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling checkAppResource().');
60
+ }
61
+ if (requestParameters['namespace'] == null) {
62
+ throw new runtime.RequiredError('namespace', 'Required parameter "namespace" was null or undefined when calling checkAppResource().');
63
+ }
64
+ if (requestParameters['name'] == null) {
65
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling checkAppResource().');
66
+ }
67
+ const queryParameters = {};
68
+ const headerParameters = {};
69
+ if (this.configuration && this.configuration.accessToken) {
70
+ const token = this.configuration.accessToken;
71
+ const tokenString = await token("bearerAuth", []);
72
+ if (tokenString) {
73
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
74
+ }
75
+ }
76
+ const response = await this.request({
77
+ path: `/v1/apps/{integrationId}/resources/{namespace}/{name}`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])).replace(`{${"namespace"}}`, runtime.encodePathParam('namespace', requestParameters['namespace'])).replace(`{${"name"}}`, runtime.encodePathParam('name', requestParameters['name'])),
78
+ method: 'GET',
79
+ headers: headerParameters,
80
+ query: queryParameters,
81
+ }, initOverrides);
82
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppResourceCheckViewFromJSON(jsonValue));
83
+ }
84
+ /**
85
+ * 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
86
+ * Check App Resource
87
+ */
88
+ async checkAppResource(requestParameters, initOverrides) {
89
+ const response = await this.checkAppResourceRaw(requestParameters, initOverrides);
90
+ return await response.value();
91
+ }
53
92
  /**
54
93
  * 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.
55
94
  * Connect App
@@ -154,6 +193,39 @@ export class AppsApi extends runtime.BaseAPI {
154
193
  async disconnectApp(requestParameters, initOverrides) {
155
194
  await this.disconnectAppRaw(requestParameters, initOverrides);
156
195
  }
196
+ /**
197
+ * 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
198
+ * Get App Accounts
199
+ */
200
+ async getAppAccountsRaw(requestParameters, initOverrides) {
201
+ if (requestParameters['integrationId'] == null) {
202
+ throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling getAppAccounts().');
203
+ }
204
+ const queryParameters = {};
205
+ const headerParameters = {};
206
+ if (this.configuration && this.configuration.accessToken) {
207
+ const token = this.configuration.accessToken;
208
+ const tokenString = await token("bearerAuth", []);
209
+ if (tokenString) {
210
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
211
+ }
212
+ }
213
+ const response = await this.request({
214
+ path: `/v1/apps/{integrationId}/accounts`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])),
215
+ method: 'GET',
216
+ headers: headerParameters,
217
+ query: queryParameters,
218
+ }, initOverrides);
219
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppAccountsViewFromJSON(jsonValue));
220
+ }
221
+ /**
222
+ * 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
223
+ * Get App Accounts
224
+ */
225
+ async getAppAccounts(requestParameters, initOverrides) {
226
+ const response = await this.getAppAccountsRaw(requestParameters, initOverrides);
227
+ return await response.value();
228
+ }
157
229
  /**
158
230
  * List Agent Apps
159
231
  */
@@ -185,6 +257,42 @@ export class AppsApi extends runtime.BaseAPI {
185
257
  const response = await this.listAgentAppsRaw(requestParameters, initOverrides);
186
258
  return await response.value();
187
259
  }
260
+ /**
261
+ * 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
262
+ * List App Resources
263
+ */
264
+ async listAppResourcesRaw(requestParameters, initOverrides) {
265
+ if (requestParameters['integrationId'] == null) {
266
+ throw new runtime.RequiredError('integrationId', 'Required parameter "integrationId" was null or undefined when calling listAppResources().');
267
+ }
268
+ const queryParameters = {};
269
+ if (requestParameters['q'] != null) {
270
+ queryParameters['q'] = requestParameters['q'];
271
+ }
272
+ const headerParameters = {};
273
+ if (this.configuration && this.configuration.accessToken) {
274
+ const token = this.configuration.accessToken;
275
+ const tokenString = await token("bearerAuth", []);
276
+ if (tokenString) {
277
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
278
+ }
279
+ }
280
+ const response = await this.request({
281
+ path: `/v1/apps/{integrationId}/resources`.replace(`{${"integrationId"}}`, runtime.encodePathParam('integrationId', requestParameters['integrationId'])),
282
+ method: 'GET',
283
+ headers: headerParameters,
284
+ query: queryParameters,
285
+ }, initOverrides);
286
+ return new runtime.JSONApiResponse(response, (jsonValue) => AppResourcesViewFromJSON(jsonValue));
287
+ }
288
+ /**
289
+ * 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
290
+ * List App Resources
291
+ */
292
+ async listAppResources(requestParameters, initOverrides) {
293
+ const response = await this.listAppResourcesRaw(requestParameters, initOverrides);
294
+ return await response.value();
295
+ }
188
296
  /**
189
297
  * 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
190
298
  * List App Tools