@azure/ai-agents 1.1.0-beta.3 → 1.2.0-alpha.20250923.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/README.md +0 -76
  2. package/dist/browser/api/agentsContext.js +2 -2
  3. package/dist/browser/api/agentsContext.js.map +1 -1
  4. package/dist/browser/api/messages/index.d.ts +2 -2
  5. package/dist/browser/api/messages/index.d.ts.map +1 -1
  6. package/dist/browser/api/messages/index.js +1 -1
  7. package/dist/browser/api/messages/index.js.map +1 -1
  8. package/dist/browser/api/messages/operations.d.ts +6 -2
  9. package/dist/browser/api/messages/operations.d.ts.map +1 -1
  10. package/dist/browser/api/messages/operations.js +31 -1
  11. package/dist/browser/api/messages/operations.js.map +1 -1
  12. package/dist/browser/api/messages/options.d.ts +3 -0
  13. package/dist/browser/api/messages/options.d.ts.map +1 -1
  14. package/dist/browser/api/messages/options.js.map +1 -1
  15. package/dist/browser/api/operations.d.ts +1 -2
  16. package/dist/browser/api/operations.d.ts.map +1 -1
  17. package/dist/browser/api/operations.js +2 -2
  18. package/dist/browser/api/operations.js.map +1 -1
  19. package/dist/browser/api/runSteps/operations.js +3 -3
  20. package/dist/browser/api/runSteps/operations.js.map +1 -1
  21. package/dist/browser/api/runs/operations.d.ts +3 -3
  22. package/dist/browser/api/runs/operations.d.ts.map +1 -1
  23. package/dist/browser/api/runs/operations.js +12 -10
  24. package/dist/browser/api/runs/operations.js.map +1 -1
  25. package/dist/browser/api/vectorStoreFiles/operations.js +4 -4
  26. package/dist/browser/api/vectorStoreFiles/operations.js.map +1 -1
  27. package/dist/browser/api/vectorStores/operations.js +4 -4
  28. package/dist/browser/api/vectorStores/operations.js.map +1 -1
  29. package/dist/browser/classic/messages/index.d.ts +4 -2
  30. package/dist/browser/classic/messages/index.d.ts.map +1 -1
  31. package/dist/browser/classic/messages/index.js +2 -1
  32. package/dist/browser/classic/messages/index.js.map +1 -1
  33. package/dist/browser/classic/runs/index.d.ts.map +1 -1
  34. package/dist/browser/classic/runs/index.js +4 -1
  35. package/dist/browser/classic/runs/index.js.map +1 -1
  36. package/dist/browser/constants.d.ts +1 -1
  37. package/dist/browser/constants.js +1 -1
  38. package/dist/browser/constants.js.map +1 -1
  39. package/dist/browser/index.d.ts +3 -2
  40. package/dist/browser/index.d.ts.map +1 -1
  41. package/dist/browser/index.js +1 -0
  42. package/dist/browser/index.js.map +1 -1
  43. package/dist/browser/models/index.d.ts +1 -1
  44. package/dist/browser/models/index.d.ts.map +1 -1
  45. package/dist/browser/models/index.js.map +1 -1
  46. package/dist/browser/models/models.d.ts +309 -31
  47. package/dist/browser/models/models.d.ts.map +1 -1
  48. package/dist/browser/models/models.js +341 -14
  49. package/dist/browser/models/models.js.map +1 -1
  50. package/dist/browser/models/streamingModels.d.ts +18 -18
  51. package/dist/browser/models/streamingModels.d.ts.map +1 -1
  52. package/dist/browser/models/streamingModels.js.map +1 -1
  53. package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
  54. package/dist/browser/utils/MCPTool.d.ts +12 -1
  55. package/dist/browser/utils/MCPTool.d.ts.map +1 -1
  56. package/dist/browser/utils/MCPTool.js +29 -2
  57. package/dist/browser/utils/MCPTool.js.map +1 -1
  58. package/dist/browser/utils/OpenApiTool.d.ts +46 -0
  59. package/dist/browser/utils/OpenApiTool.d.ts.map +1 -0
  60. package/dist/browser/utils/OpenApiTool.js +84 -0
  61. package/dist/browser/utils/OpenApiTool.js.map +1 -0
  62. package/dist/browser/utils/utils.d.ts +14 -50
  63. package/dist/browser/utils/utils.d.ts.map +1 -1
  64. package/dist/browser/utils/utils.js +13 -91
  65. package/dist/browser/utils/utils.js.map +1 -1
  66. package/dist/commonjs/api/agentsContext.js +2 -2
  67. package/dist/commonjs/api/agentsContext.js.map +1 -1
  68. package/dist/commonjs/api/messages/index.d.ts +2 -2
  69. package/dist/commonjs/api/messages/index.d.ts.map +1 -1
  70. package/dist/commonjs/api/messages/index.js +2 -1
  71. package/dist/commonjs/api/messages/index.js.map +1 -1
  72. package/dist/commonjs/api/messages/operations.d.ts +6 -2
  73. package/dist/commonjs/api/messages/operations.d.ts.map +1 -1
  74. package/dist/commonjs/api/messages/operations.js +33 -0
  75. package/dist/commonjs/api/messages/operations.js.map +1 -1
  76. package/dist/commonjs/api/messages/options.d.ts +3 -0
  77. package/dist/commonjs/api/messages/options.d.ts.map +1 -1
  78. package/dist/commonjs/api/messages/options.js.map +1 -1
  79. package/dist/commonjs/api/operations.d.ts +1 -2
  80. package/dist/commonjs/api/operations.d.ts.map +1 -1
  81. package/dist/commonjs/api/operations.js +2 -2
  82. package/dist/commonjs/api/operations.js.map +1 -1
  83. package/dist/commonjs/api/runSteps/operations.js +3 -3
  84. package/dist/commonjs/api/runSteps/operations.js.map +1 -1
  85. package/dist/commonjs/api/runs/operations.d.ts +3 -3
  86. package/dist/commonjs/api/runs/operations.d.ts.map +1 -1
  87. package/dist/commonjs/api/runs/operations.js +12 -10
  88. package/dist/commonjs/api/runs/operations.js.map +1 -1
  89. package/dist/commonjs/api/vectorStoreFiles/operations.js +4 -4
  90. package/dist/commonjs/api/vectorStoreFiles/operations.js.map +1 -1
  91. package/dist/commonjs/api/vectorStores/operations.js +4 -4
  92. package/dist/commonjs/api/vectorStores/operations.js.map +1 -1
  93. package/dist/commonjs/classic/messages/index.d.ts +4 -2
  94. package/dist/commonjs/classic/messages/index.d.ts.map +1 -1
  95. package/dist/commonjs/classic/messages/index.js +1 -0
  96. package/dist/commonjs/classic/messages/index.js.map +1 -1
  97. package/dist/commonjs/classic/runs/index.d.ts.map +1 -1
  98. package/dist/commonjs/classic/runs/index.js +4 -1
  99. package/dist/commonjs/classic/runs/index.js.map +1 -1
  100. package/dist/commonjs/constants.d.ts +1 -1
  101. package/dist/commonjs/constants.js +1 -1
  102. package/dist/commonjs/constants.js.map +1 -1
  103. package/dist/commonjs/index.d.ts +3 -2
  104. package/dist/commonjs/index.d.ts.map +1 -1
  105. package/dist/commonjs/index.js +3 -1
  106. package/dist/commonjs/index.js.map +1 -1
  107. package/dist/commonjs/models/index.d.ts +1 -1
  108. package/dist/commonjs/models/index.d.ts.map +1 -1
  109. package/dist/commonjs/models/index.js.map +1 -1
  110. package/dist/commonjs/models/models.d.ts +309 -31
  111. package/dist/commonjs/models/models.d.ts.map +1 -1
  112. package/dist/commonjs/models/models.js +385 -15
  113. package/dist/commonjs/models/models.js.map +1 -1
  114. package/dist/commonjs/models/streamingModels.d.ts +18 -18
  115. package/dist/commonjs/models/streamingModels.d.ts.map +1 -1
  116. package/dist/commonjs/models/streamingModels.js.map +1 -1
  117. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
  118. package/dist/commonjs/tsdoc-metadata.json +1 -1
  119. package/dist/commonjs/utils/MCPTool.d.ts +12 -1
  120. package/dist/commonjs/utils/MCPTool.d.ts.map +1 -1
  121. package/dist/commonjs/utils/MCPTool.js +29 -2
  122. package/dist/commonjs/utils/MCPTool.js.map +1 -1
  123. package/dist/commonjs/utils/OpenApiTool.d.ts +46 -0
  124. package/dist/commonjs/utils/OpenApiTool.d.ts.map +1 -0
  125. package/dist/commonjs/utils/OpenApiTool.js +88 -0
  126. package/dist/commonjs/utils/OpenApiTool.js.map +1 -0
  127. package/dist/commonjs/utils/utils.d.ts +14 -50
  128. package/dist/commonjs/utils/utils.d.ts.map +1 -1
  129. package/dist/commonjs/utils/utils.js +13 -91
  130. package/dist/commonjs/utils/utils.js.map +1 -1
  131. package/dist/esm/api/agentsContext.js +2 -2
  132. package/dist/esm/api/agentsContext.js.map +1 -1
  133. package/dist/esm/api/messages/index.d.ts +2 -2
  134. package/dist/esm/api/messages/index.d.ts.map +1 -1
  135. package/dist/esm/api/messages/index.js +1 -1
  136. package/dist/esm/api/messages/index.js.map +1 -1
  137. package/dist/esm/api/messages/operations.d.ts +6 -2
  138. package/dist/esm/api/messages/operations.d.ts.map +1 -1
  139. package/dist/esm/api/messages/operations.js +31 -1
  140. package/dist/esm/api/messages/operations.js.map +1 -1
  141. package/dist/esm/api/messages/options.d.ts +3 -0
  142. package/dist/esm/api/messages/options.d.ts.map +1 -1
  143. package/dist/esm/api/messages/options.js.map +1 -1
  144. package/dist/esm/api/operations.d.ts +1 -2
  145. package/dist/esm/api/operations.d.ts.map +1 -1
  146. package/dist/esm/api/operations.js +2 -2
  147. package/dist/esm/api/operations.js.map +1 -1
  148. package/dist/esm/api/runSteps/operations.js +3 -3
  149. package/dist/esm/api/runSteps/operations.js.map +1 -1
  150. package/dist/esm/api/runs/operations.d.ts +3 -3
  151. package/dist/esm/api/runs/operations.d.ts.map +1 -1
  152. package/dist/esm/api/runs/operations.js +12 -10
  153. package/dist/esm/api/runs/operations.js.map +1 -1
  154. package/dist/esm/api/vectorStoreFiles/operations.js +4 -4
  155. package/dist/esm/api/vectorStoreFiles/operations.js.map +1 -1
  156. package/dist/esm/api/vectorStores/operations.js +4 -4
  157. package/dist/esm/api/vectorStores/operations.js.map +1 -1
  158. package/dist/esm/classic/messages/index.d.ts +4 -2
  159. package/dist/esm/classic/messages/index.d.ts.map +1 -1
  160. package/dist/esm/classic/messages/index.js +2 -1
  161. package/dist/esm/classic/messages/index.js.map +1 -1
  162. package/dist/esm/classic/runs/index.d.ts.map +1 -1
  163. package/dist/esm/classic/runs/index.js +4 -1
  164. package/dist/esm/classic/runs/index.js.map +1 -1
  165. package/dist/esm/constants.d.ts +1 -1
  166. package/dist/esm/constants.js +1 -1
  167. package/dist/esm/constants.js.map +1 -1
  168. package/dist/esm/index.d.ts +3 -2
  169. package/dist/esm/index.d.ts.map +1 -1
  170. package/dist/esm/index.js +1 -0
  171. package/dist/esm/index.js.map +1 -1
  172. package/dist/esm/models/index.d.ts +1 -1
  173. package/dist/esm/models/index.d.ts.map +1 -1
  174. package/dist/esm/models/index.js.map +1 -1
  175. package/dist/esm/models/models.d.ts +309 -31
  176. package/dist/esm/models/models.d.ts.map +1 -1
  177. package/dist/esm/models/models.js +341 -14
  178. package/dist/esm/models/models.js.map +1 -1
  179. package/dist/esm/models/streamingModels.d.ts +18 -18
  180. package/dist/esm/models/streamingModels.d.ts.map +1 -1
  181. package/dist/esm/models/streamingModels.js.map +1 -1
  182. package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
  183. package/dist/esm/utils/MCPTool.d.ts +12 -1
  184. package/dist/esm/utils/MCPTool.d.ts.map +1 -1
  185. package/dist/esm/utils/MCPTool.js +29 -2
  186. package/dist/esm/utils/MCPTool.js.map +1 -1
  187. package/dist/esm/utils/OpenApiTool.d.ts +46 -0
  188. package/dist/esm/utils/OpenApiTool.d.ts.map +1 -0
  189. package/dist/esm/utils/OpenApiTool.js +84 -0
  190. package/dist/esm/utils/OpenApiTool.js.map +1 -0
  191. package/dist/esm/utils/utils.d.ts +14 -50
  192. package/dist/esm/utils/utils.d.ts.map +1 -1
  193. package/dist/esm/utils/utils.js +13 -91
  194. package/dist/esm/utils/utils.js.map +1 -1
  195. package/dist/react-native/api/agentsContext.js +2 -2
  196. package/dist/react-native/api/agentsContext.js.map +1 -1
  197. package/dist/react-native/api/messages/index.d.ts +2 -2
  198. package/dist/react-native/api/messages/index.d.ts.map +1 -1
  199. package/dist/react-native/api/messages/index.js +1 -1
  200. package/dist/react-native/api/messages/index.js.map +1 -1
  201. package/dist/react-native/api/messages/operations.d.ts +6 -2
  202. package/dist/react-native/api/messages/operations.d.ts.map +1 -1
  203. package/dist/react-native/api/messages/operations.js +31 -1
  204. package/dist/react-native/api/messages/operations.js.map +1 -1
  205. package/dist/react-native/api/messages/options.d.ts +3 -0
  206. package/dist/react-native/api/messages/options.d.ts.map +1 -1
  207. package/dist/react-native/api/messages/options.js.map +1 -1
  208. package/dist/react-native/api/operations.d.ts +1 -2
  209. package/dist/react-native/api/operations.d.ts.map +1 -1
  210. package/dist/react-native/api/operations.js +2 -2
  211. package/dist/react-native/api/operations.js.map +1 -1
  212. package/dist/react-native/api/runSteps/operations.js +3 -3
  213. package/dist/react-native/api/runSteps/operations.js.map +1 -1
  214. package/dist/react-native/api/runs/operations.d.ts +3 -3
  215. package/dist/react-native/api/runs/operations.d.ts.map +1 -1
  216. package/dist/react-native/api/runs/operations.js +12 -10
  217. package/dist/react-native/api/runs/operations.js.map +1 -1
  218. package/dist/react-native/api/vectorStoreFiles/operations.js +4 -4
  219. package/dist/react-native/api/vectorStoreFiles/operations.js.map +1 -1
  220. package/dist/react-native/api/vectorStores/operations.js +4 -4
  221. package/dist/react-native/api/vectorStores/operations.js.map +1 -1
  222. package/dist/react-native/classic/messages/index.d.ts +4 -2
  223. package/dist/react-native/classic/messages/index.d.ts.map +1 -1
  224. package/dist/react-native/classic/messages/index.js +2 -1
  225. package/dist/react-native/classic/messages/index.js.map +1 -1
  226. package/dist/react-native/classic/runs/index.d.ts.map +1 -1
  227. package/dist/react-native/classic/runs/index.js +4 -1
  228. package/dist/react-native/classic/runs/index.js.map +1 -1
  229. package/dist/react-native/constants.d.ts +1 -1
  230. package/dist/react-native/constants.js +1 -1
  231. package/dist/react-native/constants.js.map +1 -1
  232. package/dist/react-native/index.d.ts +3 -2
  233. package/dist/react-native/index.d.ts.map +1 -1
  234. package/dist/react-native/index.js +1 -0
  235. package/dist/react-native/index.js.map +1 -1
  236. package/dist/react-native/models/index.d.ts +1 -1
  237. package/dist/react-native/models/index.d.ts.map +1 -1
  238. package/dist/react-native/models/index.js.map +1 -1
  239. package/dist/react-native/models/models.d.ts +309 -31
  240. package/dist/react-native/models/models.d.ts.map +1 -1
  241. package/dist/react-native/models/models.js +341 -14
  242. package/dist/react-native/models/models.js.map +1 -1
  243. package/dist/react-native/models/streamingModels.d.ts +18 -18
  244. package/dist/react-native/models/streamingModels.d.ts.map +1 -1
  245. package/dist/react-native/models/streamingModels.js.map +1 -1
  246. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
  247. package/dist/react-native/utils/MCPTool.d.ts +12 -1
  248. package/dist/react-native/utils/MCPTool.d.ts.map +1 -1
  249. package/dist/react-native/utils/MCPTool.js +29 -2
  250. package/dist/react-native/utils/MCPTool.js.map +1 -1
  251. package/dist/react-native/utils/OpenApiTool.d.ts +46 -0
  252. package/dist/react-native/utils/OpenApiTool.d.ts.map +1 -0
  253. package/dist/react-native/utils/OpenApiTool.js +84 -0
  254. package/dist/react-native/utils/OpenApiTool.js.map +1 -0
  255. package/dist/react-native/utils/utils.d.ts +14 -50
  256. package/dist/react-native/utils/utils.d.ts.map +1 -1
  257. package/dist/react-native/utils/utils.js +13 -91
  258. package/dist/react-native/utils/utils.js.map +1 -1
  259. package/package.json +36 -37
