@corti/sdk 0.2.0-agents → 0.3.0-rc

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 (527) hide show
  1. package/dist/cjs/Client.d.ts +0 -3
  2. package/dist/cjs/Client.js +6 -11
  3. package/dist/cjs/api/resources/facts/client/Client.d.ts +19 -0
  4. package/dist/cjs/api/resources/facts/client/Client.js +87 -0
  5. package/dist/cjs/api/resources/facts/client/requests/FactsExtractRequest.d.ts +19 -0
  6. package/dist/cjs/api/resources/facts/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/index.d.ts +0 -3
  8. package/dist/cjs/api/resources/index.js +1 -4
  9. package/dist/cjs/api/resources/transcripts/client/Client.d.ts +2 -2
  10. package/dist/cjs/api/resources/transcripts/client/Client.js +2 -2
  11. package/dist/cjs/api/types/CommonTextContext.d.ts +9 -0
  12. package/dist/cjs/api/types/CommonUsageInfo.d.ts +3 -0
  13. package/dist/cjs/api/types/DocumentsContext.d.ts +1 -12
  14. package/dist/cjs/api/types/DocumentsContextWithFacts.d.ts +2 -0
  15. package/dist/cjs/api/types/DocumentsContextWithString.d.ts +2 -0
  16. package/dist/cjs/api/types/DocumentsContextWithTranscript.d.ts +2 -0
  17. package/dist/cjs/api/types/FactsExtractResponse.d.ts +11 -0
  18. package/dist/cjs/api/types/FactsExtractResponseFactsItem.d.ts +9 -0
  19. package/dist/cjs/api/types/index.d.ts +3 -43
  20. package/dist/cjs/api/types/index.js +3 -43
  21. package/dist/cjs/core/index.d.ts +0 -1
  22. package/dist/cjs/core/index.js +0 -1
  23. package/dist/cjs/custom/CortiClient.d.ts +0 -3
  24. package/dist/cjs/custom/CortiClient.js +0 -5
  25. package/dist/cjs/serialization/resources/facts/client/requests/FactsExtractRequest.d.ts +14 -0
  26. package/dist/cjs/serialization/{types/AgentsAgentReference.js → resources/facts/client/requests/FactsExtractRequest.js} +6 -6
  27. package/dist/cjs/serialization/resources/facts/client/requests/index.d.ts +1 -0
  28. package/dist/cjs/serialization/resources/facts/client/requests/index.js +3 -1
  29. package/dist/cjs/serialization/resources/index.d.ts +0 -3
  30. package/dist/cjs/serialization/resources/index.js +1 -4
  31. package/dist/cjs/serialization/types/{AgentsTextPart.d.ts → CommonTextContext.d.ts} +3 -4
  32. package/dist/cjs/serialization/types/{AgentsMcpServerTransportType.js → CommonTextContext.js} +5 -2
  33. package/dist/cjs/serialization/types/DocumentsContext.d.ts +1 -10
  34. package/dist/cjs/serialization/types/DocumentsContext.js +5 -10
  35. package/dist/cjs/serialization/types/DocumentsContextWithFacts.d.ts +1 -0
  36. package/dist/cjs/serialization/types/DocumentsContextWithFacts.js +1 -0
  37. package/dist/cjs/serialization/types/DocumentsContextWithString.d.ts +1 -0
  38. package/dist/cjs/serialization/types/DocumentsContextWithString.js +1 -0
  39. package/dist/cjs/serialization/types/DocumentsContextWithTranscript.d.ts +1 -0
  40. package/dist/cjs/serialization/types/DocumentsContextWithTranscript.js +1 -0
  41. package/dist/cjs/serialization/types/FactsExtractResponse.d.ts +16 -0
  42. package/dist/cjs/serialization/types/{AgentsAgentExtension.js → FactsExtractResponse.js} +7 -6
  43. package/dist/cjs/serialization/types/FactsExtractResponseFactsItem.d.ts +13 -0
  44. package/dist/cjs/serialization/types/{AgentsCreateMcpServerAuthorizationType.js → FactsExtractResponseFactsItem.js} +5 -2
  45. package/dist/cjs/serialization/types/index.d.ts +3 -43
  46. package/dist/cjs/serialization/types/index.js +3 -43
  47. package/dist/cjs/version.d.ts +1 -1
  48. package/dist/cjs/version.js +1 -1
  49. package/dist/esm/Client.d.mts +0 -3
  50. package/dist/esm/Client.mjs +2 -7
  51. package/dist/esm/api/resources/facts/client/Client.d.mts +19 -0
  52. package/dist/esm/api/resources/facts/client/Client.mjs +87 -0
  53. package/dist/esm/api/resources/facts/client/requests/FactsExtractRequest.d.mts +19 -0
  54. package/dist/esm/api/resources/facts/client/requests/index.d.mts +1 -0
  55. package/dist/esm/api/resources/index.d.mts +0 -3
  56. package/dist/esm/api/resources/index.mjs +0 -3
  57. package/dist/esm/api/resources/transcripts/client/Client.d.mts +2 -2
  58. package/dist/esm/api/resources/transcripts/client/Client.mjs +2 -2
  59. package/dist/esm/api/types/CommonTextContext.d.mts +9 -0
  60. package/dist/esm/api/types/CommonUsageInfo.d.mts +3 -0
  61. package/dist/esm/api/types/DocumentsContext.d.mts +1 -12
  62. package/dist/esm/api/types/DocumentsContextWithFacts.d.mts +2 -0
  63. package/dist/esm/api/types/DocumentsContextWithString.d.mts +2 -0
  64. package/dist/esm/api/types/DocumentsContextWithTranscript.d.mts +2 -0
  65. package/dist/esm/api/types/FactsExtractResponse.d.mts +11 -0
  66. package/dist/esm/api/types/FactsExtractResponseFactsItem.d.mts +9 -0
  67. package/dist/esm/api/types/index.d.mts +3 -43
  68. package/dist/esm/api/types/index.mjs +3 -43
  69. package/dist/esm/core/index.d.mts +0 -1
  70. package/dist/esm/core/index.mjs +0 -1
  71. package/dist/esm/custom/CortiClient.d.mts +0 -3
  72. package/dist/esm/custom/CortiClient.mjs +0 -5
  73. package/dist/esm/serialization/resources/facts/client/requests/FactsExtractRequest.d.mts +14 -0
  74. package/dist/esm/serialization/resources/facts/client/requests/FactsExtractRequest.mjs +9 -0
  75. package/dist/esm/serialization/resources/facts/client/requests/index.d.mts +1 -0
  76. package/dist/esm/serialization/resources/facts/client/requests/index.mjs +1 -0
  77. package/dist/esm/serialization/resources/index.d.mts +0 -3
  78. package/dist/esm/serialization/resources/index.mjs +0 -3
  79. package/dist/esm/serialization/types/{AgentsTextPart.d.mts → CommonTextContext.d.mts} +3 -4
  80. package/dist/esm/serialization/types/CommonTextContext.mjs +8 -0
  81. package/dist/esm/serialization/types/DocumentsContext.d.mts +1 -10
  82. package/dist/esm/serialization/types/DocumentsContext.mjs +5 -10
  83. package/dist/esm/serialization/types/DocumentsContextWithFacts.d.mts +1 -0
  84. package/dist/esm/serialization/types/DocumentsContextWithFacts.mjs +1 -0
  85. package/dist/esm/serialization/types/DocumentsContextWithString.d.mts +1 -0
  86. package/dist/esm/serialization/types/DocumentsContextWithString.mjs +1 -0
  87. package/dist/esm/serialization/types/DocumentsContextWithTranscript.d.mts +1 -0
  88. package/dist/esm/serialization/types/DocumentsContextWithTranscript.mjs +1 -0
  89. package/dist/esm/serialization/types/FactsExtractResponse.d.mts +16 -0
  90. package/dist/esm/serialization/types/FactsExtractResponse.mjs +11 -0
  91. package/dist/esm/serialization/types/FactsExtractResponseFactsItem.d.mts +13 -0
  92. package/dist/esm/serialization/types/FactsExtractResponseFactsItem.mjs +8 -0
  93. package/dist/esm/serialization/types/index.d.mts +3 -43
  94. package/dist/esm/serialization/types/index.mjs +3 -43
  95. package/dist/esm/version.d.mts +1 -1
  96. package/dist/esm/version.mjs +1 -1
  97. package/package.json +1 -1
  98. package/dist/cjs/api/resources/agents/client/Client.d.ts +0 -197
  99. package/dist/cjs/api/resources/agents/client/Client.js +0 -876
  100. package/dist/cjs/api/resources/agents/client/index.d.ts +0 -2
  101. package/dist/cjs/api/resources/agents/client/index.js +0 -17
  102. package/dist/cjs/api/resources/agents/client/requests/AgentsCreateAgent.d.ts +0 -20
  103. package/dist/cjs/api/resources/agents/client/requests/AgentsGetContextRequest.d.ts +0 -17
  104. package/dist/cjs/api/resources/agents/client/requests/AgentsGetTaskRequest.d.ts +0 -13
  105. package/dist/cjs/api/resources/agents/client/requests/AgentsListRequest.d.ts +0 -17
  106. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +0 -4
  107. package/dist/cjs/api/resources/agents/client/requests/index.js +0 -2
  108. package/dist/cjs/api/resources/agents/index.d.ts +0 -2
  109. package/dist/cjs/api/resources/agents/index.js +0 -18
  110. package/dist/cjs/api/resources/agents/types/AgentsCreateAgentExpertsItem.d.ts +0 -5
  111. package/dist/cjs/api/resources/agents/types/AgentsCreateAgentExpertsItem.js +0 -5
  112. package/dist/cjs/api/resources/agents/types/AgentsMessageSendResponse.d.ts +0 -8
  113. package/dist/cjs/api/resources/agents/types/AgentsMessageSendResponse.js +0 -5
  114. package/dist/cjs/api/resources/agents/types/AgentsMessageStreamResponse.d.ts +0 -10
  115. package/dist/cjs/api/resources/agents/types/AgentsMessageStreamResponse.js +0 -5
  116. package/dist/cjs/api/resources/agents/types/index.d.ts +0 -3
  117. package/dist/cjs/api/resources/agents/types/index.js +0 -19
  118. package/dist/cjs/api/types/AgentsAgent.d.ts +0 -15
  119. package/dist/cjs/api/types/AgentsAgent.js +0 -5
  120. package/dist/cjs/api/types/AgentsAgentCapabilities.d.ts +0 -14
  121. package/dist/cjs/api/types/AgentsAgentCapabilities.js +0 -5
  122. package/dist/cjs/api/types/AgentsAgentCard.d.ts +0 -36
  123. package/dist/cjs/api/types/AgentsAgentCard.js +0 -5
  124. package/dist/cjs/api/types/AgentsAgentCardPreferredTransport.d.ts +0 -5
  125. package/dist/cjs/api/types/AgentsAgentCardPreferredTransport.js +0 -5
  126. package/dist/cjs/api/types/AgentsAgentCardSignature.d.ts +0 -11
  127. package/dist/cjs/api/types/AgentsAgentCardSignature.js +0 -5
  128. package/dist/cjs/api/types/AgentsAgentExpertsItem.d.ts +0 -5
  129. package/dist/cjs/api/types/AgentsAgentExpertsItem.js +0 -5
  130. package/dist/cjs/api/types/AgentsAgentExtension.d.ts +0 -13
  131. package/dist/cjs/api/types/AgentsAgentExtension.js +0 -5
  132. package/dist/cjs/api/types/AgentsAgentInterface.d.ts +0 -9
  133. package/dist/cjs/api/types/AgentsAgentInterface.js +0 -5
  134. package/dist/cjs/api/types/AgentsAgentInterfaceTransport.d.ts +0 -5
  135. package/dist/cjs/api/types/AgentsAgentInterfaceTransport.js +0 -5
  136. package/dist/cjs/api/types/AgentsAgentReference.d.ts +0 -13
  137. package/dist/cjs/api/types/AgentsAgentReference.js +0 -5
  138. package/dist/cjs/api/types/AgentsAgentResponse.d.ts +0 -5
  139. package/dist/cjs/api/types/AgentsAgentResponse.js +0 -5
  140. package/dist/cjs/api/types/AgentsAgentSkill.d.ts +0 -22
  141. package/dist/cjs/api/types/AgentsAgentSkill.js +0 -5
  142. package/dist/cjs/api/types/AgentsArtifact.d.ts +0 -18
  143. package/dist/cjs/api/types/AgentsArtifact.js +0 -5
  144. package/dist/cjs/api/types/AgentsContext.d.ts +0 -9
  145. package/dist/cjs/api/types/AgentsContext.js +0 -5
  146. package/dist/cjs/api/types/AgentsContextItemsItem.d.ts +0 -5
  147. package/dist/cjs/api/types/AgentsContextItemsItem.js +0 -5
  148. package/dist/cjs/api/types/AgentsCreateExpert.d.ts +0 -15
  149. package/dist/cjs/api/types/AgentsCreateExpert.js +0 -5
  150. package/dist/cjs/api/types/AgentsCreateMcpServer.d.ts +0 -20
  151. package/dist/cjs/api/types/AgentsCreateMcpServer.js +0 -5
  152. package/dist/cjs/api/types/AgentsCreateMcpServerAuthorizationType.d.ts +0 -13
  153. package/dist/cjs/api/types/AgentsCreateMcpServerAuthorizationType.js +0 -12
  154. package/dist/cjs/api/types/AgentsCreateMcpServerTransportType.d.ts +0 -12
  155. package/dist/cjs/api/types/AgentsCreateMcpServerTransportType.js +0 -11
  156. package/dist/cjs/api/types/AgentsDataPart.d.ts +0 -11
  157. package/dist/cjs/api/types/AgentsDataPart.js +0 -5
  158. package/dist/cjs/api/types/AgentsExpert.d.ts +0 -17
  159. package/dist/cjs/api/types/AgentsExpert.js +0 -5
  160. package/dist/cjs/api/types/AgentsExpertReference.d.ts +0 -13
  161. package/dist/cjs/api/types/AgentsExpertReference.js +0 -5
  162. package/dist/cjs/api/types/AgentsFilePart.d.ts +0 -11
  163. package/dist/cjs/api/types/AgentsFilePart.js +0 -5
  164. package/dist/cjs/api/types/AgentsFilePartFile.d.ts +0 -5
  165. package/dist/cjs/api/types/AgentsFilePartFile.js +0 -5
  166. package/dist/cjs/api/types/AgentsFileWithBytes.d.ts +0 -11
  167. package/dist/cjs/api/types/AgentsFileWithBytes.js +0 -5
  168. package/dist/cjs/api/types/AgentsFileWithUri.d.ts +0 -11
  169. package/dist/cjs/api/types/AgentsFileWithUri.js +0 -5
  170. package/dist/cjs/api/types/AgentsMcpServer.d.ts +0 -18
  171. package/dist/cjs/api/types/AgentsMcpServer.js +0 -5
  172. package/dist/cjs/api/types/AgentsMcpServerAuthorizationType.d.ts +0 -12
  173. package/dist/cjs/api/types/AgentsMcpServerAuthorizationType.js +0 -11
  174. package/dist/cjs/api/types/AgentsMcpServerTransportType.d.ts +0 -11
  175. package/dist/cjs/api/types/AgentsMcpServerTransportType.js +0 -10
  176. package/dist/cjs/api/types/AgentsMessage.d.ts +0 -24
  177. package/dist/cjs/api/types/AgentsMessage.js +0 -5
  178. package/dist/cjs/api/types/AgentsMessageRole.d.ts +0 -11
  179. package/dist/cjs/api/types/AgentsMessageRole.js +0 -10
  180. package/dist/cjs/api/types/AgentsMessageSendConfiguration.d.ts +0 -13
  181. package/dist/cjs/api/types/AgentsMessageSendConfiguration.js +0 -5
  182. package/dist/cjs/api/types/AgentsMessageSendParams.d.ts +0 -10
  183. package/dist/cjs/api/types/AgentsMessageSendParams.js +0 -5
  184. package/dist/cjs/api/types/AgentsPart.d.ts +0 -5
  185. package/dist/cjs/api/types/AgentsPart.js +0 -5
  186. package/dist/cjs/api/types/AgentsPushNotificationAuthenticationInfo.d.ts +0 -9
  187. package/dist/cjs/api/types/AgentsPushNotificationAuthenticationInfo.js +0 -5
  188. package/dist/cjs/api/types/AgentsPushNotificationConfig.d.ts +0 -13
  189. package/dist/cjs/api/types/AgentsPushNotificationConfig.js +0 -5
  190. package/dist/cjs/api/types/AgentsTask.d.ts +0 -19
  191. package/dist/cjs/api/types/AgentsTask.js +0 -5
  192. package/dist/cjs/api/types/AgentsTaskArtifactUpdateEvent.d.ts +0 -19
  193. package/dist/cjs/api/types/AgentsTaskArtifactUpdateEvent.js +0 -5
  194. package/dist/cjs/api/types/AgentsTaskStatus.d.ts +0 -12
  195. package/dist/cjs/api/types/AgentsTaskStatus.js +0 -5
  196. package/dist/cjs/api/types/AgentsTaskStatusState.d.ts +0 -18
  197. package/dist/cjs/api/types/AgentsTaskStatusState.js +0 -17
  198. package/dist/cjs/api/types/AgentsTaskStatusUpdateEvent.d.ts +0 -17
  199. package/dist/cjs/api/types/AgentsTaskStatusUpdateEvent.js +0 -5
  200. package/dist/cjs/api/types/AgentsTextPart.d.ts +0 -11
  201. package/dist/cjs/api/types/AgentsTextPart.js +0 -5
  202. package/dist/cjs/api/types/AgentsTransportProtocol.d.ts +0 -12
  203. package/dist/cjs/api/types/AgentsTransportProtocol.js +0 -11
  204. package/dist/cjs/core/stream/Stream.d.ts +0 -46
  205. package/dist/cjs/core/stream/Stream.js +0 -169
  206. package/dist/cjs/core/stream/index.d.ts +0 -1
  207. package/dist/cjs/core/stream/index.js +0 -5
  208. package/dist/cjs/serialization/resources/agents/client/index.d.ts +0 -2
  209. package/dist/cjs/serialization/resources/agents/client/index.js +0 -41
  210. package/dist/cjs/serialization/resources/agents/client/list.d.ts +0 -11
  211. package/dist/cjs/serialization/resources/agents/client/list.js +0 -42
  212. package/dist/cjs/serialization/resources/agents/client/requests/AgentsCreateAgent.d.ts +0 -16
  213. package/dist/cjs/serialization/resources/agents/client/requests/AgentsCreateAgent.js +0 -47
  214. package/dist/cjs/serialization/resources/agents/client/requests/index.d.ts +0 -1
  215. package/dist/cjs/serialization/resources/agents/client/requests/index.js +0 -5
  216. package/dist/cjs/serialization/resources/agents/index.d.ts +0 -2
  217. package/dist/cjs/serialization/resources/agents/index.js +0 -18
  218. package/dist/cjs/serialization/resources/agents/types/AgentsCreateAgentExpertsItem.d.ts +0 -12
  219. package/dist/cjs/serialization/resources/agents/types/AgentsCreateAgentExpertsItem.js +0 -43
  220. package/dist/cjs/serialization/resources/agents/types/AgentsMessageSendResponse.d.ts +0 -15
  221. package/dist/cjs/serialization/resources/agents/types/AgentsMessageSendResponse.js +0 -46
  222. package/dist/cjs/serialization/resources/agents/types/AgentsMessageStreamResponse.d.ts +0 -19
  223. package/dist/cjs/serialization/resources/agents/types/AgentsMessageStreamResponse.js +0 -50
  224. package/dist/cjs/serialization/resources/agents/types/index.d.ts +0 -3
  225. package/dist/cjs/serialization/resources/agents/types/index.js +0 -19
  226. package/dist/cjs/serialization/types/AgentsAgent.d.ts +0 -17
  227. package/dist/cjs/serialization/types/AgentsAgent.js +0 -48
  228. package/dist/cjs/serialization/types/AgentsAgentCapabilities.d.ts +0 -16
  229. package/dist/cjs/serialization/types/AgentsAgentCapabilities.js +0 -47
  230. package/dist/cjs/serialization/types/AgentsAgentCard.d.ts +0 -32
  231. package/dist/cjs/serialization/types/AgentsAgentCard.js +0 -65
  232. package/dist/cjs/serialization/types/AgentsAgentCardPreferredTransport.d.ts +0 -11
  233. package/dist/cjs/serialization/types/AgentsAgentCardPreferredTransport.js +0 -42
  234. package/dist/cjs/serialization/types/AgentsAgentCardSignature.d.ts +0 -14
  235. package/dist/cjs/serialization/types/AgentsAgentCardSignature.js +0 -45
  236. package/dist/cjs/serialization/types/AgentsAgentExpertsItem.d.ts +0 -12
  237. package/dist/cjs/serialization/types/AgentsAgentExpertsItem.js +0 -43
  238. package/dist/cjs/serialization/types/AgentsAgentExtension.d.ts +0 -15
  239. package/dist/cjs/serialization/types/AgentsAgentInterface.d.ts +0 -14
  240. package/dist/cjs/serialization/types/AgentsAgentInterface.js +0 -45
  241. package/dist/cjs/serialization/types/AgentsAgentInterfaceTransport.d.ts +0 -11
  242. package/dist/cjs/serialization/types/AgentsAgentInterfaceTransport.js +0 -42
  243. package/dist/cjs/serialization/types/AgentsAgentReference.d.ts +0 -14
  244. package/dist/cjs/serialization/types/AgentsAgentResponse.d.ts +0 -12
  245. package/dist/cjs/serialization/types/AgentsAgentResponse.js +0 -43
  246. package/dist/cjs/serialization/types/AgentsAgentSkill.d.ts +0 -20
  247. package/dist/cjs/serialization/types/AgentsAgentSkill.js +0 -51
  248. package/dist/cjs/serialization/types/AgentsArtifact.d.ts +0 -18
  249. package/dist/cjs/serialization/types/AgentsArtifact.js +0 -49
  250. package/dist/cjs/serialization/types/AgentsContext.d.ts +0 -14
  251. package/dist/cjs/serialization/types/AgentsContext.js +0 -45
  252. package/dist/cjs/serialization/types/AgentsContextItemsItem.d.ts +0 -12
  253. package/dist/cjs/serialization/types/AgentsContextItemsItem.js +0 -43
  254. package/dist/cjs/serialization/types/AgentsCreateExpert.d.ts +0 -17
  255. package/dist/cjs/serialization/types/AgentsCreateExpert.js +0 -48
  256. package/dist/cjs/serialization/types/AgentsCreateMcpServer.d.ts +0 -20
  257. package/dist/cjs/serialization/types/AgentsCreateMcpServer.js +0 -51
  258. package/dist/cjs/serialization/types/AgentsCreateMcpServerAuthorizationType.d.ts +0 -10
  259. package/dist/cjs/serialization/types/AgentsCreateMcpServerTransportType.d.ts +0 -10
  260. package/dist/cjs/serialization/types/AgentsCreateMcpServerTransportType.js +0 -41
  261. package/dist/cjs/serialization/types/AgentsDataPart.d.ts +0 -14
  262. package/dist/cjs/serialization/types/AgentsDataPart.js +0 -45
  263. package/dist/cjs/serialization/types/AgentsExpert.d.ts +0 -18
  264. package/dist/cjs/serialization/types/AgentsExpert.js +0 -49
  265. package/dist/cjs/serialization/types/AgentsExpertReference.d.ts +0 -14
  266. package/dist/cjs/serialization/types/AgentsExpertReference.js +0 -45
  267. package/dist/cjs/serialization/types/AgentsFilePart.d.ts +0 -15
  268. package/dist/cjs/serialization/types/AgentsFilePart.js +0 -46
  269. package/dist/cjs/serialization/types/AgentsFilePartFile.d.ts +0 -12
  270. package/dist/cjs/serialization/types/AgentsFilePartFile.js +0 -43
  271. package/dist/cjs/serialization/types/AgentsFileWithBytes.d.ts +0 -14
  272. package/dist/cjs/serialization/types/AgentsFileWithBytes.js +0 -45
  273. package/dist/cjs/serialization/types/AgentsFileWithUri.d.ts +0 -14
  274. package/dist/cjs/serialization/types/AgentsFileWithUri.js +0 -45
  275. package/dist/cjs/serialization/types/AgentsMcpServer.d.ts +0 -19
  276. package/dist/cjs/serialization/types/AgentsMcpServer.js +0 -50
  277. package/dist/cjs/serialization/types/AgentsMcpServerAuthorizationType.d.ts +0 -10
  278. package/dist/cjs/serialization/types/AgentsMcpServerAuthorizationType.js +0 -41
  279. package/dist/cjs/serialization/types/AgentsMcpServerTransportType.d.ts +0 -10
  280. package/dist/cjs/serialization/types/AgentsMessage.d.ts +0 -22
  281. package/dist/cjs/serialization/types/AgentsMessage.js +0 -53
  282. package/dist/cjs/serialization/types/AgentsMessageRole.d.ts +0 -10
  283. package/dist/cjs/serialization/types/AgentsMessageRole.js +0 -41
  284. package/dist/cjs/serialization/types/AgentsMessageSendConfiguration.d.ts +0 -16
  285. package/dist/cjs/serialization/types/AgentsMessageSendConfiguration.js +0 -47
  286. package/dist/cjs/serialization/types/AgentsMessageSendParams.d.ts +0 -16
  287. package/dist/cjs/serialization/types/AgentsMessageSendParams.js +0 -47
  288. package/dist/cjs/serialization/types/AgentsPart.d.ts +0 -13
  289. package/dist/cjs/serialization/types/AgentsPart.js +0 -44
  290. package/dist/cjs/serialization/types/AgentsPushNotificationAuthenticationInfo.d.ts +0 -13
  291. package/dist/cjs/serialization/types/AgentsPushNotificationAuthenticationInfo.js +0 -44
  292. package/dist/cjs/serialization/types/AgentsPushNotificationConfig.d.ts +0 -16
  293. package/dist/cjs/serialization/types/AgentsPushNotificationConfig.js +0 -47
  294. package/dist/cjs/serialization/types/AgentsTask.d.ts +0 -21
  295. package/dist/cjs/serialization/types/AgentsTask.js +0 -52
  296. package/dist/cjs/serialization/types/AgentsTaskArtifactUpdateEvent.d.ts +0 -19
  297. package/dist/cjs/serialization/types/AgentsTaskArtifactUpdateEvent.js +0 -50
  298. package/dist/cjs/serialization/types/AgentsTaskStatus.d.ts +0 -16
  299. package/dist/cjs/serialization/types/AgentsTaskStatus.js +0 -47
  300. package/dist/cjs/serialization/types/AgentsTaskStatusState.d.ts +0 -10
  301. package/dist/cjs/serialization/types/AgentsTaskStatusState.js +0 -51
  302. package/dist/cjs/serialization/types/AgentsTaskStatusUpdateEvent.d.ts +0 -18
  303. package/dist/cjs/serialization/types/AgentsTaskStatusUpdateEvent.js +0 -49
  304. package/dist/cjs/serialization/types/AgentsTextPart.js +0 -45
  305. package/dist/cjs/serialization/types/AgentsTransportProtocol.d.ts +0 -10
  306. package/dist/cjs/serialization/types/AgentsTransportProtocol.js +0 -41
  307. package/dist/esm/api/resources/agents/client/Client.d.mts +0 -197
  308. package/dist/esm/api/resources/agents/client/Client.mjs +0 -839
  309. package/dist/esm/api/resources/agents/client/index.d.mts +0 -2
  310. package/dist/esm/api/resources/agents/client/index.mjs +0 -1
  311. package/dist/esm/api/resources/agents/client/requests/AgentsCreateAgent.d.mts +0 -20
  312. package/dist/esm/api/resources/agents/client/requests/AgentsGetContextRequest.d.mts +0 -17
  313. package/dist/esm/api/resources/agents/client/requests/AgentsGetTaskRequest.d.mts +0 -13
  314. package/dist/esm/api/resources/agents/client/requests/AgentsListRequest.d.mts +0 -17
  315. package/dist/esm/api/resources/agents/client/requests/index.d.mts +0 -4
  316. package/dist/esm/api/resources/agents/client/requests/index.mjs +0 -1
  317. package/dist/esm/api/resources/agents/index.d.mts +0 -2
  318. package/dist/esm/api/resources/agents/index.mjs +0 -2
  319. package/dist/esm/api/resources/agents/types/AgentsCreateAgentExpertsItem.d.mts +0 -5
  320. package/dist/esm/api/resources/agents/types/AgentsCreateAgentExpertsItem.mjs +0 -4
  321. package/dist/esm/api/resources/agents/types/AgentsMessageSendResponse.d.mts +0 -8
  322. package/dist/esm/api/resources/agents/types/AgentsMessageSendResponse.mjs +0 -4
  323. package/dist/esm/api/resources/agents/types/AgentsMessageStreamResponse.d.mts +0 -10
  324. package/dist/esm/api/resources/agents/types/AgentsMessageStreamResponse.mjs +0 -4
  325. package/dist/esm/api/resources/agents/types/index.d.mts +0 -3
  326. package/dist/esm/api/resources/agents/types/index.mjs +0 -3
  327. package/dist/esm/api/types/AgentsAgent.d.mts +0 -15
  328. package/dist/esm/api/types/AgentsAgent.mjs +0 -4
  329. package/dist/esm/api/types/AgentsAgentCapabilities.d.mts +0 -14
  330. package/dist/esm/api/types/AgentsAgentCapabilities.mjs +0 -4
  331. package/dist/esm/api/types/AgentsAgentCard.d.mts +0 -36
  332. package/dist/esm/api/types/AgentsAgentCard.mjs +0 -4
  333. package/dist/esm/api/types/AgentsAgentCardPreferredTransport.d.mts +0 -5
  334. package/dist/esm/api/types/AgentsAgentCardPreferredTransport.mjs +0 -4
  335. package/dist/esm/api/types/AgentsAgentCardSignature.d.mts +0 -11
  336. package/dist/esm/api/types/AgentsAgentCardSignature.mjs +0 -4
  337. package/dist/esm/api/types/AgentsAgentExpertsItem.d.mts +0 -5
  338. package/dist/esm/api/types/AgentsAgentExpertsItem.mjs +0 -4
  339. package/dist/esm/api/types/AgentsAgentExtension.d.mts +0 -13
  340. package/dist/esm/api/types/AgentsAgentExtension.mjs +0 -4
  341. package/dist/esm/api/types/AgentsAgentInterface.d.mts +0 -9
  342. package/dist/esm/api/types/AgentsAgentInterface.mjs +0 -4
  343. package/dist/esm/api/types/AgentsAgentInterfaceTransport.d.mts +0 -5
  344. package/dist/esm/api/types/AgentsAgentInterfaceTransport.mjs +0 -4
  345. package/dist/esm/api/types/AgentsAgentReference.d.mts +0 -13
  346. package/dist/esm/api/types/AgentsAgentReference.mjs +0 -4
  347. package/dist/esm/api/types/AgentsAgentResponse.d.mts +0 -5
  348. package/dist/esm/api/types/AgentsAgentResponse.mjs +0 -4
  349. package/dist/esm/api/types/AgentsAgentSkill.d.mts +0 -22
  350. package/dist/esm/api/types/AgentsAgentSkill.mjs +0 -4
  351. package/dist/esm/api/types/AgentsArtifact.d.mts +0 -18
  352. package/dist/esm/api/types/AgentsArtifact.mjs +0 -4
  353. package/dist/esm/api/types/AgentsContext.d.mts +0 -9
  354. package/dist/esm/api/types/AgentsContext.mjs +0 -4
  355. package/dist/esm/api/types/AgentsContextItemsItem.d.mts +0 -5
  356. package/dist/esm/api/types/AgentsContextItemsItem.mjs +0 -4
  357. package/dist/esm/api/types/AgentsCreateExpert.d.mts +0 -15
  358. package/dist/esm/api/types/AgentsCreateExpert.mjs +0 -4
  359. package/dist/esm/api/types/AgentsCreateMcpServer.d.mts +0 -20
  360. package/dist/esm/api/types/AgentsCreateMcpServer.mjs +0 -4
  361. package/dist/esm/api/types/AgentsCreateMcpServerAuthorizationType.d.mts +0 -13
  362. package/dist/esm/api/types/AgentsCreateMcpServerAuthorizationType.mjs +0 -9
  363. package/dist/esm/api/types/AgentsCreateMcpServerTransportType.d.mts +0 -12
  364. package/dist/esm/api/types/AgentsCreateMcpServerTransportType.mjs +0 -8
  365. package/dist/esm/api/types/AgentsDataPart.d.mts +0 -11
  366. package/dist/esm/api/types/AgentsDataPart.mjs +0 -4
  367. package/dist/esm/api/types/AgentsExpert.d.mts +0 -17
  368. package/dist/esm/api/types/AgentsExpert.mjs +0 -4
  369. package/dist/esm/api/types/AgentsExpertReference.d.mts +0 -13
  370. package/dist/esm/api/types/AgentsExpertReference.mjs +0 -4
  371. package/dist/esm/api/types/AgentsFilePart.d.mts +0 -11
  372. package/dist/esm/api/types/AgentsFilePart.mjs +0 -4
  373. package/dist/esm/api/types/AgentsFilePartFile.d.mts +0 -5
  374. package/dist/esm/api/types/AgentsFilePartFile.mjs +0 -4
  375. package/dist/esm/api/types/AgentsFileWithBytes.d.mts +0 -11
  376. package/dist/esm/api/types/AgentsFileWithBytes.mjs +0 -4
  377. package/dist/esm/api/types/AgentsFileWithUri.d.mts +0 -11
  378. package/dist/esm/api/types/AgentsFileWithUri.mjs +0 -4
  379. package/dist/esm/api/types/AgentsMcpServer.d.mts +0 -18
  380. package/dist/esm/api/types/AgentsMcpServer.mjs +0 -4
  381. package/dist/esm/api/types/AgentsMcpServerAuthorizationType.d.mts +0 -12
  382. package/dist/esm/api/types/AgentsMcpServerAuthorizationType.mjs +0 -8
  383. package/dist/esm/api/types/AgentsMcpServerTransportType.d.mts +0 -11
  384. package/dist/esm/api/types/AgentsMcpServerTransportType.mjs +0 -7
  385. package/dist/esm/api/types/AgentsMessage.d.mts +0 -24
  386. package/dist/esm/api/types/AgentsMessage.mjs +0 -4
  387. package/dist/esm/api/types/AgentsMessageRole.d.mts +0 -11
  388. package/dist/esm/api/types/AgentsMessageRole.mjs +0 -7
  389. package/dist/esm/api/types/AgentsMessageSendConfiguration.d.mts +0 -13
  390. package/dist/esm/api/types/AgentsMessageSendConfiguration.mjs +0 -4
  391. package/dist/esm/api/types/AgentsMessageSendParams.d.mts +0 -10
  392. package/dist/esm/api/types/AgentsMessageSendParams.mjs +0 -4
  393. package/dist/esm/api/types/AgentsPart.d.mts +0 -5
  394. package/dist/esm/api/types/AgentsPart.mjs +0 -4
  395. package/dist/esm/api/types/AgentsPushNotificationAuthenticationInfo.d.mts +0 -9
  396. package/dist/esm/api/types/AgentsPushNotificationAuthenticationInfo.mjs +0 -4
  397. package/dist/esm/api/types/AgentsPushNotificationConfig.d.mts +0 -13
  398. package/dist/esm/api/types/AgentsPushNotificationConfig.mjs +0 -4
  399. package/dist/esm/api/types/AgentsTask.d.mts +0 -19
  400. package/dist/esm/api/types/AgentsTask.mjs +0 -4
  401. package/dist/esm/api/types/AgentsTaskArtifactUpdateEvent.d.mts +0 -19
  402. package/dist/esm/api/types/AgentsTaskArtifactUpdateEvent.mjs +0 -4
  403. package/dist/esm/api/types/AgentsTaskStatus.d.mts +0 -12
  404. package/dist/esm/api/types/AgentsTaskStatus.mjs +0 -4
  405. package/dist/esm/api/types/AgentsTaskStatusState.d.mts +0 -18
  406. package/dist/esm/api/types/AgentsTaskStatusState.mjs +0 -14
  407. package/dist/esm/api/types/AgentsTaskStatusUpdateEvent.d.mts +0 -17
  408. package/dist/esm/api/types/AgentsTaskStatusUpdateEvent.mjs +0 -4
  409. package/dist/esm/api/types/AgentsTextPart.d.mts +0 -11
  410. package/dist/esm/api/types/AgentsTextPart.mjs +0 -4
  411. package/dist/esm/api/types/AgentsTransportProtocol.d.mts +0 -12
  412. package/dist/esm/api/types/AgentsTransportProtocol.mjs +0 -8
  413. package/dist/esm/core/stream/Stream.d.mts +0 -46
  414. package/dist/esm/core/stream/Stream.mjs +0 -164
  415. package/dist/esm/core/stream/index.d.mts +0 -1
  416. package/dist/esm/core/stream/index.mjs +0 -1
  417. package/dist/esm/serialization/resources/agents/client/index.d.mts +0 -2
  418. package/dist/esm/serialization/resources/agents/client/index.mjs +0 -2
  419. package/dist/esm/serialization/resources/agents/client/list.d.mts +0 -11
  420. package/dist/esm/serialization/resources/agents/client/list.mjs +0 -6
  421. package/dist/esm/serialization/resources/agents/client/requests/AgentsCreateAgent.d.mts +0 -16
  422. package/dist/esm/serialization/resources/agents/client/requests/AgentsCreateAgent.mjs +0 -11
  423. package/dist/esm/serialization/resources/agents/client/requests/index.d.mts +0 -1
  424. package/dist/esm/serialization/resources/agents/client/requests/index.mjs +0 -1
  425. package/dist/esm/serialization/resources/agents/index.d.mts +0 -2
  426. package/dist/esm/serialization/resources/agents/index.mjs +0 -2
  427. package/dist/esm/serialization/resources/agents/types/AgentsCreateAgentExpertsItem.d.mts +0 -12
  428. package/dist/esm/serialization/resources/agents/types/AgentsCreateAgentExpertsItem.mjs +0 -7
  429. package/dist/esm/serialization/resources/agents/types/AgentsMessageSendResponse.d.mts +0 -15
  430. package/dist/esm/serialization/resources/agents/types/AgentsMessageSendResponse.mjs +0 -10
  431. package/dist/esm/serialization/resources/agents/types/AgentsMessageStreamResponse.d.mts +0 -19
  432. package/dist/esm/serialization/resources/agents/types/AgentsMessageStreamResponse.mjs +0 -14
  433. package/dist/esm/serialization/resources/agents/types/index.d.mts +0 -3
  434. package/dist/esm/serialization/resources/agents/types/index.mjs +0 -3
  435. package/dist/esm/serialization/types/AgentsAgent.d.mts +0 -17
  436. package/dist/esm/serialization/types/AgentsAgent.mjs +0 -12
  437. package/dist/esm/serialization/types/AgentsAgentCapabilities.d.mts +0 -16
  438. package/dist/esm/serialization/types/AgentsAgentCapabilities.mjs +0 -11
  439. package/dist/esm/serialization/types/AgentsAgentCard.d.mts +0 -32
  440. package/dist/esm/serialization/types/AgentsAgentCard.mjs +0 -29
  441. package/dist/esm/serialization/types/AgentsAgentCardPreferredTransport.d.mts +0 -11
  442. package/dist/esm/serialization/types/AgentsAgentCardPreferredTransport.mjs +0 -6
  443. package/dist/esm/serialization/types/AgentsAgentCardSignature.d.mts +0 -14
  444. package/dist/esm/serialization/types/AgentsAgentCardSignature.mjs +0 -9
  445. package/dist/esm/serialization/types/AgentsAgentExpertsItem.d.mts +0 -12
  446. package/dist/esm/serialization/types/AgentsAgentExpertsItem.mjs +0 -7
  447. package/dist/esm/serialization/types/AgentsAgentExtension.d.mts +0 -15
  448. package/dist/esm/serialization/types/AgentsAgentExtension.mjs +0 -10
  449. package/dist/esm/serialization/types/AgentsAgentInterface.d.mts +0 -14
  450. package/dist/esm/serialization/types/AgentsAgentInterface.mjs +0 -9
  451. package/dist/esm/serialization/types/AgentsAgentInterfaceTransport.d.mts +0 -11
  452. package/dist/esm/serialization/types/AgentsAgentInterfaceTransport.mjs +0 -6
  453. package/dist/esm/serialization/types/AgentsAgentReference.d.mts +0 -14
  454. package/dist/esm/serialization/types/AgentsAgentReference.mjs +0 -9
  455. package/dist/esm/serialization/types/AgentsAgentResponse.d.mts +0 -12
  456. package/dist/esm/serialization/types/AgentsAgentResponse.mjs +0 -7
  457. package/dist/esm/serialization/types/AgentsAgentSkill.d.mts +0 -20
  458. package/dist/esm/serialization/types/AgentsAgentSkill.mjs +0 -15
  459. package/dist/esm/serialization/types/AgentsArtifact.d.mts +0 -18
  460. package/dist/esm/serialization/types/AgentsArtifact.mjs +0 -13
  461. package/dist/esm/serialization/types/AgentsContext.d.mts +0 -14
  462. package/dist/esm/serialization/types/AgentsContext.mjs +0 -9
  463. package/dist/esm/serialization/types/AgentsContextItemsItem.d.mts +0 -12
  464. package/dist/esm/serialization/types/AgentsContextItemsItem.mjs +0 -7
  465. package/dist/esm/serialization/types/AgentsCreateExpert.d.mts +0 -17
  466. package/dist/esm/serialization/types/AgentsCreateExpert.mjs +0 -12
  467. package/dist/esm/serialization/types/AgentsCreateMcpServer.d.mts +0 -20
  468. package/dist/esm/serialization/types/AgentsCreateMcpServer.mjs +0 -15
  469. package/dist/esm/serialization/types/AgentsCreateMcpServerAuthorizationType.d.mts +0 -10
  470. package/dist/esm/serialization/types/AgentsCreateMcpServerAuthorizationType.mjs +0 -5
  471. package/dist/esm/serialization/types/AgentsCreateMcpServerTransportType.d.mts +0 -10
  472. package/dist/esm/serialization/types/AgentsCreateMcpServerTransportType.mjs +0 -5
  473. package/dist/esm/serialization/types/AgentsDataPart.d.mts +0 -14
  474. package/dist/esm/serialization/types/AgentsDataPart.mjs +0 -9
  475. package/dist/esm/serialization/types/AgentsExpert.d.mts +0 -18
  476. package/dist/esm/serialization/types/AgentsExpert.mjs +0 -13
  477. package/dist/esm/serialization/types/AgentsExpertReference.d.mts +0 -14
  478. package/dist/esm/serialization/types/AgentsExpertReference.mjs +0 -9
  479. package/dist/esm/serialization/types/AgentsFilePart.d.mts +0 -15
  480. package/dist/esm/serialization/types/AgentsFilePart.mjs +0 -10
  481. package/dist/esm/serialization/types/AgentsFilePartFile.d.mts +0 -12
  482. package/dist/esm/serialization/types/AgentsFilePartFile.mjs +0 -7
  483. package/dist/esm/serialization/types/AgentsFileWithBytes.d.mts +0 -14
  484. package/dist/esm/serialization/types/AgentsFileWithBytes.mjs +0 -9
  485. package/dist/esm/serialization/types/AgentsFileWithUri.d.mts +0 -14
  486. package/dist/esm/serialization/types/AgentsFileWithUri.mjs +0 -9
  487. package/dist/esm/serialization/types/AgentsMcpServer.d.mts +0 -19
  488. package/dist/esm/serialization/types/AgentsMcpServer.mjs +0 -14
  489. package/dist/esm/serialization/types/AgentsMcpServerAuthorizationType.d.mts +0 -10
  490. package/dist/esm/serialization/types/AgentsMcpServerAuthorizationType.mjs +0 -5
  491. package/dist/esm/serialization/types/AgentsMcpServerTransportType.d.mts +0 -10
  492. package/dist/esm/serialization/types/AgentsMcpServerTransportType.mjs +0 -5
  493. package/dist/esm/serialization/types/AgentsMessage.d.mts +0 -22
  494. package/dist/esm/serialization/types/AgentsMessage.mjs +0 -17
  495. package/dist/esm/serialization/types/AgentsMessageRole.d.mts +0 -10
  496. package/dist/esm/serialization/types/AgentsMessageRole.mjs +0 -5
  497. package/dist/esm/serialization/types/AgentsMessageSendConfiguration.d.mts +0 -16
  498. package/dist/esm/serialization/types/AgentsMessageSendConfiguration.mjs +0 -11
  499. package/dist/esm/serialization/types/AgentsMessageSendParams.d.mts +0 -16
  500. package/dist/esm/serialization/types/AgentsMessageSendParams.mjs +0 -11
  501. package/dist/esm/serialization/types/AgentsPart.d.mts +0 -13
  502. package/dist/esm/serialization/types/AgentsPart.mjs +0 -8
  503. package/dist/esm/serialization/types/AgentsPushNotificationAuthenticationInfo.d.mts +0 -13
  504. package/dist/esm/serialization/types/AgentsPushNotificationAuthenticationInfo.mjs +0 -8
  505. package/dist/esm/serialization/types/AgentsPushNotificationConfig.d.mts +0 -16
  506. package/dist/esm/serialization/types/AgentsPushNotificationConfig.mjs +0 -11
  507. package/dist/esm/serialization/types/AgentsTask.d.mts +0 -21
  508. package/dist/esm/serialization/types/AgentsTask.mjs +0 -16
  509. package/dist/esm/serialization/types/AgentsTaskArtifactUpdateEvent.d.mts +0 -19
  510. package/dist/esm/serialization/types/AgentsTaskArtifactUpdateEvent.mjs +0 -14
  511. package/dist/esm/serialization/types/AgentsTaskStatus.d.mts +0 -16
  512. package/dist/esm/serialization/types/AgentsTaskStatus.mjs +0 -11
  513. package/dist/esm/serialization/types/AgentsTaskStatusState.d.mts +0 -10
  514. package/dist/esm/serialization/types/AgentsTaskStatusState.mjs +0 -15
  515. package/dist/esm/serialization/types/AgentsTaskStatusUpdateEvent.d.mts +0 -18
  516. package/dist/esm/serialization/types/AgentsTaskStatusUpdateEvent.mjs +0 -13
  517. package/dist/esm/serialization/types/AgentsTextPart.mjs +0 -9
  518. package/dist/esm/serialization/types/AgentsTransportProtocol.d.mts +0 -10
  519. package/dist/esm/serialization/types/AgentsTransportProtocol.mjs +0 -5
  520. /package/dist/cjs/api/resources/{agents/client/requests/AgentsCreateAgent.js → facts/client/requests/FactsExtractRequest.js} +0 -0
  521. /package/dist/cjs/api/{resources/agents/client/requests/AgentsGetContextRequest.js → types/CommonTextContext.js} +0 -0
  522. /package/dist/cjs/api/{resources/agents/client/requests/AgentsGetTaskRequest.js → types/FactsExtractResponse.js} +0 -0
  523. /package/dist/cjs/api/{resources/agents/client/requests/AgentsListRequest.js → types/FactsExtractResponseFactsItem.js} +0 -0
  524. /package/dist/esm/api/resources/{agents/client/requests/AgentsCreateAgent.mjs → facts/client/requests/FactsExtractRequest.mjs} +0 -0
  525. /package/dist/esm/api/{resources/agents/client/requests/AgentsGetContextRequest.mjs → types/CommonTextContext.mjs} +0 -0
  526. /package/dist/esm/api/{resources/agents/client/requests/AgentsGetTaskRequest.mjs → types/FactsExtractResponse.mjs} +0 -0
  527. /package/dist/esm/api/{resources/agents/client/requests/AgentsListRequest.mjs → types/FactsExtractResponseFactsItem.mjs} +0 -0
