@microsoft/teamsfx-core 3.0.15 → 3.0.16-beta.2026073102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/build/client/aadAppClient.d.ts.map +1 -1
  2. package/build/client/aadAppClient.js +6 -6
  3. package/build/client/aadAppClient.js.map +1 -1
  4. package/build/common/featureFlags.d.ts +0 -5
  5. package/build/common/featureFlags.d.ts.map +1 -1
  6. package/build/common/featureFlags.js +0 -5
  7. package/build/common/featureFlags.js.map +1 -1
  8. package/build/common/httpProxy.d.ts +21 -0
  9. package/build/common/httpProxy.d.ts.map +1 -0
  10. package/build/common/httpProxy.js +117 -0
  11. package/build/common/httpProxy.js.map +1 -0
  12. package/build/common/mcpToolFetcher.d.ts +90 -0
  13. package/build/common/mcpToolFetcher.d.ts.map +1 -0
  14. package/build/common/mcpToolFetcher.js +404 -0
  15. package/build/common/mcpToolFetcher.js.map +1 -0
  16. package/build/common/odrProvider.d.ts +43 -0
  17. package/build/common/odrProvider.d.ts.map +1 -0
  18. package/build/common/odrProvider.js +154 -0
  19. package/build/common/odrProvider.js.map +1 -0
  20. package/build/common/openApiParserOptions.d.ts +3 -0
  21. package/build/common/openApiParserOptions.d.ts.map +1 -0
  22. package/build/common/openApiParserOptions.js +61 -0
  23. package/build/common/openApiParserOptions.js.map +1 -0
  24. package/build/common/secretmasker/dict.d.ts.map +1 -1
  25. package/build/common/secretmasker/dict.js +5 -2
  26. package/build/common/secretmasker/dict.js.map +1 -1
  27. package/build/common/secretmasker/feature.js.map +1 -1
  28. package/build/common/templates-config.json +5 -5
  29. package/build/component/coordinator/index.d.ts.map +1 -1
  30. package/build/component/coordinator/index.js.map +1 -1
  31. package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
  32. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +3 -0
  33. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
  34. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +38 -3
  35. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  36. package/build/component/driver/script/scriptDriver.js +1 -1
  37. package/build/component/driver/script/scriptDriver.js.map +1 -1
  38. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  39. package/build/component/driver/teamsApp/create.js +3 -3
  40. package/build/component/driver/teamsApp/create.js.map +1 -1
  41. package/build/component/driver/teamsApp/createAppPackage.d.ts +1 -0
  42. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  43. package/build/component/driver/teamsApp/createAppPackage.js +23 -0
  44. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  45. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
  46. package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
  47. package/build/component/generator/declarativeAgent/helper.js +25 -2
  48. package/build/component/generator/declarativeAgent/helper.js.map +1 -1
  49. package/build/component/generator/generatorAction.d.ts +3 -1
  50. package/build/component/generator/generatorAction.d.ts.map +1 -1
  51. package/build/component/generator/generatorAction.js.map +1 -1
  52. package/build/component/generator/officeAddin/generator.d.ts +1 -0
  53. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  54. package/build/component/generator/officeAddin/generator.js +109 -2
  55. package/build/component/generator/officeAddin/generator.js.map +1 -1
  56. package/build/component/generator/openApiSpec/helper.d.ts +2 -3
  57. package/build/component/generator/openApiSpec/helper.d.ts.map +1 -1
  58. package/build/component/generator/openApiSpec/helper.js +19 -57
  59. package/build/component/generator/openApiSpec/helper.js.map +1 -1
  60. package/build/component/generator/templateHelper.d.ts +10 -2
  61. package/build/component/generator/templateHelper.d.ts.map +1 -1
  62. package/build/component/generator/templateHelper.js +16 -3
  63. package/build/component/generator/templateHelper.js.map +1 -1
  64. package/build/component/generator/templates/metadata/index.d.ts +15 -0
  65. package/build/component/generator/templates/metadata/index.d.ts.map +1 -1
  66. package/build/component/generator/templates/metadata/index.js +39 -0
  67. package/build/component/generator/templates/metadata/index.js.map +1 -1
  68. package/build/component/generator/templates/templateNames.d.ts +2 -0
  69. package/build/component/generator/templates/templateNames.d.ts.map +1 -1
  70. package/build/component/generator/templates/templateNames.js +2 -0
  71. package/build/component/generator/templates/templateNames.js.map +1 -1
  72. package/build/component/generator/utils.d.ts.map +1 -1
  73. package/build/component/generator/utils.js +6 -0
  74. package/build/component/generator/utils.js.map +1 -1
  75. package/build/component/generator/v4TemplateBridge.d.ts +4 -1
  76. package/build/component/generator/v4TemplateBridge.d.ts.map +1 -1
  77. package/build/component/generator/v4TemplateBridge.js +19 -3
  78. package/build/component/generator/v4TemplateBridge.js.map +1 -1
  79. package/build/component/utils/envUtil.d.ts.map +1 -1
  80. package/build/component/utils/envUtil.js +2 -2
  81. package/build/component/utils/envUtil.js.map +1 -1
  82. package/build/component/utils/fileOperation.d.ts.map +1 -1
  83. package/build/component/utils/fileOperation.js +4 -1
  84. package/build/component/utils/fileOperation.js.map +1 -1
  85. package/build/component/utils/mcpAuthScaffolder.d.ts +28 -0
  86. package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
  87. package/build/component/utils/mcpAuthScaffolder.js +39 -4
  88. package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
  89. package/build/component/utils/mcpToolFetcher.d.ts +1 -72
  90. package/build/component/utils/mcpToolFetcher.d.ts.map +1 -1
  91. package/build/component/utils/mcpToolFetcher.js +1 -227
  92. package/build/component/utils/mcpToolFetcher.js.map +1 -1
  93. package/build/component/utils/odrProvider.d.ts +1 -55
  94. package/build/component/utils/odrProvider.d.ts.map +1 -1
  95. package/build/component/utils/odrProvider.js +1 -101
  96. package/build/component/utils/odrProvider.js.map +1 -1
  97. package/build/core/FxCore.d.ts.map +1 -1
  98. package/build/core/FxCore.declarativeAgent.d.ts.map +1 -1
  99. package/build/core/FxCore.declarativeAgent.js +110 -3
  100. package/build/core/FxCore.declarativeAgent.js.map +1 -1
  101. package/build/core/FxCore.js +4 -6
  102. package/build/core/FxCore.js.map +1 -1
  103. package/build/core/createFrontDoorAdapters.d.ts +4 -27
  104. package/build/core/createFrontDoorAdapters.d.ts.map +1 -1
  105. package/build/core/createFrontDoorAdapters.js +17 -157
  106. package/build/core/createFrontDoorAdapters.js.map +1 -1
  107. package/build/core/createProjectFrontDoor.d.ts +10 -12
  108. package/build/core/createProjectFrontDoor.d.ts.map +1 -1
  109. package/build/core/createProjectFrontDoor.js +143 -106
  110. package/build/core/createProjectFrontDoor.js.map +1 -1
  111. package/build/core/modifyProjectFrontDoor.d.ts +0 -1
  112. package/build/core/modifyProjectFrontDoor.d.ts.map +1 -1
  113. package/build/core/modifyProjectFrontDoor.js +0 -2
  114. package/build/core/modifyProjectFrontDoor.js.map +1 -1
  115. package/build/index.d.ts +3 -2
  116. package/build/index.d.ts.map +1 -1
  117. package/build/index.js +9 -1
  118. package/build/index.js.map +1 -1
  119. package/build/question/create.d.ts.map +1 -1
  120. package/build/question/create.js +2 -1
  121. package/build/question/create.js.map +1 -1
  122. package/build/question/inputs/AddKnowledgeInputs.d.ts.map +1 -1
  123. package/build/question/inputs/CreateProjectInputs.d.ts +4 -0
  124. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  125. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  126. package/build/question/options/CreateProjectOptions.js +14 -0
  127. package/build/question/options/CreateProjectOptions.js.map +1 -1
  128. package/build/question/other.d.ts.map +1 -1
  129. package/build/question/other.js +11 -1
  130. package/build/question/other.js.map +1 -1
  131. package/build/question/questionNames.d.ts +2 -0
  132. package/build/question/questionNames.d.ts.map +1 -1
  133. package/build/question/questionNames.js +2 -0
  134. package/build/question/questionNames.js.map +1 -1
  135. package/build/question/scaffold/constructNode.d.ts +3 -1
  136. package/build/question/scaffold/constructNode.d.ts.map +1 -1
  137. package/build/question/scaffold/constructNode.js +50 -0
  138. package/build/question/scaffold/constructNode.js.map +1 -1
  139. package/build/question/scaffold/vsc/CapabilityOptions.d.ts +2 -0
  140. package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
  141. package/build/question/scaffold/vsc/CapabilityOptions.js +16 -0
  142. package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
  143. package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts +19 -1
  144. package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
  145. package/build/question/scaffold/vsc/teamsProjectTypeNode.js +39 -7
  146. package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
  147. package/build/v4/buildTarget/parseSelector.d.ts +6 -2
  148. package/build/v4/buildTarget/parseSelector.d.ts.map +1 -1
  149. package/build/v4/buildTarget/parseSelector.js +58 -45
  150. package/build/v4/buildTarget/parseSelector.js.map +1 -1
  151. package/build/v4/buildTarget/resolveBuildTarget.d.ts +21 -7
  152. package/build/v4/buildTarget/resolveBuildTarget.d.ts.map +1 -1
  153. package/build/v4/buildTarget/resolveBuildTarget.js +97 -52
  154. package/build/v4/buildTarget/resolveBuildTarget.js.map +1 -1
  155. package/build/v4/collectInputs/collectInputs.d.ts +51 -10
  156. package/build/v4/collectInputs/collectInputs.d.ts.map +1 -1
  157. package/build/v4/collectInputs/collectInputs.js +287 -91
  158. package/build/v4/collectInputs/collectInputs.js.map +1 -1
  159. package/build/v4/distribution/createQuestions.d.ts.map +1 -1
  160. package/build/v4/distribution/createQuestions.js +2 -29
  161. package/build/v4/distribution/createQuestions.js.map +1 -1
  162. package/build/v4/distribution/declarativePackage.d.ts.map +1 -1
  163. package/build/v4/distribution/declarativePackage.js +2 -30
  164. package/build/v4/distribution/declarativePackage.js.map +1 -1
  165. package/build/v4/distribution/questionFragments.d.ts +11 -0
  166. package/build/v4/distribution/questionFragments.d.ts.map +1 -0
  167. package/build/v4/distribution/questionFragments.js +130 -0
  168. package/build/v4/distribution/questionFragments.js.map +1 -0
  169. package/build/v4/engineVersion.d.ts +7 -0
  170. package/build/v4/engineVersion.d.ts.map +1 -0
  171. package/build/v4/engineVersion.js +12 -0
  172. package/build/v4/engineVersion.js.map +1 -0
  173. package/build/v4/expression/evaluateExpression.d.ts +13 -0
  174. package/build/v4/expression/evaluateExpression.d.ts.map +1 -1
  175. package/build/v4/expression/evaluateExpression.js +57 -0
  176. package/build/v4/expression/evaluateExpression.js.map +1 -1
  177. package/build/v4/index.d.ts +7 -0
  178. package/build/v4/index.d.ts.map +1 -1
  179. package/build/v4/index.js +7 -0
  180. package/build/v4/index.js.map +1 -1
  181. package/build/v4/inspection/scaffoldCatalog.d.ts +28 -0
  182. package/build/v4/inspection/scaffoldCatalog.d.ts.map +1 -0
  183. package/build/v4/inspection/scaffoldCatalog.js +66 -0
  184. package/build/v4/inspection/scaffoldCatalog.js.map +1 -0
  185. package/build/v4/inspection/scaffoldMetadataSource.d.ts +6 -0
  186. package/build/v4/inspection/scaffoldMetadataSource.d.ts.map +1 -0
  187. package/build/v4/inspection/scaffoldMetadataSource.js +78 -0
  188. package/build/v4/inspection/scaffoldMetadataSource.js.map +1 -0
  189. package/build/v4/mcp/mcpAuthAction.d.ts +36 -0
  190. package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -0
  191. package/build/v4/mcp/mcpAuthAction.js +177 -0
  192. package/build/v4/mcp/mcpAuthAction.js.map +1 -0
  193. package/build/v4/mcp/mcpAuthScaffold.d.ts +37 -0
  194. package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -0
  195. package/build/v4/mcp/mcpAuthScaffold.js +162 -0
  196. package/build/v4/mcp/mcpAuthScaffold.js.map +1 -0
  197. package/build/v4/model/dataModel.d.ts +1 -1
  198. package/build/v4/model/dataModel.d.ts.map +1 -1
  199. package/build/v4/pipeline/runScaffoldPipeline.d.ts +27 -5
  200. package/build/v4/pipeline/runScaffoldPipeline.d.ts.map +1 -1
  201. package/build/v4/pipeline/runScaffoldPipeline.js +64 -10
  202. package/build/v4/pipeline/runScaffoldPipeline.js.map +1 -1
  203. package/build/v4/providers/createOptionsProviders.d.ts +11 -0
  204. package/build/v4/providers/createOptionsProviders.d.ts.map +1 -0
  205. package/build/v4/providers/createOptionsProviders.js +268 -0
  206. package/build/v4/providers/createOptionsProviders.js.map +1 -0
  207. package/build/v4/renderContext/buildRenderContext.d.ts.map +1 -1
  208. package/build/v4/renderContext/buildRenderContext.js +4 -6
  209. package/build/v4/renderContext/buildRenderContext.js.map +1 -1
  210. package/build/v4/runtime/generalSensitivityLabel.d.ts +5 -0
  211. package/build/v4/runtime/generalSensitivityLabel.d.ts.map +1 -0
  212. package/build/v4/runtime/generalSensitivityLabel.js +36 -0
  213. package/build/v4/runtime/generalSensitivityLabel.js.map +1 -0
  214. package/build/v4/runtime/inMemoryRuntime.d.ts +7 -1
  215. package/build/v4/runtime/inMemoryRuntime.d.ts.map +1 -1
  216. package/build/v4/runtime/inMemoryRuntime.js +25 -3
  217. package/build/v4/runtime/inMemoryRuntime.js.map +1 -1
  218. package/build/v4/runtime/packageParse.d.ts.map +1 -1
  219. package/build/v4/runtime/packageParse.js +64 -8
  220. package/build/v4/runtime/packageParse.js.map +1 -1
  221. package/build/v4/runtime/realRuntime.d.ts +3 -1
  222. package/build/v4/runtime/realRuntime.d.ts.map +1 -1
  223. package/build/v4/runtime/realRuntime.js +3 -2
  224. package/build/v4/runtime/realRuntime.js.map +1 -1
  225. package/build/v4/runtime/renderMustache.d.ts.map +1 -1
  226. package/build/v4/runtime/renderMustache.js +13 -4
  227. package/build/v4/runtime/renderMustache.js.map +1 -1
  228. package/build/v4/runtime/runtimeRegistry.d.ts +12 -3
  229. package/build/v4/runtime/runtimeRegistry.d.ts.map +1 -1
  230. package/build/v4/runtime/runtimeRegistry.js +123 -17
  231. package/build/v4/runtime/runtimeRegistry.js.map +1 -1
  232. package/build/v4/runtime/scaffold.d.ts +1 -0
  233. package/build/v4/runtime/scaffold.d.ts.map +1 -1
  234. package/build/v4/runtime/scaffold.js +1 -20
  235. package/build/v4/runtime/scaffold.js.map +1 -1
  236. package/build/v4/runtime/steps/daAction.d.ts.map +1 -1
  237. package/build/v4/runtime/steps/daAction.js +3 -111
  238. package/build/v4/runtime/steps/daAction.js.map +1 -1
  239. package/build/v4/runtime/steps/daSensitivity.d.ts +14 -0
  240. package/build/v4/runtime/steps/daSensitivity.d.ts.map +1 -0
  241. package/build/v4/runtime/steps/daSensitivity.js +50 -0
  242. package/build/v4/runtime/steps/daSensitivity.js.map +1 -0
  243. package/build/v4/runtime/steps/mcpAuth.d.ts +5 -2
  244. package/build/v4/runtime/steps/mcpAuth.d.ts.map +1 -1
  245. package/build/v4/runtime/steps/mcpAuth.js +37 -66
  246. package/build/v4/runtime/steps/mcpAuth.js.map +1 -1
  247. package/build/v4/runtime/steps/mcpLocal.d.ts +0 -4
  248. package/build/v4/runtime/steps/mcpLocal.d.ts.map +1 -1
  249. package/build/v4/runtime/steps/mcpLocal.js +11 -31
  250. package/build/v4/runtime/steps/mcpLocal.js.map +1 -1
  251. package/build/v4/runtime/steps/mcpStatic.d.ts +1 -1
  252. package/build/v4/runtime/steps/mcpStatic.d.ts.map +1 -1
  253. package/build/v4/runtime/steps/mcpStatic.js +14 -32
  254. package/build/v4/runtime/steps/mcpStatic.js.map +1 -1
  255. package/build/v4/runtime/steps/metaOs.d.ts.map +1 -1
  256. package/build/v4/runtime/steps/metaOs.js +39 -51
  257. package/build/v4/runtime/steps/metaOs.js.map +1 -1
  258. package/build/v4/runtime/steps/officeAddin.d.ts.map +1 -1
  259. package/build/v4/runtime/steps/officeAddin.js +7 -12
  260. package/build/v4/runtime/steps/officeAddin.js.map +1 -1
  261. package/build/v4/runtime/steps/openApi.d.ts.map +1 -1
  262. package/build/v4/runtime/steps/openApi.js +85 -566
  263. package/build/v4/runtime/steps/openApi.js.map +1 -1
  264. package/build/v4/runtime/steps/openApiCustomApi.d.ts +5 -0
  265. package/build/v4/runtime/steps/openApiCustomApi.d.ts.map +1 -0
  266. package/build/v4/runtime/steps/openApiCustomApi.js +385 -0
  267. package/build/v4/runtime/steps/openApiCustomApi.js.map +1 -0
  268. package/build/v4/runtime/whitelist.d.ts +27 -0
  269. package/build/v4/runtime/whitelist.d.ts.map +1 -1
  270. package/build/v4/runtime/whitelist.js +156 -1
  271. package/build/v4/runtime/whitelist.js.map +1 -1
  272. package/build/v4/runtime/withTempDirectory.d.ts +10 -0
  273. package/build/v4/runtime/withTempDirectory.d.ts.map +1 -0
  274. package/build/v4/runtime/withTempDirectory.js +41 -0
  275. package/build/v4/runtime/withTempDirectory.js.map +1 -0
  276. package/build/v4/surface/createFloorTail.d.ts +12 -0
  277. package/build/v4/surface/createFloorTail.d.ts.map +1 -0
  278. package/build/v4/surface/createFloorTail.js +138 -0
  279. package/build/v4/surface/createFloorTail.js.map +1 -0
  280. package/build/v4/surface/createInputs.d.ts +25 -3
  281. package/build/v4/surface/createInputs.d.ts.map +1 -1
  282. package/build/v4/surface/createInputs.js +54 -431
  283. package/build/v4/surface/createInputs.js.map +1 -1
  284. package/build/v4/surface/createSelectorWalk.d.ts +8 -3
  285. package/build/v4/surface/createSelectorWalk.d.ts.map +1 -1
  286. package/build/v4/surface/createSelectorWalk.js +21 -11
  287. package/build/v4/surface/createSelectorWalk.js.map +1 -1
  288. package/build/v4/surface/deriveCreateOptions.d.ts.map +1 -1
  289. package/build/v4/surface/deriveCreateOptions.js +5 -2
  290. package/build/v4/surface/deriveCreateOptions.js.map +1 -1
  291. package/build/v4/surface/localizePrompt.d.ts +11 -0
  292. package/build/v4/surface/localizePrompt.d.ts.map +1 -0
  293. package/build/v4/surface/localizePrompt.js +32 -0
  294. package/build/v4/surface/localizePrompt.js.map +1 -0
  295. package/build/v4/surface/modifySelectorWalk.d.ts.map +1 -1
  296. package/build/v4/surface/modifySelectorWalk.js +0 -3
  297. package/build/v4/surface/modifySelectorWalk.js.map +1 -1
  298. package/build/v4/surface/uiPromptUI.d.ts.map +1 -1
  299. package/build/v4/surface/uiPromptUI.js +45 -45
  300. package/build/v4/surface/uiPromptUI.js.map +1 -1
  301. package/build/v4/validation/capabilityCatalog.d.ts +8 -0
  302. package/build/v4/validation/capabilityCatalog.d.ts.map +1 -0
  303. package/build/v4/validation/capabilityCatalog.js +62 -0
  304. package/build/v4/validation/capabilityCatalog.js.map +1 -0
  305. package/build/v4/validation/templateArchiveValidation.d.ts +15 -0
  306. package/build/v4/validation/templateArchiveValidation.d.ts.map +1 -0
  307. package/build/v4/validation/templateArchiveValidation.js +297 -0
  308. package/build/v4/validation/templateArchiveValidation.js.map +1 -0
  309. package/build/v4/validation/validateTemplatePackage.d.ts +21 -2
  310. package/build/v4/validation/validateTemplatePackage.d.ts.map +1 -1
  311. package/build/v4/validation/validateTemplatePackage.js +155 -31
  312. package/build/v4/validation/validateTemplatePackage.js.map +1 -1
  313. package/build/v4/validators/createInputValidators.d.ts +7 -0
  314. package/build/v4/validators/createInputValidators.d.ts.map +1 -0
  315. package/build/v4/validators/createInputValidators.js +77 -0
  316. package/build/v4/validators/createInputValidators.js.map +1 -0
  317. package/build/v4/validators/mcpCredentialValidators.d.ts +5 -0
  318. package/build/v4/validators/mcpCredentialValidators.d.ts.map +1 -0
  319. package/build/v4/validators/mcpCredentialValidators.js +13 -0
  320. package/build/v4/validators/mcpCredentialValidators.js.map +1 -0
  321. package/build/v4/validators/mcpServerUrlValidator.d.ts +9 -0
  322. package/build/v4/validators/mcpServerUrlValidator.d.ts.map +1 -0
  323. package/build/v4/validators/mcpServerUrlValidator.js +15 -0
  324. package/build/v4/validators/mcpServerUrlValidator.js.map +1 -0
  325. package/package.json +29 -23
  326. package/resource/package.nls.cs.json +56 -54
  327. package/resource/package.nls.de.json +56 -54
  328. package/resource/package.nls.es.json +55 -53
  329. package/resource/package.nls.fr.json +56 -54
  330. package/resource/package.nls.it.json +55 -53
  331. package/resource/package.nls.ja.json +56 -54
  332. package/resource/package.nls.json +10 -3
  333. package/resource/package.nls.ko.json +56 -54
  334. package/resource/package.nls.pl.json +56 -54
  335. package/resource/package.nls.pt-BR.json +56 -54
  336. package/resource/package.nls.ru.json +56 -54
  337. package/resource/package.nls.tr.json +56 -54
  338. package/resource/package.nls.zh-Hans.json +56 -54
  339. package/resource/package.nls.zh-Hant.json +56 -54
  340. package/resource/templates/package.nls.cs.json +22 -9
  341. package/resource/templates/package.nls.de.json +22 -9
  342. package/resource/templates/package.nls.es.json +22 -9
  343. package/resource/templates/package.nls.fr.json +22 -9
  344. package/resource/templates/package.nls.it.json +22 -9
  345. package/resource/templates/package.nls.ja.json +22 -9
  346. package/resource/templates/package.nls.json +16 -3
  347. package/resource/templates/package.nls.ko.json +22 -9
  348. package/resource/templates/package.nls.pl.json +22 -9
  349. package/resource/templates/package.nls.pt-BR.json +22 -9
  350. package/resource/templates/package.nls.ru.json +22 -9
  351. package/resource/templates/package.nls.tr.json +22 -9
  352. package/resource/templates/package.nls.zh-Hans.json +22 -9
  353. package/resource/templates/package.nls.zh-Hant.json +22 -9
  354. package/resource/templates/package.nls.zh-cn.json +7 -1
  355. package/resource/templates/package.nls.zh-tw.json +7 -1
  356. package/templates/fallback/common.zip +0 -0
  357. package/templates/fallback/csharp.zip +0 -0
  358. package/templates/fallback/js.zip +0 -0
  359. package/templates/fallback/python.zip +0 -0
  360. package/templates/fallback/ts.zip +0 -0
  361. package/templates/metadata/allTemplates.json +16 -2
  362. package/templates/metadata.zip +0 -0
  363. package/templates/ui/wizardNode.json +24 -0
  364. package/templates/v4/create-selector.json +30 -5
  365. package/templates/v4/floor.json +1 -1
  366. package/templates/v4/modify-selector.json +1 -6
  367. package/templates/v4/templates-metadata.zip +0 -0
  368. package/templates/v4/templates.zip +0 -0
  369. package/templates/configs/local/typescript/.gitignore +0 -1
  370. package/templates/configs/playground/typescript/.gitignore +0 -4