@@ -4,6 +4,7 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.ToolSet = exports.ToolUtility = exports.connectionToolType = void 0;
6
6
  exports.isOutputOfType = isOutputOfType;
7
+ const OpenApiTool_js_1 = require("./OpenApiTool.js");
7
8
  const MCPTool_js_1 = require("./MCPTool.js");
8
9
  /**
9
10
  * Determines if the given output is of the specified type.
@@ -58,28 +59,6 @@ class ToolUtility {
58
59
  },
59
60
  };
60
61
  }
61
- /**
62
- * Creates a sharepoint grounding search tool
63
- *
64
- * @param connectionId - The ID of the sharepoint search connection.
65
- *
66
- * @returns An object containing the definition and resources for the sharepoint grounding search tool
67
- *
68
- */
69
- static createSharepointGroundingTool(connectionId) {
70
- return {
71
- definition: {
72
- type: "sharepoint_grounding",
73
- sharepointGrounding: {
74
- connectionList: [
75
- {
76
- connectionId: connectionId,
77
- },
78
- ],
79
- },
80
- },
81
- };
82
- }
83
62
  /**
84
63
  * Creates a bing grounding search tool
85
64
  *
@@ -106,26 +85,6 @@ class ToolUtility {
106
85
  },
107
86
  };
108
87
  }
109
- /**
110
- * Creates a bing custom search tool
111
- *
112
- * @param searchConfigurations - The ID of bing search connection and instanceName.
113
- *
114
- * @returns An object containing the definition and resources for the bing custom search tool
115
- */
116
- static createBingCustomSearchTool(searchConfigurations) {
117
- return {
118
- definition: {
119
- type: "bing_custom_search",
120
- bingCustomSearch: {
121
- searchConfigurations: searchConfigurations.map((searchConfiguration) => ({
122
- connectionId: searchConfiguration.connectionId,
123
- instanceName: searchConfiguration.instanceName,
124
- })),
125
- },
126
- },
127
- };
128
- }
129
88
  /**
130
89
  * Creates a file search tool
131
90
  *
@@ -201,22 +160,6 @@ class ToolUtility {
201
160
  },
202
161
  };
203
162
  }
204
- /**
205
- * Creates a Microsoft Fabric tool
206
- *
207
- * @param connectionIds - A list of the IDs of the Fabric connections to use.
208
- * @returns An object containing the definition for the Microsoft Fabric tool
209
- */
210
- static createFabricTool(connectionId) {
211
- return {
212
- definition: {
213
- type: "fabric_dataagent",
214
- fabricDataagent: {
215
- connectionList: [{ connectionId: connectionId }],
216
- },
217
- },
218
- };
219
- }
220
163
  /**
221
164
  * Creates a function tool
222
165
  *
@@ -241,16 +184,7 @@ class ToolUtility {
241
184
  */