@@ -1,839 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
- return new (P || (P = Promise))(function (resolve, reject) {
7
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
- step((generator = generator.apply(thisArg, _arguments || [])).next());
11
- });
12
- };
13
- import * as core from "../../../../core/index.mjs";
14
- import * as Corti from "../../../index.mjs";
15
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
16
- import * as serializers from "../../../../serialization/index.mjs";
17
- import * as errors from "../../../../errors/index.mjs";
18
- export class Agents {
19
- constructor(_options) {
20
- this._options = _options;
21
- }
22
- /**
23
- * This endpoint retrieves a list of all agents that can be called by the Corti Agent Framework.
24
- *
25
- * @param {Corti.AgentsListRequest} request
26
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
27
- *
28
- * @throws {@link Corti.BadRequestError}
29
- * @throws {@link Corti.UnauthorizedError}
30
- *
31
- * @example
32
- * await client.agents.list()
33
- */
34
- list(request = {}, requestOptions) {
35
- return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
36
- }
37
- __list() {
38
- return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
39
- var _a, _b, _c, _d;
40
- const { limit, offset } = request;
41
- const _queryParams = {};
42
- if (limit !== undefined) {
43
- _queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
44
- }
45
- if (offset !== undefined) {
46
- _queryParams["offset"] = (_b = offset === null || offset === void 0 ? void 0 : offset.toString()) !== null && _b !== void 0 ? _b : null;
47
- }
48
- const _response = yield core.fetcher({
49
- url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment)).agents, "agents"),
50
- method: "GET",
51
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({
52
- Authorization: yield this._getAuthorizationHeader(),
53
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
54
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
55
- queryParameters: _queryParams,
56
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
57
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
58
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
59
- });
60
- if (_response.ok) {
61
- return {
62
- data: serializers.agents.list.Response.parseOrThrow(_response.body, {
63
- unrecognizedObjectKeys: "passthrough",
64
- allowUnrecognizedUnionMembers: true,
65
- allowUnrecognizedEnumValues: true,
66
- skipValidation: true,
67
- breadcrumbsPrefix: ["response"],
68
- }),
69
- rawResponse: _response.rawResponse,
70
- };
71
- }
72
- if (_response.error.reason === "status-code") {
73
- switch (_response.error.statusCode) {
74
- case 400:
75
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
76
- case 401:
77
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
78
- default:
79
- throw new errors.CortiError({
80
- statusCode: _response.error.statusCode,
81
- body: _response.error.body,
82
- rawResponse: _response.rawResponse,
83
- });
84
- }
85
- }
86
- switch (_response.error.reason) {
87
- case "non-json":
88
- throw new errors.CortiError({
89
- statusCode: _response.error.statusCode,
90
- body: _response.error.rawBody,
91
- rawResponse: _response.rawResponse,
92
- });
93
- case "timeout":
94
- throw new errors.CortiTimeoutError("Timeout exceeded when calling GET /agents.");
95
- case "unknown":
96
- throw new errors.CortiError({
97
- message: _response.error.errorMessage,
98
- rawResponse: _response.rawResponse,
99
- });
100
- }
101
- });
102
- }
103
- /**
104
- * This endpoint allows the creation of a new agent that can be utilized in the `POST /threads` endpoint.
105
- *
106
- * @param {Corti.AgentsCreateAgent} request
107
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
108
- *
109
- * @throws {@link Corti.BadRequestError}
110
- * @throws {@link Corti.UnauthorizedError}
111
- *
112
- * @example
113
- * await client.agents.create({
114
- * name: "name",
115
- * description: "description"
116
- * })
117
- */
118
- create(request, requestOptions) {
119
- return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
120
- }
121
- __create(request, requestOptions) {
122
- return __awaiter(this, void 0, void 0, function* () {
123
- var _a, _b;
124
- const _response = yield core.fetcher({
125
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).agents, "agents"),
126
- method: "POST",
127
- headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
128
- Authorization: yield this._getAuthorizationHeader(),
129
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
130
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
131
- contentType: "application/json",
132
- requestType: "json",
133
- body: serializers.AgentsCreateAgent.jsonOrThrow(request, {
134
- unrecognizedObjectKeys: "strip",
135
- omitUndefined: true,
136
- }),
137
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
138
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
139
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
140
- });
141
- if (_response.ok) {
142
- return {
143
- data: serializers.AgentsAgent.parseOrThrow(_response.body, {
144
- unrecognizedObjectKeys: "passthrough",
145
- allowUnrecognizedUnionMembers: true,
146
- allowUnrecognizedEnumValues: true,
147
- skipValidation: true,
148
- breadcrumbsPrefix: ["response"],
149
- }),
150
- rawResponse: _response.rawResponse,
151
- };
152
- }
153
- if (_response.error.reason === "status-code") {
154
- switch (_response.error.statusCode) {
155
- case 400:
156
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
157
- case 401:
158
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
159
- default:
160
- throw new errors.CortiError({
161
- statusCode: _response.error.statusCode,
162
- body: _response.error.body,
163
- rawResponse: _response.rawResponse,
164
- });
165
- }
166
- }
167
- switch (_response.error.reason) {
168
- case "non-json":
169
- throw new errors.CortiError({
170
- statusCode: _response.error.statusCode,
171
- body: _response.error.rawBody,
172
- rawResponse: _response.rawResponse,
173
- });
174
- case "timeout":
175
- throw new errors.CortiTimeoutError("Timeout exceeded when calling POST /agents.");
176
- case "unknown":
177
- throw new errors.CortiError({
178
- message: _response.error.errorMessage,
179
- rawResponse: _response.rawResponse,
180
- });
181
- }
182
- });
183
- }
184
- /**
185
- * This endpoint retrieves an agent by its identifier. The agent contains information about its capabilities and the experts it can call.
186
- *
187
- * @param {string} id - The identifier of the agent to retrieve.
188
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
189
- *
190
- * @throws {@link Corti.BadRequestError}
191
- * @throws {@link Corti.UnauthorizedError}
192
- * @throws {@link Corti.NotFoundError}
193
- *
194
- * @example
195
- * await client.agents.get("id")
196
- */
197
- get(id, requestOptions) {
198
- return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
199
- }
200
- __get(id, requestOptions) {
201
- return __awaiter(this, void 0, void 0, function* () {
202
- var _a, _b;
203
- const _response = yield core.fetcher({
204
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}`),
205
- method: "GET",
206
- headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
207
- Authorization: yield this._getAuthorizationHeader(),
208
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
209
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
210
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
211
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
212
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
213
- });
214
- if (_response.ok) {
215
- return {
216
- data: serializers.AgentsAgentResponse.parseOrThrow(_response.body, {
217
- unrecognizedObjectKeys: "passthrough",
218
- allowUnrecognizedUnionMembers: true,
219
- allowUnrecognizedEnumValues: true,
220
- skipValidation: true,
221
- breadcrumbsPrefix: ["response"],
222
- }),
223
- rawResponse: _response.rawResponse,
224
- };
225
- }
226
- if (_response.error.reason === "status-code") {
227
- switch (_response.error.statusCode) {
228
- case 400:
229
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
230
- case 401:
231
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
232
- case 404:
233
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
234
- default:
235
- throw new errors.CortiError({
236
- statusCode: _response.error.statusCode,
237
- body: _response.error.body,
238
- rawResponse: _response.rawResponse,
239
- });
240
- }
241
- }
242
- switch (_response.error.reason) {
243
- case "non-json":
244
- throw new errors.CortiError({
245
- statusCode: _response.error.statusCode,
246
- body: _response.error.rawBody,
247
- rawResponse: _response.rawResponse,
248
- });
249
- case "timeout":
250
- throw new errors.CortiTimeoutError("Timeout exceeded when calling GET /agents/{id}.");
251
- case "unknown":
252
- throw new errors.CortiError({
253
- message: _response.error.errorMessage,
254
- rawResponse: _response.rawResponse,
255
- });
256
- }
257
- });
258
- }
259
- /**
260
- * This endpoint deletes an agent by its identifier. Once deleted, the agent can no longer be used in threads.
261
- *
262
- * @param {string} id - The identifier of the agent to delete.
263
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
264
- *
265
- * @throws {@link Corti.BadRequestError}
266
- * @throws {@link Corti.UnauthorizedError}
267
- * @throws {@link Corti.NotFoundError}
268
- *
269
- * @example
270
- * await client.agents.delete("id")
271
- */
272
- delete(id, requestOptions) {
273
- return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
274
- }
275
- __delete(id, requestOptions) {
276
- return __awaiter(this, void 0, void 0, function* () {
277
- var _a, _b;
278
- const _response = yield core.fetcher({
279
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}`),
280
- method: "DELETE",
281
- headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
282
- Authorization: yield this._getAuthorizationHeader(),
283
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
284
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
285
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
286
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
287
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
288
- });
289
- if (_response.ok) {
290
- return { data: undefined, rawResponse: _response.rawResponse };
291
- }
292
- if (_response.error.reason === "status-code") {
293
- switch (_response.error.statusCode) {
294
- case 400:
295
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
296
- case 401:
297
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
298
- case 404:
299
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
300
- default:
301
- throw new errors.CortiError({
302
- statusCode: _response.error.statusCode,
303
- body: _response.error.body,
304
- rawResponse: _response.rawResponse,
305
- });
306
- }
307
- }
308
- switch (_response.error.reason) {
309
- case "non-json":
310
- throw new errors.CortiError({
311
- statusCode: _response.error.statusCode,
312
- body: _response.error.rawBody,
313
- rawResponse: _response.rawResponse,
314
- });
315
- case "timeout":
316
- throw new errors.CortiTimeoutError("Timeout exceeded when calling DELETE /agents/{id}.");
317
- case "unknown":
318
- throw new errors.CortiError({
319
- message: _response.error.errorMessage,
320
- rawResponse: _response.rawResponse,
321
- });
322
- }
323
- });
324
- }
325
- /**
326
- * This endpoint updates an existing agent. Only the fields provided in the request body will be updated; other fields will remain unchanged.
327
- *
328
- * @param {string} id - The identifier of the agent to update.
329
- * @param {Corti.AgentsAgent} request
330
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
331
- *
332
- * @throws {@link Corti.BadRequestError}
333
- * @throws {@link Corti.UnauthorizedError}
334
- * @throws {@link Corti.NotFoundError}
335
- *
336
- * @example
337
- * await client.agents.update("id", {
338
- * id: "id",
339
- * name: "name",
340
- * description: "description",
341
- * systemPrompt: "systemPrompt"
342
- * })
343
- */
344
- update(id, request, requestOptions) {
345
- return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
346
- }
347
- __update(id, request, requestOptions) {
348
- return __awaiter(this, void 0, void 0, function* () {
349
- var _a, _b;
350
- const _response = yield core.fetcher({
351
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}`),
352
- method: "PATCH",
353
- headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
354
- Authorization: yield this._getAuthorizationHeader(),
355
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
356
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
357
- contentType: "application/json",
358
- requestType: "json",
359
- body: serializers.AgentsAgent.jsonOrThrow(request, {
360
- unrecognizedObjectKeys: "strip",
361
- omitUndefined: true,
362
- }),
363
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
364
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
365
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
366
- });
367
- if (_response.ok) {
368
- return {
369
- data: serializers.AgentsAgent.parseOrThrow(_response.body, {
370
- unrecognizedObjectKeys: "passthrough",
371
- allowUnrecognizedUnionMembers: true,
372
- allowUnrecognizedEnumValues: true,
373
- skipValidation: true,
374
- breadcrumbsPrefix: ["response"],
375
- }),
376
- rawResponse: _response.rawResponse,
377
- };
378
- }
379
- if (_response.error.reason === "status-code") {
380
- switch (_response.error.statusCode) {
381
- case 400:
382
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
383
- case 401:
384
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
385
- case 404:
386
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
387
- default:
388
- throw new errors.CortiError({
389
- statusCode: _response.error.statusCode,
390
- body: _response.error.body,
391
- rawResponse: _response.rawResponse,
392
- });
393
- }
394
- }
395
- switch (_response.error.reason) {
396
- case "non-json":
397
- throw new errors.CortiError({
398
- statusCode: _response.error.statusCode,
399
- body: _response.error.rawBody,
400
- rawResponse: _response.rawResponse,
401
- });
402
- case "timeout":
403
- throw new errors.CortiTimeoutError("Timeout exceeded when calling PATCH /agents/{id}.");
404
- case "unknown":
405
- throw new errors.CortiError({
406
- message: _response.error.errorMessage,
407
- rawResponse: _response.rawResponse,
408
- });
409
- }
410
- });
411
- }
412
- /**
413
- * This endpoint retrieves the agent card in JSON format, which provides metadata about the agent, including its name, description, and the experts it can call.
414
- *
415
- * @param {string} id - The identifier of the agent to retrieve the agent card for.
416
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
417
- *
418
- * @throws {@link Corti.BadRequestError}
419
- * @throws {@link Corti.UnauthorizedError}
420
- * @throws {@link Corti.NotFoundError}
421
- *
422
- * @example
423
- * await client.agents.getCard("id")
424
- */
425
- getCard(id, requestOptions) {
426
- return core.HttpResponsePromise.fromPromise(this.__getCard(id, requestOptions));
427
- }
428
- __getCard(id, requestOptions) {
429
- return __awaiter(this, void 0, void 0, function* () {
430
- var _a, _b;
431
- const _response = yield core.fetcher({
432
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}/agent-card.json`),
433
- method: "GET",
434
- headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
435
- Authorization: yield this._getAuthorizationHeader(),
436
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
437
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
438
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
439
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
440
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
441
- });
442
- if (_response.ok) {
443
- return {
444
- data: serializers.AgentsAgentCard.parseOrThrow(_response.body, {
445
- unrecognizedObjectKeys: "passthrough",
446
- allowUnrecognizedUnionMembers: true,
447
- allowUnrecognizedEnumValues: true,
448
- skipValidation: true,
449
- breadcrumbsPrefix: ["response"],
450
- }),
451
- rawResponse: _response.rawResponse,
452
- };
453
- }
454
- if (_response.error.reason === "status-code") {
455
- switch (_response.error.statusCode) {
456
- case 400:
457
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
458
- case 401:
459
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
460
- case 404:
461
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
462
- default:
463
- throw new errors.CortiError({
464
- statusCode: _response.error.statusCode,
465
- body: _response.error.body,
466
- rawResponse: _response.rawResponse,
467
- });
468
- }
469
- }
470
- switch (_response.error.reason) {
471
- case "non-json":
472
- throw new errors.CortiError({
473
- statusCode: _response.error.statusCode,
474
- body: _response.error.rawBody,
475
- rawResponse: _response.rawResponse,
476
- });
477
- case "timeout":
478
- throw new errors.CortiTimeoutError("Timeout exceeded when calling GET /agents/{id}/agent-card.json.");
479
- case "unknown":
480
- throw new errors.CortiError({
481
- message: _response.error.errorMessage,
482
- rawResponse: _response.rawResponse,
483
- });
484
- }
485
- });
486
- }
487
- /**
488
- * This endpoint sends a message to the specified agent to start or continue a task. The agent processes the message and returns a response. If the message contains a task ID that matches an ongoing task, the agent will continue that task; otherwise, it will start a new task.
489
- *
490
- * @param {string} id - The identifier of the agent to send the message to.
491
- * @param {Corti.AgentsMessageSendParams} request
492
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
493
- *
494
- * @throws {@link Corti.BadRequestError}
495
- * @throws {@link Corti.UnauthorizedError}
496
- * @throws {@link Corti.NotFoundError}
497
- *
498
- * @example
499
- * await client.agents.messageSend("id", {
500
- * message: {
501
- * role: "user",
502
- * parts: [{
503
- * kind: "text",
504
- * text: "text"
505
- * }],
506
- * messageId: "messageId",
507
- * kind: "message"
508
- * }
509
- * })
510
- */
511
- messageSend(id, request, requestOptions) {
512
- return core.HttpResponsePromise.fromPromise(this.__messageSend(id, request, requestOptions));
513
- }
514
- __messageSend(id, request, requestOptions) {
515
- return __awaiter(this, void 0, void 0, function* () {
516
- var _a, _b;
517
- const _response = yield core.fetcher({
518
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}/v1/message:send`),
519
- method: "POST",
520
- headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
521
- Authorization: yield this._getAuthorizationHeader(),
522
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
523
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
524
- contentType: "application/json",
525
- requestType: "json",
526
- body: serializers.AgentsMessageSendParams.jsonOrThrow(request, {
527
- unrecognizedObjectKeys: "strip",
528
- omitUndefined: true,
529
- }),
530
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
531
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
532
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
533
- });
534
- if (_response.ok) {
535
- return {
536
- data: serializers.AgentsMessageSendResponse.parseOrThrow(_response.body, {
537
- unrecognizedObjectKeys: "passthrough",
538
- allowUnrecognizedUnionMembers: true,
539
- allowUnrecognizedEnumValues: true,
540
- skipValidation: true,
541
- breadcrumbsPrefix: ["response"],
542
- }),
543
- rawResponse: _response.rawResponse,
544
- };
545
- }
546
- if (_response.error.reason === "status-code") {
547
- switch (_response.error.statusCode) {
548
- case 400:
549
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
550
- case 401:
551
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
552
- case 404:
553
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
554
- default:
555
- throw new errors.CortiError({
556
- statusCode: _response.error.statusCode,
557
- body: _response.error.body,
558
- rawResponse: _response.rawResponse,
559
- });
560
- }
561
- }
562
- switch (_response.error.reason) {
563
- case "non-json":
564
- throw new errors.CortiError({
565
- statusCode: _response.error.statusCode,
566
- body: _response.error.rawBody,
567
- rawResponse: _response.rawResponse,
568
- });
569
- case "timeout":
570
- throw new errors.CortiTimeoutError("Timeout exceeded when calling POST /agents/{id}/v1/message:send.");
571
- case "unknown":
572
- throw new errors.CortiError({
573
- message: _response.error.errorMessage,
574
- rawResponse: _response.rawResponse,
575
- });
576
- }
577
- });
578
- }
579
- /**
580
- * Sends a message to the specified agent and streams the response as it is generated. This method requires the server to have support for streaming.
581
- */
582
- messageStream(id, request, requestOptions) {
583
- return core.HttpResponsePromise.fromPromise(this.__messageStream(id, request, requestOptions));
584
- }
585
- __messageStream(id, request, requestOptions) {
586
- return __awaiter(this, void 0, void 0, function* () {
587
- var _a, _b;
588
- const _response = yield core.fetcher({
589
- url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}/v1/message:stream`),
590
- method: "POST",
591
- headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
592
- Authorization: yield this._getAuthorizationHeader(),
593
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
594
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
595
- contentType: "application/json",
596
- requestType: "json",
597
- body: serializers.AgentsMessageSendParams.jsonOrThrow(request, {
598
- unrecognizedObjectKeys: "strip",
599
- omitUndefined: true,
600
- }),
601
- responseType: "sse",
602
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
603
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
604
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
605
- });
606
- if (_response.ok) {
607
- return {
608
- data: new core.Stream({
609
- stream: _response.body,
610
- parse: (data) => __awaiter(this, void 0, void 0, function* () {
611
- return serializers.AgentsMessageStreamResponse.parseOrThrow(data, {
612
- unrecognizedObjectKeys: "passthrough",
613
- allowUnrecognizedUnionMembers: true,
614
- allowUnrecognizedEnumValues: true,
615
- skipValidation: true,
616
- breadcrumbsPrefix: ["response"],
617
- });
618
- }),
619
- signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
620
- eventShape: {
621
- type: "sse",
622
- streamTerminator: "[DONE]",
623
- },
624
- }),
625
- rawResponse: _response.rawResponse,
626
- };
627
- }
628
- if (_response.error.reason === "status-code") {
629
- switch (_response.error.statusCode) {
630
- case 400:
631
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
632
- case 401:
633
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
634
- case 404:
635
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
636
- default:
637
- throw new errors.CortiError({
638
- statusCode: _response.error.statusCode,
639
- body: _response.error.body,
640
- rawResponse: _response.rawResponse,
641
- });
642
- }
643
- }
644
- switch (_response.error.reason) {
645
- case "non-json":
646
- throw new errors.CortiError({
647
- statusCode: _response.error.statusCode,
648
- body: _response.error.rawBody,
649
- rawResponse: _response.rawResponse,
650
- });
651
- case "timeout":
652
- throw new errors.CortiTimeoutError("Timeout exceeded when calling POST /agents/{id}/v1/message:stream.");
653
- case "unknown":
654
- throw new errors.CortiError({
655
- message: _response.error.errorMessage,
656
- rawResponse: _response.rawResponse,
657
- });
658
- }
659
- });
660
- }
661
- /**
662
- * This endpoint retrieves the status and details of a specific task associated with the given agent. It provides information about the task's current state, history, and any artifacts produced during its execution.
663
- *
664
- * @param {string} id - The identifier of the agent associated with the task.
665
- * @param {string} taskId - The identifier of the task to retrieve.
666
- * @param {Corti.AgentsGetTaskRequest} request
667
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
668
- *
669
- * @throws {@link Corti.BadRequestError}
670
- * @throws {@link Corti.UnauthorizedError}
671
- * @throws {@link Corti.NotFoundError}
672
- *
673
- * @example
674
- * await client.agents.getTask("id", "taskId")
675
- */
676
- getTask(id, taskId, request = {}, requestOptions) {
677
- return core.HttpResponsePromise.fromPromise(this.__getTask(id, taskId, request, requestOptions));
678
- }
679
- __getTask(id_1, taskId_1) {
680
- return __awaiter(this, arguments, void 0, function* (id, taskId, request = {}, requestOptions) {
681
- var _a, _b, _c;
682
- const { historyLength } = request;
683
- const _queryParams = {};
684
- if (historyLength !== undefined) {
685
- _queryParams["historyLength"] = (_a = historyLength === null || historyLength === void 0 ? void 0 : historyLength.toString()) !== null && _a !== void 0 ? _a : null;
686
- }
687
- const _response = yield core.fetcher({
688
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}/v1/tasks/${encodeURIComponent(taskId)}`),
689
- method: "GET",
690
- headers: mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({
691
- Authorization: yield this._getAuthorizationHeader(),
692
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
693
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
694
- queryParameters: _queryParams,
695
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
696
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
697
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
698
- });
699
- if (_response.ok) {
700
- return {
701
- data: serializers.AgentsTask.parseOrThrow(_response.body, {
702
- unrecognizedObjectKeys: "passthrough",
703
- allowUnrecognizedUnionMembers: true,
704
- allowUnrecognizedEnumValues: true,
705
- skipValidation: true,
706
- breadcrumbsPrefix: ["response"],
707
- }),
708
- rawResponse: _response.rawResponse,
709
- };
710
- }
711
- if (_response.error.reason === "status-code") {
712
- switch (_response.error.statusCode) {
713
- case 400:
714
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
715
- case 401:
716
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
717
- case 404:
718
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
719
- default:
720
- throw new errors.CortiError({
721
- statusCode: _response.error.statusCode,
722
- body: _response.error.body,
723
- rawResponse: _response.rawResponse,
724
- });
725
- }
726
- }
727
- switch (_response.error.reason) {
728
- case "non-json":
729
- throw new errors.CortiError({
730
- statusCode: _response.error.statusCode,
731
- body: _response.error.rawBody,
732
- rawResponse: _response.rawResponse,
733
- });
734
- case "timeout":
735
- throw new errors.CortiTimeoutError("Timeout exceeded when calling GET /agents/{id}/v1/tasks/{taskId}.");
736
- case "unknown":
737
- throw new errors.CortiError({
738
- message: _response.error.errorMessage,
739
- rawResponse: _response.rawResponse,
740
- });
741
- }
742
- });
743
- }
744
- /**
745
- * This endpoint retrieves all tasks and top-level messages associated with a specific context for the given agent.
746
- *
747
- * @param {string} id - The identifier of the agent associated with the context.
748
- * @param {string} contextId - The identifier of the context (thread) to retrieve tasks for.
749
- * @param {Corti.AgentsGetContextRequest} request
750
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
751
- *
752
- * @throws {@link Corti.BadRequestError}
753
- * @throws {@link Corti.UnauthorizedError}
754
- * @throws {@link Corti.NotFoundError}
755
- *
756
- * @example
757
- * await client.agents.getContext("id", "contextId")
758
- */
759
- getContext(id, contextId, request = {}, requestOptions) {
760
- return core.HttpResponsePromise.fromPromise(this.__getContext(id, contextId, request, requestOptions));
761
- }
762
- __getContext(id_1, contextId_1) {
763
- return __awaiter(this, arguments, void 0, function* (id, contextId, request = {}, requestOptions) {
764
- var _a, _b, _c, _d;
765
- const { limit, offset } = request;
766
- const _queryParams = {};
767
- if (limit !== undefined) {
768
- _queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
769
- }
770
- if (offset !== undefined) {
771
- _queryParams["offset"] = (_b = offset === null || offset === void 0 ? void 0 : offset.toString()) !== null && _b !== void 0 ? _b : null;
772
- }
773
- const _response = yield core.fetcher({
774
- url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment)).agents, `agents/${encodeURIComponent(id)}/v1/contexts/${encodeURIComponent(contextId)}`),
775
- method: "GET",
776
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({
777
- Authorization: yield this._getAuthorizationHeader(),
778
- "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
779
- }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
780
- queryParameters: _queryParams,
781
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
782
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
783
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
784
- });
785
- if (_response.ok) {
786
- return {
787
- data: serializers.AgentsContext.parseOrThrow(_response.body, {
788
- unrecognizedObjectKeys: "passthrough",
789
- allowUnrecognizedUnionMembers: true,
790
- allowUnrecognizedEnumValues: true,
791
- skipValidation: true,
792
- breadcrumbsPrefix: ["response"],
793
- }),
794
- rawResponse: _response.rawResponse,
795
- };
796
- }
797
- if (_response.error.reason === "status-code") {
798
- switch (_response.error.statusCode) {
799
- case 400:
800
- throw new Corti.BadRequestError(_response.error.body, _response.rawResponse);
801
- case 401:
802
- throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
803
- case 404:
804
- throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
805
- default:
806
- throw new errors.CortiError({
807
- statusCode: _response.error.statusCode,
808
- body: _response.error.body,
809
- rawResponse: _response.rawResponse,
810
- });
811
- }
812
- }
813
- switch (_response.error.reason) {
814
- case "non-json":
815
- throw new errors.CortiError({
816
- statusCode: _response.error.statusCode,
817
- body: _response.error.rawBody,
818
- rawResponse: _response.rawResponse,
819
- });
820
- case "timeout":
821
- throw new errors.CortiTimeoutError("Timeout exceeded when calling GET /agents/{id}/v1/contexts/{contextId}.");
822
- case "unknown":
823
- throw new errors.CortiError({
824
- message: _response.error.errorMessage,
825
- rawResponse: _response.rawResponse,
826
- });
827
- }
828
- });
829
- }
830
- _getAuthorizationHeader() {
831
- return __awaiter(this, void 0, void 0, function* () {
832
- const bearer = yield core.Supplier.get(this._options.token);
833
- if (bearer != null) {
834
- return `Bearer ${bearer}`;
835
- }
836
- return undefined;
837
- });
838
- }
839
- }