@@ -0,0 +1,404 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.fetchMCPTools = fetchMCPTools;
6
+ exports.readMCPToolsFromFile = readMCPToolsFromFile;
7
+ exports.probeMCPServerAuth = probeMCPServerAuth;
8
+ exports.buildWellKnownCandidates = buildWellKnownCandidates;
9
+ exports.buildMCPServerWellKnownCandidates = buildMCPServerWellKnownCandidates;
10
+ exports.buildProtectedResourceCandidates = buildProtectedResourceCandidates;
11
+ exports.resolveMCPOAuthMetadata = resolveMCPOAuthMetadata;
12
+ const tslib_1 = require("tslib");
13
+ const axios_1 = tslib_1.__importDefault(require("axios"));
14
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
15
+ const localizeUtils_1 = require("./localizeUtils");
16
+ /** Fetch MCP tool definitions from a remote MCP server. */
17
+ async function fetchMCPTools(serverUrl) {
18
+ let authMetadataUrl;
19
+ try {
20
+ await axios_1.default.get(serverUrl, { timeout: 10000 });
21
+ }
22
+ catch (error) {
23
+ if (error?.response?.status === 401 || error?.status === 401) {
24
+ const wwwAuth = error?.response?.headers?.["www-authenticate"];
25
+ if (wwwAuth) {
26
+ const match = wwwAuth.match(/resource_metadata=\s*"([^"]+)"/);
27
+ if (match) {
28
+ authMetadataUrl = match[1];
29
+ }
30
+ }
31
+ return { requiresAuth: true, tools: [], authMetadataUrl };
32
+ }
33
+ }
34
+ try {
35
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
36
+ // @ts-ignore - dynamic import of MCP SDK subpath
37
+ const { Client } = await Promise.resolve().then(() => tslib_1.__importStar(require("@modelcontextprotocol/sdk/client/index.js")));
38
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
39
+ // @ts-ignore - dynamic import of MCP SDK subpath
40
+ const { StreamableHTTPClientTransport } = await Promise.resolve().then(() => tslib_1.__importStar(require("@modelcontextprotocol/sdk/client/streamableHttp.js")));
41
+ const transport = new StreamableHTTPClientTransport(new URL(serverUrl));
42
+ const client = new Client({ name: "atk-cli", version: "1.0.0" });
43
+ try {
44
+ await client.connect(transport);
45
+ const result = await client.listTools();
46
+ const tools = result.tools.map((tool) => ({
47
+ ...tool,
48
+ description: tool.description ?? "",
49
+ }));
50
+ return { requiresAuth: false, tools };
51
+ }
52
+ finally {
53
+ await client.close();
54
+ }
55
+ }
56
+ catch (error) {
57
+ try {
58
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
59
+ // @ts-ignore - dynamic import of MCP SDK subpath
60
+ const { Client } = await Promise.resolve().then(() => tslib_1.__importStar(require("@modelcontextprotocol/sdk/client/index.js")));
61
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
62
+ // @ts-ignore - dynamic import of MCP SDK subpath
63
+ const { SSEClientTransport } = await Promise.resolve().then(() => tslib_1.__importStar(require("@modelcontextprotocol/sdk/client/sse.js")));
64
+ const transport = new SSEClientTransport(new URL(serverUrl));
65
+ const client = new Client({ name: "atk-cli", version: "1.0.0" });
66
+ try {
67
+ await client.connect(transport);
68
+ const result = await client.listTools();
69
+ const tools = result.tools.map((tool) => ({
70
+ ...tool,
71
+ description: tool.description ?? "",
72
+ }));
73
+ return { requiresAuth: false, tools };
74
+ }
75
+ finally {
76
+ await client.close();
77
+ }
78
+ }
79
+ catch {
80
+ if (error?.message?.includes("401") ||
81
+ error?.message?.includes("Unauthorized") ||
82
+ error?.message?.includes("auth")) {
83
+ return { requiresAuth: true, tools: [] };
84
+ }
85
+ return { requiresAuth: false, tools: [] };
86
+ }
87
+ }
88
+ }
89
+ /** Read MCP tool definitions from a wrapped or raw JSON array. */
90
+ async function readMCPToolsFromFile(filePath) {
91
+ if (!(await fs_extra_1.default.pathExists(filePath))) {
92
+ throw new Error((0, localizeUtils_1.getLocalizedString)("core.MCPForDA.toolsFileNotFound", filePath));
93
+ }
94
+ const content = await fs_extra_1.default.readJSON(filePath);
95
+ let rawTools;
96
+ if (Array.isArray(content)) {
97
+ rawTools = content;
98
+ }
99
+ else if (content && Array.isArray(content.tools)) {
100
+ rawTools = content.tools;
101
+ }
102
+ else {
103
+ throw new Error((0, localizeUtils_1.getLocalizedString)("core.MCPForDA.toolsFileInvalidFormat", '{ "tools": [...] }', filePath));
104
+ }
105
+ return rawTools.map((tool) => {
106
+ if (!tool.name) {
107
+ throw new Error((0, localizeUtils_1.getLocalizedString)("core.MCPForDA.toolsFileMissingName", '"name"', filePath));
108
+ }
109
+ return {
110
+ name: tool.name,
111
+ description: tool.description ?? "",
112
+ inputSchema: tool.inputSchema ?? tool.input_schema ?? { type: "object", properties: {} },
113
+ outputSchema: tool.outputSchema ?? tool.output_schema,
114
+ tags: tool.tags,
115
+ };
116
+ });
117
+ }
118
+ /** HTTP statuses treated as proof that no MCP endpoint is routed at the URL.
119
+ *
120
+ * Deliberately enumerated rather than "any 4xx": measurements across nine live servers only ever
121
+ * produced these three for a wrong URL (404 from routing, 405 from an endpoint that exists but
122
+ * rejects the method, 403 from a WAF in front of the app). Statuses such as 429 or 408 are
123
+ * transient and would slander a URL that is in fact correct. 400 is excluded on purpose: the
124
+ * transport spec requires a server to answer 400 when it rejects the `MCP-Protocol-Version`,
125
+ * so a valid endpoint may well produce one for this probe. */
126
+ const NOT_AN_ENDPOINT_STATUSES = [403, 404, 405];
127
+ /** How long to wait for a deprecated HTTP+SSE server to name its message endpoint. */
128
+ const LEGACY_SSE_TIMEOUT_MS = 5000;
129
+ /** Stop buffering an event stream that is not going to name an endpoint. */
130
+ const LEGACY_SSE_MAX_BYTES = 8192;
131
+ /**
132
+ * A 2xx alone proves nothing: a truncated URL on a host that serves a landing page answers 200
133
+ * with HTML. The JSON-RPC envelope in the payload is the actual proof. The body text is searched
134
+ * instead of the frames being parsed because that works for both `application/json` and the
135
+ * `text/event-stream` framing streamable-HTTP servers use — `jsonrpc` sits inside the `data:`
136
+ * payload either way. The quotes keep an HTML page that merely mentions the word from matching.
137
+ */
138
+ function carriesJSONRPCEnvelope(body) {
139
+ if (typeof body === "string") {
140
+ return body.includes('"jsonrpc"');
141
+ }
142
+ if (body && typeof body === "object") {
143
+ return "jsonrpc" in body;
144
+ }
145
+ return false;
146
+ }
147
+ /**
148
+ * Read an event stream only as far as the first `endpoint` event, which is how a 2024-11-05
149
+ * server announces where its messages go. Anything else — the stream ending, an error, a
150
+ * stream that just keeps talking, a server that never answers — means no such announcement.
151
+ */
152
+ function announcesLegacyMessageEndpoint(stream) {
153
+ return new Promise((resolve) => {
154
+ let buffered = "";
155
+ const settle = (found) => {
156
+ clearTimeout(timer);
157
+ stream.destroy();
158
+ resolve(found);
159
+ };
160
+ const timer = setTimeout(() => settle(false), LEGACY_SSE_TIMEOUT_MS);
161
+ stream.on("data", (chunk) => {
162
+ buffered += chunk.toString();
163
+ if (/^event:\s*endpoint\s*$/m.test(buffered)) {
164
+ settle(true);
165
+ }
166
+ else if (buffered.length > LEGACY_SSE_MAX_BYTES) {
167
+ settle(false);
168
+ }
169
+ });
170
+ stream.on("end", () => settle(false));
171
+ stream.on("error", () => settle(false));
172
+ });
173
+ }
174
+ /**
175
+ * Ask the URL, the way the MCP transport spec's backwards-compatibility rule prescribes,
176
+ * whether a deprecated HTTP+SSE server is listening there.
177
+ *
178
+ * A 2024-11-05 server has no streamable-HTTP endpoint to POST to, so it answers the
179
+ * `initialize` POST with a 4xx — the spec names 405 and 404 explicitly. Reading that 4xx as
180
+ * proof of a wrong URL would therefore condemn a whole generation of valid servers. The spec's
181
+ * own disambiguation is to open an SSE stream with GET: an HTTP+SSE server replies
182
+ * `text/event-stream` and names its message endpoint in the first event.
183
+ */
184
+ async function servesLegacySSETransport(serverUrl) {
185
+ try {
186
+ const response = await axios_1.default.get(serverUrl, {
187
+ timeout: LEGACY_SSE_TIMEOUT_MS,
188
+ responseType: "stream",
189
+ headers: { Accept: "text/event-stream" },
190
+ });
191
+ const contentType = String(response.headers?.["content-type"] ?? "");
192
+ if (!contentType.includes("text/event-stream")) {
193
+ response.data?.destroy?.();
194
+ return false;
195
+ }
196
+ return await announcesLegacyMessageEndpoint(response.data);
197
+ }
198
+ catch {
199
+ // A GET that fails says only that the old transport is not there either.
200
+ return false;
201
+ }
202
+ }
203
+ /** Probe an MCP streamable-HTTP endpoint for an OAuth challenge and for the URL's validity. */
204
+ async function probeMCPServerAuth(serverUrl) {
205
+ const initializeBody = {
206
+ jsonrpc: "2.0",
207
+ id: 1,
208
+ method: "initialize",
209
+ params: {
210
+ protocolVersion: "2025-03-26",
211
+ capabilities: {},
212
+ clientInfo: { name: "atk-probe", version: "1.0.0" },
213
+ },
214
+ };
215
+ try {
216
+ const response = await axios_1.default.post(serverUrl, initializeBody, {
217
+ timeout: 10000,
218
+ headers: {
219
+ "Content-Type": "application/json",
220
+ Accept: "application/json, text/event-stream",
221
+ },
222
+ });
223
+ return carriesJSONRPCEnvelope(response.data)
224
+ ? { requiresAuth: false, endpointStatus: "confirmed" }
225
+ : { requiresAuth: false, endpointStatus: "notEndpoint", responseStatus: response.status };
226
+ }
227
+ catch (error) {
228
+ const status = error?.response?.status ?? error?.status;
229
+ if (status === 401) {
230
+ // Only something that means to be a protected resource issues an OAuth challenge, so a
231
+ // 401 confirms the endpoint just as firmly as a successful initialize does.
232
+ const wwwAuth = error?.response?.headers?.["www-authenticate"];
233
+ let authMetadataUrl;
234
+ if (wwwAuth) {
235
+ const match = wwwAuth.match(/resource_metadata=\s*"([^"]+)"/);
236
+ if (match) {
237
+ authMetadataUrl = match[1];
238
+ }
239
+ }
240
+ return { requiresAuth: true, authMetadataUrl, endpointStatus: "confirmed" };
241
+ }
242
+ if (typeof status === "number" && NOT_AN_ENDPOINT_STATUSES.includes(status)) {
243
+ // The spec reads a 4xx here as "this may be the old transport", not as "wrong URL", so
244
+ // the verdict is not settled until HTTP+SSE has been ruled out.
245
+ return (await servesLegacySSETransport(serverUrl))
246
+ ? { requiresAuth: false, endpointStatus: "confirmed" }
247
+ : { requiresAuth: false, endpointStatus: "notEndpoint", responseStatus: status };
248
+ }
249
+ return { requiresAuth: false, endpointStatus: "undetermined" };
250
+ }
251
+ }
252
+ /**
253
+ * Build the ordered list of authorization-server metadata URLs to probe for an issuer.
254
+ *
255
+ * Providers disagree on which discovery form they serve: RFC 8414 §3.1 mandates inserting
256
+ * `/.well-known/oauth-authorization-server` between the host and the issuer path, while
257
+ * OpenID Connect Discovery §4 appends `/.well-known/openid-configuration` to the issuer.
258
+ * Microsoft Entra, for example, serves ONLY the appended OIDC form — the RFC 8414 insertion
259
+ * form returns 404 — so probing a single form silently loses the endpoints for whole classes
260
+ * of identity providers. Candidates are deduplicated (a host-only issuer collapses the
261
+ * insertion and append forms) and returned in RFC-preference order.
262
+ */
263
+ function buildWellKnownCandidates(issuer) {
264
+ const issuerUrl = new URL(issuer);
265
+ const origin = `${issuerUrl.protocol}//${issuerUrl.host}`;
266
+ // A trailing slash makes providers such as Notion return 404 for the insertion form.
267
+ const issuerPath = issuerUrl.pathname === "/" ? "" : issuerUrl.pathname.replace(/\/+$/, "");
268
+ return [
269
+ ...new Set([
270
+ `${origin}/.well-known/oauth-authorization-server${issuerPath}`,
271
+ `${origin}/.well-known/openid-configuration${issuerPath}`,
272
+ `${origin}${issuerPath}/.well-known/oauth-authorization-server`,
273
+ `${origin}${issuerPath}/.well-known/openid-configuration`,
274
+ ]),
275
+ ];
276
+ }
277
+ /**
278
+ * Build the ordered list of authorization-server metadata URLs to probe for an MCP server that
279
+ * never pointed at an authorization server.
280
+ *
281
+ * MCP servers written against the 2025-03-26 authorization spec are their own authorization
282
+ * server: they publish RFC 8414 metadata at the origin root and ship no RFC 9728
283
+ * protected-resource document at all. Such a server answers the 401 challenge with `realm`
284
+ * alone, so `resource_metadata` discovery dead-ends and the endpoints have to be derived from
285
+ * the server URL instead. Path-derived forms are probed first, because a host exposing several
286
+ * MCP endpoints may serve per-endpoint metadata; the origin root is the last resort.
287
+ */
288
+ function buildMCPServerWellKnownCandidates(mcpServerUrl) {
289
+ const serverUrl = new URL(mcpServerUrl);
290
+ const origin = `${serverUrl.protocol}//${serverUrl.host}`;
291
+ return [
292
+ ...new Set([
293
+ ...buildWellKnownCandidates(mcpServerUrl),
294
+ `${origin}/.well-known/oauth-authorization-server`,
295
+ `${origin}/.well-known/openid-configuration`,
296
+ ]),
297
+ ];
298
+ }
299
+ /**
300
+ * Build the RFC 9728 protected-resource metadata URLs to probe for an MCP server that never
301
+ * advertised one.
302
+ *
303
+ * A server only hands out its `resource_metadata` location inside a `WWW-Authenticate`
304
+ * challenge, and a server that defers authorization to the individual tool calls answers an
305
+ * unauthenticated `initialize` with a plain 200 and no challenge at all — Google's Gmail,
306
+ * Calendar and Drive servers do exactly that, yet each publishes a protected-resource document
307
+ * naming `https://accounts.google.com/`. Waiting to be told therefore loses the metadata for a
308
+ * whole class of servers, so the document is derived from the resource URL instead, as MCP's
309
+ * authorization spec requires of clients. RFC 9728 §3.1 inserts the well-known segment between
310
+ * the host and the resource path; the path-less form follows for servers that publish at the
311
+ * origin root only.
312
+ */
313
+ function buildProtectedResourceCandidates(mcpServerUrl) {
314
+ const serverUrl = new URL(mcpServerUrl);
315
+ const origin = `${serverUrl.protocol}//${serverUrl.host}`;
316
+ const resourcePath = serverUrl.pathname === "/" ? "" : serverUrl.pathname.replace(/\/+$/, "");
317
+ return [
318
+ ...new Set([
319
+ `${origin}/.well-known/oauth-protected-resource${resourcePath}`,
320
+ `${origin}/.well-known/oauth-protected-resource`,
321
+ ]),
322
+ ];
323
+ }
324
+ /**
325
+ * Read the RFC 9728 protected-resource document the server advertised and turn its first
326
+ * authorization server into discovery candidates. Returns an empty list when the document
327
+ * names no authorization server.
328
+ */
329
+ async function candidatesFromProtectedResourceMetadata(authMetadataUrl, canFallBack) {
330
+ let response;
331
+ try {
332
+ response = await axios_1.default.get(authMetadataUrl);
333
+ }
334
+ catch (error) {
335
+ // A server advertising a document it cannot serve is broken, but the MCP server URL may
336
+ // still lead to the authorization server, so let the caller try that before failing.
337
+ if (canFallBack) {
338
+ return [];
339
+ }
340
+ throw error;
341
+ }
342
+ const issuers = response.data?.authorization_servers;
343
+ if (response.status === 200 && Array.isArray(issuers) && issuers.length > 0) {
344
+ return buildWellKnownCandidates(issuers[0]);
345
+ }
346
+ return [];
347
+ }
348
+ /**
349
+ * Look for a protected-resource document at the locations RFC 9728 derives from the MCP server
350
+ * URL. The first document naming an authorization server wins; a location that is absent only
351
+ * means this server publishes at the other one.
352
+ */
353
+ async function candidatesFromDerivedProtectedResource(mcpServerUrl) {
354
+ for (const candidate of buildProtectedResourceCandidates(mcpServerUrl)) {
355
+ const candidates = await candidatesFromProtectedResourceMetadata(candidate, true);
356
+ if (candidates.length > 0) {
357
+ return candidates;
358
+ }
359
+ }
360
+ return [];
361
+ }
362
+ /** Resolve OAuth endpoints from MCP resource or authorization-server metadata. */
363
+ async function resolveMCPOAuthMetadata(authMetadataUrl, wellKnownUrl, mcpServerUrl) {
364
+ let candidates;
365
+ if (wellKnownUrl) {
366
+ // An explicitly configured URL is authoritative — never substitute a guess for it.
367
+ candidates = [wellKnownUrl];
368
+ }
369
+ else {
370
+ candidates = authMetadataUrl
371
+ ? await candidatesFromProtectedResourceMetadata(authMetadataUrl, !!mcpServerUrl)
372
+ : [];
373
+ if (candidates.length === 0 && mcpServerUrl) {
374
+ // The authoritative answer, when the server publishes one, is its protected-resource
375
+ // document — so try that before assuming the server is its own authorization server.
376
+ candidates = await candidatesFromDerivedProtectedResource(mcpServerUrl);
377
+ }
378
+ if (candidates.length === 0 && mcpServerUrl) {
379
+ candidates = buildMCPServerWellKnownCandidates(mcpServerUrl);
380
+ }
381
+ if (candidates.length === 0) {
382
+ throw new Error((0, localizeUtils_1.getLocalizedString)(authMetadataUrl
383
+ ? "core.MCPForDA.mcpServerMetadataUrlNotFound"
384
+ : "core.MCPForDA.mcpAuthMetadataUrlNotFound"));
385
+ }
386
+ }
387
+ for (const candidate of candidates) {
388
+ try {
389
+ const metadataResponse = await axios_1.default.get(candidate);
390
+ const authorizationUrl = metadataResponse.data?.authorization_endpoint;
391
+ const tokenUrl = metadataResponse.data?.token_endpoint;
392
+ const refreshUrl = metadataResponse.data?.refresh_endpoint;
393
+ if (authorizationUrl && tokenUrl) {
394
+ return { authorizationUrl, tokenUrl, refreshUrl, wellKnownUrl: candidate };
395
+ }
396
+ }
397
+ catch {
398
+ // A 404 / unreachable candidate just means this provider uses a different
399
+ // discovery form; keep probing and report every attempt if all of them fail.
400
+ }
401
+ }
402
+ throw new Error((0, localizeUtils_1.getLocalizedString)("core.MCPForDA.authUrlNotFound", candidates.join(", ")));
403
+ }
404
+ //# sourceMappingURL=mcpToolFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcpToolFetcher.js","sourceRoot":"","sources":["../../src/common/mcpToolFetcher.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAsBlC,sCA0EC;AAGD,oDA8BC;AAsHD,gDA8CC;AAoBD,4DAaC;AAaD,8EAUC;AAgBD,4EAUC;AA6CD,0DAoDC;;AAtdD,0DAA0B;AAC1B,gEAA0B;AAE1B,mDAAqD;AAgBrD,2DAA2D;AACpD,KAAK,UAAU,aAAa,CAAC,SAAiB;IACnD,IAAI,eAAmC,CAAC;IACxC,IAAI,CAAC;QACH,MAAM,eAAK,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACjD,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,IAAI,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;YAC7D,MAAM,OAAO,GAAG,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,kBAAkB,CAAC,CAAC;YAC/D,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;gBAC9D,IAAI,KAAK,EAAE,CAAC;oBACV,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC;YACD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC;QAC5D,CAAC;IACH,CAAC;IAED,IAAI,CAAC;QACH,6DAA6D;QAC7D,iDAAiD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MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,CAAC;YAC3D,IAAI,gBAAgB,IAAI,QAAQ,EAAE,CAAC;gBACjC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;YAC7E,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;YAC1E,6EAA6E;QAC/E,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,IAAA,kCAAkB,EAAC,+BAA+B,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,43 @@
1
+ import * as childProcess from "child_process";
2
+ export declare const odrProviderDeps: {
3
+ getPlatform: () => string;
4
+ exec: typeof childProcess.exec;
5
+ logError: (...args: unknown[]) => void;
6
+ };
7
+ export declare const logError: (...args: unknown[]) => void;
8
+ export interface ODRServer {
9
+ name: string;
10
+ display_name: string;
11
+ description: string;
12
+ version: string;
13
+ identifier: string;
14
+ tools: ODRTool[];
15
+ packageFamily: string;
16
+ command: string;
17
+ args: string[];
18
+ }
19
+ export interface ODRTool {
20
+ name: string;
21
+ description: string;
22
+ inputSchema: ODRToolSchema;
23
+ outputSchema?: ODRToolSchema;
24
+ _meta?: unknown;
25
+ }
26
+ export interface ODRToolSchema {
27
+ type: "object";
28
+ properties?: Record<string, ODRToolParameterSchema>;
29
+ required?: string[];
30
+ [key: string]: unknown;
31
+ }
32
+ export interface ODRToolParameterSchema {
33
+ type?: string;
34
+ enum?: unknown[];
35
+ [key: string]: unknown;
36
+ }
37
+ export declare class ODRProvider {
38
+ static isODRServer(serverConfig: unknown): boolean;
39
+ static parseODRListOutput(jsonOutput: unknown): ODRServer[];
40
+ static listServers(): Promise<ODRServer[]>;
41
+ static getToolsForODRServer(command: string, args?: string[]): Promise<ODRTool[]>;
42
+ }
43
+ //# sourceMappingURL=odrProvider.d.ts.map
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AAE,OAAO,GAAG,OAAO;IAUlD,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,OAAO,GAAG,SAAS,EAAE;WAS9C,WAAW,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;WAkBnC,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;CAQ5F"}
@@ -0,0 +1,154 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ODRProvider = exports.logError = exports.odrProviderDeps = void 0;
6
+ const tslib_1 = require("tslib");
7
+ const childProcess = tslib_1.__importStar(require("child_process"));
8
+ const util_1 = require("util");
9
+ exports.odrProviderDeps = {
10
+ getPlatform: () => process.platform,
11
+ exec: childProcess.exec,
12
+ logError: (...args) => console.error(...args),
13
+ };
14
+ const logError = (...args) => exports.odrProviderDeps.logError(...args);
15
+ exports.logError = logError;
16
+ function isRecord(value) {
17
+ return typeof value === "object" && value !== null && !Array.isArray(value);
18
+ }
19
+ function recordProperty(value, key) {
20
+ if (!isRecord(value)) {
21
+ return undefined;
22
+ }
23
+ const property = value[key];
24
+ return isRecord(property) ? property : undefined;
25
+ }
26
+ function stringProperty(value, key) {
27
+ if (!isRecord(value)) {
28
+ return undefined;
29
+ }
30
+ const property = value[key];
31
+ return typeof property === "string" ? property : undefined;
32
+ }
33
+ function stringArray(value) {
34
+ return Array.isArray(value)
35
+ ? value.filter((item) => typeof item === "string")
36
+ : [];
37
+ }
38
+ function parameterSchema(value) {
39
+ if (!isRecord(value)) {
40
+ return {};
41
+ }
42
+ return {
43
+ ...value,
44
+ type: typeof value.type === "string" ? value.type : undefined,
45
+ enum: Array.isArray(value.enum) ? value.enum : undefined,
46
+ };
47
+ }
48
+ function schemaProperties(value) {
49
+ if (!isRecord(value)) {
50
+ return undefined;
51
+ }
52
+ return Object.fromEntries(Object.entries(value).map(([name, schema]) => [name, parameterSchema(schema)]));
53
+ }
54
+ function toolSchema(value) {
55
+ if (!isRecord(value)) {
56
+ return { type: "object" };
57
+ }
58
+ return {
59
+ ...value,
60
+ type: "object",
61
+ properties: schemaProperties(value.properties),
62
+ required: Array.isArray(value.required) ? stringArray(value.required) : undefined,
63
+ };
64
+ }
65
+ function parseTool(value) {
66
+ const name = stringProperty(value, "name");
67
+ if (!name || !isRecord(value)) {
68
+ return undefined;
69
+ }
70
+ return {
71
+ name,
72
+ description: stringProperty(value, "description") ?? "",
73
+ inputSchema: toolSchema(value.inputSchema),
74
+ outputSchema: isRecord(value.outputSchema) ? toolSchema(value.outputSchema) : undefined,
75
+ };
76
+ }
77
+ function parseServer(value) {
78
+ if (!isRecord(value)) {
79
+ return undefined;
80
+ }
81
+ const publisherMeta = recordProperty(recordProperty(value, "_meta"), "io.modelcontextprotocol.registry/publisher-provided");
82
+ const windowsMeta = recordProperty(publisherMeta, "com.microsoft.windows");
83
+ const manifest = recordProperty(windowsMeta, "manifest");
84
+ const manifestMeta = recordProperty(manifest, "_meta");
85
+ const manifestWindowsMeta = recordProperty(manifestMeta, "com.microsoft.windows");
86
+ const packageFamily = stringProperty(manifestWindowsMeta, "package_family_name");
87
+ const server = recordProperty(manifest, "server");
88
+ const mcpConfig = recordProperty(server, "mcp_config");
89
+ if (!packageFamily || !mcpConfig) {
90
+ return undefined;
91
+ }
92
+ const staticResponses = recordProperty(manifestWindowsMeta, "static_responses");
93
+ const toolsResponse = recordProperty(staticResponses, "tools/list");
94
+ const rawTools = toolsResponse?.tools;
95
+ const tools = Array.isArray(rawTools)
96
+ ? rawTools.map(parseTool).filter((tool) => tool !== undefined)
97
+ : [];
98
+ const packages = Array.isArray(value.packages) ? value.packages : [];
99
+ const name = stringProperty(value, "name") ?? "";
100
+ return {
101
+ name,
102
+ packageFamily,
103
+ display_name: stringProperty(manifest, "display_name") ?? name,
104
+ description: stringProperty(value, "description") ?? "",
105
+ version: stringProperty(value, "version") ?? "1.0.0",
106
+ identifier: stringProperty(packages[0], "identifier") ?? "",
107
+ command: stringProperty(mcpConfig, "command") ?? "",
108
+ args: stringArray(mcpConfig.args),
109
+ tools,
110
+ };
111
+ }
112
+ class ODRProvider {
113
+ static isODRServer(serverConfig) {
114
+ const type = stringProperty(serverConfig, "type");
115
+ const command = stringProperty(serverConfig, "command");
116
+ if (type !== "stdio" || !command) {
117
+ return false;
118
+ }
119
+ const configCommand = command.toLowerCase();
120
+ return configCommand === "odr" || configCommand.endsWith("odr.exe");
121
+ }
122
+ static parseODRListOutput(jsonOutput) {
123
+ if (!isRecord(jsonOutput) || !Array.isArray(jsonOutput.servers)) {
124
+ return [];
125
+ }
126
+ return jsonOutput.servers
127
+ .map(parseServer)
128
+ .filter((server) => server !== undefined);
129
+ }
130
+ static async listServers() {
131
+ if (exports.odrProviderDeps.getPlatform() !== "win32") {
132
+ return [];
133
+ }
134
+ const execAsync = (0, util_1.promisify)(exports.odrProviderDeps.exec);
135
+ try {
136
+ const { stdout } = await execAsync("odr list");
137
+ if (!stdout) {
138
+ return [];
139
+ }
140
+ return ODRProvider.parseODRListOutput(JSON.parse(stdout));
141
+ }
142
+ catch (error) {
143
+ exports.odrProviderDeps.logError("Error executing odr list:", error);
144
+ return [];
145
+ }
146
+ }
147
+ static async getToolsForODRServer(command, args = []) {
148
+ const odrServers = await ODRProvider.listServers();
149
+ const matchingServer = odrServers.find((odrServer) => odrServer.command === command && JSON.stringify(odrServer.args) === JSON.stringify(args));
150
+ return matchingServer?.tools ?? [];
151
+ }
152
+ }
153
+ exports.ODRProvider = ODRProvider;
154
+ //# sourceMappingURL=odrProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odrProvider.js","sourceRoot":"","sources":["../../src/common/odrProvider.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,oEAA8C;AAC9C,+BAAiC;AAEpB,QAAA,eAAe,GAAG;IAC7B,WAAW,EAAE,G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,uBAAe,CAAC,QAAQ,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;YAC7D,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,OAAe,EAAE,OAAiB,EAAE;QACpE,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,WAAW,EAAE,CAAC;QACnD,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,CACpC,CAAC,SAAS,EAAE,EAAE,CACZ,SAAS,CAAC,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAC3F,CAAC;QACF,OAAO,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC;IACrC,CAAC;CACF;AA9CD,kCA8CC"}
@@ -0,0 +1,3 @@
1
+ import { ParseOptions, ProjectType } from "@microsoft/m365-spec-parser";
2
+ export declare function getParserOptions(type: ProjectType, isDeclarativeAgent?: boolean, platform?: string): ParseOptions;
3
+ //# sourceMappingURL=openApiParserOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openApiParserOptions.d.ts","sourceRoot":"","sources":["../../src/common/openApiParserOptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAIxE,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,WAAW,EACjB,kBAAkB,CAAC,EAAE,OAAO,EAC5B,QAAQ,CAAC,EAAE,MAAM,GAChB,YAAY,CAmDd"}