242
185
  static createOpenApiTool(openApiFunctionDefinition) {
243
186
  return {
244
- definition: {
245
- type: "openapi",
246
- openapi: {
247
- name: openApiFunctionDefinition.name,
248
- spec: openApiFunctionDefinition.spec,
249
- description: openApiFunctionDefinition.description,
250
- auth: openApiFunctionDefinition.auth,
251
- defaultParams: openApiFunctionDefinition.defaultParams,
252
- },
253
- },
187
+ definition: OpenApiTool_js_1.OpenApiTool.createDefinition(openApiFunctionDefinition),
254
188
  };
255
189
  }
256
190
  /**
@@ -339,6 +273,17 @@ class ToolSet {
339
273
  this.toolDefinitions.push(tool.definition);
340
274
  return tool;
341
275
  }
276
+ /**
277
+ * Adds a Model Context Protocol (MCP) tool to the tool set.
278
+ * @param options - The options for configuring the MCP tool.
279
+ * @returns An object containing the definition and resources for the MCP tool
280
+ */
281
+ addMCPTool(options) {
282
+ const tool = ToolUtility.createMCPTool(options);
283
+ this.toolDefinitions.push(tool.definition);
284
+ this.toolResources = { ...this.toolResources, ...tool.resources };
285
+ return tool;
286
+ }
342
287
  /**
343
288
  * Adds a bing grounding search tool to the tool set.
344
289
  *
@@ -364,29 +309,6 @@ class ToolSet {
364
309
  this.toolDefinitions.push(tool.definition);
365
310
  return tool;
366
311
  }
367
- /**
368
- * Adds a Microsoft Fabric tool to the tool set.
369
- *
370
- * @param connectionId - The ID of the Fabric connection to use.
371
- * @returns An object containing the definition for the Microsoft Fabric tool
372
- */
373
- addFabricTool(connectionId) {
374
- const tool = ToolUtility.createFabricTool(connectionId);
375
- this.toolDefinitions.push(tool.definition);
376
- return tool;
377
- }
378
- /**
379
- * Adds sharepoint grounding search tool to the tool set.
380
- *
381
- * @param connectionId - The ID of the sharepoint search connection.
382
- *
383
- * @returns An object containing the definition and resources for the sharepoint grounding search tool
384
- */
385
- addSharepointGroundingTool(connectionId) {
386
- const tool = ToolUtility.createSharepointGroundingTool(connectionId);
387
- this.toolDefinitions.push(tool.definition);
388
- return tool;
389
- }
390
312
  }
391
313
  exports.ToolSet = ToolSet;
392
314
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAqClC,wCAKC;AAfD,6CAAuC;AAEvC;;;;;;;GAOG;AACH,SAAgB,cAAc,CAC5B,MAA+D,EAC/D,IAAY;IAEZ,OAAO,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;AAC9B,CAAC;AAED,2DAA2D;AAC3D,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,iCAAiC;IACjC,sDAAgC,CAAA;IAChC,4BAA4B;IAC5B,0DAAoC,CAAA;IACpC,sBAAsB;IACtB,kEAA4C,CAAA;IAC5C,0BAA0B;IAC1B,sDAAgC,CAAA;IAChC,8BAA8B;IAC9B,6DAAuC,CAAA;AACzC,CAAC,EAXW,kBAAkB,kCAAlB,kBAAkB,QAW7B;AAED,MAAM,OAAO,GAAG;IACd,cAAc,EAAE,eAAe;IAC/B,gBAAgB,EAAE,kBAAkB;IACpC,oBAAoB,EAAE,qBAAqB;IAC3C,cAAc,EAAE,eAAe;IAC/B,kBAAkB,EAAE,kBAAkB;CACvC,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CAAC;IACd,CAAC;IAED;;;;;;OAMG;IACH,0BAA0B,CAAC,YAAoB;QAC7C,MAAM,IAAI,GAAG,WAAW,CAAC,6BAA6B,CAAC,YAAY,CAAC,CAAC;QACrE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAxJD,0BAwJC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AzureAISearchToolDefinition,\n CodeInterpreterToolDefinition,\n FileSearchToolDefinition,\n FileSearchToolDefinitionDetails,\n FunctionDefinition,\n FunctionToolDefinition,\n OpenApiToolDefinition,\n RequiredAction,\n RequiredToolCall,\n ToolDefinition,\n ToolDefinitionUnion,\n ToolResources,\n VectorStoreConfigurations,\n VectorStoreDataSource,\n OpenApiFunctionDefinition,\n AISearchIndexResource,\n BingCustomSearchConfiguration,\n BingCustomSearchToolDefinition,\n BingGroundingToolDefinition,\n BingGroundingSearchConfiguration,\n ConnectedAgentToolDefinition,\n MicrosoftFabricToolDefinition,\n SharepointToolDefinition,\n} from \"../index.js\";\nimport { MCPTool } from \"./MCPTool.js\";\n\n/**\n * Determines if the given output is of the specified type.\n *\n * @typeParam T - The type to check against, which extends one of the possible output parent types.\n * @param output - The action to check, which can be of type `RequiredAction`, `RequiredToolCall`, or `ToolDefinitionUnion`.\n * @param type - The type to check the action against.\n * @returns A boolean indicating whether the action is of the specified type.\n */\nexport function isOutputOfType<T extends { type: string }>(\n output: RequiredAction | RequiredToolCall | ToolDefinitionUnion,\n type: string,\n): output is T {\n return output.type === type;\n}\n\n/** Types of connection tools used to configure an agent */\nexport enum connectionToolType {\n /** Bing grounding search tool */\n BingGrounding = \"bing_grounding\",\n /** Microsoft Fabric tool */\n MicrosoftFabric = \"fabric_dataagent\",\n /** Sharepoint tool */\n SharepointGrounding = \"sharepoint_grounding\",\n /** Azure Function tool */\n AzureFunction = \"azure_function\",\n /** Bing custom search tool */\n BingCustomSearch = \"bing_custom_search\",\n}\n\nconst toolMap = {\n bing_grounding: \"bingGrounding\",\n fabric_dataagent: \"fabric_dataagent\",\n sharepoint_grounding: \"sharepointGrounding\",\n azure_function: \"azureFunction\",\n bing_custom_search: \"bingCustomSearch\",\n};\n\n/**\n * Utility class for creating various tools.\n */\nexport class ToolUtility {\n /**\n * Creates a connection tool\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n * @returns An object containing the definition for the connection tool\n */\n static createConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinitionUnion } {\n return {\n definition: {\n type: toolType,\n [toolMap[toolType]]: {\n connections: connectionIds.map((connectionId) => ({ connectionId: connectionId })),\n },\n },\n };\n }\n\n /**\n * Creates a sharepoint grounding search tool\n *\n * @param connectionId - The ID of the sharepoint search connection.\n *\n * @returns An object containing the definition and resources for the sharepoint grounding search tool\n *\n */\n static createSharepointGroundingTool(connectionId: string): {\n definition: SharepointToolDefinition;\n } {\n return {\n definition: {\n type: \"sharepoint_grounding\",\n sharepointGrounding: {\n connectionList: [\n {\n connectionId: connectionId,\n },\n ],\n },\n },\n };\n }\n\n /**\n * Creates a bing grounding search tool\n *\n * @param connectionId - The ID of the bing search connection.\n *\n * @returns An object containing the definition and resources for the bing grounding search tool\n *\n */\n static createBingGroundingTool(searchConfigurations: BingGroundingSearchConfiguration[]): {\n definition: BingGroundingToolDefinition;\n } {\n // Ensure searchConfigurations is an array even if it's undefined\n const configs = searchConfigurations || [];\n return {\n definition: {\n type: \"bing_grounding\",\n bingGrounding: {\n searchConfigurations: configs.map((searchConfiguration) => ({\n connectionId: searchConfiguration.connectionId,\n market: searchConfiguration?.market,\n setLang: searchConfiguration?.setLang,\n count: searchConfiguration?.count,\n freshness: searchConfiguration?.freshness,\n })),\n },\n },\n };\n }\n\n /**\n * Creates a bing custom search tool\n *\n * @param searchConfigurations - The ID of bing search connection and instanceName.\n *\n * @returns An object containing the definition and resources for the bing custom search tool\n */\n\n static createBingCustomSearchTool(searchConfigurations: BingCustomSearchConfiguration[]): {\n definition: BingCustomSearchToolDefinition;\n } {\n return {\n definition: {\n type: \"bing_custom_search\",\n bingCustomSearch: {\n searchConfigurations: searchConfigurations.map((searchConfiguration) => ({\n connectionId: searchConfiguration.connectionId,\n instanceName: searchConfiguration.instanceName,\n })),\n },\n },\n };\n }\n\n /**\n * Creates a file search tool\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n static createFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"file_search\", fileSearch: definitionDetails },\n resources: { fileSearch: { vectorStoreIds: vectorStoreIds, vectorStores: vectorStores } },\n };\n }\n\n /**\n * Creates a code interpreter tool\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool.\n */\n static createCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n if (fileIds && dataSources) {\n throw new Error(\"Cannot specify both fileIds and dataSources\");\n }\n\n return {\n definition: { type: \"code_interpreter\" },\n resources: { codeInterpreter: { fileIds: fileIds, dataSources: dataSources } },\n };\n }\n\n /**\n * Creates an Azure AI search tool\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool.\n */\n static createAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n options?: AISearchIndexResource,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"azure_ai_search\" },\n resources: {\n azureAISearch: {\n indexList: [\n {\n indexConnectionId: indexConnectionId,\n indexName: indexName,\n queryType: options?.queryType,\n topK: options?.topK,\n filter: options?.filter,\n },\n ],\n },\n },\n };\n }\n\n /**\n * Creates a connected agent tool\n *\n * @returns An object containing the definition for the connected agent tool.\n */\n static createConnectedAgentTool(\n id: string,\n name: string,\n description: string,\n ): { definition: ConnectedAgentToolDefinition } {\n return {\n definition: {\n type: \"connected_agent\",\n connectedAgent: {\n id: id,\n name: name,\n description: description,\n },\n },\n };\n }\n\n /**\n * Creates a Microsoft Fabric tool\n *\n * @param connectionIds - A list of the IDs of the Fabric connections to use.\n * @returns An object containing the definition for the Microsoft Fabric tool\n */\n static createFabricTool(connectionId: string): { definition: MicrosoftFabricToolDefinition } {\n return {\n definition: {\n type: \"fabric_dataagent\",\n fabricDataagent: {\n connectionList: [{ connectionId: connectionId }],\n },\n },\n };\n }\n\n /**\n * Creates a function tool\n *\n * @param functionDefinition - The function definition to use.\n *\n * @returns An object containing the definition for the function tool.\n */\n static createFunctionTool(functionDefinition: FunctionDefinition): {\n definition: FunctionToolDefinition;\n } {\n return {\n definition: {\n type: \"function\",\n function: functionDefinition,\n },\n };\n }\n\n /**\n * Creates an OpenApi tool\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool.\n */\n static createOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n return {\n definition: {\n type: \"openapi\",\n openapi: {\n name: openApiFunctionDefinition.name,\n spec: openApiFunctionDefinition.spec,\n description: openApiFunctionDefinition.description,\n auth: openApiFunctionDefinition.auth,\n defaultParams: openApiFunctionDefinition.defaultParams,\n },\n },\n };\n }\n /**\n * Creates an MCP tool with the provided configuration.\n * @param options - Configuration options for the MCP tool\n * @returns A new MCPTool instance\n */\n static createMCPTool(options: {\n serverLabel: string;\n serverUrl: string;\n allowedTools?: string[];\n }): MCPTool {\n return new MCPTool(options.serverLabel, options.serverUrl, options.allowedTools);\n }\n}\n\n/**\n * Represents a set of tools with their definitions and resources.\n */\nexport class ToolSet {\n /** A list of tool definitions that have been added to the tool set. */\n toolDefinitions: ToolDefinition[] = [];\n\n /** A collection of resources associated with the tools in the tool set. */\n toolResources: ToolResources = {};\n\n /**\n * Adds a connection tool to the tool set.\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n *\n * @returns An object containing the definition for the connection tool\n */\n addConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinition } {\n const tool = ToolUtility.createConnectionTool(toolType, connectionIds);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a file search tool to the tool set.\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n addFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createFileSearchTool(vectorStoreIds, vectorStores, definitionDetails);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds a code interpreter tool to the tool set.\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool\n */\n addCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createCodeInterpreterTool(fileIds, dataSources);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an Azure AI search tool to the tool set.\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool\n */\n addAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createAzureAISearchTool(indexConnectionId, indexName);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an OpenApi tool to the tool set.\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool\n */\n addOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n const tool = ToolUtility.createOpenApiTool(openApiFunctionDefinition);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a bing grounding search tool to the tool set.\n *\n * @param connectionId - The ID of the bing search connection.\n *\n * @returns An object containing the definition and resources for the bing grounding search tool\n */\n addBingGroundingTool(searchConfigurations: BingGroundingSearchConfiguration[]): {\n definition: BingGroundingToolDefinition;\n } {\n const tool = ToolUtility.createBingGroundingTool(searchConfigurations);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a connected agent tool to the tool set.\n *\n * @param id - The ID of the connected agent.\n * @param name - The name of the connected agent.\n * @param description - The description of the connected agent.\n * @returns An object containing the definition for the connected agent tool\n */\n addConnectedAgentTool(\n id: string,\n name: string,\n description: string,\n ): { definition: ConnectedAgentToolDefinition } {\n const tool = ToolUtility.createConnectedAgentTool(id, name, description);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a Microsoft Fabric tool to the tool set.\n *\n * @param connectionId - The ID of the Fabric connection to use.\n * @returns An object containing the definition for the Microsoft Fabric tool\n */\n addFabricTool(connectionId: string): { definition: MicrosoftFabricToolDefinition } {\n const tool = ToolUtility.createFabricTool(connectionId);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds sharepoint grounding search tool to the tool set.\n *\n * @param connectionId - The ID of the sharepoint search connection.\n *\n * @returns An object containing the definition and resources for the sharepoint grounding search tool\n */\n addSharepointGroundingTool(connectionId: string): { definition: SharepointToolDefinition } {\n const tool = ToolUtility.createSharepointGroundingTool(connectionId);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAkClC,wCAKC;AAfD,qDAA+C;AAC/C,6CAAuC;AACvC;;;;;;;GAOG;AACH,SAAgB,cAAc,CAC5B,MAA+D,EAC/D,IAAY;IAEZ,OAAO,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;AAC9B,CAAC;AAED,2DAA2D;AAC3D,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,iCAAiC;IACjC,sDAAgC,CAAA;IAChC,4BAA4B;IAC5B,0DAAoC,CAAA;IACpC,sBAAsB;IACtB,kEAA4C,CAAA;IAC5C,0BAA0B;IAC1B,sDAAgC,CAAA;IAChC,8BAA8B;IAC9B,6DAAuC,CAAA;AACzC,CAAC,EAXW,kBAAkB,kCAAlB,kBAAkB,QAW7B;AAED,MAAM,OAAO,GAAG;IACd,cAAc,EAAE,eAAe;IAC/B,gBAAgB,EAAE,kBAAkB;IACpC,oBAAoB,EAAE,qBAAqB;IAC3C,cAAc,EAAE,eAAe;IAC/B,kBAAkB,EAAE,kBAAkB;CACvC,CA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U,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACH,qBAAqB,CACnB,EAAU,EACV,IAAY,EACZ,WAAmB;QAEnB,MAAM,IAAI,GAAG,WAAW,CAAC,wBAAwB,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA9ID,0BA8IC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AzureAISearchToolDefinition,\n CodeInterpreterToolDefinition,\n FileSearchToolDefinition,\n FileSearchToolDefinitionDetails,\n FunctionDefinition,\n FunctionToolDefinition,\n OpenApiToolDefinition,\n RequiredAction,\n RequiredToolCall,\n ToolDefinition,\n ToolDefinitionUnion,\n ToolResources,\n VectorStoreConfigurations,\n VectorStoreDataSource,\n OpenApiFunctionDefinition,\n AISearchIndexResource,\n BingGroundingToolDefinition,\n BingGroundingSearchConfiguration,\n ConnectedAgentToolDefinition,\n MCPToolDefinition,\n} from \"../index.js\";\nimport { OpenApiTool } from \"./OpenApiTool.js\";\nimport { MCPTool } from \"./MCPTool.js\";\n/**\n * Determines if the given output is of the specified type.\n *\n * @typeParam T - The type to check against, which extends one of the possible output parent types.\n * @param output - The action to check, which can be of type `RequiredAction`, `RequiredToolCall`, or `ToolDefinitionUnion`.\n * @param type - The type to check the action against.\n * @returns A boolean indicating whether the action is of the specified type.\n */\nexport function isOutputOfType<T extends { type: string }>(\n output: RequiredAction | RequiredToolCall | ToolDefinitionUnion,\n type: string,\n): output is T {\n return output.type === type;\n}\n\n/** Types of connection tools used to configure an agent */\nexport enum connectionToolType {\n /** Bing grounding search tool */\n BingGrounding = \"bing_grounding\",\n /** Microsoft Fabric tool */\n MicrosoftFabric = \"fabric_dataagent\",\n /** Sharepoint tool */\n SharepointGrounding = \"sharepoint_grounding\",\n /** Azure Function tool */\n AzureFunction = \"azure_function\",\n /** Bing custom search tool */\n BingCustomSearch = \"bing_custom_search\",\n}\n\nconst toolMap = {\n bing_grounding: \"bingGrounding\",\n fabric_dataagent: \"fabric_dataagent\",\n sharepoint_grounding: \"sharepointGrounding\",\n azure_function: \"azureFunction\",\n bing_custom_search: \"bingCustomSearch\",\n};\n\n/**\n * Utility class for creating various tools.\n */\nexport class ToolUtility {\n /**\n * Creates a connection tool\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n * @returns An object containing the definition for the connection tool\n */\n static createConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinitionUnion } {\n return {\n definition: {\n type: toolType,\n [toolMap[toolType]]: {\n connections: connectionIds.map((connectionId) => ({ connectionId: connectionId })),\n },\n },\n };\n }\n\n /**\n * Creates a bing grounding search tool\n *\n * @param connectionId - The ID of the bing search connection.\n *\n * @returns An object containing the definition and resources for the bing grounding search tool\n *\n */\n static createBingGroundingTool(searchConfigurations: BingGroundingSearchConfiguration[]): {\n definition: BingGroundingToolDefinition;\n } {\n // Ensure searchConfigurations is an array even if it's undefined\n const configs = searchConfigurations || [];\n return {\n definition: {\n type: \"bing_grounding\",\n bingGrounding: {\n searchConfigurations: configs.map((searchConfiguration) => ({\n connectionId: searchConfiguration.connectionId,\n market: searchConfiguration?.market,\n setLang: searchConfiguration?.setLang,\n count: searchConfiguration?.count,\n freshness: searchConfiguration?.freshness,\n })),\n },\n },\n };\n }\n\n /**\n * Creates a file search tool\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n static createFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"file_search\", fileSearch: definitionDetails },\n resources: { fileSearch: { vectorStoreIds: vectorStoreIds, vectorStores: vectorStores } },\n };\n }\n\n /**\n * Creates a code interpreter tool\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool.\n */\n static createCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n if (fileIds && dataSources) {\n throw new Error(\"Cannot specify both fileIds and dataSources\");\n }\n\n return {\n definition: { type: \"code_interpreter\" },\n resources: { codeInterpreter: { fileIds: fileIds, dataSources: dataSources } },\n };\n }\n\n /**\n * Creates an Azure AI search tool\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool.\n */\n static createAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n options?: AISearchIndexResource,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"azure_ai_search\" },\n resources: {\n azureAISearch: {\n indexList: [\n {\n indexConnectionId: indexConnectionId,\n indexName: indexName,\n queryType: options?.queryType,\n topK: options?.topK,\n filter: options?.filter,\n },\n ],\n },\n },\n };\n }\n\n /**\n * Creates a connected agent tool\n *\n * @returns An object containing the definition for the connected agent tool.\n */\n static createConnectedAgentTool(\n id: string,\n name: string,\n description: string,\n ): { definition: ConnectedAgentToolDefinition } {\n return {\n definition: {\n type: \"connected_agent\",\n connectedAgent: {\n id: id,\n name: name,\n description: description,\n },\n },\n };\n }\n\n /**\n * Creates a function tool\n *\n * @param functionDefinition - The function definition to use.\n *\n * @returns An object containing the definition for the function tool.\n */\n static createFunctionTool(functionDefinition: FunctionDefinition): {\n definition: FunctionToolDefinition;\n } {\n return {\n definition: {\n type: \"function\",\n function: functionDefinition,\n },\n };\n }\n\n /**\n * Creates an OpenApi tool\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool.\n */\n static createOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n return {\n definition: OpenApiTool.createDefinition(openApiFunctionDefinition),\n };\n }\n\n /**\n * Creates an MCP tool with the provided configuration.\n * @param options - Configuration options for the MCP tool\n * @returns A new MCPTool instance\n */\n static createMCPTool(options: {\n serverLabel: string;\n serverUrl: string;\n allowedTools?: string[];\n }): MCPTool {\n return new MCPTool(options.serverLabel, options.serverUrl, options.allowedTools);\n }\n}\n\n/**\n * Represents a set of tools with their definitions and resources.\n */\nexport class ToolSet {\n /** A list of tool definitions that have been added to the tool set. */\n toolDefinitions: ToolDefinition[] = [];\n\n /** A collection of resources associated with the tools in the tool set. */\n toolResources: ToolResources = {};\n\n /**\n * Adds a connection tool to the tool set.\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n *\n * @returns An object containing the definition for the connection tool\n */\n addConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinition } {\n const tool = ToolUtility.createConnectionTool(toolType, connectionIds);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a file search tool to the tool set.\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n addFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createFileSearchTool(vectorStoreIds, vectorStores, definitionDetails);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds a code interpreter tool to the tool set.\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool\n */\n addCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createCodeInterpreterTool(fileIds, dataSources);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an Azure AI search tool to the tool set.\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool\n */\n addAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createAzureAISearchTool(indexConnectionId, indexName);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an OpenApi tool to the tool set.\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool\n */\n addOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n const tool = ToolUtility.createOpenApiTool(openApiFunctionDefinition);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a Model Context Protocol (MCP) tool to the tool set.\n * @param options - The options for configuring the MCP tool.\n * @returns An object containing the definition and resources for the MCP tool\n */\n addMCPTool(options: { serverLabel: string; serverUrl: string; allowedTools?: string[] }): {\n definition: MCPToolDefinition;\n resources: ToolResources;\n } {\n const tool = ToolUtility.createMCPTool(options);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds a bing grounding search tool to the tool set.\n *\n * @param connectionId - The ID of the bing search connection.\n *\n * @returns An object containing the definition and resources for the bing grounding search tool\n */\n addBingGroundingTool(searchConfigurations: BingGroundingSearchConfiguration[]): {\n definition: BingGroundingToolDefinition;\n } {\n const tool = ToolUtility.createBingGroundingTool(searchConfigurations);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a connected agent tool to the tool set.\n *\n * @param id - The ID of the connected agent.\n * @param name - The name of the connected agent.\n * @param description - The description of the connected agent.\n * @returns An object containing the definition for the connected agent tool\n */\n addConnectedAgentTool(\n id: string,\n name: string,\n description: string,\n ): { definition: ConnectedAgentToolDefinition } {\n const tool = ToolUtility.createConnectedAgentTool(id, name, description);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n}\n"]}
@@ -3,9 +3,9 @@
3
3
  import { logger } from "../logger.js";
4
4
  import { getClient } from "@azure-rest/core-client";
5
5
  export function createAgents(endpointParam, credential, options = {}) {
6
- const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);
6
+ const endpointUrl = options.endpoint ?? String(endpointParam);
7
7
  const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
8
- const userAgentInfo = `azsdk-js-ai-agents/1.1.0-beta.1`;
8
+ const userAgentInfo = `azsdk-js-ai-agents/1.2.0-beta.1`;
9
9
  const userAgentPrefix = prefixFromOptions
10
10
  ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
11
11
  : `azsdk-js-api ${userAgentInfo}`;
@@ -1 +1 @@
1
- {"version":3,"file":"agentsContext.js","sourceRoot":"","sources":["../../../src/api/agentsContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;A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AyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAmB,CAAC;AAC3D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport interface AgentsContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface AgentsClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createAgents(\n endpointParam: string,\n credential: TokenCredential,\n options: AgentsClientOptionalParams = {},\n): AgentsContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-ai-agents/1.1.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://ai.azure.com/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-05-15-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion } as AgentsContext;\n}\n"]}
1
+ {"version":3,"file":"agentsContext.js","sourceRoot":"","sources":["../../../src/api/agentsContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAgB3E,MAAM,UAAU,YAAY,CAC1B,aAAqB,EACrB,UAA2B,EAC3B,UAAsC,EAAE;IAExC,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;IAC9D,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,iCAAiC,CAAC;IACxD,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,+BAA+B,CAAC;SACzE;KACF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,oBAAoB,CAAC;IAC9D,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAmB,CAAC;AAC3D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport interface AgentsContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n}\n\n/** Optional parameters for the client. */\nexport interface AgentsClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createAgents(\n endpointParam: string,\n credential: TokenCredential,\n options: AgentsClientOptionalParams = {},\n): AgentsContext {\n const endpointUrl = options.endpoint ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-ai-agents/1.2.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://ai.azure.com/.default\"],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2025-05-15-preview\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion } as AgentsContext;\n}\n"]}
@@ -1,3 +1,3 @@
1
- export { updateMessage, getMessage, listMessages, createMessage } from "./operations.js";
2
- export { MessagesUpdateMessageOptionalParams, MessagesGetMessageOptionalParams, MessagesListMessagesOptionalParams, MessagesCreateMessageOptionalParams, } from "./options.js";
1
+ export { $delete, updateMessage, getMessage, listMessages, createMessage } from "./operations.js";
2
+ export { MessagesDeleteOptionalParams, MessagesUpdateMessageOptionalParams, MessagesGetMessageOptionalParams, MessagesListMessagesOptionalParams, MessagesCreateMessageOptionalParams, } from "./options.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/messages/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/messages/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EACL,4BAA4B,EAC5B,mCAAmC,EACnC,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,cAAc,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export { updateMessage, getMessage, listMessages, createMessage } from "./operations.js";
3
+ export { $delete, updateMessage, getMessage, listMessages, createMessage } from "./operations.js";
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/messages/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { updateMessage, getMessage, listMessages, createMessage } from \"./operations.js\";\nexport {\n MessagesUpdateMessageOptionalParams,\n MessagesGetMessageOptionalParams,\n MessagesListMessagesOptionalParams,\n MessagesCreateMessageOptionalParams,\n} from \"./options.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/messages/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { $delete, updateMessage, getMessage, listMessages, createMessage } from \"./operations.js\";\nexport {\n MessagesDeleteOptionalParams,\n MessagesUpdateMessageOptionalParams,\n MessagesGetMessageOptionalParams,\n MessagesListMessagesOptionalParams,\n MessagesCreateMessageOptionalParams,\n} from \"./options.js\";\n"]}
@@ -1,8 +1,12 @@
1
1
  import { AgentsContext as Client } from "../index.js";
2
- import { MessageRole, MessageInputContent, ThreadMessage, _AgentsPagedResultThreadMessage } from "../../models/models.js";
3
- import { MessagesUpdateMessageOptionalParams, MessagesGetMessageOptionalParams, MessagesListMessagesOptionalParams, MessagesCreateMessageOptionalParams } from "./options.js";
2
+ import { MessageRole, MessageInputContent, ThreadMessage, _AgentsPagedResultThreadMessage, MessageDeletionStatus } from "../../models/models.js";
3
+ import { MessagesDeleteOptionalParams, MessagesUpdateMessageOptionalParams, MessagesGetMessageOptionalParams, MessagesListMessagesOptionalParams, MessagesCreateMessageOptionalParams } from "./options.js";
4
4
  import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
5
5
  import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
6
+ export declare function _$deleteSend(context: Client, threadId: string, messageId: string, options?: MessagesDeleteOptionalParams): StreamableMethod;
7
+ export declare function _$deleteDeserialize(result: PathUncheckedResponse): Promise<MessageDeletionStatus>;
8
+ /** Deletes an existing message on an existing thread. */
9
+ export declare function $delete(context: Client, threadId: string, messageId: string, options?: MessagesDeleteOptionalParams): Promise<MessageDeletionStatus>;
6
10
  export declare function _updateMessageSend(context: Client, threadId: string, messageId: string, options?: MessagesUpdateMessageOptionalParams): StreamableMethod;
7
11
  export declare function _updateMessageDeserialize(result: PathUncheckedResponse): Promise<ThreadMessage>;
8
12
  /** Modifies an existing message on an existing thread. */
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/messages/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAEL,WAAW,EACX,mBAAmB,EAGnB,aAAa,EAEb,+BAA+B,EAEhC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,EACpC,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,0BAA0B,EAE3B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,mCAA4D,GACpE,gBAAgB,CAqBlB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,aAAa,CAAC,CASxB;AAED,0DAA0D;AAC1D,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,mCAA4D,GACpE,OAAO,CAAC,aAAa,CAAC,CAGxB;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,gCAAyD,GACjE,gBAAgB,CAmBlB;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,aAAa,CAAC,CASxB;AAED,qCAAqC;AACrC,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,gCAAyD,GACjE,OAAO,CAAC,aAAa,CAAC,CAGxB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,kCAA2D,GACnE,gBAAgB,CAuBlB;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,+BAA+B,CAAC,CAO1C;AAED,sDAAsD;AACtD,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,kCAA2D,GACnE,0BAA0B,CAAC,aAAa,CAAC,CAQ3C;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,GAAE,mCAA4D,GACpE,gBAAgB,CA2BlB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,aAAa,CAAC,CASxB;AAED,mDAAmD;AACnD,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,GAAE,mCAA4D,GACpE,OAAO,CAAC,aAAa,CAAC,CAGxB"}
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/messages/operations.ts"],"names":[],"mappings":"AAGA,OA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2
2
  // Licensed under the MIT License.
3
- import { agentV1ErrorDeserializer, messageInputContentSerializer, messageAttachmentArraySerializer, threadMessageDeserializer, _agentsPagedResultThreadMessageDeserializer, } from "../../models/models.js";
3
+ import { agentV1ErrorDeserializer, messageInputContentSerializer, messageAttachmentArraySerializer, threadMessageDeserializer, _agentsPagedResultThreadMessageDeserializer, messageDeletionStatusDeserializer, } from "../../models/models.js";
4
4
  import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js";
5
5
  import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
6
6
  import { createRestError, operationOptionsToRequestParameters, } from "@azure-rest/core-client";
7
+ export function _$deleteSend(context, threadId, messageId, options = { requestOptions: {} }) {
8
+ const path = expandUrlTemplate("/threads/{threadId}/messages/{messageId}{?api-version}", {
9
+ threadId: threadId,
10
+ messageId: messageId,
11
+ "api-version": context.apiVersion,
12
+ }, {
13
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
14
+ });
15
+ return context.path(path).delete({
16
+ ...operationOptionsToRequestParameters(options),
17
+ headers: {
18
+ accept: "application/json",
19
+ ...options.requestOptions?.headers,
20
+ },
21
+ });
22
+ }
23
+ export async function _$deleteDeserialize(result) {
24
+ const expectedStatuses = ["200"];
25
+ if (!expectedStatuses.includes(result.status)) {
26
+ const error = createRestError(result);
27
+ error.details = agentV1ErrorDeserializer(result.body);
28
+ throw error;
29
+ }
30
+ return messageDeletionStatusDeserializer(result.body);
31
+ }
32
+ /** Deletes an existing message on an existing thread. */
33
+ export async function $delete(context, threadId, messageId, options = { requestOptions: {} }) {
34
+ const result = await _$deleteSend(context, threadId, messageId, options);
35
+ return _$deleteDeserialize(result);
36
+ }
7
37
  export function _updateMessageSend(context, threadId, messageId, options = { requestOptions: {} }) {
8
38
  const path = expandUrlTemplate("/threads/{threadId}/messages/{messageId}{?api-version}", {
9
39
  threadId: threadId,
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/messages/operations.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,OAAO,EAAE,WAAW;gBACtB,CAAC,CAAC,gCAAgC,CAAC,OAAO,EAAE,WAAW,CAAC;YAC1D,QAAQ,EAAE,OAAO,EAAE,QAAQ;SAC5B;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAe,EACf,QAAgB,EAChB,IAAiB,EACjB,OAA4B,EAC5B,UAA+C,EAAE,cAAc,EAAE,EAAE,EAAE;IAErE,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACnF,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AgentsContext as Client } from \"../index.js\";\nimport {\n agentV1ErrorDeserializer,\n MessageRole,\n MessageInputContent,\n messageInputContentSerializer,\n messageAttachmentArraySerializer,\n ThreadMessage,\n threadMessageDeserializer,\n _AgentsPagedResultThreadMessage,\n _agentsPagedResultThreadMessageDeserializer,\n} from \"../../models/models.js\";\nimport {\n MessagesUpdateMessageOptionalParams,\n MessagesGetMessageOptionalParams,\n MessagesListMessagesOptionalParams,\n MessagesCreateMessageOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _updateMessageSend(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesUpdateMessageOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages/{messageId}{?api-version}\",\n {\n threadId: threadId,\n messageId: messageId,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: { metadata: options?.metadata },\n });\n}\n\nexport async function _updateMessageDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadMessageDeserializer(result.body);\n}\n\n/** Modifies an existing message on an existing thread. */\nexport async function updateMessage(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesUpdateMessageOptionalParams = { requestOptions: {} },\n): Promise<ThreadMessage> {\n const result = await _updateMessageSend(context, threadId, messageId, options);\n return _updateMessageDeserialize(result);\n}\n\nexport function _getMessageSend(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesGetMessageOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages/{messageId}{?api-version}\",\n {\n threadId: threadId,\n messageId: messageId,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getMessageDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadMessageDeserializer(result.body);\n}\n\n/** Retrieves an existing message. */\nexport async function getMessage(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesGetMessageOptionalParams = { requestOptions: {} },\n): Promise<ThreadMessage> {\n const result = await _getMessageSend(context, threadId, messageId, options);\n return _getMessageDeserialize(result);\n}\n\nexport function _listMessagesSend(\n context: Client,\n threadId: string,\n options: MessagesListMessagesOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages{?run_id,api-version,limit,order,after,before}\",\n {\n threadId: threadId,\n run_id: options?.runId,\n \"api-version\": context.apiVersion,\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listMessagesDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _agentsPagedResultThreadMessageDeserializer(result.body);\n}\n\n/** Gets a list of messages that exist on a thread. */\nexport function listMessages(\n context: Client,\n threadId: string,\n options: MessagesListMessagesOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<ThreadMessage> {\n return buildPagedAsyncIterator(\n context,\n () => _listMessagesSend(context, threadId, options),\n _listMessagesDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _createMessageSend(\n context: Client,\n threadId: string,\n role: MessageRole,\n content: MessageInputContent,\n options: MessagesCreateMessageOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages{?api-version}\",\n {\n threadId: threadId,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n role: role,\n content: messageInputContentSerializer(content),\n attachments: !options?.attachments\n ? options?.attachments\n : messageAttachmentArraySerializer(options?.attachments),\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _createMessageDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadMessageDeserializer(result.body);\n}\n\n/** Creates a new message on a specified thread. */\nexport async function createMessage(\n context: Client,\n threadId: string,\n role: MessageRole,\n content: MessageInputContent,\n options: MessagesCreateMessageOptionalParams = { requestOptions: {} },\n): Promise<ThreadMessage> {\n const result = await _createMessageSend(context, threadId, role, content, options);\n return _createMessageDeserialize(result);\n}\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/messages/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,wBAAwB,EAGxB,6BAA6B,EAC7B,gCAAgC,EAEhC,yBAAyB,EAEzB,2CAA2C,EAE3C,iCAAiC,GAClC,MAAM,wBAAwB,CAAC;AAQhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CA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AAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAe,EACf,QAAgB,EAChB,IAAiB,EACjB,OAA4B,EAC5B,UAA+C,EAAE,cAAc,EAAE,EAAE,EAAE;IAErE,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACnF,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AgentsContext as Client } from \"../index.js\";\nimport {\n agentV1ErrorDeserializer,\n MessageRole,\n MessageInputContent,\n messageInputContentSerializer,\n messageAttachmentArraySerializer,\n ThreadMessage,\n threadMessageDeserializer,\n _AgentsPagedResultThreadMessage,\n _agentsPagedResultThreadMessageDeserializer,\n MessageDeletionStatus,\n messageDeletionStatusDeserializer,\n} from \"../../models/models.js\";\nimport {\n MessagesDeleteOptionalParams,\n MessagesUpdateMessageOptionalParams,\n MessagesGetMessageOptionalParams,\n MessagesListMessagesOptionalParams,\n MessagesCreateMessageOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _$deleteSend(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesDeleteOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages/{messageId}{?api-version}\",\n {\n threadId: threadId,\n messageId: messageId,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _$deleteDeserialize(\n result: PathUncheckedResponse,\n): Promise<MessageDeletionStatus> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return messageDeletionStatusDeserializer(result.body);\n}\n\n/** Deletes an existing message on an existing thread. */\nexport async function $delete(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesDeleteOptionalParams = { requestOptions: {} },\n): Promise<MessageDeletionStatus> {\n const result = await _$deleteSend(context, threadId, messageId, options);\n return _$deleteDeserialize(result);\n}\n\nexport function _updateMessageSend(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesUpdateMessageOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages/{messageId}{?api-version}\",\n {\n threadId: threadId,\n messageId: messageId,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: { metadata: options?.metadata },\n });\n}\n\nexport async function _updateMessageDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadMessageDeserializer(result.body);\n}\n\n/** Modifies an existing message on an existing thread. */\nexport async function updateMessage(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesUpdateMessageOptionalParams = { requestOptions: {} },\n): Promise<ThreadMessage> {\n const result = await _updateMessageSend(context, threadId, messageId, options);\n return _updateMessageDeserialize(result);\n}\n\nexport function _getMessageSend(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesGetMessageOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages/{messageId}{?api-version}\",\n {\n threadId: threadId,\n messageId: messageId,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getMessageDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadMessageDeserializer(result.body);\n}\n\n/** Retrieves an existing message. */\nexport async function getMessage(\n context: Client,\n threadId: string,\n messageId: string,\n options: MessagesGetMessageOptionalParams = { requestOptions: {} },\n): Promise<ThreadMessage> {\n const result = await _getMessageSend(context, threadId, messageId, options);\n return _getMessageDeserialize(result);\n}\n\nexport function _listMessagesSend(\n context: Client,\n threadId: string,\n options: MessagesListMessagesOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages{?run_id,api-version,limit,order,after,before}\",\n {\n threadId: threadId,\n run_id: options?.runId,\n \"api-version\": context.apiVersion,\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listMessagesDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _agentsPagedResultThreadMessageDeserializer(result.body);\n}\n\n/** Gets a list of messages that exist on a thread. */\nexport function listMessages(\n context: Client,\n threadId: string,\n options: MessagesListMessagesOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<ThreadMessage> {\n return buildPagedAsyncIterator(\n context,\n () => _listMessagesSend(context, threadId, options),\n _listMessagesDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _createMessageSend(\n context: Client,\n threadId: string,\n role: MessageRole,\n content: MessageInputContent,\n options: MessagesCreateMessageOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/messages{?api-version}\",\n {\n threadId: threadId,\n \"api-version\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n role: role,\n content: messageInputContentSerializer(content),\n attachments: !options?.attachments\n ? options?.attachments\n : messageAttachmentArraySerializer(options?.attachments),\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _createMessageDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadMessage> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadMessageDeserializer(result.body);\n}\n\n/** Creates a new message on a specified thread. */\nexport async function createMessage(\n context: Client,\n threadId: string,\n role: MessageRole,\n content: MessageInputContent,\n options: MessagesCreateMessageOptionalParams = { requestOptions: {} },\n): Promise<ThreadMessage> {\n const result = await _createMessageSend(context, threadId, role, content, options);\n return _createMessageDeserialize(result);\n}\n"]}
@@ -1,6 +1,9 @@
1
1
  import { MessageAttachment, ListSortOrder } from "../../models/models.js";
2
2
  import { OperationOptions } from "@azure-rest/core-client";
3
3
  /** Optional parameters. */
4
+ export interface MessagesDeleteOptionalParams extends OperationOptions {
5
+ }
6
+ /** Optional parameters. */
4
7
  export interface MessagesUpdateMessageOptionalParams extends OperationOptions {
5
8
  /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */
6
9
  metadata?: Record<string, string> | null;
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/messages/options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,2BAA2B;AAC3B,MAAM,WAAW,mCAAoC,SAAQ,gBAAgB;IAC3E,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED,2BAA2B;AAC3B,MAAM,WAAW,gCAAiC,SAAQ,gBAAgB;CAAG;AAE7E,2BAA2B;AAC3B,MAAM,WAAW,kCAAmC,SAAQ,gBAAgB;IAC1E,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oHAAoH;IACpH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,oRAAoR;IACpR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0RAA0R;IAC1R,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,2BAA2B;AAC3B,MAAM,WAAW,mCAAoC,SAAQ,gBAAgB;IAC3E,sFAAsF;IACtF,WAAW,CAAC,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC;IACzC,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/messages/options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,2BAA2B;AAC3B,MAAM,WAAW,4BAA6B,SAAQ,gBAAgB;CAAG;AAEzE,2BAA2B;AAC3B,MAAM,WAAW,mCAAoC,SAAQ,gBAAgB;IAC3E,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED,2BAA2B;AAC3B,MAAM,WAAW,gCAAiC,SAAQ,gBAAgB;CAAG;AAE7E,2BAA2B;AAC3B,MAAM,WAAW,kCAAmC,SAAQ,gBAAgB;IAC1E,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oHAAoH;IACpH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,oRAAoR;IACpR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0RAA0R;IAC1R,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,2BAA2B;AAC3B,MAAM,WAAW,mCAAoC,SAAQ,gBAAgB;IAC3E,sFAAsF;IACtF,WAAW,CAAC,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC;IACzC,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/messages/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageAttachment, ListSortOrder } from \"../../models/models.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface MessagesUpdateMessageOptionalParams extends OperationOptions {\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n\n/** Optional parameters. */\nexport interface MessagesGetMessageOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface MessagesListMessagesOptionalParams extends OperationOptions {\n /** Filter messages by the run ID that generated them. */\n runId?: string;\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\n /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */\n after?: string;\n /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */\n before?: string;\n}\n\n/** Optional parameters. */\nexport interface MessagesCreateMessageOptionalParams extends OperationOptions {\n /** A list of files attached to the message, and the tools they should be added to. */\n attachments?: MessageAttachment[] | null;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/messages/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageAttachment, ListSortOrder } from \"../../models/models.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface MessagesDeleteOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface MessagesUpdateMessageOptionalParams extends OperationOptions {\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n\n/** Optional parameters. */\nexport interface MessagesGetMessageOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface MessagesListMessagesOptionalParams extends OperationOptions {\n /** Filter messages by the run ID that generated them. */\n runId?: string;\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\n /** A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. */\n after?: string;\n /** A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. */\n before?: string;\n}\n\n/** Optional parameters. */\nexport interface MessagesCreateMessageOptionalParams extends OperationOptions {\n /** A list of files attached to the message, and the tools they should be added to. */\n attachments?: MessageAttachment[] | null;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n"]}
@@ -1,6 +1,5 @@
1
1
  import type { AgentsContext as Client } from "./index.js";
2
2
  import type { Agent, _AgentsPagedResultAgent, AgentDeletionStatus, ThreadRun } from "../models/models.js";
3
- import { ToolOutput } from "../models/models.js";
4
3
  import type { CreateThreadAndRunOptionalParams, DeleteAgentOptionalParams, UpdateAgentOptionalParams, GetAgentOptionalParams, ListAgentsOptionalParams, CreateAgentOptionalParams } from "./options.js";
5
4
  import type { PagedAsyncIterableIterator } from "../static-helpers/pagingHelpers.js";
6
5
  import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
@@ -34,5 +33,5 @@ export declare function createAgent(context: Client, model: string, options?: Cr
34
33
  export declare function createRunStreaming(context: Client, assistantId: string, threadId: string, options?: RunsCreateRunOptionalParams): Promise<AgentEventMessageStream>;
35
34
  /** Create a thread and run and stream the events */
36
35
  export declare function createThreadAndRunStreaming(context: Client, assistantId: string, options?: CreateThreadAndRunOptionalParams): Promise<AgentEventMessageStream>;
37
- export declare function submitToolOutputsToRunStreaming(context: Client, threadId: string, runId: string, toolOutputs: ToolOutput[], options?: RunsSubmitToolOutputsToRunOptionalParams): Promise<AgentEventMessageStream>;
36
+ export declare function submitToolOutputsToRunStreaming(context: Client, threadId: string, runId: string, options?: RunsSubmitToolOutputsToRunOptionalParams): Promise<AgentEventMessageStream>;
38
37
  //# sourceMappingURL=operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/api/operations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACV,KAAK,EACL,uBAAuB,EACvB,mBAAmB,EACnB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAeL,UAAU,EAKX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,gCAAgC,EAChC,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAGrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEvF,OAAO,KAAK,EAEV,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;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EACf,OAAO,GAAE,wBAAiD,GACzD,0BAA0B,CAAC,KAAK,CAAC,CAQnC;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,yBAAkD,GAC1D,gBAAgB,CAkClB;AAED,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,KAAK,CAAC,CAS3F;AAED,2BAA2B;AAC3B,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,yBAAkD,GAC1D,OAAO,CAAC,KAAK,CAAC,CAGhB;AA2DD,yCAAyC;AACzC,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,2BAAoD,GAC5D,OAAO,CAAC,uBAAuB,CAAC,CAIlC;AAED,oDAAoD;AACpD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,gCAAyD,GACjE,OAAO,CAAC,uBAAuB,CAAC,CAGlC;AAED,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,wCAAiE,GACzE,OAAO,CAAC,uBAAuB,CAAC,CAIlC"}
@@ -317,8 +317,8 @@ export async function createThreadAndRunStreaming(context, assistantId, options
317
317
  const streamOptions = { ...options, stream: true };
318
318
  return processStream(_createThreadAndRunSend(context, assistantId, streamOptions));
319
319
  }
320
- export async function submitToolOutputsToRunStreaming(context, threadId, runId, toolOutputs, options = { requestOptions: {} }) {
320
+ export async function submitToolOutputsToRunStreaming(context, threadId, runId, options = { requestOptions: {} }) {
321
321
  const streamOptions = { ...options, stream: true };
322
- return processStream(_submitToolOutputsToRunSend(context, threadId, runId, toolOutputs, streamOptions));
322
+ return processStream(_submitToolOutputsToRunSend(context, threadId, runId, streamOptions));
323
323
  }
324
324
  //# sourceMappingURL=operations.js.map